/* ============================================================
   assets/css/admin.css
   Premium Admin Panel Stylesheet — Scuba Club Taekwondo
   ============================================================ */

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

/* --- CSS Variables --- */
:root {
    --adm-primary:       #0d47a1;
    --adm-primary-light: #1565c0;
    --adm-primary-dark:  #0a3882;
    --adm-accent:        #ffc107;
    --adm-success:       #10b981;
    --adm-danger:        #ef4444;
    --adm-warning:       #f59e0b;
    --adm-info:          #3b82f6;

    --adm-sidebar-w:     255px;
    --adm-sidebar-bg:    linear-gradient(170deg, #0d47a1 0%, #1a237e 60%, #0d1b4b 100%);

    --adm-bg:            #f0f4f8;
    --adm-surface:       #ffffff;
    --adm-border:        #e2e8f0;
    --adm-text:          #1e293b;
    --adm-text-muted:    #64748b;
    --adm-text-light:    #94a3b8;

    --adm-radius-sm:     8px;
    --adm-radius-md:     14px;
    --adm-radius-lg:     20px;
    --adm-radius-xl:     28px;

    --adm-shadow-xs:     0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.06);
    --adm-shadow-sm:     0 4px 6px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.04);
    --adm-shadow-md:     0 10px 25px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.05);
    --adm-shadow-lg:     0 20px 60px rgba(0,0,0,0.12), 0 8px 20px rgba(0,0,0,0.08);
    --adm-shadow-glow:   0 8px 32px rgba(13, 71, 161, 0.25);

    --adm-transition:    all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --adm-transition-slow: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --adm-font:          'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--adm-font);
    font-size: 0.9rem;
    color: var(--adm-text);
    background: var(--adm-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.admin-sidebar {
    width: var(--adm-sidebar-w);
    min-height: 100vh;
    height: 100%;
    background: var(--adm-sidebar-bg);
    position: fixed;
    top: 0; left: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: 6px 0 30px rgba(0,0,0,0.18);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), box-shadow 0.3s ease;
}
.admin-sidebar::-webkit-scrollbar { width: 4px; }
.admin-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }

/* Brand */
.sb-brand {
    padding: 1.5rem 1.4rem 1.1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}
.sb-brand::before {
    content: '';
    position: absolute;
    top: -30px; right: -30px;
    width: 120px; height: 120px;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
    pointer-events: none;
}
.sb-brand-logo {
    width: 42px; height: 42px;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.08) 100%);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 0.6rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    backdrop-filter: blur(8px);
}
.sb-brand h6 {
    color: #fff;
    font-weight: 800;
    font-size: 0.98rem;
    margin: 0 0 3px;
    letter-spacing: 0.2px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.sb-brand small { color: rgba(255,255,255,0.4); font-size: 0.72rem; font-weight: 400; }

/* Admin Info */
.sb-admin-info {
    display: flex; align-items: center; gap: 0.7rem;
    padding: 0.9rem 1.4rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
    background: rgba(0,0,0,0.08);
}
.sb-avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.25), rgba(255,255,255,0.1));
    border: 2px solid rgba(255,255,255,0.25);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.88rem; flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    position: relative;
}
.sb-avatar::after {
    content: '';
    position: absolute;
    bottom: 1px; right: 1px;
    width: 9px; height: 9px;
    background: #10b981;
    border-radius: 50%;
    border: 2px solid #1a237e;
}
.sb-admin-name { color: #fff; font-size: 0.83rem; font-weight: 600; line-height: 1.2; }
.sb-admin-role { color: rgba(255,255,255,0.4); font-size: 0.7rem; text-transform: capitalize; }

/* Nav */
.sb-nav { list-style: none; padding: 0.8rem 0; margin: 0; flex: 1; }
.sb-section {
    padding: 1rem 1.4rem 0.35rem;
    font-size: 0.6rem; font-weight: 700;
    letter-spacing: 2px; text-transform: uppercase;
    color: rgba(255,255,255,0.28);
}
.sb-nav a {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.62rem 1.4rem;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.875rem; font-weight: 500;
    transition: var(--adm-transition);
    border-left: 3px solid transparent;
    position: relative;
    margin: 1px 0;
}
.sb-nav a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0);
    transition: background 0.2s ease;
    border-radius: 0 var(--adm-radius-sm) var(--adm-radius-sm) 0;
    margin-right: 8px;
}
.sb-nav a:hover {
    color: #fff;
    border-left-color: rgba(255,255,255,0.35);
}
.sb-nav a:hover::before { background: rgba(255,255,255,0.07); }
.sb-nav a.active {
    color: #fff;
    border-left-color: var(--adm-accent);
    font-weight: 600;
}
.sb-nav a.active::before { background: rgba(255,255,255,0.12); }
.sb-nav a .nav-icon { font-size: 1.05rem; width: 1.25rem; text-align: center; flex-shrink: 0; }

