.admin-body { min-height: 100vh; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--line-2); border-radius: 24px; padding: 32px; box-shadow: var(--shadow); }
.login-card h1 { font-size: 1.6rem; margin: 12px 0 4px; }
.brand-mark.big { width: 52px; height: 52px; }
.form-error { color: var(--bad); font-size: .85rem; min-height: 1.3em; margin: 0 0 8px; }
.center-text { text-align: center; margin: 16px 0 0; }

.shell { display: grid; grid-template-columns: 270px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; padding: 22px 16px; background: var(--bg-2); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 22px; }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-nav button { text-align: left; background: none; border: 1px solid transparent; color: var(--muted); font: 600 .92rem/1.2 var(--font); padding: 12px 14px; border-radius: 12px; cursor: pointer; transition: background .15s, color .15s; }
.side-nav button:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.side-nav button[aria-current="page"] { color: var(--text); background: var(--gold-soft); border-color: rgba(242, 193, 78, .35); }
.side-foot { margin-top: auto; display: grid; gap: 8px; }

.panel-area { padding: clamp(20px, 4vw, 48px); min-width: 0; max-width: 980px; }
.panel h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: .3em; }
.panel > .muted { margin-bottom: 24px; max-width: 60ch; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 18px; }
.card h2 { font-size: 1.1rem; margin-bottom: 16px; letter-spacing: -.01em; }
.card.note { border-style: dashed; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.check { display: flex; align-items: center; gap: 8px; margin: 10px 0; cursor: pointer; }
.check input { width: auto; }
.logo-row { display: flex; gap: 18px; align-items: center; margin: 6px 0 22px; flex-wrap: wrap; }
.logo-prev { width: 84px; height: 84px; border-radius: 20px; background: var(--bg-2); border: 1px solid var(--line-2); display: grid; place-items: center; }
.logo-prev svg, .logo-prev img { width: 56px; height: 56px; object-fit: contain; }
input[type="file"] { padding: .55em; }

.howto { color: var(--muted); padding-left: 20px; margin: 0 0 20px; display: grid; gap: 6px; font-size: .93rem; }
.howto a, .panel a:not(.btn) { color: var(--blue); }
code { font-family: var(--mono); background: var(--bg-2); padding: 1px 6px; border-radius: 6px; font-size: .85em; }
.status-box { margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line-2); font-size: .9rem; display: grid; gap: 4px; }
.status-box.ok { border-color: rgba(52, 211, 153, .5); }
.status-box.bad { border-color: rgba(248, 113, 113, .5); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chips span { font-size: .78rem; color: var(--muted); border: 1px solid var(--line-2); border-radius: 99px; padding: 4px 10px; }
.code-box, .file-view { background: #050810; border: 1px solid var(--line); border-radius: 12px; padding: 16px; overflow: auto; font: .8rem/1.55 var(--mono); color: #cbd5e1; margin: 0; max-height: 420px; white-space: pre; }

details.group { border: 1px solid var(--line); background: var(--surface); border-radius: 16px; margin-bottom: 12px; padding: 0 20px; }
details.group[open] { border-color: rgba(242, 193, 78, .3); }
details.group summary { cursor: pointer; font-weight: 700; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; }
details.group summary::-webkit-details-marker { display: none; }
details.group summary::after { content: "+"; color: var(--gold); font-size: 1.3rem; line-height: 1; }
details.group[open] summary::after { content: "−"; }
details.group .gbody { padding-bottom: 8px; }
.sticky-save { position: sticky; bottom: 0; display: flex; gap: 10px; flex-wrap: wrap; padding: 16px 0; background: linear-gradient(0deg, var(--bg) 70%, transparent); }
.field .hint { font-size: .75rem; color: var(--muted); }
.field.changed input, .field.changed textarea { border-color: rgba(242, 193, 78, .55); }

.file-item { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; overflow: hidden; }
.file-item > summary { cursor: pointer; padding: 12px 14px; display: flex; justify-content: space-between; gap: 10px; align-items: center; list-style: none; font-family: var(--mono); font-size: .85rem; }
.file-item > summary::-webkit-details-marker { display: none; }
.file-item .file-actions { display: flex; gap: 6px; padding: 0 14px 10px; }
.file-item .file-view { border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.file-btn { cursor: pointer; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: column; padding: 14px; }
  .side-nav { flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .side-nav button { white-space: nowrap; }
  .side-foot { grid-template-columns: 1fr 1fr; margin-top: 0; }
  .grid2 { grid-template-columns: 1fr; }
}
