/* Cyber Cafe panel (/cyber-cafe-panel) - base look. A copy of the admin console's layout styles
   (Areas/Admin/Views/Shared/_AdminDashboardLayout.cshtml) so the panel's pages - which reuse the
   admin card / table / form classes - look the same without loading the admin layout or sharing its
   sign-in. Kept as a copy on purpose: changing the admin console can't break the panel. Panel-only
   additions are at the end. */:root {
    --sidebar-width: 268px;
    --header-height: 68px;
    --admin-navy: #1e1b4b;
    --admin-navy-2: #2d2467;
    --admin-navy-soft: #3d2f8a;
    --admin-navy-line: rgba(255,255,255,0.10);
    --sidebar-bg-1: #1e1b4b;
    --sidebar-bg-2: #2d2467;
    --sidebar-bg-3: #4c1d95;
    --admin-accent: #7c3aed;
    --admin-accent-2: #c084fc;
    --admin-accent-soft: rgba(124, 58, 237, 0.13);
    --admin-accent-grad: linear-gradient(135deg, #7c3aed 0%, #c026d3 55%, #ec4899 100%);
    --admin-accent-shadow: rgba(192, 38, 211, 0.45);
    --accent-blue: #3b82f6;
    --accent-blue-2: #60a5fa;
    --accent-blue-grad: linear-gradient(135deg, #2563eb 0%, #3b82f6 55%, #60a5fa 100%);
    --accent-pink: #ec4899;
    --accent-pink-2: #f472b6;
    --accent-pink-grad: linear-gradient(135deg, #db2777 0%, #ec4899 55%, #f472b6 100%);
    --accent-orange: #f97316;
    --accent-orange-2: #fb923c;
    --accent-orange-grad: linear-gradient(135deg, #ea580c 0%, #f97316 55%, #fb923c 100%);
    --accent-teal: #14b8a6;
    --accent-teal-2: #2dd4bf;
    --accent-teal-grad: linear-gradient(135deg, #0d9488 0%, #14b8a6 55%, #2dd4bf 100%);
    --bg-page: #f6f5fc;
    --bg-card: #ffffff;
    --bg-subtle: #faf9ff;
    --border-color: #ece9f7;
    --text-primary: #1e1b3a;
    --text-secondary: #6b7280;
    --text-muted: #a1a5b7;
    --success: #16a34a;
    --success-bg: #e8faf0;
    --warning: #f59e0b;
    --warning-bg: #fef6e6;
    --danger: #ef4444;
    --danger-bg: #fdecec;
    --info: #3b82f6;
    --info-bg: #eaf1fe;
    --corner-radius: 16px;
    --corner-radius-sm: 10px;
    --shadow-xs: 0 1px 2px rgba(76, 29, 149, 0.05);
    --shadow-soft: 0 1px 3px rgba(76,29,149,0.05), 0 8px 20px -8px rgba(76, 29, 149, 0.14);
    --shadow-lift: 0 8px 16px -4px rgba(76,29,149,0.10), 0 22px 44px -16px rgba(76, 29, 149, 0.22);
}

/* Dark mode — the sidebar is already a dark gradient surface in both themes, so this
   only needs to re-point the light-surface tokens (page/card/subtle/border/text). */
html[data-theme="dark"] {
    --bg-page: #14121f;
    --bg-card: #1c1930;
    --bg-subtle: #211e38;
    --border-color: #332d57;
    --text-primary: #f1eefc;
    --text-secondary: #b3ade0;
    --text-muted: #7d76a8;
    --success-bg: rgba(22, 163, 74, 0.16);
    --warning-bg: rgba(245, 158, 11, 0.16);
    --danger-bg: rgba(239, 68, 68, 0.16);
    --info-bg: rgba(59, 130, 246, 0.16);
}
html[data-theme="dark"] .admin-table.dataTable thead th,
html[data-theme="dark"] table.admin-table th { color: #fff; }

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    padding: 0;
    font-family: 'Public Sans', sans-serif;
    background-color: var(--bg-page);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    transition: background-color 200ms ease, color 200ms ease;
}
.card, .header, .form-control, table.admin-table td,
.dropdown-menu, .dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease, box-shadow 150ms ease;
}

h1, h2, h3, h4, h5, .page-title, .sidebar-logo-text {
    font-family: 'Public Sans', sans-serif;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    grid-template-rows: var(--header-height) 1fr;
    grid-template-areas:
        "sidebar header"
        "sidebar main";
    /* Locked to exactly the viewport height (not min-height) so the sidebar — which
       spans both grid rows — always reaches the bottom edge with no gap, regardless of
       how tall the page content or nav list is. .main-content scrolls internally
       (overflow-y: auto below) to hold any content taller than the viewport. */
    height: 100vh;
    min-height: 100vh;
    transition: grid-template-columns 220ms ease;
}
.dashboard-grid.is-collapsed { grid-template-columns: 80px 1fr; }

/* Rich purple-indigo gradient sidebar — deliberately distinct from the light Employer/Student dashboards */
.sidebar {
    grid-area: sidebar;
    background: linear-gradient(195deg, var(--sidebar-bg-1) 0%, var(--sidebar-bg-2) 45%, var(--sidebar-bg-3) 100%);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1100;
}

/* Collapsed desktop sidebar — icon-only rail, text/labels hidden. Scoped to desktop
   widths only, since the mobile sidebar is always a full-width overlay regardless of
   this toggle's last state. */
@media (min-width: 901px) {
    .dashboard-grid.is-collapsed .sidebar-logo-text,
    .dashboard-grid.is-collapsed .nav-section-title span,
    .dashboard-grid.is-collapsed .nav-item a > span:last-child,
    .dashboard-grid.is-collapsed .user-info,
    .dashboard-grid.is-collapsed .user-menu-arrow {
        display: none;
    }
    .dashboard-grid.is-collapsed .sidebar-header { justify-content: center; padding: 0; }
    .dashboard-grid.is-collapsed .nav-section-title { justify-content: center; }
    .dashboard-grid.is-collapsed .nav-section-title::before { display: none; }
    .dashboard-grid.is-collapsed .nav-item a { justify-content: center; padding: 0; }
    .dashboard-grid.is-collapsed .user-avatar-btn { justify-content: center; padding: 8px; }
    .dashboard-grid.is-collapsed .dropdown-menu { width: 190px; }
    .dashboard-grid.is-collapsed .sidebar-footer .dropdown-menu { left: 8px; }
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 20px;
    height: var(--header-height);
    border-bottom: 1px solid var(--admin-navy-line);
    flex-shrink: 0;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
}
.sidebar-logo-badge {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--admin-accent-grad);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 10px -2px var(--admin-accent-shadow);
}
.sidebar-logo-badge i { width: 18px; height: 18px; color: #ffffff; }
.sidebar-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}
.sidebar-logo-text strong { font-size: 14.5px; font-weight: 700; color: #fff; }
.sidebar-logo-text span { font-size: 10.5px; color: #7c88a6; letter-spacing: 0.4px; text-transform: uppercase; }

.sidebar-nav {
    position: relative;
    flex-grow: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 14px 12px 20px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.35) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 7px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb {
    background-color: rgba(255,255,255,0.28);
    border-radius: 4px;
}
.sidebar-nav::-webkit-scrollbar-thumb:hover { background-color: rgba(255,255,255,0.42); }

/* Fades the bottom edge of the nav so it's visually obvious there's more to scroll to
   when the menu list is taller than the sidebar. */
.sidebar-nav-fade {
    position: sticky;
    bottom: -20px;
    left: 0;
    right: 0;
    height: 28px;
    margin-top: -28px;
    background: linear-gradient(180deg, rgba(30, 27, 75, 0) 0%, rgba(30, 27, 75, 0.85) 100%);
    pointer-events: none;
}

.nav-list { list-style: none; padding: 0; margin: 0; }

.nav-section-title {
    font-size: 10px;
    font-weight: 700;
    color: #56617e;
    text-transform: uppercase;
    padding: 20px 12px 8px;
    letter-spacing: 0.9px;
    display: flex;
    align-items: center;
    gap: 7px;
}
.nav-section-title::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.6;
}
.nav-list > .nav-section-title:first-child { padding-top: 4px; }

.nav-item { position: relative; margin-bottom: 3px; }
.nav-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 10px;
    height: 44px;
    border-radius: 12px;
    color: #b6bdda;
    text-decoration: none;
    font-weight: 500;
    font-size: 13.5px;
    transition: all 150ms ease-in-out;
    position: relative;
}
.nav-item a:hover {
    background-color: rgba(255,255,255,0.07);
    color: #fff;
}
.nav-item a:hover .nav-icon-chip { transform: scale(1.06); }
.nav-item.active > a {
    color: #fff;
    font-weight: 600;
}

.nav-icon-chip {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 150ms ease-in-out;
}
.nav-icon-chip i { width: 15px; height: 15px; }

/* Per-section color coding — carries the vibrant multi-color language from the
   dashboard's gradient stat cards into the sidebar itself. */
.nav-item-purple .nav-icon-chip { background: rgba(124, 58, 237, 0.20); color: #d8b4fe; }
.nav-item-blue .nav-icon-chip { background: rgba(59, 130, 246, 0.20); color: #93c5fd; }
.nav-item-pink .nav-icon-chip { background: rgba(236, 72, 153, 0.20); color: #f9a8d4; }
.nav-item-orange .nav-icon-chip { background: rgba(249, 115, 22, 0.20); color: #fdba74; }
.nav-item-teal .nav-icon-chip { background: rgba(20, 184, 166, 0.20); color: #5eead4; }

.nav-item-purple.active > a { background: var(--admin-accent-grad); box-shadow: 0 6px 16px -4px rgba(192, 38, 211, 0.5); }
.nav-item-blue.active > a { background: var(--accent-blue-grad); box-shadow: 0 6px 16px -4px rgba(37, 99, 235, 0.5); }
.nav-item-pink.active > a { background: var(--accent-pink-grad); box-shadow: 0 6px 16px -4px rgba(219, 39, 119, 0.5); }
.nav-item-orange.active > a { background: var(--accent-orange-grad); box-shadow: 0 6px 16px -4px rgba(234, 88, 12, 0.5); }
.nav-item-teal.active > a { background: var(--accent-teal-grad); box-shadow: 0 6px 16px -4px rgba(13, 148, 136, 0.5); }
.nav-item.active .nav-icon-chip { background: rgba(255,255,255,0.25) !important; color: #fff !important; }

.header {
    grid-area: header;
    display: flex;
    align-items: center;
    padding: 0 30px;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-xs);
    position: relative;
    z-index: 10;
}
.header-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.header-titles { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-muted);
}
.breadcrumb a { color: var(--admin-accent); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { color: var(--text-muted); opacity: 0.6; }
.breadcrumb-current { color: var(--text-secondary); }
.page-title {
    font-size: 19px;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.header-right { display: flex; align-items: center; gap: 4px; margin-left: auto; }

.icon-btn {
    background: none;
    border: none;
    padding: 9px;
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: background-color 150ms ease, color 150ms ease;
    flex-shrink: 0;
}
.icon-btn:hover { background-color: var(--bg-subtle); color: var(--text-primary); }
.icon-btn i { width: 18px; height: 18px; }
.notif-dot {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-pink);
    border: 2px solid var(--bg-card);
}

/* Global quick search — jumps between admin sections by filtering the sidebar's own links */
.quick-search {
    position: relative;
    display: flex;
    align-items: center;
    width: 240px;
    max-width: 40vw;
}
.quick-search i {
    position: absolute;
    left: 12px;
    width: 15px;
    height: 15px;
    color: var(--text-muted);
    pointer-events: none;
}
.quick-search input {
    width: 100%;
    padding: 9px 12px 9px 34px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-subtle);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    transition: border-color 120ms ease, box-shadow 120ms ease, background-color 200ms ease;
}
.quick-search input:focus {
    outline: none;
    border-color: var(--admin-accent);
    box-shadow: 0 0 0 3px var(--admin-accent-soft);
    background-color: var(--bg-card);
}
.quick-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--corner-radius-sm);
    box-shadow: var(--shadow-lift);
    padding: 6px;
    display: none;
    max-height: 320px;
    overflow-y: auto;
    z-index: 1300;
}
.quick-search-results.is-open { display: block; }
.quick-search-results a {
    display: block;
    padding: 8px 10px;
    border-radius: 7px;
    font-size: 13px;
    color: var(--text-primary);
    text-decoration: none;
}
.quick-search-results a:hover { background-color: var(--bg-subtle); }
.quick-search-empty { padding: 10px; font-size: 12.5px; color: var(--text-muted); }

.notif-menu { width: 320px; padding: 0; overflow: hidden; }
.notif-header {
    padding: 13px 16px;
    font-size: 13px;
    font-weight: 700;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}
.notif-list { max-height: 320px; overflow-y: auto; }
.notif-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 11px 16px;
    border-bottom: 1px solid var(--border-color);
}
.notif-item:last-child { border-bottom: none; }
.notif-item-icon {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}
.notif-item-icon i { width: 14px; height: 14px; }
.notif-item-icon.notif-contact { background: var(--accent-blue-grad); }
.notif-item-icon.notif-student { background: var(--accent-teal-grad); }
.notif-item-icon.notif-employer { background: var(--accent-orange-grad); }
.notif-item-body { flex: 1; min-width: 0; }
.notif-item-title { font-size: 12.5px; font-weight: 600; color: var(--text-primary); }
.notif-item-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.notif-footer-link {
    display: block;
    text-align: center;
    padding: 11px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--admin-accent);
    text-decoration: none;
    border-top: 1px solid var(--border-color);
}
.notif-footer-link:hover { background-color: var(--bg-subtle); }

.accent-menu { width: 258px; padding: 0; overflow: hidden; }
.accent-menu-subhead { border-top: 1px solid var(--border-color); }
.accent-swatch-row { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 16px 16px; }
.accent-swatch {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--bg-card);
    outline: 2px solid transparent;
    background: var(--swatch-grad);
    cursor: pointer;
    padding: 0;
    transition: outline-color 150ms ease, transform 150ms ease;
}
.accent-swatch:hover { transform: scale(1.08); }
.accent-swatch.is-active { outline-color: var(--text-primary); }

.header-right .dropdown { position: relative; }
.header-right .dropdown-menu { top: calc(100% + 10px); right: 0; left: auto; }

@media (max-width: 780px) {
    .quick-search { display: none; }
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--admin-navy-line);
}
.sidebar-footer .dropdown { position: relative; }
.sidebar-footer .dropdown-menu {
    bottom: calc(100% + 8px);
    top: auto;
    left: 0;
    width: 100%;
}

.user-avatar-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--admin-navy-line);
    padding: 8px;
    border-radius: 10px;
    cursor: pointer;
    width: 100%;
    transition: background-color 150ms ease;
}
.user-avatar-btn:hover { background-color: rgba(255,255,255,0.07); }
.user-avatar-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: var(--admin-accent-grad);
    color: #ffffff;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.user-info { text-align: left; display: grid; min-width: 0; }
