/* Admin UI (standalone): intentionally not shared with the public site. */
:root {
  --a-bg: #fbf7ef;
  --a-ink: #101318;
  --a-muted: rgba(16, 19, 24, 0.62);
  --a-border: rgba(16, 19, 24, 0.12);
  --a-panel: rgba(255, 255, 255, 0.82);
  --a-panel-solid: #ffffff;
  --a-shadow: 0 22px 70px rgba(10, 12, 18, 0.16);
  --a-shadow-tight: 0 12px 28px rgba(10, 12, 18, 0.12);
  --a-accent: #e11d48; /* rose */
  --a-accent-2: #0ea5e9; /* sky */
  --a-ok: #16a34a;
  --a-warn: #f59e0b;
  --a-danger: #dc2626;

  --a-radius: 18px;
  --a-radius-sm: 14px;
  --a-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--a-ink);
  background: var(--a-bg);
  font-family: "IBM Plex Sans", system-ui, -apple-system, Segoe UI, sans-serif;
}

/* Subtle “press paper” texture */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1200px 700px at 20% -10%, rgba(225, 29, 72, 0.12), transparent 60%),
    radial-gradient(900px 600px at 95% 10%, rgba(14, 165, 233, 0.12), transparent 60%),
    repeating-linear-gradient(0deg, rgba(16, 19, 24, 0.03) 0, rgba(16, 19, 24, 0.03) 1px, transparent 1px, transparent 10px),
    repeating-linear-gradient(90deg, rgba(16, 19, 24, 0.02) 0, rgba(16, 19, 24, 0.02) 1px, transparent 1px, transparent 12px);
  opacity: 0.95;
  mix-blend-mode: multiply;
}

a { color: inherit; }

.a-shell {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
}

.a-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 18px;
  border-right: 1px solid var(--a-border);
  background: linear-gradient(180deg, rgba(255,255,255,0.55), rgba(255,255,255,0.15));
  backdrop-filter: blur(10px);
}

.a-brand {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 10px 14px;
  border-radius: var(--a-radius-sm);
}
.a-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background:
    radial-gradient(16px 16px at 30% 25%, rgba(255,255,255,0.7), transparent 60%),
    linear-gradient(135deg, var(--a-accent), var(--a-accent-2));
  box-shadow: 0 16px 30px rgba(225, 29, 72, 0.22);
}
.a-brand strong {
  font-family: "Fraunces", serif;
  font-variation-settings: "opsz" 72;
  font-size: 18px;
  letter-spacing: 0.2px;
}
.a-brand span {
  color: var(--a-muted);
  font-size: 12px;
  margin-top: 2px;
  display: block;
}

.a-nav {
  margin-top: 18px;
  display: grid;
  gap: 8px;
}
.a-nav a {
  text-decoration: none;
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid transparent;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}
.a-nav a:hover {
  background: rgba(255,255,255,0.55);
  border-color: rgba(16, 19, 24, 0.10);
  transform: translateY(-1px);
}
.a-nav a[aria-current="page"] {
  background: rgba(255,255,255,0.78);
  border-color: rgba(16, 19, 24, 0.14);
  box-shadow: 0 10px 22px rgba(10, 12, 18, 0.08);
}
.a-nav .a-nav-ico {
  width: 18px;
  height: 18px;
  opacity: 0.9;
}

.a-side-footer {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding-top: 14px;
  border-top: 1px dashed rgba(16, 19, 24, 0.18);
  color: var(--a-muted);
  font-size: 12px;
}

.a-main {
  padding: 26px 28px 48px;
}

.a-topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.a-title h1 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: clamp(26px, 2.6vw, 34px);
  letter-spacing: 0.2px;
}
.a-title p {
  margin: 8px 0 0;
  color: var(--a-muted);
  font-size: 13px;
}

