@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    /* Government Dark Blue/White Theme (Restored) */
    --primary-color: #003366;
    /* Deep Navy Blue */
    --primary-dark: #002244;
    /* Darker Navy */
    --primary-light: #335c85;
    /* Lightened Navy for hover */
    --primary-gradient: #003366;

    --secondary-color: #f8f9fa;
    /* Very light gray */
    --accent-color: #d63384;

    --bg-body: #ffffff;
    --surface-card: #ffffff;
    --bg-glass: #ffffff;
    --bg-glass-card: #ffffff;

    --text-main: #212529;
    /* High contrast black/gray */
    --text-muted: #6c757d;
    --text-light: #adb5bd;

    --success-bg: #d1e7dd;
    --success-text: #0f5132;
    --warning-bg: #fff3cd;
    --warning-text: #664d03;
    --danger-bg: #f8d7da;
    --danger-text: #842029;
    --info-bg: #cff4fc;
    --info-text: #055160;

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-glass: none;

    --font-main: 'Poppins', 'Inter', system-ui, -apple-system, sans-serif;
    --border-color: #dee2e6;
    --border-glass: 1px solid var(--border-color);
}

/* ================= COMMON CSS ================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-main);
}

html {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    /* overflow-x: hidden; REMOVED to allow native scroll */
    overscroll-behavior-y: none;
}

body {
    margin: 0;
    padding: 0;
    background: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    width: 100%;
    font-size: 0.95rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    /* Added to fix horizontal overscroll */
    overscroll-behavior-y: auto;
}

/* Global Responsive Resets */
img,
video,
canvas,
svg {
    max-width: 100%;
    height: auto;
    display: block;
    /* Removes bottom spacing */
}

input,
select,
textarea {
    max-width: 100%;
}

/* --- Typography --- */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-main);
    /* Changed from primary to text-main for better readability */
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: -0.025em;
    /* Tighter letter spacing for Inter */
}

h1 {
    font-size: 2.25rem;
}

h2 {
    font-size: 1.875rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.125rem;
}

h6 {
    font-size: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.2s;
}

a:hover {
    text-decoration: underline;
}

/* --- Layout Wrappers --- */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 10px;
}

.dashboard-container {
    padding: 0 !important;
    /* Managed by .content-area now */
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
}

/* (Mobile fixes for header/layout overlap) */
@media (max-width: 480px) {
    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .welcome-title {
        font-size: 1.5rem !important;
    }

    .stat-value {
        font-size: 2rem !important;
    }
}

.main-content {
    /* min-height: 80vh; REMOVED to prevent whitespace */
    padding: 20px;
    /* Reduced bottom padding */
    width: 100%;
}

.content-area {
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
    /* Ensure consistent spacing */
    min-height: calc(100vh - 70px);
    /* Fill remaining height (Header is 70px) */
    transition: margin-left 0.3s ease;
}

/* --- Header/Nav --- */
/* --- Header/Nav --- */
.app-header {
    background: var(--primary-color);
    border-bottom: 4px solid #b38f00;
    /* Gold accent restored */
    height: 70px;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    box-shadow: var(--shadow-sm);
    width: 100%;
    /* Ensure full width */
}

/* User Profile Dropdown */
.profile-dropdown {
    position: relative;
    margin-left: auto;
    display: flex;
    align-items: center;
}

.dropdown-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    transition: transform 0.2s;
}

.dropdown-toggle:hover {
    transform: scale(1.1);
}

.dropdown-toggle:focus {
    outline: none;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
    background: #ffffff;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    padding: 0.5rem 0;
    display: none;
    /* Hidden by default */
    flex-direction: column;
    z-index: 1000;
    margin-top: 0.5rem;
    animation: fadeIn 0.2s ease-in-out;
}

.dropdown-menu.show {
    display: flex;
}

.dropdown-item {
    padding: 0.75rem 1.25rem;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: #f8f9fa;
    color: var(--primary-color);
    text-decoration: none;
}

