@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&display=swap');

:root {
    --primary-color: #eadbb8; /* Champagne/Pale Gold */
    --secondary-color: #c89b3c; /* Gold */
    --accent-color: #5a3a22; /* English Brown */
    --text-color: #fbfaf7; /* Paper warm white */
    --text-muted: #dcd6cd; /* Brighter cream-gray for high contrast readability */
    --bg-gradient-start: #1f140e; /* Slightly darker rich dark cocoa */
    --bg-gradient-end: #120b08; /* Deep espresso black background */
    --glass-bg: rgba(30, 20, 15, 0.75); /* More solid backing glass to isolate text fields */
    --glass-border: rgba(234, 219, 184, 0.25); /* Bright, distinct gold borders */
    --glass-shadow: 0 8px 32px 0 rgba(10, 6, 4, 0.75);
    --input-bg: rgba(255, 255, 255, 0.08); /* High contrast light-gray translucent input track */
    --input-focus-bg: rgba(255, 255, 255, 0.14); /* Glowing highlight on active text input */
    --table-header-bg: rgba(255, 255, 255, 0.05);
    --card-bg: rgba(255, 255, 255, 0.04);
    --primary-shadow: rgba(234, 219, 184, 0.25); /* Glowing gold focus ring aura */
    --btn-text-color: #231710;
    --theme-invert: 0.8;
}

body.light-mode {
    --primary-color: #5a3a22; /* English Brown */
    --secondary-color: #8b0000; /* Maroon */
    --accent-color: #c89b3c; /* Gold */
    --text-color: #222222; /* Ink dark gray */
    --text-muted: #696661; /* Muted warm grayish desaturated brown */
    --bg-gradient-start: #fbfaf7; /* Parchment white */
    --bg-gradient-end: #f4f1e8; /* Warm desaturated cream */
    --glass-bg: rgba(255, 255, 255, 0.85); /* White glass */
    --glass-border: #dedbd3; /* Line light gray-tan */
    --glass-shadow: 0 4px 16px rgba(40, 26, 17, 0.05);
    --input-bg: rgba(239, 237, 230, 0.6);
    --input-focus-bg: #ffffff;
    --table-header-bg: rgba(90, 58, 34, 0.06);
    --card-bg: rgba(255, 255, 255, 0.85);
    --primary-shadow: rgba(90, 58, 34, 0.15);
    --btn-text-color: #ffffff;
    --theme-invert: 0.1;
}

body {
    transition: background 0.3s ease, color 0.3s ease;
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    zoom: 0.8;
}

h1, h2, h3, h4, h5, h6, .brand-logo, .page-title {
    font-family: 'Playfair Display', Georgia, serif;
}

/* Glassmorphism Utilities */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header/Nav */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
}

.brand-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    background: linear-gradient(to right, var(--text-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: fadeInDown 0.8s ease-out;
}

.page-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--text-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    margin: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--btn-text-color);
    box-shadow: 0 4px 15px var(--primary-shadow);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-primary:hover {
    background: var(--secondary-color);
    color: var(--btn-text-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--primary-shadow);
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-color);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: var(--glass-border);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn-danger {
    background: rgba(220, 38, 38, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(220, 38, 38, 0.4);
}

.btn-danger:hover {
    background: rgba(220, 38, 38, 0.4);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
}

/* Forms (Shared Styles) */
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-muted);
}

input,
textarea,
select {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-color);
    font-family: inherit;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23818cf8%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem top 50%;
    background-size: 0.65rem auto;
    padding-right: 2.5rem;
}

select option {
    background: var(--bg-gradient-start);
    color: var(--text-color);
    padding: 0.5rem;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--input-focus-bg);
    box-shadow: 0 0 0 4px var(--primary-shadow);
}

input::placeholder, textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.5;
}

input[readonly], textarea[readonly], select[readonly] {
    opacity: 0.75 !important;
    background: rgba(0, 0, 0, 0.2) !important;
    cursor: not-allowed;
    color: var(--text-color) !important;
}

textarea {
    height: 120px;
    resize: vertical;
}

.error {
    color: #fca5a5;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    animation: shake 0.5s ease;
}

/* File Upload */
.file-input-hidden {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}

.file-upload-area {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 2rem 1.5rem;
    border: 2px dashed var(--glass-border);
    border-radius: 12px;
    background: var(--input-bg);
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-area:hover,
.file-upload-area.drag-over {
    border-color: var(--secondary-color);
    background: var(--input-focus-bg);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.file-upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    pointer-events: none;
}

.file-upload-icon {
    font-size: 2rem;
    line-height: 1;
}

.file-upload-text {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
}

.file-upload-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.6;
}

