/* =========================================================
   App Design System — Modern SaaS UI
   ========================================================= */

/* ── Google Fonts (Inter) ─────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Design Tokens ────────────────────────────────────── */
:root {
    /* Sidebar */
    --sidebar-bg:           #0f172a;
    --sidebar-border:       rgba(255,255,255,0.06);
    --sidebar-logo-border:  rgba(255,255,255,0.08);
    --sidebar-text:         #94a3b8;
    --sidebar-text-hover:   #f1f5f9;
    --sidebar-cat-label:    #475569;
    --sidebar-item-hover:   rgba(255,255,255,0.05);
    --sidebar-active-bg:    rgba(99,102,241,0.15);
    --sidebar-active-text:  #a5b4fc;
    --sidebar-active-bar:   #6366f1;

    /* Header */
    --header-bg:            #ffffff;
    --header-border:        #e2e8f0;
    --header-height:        58px;

    /* Content */
    --content-bg:           #f8fafc;

    /* Accent */
    --accent:               #6366f1;
    --accent-hover:         #4f46e5;
    --accent-light:         #eef2ff;
    --accent-text:          #4338ca;

    /* Cards */
    --card-bg:              #ffffff;
    --card-shadow:          0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
    --card-shadow-hover:    0 4px 12px rgba(0,0,0,0.10), 0 2px 4px rgba(0,0,0,0.06);

    /* Border & Radius */
    --radius-sm:            6px;
    --radius:               8px;
    --radius-lg:            12px;
    --border-color:         #e2e8f0;

    /* Text */
    --text-primary:         #0f172a;
    --text-secondary:       #64748b;
    --text-muted:           #94a3b8;

    /* Status */
    --success:              #10b981;
    --danger:               #ef4444;
    --warning:              #f59e0b;
    --info:                 #3b82f6;
}

/* ── Base ─────────────────────────────────────────────── */
html {
    font-size: 106.25%; /* 17px base — scales all rem values up ~6% */
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--content-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Bootstrap overrides ──────────────────────────────── */
:root {
    --bs-border-radius:      var(--radius);
    --bs-border-radius-sm:   var(--radius-sm);
    --bs-border-radius-lg:   var(--radius-lg);
    --bs-border-radius-xl:   var(--radius-lg);
    --bs-border-radius-2xl:  var(--radius-lg);
    --bs-border-radius-pill: 9999px;
    --bs-primary:            #6366f1;
    --bs-primary-rgb:        99,102,241;
    --bs-border-color:       var(--border-color);
    --bs-body-font-family:   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --bs-body-color:         var(--text-primary);
    --bs-body-bg:            var(--content-bg);
}

/* ── Sidebar ──────────────────────────────────────────── */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 240px;
    min-height: 100vh;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.sidebar.collapsed {
    transform: translateX(-240px);
}

/* Logo area */
.sidebar-logo {
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--sidebar-logo-border);
    margin-bottom: 8px;
}

.sidebar-logo h4 {
    color: #f8fafc;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 0;
}

.sidebar-logo img {
    max-height: 36px;
    object-fit: contain;
}

/* Category labels */
.sidebar-category-label {
    display: block;
    padding: 12px 20px 4px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sidebar-cat-label);
    cursor: pointer;
    user-select: none;
    transition: color 0.15s;
}

.sidebar-category-label:hover { color: var(--sidebar-text); }

.sidebar-category-label.has-active {
    color: #6366f1;
}

/* Nav items */
.sidebar a.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px 8px 20px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 450;
    border-radius: 0;
    transition: background 0.15s, color 0.15s;
    position: relative;
    margin: 1px 8px;
    border-radius: var(--radius-sm);
}

.sidebar a.nav-item i {
    font-size: 0.9375rem;
    width: 18px;
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.15s;
}

.sidebar a.nav-item:hover {
    background: var(--sidebar-item-hover);
    color: var(--sidebar-text-hover);
}

.sidebar a.nav-item:hover i { opacity: 1; }

.sidebar a.nav-item.active {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-active-text);
    font-weight: 500;
}

.sidebar a.nav-item.active i { opacity: 1; }

.sidebar a.nav-item.active::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    height: 18px;
    width: 3px;
    background: var(--sidebar-active-bar);
    border-radius: 0 2px 2px 0;
}

