:root{
    --bg:#030712;
    --bg-soft:#07101f;
    --bg-panel:rgba(10,16,28,.92);
    --bg-panel-2:rgba(15,23,42,.88);
    --bg-input:rgba(255,255,255,.04);

    --text:#e5eefc;
    --text-soft:#9fb0c9;
    --text-dim:#7c8da8;

    --line:rgba(148,163,184,.16);
    --line-strong:rgba(94,231,255,.22);

    --cyan:#22d3ee;
    --blue:#3b82f6;
    --purple:#8b5cf6;
    --green:#16a34a;
    --red:#dc2626;
    --yellow:#f59e0b;

    --shadow-lg:0 18px 50px rgba(0,0,0,.38);
    --shadow-md:0 10px 28px rgba(0,0,0,.28);
    --radius-lg:22px;
    --radius-md:16px;
    --radius-sm:12px;
}

*{
    box-sizing:border-box;
}

html,body{
    margin:0;
    padding:0;
    min-height:100%;
    background:#000;
    color:var(--text);
    font-family:Arial,Helvetica,sans-serif;
}

body.app-shell,
body{
    background:
        radial-gradient(circle at 12% 18%, rgba(34,211,238,.10), transparent 24%),
        radial-gradient(circle at 86% 14%, rgba(139,92,246,.11), transparent 24%),
        radial-gradient(circle at 50% 100%, rgba(59,130,246,.08), transparent 28%),
        linear-gradient(180deg,#02040a 0%, #050816 48%, #02040a 100%);
    color:var(--text);
}

a{
    color:var(--cyan);
    text-decoration:none;
}

a:hover{
    opacity:.92;
}

.container{
    width:min(1180px, calc(100% - 24px));
    margin:18px auto 40px;
    background:transparent;
}

.topbar{
    position:sticky;
    top:0;
    z-index:100;
    backdrop-filter:blur(14px);
    background:rgba(2,6,23,.72);
    border-bottom:1px solid rgba(148,163,184,.12);
    box-shadow:0 8px 30px rgba(0,0,0,.22);
}

.topbar-inner{
    width:min(1180px, calc(100% - 24px));
    margin:0 auto;
    min-height:72px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    padding:10px 0;
}

.brand{
    display:flex;
    align-items:center;
    gap:12px;
    min-width:0;
    color:#fff;
}

.brand-badge{
    width:42px;
    height:42px;
    border-radius:14px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:800;
    color:#fff;
    background:linear-gradient(135deg,var(--cyan),var(--blue),var(--purple));
    box-shadow:
        0 10px 22px rgba(59,130,246,.28),
        0 0 18px rgba(34,211,238,.18);
}

.nav{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
    justify-content:flex-end;
}

.nav a{
    color:var(--text-soft);
    padding:10px 14px;
    border-radius:12px;
    border:1px solid transparent;
    transition:.2s ease;
    font-size:14px;
}

.nav a:hover{
    color:#fff;
    background:rgba(255,255,255,.05);
    border-color:rgba(148,163,184,.12);
}

.nav a.active{
    color:#fff;
    background:linear-gradient(180deg, rgba(34,211,238,.18), rgba(59,130,246,.16));
    border-color:rgba(94,231,255,.26);
    box-shadow:0 0 0 1px rgba(255,255,255,.02) inset;
}

.card{
    background:linear-gradient(180deg,var(--bg-panel),var(--bg-panel-2));
    border:1px solid var(--line);
    border-radius:var(--radius-lg);
    box-shadow:var(--shadow-lg);
    padding:18px;
    color:var(--text);
}

.card-title{
    margin:0 0 14px;
    font-size:22px;
    line-height:1.2;
    color:#fff;
    font-weight:800;
}

.input,
.select,
.textarea{
    width:100%;
    border-radius:14px;
    border:1px solid rgba(148,163,184,.18);
    background:var(--bg-input);
    color:#fff;
    padding:12px 14px;
    outline:none;
    transition:.18s ease;
    box-shadow:0 0 0 1px rgba(255,255,255,.01) inset;
}

.input::placeholder,
.textarea::placeholder{
    color:var(--text-dim);
}

.input:focus,
.select:focus,
.textarea:focus{
    border-color:rgba(34,211,238,.52);
    box-shadow:
        0 0 0 3px rgba(34,211,238,.10),
        0 0 18px rgba(34,211,238,.08);
}

.select{
    appearance:none;
    -webkit-appearance:none;
    -moz-appearance:none;
}

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

label{
    display:block;
    margin:0 0 7px;
    font-size:14px;
    font-weight:700;
    color:#dbe7fb;
}

.form-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:14px;
}

.actions{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    align-items:center;
}

.btn{
    appearance:none;
    border:none;
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    min-height:44px;
    padding:11px 16px;
    border-radius:14px;
    font-weight:700;
    color:#fff;
    background:linear-gradient(135deg,var(--blue),var(--purple));
    box-shadow:0 10px 24px rgba(59,130,246,.20);
    transition:transform .15s ease, opacity .15s ease, box-shadow .15s ease;
}

