/* ═══════════════════════════════════════════
   ESG VPN Panel — Premium Dark Theme CSS
   ═══════════════════════════════════════════ */

:root {
    /* Color Palette */
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: #1a1f35;
    --bg-card-hover: #1f2544;
    --bg-input: #151b2e;
    --bg-sidebar: #0d1221;

    --accent-primary: #6366f1;
    --accent-primary-light: #818cf8;
    --accent-primary-dark: #4f46e5;
    --accent-glow: rgba(99, 102, 241, 0.15);
    --accent-glow-strong: rgba(99, 102, 241, 0.3);

    --accent-green: #10b981;
    --accent-green-bg: rgba(16, 185, 129, 0.1);
    --accent-red: #ef4444;
    --accent-red-bg: rgba(239, 68, 68, 0.1);
    --accent-yellow: #f59e0b;
    --accent-yellow-bg: rgba(245, 158, 11, 0.1);
    --accent-blue: #3b82f6;
    --accent-blue-bg: rgba(59, 130, 246, 0.1);
    --accent-cyan: #06b6d4;
    --accent-purple: #a855f7;

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --border-color: rgba(99, 102, 241, 0.12);
    --border-light: rgba(255, 255, 255, 0.06);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px var(--accent-glow);

    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --header-height: 64px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Vazirmatn', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* ═══════════════════════════════════════════
   LOGIN SCREEN
   ═══════════════════════════════════════════ */

.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.login-screen::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 80%, rgba(168, 85, 247, 0.06) 0%, transparent 50%);
    animation: aurora 20s ease-in-out infinite;
}

@keyframes aurora {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -20px) rotate(1deg); }
    66% { transform: translate(-20px, 30px) rotate(-1deg); }
}

.login-card {
    position: relative;
    background: linear-gradient(135deg, rgba(26, 31, 53, 0.9), rgba(17, 24, 39, 0.95));
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg), 0 0 60px rgba(99, 102, 241, 0.05);
    animation: cardEnter 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes cardEnter {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-logo {
    text-align: center;
    margin-bottom: 36px;
}

.logo-shield {
    font-size: 48px;
    margin-bottom: 16px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.login-logo h1 {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-primary-light), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.login-logo p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ─── Forms ─── */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    right: 14px;
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
    transition: var(--transition-fast);
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    padding-right: 44px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

input:focus ~ .input-icon,
input:focus + .input-icon {
    color: var(--accent-primary-light);
}

input::placeholder {
    color: var(--text-muted);
}

textarea {
    padding-right: 14px;
    resize: vertical;
    min-height: 80px;
}

select {
    padding-right: 14px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 14px center;
}

.error-msg {
    background: var(--accent-red-bg);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: 16px;
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ─── Buttons ─── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    text-decoration: none;
}

.btn svg {
    width: 16px;
    height: 16px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-primary:active { transform: translateY(0); }

.btn-success {
    background: linear-gradient(135deg, var(--accent-green), #059669);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--accent-red), #dc2626);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, var(--accent-yellow), #d97706);
    color: white;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-ghost:hover {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--accent-primary);
}

.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-xs { padding: 4px 8px; font-size: 0.75rem; }
.btn-full { width: 100%; }

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ─── Badge ─── */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-green { background: var(--accent-green-bg); color: var(--accent-green); }
.badge-red { background: var(--accent-red-bg); color: var(--accent-red); }
.badge-yellow { background: var(--accent-yellow-bg); color: var(--accent-yellow); }
.badge-blue { background: var(--accent-blue-bg); color: var(--accent-blue); }

/* ═══════════════════════════════════════════
   MAIN LAYOUT
   ═══════════════════════════════════════════ */

.main-panel {
    display: flex;
    min-height: 100vh;
}

/* ─── Sidebar ─── */

.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--bg-sidebar);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-logo {
    font-size: 28px;
    flex-shrink: 0;
}

.sidebar-title {
    font-size: 1.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-primary-light), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    margin-right: auto;
}

.sidebar-toggle svg { width: 20px; height: 20px; }

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
}

.nav-item svg { width: 20px; height: 20px; flex-shrink: 0; }

.nav-item:hover {
    background: var(--accent-glow);
    color: var(--text-primary);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--accent-glow-strong), var(--accent-glow));
    color: var(--accent-primary-light);
    font-weight: 600;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--accent-primary);
    border-radius: 3px;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-light);
}

.sidebar-footer .btn {
    width: 100%;
    justify-content: flex-start;
}

/* ─── Content ─── */