/* Accordion overrides for sidebar */
.sidebar .accordion-item {
    background: transparent;
    border: 0;
}

.sidebar .accordion-button {
    background: transparent;
    color: var(--sidebar-cat-label);
    border: 0;
    box-shadow: none;
    padding: 10px 20px 4px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 0.15s;
}

.sidebar .accordion-button:not(.collapsed) {
    background: transparent;
    color: var(--sidebar-cat-label);
    box-shadow: none;
}

.sidebar .accordion-button:focus { box-shadow: none; }

.sidebar .accordion-button small {
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    color: inherit;
}

.sidebar .accordion-button::after {
    filter: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23475569'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    width: 12px;
    height: 12px;
    background-size: 12px;
    transition: transform 0.2s ease;
}

.sidebar .accordion-button:not(.collapsed)::after {
    filter: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236366f1'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.sidebar .accordion-body { padding: 2px 0 6px; }

.sidebar .accordion-button.has-active {
    color: #6366f1 !important;
}

.sidebar .accordion-button.has-active small {
    color: #6366f1 !important;
}

/* Sub-menu (nested nav items) */
.sidebar .nav-item-toggle {
    justify-content: flex-start;
}
.sidebar .nav-item-toggle .nav-chevron {
    margin-left: auto !important;
    font-size: 0.65rem;
    transition: transform 0.2s ease;
    opacity: 0.6;
}
.sidebar .nav-item-toggle[aria-expanded="true"] .nav-chevron {
    transform: rotate(180deg);
}
.sidebar .nav-submenu {
    padding-left: 10px;
    border-left: 2px solid var(--sidebar-item-hover);
    margin: 0 8px 4px 28px;
}
.sidebar .nav-submenu .nav-item {
    padding: 6px 10px;
    font-size: 0.78rem;
    margin: 1px 0;
}
.sidebar .nav-submenu .nav-item i {
    font-size: 0.85rem;
    width: 16px;
}

/* ── Content Wrapper ──────────────────────────────────── */
.content-wrapper {
    margin-left: 240px;
    min-height: 100vh;
    width: calc(100% - 240px);
    transition: margin-left 0.25s cubic-bezier(0.4,0,0.2,1),
                width 0.25s cubic-bezier(0.4,0,0.2,1);
    display: flex;
    flex-direction: column;
}

.content-wrapper.expanded {
    margin-left: 0;
    width: 100%;
}

/* ── Header / Topbar ──────────────────────────────────── */
.app-topbar {
    position: sticky;
    top: 0;
    z-index: 900;
    height: var(--header-height);
    background: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.topbar-toggle {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    transition: background 0.15s, color 0.15s;
}

.topbar-toggle:hover {
    background: #f1f5f9;
    color: var(--text-primary);
}

.topbar-toggle i { font-size: 1.25rem; }

.topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
}

.topbar-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    border-radius: 9999px;
    background: var(--accent-light);
    color: var(--accent-text);
    margin-right: 8px;
}

.topbar-badge.badge-super {
    background: #fef3c7;
    color: #92400e;
}

.topbar-badge.badge-group {
    background: #f0fdf4;
    color: #166534;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-welcome {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-right: 8px;
    font-weight: 450;
}

.topbar-icon-btn {
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    transition: background 0.15s, color 0.15s;
    text-decoration: none;
}

.topbar-icon-btn:hover {
    background: #f1f5f9;
    color: var(--text-primary);
}

.topbar-icon-btn i { font-size: 1.125rem; }

.topbar-icon-btn .badge-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 0.625rem;
    font-weight: 700;
    background: var(--danger);
    color: white;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.topbar-icon-btn .badge-dot.success {
    background: var(--success);
    min-width: 10px;
    height: 10px;
    padding: 0;
}

/* User dropdown */
.topbar-user-btn {
    background: none;
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: var(--radius-sm);
    transition: background 0.15s;
    color: var(--text-primary);
}

.topbar-user-btn:hover { background: #f1f5f9; }

.topbar-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.topbar-user-name {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Dropdown */
.app-dropdown {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.06);
    padding: 4px;
    min-width: 180px;
}

.app-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    color: var(--text-primary);
    transition: background 0.12s;
}

