/* ===== VARIABLES ===== */
:root {
    --bg-primary:    #0d1117;
    --bg-secondary:  #161b22;
    --bg-card:       #1c2128;
    --bg-hover:      #21262d;
    --border:        #30363d;
    --border-light:  #21262d;
    --text-primary:  #e6edf3;
    --text-secondary:#8b949e;
    --text-muted:    #6e7681;
    --blue:          #1f6feb;
    --blue-light:    #388bfd;
    --blue-bg:       #1c2f4a;
    --green:         #3fb950;
    --green-bg:      #1a3828;
    --red:           #f85149;
    --red-bg:        #3d1f1e;
    --orange:        #e3b341;
    --orange-bg:     #3d2e0e;
    --purple:        #bc8cff;
    --purple-bg:     #2d1f4e;
    --sidebar-w:     240px;
    --topbar-h:      56px;
    --radius:        8px;
    --radius-sm:     6px;
    --shadow:        0 4px 24px rgba(0,0,0,0.4);
    --transition:    0.15s ease;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--blue-light); text-decoration: none; }
a:hover { text-decoration: underline; }
code {
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
    background: var(--bg-secondary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
    color: var(--text-primary);
}

/* ===== AUTH ===== */
.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-primary);
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(31,111,235,0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(63,185,80,0.06) 0%, transparent 40%);
}

.auth-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow);
}

.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.logo-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--blue), #0070f3);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 16px;
    color: #fff;
    box-shadow: 0 8px 24px rgba(31,111,235,0.4);
}

.auth-logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.auth-logo p {
    color: var(--text-secondary);
    margin-top: 6px;
    font-size: 0.9rem;
}

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

.auth-form label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    padding: 10px 42px 10px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: 'Cascadia Code', monospace;
    transition: border-color var(--transition);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(31,111,235,0.2);
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    transition: color var(--transition);
}

.toggle-password:hover { color: var(--text-primary); }

.auth-form small { color: var(--text-secondary); display: block; margin-top: 6px; }
.auth-form small a { color: var(--blue-light); }

.auth-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===== APP LAYOUT ===== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-w);
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    transition: transform var(--transition);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    height: var(--topbar-h);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
}

.sidebar-logo i {
    font-size: 1.3rem;
    color: var(--blue-light);
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: none;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
}

.nav-section {
    padding: 8px 12px 4px;
}

.nav-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 6px 8px;
    display: block;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: background var(--transition), color var(--transition);
    text-decoration: none;
    margin-bottom: 2px;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    text-decoration: none;
}

.nav-item.active {
    background: var(--blue-bg);
    color: var(--blue-light);
}

.nav-item i { width: 16px; text-align: center; flex-shrink: 0; }

.sidebar-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    border-top: 1px solid var(--border);
}

.user-avatar {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.user-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }

.user-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-logout {
    color: var(--text-muted);
    padding: 6px;
    border-radius: 6px;
    transition: color var(--transition), background var(--transition);
    flex-shrink: 0;
}

.btn-logout:hover {
    color: var(--red);
    background: var(--red-bg);
    text-decoration: none;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ===== TOPBAR ===== */
.topbar {
    height: var(--topbar-h);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-left { display: flex; align-items: center; gap: 12px; }

.mobile-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: none;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.breadcrumb a { color: var(--text-muted); transition: color var(--transition); }
.breadcrumb a:hover { color: var(--text-primary); text-decoration: none; }
.breadcrumb i { font-size: 0.65rem; }
.breadcrumb span { color: var(--text-primary); font-weight: 500; }

.status-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(63,185,80,0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(63,185,80,0.2); }
    50%       { box-shadow: 0 0 0 6px rgba(63,185,80,0.05); }
}

/* ===== PAGE CONTENT ===== */
.page-content {
    padding: 24px;
    flex: 1;
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
}

.page-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-header p { color: var(--text-secondary); margin-top: 4px; font-size: 0.875rem; }

/* ===== CARDS ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

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

.card-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-body { padding: 20px; }
.card-body.p-0 { padding: 0; }

/* ===== STATS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: border-color var(--transition), transform var(--transition);
}

.stat-card:hover { border-color: var(--blue); transform: translateY(-2px); }

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.stat-icon.blue   { background: var(--blue-bg);   color: var(--blue-light); }
.stat-icon.green  { background: var(--green-bg);  color: var(--green); }
.stat-icon.red    { background: var(--red-bg);    color: var(--red); }
.stat-icon.purple { background: var(--purple-bg); color: var(--purple); }

.stat-info { display: flex; flex-direction: column; }
.stat-value { font-size: 1.8rem; font-weight: 700; line-height: 1.2; }
.stat-label { color: var(--text-muted); font-size: 0.8rem; margin-top: 2px; }

/* ===== TABLE ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table thead tr {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.data-table th {
    padding: 10px 16px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    vertical-align: middle;
}

.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--bg-hover); }

.fw-name {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    font-weight: 500;
    text-decoration: none;
}

.fw-name:hover { color: var(--blue-light); text-decoration: none; }
.fw-name i { color: var(--blue-light); }

/* ===== BADGES ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-success  { background: var(--green-bg);  color: var(--green); }
.badge-danger   { background: var(--red-bg);    color: var(--red); }
.badge-warning  { background: var(--orange-bg); color: var(--orange); }
.badge-secondary { background: var(--bg-secondary); color: var(--text-muted); }

.proto-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: monospace;
}
.proto-badge.tcp  { background: var(--blue-bg);   color: var(--blue-light); }
.proto-badge.udp  { background: var(--orange-bg); color: var(--orange); }
.proto-badge.icmp { background: var(--purple-bg); color: var(--purple); }

.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.count-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.rule-count {
    font-size: 0.8rem;
    font-weight: 500;
}
.rule-count.green { color: var(--green); }
.rule-count.blue  { color: var(--blue-light); }

.region-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.ip-code {
    font-size: 0.8rem;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
    font-family: inherit;
}

.btn:hover { text-decoration: none; }

.btn-primary {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}
.btn-primary:hover { background: #1a5fcc; border-color: #1a5fcc; color: #fff; }

.btn-secondary {
    background: var(--bg-secondary);
    border-color: var(--border);
    color: var(--text-primary);
}
.btn-secondary:hover { background: var(--bg-hover); border-color: var(--text-muted); }

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

.btn-danger {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}
.btn-danger:hover { background: #d93f37; border-color: #d93f37; }

.btn-danger-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--text-muted);
}
.btn-danger-ghost:hover { background: var(--red-bg); color: var(--red); }

.btn-sm { padding: 5px 10px; font-size: 0.8rem; }
.btn-full { width: 100%; justify-content: center; }

.btn-group { display: flex; gap: 8px; }

.action-btns { display: flex; gap: 4px; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 16px; }

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

.form-control {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: inherit;
    transition: border-color var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(31,111,235,0.15);
}

select.form-control { cursor: pointer; }

textarea.form-control { resize: vertical; line-height: 1.5; }

.form-group small { color: var(--text-muted); font-size: 0.78rem; margin-top: 4px; display: block; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.required { color: var(--red); }

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}
.empty-state.small { padding: 32px 16px; }
.empty-state i { font-size: 2.5rem; margin-bottom: 12px; display: block; opacity: 0.4; }
.empty-state h4 { font-size: 1rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; }
.empty-state p { font-size: 0.875rem; }

/* ===== SEARCH ===== */
.search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    max-width: 280px;
}

