/* ═══════════════════════════════════════════════
   Premium Payment Gateway UI — v3
   Dark Sidebar · Glassmorphism Header · Animations
   ═══════════════════════════════════════════════ */

:root {
    --primary:        #6366f1;
    --primary-dark:   #4f46e5;
    --primary-light:  #eef2ff;
    --primary-glow:   rgba(99,102,241,0.18);
    --success:        #10b981;
    --success-light:  #d1fae5;
    --error:          #ef4444;
    --error-light:    #fee2e2;
    --warning:        #f59e0b;
    --warning-light:  #fef3c7;
    --info:           #06b6d4;
    --info-light:     #cffafe;

    /* Sidebar */
    --sidebar-bg:           #ffffff;
    --sidebar-border:       rgba(0,0,0,0.07);
    --sidebar-text:         #64748b;
    --sidebar-text-hover:   #0f172a;
    --sidebar-active-bg:    rgba(99,102,241,0.10);
    --sidebar-active-text:  #4f46e5;
    --sidebar-section-title:#94a3b8;

    --gray-900: #0f172a;
    --gray-800: #1e293b;
    --gray-700: #334155;
    --gray-600: #475569;
    --gray-500: #64748b;
    --gray-400: #94a3b8;
    --gray-300: #cbd5e1;
    --gray-200: #e2e8f0;
    --gray-100: #f1f5f9;
    --gray-50:  #f8fafc;
    --white:    #ffffff;

    --sidebar-width:    260px;
    --header-height:    62px;
    --border-radius:    10px;
    --border-radius-sm: 6px;
    --border-radius-lg: 14px;

    --shadow-sm:      0 1px 3px rgba(0,0,0,0.06);
    --shadow:         0 2px 8px rgba(0,0,0,0.08);
    --shadow-md:      0 4px 16px rgba(0,0,0,0.10);
    --shadow-lg:      0 16px 40px rgba(0,0,0,0.14);
    --shadow-colored: 0 8px 24px rgba(99,102,241,0.28);

    /* Animations */
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ── Base ── */
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.55;
    color: var(--gray-700);
    background: #f0f4f8;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    max-width: 100vw;
}
a { color: var(--primary); text-decoration: none; transition: color 0.18s; }
a:hover { color: var(--primary-dark); }

/* ── Page entry animation ── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-16px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%       { transform: scale(1.4); opacity: 0.7; }
}
@keyframes shimmer {
    0%   { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

/* ── Layout ── */
.app-container {
    min-height: 100vh;
    display: flex;
    width: 100%;
    box-sizing: border-box;
    background: #f0f4f8;
}

/* ════════════════════════════════
   SIDEBAR
   ════════════════════════════════ */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 300;
    display: flex;
    flex-direction: column;
    transition: transform 0.32s var(--ease-out), box-shadow 0.32s;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.1) transparent;
}
.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 4px; }

/* Sidebar Header */
.sidebar-header {
    padding: 0;
    border-bottom: 1px solid var(--sidebar-border);
    flex-shrink: 0;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 50%, #7c3aed 100%);
    overflow: hidden;
    position: relative;
}
.sidebar-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(255,255,255,0.15) 0%, transparent 60%);
    pointer-events: none;
}
.sidebar-logo-link {
    display: block;
    width: 100%;
    text-decoration: none;
    transition: opacity 0.2s;
    position: relative;
    z-index: 1;
}
.sidebar-logo-link:hover { opacity: 0.85; }
.sidebar-header img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}
.sidebar-header h1 {
    font-size: 16px; font-weight: 700;
    color: #0f172a; letter-spacing: -0.3px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-header span {
    font-size: 10.5px; color: var(--sidebar-section-title);
    display: block; margin-top: 1px; font-weight: 500; letter-spacing: 0.3px;
}

/* Sidebar Nav */
.sidebar-nav { padding: 12px 8px; flex: 1; }

.nav-section { margin-bottom: 4px; }
.nav-section + .nav-section { margin-top: 4px; }

