:root{
    --bg:#f3f6fb;
    --card:#ffffff;
    --text:#1c2430;
    --muted:#6d7a8c;
    --line:#dde5ef;
    --primary:#0b67c2;
    --primary-dark:#084f96;
    --danger:#c0392b;
    --success:#1f8b4c;
    --warning:#b57900;
    --shadow:0 10px 30px rgba(23,40,70,.08);
    --radius:18px;
}

*{box-sizing:border-box}
html,body{
    margin:0;
    padding:0;
    font-family:Arial,Helvetica,sans-serif;
    background:var(--bg);
    color:var(--text);
}
a{color:inherit;text-decoration:none}
body{min-height:100vh}

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

.sidebar{
    width:280px;
    min-width:280px;
    background:#0e1621;
    color:#fff;
    padding:24px 18px;
    display:flex;
    flex-direction:column;
    gap:24px;
}

.brand{
    display:flex;
    align-items:center;
    gap:14px;
    padding:6px 6px 14px 6px;
    border-bottom:1px solid rgba(255,255,255,.08);
}

.brand-mark{
    width:48px;
    height:48px;
    border-radius:14px;
    background:linear-gradient(135deg,var(--primary),#3aa0ff);
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:700;
    font-size:15px;
    flex:0 0 48px;
}

.brand-text{min-width:0}
.brand-title{
    font-size:28px;
    font-weight:700;
    line-height:1.1;
    color:#fff;
}
.brand-subtitle{
    font-size:14px;
    color:#b9c6d8;
    margin-top:4px;
}

.nav{
    display:flex;
    flex-direction:column;
    gap:8px;
}

.nav-link{
    display:block;
    width:100%;
    padding:12px 14px;
    border-radius:12px;
    color:#eaf1fb;
    font-weight:600;
    line-height:1.2;
}

.nav-link:hover{
    background:rgba(255,255,255,.08);
}

.main{
    flex:1;
    min-width:0;
    display:flex;
    flex-direction:column;
}

.topbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:16px;
    padding:18px 24px;
    background:linear-gradient(135deg,var(--primary),#2e8de6);
    color:#fff;
}

.topbar-title{
    font-size:20px;
    font-weight:700;
}

.topbar-user{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
    justify-content:flex-end;
}

.topbar-email{
    font-size:14px;
    font-weight:700;
}

.content{
    padding:24px;
}

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

.page-title{
    margin:0 0 4px;
    font-size:34px;
    line-height:1.1;
}

.page-subtitle{
    margin:0;
    color:var(--muted);
    font-size:18px;
}

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

.card,
.stat-card,
.form-card{
    background:var(--card);
    border:1px solid var(--line);
    border-radius:var(--radius);
    box-shadow:var(--shadow);
    padding:20px;
}

.card-title{
    margin:0 0 14px;
    font-size:22px;
}

.card-muted,
.text-muted,
.help-text{
    color:var(--muted);
}

.stat-card h3{
    margin:0 0 8px;
    font-size:17px;
    color:var(--muted);
    font-weight:600;
}

.stat-card p{
    margin:0;
    font-size:38px;
    font-weight:700;
}

.table-wrap{
    background:var(--card);
    border:1px solid var(--line);
    border-radius:var(--radius);
    box-shadow:var(--shadow);
    overflow:auto;
}

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

th,td{
    padding:14px 16px;
    border-bottom:1px solid var(--line);
    text-align:left;
    vertical-align:top;
}

th{
    background:#f8fbff;
    font-size:14px;
}

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

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

.form-group{margin-bottom:16px}

label{
    display:block;
    margin-bottom:8px;
    font-weight:600;
}

input,select,textarea{
    width:100%;
    padding:12px 14px;
    border:1px solid #cbd5e1;
    border-radius:12px;
    background:#fff;
    font:inherit;
}

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

input:disabled,select:disabled,textarea:disabled{
    background:#eef2f7;
    color:#667085;
}

.form-actions{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}

.btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:11px 16px;
    border-radius:12px;
    border:none;
    font-weight:700;
    cursor:pointer;
}

.btn-primary{background:var(--primary);color:#fff}
.btn-primary:hover{background:var(--primary-dark)}
.btn-secondary{background:#e7eef7;color:#20324b}
.btn-secondary:hover{background:#dbe6f3}
.btn-warning{background:#fff3cd;color:#7a5800}
.btn-success{background:#daf5e4;color:#0f6d36}
.btn-danger{background:#fde0dc;color:#8d1d14}
.btn-sm{padding:8px 12px;font-size:13px}

.alert{
    padding:14px 16px;
    border-radius:14px;
    margin:0 0 16px;
    border:1px solid transparent;
}
.alert-success{background:#e8f8ee;color:#116837;border-color:#c7edd4}
.alert-danger{background:#fdecea;color:#8f1d17;border-color:#f6c9c4}
.alert-warning{background:#fff7df;color:#7c5b00;border-color:#f0df9a}

.badge{
    display:inline-block;
    padding:6px 10px;
    border-radius:999px;
    font-size:12px;
    font-weight:700;
}
.badge-success{background:#daf5e4;color:#0f6d36}
.badge-danger{background:#fde0dc;color:#8d1d14}
.badge-warning{background:#fff3cd;color:#7a5800}
.badge-info{background:#d9ecff;color:#0d5eaf}
.badge-muted{background:#edf2f7;color:#57657a}

.mt-2{margin-top:18px}
.mb-0{margin-bottom:0}
.mb-1{margin-bottom:8px}

@media (max-width: 960px){
    .app-shell{display:block}
    .sidebar{width:100%;min-width:0}
    .grid-2,.form-row{grid-template-columns:1fr}
    .page-header,.topbar{flex-direction:column;align-items:flex-start}
}
