@font-face { font-family: "YekanBakh"; src: url("/assets/fonts/yekanbakh-Light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "YekanBakh"; src: url("/assets/fonts/yekanbakh-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "YekanBakh"; src: url("/assets/fonts/yekanbakh-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "YekanBakh"; src: url("/assets/fonts/yekanbakh-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "YekanBakh"; src: url("/assets/fonts/yekanbakh-Black.woff2") format("woff2"); font-weight: 900; font-display: swap; }

:root {
    --bg: #070d10;
    --panel: rgba(255, 255, 255, .045);
    --panel-2: rgba(255, 255, 255, .075);
    --ink: #eef5f3;
    --ink-2: #c3d3cf;
    --muted: #8ea39f;
    --line: rgba(255, 255, 255, .10);
    --line-2: rgba(255, 255, 255, .06);
    --teal: #4fb6c6;
    --amber: #f7a94a;
    --bad: #ff8f85;
    --ok: #6fd6ae;
    --font: "YekanBakh", Tahoma, sans-serif;
    --radius: 18px;
    --grad: linear-gradient(115deg, var(--teal), #8fd0c8 45%, var(--amber));
}
* { box-sizing: border-box; }
body {
    margin: 0; background: var(--bg); color: var(--ink);
    font-family: var(--font); font-size: 15px; line-height: 1.9;
    min-height: 100vh;
    background-image:
        radial-gradient(60% 40% at 88% -6%, rgba(79, 182, 198, .16), transparent 70%),
        radial-gradient(52% 40% at 4% 2%, rgba(247, 169, 74, .10), transparent 70%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--amber); }
h1, h2, h3 { margin: 0; font-weight: 900; letter-spacing: -.4px; line-height: 1.45; }
h1 { font-size: 1.45rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 10px; }
.ic { width: 18px; height: 18px; flex: 0 0 18px; }
code { font-size: 11.5px; color: var(--amber); }

.shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar {
    padding: 20px 14px; display: flex; flex-direction: column; gap: 8px;
    border-inline-end: 1px solid var(--line);
    background: rgba(8, 15, 19, .6);
    backdrop-filter: blur(18px);
    position: sticky; top: 0; height: 100vh;
}
.side-brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 16px; border-bottom: 1px solid var(--line-2); margin-bottom: 10px; }
.side-brand img { width: 38px; height: 38px; object-fit: contain; }
.side-brand div { display: flex; flex-direction: column; line-height: 1.5; }
.side-brand strong { font-size: 12.5px; font-weight: 900; }
.side-brand span { font-size: 10.5px; color: var(--muted); }
.side-nav { display: flex; flex-direction: column; gap: 3px; }
.side-nav a {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: 12px;
    color: var(--ink-2); font-size: 13.5px; font-weight: 600;
    border: 1px solid transparent;
    transition: all .18s ease;
}
.side-nav a:hover { background: var(--panel); color: var(--ink); }
.side-nav a.is-active {
    background: linear-gradient(90deg, rgba(79, 182, 198, .16), rgba(247, 169, 74, .08));
    border-color: rgba(79, 182, 198, .28); color: var(--ink);
}
.side-nav a.is-active .ic { color: var(--amber); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 9px; font-size: 11.5px; color: var(--muted); }
.side-user { padding: 10px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line-2); }
.side-user strong { color: var(--ink); }
.side-out { color: var(--amber); }

.main { padding: 26px 30px 60px; max-width: 1100px; width: 100%; }
.topline { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.topline .sub { color: var(--muted); font-size: 12.5px; margin: 6px 0 0; }

.card {
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 22px; margin-bottom: 16px; backdrop-filter: blur(12px);
}
.card > h2 { margin-bottom: 4px; }
.card .hint { color: var(--muted); font-size: 12.5px; margin: 0 0 18px; line-height: 1.9; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { padding: 18px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.stat span { display: block; font-size: 12px; color: var(--muted); }
.stat strong {
    display: block; font-size: 1.7rem; font-weight: 900; margin-top: 2px;
    background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { margin-bottom: 14px; }
.field > label, .field label:first-child { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 5px; }
.field .tip { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; margin-top: 4px; line-height: 1.8; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=url], input[type=file], textarea, select {
    width: 100%; font-family: inherit; font-size: 14px; color: var(--ink);
    background: rgba(0, 0, 0, .28); border: 1px solid var(--line); border-radius: 12px;
    padding: 9px 12px; line-height: 1.8; transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, textarea:focus, select:focus {
    outline: none; border-color: rgba(79, 182, 198, .65);
    box-shadow: 0 0 0 3px rgba(79, 182, 198, .14);
}
input::placeholder, textarea::placeholder { color: rgba(255, 255, 255, .28); }
select option { background: #0d1a20; color: var(--ink); }
input[type=file] { padding: 7px; }
.row-inline { display: flex; align-items: center; gap: 9px; font-size: 13px; }
input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--teal); }
.actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    font-family: inherit; font-size: 13.5px; font-weight: 700;
    height: 42px; padding: 0 18px; border-radius: 999px;
    border: 1px solid transparent; cursor: pointer;
    background: var(--grad); color: #0b1512;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { color: #0b1512; transform: translateY(-1px); box-shadow: 0 16px 34px -20px rgba(247, 169, 74, .8); }
.btn-line { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-line:hover { background: var(--panel-2); border-color: rgba(255, 255, 255, .22); color: var(--ink); box-shadow: none; }
.btn-gold { background: var(--amber); color: #1a1205; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12px; }
.btn-bad { background: rgba(255, 143, 133, .1); color: var(--bad); border-color: rgba(255, 143, 133, .3); }
.btn-bad:hover { background: rgba(255, 143, 133, .18); color: var(--bad); box-shadow: none; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.chip-on { background: rgba(111, 214, 174, .14); color: var(--ok); border: 1px solid rgba(111, 214, 174, .25); }
.chip-off { background: rgba(255, 255, 255, .06); color: var(--muted); border: 1px solid var(--line); }

.flash { border-radius: 12px; padding: 11px 16px; font-size: 13.5px; margin-bottom: 16px; border: 1px solid; backdrop-filter: blur(10px); }
.flash-ok { background: rgba(111, 214, 174, .1); border-color: rgba(111, 214, 174, .3); color: #a8ecd2; }
.flash-bad { background: rgba(255, 143, 133, .1); border-color: rgba(255, 143, 133, .3); color: #ffc4bf; }

.list { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: rgba(255, 255, 255, .02); }
.list-row {
    display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center;
    padding: 13px 16px; border-bottom: 1px solid var(--line-2); transition: background .18s ease;
}
.list-row:hover { background: rgba(255, 255, 255, .03); }
.list-row:last-child { border-bottom: 0; }
.list-num { color: var(--amber); font-weight: 900; font-size: 12px; }
.list-title { font-weight: 700; font-size: 13.5px; }
.list-meta { color: var(--muted); font-size: 11.5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.list-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.list-tools form { margin: 0; }

.choice-set { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 10px; margin-bottom: 6px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; }
.choice span {
    display: block; border: 1px solid var(--line); border-radius: 14px; padding: 12px 10px;
    text-align: center; font-size: 12.5px; font-weight: 600; cursor: pointer;
    background: rgba(0, 0, 0, .22); color: var(--ink-2);
    transition: all .15s ease;
}
.choice input:checked + span {
    border-color: rgba(247, 169, 74, .55); color: var(--ink);
    box-shadow: 0 0 0 3px rgba(247, 169, 74, .14);
    background: rgba(247, 169, 74, .07);
}
.choice input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }
.swatch { display: block; height: 26px; border-radius: 8px; margin-bottom: 9px; border: 1px solid var(--line); }
.sw-paper { background: linear-gradient(135deg, #0b1418 0 62%, #4fb6c6 62% 80%, #f7a94a 80% 100%); }
.sw-forest { background: linear-gradient(135deg, #0a1712 0 62%, #6fd6ae 62% 80%, #f7a94a 80% 100%); }
.sw-moon { background: linear-gradient(135deg, #0b1020 0 62%, #7f9df0 62% 80%, #f7a94a 80% 100%); }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.media-item { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: rgba(0, 0, 0, .25); }
.media-item img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.media-item .media-body { padding: 9px 11px; }
.media-item code { font-size: 10.5px; word-break: break-all; display: block; direction: ltr; color: var(--muted); }
.media-item form { margin-top: 7px; }

.login-wrap {
    min-height: 100vh; display: grid; place-items: center; padding: 24px;
    background:
        radial-gradient(50% 40% at 82% 0%, rgba(79, 182, 198, .22), transparent 62%),
        radial-gradient(46% 38% at 10% 100%, rgba(247, 169, 74, .15), transparent 60%);
}
.login-card {
    width: 100%; max-width: 390px; padding: 30px;
    background: rgba(12, 22, 27, .8); border: 1px solid var(--line);
    border-radius: 24px; backdrop-filter: blur(18px);
    box-shadow: 0 50px 90px -60px #000;
}
.login-card .brand { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; margin-bottom: 24px; }
.login-card .brand img { width: 62px; height: 62px; object-fit: contain; filter: drop-shadow(0 12px 26px rgba(79, 182, 198, .35)); }
.login-card .brand strong { font-size: 15px; font-weight: 900; }
.login-card .brand span { font-size: 11.5px; color: var(--muted); }
.login-card .btn { width: 100%; margin-top: 8px; }
.login-note { text-align: center; font-size: 11.5px; color: var(--muted); margin: 16px 0 0; }

@media (max-width: 940px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar { position: static; height: auto; border-inline-end: 0; border-bottom: 1px solid var(--line); padding: 12px 14px; }
    .side-nav { flex-direction: row; flex-wrap: wrap; }
    .side-nav a { padding: 7px 10px; font-size: 12.5px; }
    .side-brand { border: 0; padding: 2px 4px 6px; margin: 0; }
    .side-foot { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 12px; }
    .main { padding: 18px 16px 46px; }
    .grid-2 { grid-template-columns: 1fr; }
    .list-row { grid-template-columns: 1fr; gap: 8px; }
    .list-row .list-tools { justify-content: flex-start; }
}
