/* =========================================================================
   Zen Studio — Victoria J. Burns
   Palette pulled from the artwork: ink on cream paper, plus the teal, coral,
   saffron, violet and leaf that run through her pattern paintings.
   ========================================================================= */

:root {
  --paper: #FBF7EF;
  --paper-2: #F3ECDF;
  --card: #FFFFFF;
  --ink: #1E1B18;
  --ink-2: #4A443D;
  --muted: #7A7268;
  --line: #E4DACB;

  --teal: #138A8A;
  --teal-dark: #0E6B6B;
  --coral: #EE6A4D;
  --saffron: #F2B233;
  --violet: #6A4C9B;
  --leaf: #5E9B47;
  --rose: #D9577E;

  --ok: #2F7D4A;
  --warn: #B7791F;
  --bad: #B83A3A;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(30, 27, 24, .06), 0 8px 24px rgba(30, 27, 24, .08);
  --shadow-lg: 0 2px 4px rgba(30, 27, 24, .06), 0 18px 48px rgba(30, 27, 24, .14);
  --wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);
  /* faint paper grain */
  background-image: radial-gradient(rgba(30, 27, 24, .035) 1px, transparent 1px);
  background-size: 22px 22px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--teal-dark); text-underline-offset: 3px; }
a:hover { color: var(--coral); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -.01em;
  margin: 0 0 .5em;
  font-optical-sizing: auto;
}
h1 { font-size: clamp(2.3rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

.sr, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 6px; }

:focus-visible { outline: 3px solid var(--saffron); outline-offset: 2px; border-radius: 4px; }

.eyebrow {
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin-bottom: .8em;
  display: inline-flex;
  align-items: center;
  gap: .6em;
}
.eyebrow::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%;
  background: var(--coral); box-shadow: 14px 0 0 var(--saffron), 28px 0 0 var(--violet);
  margin-right: 30px;
}

.lead { font-size: 1.2rem; color: var(--ink-2); max-width: 40em; }
.muted { color: var(--muted); }
.muted-light { color: rgba(251, 247, 239, .65); }
.center { text-align: center; }
em.accent { font-style: italic; color: var(--teal); }

.ribbon {
  height: 18px;
  background: url("../images/ribbon.svg") repeat-x center / auto 18px;
  opacity: .9;
}

/* ---- Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font: 600 1rem/1 var(--sans);
  padding: .95em 1.5em;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
}
.btn:hover { color: var(--paper); background: var(--teal-dark); border-color: var(--teal-dark); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-outline { background: transparent; color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-coral { background: var(--coral); border-color: var(--coral); color: #fff; }
.btn-coral:hover { background: #d9553a; border-color: #d9553a; }
.btn-venmo { background: #008CFF; border-color: #008CFF; color: #fff; }
.btn-venmo:hover { background: #0074d4; border-color: #0074d4; }
.btn-small { padding: .6em 1.1em; font-size: .92rem; }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-danger:hover { background: #962d2d; border-color: #962d2d; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); padding-inline: .6em; }
.btn-ghost:hover { background: var(--paper-2); color: var(--ink); border-color: transparent; box-shadow: none; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---- Header ----------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(251, 247, 239, .94); backdrop-filter: saturate(1.4) blur(8px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { width: 40px; height: 40px; transition: transform .6s ease; }
.brand:hover img { transform: rotate(90deg); }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; letter-spacing: -.01em; }
.brand-sub { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }

.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a:not(.btn) {
  color: var(--ink); text-decoration: none; font-weight: 500; padding: .5em .8em; border-radius: 999px;
}
.site-nav a:not(.btn):hover, .site-nav a.active:not(.btn) { background: var(--paper-2); color: var(--ink); }
.site-nav a.active:not(.btn) { box-shadow: inset 0 -2px 0 var(--coral); border-radius: 0; background: none; }
.site-nav .btn { margin-left: 8px; }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span:not(.sr) { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: transform .2s; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--paper); padding: 12px 16px 20px; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow); display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) { padding: .8em 1em; }
  .site-nav .btn { margin: 8px 0 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---- Sections --------------------------------------------------------- */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-tight { padding: clamp(36px, 5vw, 64px) 0; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 36px; }