.dropdown-item.text-danger:hover {
    background: #fef2f2;
    color: #dc3545;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Override overrides */
.app-header {
    border-bottom: 4px solid #b38f00 !important;
    background: var(--primary-color) !important;
}

.nav-links .nav-item {
    color: rgba(255, 255, 255, 0.8);
}

.nav-links .nav-item:hover,
.nav-links .nav-item.active {
    color: #ffffff;
}

.nav-links .nav-item::after {
    background: #ffffff;
}

.logo {
    color: #ffffff !important;
}

.nav-flex {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.35rem;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-item {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    position: relative;
}

.nav-item:hover,
.nav-item.active {
    color: #ffffff;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: #ffffff;
    transition: width 0.3s;
}

.nav-item:hover::after {
    width: 100%;
}

.btn-login {
    background: #ffffff;
    color: var(--primary-color);
    padding: 0.5rem 1.2rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid #ffffff;
    transition: all 0.2s;
}

.btn-login:hover {
    background: var(--primary-dark);
    color: #ffffff;
    text-decoration: none;
}

/* --- Dashboard --- */
.dashboard-heading {
    margin: 1rem 0 1.5rem;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 1rem;
}

.welcome-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    -webkit-text-fill-color: initial;
    margin-bottom: 0.2rem;
}

.welcome-sub {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Stats Cards */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

/* --- Cards --- */
.glass-card,
.card,
.table-card {
    background: var(--surface-card);
    border: 1px solid var(--border-color);
    /* Subtle border */
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 50px;
    transition: all 0.3s ease;
    backdrop-filter: none;
    width: 100%;
    /* Ensure full width in container */
}

.main-card {
    min-height: 80vh;
    /* Standard min-height for main cards */
    display: flex;
    flex-direction: column;
}

.glass-card:hover,
.card:hover,
.table-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    /* Subtle lift */
    border-color: var(--primary-light);
}

.glass-card:hover,
.card:hover,
.table-card:hover {
    box-shadow: var(--shadow-md);
    transform: none;
}

.table-card table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    /* border: 1px solid #dee2e6; REMOVED */
}

.table-card table th {
    text-align: left;
    padding: 8px 10px;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #ffffff;
    font-weight: 600;
    background: var(--primary-color);
    border-bottom: 1px solid #dee2e6;
}

.table-card table td {
    padding: 8px 10px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
    font-size: 0.95rem;
}

.table-card table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.table-card table tr:hover td {
    background: #e9ecef;
}

.stat-card {
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    border-top: 4px solid var(--primary-color);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-top: 0.5rem;
    line-height: 1;
}

/* --- Recent Activity Table --- */
.section-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

/* --- Modern Tables --- */
.modern-table,
.table-card table {
    width: 100%;
    border-collapse: separate;
    /* Allows border-radius on rows */
    border-spacing: 0;
    border: none;
    margin-bottom: 0;
}

.modern-table th,
.table-card table th {
    text-align: left;
    padding: 8px 10px;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    background: #f9fafb;
    /* Light gray header */
    border-bottom: 1px solid var(--border-color);
    letter-spacing: 0.05em;
}

.modern-table td,
.table-card table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    font-size: 0.9rem;
    color: var(--text-main);
}

.modern-table tr:last-child td,
.table-card table tr:last-child td {
    border-bottom: none;
}

.modern-table tr:hover td,
.table-card table tr:hover td {
    background: #f8fafc;
}

/* Badges */
.status-badge {
    padding: 0.35rem 0.8rem;
    border-radius: 9999px;
    /* Pill shape */
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.status-badge::before {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.6;
}

.status-pending {
    background: #fffbeb;
    color: #b45309;
    border-color: #fcd34d;
}

.status-solved {
    background: #ecfdf5;
    color: #047857;
    border-color: #6ee7b7;
}

.status-progress {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #93c5fd;
}

.status-return {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fca5a5;
}

/* --- Quick Actions Grid --- */
.action-card {
    background: var(--surface-card);
    padding: 10px;
    border-radius: var(--radius-md);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.action-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
    background-color: var(--surface-card);
}

.action-icon {
    font-size: 1.75rem;
    background: var(--info-bg);
    color: var(--primary-color);
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    filter: none;
    opacity: 1;
}

.action-card:hover .action-icon {
    background: var(--primary-color);
    color: #ffffff;
    transform: scale(1.1);
}

/* --- Form Extras --- */
.toggle-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 10px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: var(--radius-sm);
    transition: all 0.3s;
}