.nav-section-title {
    font-size: 10px; font-weight: 700;
    color: var(--sidebar-section-title);
    text-transform: uppercase; letter-spacing: 1px;
    padding: 12px 12px 5px; display: block;
}

.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--sidebar-text);
    font-weight: 500; font-size: 13.5px;
    transition: background 0.16s, color 0.16s, transform 0.16s;
    position: relative;
    cursor: pointer;
    user-select: none;
}
.nav-item:hover {
    background: rgba(255,255,255,0.07);
    color: var(--sidebar-text-hover);
    transform: translateX(2px);
}
.nav-item.active {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-active-text);
    font-weight: 600;
}
.nav-item.active::before {
    content: '';
    position: absolute; left: 0; top: 18%; bottom: 18%;
    width: 3px; border-radius: 0 3px 3px 0;
    background: linear-gradient(to bottom, var(--primary), #818cf8);
}
.nav-item.active .nav-icon { filter: drop-shadow(0 0 6px rgba(99,102,241,0.5)); }

.nav-icon {
    width: 20px; height: 20px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; opacity: 0.75;
    transition: opacity 0.16s;
}
.nav-item:hover .nav-icon, .nav-item.active .nav-icon { opacity: 1; }

/* ════════════════════════════════
   MAIN CONTENT
   ════════════════════════════════ */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    max-width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    background: #f0f4f8;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* ════════════════════════════════
   HEADER (TOP BAR)
   ════════════════════════════════ */
.header {
    height: var(--header-height);
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid rgba(226,232,240,0.8);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px;
    position: sticky; top: 0; z-index: 200;
    box-shadow: 0 1px 0 rgba(0,0,0,0.05), 0 4px 16px rgba(0,0,0,0.04);
    animation: fadeIn 0.3s ease;
}
.header-left { display: flex; align-items: center; gap: 14px; }
.header-left h2 {
    font-size: 18px; font-weight: 700;
    color: var(--gray-900); letter-spacing: -0.4px;
    animation: slideInLeft 0.3s var(--ease-out);
}

/* ── Hamburger (mobile) ── */
.hamburger {
    display: none;
    flex-direction: column; justify-content: center; align-items: center;
    gap: 5px;
    width: 38px; height: 38px;
    cursor: pointer; border: none;
    background: var(--gray-100);
    padding: 8px; border-radius: 9px;
    transition: background 0.2s, transform 0.2s;
    flex-shrink: 0;
}
.hamburger:hover { background: var(--primary-light); transform: scale(1.05); }
.hamburger span {
    display: block; width: 18px; height: 2px;
    background: var(--gray-600); border-radius: 2px;
    transition: transform 0.3s var(--ease-out), opacity 0.2s, width 0.3s;
    transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Header Right ── */
.header-right { display: flex; align-items: center; gap: 10px; }

.notif-btn {
    width: 36px; height: 36px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    background: var(--gray-100); color: var(--gray-500);
    border: none; cursor: pointer; position: relative;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}
.notif-btn:hover { background: var(--primary-light); color: var(--primary); transform: scale(1.08); }
.notif-dot {
    position: absolute; top: 7px; right: 7px;
    width: 7px; height: 7px;
    background: var(--error); border-radius: 50%; border: 2px solid white;
    animation: pulse-dot 2s infinite;
}

.user-menu {
    display: flex; align-items: center; gap: 9px;
    padding: 5px 10px 5px 5px;
    border-radius: 10px; cursor: pointer;
    transition: background 0.18s, border-color 0.18s;
    border: 1px solid transparent;
}
.user-menu:hover { background: var(--gray-100); border-color: var(--gray-200); }
.user-avatar {
    width: 34px; height: 34px; border-radius: 9px;
    background: linear-gradient(135deg, var(--primary) 0%, #818cf8 100%);
    color: white; display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px; flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(99,102,241,0.4);
    transition: transform 0.2s;
}
.user-menu:hover .user-avatar { transform: scale(1.06); }
.user-info { text-align: left; }
.user-name { font-weight: 600; color: var(--gray-900); font-size: 13px; line-height: 1.2; }
.user-role { font-size: 11px; color: var(--gray-500); margin-top: 1px; }

/* ════════════════════════════════
   CONTENT AREA
   ════════════════════════════════ */
.content {
    padding: 24px;
    flex: 1;
    overflow-x: hidden;
    box-sizing: border-box;
    min-width: 0;
    animation: fadeInUp 0.28s var(--ease-out);
}
.page-header { margin-bottom: 22px; }
.page-header h1 {
    font-size: 22px; font-weight: 700;
    color: var(--gray-900); margin-bottom: 4px; letter-spacing: -0.4px;
}
.page-header p { color: var(--gray-500); font-size: 14px; }

/* ════════════════════════════════
   CARDS
   ════════════════════════════════ */
.card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow 0.22s, transform 0.22s;
}
.card:hover { box-shadow: var(--shadow); }
.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-100);
    display: flex; align-items: center; justify-content: space-between;
    background: var(--white);
}
.card-header h3 { font-size: 15px; font-weight: 600; color: var(--gray-900); }
.card-body { padding: 20px; }
.card-footer { padding: 14px 20px; border-top: 1px solid var(--gray-100); background: var(--gray-50); }

