/* ============================================
   CapyVikie Dashboard — Complete Design System
   10/10 Professional Design
   ============================================ */

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

/* ---- Design Tokens ---- */
:root {
    /* Backgrounds */
    --bg-base:        #080b14;
    --bg-deep:        #0a0e1a;
    --bg-surface:     #0f1420;
    --bg-elevated:    #141b2d;
    --bg-card:        rgba(17, 24, 39, 0.55);
    --bg-card-hover:  rgba(20, 28, 48, 0.75);
    --bg-input:       rgba(8, 12, 20, 0.6);
    --bg-sidebar:     rgba(10, 14, 26, 0.85);
    --bg-overlay:     rgba(8, 11, 20, 0.7);

    /* Borders */
    --border:         rgba(255, 255, 255, 0.07);
    --border-hover:   rgba(255, 255, 255, 0.14);
    --border-active:  rgba(99, 102, 241, 0.5);

    /* Text */
    --text:           #f1f5f9;
    --text-2:         #cbd5e1;
    --text-3:         #94a3b8;
    --text-4:         #64748b;
    --text-5:         #475569;

    /* Accents */
    --accent:         #6366f1;
    --accent-2:       #818cf8;
    --accent-hover:   #5558e3;
    --accent-glow:    rgba(99, 102, 241, 0.25);
    --accent-soft:    rgba(99, 102, 241, 0.12);

    /* Status colors */
    --success:        #22c55e;
    --success-soft:   rgba(34, 197, 94, 0.12);
    --warning:        #f59e0b;
    --warning-soft:   rgba(245, 158, 11, 0.12);
    --danger:         #ef4444;
    --danger-soft:    rgba(239, 68, 68, 0.12);
    --info:           #3b82f6;
    --info-soft:      rgba(59, 130, 246, 0.12);
    --neutral:        #64748b;
    --neutral-soft:   rgba(100, 116, 139, 0.12);

    /* Gradients */
    --gradient-1:     linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-2:     linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
    --gradient-hero:   linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.04) 100%);

    /* Shadows */
    --shadow-sm:      0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md:      0 4px 16px rgba(0, 0, 0, 0.25);
    --shadow-lg:      0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow:    0 0 24px var(--accent-glow);

    /* Radius */
    --r-sm:           8px;
    --r-md:           12px;
    --r-lg:           16px;
    --r-xl:           20px;
    --r-full:         9999px;

    /* Spacing */
    --space:          4px;

    /* Transitions */
    --t-fast:         0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --t-normal:       0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --t-slow:         0.4s cubic-bezier(0.4, 0, 0.2, 1);

    /* Layout */
    --sidebar-w:      260px;
    --topbar-h:       68px;
}

/* ---- Base ---- */
html, body {
    min-height: 100vh;
}

body {
    background: var(--bg-base);
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.08), transparent),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(139, 92, 246, 0.06), transparent);
    background-attachment: fixed;
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--r-full);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ---- Selection ---- */
::selection {
    background: var(--accent-soft);
    color: var(--accent-2);
}

/* ============================================
   LAYOUT — Wrapper, Sidebar, Main, Topbar
   ============================================ */

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

/* ---- Sidebar ---- */
.sidebar {
    width: var(--sidebar-w);
    background: var(--bg-sidebar);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border);
    padding: 24px 16px;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform var(--t-normal);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}

.sidebar-brand .logo {
    width: 38px;
    height: 38px;
    border-radius: var(--r-md);
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px var(--accent-glow);
}

.sidebar-brand h2 {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--text);
}

.sidebar-brand .subtitle {
    font-size: 11px;
    color: var(--text-4);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-section {
    margin-bottom: 8px;
}

.sidebar-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-5);
    padding: 0 14px;
    margin-bottom: 6px;
}

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

.sidebar nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar a.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    margin-bottom: 3px;
    border-radius: var(--r-md);
    color: var(--text-3);
    font-weight: 500;
    font-size: 14px;
    transition: all var(--t-fast);
    border: 1px solid transparent;
    position: relative;
}

.sidebar a.nav-link .icon {
    font-size: 17px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar a.nav-link:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    border-color: var(--border);
}

.sidebar a.nav-link.active {
    background: var(--accent-soft);
    color: var(--accent-2);
    border-color: rgba(99, 102, 241, 0.2);
}

.sidebar a.nav-link.active::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--accent);
    border-radius: var(--r-full);
    box-shadow: 0 0 8px var(--accent-glow);
}

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

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--r-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
}