.toggle-container:hover {
    background: #e9ecef;
    border-color: #ced4da;
}

.upload-box {
    border: 2px dashed #adb5bd;
    padding: 10px;
    text-align: center;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    background: #f8f9fa;
}

.upload-box:hover {
    border-color: var(--primary-color);
    background: #e9ecef;
    transform: none;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 1rem;
}

.preview-img {
    width: 100%;
    height: 80px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 1px solid #dee2e6;
}

.action-info h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.1rem;
    color: var(--primary-color);
}

.action-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* --- Forms (Table-like Structure) --- */
.form-group {
    margin-bottom: 1rem;
    position: relative;
}

/* Desktop: Table-like layout for forms */
@media (min-width: 768px) {
    .form-group {
        display: grid;
        grid-template-columns: 200px 1fr;
        align-items: center;
        gap: 1rem;
        border-bottom: 1px solid #f0f0f0;
        padding-bottom: 1rem;
    }

    .form-group:last-child {
        border-bottom: none;
    }
}

/* --- Forms --- */
.form-label {
    display: block;
    font-weight: 500;
    color: var(--text-main);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.form-control,
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: #ffffff;
    color: var(--text-main);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    /* Subtle inner shadow */
}

.form-control:focus,
.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(15, 82, 186, 0.15);
    /* Focus ring */
    background: #ffffff;
}

/* --- Status Selector (Custom) --- */
/* --- Custom Status Dropdown --- */
.custom-dropdown {
    position: relative;
    width: 100%;
    font-family: var(--font-main);
}

.dropdown-selected {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    color: var(--text-main);
}

.dropdown-selected:hover {
    border-color: var(--primary-light);
    background: #f8f9fa;
}

.dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    margin-top: 5px;
    display: none;
    max-height: 200px;
    overflow-y: auto;
    animation: fadeIn 0.15s ease-out;
}

.dropdown-options.show {
    display: block;
}

.dropdown-option {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.1s;
    font-size: 0.95rem;
    color: var(--text-main);
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-option:last-child {
    border-bottom: none;
}

.dropdown-option:hover {
    background: #f1f3f5;
    color: var(--primary-color);
}

.dropdown-chevron {
    transition: transform 0.2s;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.custom-dropdown.open .dropdown-chevron {
    transform: rotate(180deg);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.btn-block {
    display: block;
    width: 100%;
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    padding: 0.85rem;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1rem;
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.btn-block:hover {
    transform: translateY(-1px);
    background: var(--primary-dark);
    box-shadow: var(--shadow-md);
}

/* --- Auth Card (Modernized) --- */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    /* Light professional gradient background */
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.auth-card {
    background: #ffffff;
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    border-radius: 16px;
    /* Rounded corners */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    /* Soft shadow */
    border: 1px solid rgba(255, 255, 255, 0.5);
    /* Subtle border */
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.auth-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    text-align: center;
    border-bottom: none;
    padding-bottom: 0;
}

.auth-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 2rem;
}

.auth-card .form-group {
    width: 100%;
    margin-bottom: 1.25rem;
    border-bottom: none;
    padding-bottom: 0;
    display: block;
}

.auth-card .form-label {
    margin-bottom: 0.5rem;
    display: block;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-main);
}

.auth-card .form-control,
.auth-card .form-input {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 2px solid #eef2f6;
    border-radius: 8px;
    /* Rounded inputs */
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.auth-card .form-control:focus,
.auth-card .form-input:focus {
    border-color: var(--primary-color);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 51, 102, 0.1);
    /* Soft focus ring */
    outline: none;
}

.auth-card .btn-block {
    width: 100%;
    margin-top: 1.5rem;
    padding: 0.9rem;
    border-radius: 8px;
    /* Rounded button */
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border: none;
    box-shadow: 0 4px 10px rgba(0, 51, 102, 0.2);
    transition: all 0.3s ease;
}

.auth-card .btn-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 51, 102, 0.3);
}

.auth-card a {
    text-decoration: none;
    transition: color 0.3s ease;
}

.auth-card a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* --- Utility Classes (Spacing) --- */
.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