.content {
    flex: 1;
    margin-right: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    background: rgba(10, 14, 26, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-right h2 {
    font-size: 1.2rem;
    font-weight: 700;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
}

.mobile-menu-btn svg { width: 24px; height: 24px; }

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-user {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 4px var(--accent-green); }
    50% { box-shadow: 0 0 12px var(--accent-green); }
}

.content-body {
    flex: 1;
    padding: 28px;
    overflow-y: auto;
}

/* ═══════════════════════════════════════════
   CARDS & GRID
   ═══════════════════════════════════════════ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-cyan));
    opacity: 0;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.stat-card:hover::after { opacity: 1; }

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.stat-card-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.stat-card-icon.purple { background: rgba(99, 102, 241, 0.15); }
.stat-card-icon.green { background: rgba(16, 185, 129, 0.15); }
.stat-card-icon.blue { background: rgba(59, 130, 246, 0.15); }
.stat-card-icon.yellow { background: rgba(245, 158, 11, 0.15); }
.stat-card-icon.red { background: rgba(239, 68, 68, 0.15); }
.stat-card-icon.cyan { background: rgba(6, 182, 212, 0.15); }

.stat-card-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 4px;
    font-family: 'Inter', sans-serif;
    direction: ltr;
    text-align: right;
}

.stat-card-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ─── Card Panel ─── */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
}

.card-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
}

.card-body {
    padding: 24px;
}

.card-body.no-padding { padding: 0; }

/* ═══════════════════════════════════════════
   TABLE
   ═══════════════════════════════════════════ */

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    padding: 14px 16px;
    text-align: right;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-light);
    white-space: nowrap;
}

tbody td {
    padding: 14px 16px;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

tbody tr {
    transition: var(--transition-fast);
}

tbody tr:hover {
    background: rgba(99, 102, 241, 0.04);
}

tbody tr:last-child td {
    border-bottom: none;
}

.cell-email {
    font-weight: 600;
    color: var(--accent-primary-light);
    font-family: 'Inter', monospace;
    direction: ltr;
    text-align: right;
}

.cell-traffic {
    font-family: 'Inter', sans-serif;
    direction: ltr;
    text-align: right;
    font-weight: 500;
}

.cell-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* ─── Progress Bar ─── */

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 6px;
}

.progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-fill.green { background: linear-gradient(90deg, var(--accent-green), #34d399); }
.progress-fill.yellow { background: linear-gradient(90deg, var(--accent-yellow), #fbbf24); }
.progress-fill.red { background: linear-gradient(90deg, var(--accent-red), #f87171); }

/* ═══════════════════════════════════════════
   FORM LAYOUTS
   ═══════════════════════════════════════════ */

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.form-grid .form-group input,
.form-grid .form-group select {
    padding-right: 14px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
}

/* ═══════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalEnter 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalEnter {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
}

.modal-header h3 { font-size: 1.05rem; }

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-fast);
    padding: 4px;
    line-height: 1;
}

.modal-close:hover { color: var(--accent-red); }

.modal-body {
    padding: 24px;
}

.modal-body .detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

.modal-body .detail-row:last-child { border-bottom: none; }

.detail-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.detail-value {
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    direction: ltr;
}

.copy-field {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-input);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    margin-top: 12px;
    direction: ltr;
}

.copy-field code {
    flex: 1;
    font-size: 0.8rem;
    word-break: break-all;
    color: var(--accent-cyan);
}

.copy-field button {
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════ */

.toast-container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    min-width: 280px;
    max-width: 420px;
    animation: toastIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
}

.toast.success { border-right: 3px solid var(--accent-green); }
.toast.error { border-right: 3px solid var(--accent-red); }
.toast.info { border-right: 3px solid var(--accent-blue); }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

.toast-out {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastOut {
    to { opacity: 0; transform: translateX(-30px); height: 0; padding: 0; margin: 0; }
}

/* ═══════════════════════════════════════════
   GAUGE CHART (for server stats)
   ═══════════════════════════════════════════ */

.gauge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.gauge-item {
    text-align: center;
}

.gauge-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 12px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gauge-circle svg {
    width: 120px;
    height: 120px;
    transform: rotate(-90deg);
}

.gauge-circle circle {
    fill: none;
    stroke-width: 6;
    stroke-linecap: round;
}

.gauge-bg { stroke: rgba(255, 255, 255, 0.06); }
.gauge-fg { transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1); }

.gauge-value {
    position: absolute;
    font-size: 1.4rem;
    font-weight: 800;
    font-family: 'Inter', sans-serif;
}

.gauge-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* ═══════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════ */

.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h4 {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* ─── Log entry ─── */
.log-entry {
    display: flex;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.85rem;
}

.log-time {
    color: var(--text-muted);
    font-family: 'Inter', monospace;
    white-space: nowrap;
    direction: ltr;
    font-size: 0.8rem;
    min-width: 140px;
}

.log-action {
    font-weight: 600;
    color: var(--accent-primary-light);
    min-width: 120px;
}

.log-target {
    color: var(--accent-cyan);
    font-family: 'Inter', monospace;
    direction: ltr;
}

.log-user {
    color: var(--text-secondary);
    margin-right: auto;
}

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

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(100%);
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
    }

    .sidebar-toggle { display: block; }
    .mobile-menu-btn { display: block; }

    .content {
        margin-right: 0;
    }

    .content-body {
        padding: 16px;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 12px;
    }

    .stat-card { padding: 16px; }
    .stat-card-value { font-size: 1.5rem; }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .login-card {
        margin: 16px;
        padding: 32px 24px;
    }

    .modal {
        margin: 16px;
    }
}