.app-dropdown .dropdown-item i {
    width: 16px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.app-dropdown .dropdown-item:hover {
    background: #f8fafc;
    color: var(--text-primary);
}

.app-dropdown .dropdown-divider {
    margin: 4px 0;
    border-color: var(--border-color);
}

/* ── Main Content ─────────────────────────────────────── */
.main-content {
    flex: 1;
    padding: 28px 28px 40px;
}

/* ── Cards ────────────────────────────────────────────── */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 16px 20px;
    font-weight: 600;
    font-size: 0.875rem;
}

.card-body { padding: 20px; }

/* ── Buttons ──────────────────────────────────────────── */
.btn {
    font-family: inherit;
    font-weight: 500;
    font-size: 0.8125rem;
    border-radius: var(--radius-sm);
    padding: 7px 14px;
    transition: all 0.15s;
    line-height: 1.5;
}

.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 1px 2px rgba(99,102,241,0.3);
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    box-shadow: 0 2px 6px rgba(99,102,241,0.4);
}

.btn-sm {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 5px;
}

.btn-lg {
    font-size: 0.9375rem;
    padding: 10px 20px;
    border-radius: var(--radius);
}

.btn-outline-secondary {
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.btn-outline-secondary:hover {
    background: #f8fafc;
    color: var(--text-primary);
    border-color: #cbd5e1;
}

/*.btn-outline-dark {
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.btn-outline-dark:hover {
    background: #f8fafc;
    color: var(--text-primary);
    border-color: #cbd5e1;
}*/

/* ── Forms ────────────────────────────────────────────── */
.form-control, .form-select {
    font-family: inherit;
    font-size: 0.875rem;
    border-color: var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    color: var(--text-primary);
    transition: border-color 0.15s, box-shadow 0.15s;
    background-color: white;
}

.form-control:focus, .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

.form-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

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

.input-group .form-control:focus {
    z-index: 3;
}

/* ── Tables ───────────────────────────────────────────── */
.table {
    font-size: 0.8125rem;
    color: var(--text-primary);
    --bs-table-bg: transparent;
}

.table thead th {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 14px;
    background: transparent;
}

.table tbody td {
    padding: 11px 14px;
    border-color: var(--border-color);
    vertical-align: middle;
}

.table-hover tbody tr:hover td {
    background: #f8fafc;
}

/* Compact row padding — add .table-compact to any <table> */
.table-compact > thead > tr > th,
.table-compact > tbody > tr > td {
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
}

/* Sortable column headers — add .sortable to <thead> links */
thead th a.sortable {
    cursor: pointer;
    user-select: none;
    text-decoration: none;
    color: inherit;
}
thead th a.sortable:hover {
    color: var(--bs-primary) !important;
}

/* ── Alerts ───────────────────────────────────────────── */
.alert {
    border-radius: var(--radius);
    border: 1px solid;
    padding: 12px 16px;
    font-size: 0.8125rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.alert-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.alert-danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.alert-warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.alert-info {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}

/* ── Badges ───────────────────────────────────────────── */
.badge {
    font-family: inherit;
    font-weight: 600;
    font-size: 0.6875rem;
    padding: 3px 8px;
    border-radius: 9999px;
    letter-spacing: 0.02em;
}

/* ── Modals ───────────────────────────────────────────── */
.modal-content {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 18px 22px;
}

.modal-title {
    font-size: 0.9375rem;
    font-weight: 600;
}

.modal-body { padding: 22px; }

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 14px 22px;
}

/* ── Dropdown menus ───────────────────────────────────── */
.dropdown-menu {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.05);
    padding: 4px;
    font-size: 0.8125rem;
}

.dropdown-item {
    border-radius: var(--radius-sm);
    padding: 7px 12px;
    font-size: 0.8125rem;
    color: var(--text-primary);
    transition: background 0.12s;
}

.dropdown-item:hover {
    background: #f8fafc;
    color: var(--text-primary);
}

.dropdown-item i {
    width: 16px;
    margin-right: 8px;
    color: var(--text-secondary);
}

.dropdown-divider { border-color: var(--border-color); margin: 4px 0; }

/* ── Page header ──────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin: 0;
}

.page-subtitle {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin: 2px 0 0;
}

/* ── Pagination ───────────────────────────────────────── */
.pagination .page-link {
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    color: var(--text-secondary);
    border-color: var(--border-color);
    padding: 6px 12px;
    margin: 0 2px;
    transition: all 0.12s;
}