.d-flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

.justify-between {
    justify-content: space-between;
}

.align-center {
    align-items: center;
}

.text-primary {
    color: var(--primary-color);
}

.text-muted {
    color: var(--text-muted);
}

.text-success {
    color: var(--success-text);
}

.text-danger {
    color: var(--danger-text);
}

.fw-bold {
    font-weight: 700;
}

.small {
    font-size: 0.85rem;
}

.text-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
    display: inline-block;
    vertical-align: middle;
}

/* --- Sidebar Layout --- */
/* --- Sidebar Layout (Consolidated) --- */
.layout-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Sidebar Core Styles */
.sidebar {
    width: 260px;
    background: #ffffff;
    color: var(--text-main);
    flex-shrink: 0;
    position: fixed;
    top: 70px;
    bottom: 0;
    left: 0;
    height: calc(100vh - 70px);
    overflow-y: auto;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    border-right: 1px solid var(--border-color);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.02);
    /* Desktop: Visible by default */
    transform: translateX(0);
}

.sidebar-header {
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
}

.sidebar-menu {
    list-style: none;
    padding: 1.5rem 1rem;
    margin: 0;
}

.sidebar-menu li {
    margin-bottom: 0.25rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    /* More breathing room */
    color: var(--text-muted);
    border-radius: var(--radius-md);
    /* More rounded */
    font-weight: 500;
    transition: all 0.2s;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: var(--info-bg);
    /* Soft Blue Background */
    color: var(--primary-color);
    /* Primary Text */
    box-shadow: none;
}

.sidebar-menu a.active {
    background: var(--primary-color);
    color: #ffffff;
    box-shadow: var(--shadow-md);
}

/* Icons opacity */
.sidebar-menu a i {
    width: 20px;
    text-align: center;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.sidebar-menu a:hover i,
.sidebar-menu a.active i {
    opacity: 1;
}

.logout-link {
    color: #ef4444 !important;
}

.logout-link:hover {
    background: rgba(239, 68, 68, 0.1) !important;
}

/* --- Header & Layout --- */
/* (Mobile fixes for header/layout overlap) */

/* Body Padding for Fixed Header */
body {
    padding-top: 70px;
}

.app-header {
    background: var(--primary-color);
    color: white;
    padding: 0 1.5rem;
    height: 70px;
    display: flex;
    align-items: center;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Visible on all screens */
.sidebar-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

/* Sidebar (Hidden by default on ALL screens) */
/* Sidebar (Visible by default on Desktop) */
/* Sidebar (Duplicate Block Removed - Consolidated Above) */

/* Content Area */
.content-area {
    margin-left: 260px;
    /* Width of Sidebar */
    padding: 10 inches 4 inches;
    background: #f1f5f9;
    min-height: calc(100vh - 70px);
    transition: margin-left 0.3s ease-in-out;
    width: auto;
    flex-grow: 1;
}

/* Desktop: Sidebar Active = Collapsed */
.sidebar.active {
    transform: translateX(-100%);
}

.content-area.pushed {
    margin-left: 0;
}

/* Mobile Overrides (Below 992px) */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        /* Hidden by default on mobile */
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    }

    .sidebar.active {
        transform: translateX(0);
        /* Visible when active */
        box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
    }

    .content-area {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 1rem;
    }

    /* Show Toggle on Mobile */
    .sidebar-toggle {
        display: flex;
    }
}

/* Gallery & Utilities */
.gallery-container {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.gallery-item {
    text-align: center;
    flex: 0 0 auto;
}

.gallery-img {
    height: 120px;
    width: auto;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 1px solid #ddd;
}

.btn-sm {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-edit {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #bae6fd;
}

.btn-edit:hover {
    background: #bae6fd;
    color: #0284c7;
}

.btn-delete {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fecaca;
}

.btn-delete:hover {
    background: #fecaca;
    color: #dc2626;
}

/* --- Mobile Responsiveness Enhancements --- */

/* Responsive Table Wrapper */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
    /* border: 1px solid #dee2e6; REMOVED */
    /* border-radius: var(--radius-md); REMOVED */
    background: #fff;
    /* Ensure background is white */
}

.table-responsive table {
    margin-bottom: 0;
    border: none;
    min-width: 600px;
    /* Force scroll on small screens */
    white-space: nowrap;
    /* Prevent awkward wrapping in dense tables */
}

/* Sidebar Overlay (Mobile) */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    /* Below sidebar (1000) but above everything else */
    backdrop-filter: blur(2px);
    transition: all 0.3s;
    opacity: 0;
    visibility: hidden;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
    visibility: visible;
}

