﻿/* Loc Nguyen — personal site.
   Layout: an operations-console feel — sticky top bar with section tabs,
   a spec-sheet hero on the profile, then cards. Light and dark themes. */

:root {
  --bg: #EDF1F5; --surface: #FFFFFF; --sunk: #E3E9F0; --ink: #132030; --muted: #58677A; --line: #D3DBE4;
  --accent: #1F4FD1; --accent-ink: #FFFFFF; --accent-soft: #DCE5FB; --signal: #B86E00; --ok: #1B7A52; --danger: #B42318;
  --f-display: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --f-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Consolas, Menlo, monospace;
  --r: 10px; --gut: clamp(16px, 4vw, 40px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0D131A; --surface: #141C26; --sunk: #0A1016; --ink: #E4EBF2; --muted: #8C9AAA; --line: #253140;
    --accent: #86A6FF; --accent-ink: #0A1222; --accent-soft: #1B2A4A; --signal: #F0A43A; --ok: #4DC48C; --danger: #F27C6E;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.6 var(--f-body); min-height: 100vh; display: flex; flex-direction: column; }
h1, h2, h3 { font-family: var(--f-display); text-wrap: balance; margin: 0; line-height: 1.15; }
h2 { font-size: 1.45rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0; }
a { color: var(--accent); }
img { max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.mono { font-family: var(--f-mono); }
.label { font: 500 .72rem/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.hint { color: var(--muted); font-size: .9rem; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-inline: var(--gut); }

/* top bar */
.bar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.bar .wrap { display: flex; align-items: center; gap: 16px; padding-block: 10px; flex-wrap: wrap; }
.brand { font: 800 1.05rem/1 var(--f-display); letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; white-space: nowrap; color: var(--ink); text-decoration: none; }
.brand i { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }
.tabs { display: flex; gap: 4px; overflow-x: auto; min-width: 0; flex: 1; }
.tab { padding: 7px 12px; border-radius: 8px; color: var(--muted); font-weight: 500; white-space: nowrap; text-decoration: none; }
.tab:hover { color: var(--ink); background: var(--sunk); }
.tab.on { color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.who { display: flex; align-items: center; gap: 8px; font-size: .88rem; white-space: nowrap; margin: 0; }
.who-link { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; }
.who-link img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.role { font: 500 .68rem/1 var(--f-mono); text-transform: uppercase; letter-spacing: .06em; padding: 4px 6px; border-radius: 5px; background: var(--accent-soft); color: var(--accent); }

main.wrap { flex: 1; padding-block: 28px 64px; display: grid; gap: 28px; align-content: start; }
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-block: 18px 28px; color: var(--muted); font-size: .82rem; border-top: 1px solid var(--line); }

.notice { padding: 10px 14px; border: 1px solid var(--line); border-left: 3px solid var(--signal); background: var(--surface); border-radius: 8px; font-size: .92rem; }
.notice.ok { border-left-color: var(--ok); }
.notice.bad { border-left-color: var(--danger); }

/* hero */
.hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: start; }
.avatar { position: relative; width: 168px; aspect-ratio: 1; max-width: 100%; }
.avatar .pic { width: 100%; height: 100%; border-radius: 22px; object-fit: cover; background: var(--sunk); display: grid; place-items: center; font: 800 3rem var(--f-display); color: var(--accent); border: 1px solid var(--line); }
.avatar .edit { position: absolute; right: -8px; bottom: -8px; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); font-weight: 800; letter-spacing: -.025em; }
.hero .title { font: 600 1.1rem var(--f-display); color: var(--accent); margin-top: 6px; }
.hero .summary { max-width: 64ch; margin-top: 14px; }
.contact { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; font-size: .9rem; color: var(--muted); align-items: center; }
.contact b { color: var(--ink); font-weight: 500; user-select: all; }
.spec { margin: 20px 0 0; background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; font: 400 .85rem/1.75 var(--f-mono); overflow-x: auto; max-width: 560px; }
.spec .k { color: var(--muted); } .spec .v { color: var(--ink); } .spec .s { color: var(--ok); }

.grid2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.stack { display: grid; gap: 28px; min-width: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; min-width: 0; }
.card > h2 { margin-bottom: 14px; }
.narrow { max-width: 560px; width: 100%; margin-inline: auto; }

/* experience timeline */
.job { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 18px; padding-block: 18px; border-top: 1px solid var(--line); }
.job:first-child { border-top: 0; padding-top: 4px; }
.job .when { font: 500 .78rem/1.5 var(--f-mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.job .when .now { color: var(--ok); }
.job .co { color: var(--muted); font-size: .9rem; margin-top: 2px; }
.job ul { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.job details { margin-top: 6px; }
.job summary { cursor: pointer; color: var(--accent); font-size: .88rem; font-weight: 500; }

.skill-group + .skill-group { margin-top: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { font: 400 .8rem/1 var(--f-mono); padding: 6px 8px; border-radius: 6px; background: var(--sunk); border: 1px solid var(--line); }
.edu { display: grid; gap: 12px; }
.edu div { display: grid; gap: 2px; }

/* buttons & forms */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); padding: 8px 13px; border-radius: 8px; cursor: pointer; font-weight: 500; font-size: .9rem; color: var(--ink); text-decoration: none; position: relative; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--danger); }
.btn.sm { padding: 5px 9px; font-size: .82rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn.round { border-radius: 50%; width: 38px; height: 38px; justify-content: center; padding: 0; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
input[type=text], input[type=email], input[type=password], textarea { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; }
textarea { resize: vertical; min-height: 42px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row > input[type=text], .row > textarea { flex: 1; min-width: 0; width: auto; }
.spread { justify-content: space-between; }
.inline { display: inline; margin: 0; }
.stack-form { margin: 0; }
.hidden-file { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.toolbar { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.toolbar p { color: var(--muted); font-size: .9rem; margin-top: 4px; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--r); }
.err, .field-validation-error, .validation-summary-errors { color: var(--danger); font-size: .88rem; }
.validation-summary-errors ul { margin: 0; padding-left: 18px; }
.form { display: grid; gap: 14px; margin-top: 16px; }
.field { display: grid; gap: 4px; }
.field label { font-weight: 500; font-size: .9rem; }
.check { display: flex; gap: 8px; align-items: center; font-size: .9rem; }
.auth { display: grid; gap: 10px; }
.ext-logins { display: grid; gap: 8px; margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.status { font: 500 .78rem var(--f-mono); color: var(--muted); }
.status.live { color: var(--ok); }

/* album */
.drop { border: 1.5px dashed var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 10px; background: var(--surface); margin: 0; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.album { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.ph { position: relative; display: block; border-radius: var(--r); overflow: hidden; background: var(--sunk); aspect-ratio: 1; max-width: 100%; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.ph:hover img { transform: scale(1.03); }
.ph .meta { position: absolute; inset: auto 0 0 0; padding: 22px 10px 8px; background: linear-gradient(transparent, rgba(5,10,18,.72)); color: #fff; font-size: .8rem; display: flex; justify-content: space-between; gap: 8px; }
.ph .meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.photo-view { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.photo-frame { background: #05080d; border-radius: var(--r); display: grid; place-items: center; min-height: 260px; overflow: hidden; }
.photo-frame img { max-height: 80vh; width: 100%; object-fit: contain; display: block; }
.photo-side { display: grid; gap: 14px; }

/* people, comments, chat */
.person { display: flex; gap: 10px; align-items: flex-start; }
.person > img { width: 30px; height: 30px; border-radius: 50%; flex: none; object-fit: cover; }
.person .body { min-width: 0; flex: 1; }
.person .name { font-weight: 600; font-size: .9rem; }
.person .time { font: 400 .72rem var(--f-mono); color: var(--muted); margin-left: 6px; }
.person .txt { white-space: pre-wrap; overflow-wrap: anywhere; }
.clist { display: grid; gap: 12px; }
.cform { display: grid; gap: 8px; margin-top: 14px; }
.x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: .78rem; padding: 0 0 0 6px; }
.x:hover { color: var(--danger); }

.files { display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.file { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border-top: 1px solid var(--line); }
.file:first-child { border-top: 0; }
.file-main { min-width: 0; }
.ext { width: 44px; height: 44px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font: 500 .7rem var(--f-mono); text-transform: uppercase; }
.file .nm { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file .sub { font-size: .8rem; color: var(--muted); }

.chat { display: grid; grid-template-rows: minmax(0, 1fr) auto; height: min(68vh, 640px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.stream { overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.composer { border-top: 1px solid var(--line); padding: 10px; margin: 0; }
.composer textarea { max-height: 140px; }

/* profile photo manager */
.pm { display: grid; gap: 18px; }
.pm-current { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.pm-big { width: 140px; height: 140px; border-radius: 20px; object-fit: cover; border: 1px solid var(--line); background: var(--sunk); }
.pm-actions { display: grid; gap: 8px; justify-items: start; }
.pm-actions form { margin: 0; }
.thumbs { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; }
.thumb-cell { display: grid; gap: 6px; justify-items: center; }
.thumb { width: 84px; height: 84px; border-radius: 14px; object-fit: cover; border: 2px solid transparent; background: var(--sunk); }
.thumb.on { border-color: var(--accent); }
.thumb-actions { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; justify-content: center; }

@media (max-width: 820px) {
  .grid2, .photo-view { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .avatar { width: 128px; }
  .job { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .album { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .file { grid-template-columns: 44px minmax(0, 1fr); }
  .file > .row { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ===================== Profile page (v2 layout) ===================== */
.pf-hero {
  display: grid; gap: 22px 32px; align-items: start;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
  grid-template-areas: "id spec" "body spec";
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: clamp(18px, 3vw, 32px); position: relative; overflow: hidden;
}
.pf-hero::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--accent), var(--ok)); }
.pf-id { grid-area: id; display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.pf-id .avatar { width: 148px; flex: none; }
.pf-name { min-width: 0; }
.pf-name h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); font-weight: 800; letter-spacing: -.025em; margin-top: 4px; }
.pf-name .title { font: 600 1.05rem var(--f-display); color: var(--accent); margin-top: 6px; }
.pf-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.badge { font: 500 .74rem/1 var(--f-mono); padding: 6px 9px; border-radius: 999px; background: var(--sunk); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.badge.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); background: color-mix(in srgb, var(--ok) 10%, var(--surface)); }
.pf-body { grid-area: body; display: grid; gap: 18px; min-width: 0; }
.pf-body .summary { max-width: 70ch; font-size: 1rem; }
.pf-contact { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.ct { display: grid; gap: 4px; min-width: 0; }
.ct-val { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; overflow-wrap: anywhere; }
.ct-val b { font-weight: 500; user-select: all; }
.pf-spec { grid-area: spec; margin: 0; max-width: none; align-self: stretch; }

.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; display: grid; gap: 2px; }
.stat b { font: 800 1.9rem/1.1 var(--f-display); color: var(--accent); font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .86rem; }

.jump { display: flex; gap: 6px; flex-wrap: wrap; }
.jump a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-size: .88rem; font-weight: 500; }
.jump a:hover { border-color: var(--accent); color: var(--accent); }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }

.pf-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.pf-side { display: grid; gap: 24px; position: sticky; top: 76px; min-width: 0; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }

/* experience timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.tl-item { display: grid; grid-template-columns: 84px 22px minmax(0, 1fr); gap: 0 14px; position: relative; padding-bottom: 26px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: calc(84px + 14px + 10px); top: 14px; bottom: -4px; width: 2px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-when { display: grid; gap: 2px; font: 500 .76rem/1.4 var(--f-mono); color: var(--muted); text-align: right; padding-top: 3px; font-variant-numeric: tabular-nums; }
.tl-when .now { color: var(--ok); }
.tl-dot { width: 12px; height: 12px; margin: 6px auto 0; border-radius: 50%; background: var(--surface); border: 2px solid var(--muted); position: relative; z-index: 1; }
.tl-item.current .tl-dot { background: var(--ok); border-color: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 22%, transparent); }
.tl-body { min-width: 0; }
.tl-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tl-item.current h3 { font-size: 1.15rem; }
.tl-body .co { color: var(--muted); font-size: .9rem; margin-top: 2px; }
.tl-body ul { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.tl-body details { margin-top: 6px; }
.tl-body summary { cursor: pointer; color: var(--accent); font-size: .88rem; font-weight: 500; }

.skill-grid { display: grid; gap: 14px; }
.skill-grid .skill-group + .skill-group { margin-top: 0; }
.edu-item { display: grid; gap: 2px; padding-left: 12px; border-left: 2px solid var(--accent-soft); }

/* family */
.family-photo { margin: 0; border-radius: 12px; overflow: hidden; background: var(--sunk); }
.family-photo img { display: block; width: 100%; height: auto; max-height: 720px; object-fit: cover; }

/* guestbook */
.guest { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 24px 32px; }
.guest-intro { display: grid; gap: 10px; align-content: start; }
.guest-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }

@media (max-width: 980px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pf-hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "id" "body" "spec"; }
}
@media (max-width: 820px) {
  .pf-grid, .guest { grid-template-columns: minmax(0, 1fr); }
  .pf-side { position: static; }
  .pf-contact { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-id .avatar { width: 112px; }
  .tl-item { grid-template-columns: 18px minmax(0, 1fr); }
  .tl-item::before { left: 8px; }
  .tl-when { grid-column: 2; grid-row: 1; text-align: left; display: flex; gap: 6px; padding: 0 0 4px; }
  .tl-when span + span::before { content: "→ "; }
  .tl-dot { grid-column: 1; grid-row: 1 / span 2; margin-top: 4px; }
  .tl-body { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ===================== Admin pages ===================== */
.pill[hidden] { display: none; }
.pill { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: 999px; background: var(--danger); color: #fff; font: 600 .68rem/1 var(--f-mono); vertical-align: 1px; }
.admin-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.admin-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.admin-tabs a { padding: 7px 12px; border-radius: 8px; color: var(--muted); font-weight: 500; text-decoration: none; }
.admin-tabs a:hover { background: var(--sunk); color: var(--ink); }
.admin-tabs a.on { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.jump a.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

a.stat { color: inherit; text-decoration: none; }
a.stat:hover { border-color: var(--accent); }
.stat.warn { border-color: color-mix(in srgb, var(--signal) 55%, var(--line)); }
.stat.warn b { color: var(--signal); }
.small-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.table-wrap { overflow-x: auto; margin: 0 -4px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.admin-table th { text-align: left; font: 500 .7rem/1.2 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.admin-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.admin-table .right { text-align: right; }
.admin-table .pickcol { width: 32px; }
.admin-table input[type=text] { min-width: 180px; }
.small { font-size: .82rem; }
.muted { color: var(--muted); }
.row.end { justify-content: flex-end; }
.row.nowrap { flex-wrap: nowrap; }

.status { display: inline-block; }
.admin-table .status { padding: 3px 8px; border-radius: 999px; font: 500 .72rem/1.3 var(--f-mono); border: 1px solid var(--line); background: var(--sunk); }
.status.s-owner { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); background: var(--accent-soft); }
.status.s-admin { color: var(--accent); }
.status.s-member { color: var(--ok); }
.status.s-pending { color: var(--signal); border-color: color-mix(in srgb, var(--signal) 45%, var(--line)); }
.status.s-suspended { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }

.more { position: relative; }
.more > summary { list-style: none; cursor: pointer; }
.more > summary::-webkit-details-marker { display: none; }
.more-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 15; width: min(340px, 86vw); display: grid; gap: 12px; padding: 14px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 10px 30px rgba(0,0,0,.14); }
.mini-form { display: grid; gap: 6px; margin: 0; }
.mini-form .row > input { flex: 1; min-width: 0; }
.narrow-left { max-width: 560px; }

.ext.sm { width: 34px; height: 34px; font-size: .62rem; flex: none; }

.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.admin-photo { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: grid; }
.admin-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--sunk); }
.admin-photo .pick { position: absolute; top: 8px; left: 8px; z-index: 2; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: rgba(255,255,255,.92); box-shadow: 0 1px 4px rgba(0,0,0,.25); cursor: pointer; }
.admin-photo .pick input { width: 17px; height: 17px; margin: 0; cursor: pointer; }
.admin-photo:has(input:checked) { outline: 2px solid var(--danger); outline-offset: -2px; }
.admin-photo-body { display: grid; gap: 8px; padding: 10px; }
.admin-photo-body .row > input { flex: 1; min-width: 0; }

.pending { text-align: center; justify-items: center; }
.pending .row { justify-content: center; }
.pending-icon { font-size: 2.2rem; line-height: 1; }

@media (max-width: 700px) {
  .small-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .more-panel { right: auto; left: 0; }
}

/* Blog */
.post h2 a { color: inherit; text-decoration: none; }
.post .sub { color: var(--muted); font-size: .88rem; margin: 4px 0 10px; }
.post-body { white-space: pre-wrap; line-height: 1.65; margin-top: 8px; }

