:root{
    --bg:#07111f;
    --sidebar:#050b15;
    --panel:#0e1b2d;
    --panel2:#132338;
    --border:#22354f;
    --text:#f2f7fb;
    --muted:#91a4bb;
    --green:#24d366;
    --danger:#ef4444;
}

*{box-sizing:border-box}

body{
    margin:0;
    background:var(--bg);
    color:var(--text);
    font:14px Inter,Segoe UI,Arial,sans-serif;
}

.sidebar{
    position:fixed;
    inset:0 auto 0 0;
    width:250px;
    padding:22px 16px;
    background:var(--sidebar);
    border-right:1px solid var(--border);
    display:flex;
    flex-direction:column;
}

.brand,.login-brand{
    display:flex;
    align-items:center;
    gap:12px;
    margin-bottom:28px;
}

.brand strong,.brand span,.login-brand strong,.login-brand span{display:block}
.brand span,.login-brand span{color:var(--muted);font-size:10px;margin-top:3px}

.logo{
    width:44px;height:44px;
    border-radius:13px;
    background:var(--green);
    color:#03130a;
    display:grid;
    place-items:center;
    font-size:21px;
}

nav{display:grid;gap:5px}
nav a{
    color:#afc0d3;
    text-decoration:none;
    padding:11px 13px;
    border-radius:10px;
    font-size:11px;
    font-weight:750;
}
nav a:hover,nav a.active{
    background:rgba(36,211,102,.1);
    color:#b8f9ca;
}

.logout{margin-top:auto}
.logout button{
    width:100%;
    border:1px solid var(--border);
    background:var(--panel);
    color:var(--text);
    padding:10px;
    border-radius:9px;
}

.main{
    margin-left:250px;
    padding:32px;
}

.page-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:18px;
    margin-bottom:22px;
}

h1{margin:0 0 5px;font-size:30px}
.page-head p{margin:0;color:var(--muted);font-size:11px}

.metrics{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:16px;
    margin-bottom:18px;
}

.metric,.panel,.project-card,.license-card,.login-card{
    border:1px solid var(--border);
    border-radius:16px;
    background:linear-gradient(145deg,#122239,#0b1727);
}

.metric{padding:20px}
.metric span,.metric strong{display:block}
.metric span{color:var(--muted);font-size:10px}
.metric strong{font-size:29px;color:var(--green);margin-top:8px}

.panel{padding:21px;margin-bottom:17px}
.panel h2{margin:0 0 16px;font-size:15px}

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

label{
    display:block;
    color:#d4dfeb;
    font-size:10px;
    font-weight:750;
    margin-bottom:7px;
}

input,select,textarea{
    width:100%;
    padding:11px 12px;
    border:1px solid var(--border);
    border-radius:10px;
    background:#081421;
    color:var(--text);
    outline:none;
}

textarea{
    min-height:200px;
    resize:vertical;
    font-family:Consolas,monospace;
    line-height:1.5;
}

button,.button{
    display:inline-block;
    border-radius:9px;
    padding:10px 13px;
    text-decoration:none;
    font-size:10px;
    font-weight:800;
    cursor:pointer;
}

.primary{
    border:1px solid var(--green);
    background:var(--green);
    color:#03130a;
}
.secondary{
    border:1px solid var(--border);
    background:var(--panel2);
    color:var(--text);
}
.danger{
    border:1px solid rgba(239,68,68,.35);
    background:rgba(239,68,68,.08);
    color:#fecaca;
}
.full{width:100%}

.row{
    display:grid;
    grid-template-columns:180px 1fr auto;
    gap:12px;
    align-items:center;
    padding:12px 0;
    border-bottom:1px solid var(--border);
}
.row span,.row small{color:var(--muted);font-size:9px}

.empty{
    padding:32px;
    border:1px dashed var(--border);
    border-radius:12px;
    text-align:center;
    color:var(--muted);
}

.project-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:16px;
}

.project-card{padding:16px}
.project-card img,.project-image{
    width:100%;
    height:150px;
    object-fit:cover;
    border-radius:11px;
    margin-bottom:13px;
    background:#0a1625;
}
.project-image{
    display:grid;
    place-items:center;
    color:var(--muted);
    font-size:10px;
}
.project-card strong,.project-card span{display:block}
.project-card span{color:var(--muted);font-size:9px;margin-top:4px}

.actions{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    margin-top:14px;
}

.license-card{
    display:grid;
    grid-template-columns:1fr auto auto;
    gap:18px;
    align-items:center;
    padding:16px;
    margin-bottom:12px;
}
.license-card strong,.license-card span,.license-card code{display:block}
.license-card span{color:var(--muted);font-size:9px;margin:4px 0}
.license-card code{color:#aaf4c0;font-size:10px}

.license-meta small{display:block;color:var(--muted);font-size:8px;margin-top:4px}
.badge{display:inline-block;padding:6px 9px;border-radius:999px;font-size:8px;font-weight:900}
.badge.active{background:rgba(36,211,102,.1);color:#aaf4c0}
.badge.suspended,.badge.expired{background:rgba(239,68,68,.1);color:#fecaca}

.checkbox-line{display:flex;align-items:center;gap:9px}
.checkbox-line input{width:auto}
.checkbox-line label{margin:0}

.split{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:15px;
}
.preview{
    width:100%;
    min-height:500px;
    border:1px solid var(--border);
    border-radius:10px;
    background:white;
}
.savebar{
    position:sticky;
    bottom:0;
    padding:14px;
    border:1px solid var(--border);
    border-radius:12px;
    background:rgba(5,11,21,.95);
    backdrop-filter:blur(10px);
    text-align:right;
}

.announcement{
    display:flex;
    justify-content:space-between;
    gap:16px;
    padding:14px 0;
    border-bottom:1px solid var(--border);
}
.announcement p{margin:5px 0;color:var(--muted)}
.announcement small{color:var(--muted);font-size:9px}

.alert{
    padding:12px 14px;
    border-radius:10px;
    margin:12px 0;
}
.alert.danger{
    border:1px solid rgba(239,68,68,.35);
    background:rgba(239,68,68,.08);
    color:#fecaca;
}

.login-wrap{
    min-height:100vh;
    display:grid;
    place-items:center;
    padding:24px;
}
.login-card{
    width:min(460px,100%);
    padding:30px;
}
.login-card h1{font-size:24px}
.login-card p{color:var(--muted);font-size:11px}
.login-card input{margin-bottom:14px}

@media(max-width:1050px){
    .metrics,.project-grid{grid-template-columns:repeat(2,1fr)}
    .license-card{grid-template-columns:1fr}
}
@media(max-width:760px){
    .sidebar{position:static;width:100%}
    .main{margin-left:0;padding:20px}
    .metrics,.project-grid,.form-grid,.split{grid-template-columns:1fr}
    .page-head{align-items:flex-start;flex-direction:column}
    .row{grid-template-columns:1fr}
}


.admin-footer{
    margin-top:18px;
    padding-top:15px;
    border-top:1px solid var(--border);
    text-align:center;
    color:var(--muted);
    font-size:10px;
}

.admin-footer a{
    color:var(--green);
    text-decoration:none;
    font-weight:800;
}

.admin-footer a:hover{
    text-decoration:underline;
}