@media (min-width: 993px) {

    .sidebar-overlay,
    .sidebar-overlay.active {
        display: none !important;
    }
}

/* Tablet & Mobile (Below 992px) */
@media (max-width: 992px) {
    .content-area {
        padding: 1.5rem;
        /* Slightly more padding */
        width: 100% !important;
        /* Force full width */
        margin-left: 0 !important;
    }

    .sidebar {
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    }

    /* Ensure dashboard stats grid wraps nicely */
    .dashboard-stats,
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 1rem;
    }
}

/* --- Quick Actions Grid (Global) --- */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    /* Reduced minmax for better fit */
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Mobile (Below 768px) */
@media (max-width: 768px) {
    .app-header {
        padding: 0 1rem;
    }

    .logo {
        font-size: 1.1rem;
    }

    .welcome-title {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .section-title .btn {
        width: 100%;
        text-align: center;
    }

    /* Stack form groups */
    .form-group {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .form-label {
        margin-bottom: 0.25rem;
    }

    /* Auth Card */
    .auth-card {
        padding: 1.5rem;
        max-width: 95%;
    }

    .auth-title {
        font-size: 1.5rem;
    }

    /* Force Quick Actions to 1 column on tablet/mobile (<768px) */
    .actions-grid {
        grid-template-columns: 1fr !important;
    }

    /* Fix Issue Category Dropdown on Mobile - MOVED TO USER SECTION */
}

/* Small Mobile (Below 480px) */
@media (max-width: 480px) {

    .dashboard-stats,
    .stats-grid {
        grid-template-columns: 1fr;
        /* Stack vertically */
    }

    .actions-grid {
        grid-template-columns: 1fr !important;
        /* Force 1 column on small screens */
        gap: 0.75rem;
    }

    .container {
        padding: 0 0.75rem;
        /* Reduce padding on very small screens */
    }

    .nav-links {
        gap: 1rem;
    }

    .sidebar {
        width: 250px;
        /* Reference width, slightly smaller if needed */
    }
}

/* --- Sidebar Toggle Adjustment (Desktop Only) --- */
@media (min-width: 993px) {
    .app-header .container {
        max-width: 100%;
        padding: 0;
        /* Sidebar toggle is already flex item, so it will sit next to logo */
    }

    .sidebar-toggle {
        position: static;
        transform: none;
        margin-right: 0.5rem;
        /* Adjust gap if needed, though parent flex has gap */
    }

    .app-header .logo {
        margin-left: 0;
    }
}

/* --- Mobile Fixes for Dropdown Overflow --- */
@media (max-width: 992px) {

    /* Critical Container constraints */
    .glass-card {
        overflow-x: hidden;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding-left: 10px;
        /* Ensure padding doesn't push width */
        padding-right: 10px;
    }

    /* Form Group Constraints */
    .form-group {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
        display: block;
        /* Ensure it's not flex which might squeeze */
    }

    /* Mobile Dropdown Fix - MOVED TO USER SECTION */

    /* Fix Double Background Issue */
    .layout-wrapper {
        background: none !important;
    }

}

/* --- Reports Page Print Styles (Moved from reports.php) --- */
@media print {

    .app-header,
    header,
    nav,
    .btn-login,
    .no-print {
        display: none !important;
    }

    body {
        background: white;
        padding-top: 0;
    }



    .dashboard-container {
        margin: 0;
        padding: 0;
        width: 100%;
        max-width: none;
    }

    .glass-card {
        box-shadow: none;
        border: none;
    }
}


/* ================= USER CSS ================= */

/* Fix for dropdown overflow */
.report-card {
    /* max-width removed to match global dashboard width */
    margin: 10px auto;
    position: relative;
    z-index: 10;
    overflow: visible !important;
}

.report-card .card-header,
.report-card .form-group {
    overflow: visible !important;
    position: relative;
    z-index: auto;
}

/* --- Complaint Card Specifics --- */
.complaint-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

/* Dashboard specific layout */
.dashboard-split {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2.5rem;
    align-items: start;
}

.dashboard-split>div {
    min-width: 0;
    /* Critical for preventing grid blowout */
}

@media (max-width: 992px) {
    .dashboard-split {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
        display: flex;
        /* Flex stack is safer sometimes */
        flex-direction: column;
    }

    .dashboard-split>div {
        width: 100%;
        /* Ensure children take full width */
    }
}

/* Profile Page Grid */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

@media (max-width: 768px) {
    .profile-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* --- Track Complaint Page CSS (Moved from track_complaint.php) --- */
.complaint-card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .complaint-card-grid {
        grid-template-columns: 2fr 1fr;
        /* Details : Evidence */
    }
}

.complaint-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

.complaint-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.evidence-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.evidence-item {
    position: relative;
    min-height: 180px;
    /* Ensure height even if image breaks */
    background-color: #f8f9fa;
    /* Placeholder background */
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid #dee2e6;
}

.evidence-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    /* Fix inline spacing issues */
    transition: transform 0.2s;
}

.evidence-item img:hover {
    transform: scale(1.02);
}

.evidence-label {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 4px 8px;
    font-size: 0.75rem;
    text-align: center;
}

/* Mobile Fixes for User Section extracted from Common */
@media (max-width: 768px) {

    /* Fix Issue Category Dropdown on Mobile */
    .report-card select.form-control {
        width: 100% !important;
        max-width: 100% !important;
        background-color: #ffffff !important;
        box-sizing: border-box;
    }
}

@media (max-width: 992px) {
    @media (max-width: 768px) {

        /* Mobile Dropdown Fix - Strict Constraints */
        .report-card select.form-control {
            width: 100% !important;
            max-width: 100% !important;
            min-width: 0 !important;
            white-space: nowrap !important;
            overflow: hidden !important;
            text-overflow: ellipsis !important;
            padding-right: 2rem !important;
            /* Ensure space for arrow */
        }
    }
}


/* ================= ADMIN CSS ================= */

/* --- Admin Overrides (Government Theme) --- */
/* Forcing overrides on legacy admin inline styles */
.app-header {
    border-bottom: 4px solid #b38f00 !important;
    /* Gold Border */
    background: var(--primary-color) !important;
}

.logo {
    color: #ffffff !important;
    text-transform: uppercase;
    letter-spacing: 1px;
}



/* Stats Layout for Admin (.stats-grid) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Ensure .stat-card in admin looks like .glass-card */
.stats-grid .stat-card {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    transition: box-shadow 0.3s;
    border-top: 4px solid var(--primary-color);
    /* Top accent */
}

.stats-grid .stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: none;
}

