/* ==========================================================================
   AWEsome Women's Club — editor
   Utilitarian on purpose: dense, fast to scan, no surprises.
   ========================================================================== */

:root {
  --paper: #ffffff;
  --shell: #14110f;
  --shell-2: #241f1b;
  --ink: #1b1714;
  --muted: #6f6862;
  --rule: #e3ded6;
  --field: #faf8f5;
  --accent: #8c3b2f;
  --ok: #2f6b4f;
  --ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Cormorant Garamond", Georgia, serif;
}

* { box-sizing: border-box; }

body.admin {
  margin: 0;
  display: grid;
  grid-template-columns: 244px 1fr;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 14px;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ----------------------------------------------------------------- sidebar */

.side {
  background: var(--shell);
  color: #e8e2da;
  padding: 1.6rem 1.2rem;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.side-brand {
  font-family: var(--display); font-size: 1.05rem; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase; line-height: 1.3;
  color: #fff;
}
.side-sub {
  font-size: .625rem; letter-spacing: .22em; text-transform: uppercase;
  color: #8d8479; margin: .3rem 0 2rem;
}
.side-nav { display: flex; flex-direction: column; gap: 1px; }
.side-nav a {
  padding: .55rem .7rem; border-radius: 4px;
  font-size: .8125rem; color: #bdb5aa;
  transition: background .15s ease, color .15s ease;
}
.side-nav a:hover { background: var(--shell-2); color: #fff; }
.side-nav a.on { background: var(--shell-2); color: #fff; font-weight: 500; }

.side-foot { margin-top: auto; padding-top: 2rem; border-top: 1px solid #2e2822; }
.side-view { font-size: .75rem; color: #bdb5aa; }
.side-view:hover { color: #fff; }
.side-user {
  margin-top: 1rem; display: flex; flex-direction: column; gap: .4rem;
  font-size: .75rem; color: #8d8479;
}
.side-user button {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: #bdb5aa; font: inherit; text-align: left; text-decoration: underline;
}
.side-user button:hover { color: #fff; }

/* -------------------------------------------------------------- work area */

.work { padding: 2.4rem clamp(1.5rem, 4vw, 3rem) 5rem; max-width: 1100px; }

.work-head { margin-bottom: 2rem; }
.work-head h1 { font-family: var(--display); font-weight: 500; font-size: 2rem; margin: 0 0 .4rem; line-height: 1.2; }
.work-head h2 { font-family: var(--display); font-weight: 500; font-size: 1.4rem; margin: 0; }
.work-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; }
.lede { color: var(--muted); margin: 0; max-width: 56ch; }

.crumbs {
  font-size: .6875rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: .8rem;
}
.crumbs a:hover { color: var(--accent); }

.flash {
  background: #edf5f0; border-left: 3px solid var(--ok);
  padding: .8rem 1rem; margin-bottom: 1.5rem; font-size: .875rem;
}
.flash.err { background: #fbefed; border-left-color: var(--accent); }

/* ----------------------------------------------------------------- tiles */

.tiles {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem; margin-bottom: 2.5rem;
}
.tile {
  border: 1px solid var(--rule); border-radius: 6px; padding: 1.1rem;
  display: flex; flex-direction: column; gap: .15rem;
  transition: border-color .15s ease, transform .15s ease;
}
.tile:hover { border-color: var(--ink); transform: translateY(-1px); }
.tile-n { font-family: var(--display); font-size: 2rem; line-height: 1; }
.tile-l { font-weight: 500; font-size: .875rem; }
.tile-m { font-size: .6875rem; color: var(--muted); }

.panel {
  border: 1px solid var(--rule); border-radius: 6px;
  padding: 1.5rem; margin-top: 2.5rem;
}
.panel h2 { font-family: var(--display); font-size: 1.3rem; margin: 0 0 .8rem; }
.notes { margin: 0; padding-left: 1.1rem; color: var(--muted); }
.notes li { margin-bottom: .45rem; }
.notes strong { color: var(--ink); }

/* ----------------------------------------------------------------- table */

.table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.table th {
  text-align: left; font-size: .625rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted); font-weight: 500;
  padding: .6rem .8rem; border-bottom: 1px solid var(--rule);
}
.table td { padding: .8rem; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.table tr:hover td { background: var(--field); }
.cell-main a { font-weight: 500; }
.cell-main a:hover { color: var(--accent); }
.cell-act { text-align: right; width: 1%; white-space: nowrap; }

.pill {
  display: inline-block; padding: .1rem .5rem; border-radius: 99px;
  font-size: .625rem; letter-spacing: .08em; text-transform: uppercase;
  background: #eee9e2; color: var(--muted);
}
.pill.on { background: #e2efe8; color: var(--ok); }

.link-danger {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; font-size: .75rem; color: var(--muted); text-decoration: underline;
}
.link-danger:hover { color: var(--accent); }

.empty { color: var(--muted); padding: 2rem 0; }
.empty a { color: var(--accent); text-decoration: underline; }

/* ------------------------------------------------------------------ form */

.form { margin-top: .5rem; }
.fields {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem 1.5rem;
}
.field.full { grid-column: 1 / -1; }
.field label {
  display: block; font-size: .6875rem; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: .4rem;
}
.field input[type=text], .field input[type=url], .field input[type=number],
.field input[type=date], .field input[type=file], .field select, .field textarea {
  width: 100%; padding: .6rem .7rem;
  border: 1px solid var(--rule); border-radius: 4px;
  background: var(--field); color: var(--ink);
  font-family: inherit; font-size: .875rem; line-height: 1.6;
}
.field textarea { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .8125rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--ink); background: #fff; outline: none;
}
.help { font-size: .75rem; color: var(--muted); margin: .35rem 0 0; }

.field-check { display: flex; flex-direction: column; justify-content: flex-end; }
.check { display: flex; align-items: center; gap: .5rem; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.check span {
  font-size: .8125rem; font-weight: 500; letter-spacing: 0;
  text-transform: none; color: var(--ink);
}

.img-field { display: flex; flex-direction: column; gap: .5rem; }
.img-preview img { max-width: 150px; border: 1px solid var(--rule); border-radius: 4px; display: block; }
.img-link { font-size: .75rem; color: var(--accent); text-decoration: underline; }

.form-actions { display: flex; gap: .8rem; align-items: center; margin-top: 2rem; }

.btn {
  display: inline-block; padding: .6rem 1.4rem;
  background: var(--ink); color: #fff; border: 1px solid var(--ink); border-radius: 4px;
  font: inherit; font-size: .8125rem; font-weight: 500; cursor: pointer;
  transition: background .15s ease;
}
.btn:hover { background: #000; }
.btn.ghost { background: none; color: var(--ink); }
.btn.ghost:hover { background: var(--field); }
.btn.small { padding: .4rem 1rem; font-size: .75rem; }

.view-live { margin-top: 2rem; font-size: .8125rem; }
.view-live a { color: var(--accent); text-decoration: underline; }

/* ----------------------------------------------------------------- media */

.upload { border: 1px solid var(--rule); border-radius: 6px; padding: 1.5rem; margin-bottom: 2.5rem; }
.media-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1.2rem;
}
.media-item { margin: 0; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; }
.media-item img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; }
.media-item figcaption { padding: .6rem .7rem; display: flex; flex-direction: column; gap: .2rem; }
.media-alt { font-size: .75rem; line-height: 1.4; }
.media-credit { font-size: .6875rem; color: var(--muted); }

/* ----------------------------------------------------------------- login */

body.login-page {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; margin: 0; background: #faf8f5; padding: 2rem;
  font-family: var(--ui); color: var(--ink);
}
.login {
  background: #fff; border: 1px solid var(--rule); border-radius: 8px;
  padding: clamp(2rem, 5vw, 3rem); max-width: 27rem; width: 100%; text-align: center;
}
.login-mark {
  font-family: var(--display); font-size: .95rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 1.5rem;
}
.login h1 { font-family: var(--display); font-weight: 400; font-size: 1.9rem; margin: 0 0 .7rem; }
.login-lede { color: var(--muted); font-size: .875rem; margin: 0 0 1.8rem; }
.login .flash { text-align: left; }

.google {
  display: flex; align-items: center; justify-content: center; gap: .7rem;
  width: 100%; padding: .8rem 1rem;
  border: 1px solid var(--rule); border-radius: 4px;
  font-size: .875rem; font-weight: 500; background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.google:hover { border-color: #b9b1a6; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

.login-foot { margin: 1.6rem 0 0; font-size: .75rem; }
.login-foot a { color: var(--muted); text-decoration: underline; }

@media (max-width: 820px) {
  body.admin { grid-template-columns: 1fr; }
  .side { position: static; height: auto; }
  .fields { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------- moderation queue */

.tabs { display: flex; gap: .4rem; margin-bottom: 1.8rem; border-bottom: 1px solid var(--rule); }
.tabs a {
  padding: .6rem 1rem; font-size: .8125rem; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs a span {
  display: inline-block; margin-left: .4rem; padding: .05rem .45rem;
  border-radius: 99px; background: #eee9e2; font-size: .6875rem;
}
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); font-weight: 500; border-bottom-color: var(--ink); }
.tabs a.on span { background: var(--ink); color: #fff; }

.queue { display: flex; flex-direction: column; gap: 1rem; }
.qc { border: 1px solid var(--rule); border-radius: 6px; padding: 1.2rem; }
.qc-head { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.qc-author { font-weight: 500; }
.qc-email { color: var(--muted); font-size: .75rem; margin-left: .5rem; }
.qc-date { font-size: .6875rem; color: var(--muted); white-space: nowrap; }
.qc-on { font-size: .75rem; color: var(--muted); margin: .3rem 0 .9rem; }
.qc-on a { color: var(--accent); text-decoration: underline; }
.qc-body {
  font-family: var(--display); font-size: 1.05rem; line-height: 1.65;
  white-space: pre-wrap; padding: .9rem 1rem; background: var(--field);
  border-radius: 4px; margin-bottom: 1rem;
}
.qc-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.qc-verdict {
  font-size: .6875rem; letter-spacing: .06em;
  padding: .2rem .6rem; border-radius: 99px; background: #eee9e2; color: var(--muted);
}
.qc-safe { background: #e2efe8; color: var(--ok); }
.qc-unsafe { background: #fbe4e0; color: var(--accent); }
.qc-error, .qc-skipped { background: #f6ecd8; color: #7a5c22; }
.qc-actions { display: flex; gap: .6rem; align-items: center; }
.qc-actions form { display: inline; }