.user-name { font-weight: 600; font-size: 13px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-role { font-size: 11px; color: #7c88a6; }
.user-menu-arrow { color: #7c88a6; width: 15px; height: 15px; margin-left: auto; flex-shrink: 0; }

.dropdown-menu {
    position: absolute;
    background-color: var(--bg-card);
    border-radius: var(--corner-radius-sm);
    box-shadow: var(--shadow-lift);
    border: 1px solid var(--border-color);
    list-style: none;
    padding: 6px;
    margin: 0;
    min-width: 180px;
    z-index: 1200;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all 150ms ease;
}
.dropdown-menu.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-item a, .dropdown-item button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13.5px;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}
.dropdown-item a:hover, .dropdown-item button:hover {
    background-color: var(--bg-subtle);
    color: var(--text-primary);
}

.main-content {
    grid-area: main;
    padding: 28px 30px 40px;
    overflow-y: auto;
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--corner-radius);
    box-shadow: var(--shadow-soft);
    margin-bottom: 24px;
}
.card-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}
.card-header h5 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.1px; }
.card-body { padding: 24px; }
.card-footer {
    padding: 14px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 17px;
    border-radius: var(--corner-radius-sm);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    transition: all 150ms ease;
}
.btn-primary { background-color: var(--admin-navy-2); color: #fff; }
.btn-primary:hover { background-color: var(--admin-navy-soft); color: #fff; }
.btn-accent { background: var(--admin-accent-grad); color: #ffffff; box-shadow: 0 4px 12px -2px var(--admin-accent-shadow); }
.btn-accent:hover { filter: brightness(1.06); color: #ffffff; }
.btn-outline { background: var(--bg-card); border-color: var(--border-color); color: var(--text-secondary); }
.btn-outline:hover { background-color: var(--bg-subtle); color: var(--text-primary); border-color: #d7dae6; }
.btn-danger-outline { background: var(--bg-card); border-color: #f4c6ce; color: var(--danger); }
.btn-danger-outline:hover { background-color: var(--danger-bg); border-color: var(--danger); }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
}
.badge-success { background-color: var(--success-bg); color: var(--success); }
.badge-danger { background-color: var(--danger-bg); color: var(--danger); }
.badge-warning { background-color: var(--warning-bg); color: var(--warning); }
.badge-info { background-color: var(--info-bg); color: var(--info); }
.badge-neutral { background-color: var(--bg-subtle); color: var(--text-secondary); border: 1px solid var(--border-color); }

.empty-hint { color: var(--text-muted); font-size: 13px; text-align: center; padding: 22px 0; }

table.admin-table { width: 100%; border-collapse: collapse; }
table.admin-table th {
    text-align: left;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: #fff;
    padding: 13px 14px;
    background-color: var(--admin-navy);
}
table.admin-table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--border-color);
    font-size: 13.5px;
    color: var(--text-primary);
    /* top, not middle — a cell with long wrapping text (e.g. a spammy multi-line
       registration name) otherwise grows the whole row taller and every other,
       single-line cell in that row (City, pills, date, action buttons) floats in the
       vertical center of that tall row instead of lining up with the first line of text. */
    vertical-align: top;
}
table.admin-table tr:last-child td { border-bottom: none; }
table.admin-table tbody tr { transition: background-color 120ms ease; }
table.admin-table tbody tr:hover { background-color: var(--bg-subtle); }

/* Actions column (always the last column across every admin list table) — keeps its
   buttons/links on one line with even spacing instead of wrapping onto a second line
   when the column is narrow. table-layout is auto, so the column simply widens to fit
   rather than clipping. Applies uniformly whether the row uses the plain .btn classes
   or a page's own colored *-action-btn classes. */
table.admin-table td:last-child { white-space: nowrap; }
table.admin-table td:last-child > a,
table.admin-table td:last-child > button {
    vertical-align: middle;
    margin-right: 6px;
}
table.admin-table td:last-child > a:last-child,
table.admin-table td:last-child > button:last-child {
    margin-right: 0;
}

/* DataTables controls — styled from scratch (no default theme CSS loaded) to match this palette */
.dataTables_wrapper { padding: 0; }
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    padding: 14px 20px;
    font-size: 12.5px;
    color: var(--text-secondary);
}
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    display: flex;
    align-items: center;
}
.dataTables_wrapper .dataTables_length { float: left; }
.dataTables_wrapper .dataTables_filter { float: right; }
table.admin-table.dataTable { clear: both; }
.dataTables_wrapper .dataTables_filter label,
.dataTables_wrapper .dataTables_length label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-secondary);
}
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    padding: 7px 11px;
    border-radius: var(--corner-radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    color: var(--text-primary);
    font-size: 13px;
}
.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_wrapper .dataTables_length select:focus {
    outline: none;
    border-color: var(--admin-accent);
    box-shadow: 0 0 0 3px var(--admin-accent-soft);
}
.dataTables_wrapper .dataTables_info { clear: both; float: left; }
.dataTables_wrapper .dataTables_paginate {
    float: right;
    display: flex;
    gap: 4px;
}
.dataTables_wrapper::after { content: ''; display: block; clear: both; }
.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 6px 12px;
    border-radius: var(--corner-radius-sm);
    border: 1px solid var(--border-color);
    cursor: pointer;
    color: var(--text-secondary) !important;
    background: var(--bg-card) !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--bg-subtle) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--admin-accent-grad) !important;
    border-color: transparent !important;
    color: #fff !important;
    font-weight: 700;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    opacity: 0.45;
    cursor: default;
}
table.admin-table.dataTable thead th {
    outline: none;
}
table.admin-table.dataTable thead th.sorting,
table.admin-table.dataTable thead th.sorting_asc,
table.admin-table.dataTable thead th.sorting_desc {
    cursor: pointer;
    position: relative;
    padding-right: 22px;
}
table.admin-table.dataTable thead th.sorting::after,
table.admin-table.dataTable thead th.sorting_asc::after,
table.admin-table.dataTable thead th.sorting_desc::after {
    content: '\2195';
    position: absolute;
    right: 8px;
    opacity: 0.5;
    font-size: 11px;
}
table.admin-table.dataTable thead th.sorting_asc::after { content: '\2191'; opacity: 0.95; }
table.admin-table.dataTable thead th.sorting_desc::after { content: '\2193'; opacity: 0.95; }
@media (max-width: 700px) {
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_paginate { float: none; }
}