/* Welcome Section */
.welcome-section {
    margin: 1.5rem 0 2rem;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 1rem;
}

.welcome-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.welcome-sub {
    color: var(--text-muted);
}

/* Admin Tables (Legacy .table-card) */
.table-card {
    border-radius: var(--radius-md);
    overflow: hidden;
    /* Capture corners */
}

/* Minimal Icons: Filter all action icons in tables if any */
.table-card .btn-login,
.table-card a.btn {
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.admin-remarks {
    background: #f8fafc;
    padding: 1rem;
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--primary-color);
}

/* Admin Actions Grid - Desktop Override */
@media (min-width: 992px) {
    .admin-actions-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Custom Dropdown Styles (Live Search) */
.custom-select-wrapper {
    position: relative;
    user-select: none;
    width: 100%;
}

.custom-select-trigger {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-main);
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    white-space: nowrap;
}

.custom-select-trigger span {
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 100%;
}

.custom-select-trigger:after {
    content: '?';
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: 10px;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.custom-select.open .custom-select-trigger:after {
    transform: rotate(180deg);
}

.custom-options {
    position: absolute;
    display: block;
    top: 100%;
    left: 0;
    right: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    border-top: 0;
    background: #ffffff;
    transition: all 0.2s;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 1000;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: var(--shadow-md);
    margin-top: 5px;
}

.custom-select.open .custom-options {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.custom-option {
    position: relative;
    display: block;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.custom-option:last-child {
    border-bottom: none;
}

.custom-option:hover {
    background: var(--primary-color);
    color: #ffffff;
}

.custom-option.selected {
    background: #f8f9fa;
    font-weight: 600;
}

.custom-search {
    padding: 8px;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 10;
}

.custom-search input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9rem;
    outline: none;
    box-sizing: border-box;
}

.custom-search input:focus {
    border-color: var(--primary-color);
}

.no-results {
    padding: 10px;
    text-align: center;
    color: #888;
    font-size: 0.9rem;
    display: none;
}

/* --- Global Image Preview Modal --- */
.image-modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    /* Stay in place */
    z-index: 10000;
    /* Sit on top */
    left: 0;
    top: 0;
    width: 100%;
    /* Full width */
    height: 100%;
    /* Full height */
    overflow: auto;
    /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.9);
    /* Black w/ opacity */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    animation: fadeInModal 0.3s forwards;
}