.search-bar i { color: var(--text-muted); font-size: 0.85rem; }

.search-bar input {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 0.875rem;
    outline: none;
    width: 200px;
}

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

/* ===== ALERT ===== */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    margin-bottom: 20px;
}

.alert-error {
    background: var(--red-bg);
    border: 1px solid rgba(248,81,73,0.3);
    color: var(--red);
}

/* ===== DETAIL ===== */
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }

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

.info-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-light);
}
.info-item:last-child { border-bottom: none; }

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

.status-dot-lg {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}
.status-dot-lg.success { background: var(--green); }
.status-dot-lg.danger  { background: var(--red); }
.status-dot-lg.warning { background: var(--orange); }

/* ===== DROPLET CHIPS ===== */
.droplet-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.droplet-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.droplet-chip i { color: var(--blue-light); }

.droplet-chip button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0 2px;
    line-height: 1;
    transition: color var(--transition);
}

.droplet-chip button:hover { color: var(--red); }

/* ===== DROPLET LIST (create/edit) ===== */
.droplet-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 320px;
    overflow-y: auto;
}

.droplet-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition);
}
.droplet-checkbox:hover { background: var(--bg-hover); }
.droplet-checkbox input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--blue); cursor: pointer; }

.droplet-info { display: flex; flex-direction: column; }
.droplet-name { font-size: 0.875rem; font-weight: 500; color: var(--text-primary); }
.droplet-meta { font-size: 0.75rem; color: var(--text-muted); }

.droplet-row-name { display: flex; align-items: center; gap: 10px; }
.droplet-icon-sm {
    width: 32px;
    height: 32px;
    background: var(--blue-bg);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue-light);
    font-size: 0.85rem;
    flex-shrink: 0;
}
.fw-name-text { font-weight: 500; }

/* ===== CREATE LAYOUT ===== */
.create-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    align-items: start;
}

.create-main { display: flex; flex-direction: column; gap: 0; }
.create-sidebar { display: flex; flex-direction: column; gap: 0; }

.rules-table .form-control { font-size: 0.82rem; }
.rules-table td { padding: 8px 12px; }

/* ===== TOAST ===== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    font-size: 0.875rem;
    color: var(--text-primary);
    min-width: 280px;
    max-width: 380px;
    animation: slideUp 0.2s ease;
    border-left: 3px solid transparent;
}

.toast.success { border-left-color: var(--green); }
.toast.error   { border-left-color: var(--red); }
.toast.info    { border-left-color: var(--blue-light); }

.toast-icon { font-size: 1rem; flex-shrink: 0; }
.toast.success .toast-icon { color: var(--green); }
.toast.error   .toast-icon { color: var(--red); }
.toast.info    .toast-icon { color: var(--blue-light); }

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

/* ===== MODAL ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 200;
    backdrop-filter: blur(4px);
}

.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 201;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    width: 90%;
    max-width: 480px;
    box-shadow: var(--shadow);
    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from { transform: translate(-50%, -48%); opacity: 0; }
    to   { transform: translate(-50%, -50%); opacity: 1; }
}

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

.modal-header h3 { font-size: 1rem; font-weight: 600; }

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color var(--transition);
}
.modal-close:hover { color: var(--text-primary); }

.modal-body  { padding: 20px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); }

/* ===== UTILITY ===== */
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.text-muted { color: var(--text-muted); }
.text-green { color: var(--green); }
.text-blue  { color: var(--blue-light); }
.small { font-size: 0.8rem; }

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

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .create-layout { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow);
    }
    .main-content { margin-left: 0; }
    .mobile-toggle { display: flex; }
    .sidebar-toggle { display: flex; }
    .page-header { flex-direction: column; gap: 12px; align-items: flex-start; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .form-row { grid-template-columns: 1fr; }
    .data-table { font-size: 0.8rem; }
    .data-table th, .data-table td { padding: 10px 12px; }
    .page-content { padding: 16px; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .auth-card { padding: 28px 20px; }
}