.file-upload-btn {
    margin: 0;
    padding: 0.5rem 1.5rem;
    font-size: 0.85rem;
    z-index: 1;
}

.file-name-display {
    font-size: 0.85rem;
    color: var(--secondary-color);
    font-weight: 500;
    min-height: 1.2em;
}

.file-name-display:empty {
    display: none;
}

/* Status Select Dropdown for Tables */
.status-select {
    width: auto;
    padding: 0.4rem 0.8rem;
    padding-right: 2rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    backdrop-filter: blur(4px);
    background-position: right 0.7rem top 50%;
}

/* Stat Cards for Dashboards */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
}

.stat-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.stat-info h3 {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-number {
    margin: 0.2rem 0 0 0;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
}

/* Dashboard Tabs */
.tab-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.tab-btn.active {
    background: var(--primary-color);
    color: var(--btn-text-color) !important;
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px var(--primary-shadow);
}

/* Tracking Timeline Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tracking-modal {
    width: 90%;
    max-width: 600px;
    padding: 3rem 2rem;
    position: relative;
    border-radius: 16px;
}
.btn-close {
    position: absolute;
    top: 1rem; right: 1.5rem;
    background: none; border: none;
    color: var(--text-color);
    font-size: 1.8rem;
    cursor: pointer;
    transition: color 0.3s ease;
}
.btn-close:hover { color: var(--primary-color); }

.timeline-container {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-top: 3rem;
    padding-bottom: 1rem;
}
.timeline-track {
    position: absolute;
    top: 15px; left: 0;
    height: 4px; width: 100%;
    background: var(--glass-border);
    z-index: 1;
}
.timeline-progress {
    position: absolute;
    top: 15px; left: 0;
    height: 4px; width: 0%;
    background: var(--secondary-color);
    z-index: 2;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px var(--secondary-color);
}
.timeline-step {
    position: relative;
    z-index: 3;
    text-align: center;
    width: 25%;
}
.timeline-step .node {
    width: 34px; height: 34px;
    background: var(--glass-bg);
    border: 3px solid var(--glass-border);
    border-radius: 50%;
    margin: 0 auto 0.8rem auto;
    transition: all 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.timeline-step p {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    margin: 0;
    transition: color 0.5s ease;
}
.timeline-step.completed .node, .timeline-step.active .node {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    box-shadow: 0 0 15px var(--primary-shadow);
}
.timeline-step.completed .node::after {
    content: '✓';
    color: var(--btn-text-color);
    font-size: 1.2rem;
    font-weight: bold;
}
.timeline-step.active .node {
    box-shadow: 0 0 20px var(--primary-shadow);
    animation: pulse 2s infinite;
}
.timeline-step.active p {
    color: var(--secondary-color);
    font-weight: 700;
}
@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 var(--primary-shadow); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(0, 0, 0, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); }
}

/* Table Search Bar */
.search-container {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: flex-end;
}

.search-bar {
    width: 250px;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    border-radius: 20px;
    background-color: var(--input-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23818cf8%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2211%22%20cy%3D%2211%22%20r%3D%228%22%3E%3C%2Fcircle%3E%3Cline%20x1%3D%2221%22%20y1%3D%2221%22%20x2%3D%2216.65%22%20y2%3D%2216.65%22%3E%3C%2Fline%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: 0.8rem center;
    background-size: 1.1rem;
}

.search-bar:focus {
    width: 320px;
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--input-focus-bg);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

/* Tables (Shared Styles) */
.management-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 2rem;
    overflow: hidden;
    border-radius: 16px;
}

.management-table th {
    background: var(--table-header-bg);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-color);
}

.management-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-muted);
}

.management-table tr:last-child td {
    border-bottom: none;
}

.management-table tr:hover td {
    background: var(--glass-bg);
}

/* Footer */
.main-footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: auto;
}

/* Theme Toggle Button */
.theme-toggle-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--glass-shadow);
    z-index: 1000;
    transition: all 0.3s ease;
    font-size: 1.5rem;
    backdrop-filter: blur(12px);
}

.theme-toggle-btn:hover {
    transform: scale(1.1);
    background: var(--glass-border);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .container {
        padding: 1rem;
    }

    .theme-toggle-btn {
        bottom: 1rem;
        right: 1rem;
        width: 3rem;
        height: 3rem;
        font-size: 1.2rem;
    }
}