/* ════════════════════════════════
   STAT CARDS
   ════════════════════════════════ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--gray-200);
    padding: 20px 22px;
    display: flex; align-items: flex-start; gap: 16px;
    transition: box-shadow 0.22s, transform 0.22s;
    cursor: default;
    animation: fadeInUp 0.3s var(--ease-out) both;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-icon {
    width: 46px; height: 46px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; flex-shrink: 0;
    transition: transform 0.22s;
}
.stat-card:hover .stat-icon { transform: scale(1.1) rotate(-4deg); }
.stat-icon.blue   { background: #eef2ff; color: #6366f1; }
.stat-icon.green  { background: #d1fae5; color: #10b981; }
.stat-icon.red    { background: #fee2e2; color: #ef4444; }
.stat-icon.yellow { background: #fef3c7; color: #f59e0b; }
.stat-icon.cyan   { background: #cffafe; color: #06b6d4; }
.stat-icon.purple { background: #f3e8ff; color: #a855f7; }
.stat-content { flex: 1; min-width: 0; }
.stat-label { font-size: 12px; color: var(--gray-500); margin-bottom: 5px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.4px; }
.stat-value { font-size: 22px; font-weight: 700; color: var(--gray-900); letter-spacing: -0.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-change { font-size: 12px; margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.stat-change.up   { color: var(--success); }
.stat-change.down { color: var(--error); }

/* ════════════════════════════════
   TABLES
   ════════════════════════════════ */