.form-control {
    width: 100%;
    padding: 10px 13px;
    border-radius: var(--corner-radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    color: var(--text-primary);
    font-size: 13.5px;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}
.form-control:focus {
    outline: none;
    border-color: var(--admin-accent);
    box-shadow: 0 0 0 3px var(--admin-accent-soft);
}

/* Select2 — every <select class="form-control"> panel-wide becomes a searchable
   dropdown (auto-initialized in the script block below); themed to match the rest of
   the design system, light and dark mode both. */
.select2-container { width: 100% !important; }
.select2-container .select2-selection--single {
    height: 41px;
    border-radius: var(--corner-radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    transition: border-color 120ms ease, box-shadow 120ms ease, background-color 200ms ease;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 39px;
    padding-left: 13px;
    color: var(--text-primary);
    font-size: 13.5px;
}
.select2-container--default .select2-selection--single .select2-selection__placeholder { color: var(--text-muted); }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 39px; right: 8px; }
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--admin-accent);
    box-shadow: 0 0 0 3px var(--admin-accent-soft);
}
.select2-dropdown {
    border-radius: var(--corner-radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    box-shadow: var(--shadow-lift);
    overflow: hidden;
    z-index: 1250;
}
.select2-search--dropdown { padding: 8px; background-color: var(--bg-card); }
.select2-search--dropdown .select2-search__field {
    border-radius: var(--corner-radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--bg-subtle);
    color: var(--text-primary);
    padding: 8px 11px;
    font-size: 13px;
}
.select2-search--dropdown .select2-search__field:focus {
    outline: none;
    border-color: var(--admin-accent);
}
.select2-results__option {
    padding: 9px 13px;
    font-size: 13.5px;
    color: var(--text-primary);
}
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: var(--admin-accent-grad);
    color: #fff;
}
.select2-container--default .select2-results__option[aria-selected="true"] {
    background-color: var(--bg-subtle);
    color: var(--text-primary);
}
.select2-results__message { color: var(--text-muted); font-size: 13px; }
.select2-container--default .select2-results > .select2-results__options { max-height: 260px; }