.section-head h2 { margin: 0; }
.page-head { padding: clamp(40px, 6vw, 80px) 0 clamp(24px, 3vw, 40px); }
.page-head h1 { max-width: 16em; }

.ink-band { background: var(--ink); color: var(--paper); position: relative; overflow: hidden; }
.ink-band h2, .ink-band h3 { color: var(--paper); }
.ink-band .eyebrow { color: var(--saffron); }
.ink-band a:not(.btn) { color: var(--saffron); }
.ink-band .btn-outline { color: var(--paper); border-color: var(--paper); }
.ink-band .btn-outline:hover { background: var(--paper); color: var(--ink); }

.tint-band { background: var(--paper-2); }

/* ---- Hero ------------------------------------------------------------- */
.hero { padding: clamp(40px, 6vw, 88px) 0 clamp(56px, 7vw, 100px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { font-weight: 400; }
.hero h1 em { font-style: italic; color: var(--teal); }
.hero h1 .ink-word { position: relative; white-space: nowrap; }
.hero h1 .ink-word::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .02em; height: .14em;
  background: url("../images/ribbon.svg") repeat-x left center / auto 100%;
}
.hero .lead { margin-bottom: 1.6em; }

.hero-wall { position: relative; aspect-ratio: 1 / 1.02; }
.hero-wall .frame { position: absolute; }
.hero-wall .frame:nth-child(1) { width: 56%; left: 0; top: 4%; transform: rotate(-3deg); z-index: 2; }
.hero-wall .frame:nth-child(2) { width: 50%; right: 0; top: 0; transform: rotate(2.5deg); }
.hero-wall .frame:nth-child(3) { width: 48%; right: 6%; bottom: 0; transform: rotate(-1.5deg); z-index: 3; }
.hero-wall .frame img { aspect-ratio: 3 / 4; object-fit: cover; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-wall { max-width: 520px; margin: 0 auto; width: 100%; }
}

/* Matted "frame" look used on art thumbnails */
.frame {
  background: var(--card);
  padding: 10px;
  border-radius: 4px;
  box-shadow: var(--shadow-lg);
  display: block;
}
.frame img { width: 100%; border-radius: 2px; }

/* ---- Exhibit banner --------------------------------------------------- */
.exhibit-banner { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.exhibit-banner .detail-list { margin: 24px 0 28px; }
.exhibit-banner .collage { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.exhibit-banner .collage img { aspect-ratio: 1; object-fit: cover; border-radius: 6px; border: 6px solid #fff; }
.exhibit-banner .collage img:nth-child(odd) { transform: translateY(18px); }
@media (max-width: 860px) { .exhibit-banner { grid-template-columns: 1fr; } }

.detail-list { display: grid; gap: 12px; padding: 0; margin: 0; list-style: none; }
.detail-list li { display: flex; gap: 12px; align-items: flex-start; }
.detail-list .dot { flex: 0 0 12px; height: 12px; margin-top: .45em; border-radius: 50%; background: var(--saffron); }
.detail-list li:nth-child(2) .dot { background: var(--coral); }
.detail-list li:nth-child(3) .dot { background: var(--teal); }
.detail-list li:nth-child(4) .dot { background: var(--violet); }
.detail-list strong { display: block; font-weight: 600; }

/* ---- Art grid --------------------------------------------------------- */
.art-grid { columns: 3 300px; column-gap: 28px; }
/* Safari drops or flickers items inside CSS columns when they are transformed or repainted.
   Inline-block cards plus a position-based lift (no transform) keep WebKit stable. */
.art-card {
  -webkit-column-break-inside: avoid; break-inside: avoid; page-break-inside: avoid;
  display: inline-block; width: 100%; vertical-align: top;
  margin: 0 0 28px; text-decoration: none; color: var(--ink);
}
.art-card .frame { position: relative; top: 0; transition: top .25s ease, box-shadow .25s ease; }
.art-card:hover .frame { top: -4px; box-shadow: 0 4px 8px rgba(30,27,24,.08), 0 26px 60px rgba(30,27,24,.18); }
.art-card:hover { color: var(--ink); }
.art-card .meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 14px 4px 0; }
.art-grid + p { margin-top: 12px; }
.art-card h3 { font-size: 1.15rem; margin: 0; }
.art-card .sub { font-size: .9rem; color: var(--muted); }
.art-card .price { font-weight: 700; white-space: nowrap; }

.badge {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: .35em .75em; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); white-space: nowrap;
}
.badge-available { background: #E2F2EC; color: #156B4E; }
.badge-reserved { background: #FCF0D6; color: #8A5A0A; }
.badge-sold { background: #FBE3DD; color: #A63A22; }
.badge-privatecollection, .badge-notforsale { background: var(--paper-2); color: var(--ink-2); }
.frame .badge { position: absolute; top: 18px; left: 18px; box-shadow: 0 2px 8px rgba(0,0,0,.12); }

/* filter chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.chip {
  border: 1.5px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none;
  padding: .45em 1em; border-radius: 999px; font-weight: 500; font-size: .95rem;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip-sep { width: 1px; background: var(--line); margin: 0 6px; }

/* ---- Two worlds ------------------------------------------------------- */
.worlds { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.world {
  position: relative; border-radius: var(--radius); overflow: hidden; min-height: 420px;
  display: flex; align-items: flex-end; text-decoration: none; color: #fff; box-shadow: var(--shadow-lg);
}
.world img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.world:hover img { transform: scale(1.04); }
.world::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(20,18,16,.82)); }
.world .world-body { position: relative; z-index: 1; padding: 28px; }
.world h3 { font-size: 2rem; color: #fff; margin-bottom: .2em; }
.world p { margin: 0; color: rgba(255,255,255,.85); }
.world:hover { color: #fff; }
@media (max-width: 760px) { .worlds { grid-template-columns: 1fr; } .world { min-height: 340px; } }

/* ---- Steps ------------------------------------------------------------ */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; counter-reset: step; }
.step { background: var(--card); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); position: relative; }
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  font: 600 1.2rem var(--serif); color: #fff; background: var(--teal); margin-bottom: 16px;
}
.step:nth-child(2)::before { background: var(--coral); }
.step:nth-child(3)::before { background: var(--saffron); color: var(--ink); }
.step:nth-child(4)::before { background: var(--violet); }
.step h3 { margin-bottom: .3em; }
.step p { margin: 0; color: var(--ink-2); }
.ink-band .step { background: rgba(255,255,255,.06); box-shadow: none; border: 1px solid rgba(255,255,255,.12); }
.ink-band .step p { color: rgba(251,247,239,.75); }

/* ---- Artwork detail --------------------------------------------------- */
.art-detail { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; padding-top: 36px; }
.art-detail .frame { padding: 16px; cursor: zoom-in; }
.art-detail .info { position: sticky; top: 110px; }
.art-detail .price-big { font: 500 2rem var(--serif); margin: 8px 0 20px; }
.spec { list-style: none; padding: 0; margin: 24px 0; border-top: 1px solid var(--line); }
.spec li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.spec li span:first-child { color: var(--muted); }
.spec li span:last-child { text-align: right; }
.note-card { background: var(--paper-2); border-radius: var(--radius); padding: 20px 22px; margin-top: 20px; }
.note-card p:last-child { margin: 0; }
.back-link { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 500; color: var(--ink-2); }
@media (max-width: 900px) { .art-detail { grid-template-columns: 1fr; } .art-detail .info { position: static; } }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(20,18,16,.94); display: none; place-items: center; padding: 24px; cursor: zoom-out; }
.lightbox.open { display: grid; }
.lightbox img { max-width: 100%; max-height: 92vh; object-fit: contain; box-shadow: 0 20px 80px rgba(0,0,0,.5); }
.lightbox button { position: absolute; top: 16px; right: 16px; background: rgba(255,255,255,.12); color: #fff; border: 0; width: 44px; height: 44px; border-radius: 50%; font-size: 1.5rem; cursor: pointer; }

/* ---- Forms ------------------------------------------------------------ */
.form-card { background: var(--card); border-radius: var(--radius); padding: clamp(22px, 4vw, 40px); box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-weight: 600; font-size: .95rem; }
.field .hint { font-size: .85rem; color: var(--muted); }
.field .optional { font-weight: 400; color: var(--muted); font-size: .85rem; }

input[type=text], input[type=email], input[type=tel], input[type=number], input[type=password], input[type=date],
input[type=url], input[type=search], select, textarea {
  font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: .75em .9em; width: 100%; transition: border-color .15s, box-shadow .15s, background .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); background: #fff; box-shadow: 0 0 0 4px rgba(19,138,138,.15); }
textarea { min-height: 140px; resize: vertical; }
input[type=file] { font: inherit; font-size: .95rem; padding: 14px; border: 1.5px dashed var(--line); border-radius: var(--radius-sm); background: var(--paper); width: 100%; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.check input { width: 18px; height: 18px; accent-color: var(--teal); }

.radio-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.radio-cards label {
  display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px; cursor: pointer; background: var(--paper); font-weight: 500;
}
.radio-cards label:has(input:checked) { border-color: var(--teal); background: #EEF7F6; }
.radio-cards input { accent-color: var(--teal); margin-top: 4px; }
.radio-cards small { display: block; font-weight: 400; color: var(--muted); }

.field-validation-error, .text-danger { color: var(--bad); font-size: .88rem; }
.input-validation-error { border-color: var(--bad) !important; }
.validation-summary-errors ul { margin: 0; padding-left: 1.2em; }
.validation-summary-valid { display: none; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; } /* honeypot */

.alert { border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 20px; border: 1px solid; }
.alert-ok { background: #E8F4EC; border-color: #BFE0CB; color: #1E5A35; }
.alert-warn { background: #FDF4E2; border-color: #F2DAA6; color: #6E4A0B; }
.alert-bad { background: #FBEAEA; border-color: #EEC2C2; color: #7E2323; }
.alert p:last-child { margin: 0; }

/* ---- Layout helpers --------------------------------------------------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.stack > * + * { margin-top: 16px; }
.card { background: var(--card); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }

.pay-card { text-align: center; }
.pay-card .qr { width: 220px; margin: 18px auto; border-radius: 10px; border: 1px solid var(--line); padding: 8px; background: #fff; }
.pay-card .amount { font: 500 2.6rem var(--serif); margin: 4px 0; }
.ref { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-weight: 700; background: var(--paper-2); padding: .15em .5em; border-radius: 6px; letter-spacing: .04em; }

.prose { max-width: 42em; }
.prose p { color: var(--ink-2); }
.portrait-frame { transform: rotate(-2deg); max-width: 440px; }

/* ---- Footer ----------------------------------------------------------- */
.site-footer { background: var(--ink); color: var(--paper); margin-top: 40px; }
.site-footer .ribbon { background-color: var(--paper); opacity: 1; }
.footer-inner { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 32px; padding-top: 48px; padding-bottom: 32px; }
.footer-brand { font: 600 1.6rem var(--serif); margin: 0 0 4px; }
.site-footer nav, .footer-contact { display: flex; flex-direction: column; gap: 8px; }
.site-footer a { color: var(--paper); text-decoration: none; opacity: .85; }
.site-footer a:hover { color: var(--saffron); opacity: 1; }
.footer-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 18px; padding-bottom: 28px; border-top: 1px solid rgba(251,247,239,.12); font-size: .85rem; color: rgba(251,247,239,.55); }
.footer-base .admin-link { color: rgba(251,247,239,.4); }
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr; } }

/* ---- Admin ------------------------------------------------------------ */
.admin-body { background: var(--paper-2); }
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-side { background: var(--ink); color: var(--paper); padding: 22px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.admin-side .brand { color: var(--paper); margin: 0 8px 22px; }
.admin-side .brand-sub { color: rgba(251,247,239,.5); }
.admin-side a.nav-item {
  color: rgba(251,247,239,.8); text-decoration: none; padding: .65em .9em; border-radius: 10px; font-weight: 500;
  display: flex; justify-content: space-between; align-items: center;
}
.admin-side a.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-side a.nav-item.active { background: rgba(255,255,255,.12); color: #fff; box-shadow: inset 3px 0 0 var(--saffron); }
.admin-side .count { background: var(--coral); color: #fff; font-size: .75rem; font-weight: 700; border-radius: 999px; padding: .1em .55em; }
.admin-side .side-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.1); display: flex; flex-direction: column; gap: 4px; }
.admin-side .side-foot button { background: none; border: 0; font: inherit; color: rgba(251,247,239,.6); padding: .65em .9em; text-align: left; cursor: pointer; border-radius: 10px; }
.admin-side .side-foot button:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-main { padding: 28px clamp(16px, 3vw, 40px) 60px; min-width: 0; }
.admin-main h1 { font-size: 2rem; }
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.admin-top h1 { margin: 0; }
.admin-mobile-bar { display: none; }
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; padding: 12px; }
  .admin-side .brand { width: 100%; margin-bottom: 8px; }
  .admin-side .side-foot { margin: 0; padding: 0; border: 0; flex-direction: row; }
}

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); border-top: 4px solid var(--teal); }
.stat:nth-child(2) { border-top-color: var(--coral); }
.stat:nth-child(3) { border-top-color: var(--saffron); }
.stat:nth-child(4) { border-top-color: var(--violet); }
.stat:hover { color: var(--ink); box-shadow: var(--shadow-lg); }
.stat .num { font: 500 2.2rem var(--serif); line-height: 1; }
.stat .lbl { color: var(--muted); font-size: .9rem; margin-top: 6px; }

.table-wrap { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.data th { text-align: left; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 14px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr.unread td { background: #FFFBF2; font-weight: 600; }
table.data tr.blocked td { opacity: .55; }
table.data .thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; }
table.data a { text-decoration: none; font-weight: 600; color: var(--ink); }
table.data a:hover { color: var(--teal-dark); }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); }

.admin-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 24px; align-items: start; }
@media (max-width: 1100px) { .admin-grid { grid-template-columns: 1fr; } }
.admin-grid .preview img { border-radius: 8px; width: 100%; }

.thread { display: flex; flex-direction: column; gap: 12px; }
.bubble { max-width: 80%; padding: 12px 16px; border-radius: 18px; background: var(--paper-2); white-space: pre-wrap; }
.bubble.me { align-self: flex-end; background: var(--teal); color: #fff; }
.bubble .when { display: block; font-size: .75rem; opacity: .7; margin-top: 4px; }

.inline-form { display: inline; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.toolbar select, .toolbar input { width: auto; }
.thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.thumbs img { width: 120px; height: 120px; object-fit: cover; border-radius: 8px; }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: 100%; max-width: 420px; }
.block-grid { grid-template-columns: 180px 1fr 1fr auto; align-items: end; }
@media (max-width: 900px) { .block-grid { grid-template-columns: 1fr; } }
.config-row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.config-row:last-child { border-bottom: 0; }
.config-row code { font-size: .85rem; background: var(--paper-2); padding: .15em .45em; border-radius: 5px; }
.ok-dot, .no-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; }
.ok-dot { background: var(--ok); } .no-dot { background: var(--line); }