.btn:hover{
    transform:translateY(-1px);
    opacity:.97;
}

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

.btn.secondary{
    background:rgba(255,255,255,.05);
    color:#e5eefc;
    border:1px solid rgba(148,163,184,.18);
    box-shadow:none;
}

.btn.success{
    background:linear-gradient(135deg,#16a34a,#22c55e);
}

.btn.danger{
    background:linear-gradient(135deg,#dc2626,#ef4444);
}

.btn.warning{
    background:linear-gradient(135deg,#d97706,#f59e0b);
    color:#fff;
}

.btn:disabled{
    opacity:.55;
    cursor:not-allowed;
    transform:none;
}

.table-wrap{
    width:100%;
    overflow:auto;
    border-radius:16px;
    border:1px solid rgba(148,163,184,.12);
}

table{
    width:100%;
    border-collapse:collapse;
    min-width:720px;
    background:rgba(255,255,255,.02);
}

thead th{
    position:sticky;
    top:0;
    background:rgba(15,23,42,.94);
    color:#dbe7fb;
    font-size:13px;
    text-align:left;
    padding:12px 12px;
    border-bottom:1px solid rgba(148,163,184,.14);
    white-space:nowrap;
}

tbody td{
    padding:12px;
    border-bottom:1px solid rgba(148,163,184,.10);
    color:var(--text);
    vertical-align:top;
}

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

.badge{
    display:inline-flex;
    align-items:center;
    gap:6px;
    min-height:28px;
    padding:4px 10px;
    border-radius:999px;
    font-size:12px;
    font-weight:700;
    color:#dbe7fb;
    background:rgba(255,255,255,.06);
    border:1px solid rgba(148,163,184,.14);
}

.badge.success{
    background:rgba(22,163,74,.16);
    color:#bbf7d0;
    border-color:rgba(34,197,94,.22);
}

.badge.danger{
    background:rgba(220,38,38,.16);
    color:#fecaca;
    border-color:rgba(239,68,68,.24);
}

.badge.warning{
    background:rgba(245,158,11,.16);
    color:#fde68a;
    border-color:rgba(245,158,11,.24);
}

.alert{
    padding:14px 16px;
    border-radius:16px;
    margin-bottom:16px;
    border:1px solid rgba(148,163,184,.14);
    background:rgba(255,255,255,.04);
    color:var(--text);
}

.alert.info{
    background:rgba(59,130,246,.10);
    border-color:rgba(59,130,246,.22);
    color:#dbeafe;
}

.alert.success{
    background:rgba(22,163,74,.12);
    border-color:rgba(34,197,94,.20);
    color:#dcfce7;
}

.alert.error,
.alert.danger{
    background:rgba(220,38,38,.12);
    border-color:rgba(239,68,68,.22);
    color:#fee2e2;
}

.login-shell{
    width:100%;
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:18px;
}

.login-card{
    width:100%;
    max-width:430px;
    padding:24px;
    box-sizing:border-box;
    border-radius:24px;
    background:linear-gradient(180deg,rgba(15,23,42,.92),rgba(10,15,28,.95));
    border:1px solid rgba(94,231,255,.16);
    box-shadow:
        0 18px 50px rgba(0,0,0,.45),
        0 0 0 1px rgba(255,255,255,.03) inset,
        0 0 30px rgba(34,211,238,.08);
}

.login-logo{
    width:72px;
    height:72px;
    margin:0 auto 14px;
    border-radius:20px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:30px;
    font-weight:800;
    color:#fff;
    background:linear-gradient(135deg,var(--cyan),var(--blue),var(--purple));
    box-shadow:
        0 12px 26px rgba(37,99,235,.30),
        0 0 24px rgba(6,182,212,.22);
}

.hr{
    height:1px;
    margin:18px 0;
    border:0;
    background:linear-gradient(90deg,transparent,rgba(148,163,184,.28),transparent);
}

.small{font-size:12px}
.muted{color:var(--text-soft)}
.text-center{text-align:center}

.mb-0{margin-bottom:0}
.mb-8{margin-bottom:8px}
.mb-12{margin-bottom:12px}
.mb-16{margin-bottom:16px}
.mb-20{margin-bottom:20px}
.mt-12{margin-top:12px}

@media (max-width: 860px){
    .topbar-inner{
        align-items:flex-start;
        flex-direction:column;
        justify-content:flex-start;
    }

    .nav{
        width:100%;
        justify-content:flex-start;
    }

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

    .container{
        width:min(100% - 16px, 1180px);
        margin:14px auto 28px;
    }

    .card{
        padding:14px;
        border-radius:18px;
    }
}

@media (max-width: 640px){
    body{
        font-size:14px;
    }

    .login-card{
        max-width:100%;
        padding:18px;
        border-radius:20px;
    }

    .login-logo{
        width:62px;
        height:62px;
        font-size:24px;
        border-radius:18px;
    }

    .topbar-inner{
        width:min(100% - 16px, 1180px);
    }

    .nav a{
        padding:9px 12px;
        font-size:13px;
    }

    .btn{
        width:100%;
    }

    .actions .btn,
    .actions a.btn{
        width:100%;
    }
}