/* Compact stat cards — shared across Dashboard, Page Views, and any future analytics page */
.mini-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-content: start;
}
.mini-stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--corner-radius-sm);
    box-shadow: var(--shadow-xs);
    padding: 14px 15px;
    transition: box-shadow 150ms ease, transform 150ms ease;
}
.mini-stat-card:hover { box-shadow: var(--shadow-soft); transform: translateY(-1px); }
.mini-stat-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.mini-stat-icon i { width: 17px; height: 17px; }
.mini-stat-icon-purple { background: rgba(124, 58, 237, 0.13); color: var(--admin-accent); }
.mini-stat-icon-blue { background: rgba(59, 130, 246, 0.13); color: var(--accent-blue); }
.mini-stat-icon-teal { background: rgba(20, 184, 166, 0.13); color: var(--accent-teal); }
.mini-stat-icon-orange { background: rgba(249, 115, 22, 0.13); color: var(--accent-orange); }
.mini-stat-icon-pink { background: rgba(236, 72, 153, 0.13); color: var(--accent-pink); }
.mini-stat-icon-amber { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.mini-stat-text { display: flex; flex-direction: column; min-width: 0; }
.mini-stat-label { font-size: 11px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-stat-value { font-size: 18px; font-weight: 700; color: var(--text-primary); line-height: 1.3; }

.form-label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.form-group { margin-bottom: 17px; }

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(10,15,30,0.5);
    z-index: 1099;
    display: none;
    opacity: 0;
    transition: opacity 250ms ease;
}

@media (max-width: 900px) {
    .dashboard-grid, .dashboard-grid.is-collapsed {
        grid-template-columns: 1fr;
        grid-template-areas: "header" "main";
    }
    .sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        bottom: 0;
        width: var(--sidebar-width);
        transition: left 200ms ease;
        box-shadow: var(--shadow-lift);
    }
    .sidebar.is-open { left: 0; }
    .sidebar-overlay.is-active { display: block; opacity: 1; }
    .icon-btn.mobile-sidebar-toggle { display: flex; }
    .icon-btn.desktop-sidebar-toggle { display: none; }
    .header { padding: 0 16px; }
    .main-content { padding: 20px 16px 32px; }
}

