/* Admin dashboard — same Moonlit Mediterranean identity, working tool. */
:root {
  --midnight: #0E1A17; --emerald: #14302A; --emerald-2: #0B201B;
  --gold: #C9A24B; --gold-soft: #E8D39A; --gold-deep: #A07C2E;
  --ivory: #F6F1E7; --ivory-dim: #cfc7b6; --blush: #E3B7B0;
  --glass-bg: rgba(20,48,42,0.34); --glass-border: rgba(201,162,75,0.26);
  --f-display: "Fraunces", serif; --f-script: "Tangerine", cursive;
  --f-ui: "Jost", system-ui, sans-serif;
  --shadow: 0 24px 60px -24px rgba(0,0,0,0.7);
  --ease: cubic-bezier(0.22,1,0.36,1);
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; font-family: var(--f-ui); color: var(--ivory);
  background:
    radial-gradient(70% 50% at 50% -10%, rgba(201,162,75,0.12), transparent 60%),
    linear-gradient(160deg, var(--emerald-2), var(--midnight) 60%, #08120f);
  min-height: 100vh; -webkit-font-smoothing: antialiased;
}
a { color: var(--gold-soft); }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 2px; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 2rem 1.2rem 4rem; }

/* Header */
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.admin-head .brand { font-family: var(--f-script); font-size: 2.6rem; line-height: 1; color: var(--gold-soft); }
.admin-head .sub { font-size: 0.66rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ivory-dim); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .7rem 1.2rem; border: none; border-radius: 12px;
  letter-spacing: .12em; text-transform: uppercase; font-size: .72rem; font-weight: 500; color: var(--midnight);
  background: linear-gradient(180deg, var(--gold-soft), var(--gold)); box-shadow: 0 12px 26px -12px rgba(201,162,75,.7);
  transition: transform .2s var(--ease); }
.btn:hover { transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--gold-soft); border: 1px solid var(--glass-border); box-shadow: none; }
.btn-ghost:hover { background: rgba(201,162,75,.08); }
.btn-danger { background: transparent; color: var(--blush); border: 1px solid rgba(227,183,176,.4); box-shadow: none; }
.btn-danger:hover { background: rgba(227,183,176,.1); }
.btn-sm { padding: .45rem .8rem; font-size: .64rem; border-radius: 9px; }

/* Login card */
.login-card { max-width: 400px; margin: 14vh auto 0; background: var(--glass-bg); border: 1px solid var(--glass-border);
  border-radius: 24px; padding: 2.6rem 2rem; backdrop-filter: blur(16px); box-shadow: var(--shadow); text-align: center; }
.login-card .lock { width: 48px; height: 48px; margin: 0 auto 1rem; color: var(--gold); }
.login-card h1 { font-family: var(--f-display); font-weight: 400; font-size: 1.6rem; margin: 0 0 .4rem; }
.login-card p { color: var(--ivory-dim); font-size: .9rem; margin: 0 0 1.6rem; }

/* Inputs */
.input { width: 100%; padding: .85rem 1rem; background: rgba(8,18,15,.5); border: 1px solid rgba(201,162,75,.22);
  border-radius: 12px; color: var(--ivory); font-family: var(--f-ui); font-size: 1rem; transition: border-color .2s, box-shadow .2s; }
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,162,75,.18); }
.input::placeholder { color: rgba(207,199,182,.45); }

/* Stat cards */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 1.8rem; }
.stat { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 18px; padding: 1.4rem 1.2rem;
  backdrop-filter: blur(14px); box-shadow: var(--shadow); }
.stat .num { font-family: var(--f-display); font-size: 2.4rem; line-height: 1; color: var(--ivory); font-variant-numeric: tabular-nums; }
.stat .lbl { font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-soft); margin-top: .5rem; }
.stat.accent .num { color: var(--gold-soft); }

/* Toolbar */
.toolbar { display: flex; gap: .8rem; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; }
.toolbar .search { flex: 1; min-width: 200px; }

/* Table */
.table-wrap { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 18px;
  backdrop-filter: blur(14px); box-shadow: var(--shadow); overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: .9rem 1rem; text-align: left; border-bottom: 1px solid rgba(201,162,75,.12); font-size: .92rem; vertical-align: middle; }
th { font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-soft); font-weight: 500; position: sticky; top: 0;
  background: rgba(11,32,27,.85); backdrop-filter: blur(6px); }
tbody tr:hover { background: rgba(201,162,75,.05); }
td .name { font-weight: 500; }
td .msg { color: var(--ivory-dim); font-style: italic; font-size: .82rem; max-width: 240px; }
.pill { display: inline-block; padding: .2rem .7rem; border-radius: 999px; font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; }
.pill.yes { background: rgba(201,162,75,.18); color: var(--gold-soft); border: 1px solid rgba(201,162,75,.4); }
.pill.no { background: rgba(227,183,176,.14); color: var(--blush); border: 1px solid rgba(227,183,176,.35); }
.row-actions { display: flex; gap: .4rem; white-space: nowrap; }

.empty { text-align: center; padding: 3rem 1rem; color: var(--ivory-dim); font-style: italic; font-family: var(--f-display); }
.note { font-size: .85rem; margin-top: .8rem; min-height: 1.1em; }
.note.error { color: var(--blush); }
.hidden { display: none !important; }

/* Edit modal */
.modal-back { position: fixed; inset: 0; background: rgba(6,14,11,.7); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 50; padding: 1rem; }
.modal { width: min(460px, 100%); background: linear-gradient(160deg, #143029, #0b201b); border: 1px solid var(--glass-border);
  border-radius: 22px; padding: 1.8rem; box-shadow: var(--shadow); }
.modal h2 { font-family: var(--f-display); font-weight: 400; margin: 0 0 1.2rem; font-size: 1.4rem; }
.modal .field { margin-bottom: 1rem; }
.modal .field label { display: block; font-size: .64rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-soft); margin-bottom: .4rem; }
.modal-actions { display: flex; gap: .6rem; justify-content: flex-end; margin-top: 1.4rem; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.seg input { position: absolute; opacity: 0; }
.seg label { text-align: center; padding: .6rem; border-radius: 10px; border: 1px solid rgba(201,162,75,.25);
  background: rgba(8,18,15,.4); color: var(--ivory-dim); font-size: .82rem; margin: 0; text-transform: none; letter-spacing: .04em; }
.seg input:checked + label { color: var(--midnight); background: linear-gradient(180deg, var(--gold-soft), var(--gold)); border-color: var(--gold-soft); }

@media (max-width: 560px) { .admin-head .brand { font-size: 2rem; } }