.image-modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

#image-modal-caption {
    margin: auto;
    display: block;
    width: 80%;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
    font-size: 1rem;
    font-weight: 500;
}

.image-modal-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 10001;
}

.image-modal-close:hover,
.image-modal-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Animations */
@keyframes fadeInModal {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.image-modal.fade-out {
    animation: fadeOutModal 0.3s forwards;
}

@keyframes fadeOutModal {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

/* Responsive */
@media only screen and (max-width: 700px) {
    .image-modal-content {
        width: 100%;
    }

    .image-modal-close {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }
}

/* ================= MOBILE RESPONSIVENESS (FINAL FIXES) ================= */
@media (max-width: 768px) {

    /* --- Global Layout --- */
    html,
    body {
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }

    .container {
        padding-left: 15px;
        padding-right: 15px;
        width: 100%;
    }

    .content-area {
        padding: 15px !important;
        margin-left: 0 !important;
        width: 100% !important;
        /* Ensure it scrolls if needed, though body scroll handles main content */
    }

    /* --- Header & Nav (Fixed) --- */
    .app-header {
        padding: 0 10px;
        height: 60px;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 1001;
        /* High z-index */
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    .logo {
        font-size: 1rem !important;
    }

    /* --- Sidebar (Fixed) --- */
    .sidebar {
        width: 260px;
        z-index: 1000;
        position: fixed;
        top: 60px;
        /* Below header */
        bottom: 0;
        /* Full height down */
        left: 0;
        height: auto;
        /* Let bottom:0 handle it */
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        background: #ffffff;
        border-right: 1px solid var(--border-color);
        box-shadow: none;
    }

    .sidebar.active {
        transform: translateX(0);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    }

    /* --- Cards & Spacing --- */
    .glass-card,
    .card,
    .stat-card,
    .table-card {
        padding: 1.25rem !important;
        margin-bottom: 1rem;
    }

    .main-card {
        min-height: auto;
        height: auto;
    }

    /* Stack Stats */
    .dashboard-stats,
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    /* Stack Actions */
    .actions-grid,
    .admin-actions-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem;
    }

    /* --- Forms (Stacking) --- */
    .form-group {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        margin-bottom: 1rem;
        border-bottom: none !important;
        padding-bottom: 0 !important;
    }

    .form-group:last-child {
        margin-bottom: 0;
    }

    .form-label {
        margin-bottom: 0.25rem;
        font-size: 0.9rem;
    }

    .form-control,
    .form-input,
    select.form-control {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Buttons */
    .btn-block {
        width: 100%;
        margin-top: 10px;
    }

    /* --- Tables (Horizontal Scroll) --- */
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-sm);
        margin-bottom: 1rem;
    }

    .table-responsive table {
        width: 100%;
        min-width: 600px;
    }

    /* DataTables Wrappers */
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter {
        float: none;
        text-align: left;
        margin-bottom: 0.5rem;
    }

    .dataTables_wrapper .dataTables_filter input {
        width: 100%;
        margin-left: 0;
    }

    /* Remove extra margins causing overflow */
    .row {
        margin-left: 0;
        margin-right: 0;
    }

    /* Login/Auth specific */
    .layout-wrapper.auth-wrapper {
        padding: 1rem;
        padding-top: 80px;
        /* More padding for auth pages if they use same header */
    }

    .auth-card {
        padding: 1.5rem !important;
        margin: 0;
        width: 100%;
        max-width: 100%;
    }

    /* Modal Fixes */
    .image-modal-content {
        max-width: 95%;
        margin-top: 50px;
    }

    .image-modal-close {
        top: 10px;
        right: 10px;
        background: rgba(0, 0, 0, 0.5);
        border-radius: 50%;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
    }
}


/* --- Body Scroll Lock (Mobile Sidebar) --- */
.body-scroll-lock {
    overflow: hidden !important;
    height: 100vh;
}

/* ================= LOGIN PAGE REDESIGN ================= */

/* Wrapper */
.login-split-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
    /* Subtract header height */
    background: #ffffff;
    overflow: hidden;
    position: relative;
}