/* ========== Toast Notifications ========== */
.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    min-width: 300px;
    max-width: 420px;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: toastSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transition: all 0.3s ease;
}

.toast.toast-exit {
    animation: toastSlideOut 0.3s ease forwards;
}

.toast-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.toast-body {
    flex: 1;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 0.25rem;
    transition: color 0.2s;
    flex-shrink: 0;
}
.toast-close:hover { color: var(--text-color); }

.toast-success {
    border-left: 4px solid #4ade80;
}

.toast-error {
    border-left: 4px solid #f87171;
}

.toast-info {
    border-left: 4px solid #60a5fa;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 0 0 12px 12px;
    background: var(--secondary-color);
    animation: toastProgress 3s linear forwards;
}

@keyframes toastSlideIn {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes toastSlideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(120%); opacity: 0; }
}

@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0%; }
}

/* ========== Edit Modal ========== */
.edit-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInModal 0.25s ease;
}

.edit-modal {
    width: 90%;
    max-width: 550px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    padding: 2.5rem 2rem;
    position: relative;
    animation: modalScaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.edit-modal h2 {
    margin: 0 0 1.5rem 0;
    text-align: center;
    font-size: 1.4rem;
    background: linear-gradient(to right, var(--text-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.edit-modal .form-group {
    margin-bottom: 1rem;
}

.edit-modal .modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.edit-modal .modal-actions .btn {
    min-width: 120px;
}

@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalScaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ========== Confirm Dialog ========== */
.confirm-dialog {
    width: 90%;
    max-width: 400px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    padding: 2.5rem 2rem;
    text-align: center;
    animation: modalScaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.confirm-dialog .confirm-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.confirm-dialog h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
    color: var(--text-color);
}

.confirm-dialog p {
    color: var(--text-muted);
    margin: 0 0 1.5rem 0;
    font-size: 0.9rem;
}

.confirm-dialog .modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.confirm-dialog .modal-actions .btn {
    min-width: 100px;
}

/* ========== Sidebar Dashboard Layout ========== */
.dashboard-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

.sidebar-nav {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    box-sizing: border-box;
    box-shadow: var(--glass-shadow);
    z-index: 100;
}

.sidebar-logo {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.sidebar-logo .brand-logo {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.3;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex: 1;
}

.sidebar-menu-item a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1.2rem;
    color: var(--text-muted) !important;
    border-radius: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid transparent;
}

.sidebar-menu-item a span.icon {
    font-size: 1.2rem;
}

.sidebar-menu-item a:hover {
    background: var(--glass-border);
    color: var(--primary-color) !important;
    transform: translateX(5px);
}

.sidebar-menu-item.active a {
    background: var(--primary-color);
    color: var(--btn-text-color) !important;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 12px var(--primary-shadow);
}

.sidebar-profile {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.profile-badge {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--btn-text-color);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-family: var(--serif);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-info {
    display: flex;
    flex-direction: column;
}

.profile-info .name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-color);
}

.profile-info .role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.main-workspace {
    padding: 2.5rem;
    overflow-y: auto;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.workspace-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.workspace-header h1 {
    margin: 0;
    font-size: 2.2rem;
    line-height: 1.2;
}

.workspace-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.meta-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    background: var(--glass-bg);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}

@media (max-width: 900px) {
    .dashboard-layout {
        grid-template-columns: 220px 1fr;
    }
}

@media (max-width: 820px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar-nav {
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
        padding: 1.5rem;
    }
    
    .sidebar-logo {
        margin-bottom: 1.5rem;
    }
    
    .sidebar-menu {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }
    
    .sidebar-menu-item a {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .sidebar-profile {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding-top: 1rem;
    }
    
    .main-workspace {
        padding: 1.5rem;
    }
}

/* Audit Logs Filter inputs styling */
.audit-filter-input {
    width: 100%;
    padding: 0.6rem 1rem !important;
    background: var(--input-bg) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 8px !important;
    color: var(--text-color) !important;
    font-family: inherit;
    font-size: 0.85rem !important;
    transition: all 0.3s ease;
    box-sizing: border-box;
    outline: none !important;
    min-height: 38px;
}

.audit-filter-input:focus {
    border-color: var(--secondary-color) !important;
    box-shadow: 0 0 0 3px var(--primary-shadow) !important;
    background: var(--input-focus-bg) !important;
}

.audit-filter-input::-webkit-calendar-picker-indicator {
    filter: invert(var(--theme-invert, 0.8));
    cursor: pointer;
}