.sidebar-user .avatar {
    width: 34px;
    height: 34px;
    border-radius: var(--r-full);
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.sidebar-user .info {
    min-width: 0;
    flex: 1;
}

.sidebar-user .info .name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user .info .role {
    font-size: 11px;
    color: var(--text-4);
}

/* ---- Main ---- */
.main {
    flex: 1;
    margin-left: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* ---- Topbar ---- */
.topbar {
    height: var(--topbar-h);
    background: rgba(10, 14, 26, 0.7);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 50;
}

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

.topbar-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

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

.topbar .userbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 6px;
    border-radius: var(--r-full);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
}

.topbar .userbox .avatar {
    width: 30px;
    height: 30px;
    border-radius: var(--r-full);
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}

.topbar .userbox strong {
    font-size: 13px;
    font-weight: 600;
}

/* ---- Content ---- */
.content {
    padding: 32px;
    flex: 1;
    animation: fadeIn var(--t-normal);
}

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

/* ============================================
   COMPONENTS
   ============================================ */

/* ---- Page Header ---- */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 28px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.page-header .subtitle {
    color: var(--text-3);
    font-size: 14px;
    margin-top: 4px;
}

/* ---- Hero Banner ---- */
.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    background: var(--gradient-hero), var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 28px 32px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--accent-glow), transparent 70%);
    pointer-events: none;
}

.hero h1 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
    position: relative;
}

.hero p {
    color: var(--text-3);
    font-size: 14px;
    position: relative;
}

.hero .btn {
    white-space: nowrap;
    position: relative;
}

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

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

.grid-cols-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

/* ---- Card ---- */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: all var(--t-normal);
    position: relative;
}

.card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card h1,
.card h2,
.card h3 {
    font-weight: 700;
    letter-spacing: -0.3px;
}

.card h1 { font-size: 22px; }
.card h2 { font-size: 18px; }
.card h3 { font-size: 15px; color: var(--text-3); font-weight: 600; }

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

.card-header h2 {
    margin: 0;
}

.card-body {
    padding: 0;
}

/* ---- Stat Card ---- */
.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: all var(--t-normal);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-1);
    opacity: 0;
    transition: opacity var(--t-normal);
}

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

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

.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--r-md);
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
}

.stat-card .stat-label {
    font-size: 13px;
    color: var(--text-3);
    font-weight: 500;
    margin-bottom: 4px;
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1;
    margin-bottom: 6px;
    background: linear-gradient(135deg, var(--text), var(--text-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card .stat-desc {
    font-size: 12px;
    color: var(--text-4);
}

.stat-card.success .stat-icon { background: var(--success-soft); }
.stat-card.warning .stat-icon { background: var(--warning-soft); }
.stat-card.danger .stat-icon { background: var(--danger-soft); }
.stat-card.info .stat-icon { background: var(--info-soft); }

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--r-md);
    background: var(--accent);
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    font-family: inherit;
    transition: all var(--t-fast);
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity var(--t-fast);
}

.btn:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 16px var(--accent-glow);
    transform: translateY(-1px);
}

.btn:hover::after {
    opacity: 1;
}

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

.btn-sm {
    padding: 7px 14px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 15px;
}

.btn-block {
    width: 100%;
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-2);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    box-shadow: none;
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-success:hover {
    background: #16a34a;
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.3);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background: #dc2626;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

.btn-warning {
    background: var(--warning);
    color: #1a1a1a;
}

.btn-warning:hover {
    background: #d97706;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---- Badge / Pill ---- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: var(--r-full);
    font-size: 12px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-3);
    border: 1px solid var(--border);
    white-space: nowrap;
}

.badge-success {
    background: var(--success-soft);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.2);
}

.badge-warning {
    background: var(--warning-soft);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.2);
}

.badge-danger {
    background: var(--danger-soft);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.2);
}

.badge-info {
    background: var(--info-soft);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.2);
}

.badge-accent {
    background: var(--accent-soft);
    color: var(--accent-2);
    border-color: rgba(99, 102, 241, 0.2);
}

/* ---- Status Dot ---- */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: var(--r-full);
    margin-right: 6px;
    vertical-align: middle;
}

.status-dot.online {
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
    animation: pulse 2s ease-in-out infinite;
}

.status-dot.offline {
    background: var(--danger);
}

.status-dot.unknown {
    background: var(--neutral);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ---- Inputs ---- */
.input,
.input-text,
.input-email,
.input-password,
.input-select,
.input-textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--r-md);
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: all var(--t-fast);
    margin-bottom: 14px;
}