/* Left Panel */
.login-left-panel {
    flex: 1;
    background: linear-gradient(135deg, #003366 0%, #00509d 100%);
    /* Deep Blue Gradient */
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Left Panel Content */
.login-left-content {
    position: relative;
    z-index: 10;
    max-width: 500px;
}

.login-left-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.login-left-content p {
    font-size: 1.25rem;
    font-weight: 400;
    opacity: 0.9;
    line-height: 1.5;
    max-width: 400px;
}

/* Abstract Shapes (CSS Only) */
.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.4;
    z-index: 1;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: #4facfe;
    top: -50px;
    left: -50px;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: #00f2fe;
    bottom: -100px;
    right: -50px;
    opacity: 0.2;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background: #ffffff;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.1;
    filter: blur(80px);
}

/* Right Panel */
.login-right-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    padding: 2rem;
    position: relative;
    z-index: 2;
}

/* Auth Card (Inside Right Panel) */
.login-auth-card {
    width: 100%;
    max-width: 420px;
    padding: 2rem;
    /* Clean padding */
    background: #ffffff;
    border-radius: var(--radius-lg);
    /* Soft shadow for the card inside right panel */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.03);
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    text-align: center;
    /* Center title */
}

.auth-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    text-align: center;
    /* Center subtitle */
}

/* Form Styles */
.form-group-auth {
    margin-bottom: 1.25rem;
}

.form-group-auth label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-main);
    font-size: 0.9rem;
}

.form-group-auth input {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    /* Slightly more rounded */
    font-size: 0.95rem;
    transition: all 0.2s;
    background: #f8fafc;
}

.form-group-auth input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 51, 102, 0.1);
}

.btn-auth {
    width: 100%;
    padding: 0.9rem;
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.2);
}

.btn-auth:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 51, 102, 0.25);
}

.forgot-link {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

.auth-footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.register-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.register-link:hover {
    text-decoration: underline;
}

/* Alert */
.alert-danger {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* RESPONSIVE DESIGN */
@media (max-width: 992px) {
    .login-left-panel {
        padding: 3rem;
    }

    .login-left-content h1 {
        font-size: 2.75rem;
    }
}

@media (max-width: 768px) {
    .login-split-wrapper {
        flex-direction: column;
    }

    .login-left-panel {
        flex: 0 0 auto;
        padding: 3rem 1.5rem;
        text-align: center;
        align-items: center;
        min-height: 250px;
        /* Banner height */
    }

    .login-left-content {
        max-width: 100%;
    }

    .login-left-content h1 {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }

    .login-left-content p {
        font-size: 1rem;
        margin: 0 auto;
    }

    /* Adjust shapes for mobile */
    .shape-1 {
        width: 150px;
        height: 150px;
        top: -20px;
        left: -20px;
    }

    .shape-2 {
        bottom: -20px;
        right: -20px;
    }

    .login-right-panel {
        flex: 1;
        padding: 1.5rem;
        background: #f8fafc;
    }

    .login-auth-card {
        padding: 1.5rem;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }
}

/* Footer styling adjustments */
.app-footer {
    text-align: center;
}

.app-footer .container p {
    margin: 0;
}