.table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 12px 16px; text-align: left; }
.data-table th {
    background: var(--gray-50);
    font-size: 11.5px; font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase; letter-spacing: 0.6px;
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap;
}
.data-table td {
    border-bottom: 1px solid var(--gray-100);
    font-size: 13.5px; color: var(--gray-700);
    transition: background 0.12s;
}
.data-table tr:hover td { background: #fafbff; }
.data-table tr:last-child td { border-bottom: none; }

/* ════════════════════════════════
   BADGES
   ════════════════════════════════ */
.badge {
    display: inline-flex; align-items: center;
    padding: 3px 10px; border-radius: 9999px;
    font-size: 12px; font-weight: 600; letter-spacing: 0.1px;
    white-space: nowrap;
}
.badge-success  { background: #dcfce7; color: #16a34a; }
.badge-error    { background: var(--error-light); color: #dc2626; }
.badge-warning  { background: var(--warning-light); color: #d97706; }
.badge-info     { background: var(--info-light); color: #0891b2; }
.badge-secondary{ background: var(--gray-200); color: var(--gray-600); }
.badge-default  { background: var(--primary-light); color: var(--primary); }

/* ════════════════════════════════
   BUTTONS
   ════════════════════════════════ */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 7px; padding: 9px 16px;
    border-radius: var(--border-radius);
    font-size: 13.5px; font-weight: 500;
    cursor: pointer; transition: all 0.18s var(--ease-in-out);
    border: none; white-space: nowrap; user-select: none;
}
.btn:active { transform: scale(0.97); }
.btn-primary  { background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(99,102,241,0.28); }
.btn-primary:hover  { background: var(--primary-dark); box-shadow: 0 4px 16px rgba(99,102,241,0.38); transform: translateY(-1px); }
.btn-success  { background: var(--success); color: #fff; }
.btn-success:hover  { background: #059669; transform: translateY(-1px); }
.btn-danger   { background: var(--error); color: #fff; }
.btn-danger:hover   { background: #dc2626; transform: translateY(-1px); }
.btn-secondary{ background: var(--gray-200); color: var(--gray-700); }
.btn-secondary:hover{ background: var(--gray-300); }
.btn-outline  { background: transparent; border: 1.5px solid var(--gray-300); color: var(--gray-700); }
.btn-outline:hover  { background: var(--gray-100); border-color: var(--gray-400); }
.btn-sm  { padding: 6px 12px; font-size: 12.5px; }
.btn-lg  { padding: 12px 24px; font-size: 15px; }

/* ════════════════════════════════
   FORMS
   ════════════════════════════════ */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13.5px; font-weight: 500; color: var(--gray-700); margin-bottom: 6px; }
.form-label span.required { color: var(--error); }

.form-input, .form-select, .form-textarea {
    width: 100%; padding: 10px 13px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--border-radius);
    font-size: 14px; font-family: inherit;
    color: var(--gray-800); background: var(--white);
    transition: border-color 0.18s, box-shadow 0.18s;
    appearance: none; -webkit-appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
.form-input:disabled, .form-select:disabled { background: var(--gray-100); cursor: not-allowed; color: var(--gray-400); }
.form-textarea { min-height: 100px; resize: vertical; }
.form-hint  { font-size: 12px; color: var(--gray-400); margin-top: 5px; }
.form-error { font-size: 12px; color: var(--error); margin-top: 4px; }

/* ════════════════════════════════
   ALERTS
   ════════════════════════════════ */
.alert {
    padding: 13px 16px; border-radius: var(--border-radius);
    font-size: 13.5px; display: flex; align-items: flex-start; gap: 12px;
    animation: fadeInUp 0.25s var(--ease-out);
}
.alert svg { flex-shrink: 0; margin-top: 1px; }
.alert-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.alert-error   { background: #fff1f2; color: #b91c1c; border: 1px solid #fecdd3; }
.alert-warning { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.alert-info    { background: #f0f9ff; color: #0369a1; border: 1px solid #bae6fd; }

/* ════════════════════════════════
   PAGINATION
   ════════════════════════════════ */
.pagination { display: flex; align-items: center; gap: 4px; justify-content: center; }
.page-item {
    display: flex; align-items: center; justify-content: center;
    min-width: 34px; height: 34px; padding: 0 10px;
    border-radius: var(--border-radius);
    font-size: 13px; color: var(--gray-600);
    background: var(--white); border: 1px solid var(--gray-200);
    cursor: pointer; transition: all 0.18s; font-weight: 500;
}
.page-item:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.page-item.active { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 2px 8px rgba(99,102,241,0.3); }

/* ════════════════════════════════
   MODAL
   ════════════════════════════════ */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(15,23,42,0.55);
    backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000; opacity: 0; visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal {
    background: var(--white); border-radius: var(--border-radius-lg);
    width: calc(100% - 32px); max-width: 520px; max-height: 90vh;
    overflow-y: auto; box-shadow: var(--shadow-lg);
    transform: translateY(20px) scale(0.96);
    transition: transform 0.3s var(--ease-out);
}
.modal-overlay.active .modal { transform: translateY(0) scale(1); }
.modal-header { padding: 20px; border-bottom: 1px solid var(--gray-200); display: flex; align-items: center; justify-content: space-between; }
.modal-header h3 { font-size: 17px; font-weight: 600; }
.modal-close { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--gray-400); transition: all 0.18s; background: transparent; border: none; }
.modal-close:hover { background: var(--gray-100); color: var(--gray-800); }
.modal-body { padding: 20px; }
.modal-footer { padding: 16px 20px; border-top: 1px solid var(--gray-200); display: flex; justify-content: flex-end; gap: 12px; }

/* ════════════════════════════════
   GRID / TABS / SEARCH
   ════════════════════════════════ */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.tabs { display: flex; gap: 2px; border-bottom: 2px solid var(--gray-200); margin-bottom: 20px; }
.tab { padding: 11px 16px; font-size: 13.5px; font-weight: 500; color: var(--gray-500); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.18s; }
.tab:hover { color: var(--gray-700); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.search-filter { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.search-box { position: relative; flex: 1; min-width: 200px; }
.search-box input { width: 100%; padding: 9px 12px 9px 38px; border: 1.5px solid var(--gray-200); border-radius: var(--border-radius); font-size: 13.5px; transition: border-color 0.18s; background: var(--white); }
.search-box input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }
.search-box svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--gray-400); pointer-events: none; }

/* ════════════════════════════════
   EMPTY STATE
   ════════════════════════════════ */
.empty-state { text-align: center; padding: 56px 20px; }
.empty-icon { width: 64px; height: 64px; margin: 0 auto 16px; background: var(--gray-100); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--gray-300); }
.empty-title { font-size: 17px; font-weight: 600; color: var(--gray-800); margin-bottom: 6px; }
.empty-text { color: var(--gray-400); max-width: 280px; margin: 0 auto; font-size: 13.5px; }

/* ════════════════════════════════
   SIDEBAR OVERLAY
   ════════════════════════════════ */
.sidebar-overlay {
    position: fixed; inset: 0;
    background: rgba(11,17,32,0.6);
    backdrop-filter: blur(3px);
    z-index: 299;
    opacity: 0; visibility: hidden;
    transition: opacity 0.32s var(--ease-out), visibility 0.32s;
}
.sidebar-overlay.active { opacity: 1; visibility: visible; }

/* ════════════════════════════════
   RESPONSIVE
   ════════════════════════════════ */

/* Tablet & below — hide sidebar, show hamburger */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: none;
        z-index: 300;
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 24px 0 80px rgba(0,0,0,0.35);
    }
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .hamburger { display: flex !important; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile */
@media (max-width: 768px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .search-filter { flex-direction: column; }
    .header { padding: 0 14px; }
    .content { padding: 14px; }
    .user-info { display: none; }
    .data-table th, .data-table td { padding: 8px 10px; font-size: 12px; white-space: nowrap; }
    .card-body { padding: 14px; }
    .card-header { padding: 12px 14px; }
    .table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg); }
    .modal { width: calc(100% - 16px); max-height: 95vh; }
    .modal-body, .modal-footer { padding: 16px; }
    .btn { padding: 8px 14px; font-size: 13px; }
    .pagination { flex-wrap: wrap; }
    .tabs { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
    .tab { white-space: nowrap; }
}

/* Small mobile */
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .header-right .btn { display: none; }
    .header-left h2 { font-size: 15px; }
    .content { padding: 10px; }
    .stat-value { font-size: 18px; }
    .stat-card { padding: 14px 16px; gap: 12px; }
    .stat-icon { width: 38px; height: 38px; font-size: 17px; }
    .card-body { padding: 12px; }
    .card-header { padding: 11px 12px; }
    .card-header h3 { font-size: 13.5px; }
    .data-table th, .data-table td { padding: 7px 8px; font-size: 11.5px; }
    .btn-sm { padding: 5px 10px; font-size: 11.5px; }
    .search-box input { font-size: 13px; }
    .modal { max-height: 98vh; }
}