.input:focus,
.input-text:focus,
.input-email:focus,
.input-password:focus,
.input-select:focus,
.input-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
    background: rgba(8, 12, 20, 0.8);
}

.input::placeholder,
.input-text::placeholder,
.input-email::placeholder,
.input-password::placeholder {
    color: var(--text-5);
}

select.input,
.input-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='1 1 6 6 11 1'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    cursor: pointer;
}

.input-textarea {
    resize: vertical;
    min-height: 80px;
}

.input-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: 6px;
}

.input-group {
    margin-bottom: 16px;
}

/* ---- Table ---- */
.table-wrap {
    overflow-x: auto;
    border-radius: var(--r-md);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table th {
    text-align: left;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-3);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-2);
}

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

.table tbody tr {
    transition: background var(--t-fast);
}

.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.table .actions {
    display: flex;
    gap: 8px;
}

/* ---- Empty State ---- */
.empty-state {
    text-align: center;
    padding: 48px 20px;
}

.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 16px;
    color: var(--text-2);
    margin-bottom: 6px;
}

.empty-state p {
    color: var(--text-4);
    font-size: 14px;
}

/* ---- Alert / Message ---- */
.alert {
    padding: 14px 16px;
    border-radius: var(--r-md);
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid;
}

.alert-error {
    background: var(--danger-soft);
    border-color: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

.alert-success {
    background: var(--success-soft);
    border-color: rgba(34, 197, 94, 0.25);
    color: #86efac;
}

.alert-warning {
    background: var(--warning-soft);
    border-color: rgba(245, 158, 11, 0.25);
    color: #fcd34d;
}

.alert-info {
    background: var(--info-soft);
    border-color: rgba(59, 130, 246, 0.25);
    color: #93c5fd;
}

/* ---- Divider ---- */
.divider {
    height: 1px;
    background: var(--border);
    margin: 24px 0;
    border: none;
}

/* ---- Muted text ---- */
.muted {
    color: var(--text-3);
    font-size: 14px;
}

.muted-sm {
    color: var(--text-4);
    font-size: 12px;
}

/* ---- Quick Actions ---- */
.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* ---- Avatar Circle ---- */
.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: var(--r-full);
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.avatar-lg {
    width: 64px;
    height: 64px;
    font-size: 24px;
}

/* ---- Progress Bar ---- */
.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: var(--r-full);
    overflow: hidden;
}

.progress-bar .fill {
    height: 100%;
    background: var(--gradient-1);
    border-radius: var(--r-full);
    transition: width var(--t-slow);
}

/* ============================================
   AUTH PAGES — Login / Register
   ============================================ */

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

.auth-wrapper::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow), transparent 60%);
    pointer-events: none;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
}

.auth-logo {
    width: 56px;
    height: 56px;
    border-radius: var(--r-lg);
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 24px;
    box-shadow: 0 8px 24px var(--accent-glow);
}

.auth-card h1 {
    text-align: center;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.auth-card .auth-subtitle {
    text-align: center;
    color: var(--text-3);
    font-size: 14px;
    margin-bottom: 28px;
}

.auth-card .btn {
    margin-top: 4px;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-3);
}

.auth-footer a {
    color: var(--accent-2);
    font-weight: 600;
    transition: color var(--t-fast);
}

.auth-footer a:hover {
    color: var(--accent);
}

/* ============================================
   UTILITY
   ============================================ */

.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-col { display: flex; flex-direction: column; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.gap-24 { gap: 24px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mt-28 { margin-top: 28px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mb-28 { margin-bottom: 28px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.w-full { width: 100%; }
.relative { position: relative; }
.span-2 { grid-column: span 2; }
.hidden { display: none; }

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .grid-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-w: 0px;
    }

    .span-2 {
        grid-column: span 1 !important;
    }

    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        box-shadow: var(--shadow-lg);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main {
        margin-left: 0;
    }

    .content {
        padding: 20px 16px;
    }

    .topbar {
        padding: 0 16px;
    }

    .grid,
    .grid-2,
    .grid-cols-3 {
        grid-template-columns: 1fr;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding: 24px 20px;
    }

    .page-header {
        flex-direction: column;
    }

    .quick-actions {
        flex-direction: column;
        width: 100%;
    }

    .quick-actions .btn {
        width: 100%;
    }
}

/* ---- Mobile sidebar toggle ---- */
.mobile-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 8px 10px;
    cursor: pointer;
    color: var(--text-2);
    font-size: 18px;
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }
}