/* Badge */
.sb-badge {
    margin-left: auto;
    background: var(--adm-accent);
    color: #000;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 20px;
    line-height: 1.5;
    animation: pulse-badge 2s infinite;
}
@keyframes pulse-badge {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,193,7,0.5); }
    50% { box-shadow: 0 0 0 4px rgba(255,193,7,0); }
}

/* Divider & Logout */
.sb-divider { border: none; border-top: 1px solid rgba(255,255,255,0.08); margin: 0.4rem 1.4rem; }
.sb-logout a { color: rgba(255,120,120,0.75) !important; }
.sb-logout a:hover { color: #fc8181 !important; }
.sb-logout a:hover::before { background: rgba(255,80,80,0.1) !important; }

/* Footer */
.sb-footer {
    padding: 0.9rem 1.4rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}
.sb-footer small { color: rgba(255,255,255,0.2); font-size: 0.65rem; line-height: 1.6; }

/* Mobile Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 999;
    backdrop-filter: blur(2px);
    animation: fadeIn 0.2s ease;
}
.sidebar-overlay.show { display: block; }

/* ============================================================
   LAYOUT
   ============================================================ */
.admin-wrapper { display: flex; min-height: 100vh; }
.admin-main {
    margin-left: var(--adm-sidebar-w);
    flex: 1;
    padding: 1.75rem 2rem;
    min-width: 0;
    transition: margin-left 0.3s cubic-bezier(0.4,0,0.2,1);
}

/* ============================================================
   TOP BAR
   ============================================================ */
.admin-topbar {
    background: var(--adm-surface);
    border-radius: var(--adm-radius-lg);
    padding: 1.1rem 1.6rem;
    margin-bottom: 1.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    box-shadow: var(--adm-shadow-sm);
    border: 1px solid var(--adm-border);
    position: relative;
    overflow: hidden;
    animation: slideDown 0.4s cubic-bezier(0.4,0,0.2,1) both;
}
.admin-topbar::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--adm-primary) 0%, #1565c0 50%, #3b82f6 100%);
}
.admin-topbar-title h1 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--adm-text);
    margin: 0 0 3px;
    letter-spacing: -0.3px;
}
.admin-topbar-title p { font-size: 0.81rem; color: var(--adm-text-muted); margin: 0; }

/* ============================================================
   MOBILE HEADER
   ============================================================ */
.mobile-header {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 65px;
    background: var(--adm-surface);
    border-bottom: 1px solid var(--adm-border);
    box-shadow: var(--adm-shadow-sm);
    z-index: 998;
    padding: 0 1.25rem;
    align-items: center;
    gap: 1.25rem;
}
.mobile-header .sidebar-toggle-btn {
    background: transparent;
    border: none;
    color: var(--adm-text);
    font-size: 1.6rem;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}
.mobile-header .sidebar-toggle-btn:hover {
    color: var(--adm-primary);
}
.mobile-brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.mobile-brand .brand-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--adm-primary-dark);
    line-height: 1.2;
    letter-spacing: -0.5px;
}
.mobile-brand .brand-subtitle {
    font-size: 0.75rem;
    color: var(--adm-text-muted);
    line-height: 1;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
    border: 1px solid var(--adm-border) !important;
    border-radius: var(--adm-radius-md) !important;
    box-shadow: var(--adm-shadow-xs) !important;
    transition: var(--adm-transition) !important;
    background: var(--adm-surface) !important;
}
.card:hover {
    box-shadow: var(--adm-shadow-md) !important;
    transform: translateY(-2px);
}
.card-header {
    background: var(--adm-surface) !important;
    border-bottom: 1px solid var(--adm-border) !important;
    border-radius: var(--adm-radius-md) var(--adm-radius-md) 0 0 !important;
}

