@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@300;400;500;600;700&display=swap');

:root {
    /* Original Pastel Colors */
    --primary-color: #B4A5D9;
    --secondary-color: #D4C5E2;
    --success-color: #A8D5BA;
    --danger-color: #F4B4B4;
    --warning-color: #FFD93D;
    --pastel-pink: #FFD6E8;
    --pastel-blue: #C7CEEA;
    --pastel-mint: #B8E6D5;
    
    /* New Gradients based on original colors */
    --primary-gradient: linear-gradient(135deg, #B4A5D9 0%, #C7CEEA 100%);
    --secondary-gradient: linear-gradient(135deg, #D4C5E2 0%, #FFD6E8 100%);
    --success-gradient: linear-gradient(135deg, #A8D5BA 0%, #B8E6D5 100%);
    --warning-gradient: linear-gradient(135deg, #FFD93D 0%, #FFA500 100%);
    --danger-gradient: linear-gradient(135deg, #F4B4B4 0%, #FF9999 100%);
    
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(180, 165, 217, 0.15);
    
    --text-primary: #5A4B6B;
    --text-secondary: #7A6B8B;
    --bg-app: #f4f7fe;
    --app-shell-gap: 1.5rem;
    --app-card-padding: 2rem;
    --app-card-padding-mobile: 1.25rem;
    --app-card-radius: 24px;
    --app-card-radius-mobile: 20px;
    --field-border-color: rgba(113, 128, 150, 0.2);
    --field-border-focus: rgba(180, 165, 217, 0.95);
    --field-focus-shadow: 0 0 0 3px rgba(180, 165, 217, 0.16);
}

body {
    background: var(--bg-app);
    min-height: 100vh;
    font-family: 'Chakra Petch', sans-serif;
    color: var(--text-primary);
    padding-top: 80px; 
    overflow-x: hidden;
}

body.loading-overlay-active {
    cursor: wait;
}

body.loading-overlay-active::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 2090;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.26s ease, visibility 0.26s ease;
    z-index: 2100;
}

.loading-overlay.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.loading-overlay__backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.56) 38%, rgba(255, 255, 255, 0.74) 100%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(248, 250, 255, 0.86));
    backdrop-filter: blur(16px) saturate(1.05);
    -webkit-backdrop-filter: blur(16px) saturate(1.05);
}

.loading-overlay__panel {
    position: relative;
    z-index: 1;
    width: min(100%, 420px);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.15rem 1.25rem;
    border-radius: 26px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.82));
    border: 1px solid rgba(255, 255, 255, 0.88);
    box-shadow:
        0 24px 60px rgba(112, 124, 160, 0.16),
        0 8px 24px rgba(180, 165, 217, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transform: translateY(10px) scale(0.985);
    transition: transform 0.26s ease, opacity 0.26s ease;
}

.loading-overlay.is-visible .loading-overlay__panel {
    transform: translateY(0) scale(1);
}

.loading-overlay__spinner {
    position: relative;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border-radius: 999px;
    animation: loadingOverlaySpin 0.95s linear infinite;
}

.loading-overlay__spinner::before,
.loading-overlay__spinner::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

.loading-overlay__spinner::before {
    border: 4px solid rgba(255, 255, 255, 0.96);
    box-shadow:
        0 0 0 1px rgba(211, 221, 240, 0.5),
        inset 0 0 18px rgba(255, 255, 255, 0.72);
}

.loading-overlay__spinner::after {
    inset: 3px;
    border: 4px solid transparent;
    border-top-color: #b7a6da;
    border-right-color: #dce9ff;
    box-shadow: 0 0 18px rgba(180, 165, 217, 0.18);
}

.loading-overlay__spinner span {
    display: none;
}

.loading-overlay__content {
    min-width: 0;
    padding: 0.15rem 0;
}

.loading-overlay__title {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 1rem;
    color: var(--text-primary);
}

.loading-overlay__message {
    font-size: 0.92rem;
    line-height: 1.55;
    color: rgba(90, 75, 107, 0.72);
}