.a-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.a-btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}
.a-btn:hover { transform: translateY(-1px); box-shadow: var(--a-shadow-tight); }
.a-btn:active { transform: translateY(0); box-shadow: none; }
.a-btn.primary { background: var(--a-ink); color: #fff; }
.a-btn.ghost { background: rgba(255,255,255,0.55); border-color: rgba(16, 19, 24, 0.10); }
.a-btn.danger { background: rgba(225, 29, 72, 0.12); border-color: rgba(225, 29, 72, 0.25); color: #9f1239; }

.a-card {
  background: var(--a-panel);
  border: 1px solid rgba(16, 19, 24, 0.12);
  border-radius: var(--a-radius);
  box-shadow: var(--a-shadow);
  overflow: hidden;
}
.a-card.pad { padding: 18px; }

.a-grid {
  display: grid;
  gap: 14px;
}

.a-notice {
  border-radius: var(--a-radius-sm);
  padding: 12px 14px;
  border: 1px solid rgba(16, 19, 24, 0.12);
  background: rgba(255,255,255,0.7);
  font-size: 13px;
}
.a-notice.err { border-color: rgba(220,38,38,0.25); background: rgba(220,38,38,0.08); color: #7f1d1d; }
.a-notice.ok { border-color: rgba(22,163,74,0.25); background: rgba(22,163,74,0.08); color: #14532d; }

.a-form label {
  display: block;
  font-weight: 650;
  margin: 10px 0 6px;
  font-size: 12px;
  letter-spacing: 0.2px;
  color: rgba(16,19,24,0.85);
}
.a-form input[type="text"],
.a-form input[type="password"],
.a-form input[type="number"],
.a-form input[type="file"],
.a-form select,
.a-form textarea {
  width: 100%;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid rgba(16, 19, 24, 0.14);
  background: rgba(255,255,255,0.85);
  outline: none;
  font: inherit;
}
.a-form textarea { resize: vertical; min-height: 110px; }
.a-form input:focus,
.a-form select:focus,
.a-form textarea:focus {
  border-color: rgba(225, 29, 72, 0.5);
  box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.12);
}

.a-row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
}
.a-col-6 { grid-column: span 6; }
.a-col-4 { grid-column: span 4; }
.a-col-3 { grid-column: span 3; }
.a-col-12 { grid-column: span 12; }

.a-table {
  width: 100%;
  border-collapse: collapse;
}
.a-table th, .a-table td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(16, 19, 24, 0.10);
  vertical-align: middle;
  font-size: 13px;
}
.a-table th { color: var(--a-muted); font-weight: 700; }
.a-table td.actions { white-space: nowrap; }
.a-pill {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  border: 1px solid rgba(16, 19, 24, 0.12);
  background: rgba(255,255,255,0.65);
}
.a-thumb {
  width: 74px;
  height: 50px;
  border-radius: 14px;
  border: 1px solid rgba(16, 19, 24, 0.12);
  background: rgba(255,255,255,0.7);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.a-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.a-thumb span { color: var(--a-muted); font-size: 12px; }

.a-code {
  background: #0b1220;
  color: #e2e8f0;
  border-radius: 16px;
  border: 1px solid rgba(226, 232, 240, 0.10);
  padding: 12px 14px;
  overflow: auto;
  font-family: var(--a-mono);
  font-size: 12px;
  line-height: 1.35;
}

/* Dropzone */
.a-drop {
  border: 1px dashed rgba(16, 19, 24, 0.28);
  border-radius: var(--a-radius);
  background: rgba(255,255,255,0.6);
  padding: 14px;
  display: grid;
  gap: 12px;
  position: relative;
}
.a-drop.is-dragover {
  border-color: rgba(225, 29, 72, 0.7);
  background: rgba(255,255,255,0.86);
  box-shadow: 0 0 0 6px rgba(225, 29, 72, 0.10);
}
.a-drop input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.a-drop .hint {
  color: var(--a-muted);
  font-size: 12px;
}
.a-preview {
  width: 100%;
  max-height: 240px;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(16, 19, 24, 0.12);
  background: #fff;
}
.a-preview img { width: 100%; height: 240px; object-fit: cover; display: block; }

/* Login */
.a-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.a-login-card {
  width: min(540px, 92vw);
  background: var(--a-panel);
  border: 1px solid rgba(16, 19, 24, 0.12);
  border-radius: 24px;
  box-shadow: var(--a-shadow);
  overflow: hidden;
}
.a-login-head {
  padding: 22px 22px 10px;
  border-bottom: 1px solid rgba(16, 19, 24, 0.10);
  background: linear-gradient(135deg, rgba(225,29,72,0.12), rgba(14,165,233,0.10));
}
.a-login-head h1 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: 28px;
}
.a-login-head p { margin: 8px 0 0; color: var(--a-muted); font-size: 13px; }
.a-login-body { padding: 18px 22px 22px; }

@media (max-width: 920px) {
  .a-shell { grid-template-columns: 1fr; }
  .a-sidebar { position: relative; height: auto; border-right: 0; border-bottom: 1px solid var(--a-border); }
  .a-side-footer { position: relative; left: auto; right: auto; bottom: auto; margin-top: 14px; }
  .a-main { padding: 18px 16px 38px; }
  .a-row { gap: 10px; }
  .a-col-6, .a-col-4, .a-col-3 { grid-column: span 12; }
}