/* Stat cards (dashboard & others) */
.stat-card {
    border-radius: var(--adm-radius-md) !important;
    padding: 1.4rem 1.5rem;
    border: 1px solid var(--adm-border) !important;
    background: var(--adm-surface) !important;
    box-shadow: var(--adm-shadow-xs) !important;
    position: relative;
    overflow: hidden;
    transition: var(--adm-transition);
    display: flex;
    align-items: center;
    gap: 1.25rem;
}
.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--adm-shadow-md) !important;
}
.stat-card .stat-icon {
    width: 54px; height: 54px;
    border-radius: var(--adm-radius-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.75rem;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.stat-card .stat-body {
    flex: 1;
}
.stat-card .stat-value, .stat-card .stat-num {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--adm-text);
    line-height: 1.2;
    letter-spacing: -0.5px;
}
.stat-card .stat-label {
    font-size: 0.82rem;
    color: var(--adm-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================================
   TABLE
   ============================================================ */
.table-admin th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #f8fafc;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--adm-text-muted);
    font-weight: 700;
    border-bottom: 2px solid var(--adm-border);
    padding: 0.8rem 0.85rem;
    white-space: nowrap;
}
.table-admin td {
    font-size: 0.875rem;
    vertical-align: middle;
    padding: 0.85rem 0.85rem;
    border-bottom: 1px solid #f1f5f9;
    color: var(--adm-text);
    white-space: nowrap;
}

/* Custom Scrollbar for Responsive Tables */
.table-responsive {
    max-height: 65vh; /* Keep table height constrained so horizontal scroll is always visible */
    overflow-y: auto;
}
.table-responsive::-webkit-scrollbar {
    height: 10px;
    width: 8px;
}
.table-responsive::-webkit-scrollbar-track {
    background: #f8fafc;
    border-radius: 10px;
}
.table-responsive::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.5);
    border-radius: 10px;
}
.table-responsive::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, 0.8);
}
.table-admin tbody tr {
    transition: background 0.15s ease;
}
.table-admin tbody tr:hover {
    background: #f8fafc;
}
/* Stacking context fix when dropdown is open or hovered */
.table-admin tbody tr:hover,
.table-admin tbody tr:focus-within,
.table-admin tbody tr:has([aria-expanded="true"]),
.table-admin tbody tr:has(.show) {
    position: relative;
    z-index: 999 !important;
}
.table-admin tbody tr:last-child td { border-bottom: none; }


/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    border-radius: var(--adm-radius-sm) !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    transition: var(--adm-transition) !important;
    letter-spacing: 0.1px;
}
.btn:active { transform: scale(0.97) !important; }
.btn-primary { background: var(--adm-primary) !important; border-color: var(--adm-primary) !important; }
.btn-primary:hover {
    background: var(--adm-primary-dark) !important;
    border-color: var(--adm-primary-dark) !important;
    box-shadow: 0 6px 18px rgba(13,71,161,0.35) !important;
    transform: translateY(-1px) !important;
}
.btn-success:hover { transform: translateY(-1px) !important; box-shadow: 0 6px 18px rgba(16,185,129,0.35) !important; }
.btn-danger:hover { transform: translateY(-1px) !important; box-shadow: 0 6px 18px rgba(239,68,68,0.35) !important; }
.btn-info:hover { transform: translateY(-1px) !important; box-shadow: 0 6px 18px rgba(59,130,246,0.35) !important; }
.btn-warning:hover { transform: translateY(-1px) !important; }

/* ============================================================
   FORMS
   ============================================================ */