@keyframes loadingOverlaySpin {
    to {
        transform: rotate(360deg);
    }
}

/* ================= LOGIN PAGE ================= */
.login-page {
    padding-top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-container {
    max-width: 480px;
    width: 100%;
    padding: 20px;
    z-index: 10;
}

.login-card {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transform: translateY(0);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.login-card:hover {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
}

.login-header {
    background: #ffffff;
    padding: 40px 30px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.login-header h2 {
    font-weight: 700;
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
}

.login-body-content {
    padding: 40px 30px;
}

.form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-control,
.form-select {
    border: 1px solid var(--field-border-color);
    background: rgba(255, 255, 255, 0.96);
    font-family: 'Chakra Petch', sans-serif;
    color: var(--text-primary);
    transition: border-color 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease;
}

.form-control,
.form-select,
.input-group-text {
    min-height: 52px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--field-border-focus);
    box-shadow: var(--field-focus-shadow);
    background: #fff;
    outline: none;
}

.input-group > .form-control:focus,
.input-group > .form-select:focus,
.input-group > .form-floating:focus-within,
.input-group > .form-control:focus-visible,
.input-group > .form-select:focus-visible {
    position: relative;
    z-index: 2;
}

.input-group-text, .login-card .form-control {
    border: 1px solid rgba(113, 128, 150, 0.2);
    background: rgba(255, 255, 255, 0.9);
    padding: 14px 20px;
    font-family: 'Chakra Petch', sans-serif;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.input-group-text {
    border-right: none;
    color: var(--primary-color);
}
.login-card .input-group > .form-control {
    border-left: none;
}

.login-card .input-group > .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: none;
    background: #fff;
}
.input-group:focus-within .input-group-text {
    border-color: var(--primary-color);
    background: #fff;
}
.input-group-text:first-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}
.login-card .input-group > .form-control:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}


.btn-login {
    background: var(--primary-color);
    border: none;
    border-radius: 12px;
    padding: 15px;
    font-weight: 700;
    font-size: 1.1rem;
    color: white;
    letter-spacing: 1px;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(180, 165, 217, 0.2);
}

.btn-login:hover {
    box-shadow: 0 6px 15px rgba(180, 165, 217, 0.3);
    color: white;
    opacity: 0.9;
}

/* ================= DASHBOARD UI ================= */

/* Navbar */
.navbar {
    background: #ffffff !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    height: 80px;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.navbar-brand svg {
    width: 90px;
    height: auto;
    flex-shrink: 0;
}

.navbar-brand i {
    color: var(--primary-color);
    font-size: 1.8rem;
}

.navbar-brand span {
    color: var(--primary-color);
}

.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 600;
    padding: 10px 18px !important;
    border-radius: 10px;
    margin: 0 5px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link:hover {
    background: rgba(180, 165, 217, 0.05);
    color: var(--primary-color) !important;
}

.nav-link.active {
    background: var(--primary-color);
    color: white !important;
    box-shadow: 0 4px 10px rgba(180, 165, 217, 0.2);
}

/* User Dropdown */
.header-user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}
.user-menu {
    position: relative;
    z-index: 1002;
}
.user-menu-trigger {
    gap: 10px;
    margin: 0;
    min-height: 44px;
    padding-right: 14px !important;
    padding-left: 12px !important;
}
.user-menu-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    text-align: left;
}
.user-menu-name {
    color: #212529;
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
}
.user-menu-role {
    color: #6c757d;
    font-size: 0.75rem;
    white-space: nowrap;
}
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 2px 5px rgba(180, 165, 217, 0.2);
}

.dropdown-menu {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 10px;
    min-width: 220px;
    margin-top: 15px !important;
    z-index: 1003;
}

