/* ===========================================================================
   WEDDING HUB — admin. Deliberately plain and dense: this is a tool, not a
   wedding site. Neutral palette so it never competes with the couple's theme.
   =========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg: #f6f7f8; --panel: #ffffff; --ink: #16191d; --muted: #666e77;
  --line: #e2e6ea; --accent: #2f6f5e; --accent-ink: #fff; --accent-soft: #e8f2ee;
  --warn: #a05a00; --warn-soft: #fdf3e4; --danger: #a32020; --danger-soft: #fbeaea;
  --radius: 6px; --ease: cubic-bezier(.22,.61,.36,1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-force-light]) {
    --bg: #14171a; --panel: #1b1f23; --ink: #eceef0; --muted: #98a1aa;
    --line: #2b3137; --accent: #4c9d86; --accent-ink: #0d1113; --accent-soft: #1e2a27;
    --warn-soft: #2a2115; --danger-soft: #2a1818;
  }
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15px/1.55 Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

.shell { width: min(100% - 2rem, 78rem); margin-inline: auto; padding-bottom: 5rem; }

/* ------------------------------------------------------------------ head -- */
.top { border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; z-index: 20; }
.top__in { width: min(100% - 2rem, 78rem); margin-inline: auto; display: flex; align-items: center; gap: 1rem; padding: .75rem 0; flex-wrap: wrap; }
.logo { font-weight: 600; letter-spacing: -.01em; margin-right: auto; display: flex; align-items: center; gap: .55rem; }
.logo svg { width: 1.15rem; height: 1.15rem; color: var(--accent); }

.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin: 1.5rem 0 1.75rem; overflow-x: auto; }
.tab {
  border: 0; background: none; color: var(--muted); cursor: pointer;
  padding: .7rem 1rem; font: inherit; font-weight: 500; white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all 150ms var(--ease);
}
.tab:hover { color: var(--ink); }
.tab[aria-selected='true'] { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------------------------------------------------------------- panels -- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.25rem; }
.panel__head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.panel__title { font-size: 1.05rem; font-weight: 600; margin: 0; margin-right: auto; }
.panel__sub { color: var(--muted); font-size: .875rem; margin: .25rem 0 0; }

.stats { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; }
.stat__n { font-size: 2rem; font-weight: 600; line-height: 1.1; letter-spacing: -.02em; }
.stat__l { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; margin-top: .3rem; }
.stat--good .stat__n { color: var(--accent); }
.stat--warn .stat__n { color: var(--warn); }

/* ----------------------------------------------------------------- forms -- */
.grid2 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
label.lbl { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .4rem; }
.in, .sel, .ta {
  width: 100%; font: inherit; color: var(--ink); background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem .7rem;
  transition: border-color 150ms var(--ease);
}
.in:focus, .sel:focus, .ta:focus { border-color: var(--accent); }
.ta { min-height: 6rem; resize: vertical; }
.fld { margin-bottom: 1rem; }
.hint { color: var(--muted); font-size: .82rem; margin: .35rem 0 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  font: inherit; font-weight: 500; cursor: pointer;
  padding: .6rem 1.1rem; border-radius: var(--radius);
  border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink);
  transition: opacity 150ms var(--ease);
}
.btn:hover { opacity: .88; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--danger { background: transparent; border-color: var(--line); color: var(--danger); }
.btn--danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn--sm { padding: .35rem .7rem; font-size: .85rem; }
.row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

.switch { display: flex; align-items: flex-start; gap: .7rem; padding: .85rem 0; border-top: 1px solid var(--line); }
.switch:first-of-type { border-top: 0; }
.switch input { width: 1.1rem; height: 1.1rem; margin-top: .18rem; accent-color: var(--accent); flex: none; cursor: pointer; }
.switch__t { font-weight: 500; display: block; cursor: pointer; }
.switch__d { color: var(--muted); font-size: .85rem; }

/* ---------------------------------------------------------------- tables -- */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: .65rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--accent-soft); }
td.num { text-align: right; font-variant-numeric: tabular-nums; }

.pill { display: inline-block; font-size: .72rem; font-weight: 600; padding: .18rem .5rem; border-radius: 999px; letter-spacing: .03em; white-space: nowrap; }
.pill--yes { background: var(--accent-soft); color: var(--accent); }
.pill--no { background: var(--danger-soft); color: var(--danger); }
.pill--wait { background: var(--warn-soft); color: var(--warn); }
.code { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: .85rem; background: var(--bg); padding: .12rem .4rem; border-radius: 3px; border: 1px solid var(--line); }

/* ---------------------------------------------------------------- photos -- */
.photos { display: grid; gap: .85rem; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); }
.ph { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.ph img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--bg); }
.ph__meta { padding: .5rem .6rem; font-size: .78rem; color: var(--muted); }
.ph__acts { display: flex; gap: .3rem; padding: 0 .6rem .6rem; }
.ph__acts .btn { flex: 1; padding: .3rem; font-size: .78rem; }

.drop {
  border: 1px dashed var(--line); border-radius: var(--radius); padding: 2rem 1rem;
  text-align: center; cursor: pointer; color: var(--muted); transition: all 150ms var(--ease);
}
.drop:hover, .drop.is-over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

/* --------------------------------------------------------------- utility -- */
.muted { color: var(--muted); }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.hide { display: none !important; }
.sp { height: 1.25rem; }
.right { margin-left: auto; }
.wh-toasts { position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%); z-index: 90; display: grid; gap: .5rem; width: min(92vw, 26rem); }
.wh-toast { background: var(--ink); color: var(--panel); padding: .8rem 1.1rem; border-radius: var(--radius); font-size: .88rem; box-shadow: 0 12px 32px -12px rgb(0 0 0 / 45%); }
.wh-toast--error { background: var(--danger); color: #fff; }
.wh-toast--success { background: var(--accent); color: var(--accent-ink); }
.wh-toast.is-out { opacity: 0; transition: opacity 300ms; }

.login { max-width: 24rem; margin: 5rem auto; }
.banner { background: var(--warn-soft); color: var(--warn); border: 1px solid currentColor; border-radius: var(--radius); padding: .8rem 1rem; font-size: .88rem; margin-bottom: 1.25rem; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; } }