.form-control, .form-select {
    border-radius: var(--adm-radius-sm) !important;
    border: 1.5px solid var(--adm-border) !important;
    font-size: 0.875rem !important;
    transition: var(--adm-transition) !important;
    background: var(--adm-surface) !important;
}
.form-control:focus, .form-select:focus {
    border-color: var(--adm-primary) !important;
    box-shadow: 0 0 0 3.5px rgba(13,71,161,0.1) !important;
    outline: none !important;
}
.form-label { font-weight: 600 !important; font-size: 0.82rem !important; color: var(--adm-text) !important; }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
    font-weight: 600 !important;
    letter-spacing: 0.2px;
    border-radius: 6px !important;
}

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
    border-radius: var(--adm-radius-md) !important;
    border: none !important;
    border-left: 4px solid !important;
    font-size: 0.88rem;
    animation: slideDown 0.35s ease both;
}
.alert-success { border-left-color: var(--adm-success) !important; background: #f0fdf4 !important; color: #15803d !important; }
.alert-danger  { border-left-color: var(--adm-danger)  !important; background: #fef2f2 !important; color: #b91c1c !important; }
.alert-warning { border-left-color: var(--adm-warning) !important; background: #fffbeb !important; color: #b45309 !important; }
.alert-info    { border-left-color: var(--adm-info)    !important; background: #eff6ff !important; color: #1d4ed8 !important; }

/* ============================================================
   MODALS
   ============================================================ */
.modal-content {
    border: none !important;
    border-radius: var(--adm-radius-lg) !important;
    box-shadow: var(--adm-shadow-lg) !important;
    overflow: hidden;
}
.modal-header {
    border-bottom: 1px solid var(--adm-border) !important;
    padding: 1.2rem 1.5rem !important;
}
.modal-footer {
    border-top: 1px solid var(--adm-border) !important;
    padding: 1rem 1.5rem !important;
}

/* ============================================================
   FILTER CARD
   ============================================================ */
.filter-card {
    border-radius: var(--adm-radius-md) !important;
    background: var(--adm-surface) !important;
    border: 1px solid var(--adm-border) !important;
    box-shadow: var(--adm-shadow-xs) !important;
    margin-bottom: 1.5rem;
    animation: slideDown 0.4s ease both;
    animation-delay: 0.05s;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-16px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes progressGrow {
    from { width: 0; }
}

.animate-slide-down { animation: slideDown 0.4s cubic-bezier(0.4,0,0.2,1) both; }
.animate-slide-up   { animation: slideUp 0.4s cubic-bezier(0.4,0,0.2,1) both; }
.animate-fade-in    { animation: fadeIn 0.4s ease both; }
.animate-scale-in   { animation: scaleIn 0.35s ease both; }

/* Stagger delays for list items */
.animate-stagger > *:nth-child(1) { animation-delay: 0.00s; }
.animate-stagger > *:nth-child(2) { animation-delay: 0.05s; }
.animate-stagger > *:nth-child(3) { animation-delay: 0.10s; }
.animate-stagger > *:nth-child(4) { animation-delay: 0.15s; }
.animate-stagger > *:nth-child(5) { animation-delay: 0.20s; }
.animate-stagger > *:nth-child(6) { animation-delay: 0.25s; }

/* Table row animation */
.table-admin tbody tr {
    animation: slideUp 0.3s ease both;
}

/* Loading shimmer skeleton */
.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: var(--adm-radius-sm);
}

/* ============================================================
   ADMIN ENTRANCE ANIMATIONS
   ============================================================ */

/* Topbar entrance */
.admin-topbar {
    animation: slideDown 0.5s cubic-bezier(0.4,0,0.2,1) both;
}

/* Stat cards stagger entrance (dashboard) */
.admin-main > .row:first-of-type > [class*="col"]:nth-child(1) { animation: slideUp 0.4s cubic-bezier(0.4,0,0.2,1) 0.08s both; }
.admin-main > .row:first-of-type > [class*="col"]:nth-child(2) { animation: slideUp 0.4s cubic-bezier(0.4,0,0.2,1) 0.14s both; }
.admin-main > .row:first-of-type > [class*="col"]:nth-child(3) { animation: slideUp 0.4s cubic-bezier(0.4,0,0.2,1) 0.20s both; }
.admin-main > .row:first-of-type > [class*="col"]:nth-child(4) { animation: slideUp 0.4s cubic-bezier(0.4,0,0.2,1) 0.26s both; }
.admin-main > .row:first-of-type > [class*="col"]:nth-child(5) { animation: slideUp 0.4s cubic-bezier(0.4,0,0.2,1) 0.32s both; }
.admin-main > .row:first-of-type > [class*="col"]:nth-child(6) { animation: slideUp 0.4s cubic-bezier(0.4,0,0.2,1) 0.38s both; }

/* Chart/info card row stagger */
.admin-main > .row:nth-of-type(2) > [class*="col"]:nth-child(1) { animation: fadeIn 0.5s ease 0.2s both; }
.admin-main > .row:nth-of-type(2) > [class*="col"]:nth-child(2) { animation: fadeIn 0.5s ease 0.3s both; }
.admin-main > .row:nth-of-type(2) > [class*="col"]:nth-child(3) { animation: fadeIn 0.5s ease 0.4s both; }

/* Table card, stat cards, and other generic cards entrance */
.admin-main .card, .admin-main .stat-card {
    animation: slideUp 0.5s cubic-bezier(0.4,0,0.2,1) 0.15s both;
}

/* Stagger delays for cards that are direct siblings, like in a grid */
.admin-main .row > [class*="col"]:nth-child(1) .card, .admin-main .row > [class*="col"]:nth-child(1) .stat-card { animation-delay: 0.1s; }
.admin-main .row > [class*="col"]:nth-child(2) .card, .admin-main .row > [class*="col"]:nth-child(2) .stat-card { animation-delay: 0.15s; }
.admin-main .row > [class*="col"]:nth-child(3) .card, .admin-main .row > [class*="col"]:nth-child(3) .stat-card { animation-delay: 0.2s; }
.admin-main .row > [class*="col"]:nth-child(4) .card, .admin-main .row > [class*="col"]:nth-child(4) .stat-card { animation-delay: 0.25s; }
.admin-main .row > [class*="col"]:nth-child(5) .card, .admin-main .row > [class*="col"]:nth-child(5) .stat-card { animation-delay: 0.3s; }
.admin-main .row > [class*="col"]:nth-child(6) .card, .admin-main .row > [class*="col"]:nth-child(6) .stat-card { animation-delay: 0.35s; }

/* Filter card entrance */
.admin-main .card.filter-card, .admin-main .card.mb-4 {
    animation: slideDown 0.4s cubic-bezier(0.4,0,0.2,1) 0.1s both;
}

/* Alert entrance */
.admin-main > .alert {
    animation: slideInRight 0.4s cubic-bezier(0.4,0,0.2,1) both;
}

/* Progress bar grow animation */
.progress-bar {
    animation: progressGrow 0.8s cubic-bezier(0.4,0,0.2,1) 0.5s both;
}

/* Modal entrance */
.modal.show .modal-content {
    animation: scaleIn 0.3s cubic-bezier(0.4,0,0.2,1) both;
}


/* ============================================================
   RESPONSIVE — TABLET (max 992px)
   ============================================================ */
@media (max-width: 992px) {
    .mobile-header { display: flex; }
    .admin-sidebar {
        transform: translateX(-100%);
        box-shadow: none;
    }
    .admin-sidebar.open {
        transform: translateX(0);
        box-shadow: 6px 0 30px rgba(0,0,0,0.25);
    }
    .admin-main {
        margin-left: 0 !important;
        padding: calc(65px + 1.25rem) 1.25rem 1.25rem 1.25rem !important;
    }
}

/* ============================================================
   RESPONSIVE — MOBILE (max 576px)
   ============================================================ */
@media (max-width: 576px) {
    .admin-main { padding: calc(65px + 1rem) 1rem 1rem 1rem !important; }
    .admin-topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 1rem 1.2rem;
        border-radius: var(--adm-radius-md);
    }
    .admin-topbar > div:last-child {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .admin-topbar > div:last-child .btn,
    .admin-topbar > div:last-child a.btn {
        flex: 1 1 auto;
        text-align: center;
        justify-content: center;
        font-size: 0.8rem !important;
        padding: 0.5rem 0.75rem !important;
    }
    .table-admin th, .table-admin td {
        font-size: 0.78rem;
        padding: 0.65rem 0.6rem;
    }
    .card { border-radius: var(--adm-radius-sm) !important; }
}

/* ============================================================
   MISC UTILITIES
   ============================================================ */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Scroll-to-top button */
#scrollTopBtn {
    position: fixed;
    bottom: 1.5rem; right: 1.5rem;
    width: 42px; height: 42px;
    background: var(--adm-primary);
    color: #fff;
    border: none; border-radius: 50%;
    display: none; align-items: center; justify-content: center;
    font-size: 1.1rem; cursor: pointer;
    box-shadow: var(--adm-shadow-md);
    transition: var(--adm-transition);
    z-index: 500;
}
#scrollTopBtn:hover { background: var(--adm-primary-dark); transform: translateY(-3px); }
#scrollTopBtn.show { display: flex; animation: scaleIn 0.25s ease; }