.dropdown-item {
    border-radius: 10px;
    padding: 10px 15px;
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.dropdown-item:hover {
    background: rgba(180, 165, 217, 0.08);
    color: var(--primary-color);
}

.dropdown-item.text-danger:hover {
    background: rgba(235, 51, 73, 0.1);
    color: #eb3349;
}

/* Sidebar */
.sidebar {
    width: 260px;
    height: calc(100vh - 80px);
    position: fixed;
    top: 80px;
    left: 0;
    background: #ffffff !important;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
    overflow-y: auto;
    padding: 20px 0;
}

/* For beautiful scrollbar in sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}
.sidebar::-webkit-scrollbar-thumb {
    background: rgba(180, 165, 217, 0.2);
    border-radius: 10px;
}

.sidebar-header {
    padding: 0 25px 15px;
    margin-bottom: 10px;
    border-bottom: 1px dashed rgba(113, 128, 150, 0.2);
}

.sidebar-header h5 {
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
}

.sidebar-item {
    padding: 4px 20px;
    margin-bottom: 2px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 12px 18px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    gap: 15px;
    position: relative;
    overflow: hidden;
}

.sidebar-link i {
    font-size: 1.3rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    color: var(--primary-color);
}

.sidebar-link:hover i {
    color: var(--primary-color);
}

.sidebar-item.active .sidebar-link {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 10px rgba(180, 165, 217, 0.2);
}

.sidebar-item.active .sidebar-link i {
    color: white;
}

.sidebar-divider {
    height: 1px;
    background: rgba(113, 128, 150, 0.15);
    margin: 20px;
}

/* Main Content Area */
.main-content {
    margin-left: 260px;
    padding: 30px;
    min-height: calc(100vh - 80px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: calc(100% - 260px);
}

/* Footer Area */
.footer {
    margin-left: 260px;
    width: calc(100% - 260px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 10;
}

.app-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--app-card-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
}

.app-page-shell {
    padding: 0 !important;
}

.app-card-body {
    padding: var(--app-card-padding);
}

.app-card > .card-body {
    padding: var(--app-card-padding);
}

.app-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 2px dashed rgba(180, 165, 217, 0.2);
}

.app-section-header__title {
    margin: 0;
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
}

.app-section-header__caption {
    margin: 0.35rem 0 0;
    color: var(--text-secondary);
}

.app-filter-bar,
.search-panel,
.filter-panel,
.search-form-box,
.form-box,
.range-toolbar {
    background: linear-gradient(180deg, #fcfdfe 0%, #f7f9fc 100%);
    border: 1px solid rgba(113, 128, 150, 0.12);
    border-radius: 24px;
    padding: 1.5rem;
}

.btn-glass-primary,
.btn-primary-glass {
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 16px;
    padding: 0.85rem 1.2rem;
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(180, 165, 217, 0.22);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}

.btn-glass-primary:hover,
.btn-primary-glass:hover,
.btn-glass-primary:focus-visible,
.btn-primary-glass:focus-visible {
    background: var(--text-primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 14px 26px rgba(90, 75, 107, 0.18);
}

.btn-glass-outline,
.btn-outline-glass {
    background: #fff;
    color: var(--text-secondary);
    border: 2px solid rgba(180, 165, 217, 0.3);
    border-radius: 16px;
    padding: 0.85rem 1.2rem;
    font-weight: 700;
    transition: transform 0.25s ease, border-color 0.25s ease, color 0.25s ease, background-color 0.25s ease;
}

.btn-glass-outline:hover,
.btn-outline-glass:hover,
.btn-glass-outline:focus-visible,
.btn-outline-glass:focus-visible {
    background: rgba(180, 165, 217, 0.05);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.filter-chip {
    border-radius: 999px;
    padding-inline: 1rem;
}

.flash-message {
    border-radius: 18px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.flash-message.flash-success {
    background: rgba(25, 135, 84, 0.12);
    color: #146c43;
    border: 1px solid rgba(25, 135, 84, 0.18);
}

.flash-message.flash-error {
    background: rgba(220, 53, 69, 0.1);
    color: #b02a37;
    border: 1px solid rgba(220, 53, 69, 0.16);
}

.flash-message.flash-warning {
    background: rgba(255, 193, 7, 0.16);
    color: #946200;
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.pill-badge,
.state-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.pill-badge.badge-active,
.state-chip.state-on {
    background: rgba(25, 135, 84, 0.12);
    color: #146c43;
}

.pill-badge.badge-inactive,
.state-chip.state-off {
    background: rgba(220, 53, 69, 0.12);
    color: #b02a37;
}

.pill-badge.badge-warning,
.pill-badge.badge-parked {
    background: rgba(255, 193, 7, 0.18);
    color: #946200;
}

.pill-badge.badge-source,
.pill-badge.badge-profile {
    background: rgba(13, 110, 253, 0.12);
    color: #0d6efd;
}

.pill-badge.badge-guest {
    background: rgba(111, 66, 193, 0.12);
    color: #6f42c1;
}

.pill-badge.badge-muted {
    background: rgba(108, 117, 125, 0.12);
    color: #495057;
}

.pill-badge.badge-out {
    background: rgba(25, 135, 84, 0.12);
    color: #146c43;
}

.pill-badge.badge-admin {
    background: rgba(13, 110, 253, 0.12);
    color: #0d6efd;
}

.pill-badge.badge-superadmin {
    background: rgba(220, 53, 69, 0.12);
    color: #b02a37;
}

.table-row-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.table-row-actions .btn {
    border-radius: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.subtle-note,
.muted-note,
.section-caption {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.empty-state {
    text-align: center;
    padding: 2.75rem 1rem;
    color: var(--text-secondary);
}

.app-modal-panel {
    border-radius: 24px;
    border: none;
}

.app-modal-panel .modal-body {
    padding-top: 1.5rem;
}

.app-modal-panel .form-control,
.app-modal-panel .form-select {
    min-height: 52px;
    border-radius: 14px;
}

.app-modal-panel textarea.form-control {
    min-height: 120px;
}

.app-table thead th {
    border: none;
    color: var(--text-secondary);
    font-size: 0.86rem;
    font-weight: 800;
    padding: 0 1rem 0.35rem;
}

.app-table tbody tr {
    background: #fcfdfe;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.app-table tbody td {
    border: none;
    padding: 1rem;
    vertical-align: middle;
}

.app-table tbody td:first-child {
    border-radius: 18px 0 0 18px;
}

.app-table tbody td:last-child {
    border-radius: 0 18px 18px 0;
}

.admin-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(180, 165, 217, 0.16);
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.admin-table .table {
    margin-bottom: 0;
}

.admin-table thead {
    border-bottom: 2px solid #f1f3f5;
}

.admin-table thead th {
    font-weight: 600;
}

/* Welcome Card */
.welcome-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Add a decorative shape to welcome card */
.welcome-card::after {
    display: none;
}

.welcome-inner {
    position: relative;
    z-index: 1;
}

.welcome-card h2 {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 1.8rem;
}

.welcome-card p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin: 0;
}

/* Stat Cards */
.stat-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    height: 100%;
}

.stat-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.stat-icon {
    width: 65px;
    height: 65px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
}

.stat-icon.bg-matte-primary { background: var(--primary-color); box-shadow: 0 4px 10px rgba(180, 165, 217, 0.2); }
.stat-icon.bg-matte-success { background: var(--success-color); box-shadow: 0 4px 10px rgba(168, 213, 186, 0.2); }
.stat-icon.bg-matte-warning { background: var(--warning-color); box-shadow: 0 4px 10px rgba(255, 217, 61, 0.2); }
.stat-icon.bg-matte-danger { background: var(--danger-color); box-shadow: 0 4px 10px rgba(244, 180, 180, 0.2); }

.stat-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.stat-content h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}

.stat-content p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin: 5px 0 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Decorative background circle on stat card */
.stat-card::before {
    display: none;
}


/* Mobile & Responsive Adjustments */
.sidebar-toggler {
    display: none;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: #ffffff;
    border-radius: 12px;
    color: var(--primary-color);
    font-size: 1.4rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
}

@media (max-width: 991.98px) {
    /* Mobile Sidebar overlay */
    .sidebar-overlay {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.4);
        backdrop-filter: blur(4px);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    .sidebar-overlay.show {
        opacity: 1;
        visibility: visible;
    }
    
    .sidebar {
        transform: translateX(-110%);
        border-radius: 0 20px 20px 0;
        box-shadow: 5px 0 25px rgba(0,0,0,0.1);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px 15px;
        width: 100%;
    }

    .footer {
        margin-left: 0;
        width: 100%;
    }

    .sidebar-toggler {
        display: flex;
    }
    
    .navbar-brand {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        margin: 0;
        max-width: calc(100% - 140px);
    }

    .navbar-brand span {
        display: none; /* Hide text on mobile for tighter space */
    }
    .navbar-brand svg {
        width: 74px;
    }

    .user-menu-meta {
        max-width: 180px;
    }

    .user-menu-name,
    .user-menu-role {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .footer .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .footer .row {
        row-gap: 0.5rem;
    }

    .footer .col-md-6,
    .footer .text-md-end {
        text-align: center !important;
    }
}

@media (max-width: 768px) {
    .app-card {
        border-radius: var(--app-card-radius-mobile);
    }

    .app-card-body {
        padding: var(--app-card-padding-mobile);
    }

    .app-card > .card-body {
        padding: var(--app-card-padding-mobile);
    }

    .app-section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .app-section-header__title {
        font-size: 1.55rem;
    }

    .app-section-header__caption {
        font-size: 0.95rem;
    }

    .app-filter-bar,
    .search-panel,
    .filter-panel,
    .search-form-box,
    .form-box,
    .range-toolbar {
        padding: 1rem;
        border-radius: 18px;
    }

    .table-row-actions {
        justify-content: stretch;
    }

    .table-row-actions .btn,
    .table-row-actions form {
        width: 100%;
    }

    .table-row-actions form .btn {
        width: 100%;
    }

    .app-modal-panel .modal-footer {
        flex-direction: column;
    }

    .app-modal-panel .modal-footer .btn {
        width: 100%;
    }

    body {
        padding-top: 74px;
    }

    .navbar {
        height: 74px;
        padding: 10px 0;
    }

    .sidebar {
        top: 74px;
        height: calc(100vh - 74px);
    }

    .sidebar-overlay {
        top: 74px;
    }

    .welcome-card {
        padding: 25px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .welcome-card h2 {
        font-size: 1.4rem;
    }

    .welcome-card p {
        font-size: 0.95rem;
    }

    .stat-card {
        padding: 20px 15px;
        gap: 15px;
        align-items: flex-start;
    }
    
    .stat-icon {
        width: 55px;
        height: 55px;
        font-size: 1.5rem;
    }
    
    .stat-content h3 {
        font-size: 1.5rem;
    }

    .stat-content p {
        font-size: 0.8rem;
    }

    .sidebar-link {
        padding: 11px 14px;
        gap: 12px;
    }

    .sidebar-link span {
        line-height: 1.35;
    }
}

@media (max-width: 576px) {
    .main-content {
        padding: 16px 12px;
    }

    .sidebar {
        width: min(88vw, 320px);
    }

    .sidebar-toggler {
        width: 42px;
        height: 42px;
        font-size: 1.25rem;
        margin-right: 0.75rem !important;
    }

    .navbar-brand {
        max-width: calc(100% - 118px);
    }

    .navbar-brand svg {
        width: 66px;
    }

    .login-body-content {
        padding: 30px 20px;
    }
    .login-header {
        padding: 30px 20px 20px;
    }
    .login-header h2 {
        font-size: 1.6rem;
    }

    .user-avatar {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }

    .user-menu-trigger {
        padding-right: 10px !important;
        padding-left: 10px !important;
    }

    .user-menu-meta {
        display: none;
    }

    .dropdown-menu {
        min-width: 200px;
        margin-top: 12px !important;
    }

    .footer {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }

    .loading-overlay__panel {
        align-items: flex-start;
        padding: 1rem 1rem;
        border-radius: 22px;
    }

    .loading-overlay__spinner {
        width: 58px;
        height: 58px;
    }

    .loading-overlay__title {
        font-size: 0.95rem;
    }

    .loading-overlay__message {
        font-size: 0.86rem;
    }
}