/* ---------------------------------------------------------------- panel additions */
:root {
    --admin-accent: #0d9488;
    --admin-accent-2: #2dd4bf;
    --admin-accent-soft: rgba(13, 148, 136, 0.13);
    --admin-accent-grad: linear-gradient(135deg, #0f766e 0%, #0d9488 55%, #2dd4bf 100%);
    --admin-accent-shadow: rgba(13, 148, 136, 0.45);
    --sidebar-bg-1: #042f2e;
    --sidebar-bg-2: #115e59;
    --sidebar-bg-3: #0d9488;
}
.ccp-shop-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--admin-accent-soft); color: var(--admin-accent); font-size: 12px; font-weight: 600; }
.ccp-role { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.ccp-banner { margin: 0 0 16px; padding: 12px 16px; border-radius: var(--corner-radius-sm); background: var(--warning-bg); color: var(--text-primary); border: 1px solid rgba(245, 158, 11, .35); display: flex; gap: 10px; align-items: flex-start; }
.ccp-banner i, .ccp-banner svg { flex: 0 0 auto; width: 18px; height: 18px; color: var(--warning); margin-top: 2px; }
.ccp-logout { width: 100%; background: none; border: 0; color: inherit; font: inherit; display: flex; align-items: center; gap: 10px; padding: 0; cursor: pointer; text-align: left; }

/* sign-in / registration pages (no sidebar) */
.ccp-auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 16px; background: radial-gradient(1200px 500px at 10% -10%, rgba(13,148,136,.18), transparent), var(--bg-page); }
.ccp-auth-card { width: 100%; max-width: 440px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--corner-radius); box-shadow: var(--shadow-lift); padding: 28px 26px; }
.ccp-auth-card.is-wide { max-width: 720px; }
.ccp-auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; color: var(--text-primary); text-decoration: none; }
.ccp-auth-brand .sidebar-logo-badge { width: 40px; height: 40px; }
.ccp-auth-brand strong { display: block; font-size: 17px; }
.ccp-auth-brand span { font-size: 12px; color: var(--text-secondary); }
.ccp-auth h1 { font-size: 22px; margin: 0 0 6px; color: var(--text-primary); }
.ccp-auth p.lead { margin: 0 0 18px; color: var(--text-secondary); font-size: 14px; }
.ccp-auth .form-group { margin-bottom: 14px; }
.ccp-auth .btn { width: 100%; justify-content: center; }
.ccp-auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.ccp-auth-grid .is-full { grid-column: 1 / -1; }
.ccp-auth-foot { margin-top: 16px; font-size: 13px; color: var(--text-secondary); text-align: center; }
.ccp-auth-foot a { color: var(--admin-accent); font-weight: 600; }
.ccp-auth-msg { margin: 0 0 14px; padding: 10px 12px; border-radius: var(--corner-radius-sm); font-size: 14px; }
.ccp-auth-msg.is-error { background: var(--danger-bg); color: var(--danger); }
.ccp-auth-msg.is-ok { background: var(--success-bg); color: var(--success); }
.ccp-auth-msg.is-info { background: var(--info-bg); color: var(--text-primary); }
.ccp-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ccp-legal { font-size: 12px; color: var(--text-muted); margin: 12px 0 0; }
@media (max-width: 640px) { .ccp-auth-grid { grid-template-columns: 1fr; } .ccp-auth-card { padding: 22px 18px; } }