.pagination .page-link:hover {
    background: #f8fafc;
    color: var(--text-primary);
    border-color: #cbd5e1;
}

.pagination .page-item.active .page-link {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* ── Breadcrumbs ──────────────────────────────────────── */
.breadcrumb {
    font-size: 0.8125rem;
    margin-bottom: 0;
}

.breadcrumb-item + .breadcrumb-item::before { color: var(--text-muted); }
.breadcrumb-item.active { color: var(--text-secondary); }
.breadcrumb-item a { color: var(--accent); text-decoration: none; }
.breadcrumb-item a:hover { color: var(--accent-hover); }

/* ── List groups ──────────────────────────────────────── */
.list-group-item {
    border-color: var(--border-color);
    font-size: 0.875rem;
    padding: 10px 16px;
}

.list-group-item:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.list-group-item:last-child  { border-radius: 0 0 var(--radius) var(--radius); }

/* ── Nav tabs ─────────────────────────────────────────── */
.nav-tabs {
    border-color: var(--border-color);
}

.nav-tabs .nav-link {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-color: transparent;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    padding: 9px 16px;
    transition: color 0.15s;
}

.nav-tabs .nav-link:hover { color: var(--text-primary); border-color: transparent; background: #f8fafc; }

.nav-tabs .nav-link.active {
    color: var(--accent);
    font-weight: 600;
    border-color: var(--border-color) var(--border-color) white;
    background: white;
}

/* ── Progress ─────────────────────────────────────────── */
.progress {
    border-radius: 9999px;
    height: 6px;
    background: #e2e8f0;
}

.progress-bar {
    background: var(--accent);
    border-radius: 9999px;
}

/* ── Toast ────────────────────────────────────────────── */
.toast {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.10);
}

/* ── DataTables overrides ─────────────────────────────── */
.dataTable-input,
.dataTable-selector {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 7px 12px;
    font-size: 0.8125rem;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
    background: white;
}

.dataTable-input:focus,
.dataTable-selector:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
    outline: none;
}

.dataTable-pagination a {
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    font-size: 0.8125rem;
    color: var(--text-secondary);
    transition: all 0.12s;
}

.dataTable-pagination a:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.dataTable-pagination .active a {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* ── Auth layout ──────────────────────────────────────── */
.auth-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    pointer-events: none;
}

.auth-page::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(139,92,246,0.10) 0%, transparent 70%);
    bottom: -50px;
    left: -50px;
    pointer-events: none;
}

.auth-card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 25px 60px rgba(0,0,0,0.35), 0 4px 16px rgba(0,0,0,0.15);
    overflow: hidden;
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}

.auth-card-header {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    padding: 32px 36px 28px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.auth-card-header h3 {
    color: white;
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.02em;
}

.auth-card-header p {
    color: #94a3b8;
    font-size: 0.8125rem;
    margin: 6px 0 0;
}

.auth-card-body { padding: 28px 36px 32px; }

/* ── Utility classes ──────────────────────────────────── */
.text-muted { color: var(--text-muted) !important; }
.text-secondary { color: var(--text-secondary) !important; }

.bg-light {
    background-color: #f8fafc !important;
}

/* ── Mobile ───────────────────────────────────────────── */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-240px);
        box-shadow: none;
    }

    .sidebar.show {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0,0,0,0.25);
    }

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

    .content-wrapper.expanded {
        margin-left: 0;
        width: 100%;
    }

    .main-content {
        padding: 20px 16px 32px;
    }
}

/* ── SweetAlert2 overrides ────────────────────────────── */
.swal2-popup {
    border-radius: var(--radius-lg) !important;
    font-family: 'Inter', -apple-system, sans-serif !important;
    padding: 28px !important;
}

.swal2-title {
    font-size: 1.0625rem !important;
    font-weight: 600 !important;
}

.swal2-html-container {
    font-size: 0.875rem !important;
}

.swal2-confirm {
    border-radius: var(--radius-sm) !important;
    font-weight: 500 !important;
    font-family: inherit !important;
    padding: 8px 18px !important;
}

.swal2-cancel {
    border-radius: var(--radius-sm) !important;
    font-weight: 500 !important;
    font-family: inherit !important;
    padding: 8px 18px !important;
}
