/* theme.css */
body {
    background: linear-gradient(135deg, #F5F5F3 0%, #F3EFE8 100%);
    min-height: 100vh;
    color: #333331;
    font-family: 'Nunito', sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6,
.card-header,
.offcanvas-title {
    color: #292623;
}

.text-muted {
    color: #73736E !important;
}

/* Sidebar styling */
.sidebar-nav {
    padding: 0 0.5rem;
}

.sidebar-nav .nav-item {
    margin-bottom: 0.25rem;
}

.sidebar-nav .nav-link {
    font-weight: 500;
    border-radius: 0.5rem !important;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    padding: 0.8rem 1rem !important;
    display: flex;
    align-items: center;
}

.sidebar-nav .nav-link:hover {
    background-color: #F3EFE8;
    color: #66503F !important;
    transform: translateX(4px);
}

.sidebar-nav .nav-link.active {
    background-color: #66503F;
    color: #fff !important;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(102, 80, 63, 0.2);
}

.sidebar-nav .nav-link.active i {
    color: #fff !important;
}

.sidebar-nav .nav-link i {
    color: #9F7B58;
    font-size: 1.1rem;
}

.sidebar-heading {
    font-size: 0.75rem;
    letter-spacing: 0.1rem;
    font-weight: 700;
}

.main-content {
    min-height: calc(100vh - 56px);
    /* 56px is approx navbar height */
    background: transparent;
}

/* Offcanvas adjustment for md and up */
@media (min-width: 768px) {
    .sidebar-wrapper {
        position: sticky;
        top: 0;
        height: 100vh;
        z-index: 1020;
    }

    .offcanvas-md {
        position: sticky;
        top: 0;
        height: 100vh;
        z-index: 1000;
        border-right: 1px solid #e9ecef;
    }
}

/* General component styling for neutral clean look */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.05);
    border-radius: 0.5rem;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #f0f2f5;
    font-weight: 600;
}

.table {
    vertical-align: middle;
}

.btn-primary {
    background-color: #66503F !important;
    border-color: #66503F !important;
    color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: #4a3a2e !important;
    border-color: #4a3a2e !important;
    color: #fff !important;
}

.text-primary {
    color: #66503F !important;
}

.badge.bg-primary,
.bg-primary {
    background-color: #9F7B58 !important;
}



/**file upload***/
/* Add to your CSS file */
.file-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    border: 1px solid #dee2e6;
    transition: all 0.2s;
}

.file-item:hover {
    background: #e9ecef;
    border-color: #ced4da;
}

.file-item-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.file-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: white;
}

.file-info {
    flex: 1;
    min-width: 0;
    /* For text truncation */
}

.file-name {
    font-weight: 500;
    margin-bottom: 2px;
    word-break: break-word;
}

.file-size {
    font-size: 0.85rem;
    color: #6c757d;
}

.file-remove-btn {
    background: none;
    border: none;
    color: #dc3545;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.file-remove-btn:hover {
    background: rgba(220, 53, 69, 0.1);
}

.progress-bar {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-fill {
    height: 100%;
    background: #0d6efd;
    width: 0%;
    transition: width 0.3s;
}

.existing-file-item {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px;
    height: 100%;
    background: white;
}

.existing-file-item:hover {
    border-color: #0d6efd;
}

.files-list-container {
    max-height: 300px;
    overflow-y: auto;
}


/* image preview */
.image-preview-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.image-preview-overlay img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 6px;
}

.image-preview-close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 34px;
    color: #fff;
    cursor: pointer;
    user-select: none;
}

.image-preview-overlay img {
    border: 1px solid #ffffff3d;
    border-radius: 5px;
    background: #fff;
}

/* scroll container */
.h-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1rem 0;
    border-radius: 12px;
    background: #fff;

    -webkit-overflow-scrolling: touch;
}

/* WebKit with smooth transitions */
.h-scroll::-webkit-scrollbar {
    height: 0;
    transition: height 0.4s ease, opacity 0.4s ease;
}

.h-scroll::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 3px;
    margin: 0 12px;
    transition: background 0.4s ease;
}

.h-scroll::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 3px;
    transition: background 0.4s ease;
}

.h-scroll:hover {
    /* Firefox - show on hover */
    /* scrollbar-width: thin; */
    scrollbar-color: rgba(0, 0, 0, 0.2) rgba(0, 0, 0, 0.05);

    /* IE/Edge - show on hover */
    -ms-overflow-style: auto;
}

.h-scroll:hover::-webkit-scrollbar {
    /* Chrome/Safari - show on hover */
    height: 6px;
    opacity: 1;
}

.h-scroll:hover::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

.h-scroll:hover::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
}

/* Firefox with transition */
.h-scroll {
    scrollbar-color: transparent transparent;
    transition: scrollbar-color 0.4s ease;
}