:root {
  --bg: #0A0A09;
  --bg-raised: #12110E;
  --bg-card: #100F0D;
  --gold: #C79A3E;
  --gold-light: #F2D693;
  --gold-lighter: #F6D98A;
  --gold-line: rgba(231, 196, 107, .16);
  --gold-line-soft: rgba(231, 196, 107, .1);
  --ink: #EDE7DC;
  --ink-strong: #F3EBDB;
  --ink-soft: #9A9285;
  --muted: #8A8378;
  --dim: #6E675C;
  --danger: #E05C4B;
  --danger-soft: #E07B6A;
  --success: #9BD8A0;
  --warn: #E9B45C;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Noto Sans SC', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --mono: ui-monospace, Menlo, monospace;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
}

html[lang="en"] {
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Manrope', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; overflow: hidden; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold-light); text-decoration: none; }
a:hover { color: var(--gold-lighter); }
button, input, textarea, select { font-family: inherit; }
button { cursor: pointer; }
::-webkit-scrollbar { width: 0; height: 0; }

@keyframes ccpulse { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
@keyframes ccfade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.cc-shell {
  max-width: 480px;
  margin: 0 auto;
  height: 100vh;
  height: 100dvh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  position: relative;
  border-left: 1px solid var(--gold-line-soft);
  border-right: 1px solid var(--gold-line-soft);
}

.cc-page { animation: ccfade .3s ease both; }

.cc-btn-primary {
  padding: 13px; border-radius: 10px; border: none;
  background: linear-gradient(120deg, var(--gold-light), var(--gold));
  color: #14100A; font: 600 12.5px var(--sans); cursor: pointer;
}
.cc-btn-ghost {
  padding: 13px; border-radius: 10px; border: 1px solid rgba(231,196,107,.3);
  background: transparent; color: #E7C46B; font: 600 12.5px var(--sans); cursor: pointer;
}
.cc-btn-primary:disabled, .cc-btn-ghost:disabled { opacity: .5; cursor: default; }

.cc-input {
  width: 100%; padding: 12px 13px; border-radius: 10px;
  border: 1px solid rgba(231,196,107,.2); background: rgba(231,196,107,.04);
  color: var(--ink); font: 400 12.5px var(--sans); outline: none;
}
.cc-input::placeholder { color: var(--dim); }

.cc-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--gold-line); font: 500 10.5px var(--sans); cursor: pointer; color: var(--ink);
  background: transparent;
}

/* ---------- Admin desktop shell (responsive) ---------- */
.adm-root { height: 100vh; height: 100dvh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); }
.adm-top {
  flex: none; height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 20px; border-bottom: 1px solid var(--gold-line-soft); background: var(--bg); position: relative; z-index: 30;
}
.adm-top-left, .adm-top-right { display: flex; align-items: center; gap: 14px; min-width: 0; }
.adm-body { flex: 1; min-height: 0; display: flex; position: relative; }
.adm-side {
  flex: none; width: 264px; overflow-y: auto; overflow-x: hidden; padding: 18px 10px 28px;
  border-right: 1px solid var(--gold-line-soft); background: var(--bg-raised); transition: width .22s ease;
}
.adm-side.collapsed { width: 68px; padding-left: 8px; padding-right: 8px; }
.adm-main { flex: 1; min-width: 0; overflow-y: auto; overflow-x: hidden; }
.adm-content { max-width: 960px; margin: 0 auto; padding: 30px 32px 64px; display: flex; flex-direction: column; gap: 16px; }
.adm-backdrop { display: none; }

.adm-icon-btn {
  width: 38px; height: 38px; padding: 0; display: inline-flex; align-items: center; justify-content: center; flex: none;
  border-radius: 10px; border: 1px solid var(--gold-line); background: transparent; color: #E7C46B; cursor: pointer;
}
.adm-icon-btn:hover, .adm-signout:hover { background: rgba(231,196,107,.09); }
.adm-signout {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--gold-line); background: transparent; color: #E7C46B; font: 500 12px var(--sans); cursor: pointer; white-space: nowrap;
}
.adm-avatar {
  flex: none; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(140deg, #F2D693, #A9782E); color: #14100A; font: 600 13px var(--sans); text-transform: uppercase;
}
.adm-mod { display: flex; flex-direction: column; gap: 2px; margin-bottom: 20px; }
.adm-mod-label {
  display: flex; align-items: center; gap: 10px; padding: 6px 10px 8px; color: var(--gold);
  font: 600 9.5px var(--mono); letter-spacing: .18em; text-transform: uppercase;
}
.adm-item {
  display: block; width: 100%; text-align: left; padding: 9px 12px 9px 38px; border-radius: 9px;
  border: 1px solid transparent; background: transparent; color: var(--ink); font: 500 13px var(--sans); cursor: pointer;
}
.adm-item:hover { background: rgba(231,196,107,.06); }
.adm-item.active { background: rgba(231,196,107,.13); border-color: var(--gold-line); color: var(--gold-lighter); }
.adm-rail-btn {
  width: 50px; height: 46px; margin: 0 auto 6px; padding: 0; display: flex; align-items: center; justify-content: center;
  border-radius: 11px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer;
}
.adm-rail-btn:hover { background: rgba(231,196,107,.06); color: var(--ink); }
.adm-rail-btn.active { background: rgba(231,196,107,.13); border-color: var(--gold-line); color: var(--gold-lighter); }
.adm-pills { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 2px; }
.adm-pill {
  flex: none; padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(231,196,107,.24); background: transparent;
  color: var(--ink); font: 500 12px var(--sans); cursor: pointer;
}
.adm-pill.active { background: linear-gradient(120deg, #F2D693, #C79A3E); color: #14100A; border-color: transparent; }
.adm-icon-btn:focus-visible, .adm-signout:focus-visible, .adm-item:focus-visible, .adm-rail-btn:focus-visible, .adm-pill:focus-visible {
  outline: 2px solid var(--gold-light); outline-offset: 2px;
}

/* Standalone sign-in screen for /admin */
.adm-login { height: 100vh; height: 100dvh; overflow-y: auto; display: grid; place-items: center; padding: 24px 16px; background: var(--bg); position: relative; }
.adm-login-card {
  width: 100%; max-width: 380px; display: flex; flex-direction: column; align-items: center; gap: 18px;
  padding: 34px 28px 28px; border-radius: 18px; border: 1px solid var(--gold-line); background: var(--bg-card);
}

@media (max-width: 899px) {
  .adm-side, .adm-side.collapsed {
    position: absolute; top: 0; bottom: 0; left: 0; z-index: 40; width: min(300px, 86vw); padding: 18px 10px 28px;
    transform: translateX(-102%); transition: transform .24s ease; box-shadow: 0 0 44px rgba(0,0,0,.65);
  }
  .adm-side.open { transform: none; }
  .adm-backdrop.open { display: block; position: absolute; inset: 0; z-index: 35; background: rgba(0,0,0,.55); }
  .adm-content { padding: 22px 16px 56px; }
  .adm-top { padding: 0 14px; }
}
@media (max-width: 640px) {
  .adm-hide-sm { display: none !important; }
}
@media (max-width: 460px) {
  .adm-hide-xs { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .adm-side { transition: none; }
}
