/* SocialZoom admin panel.
 *
 * The app's new-look palette. Sunshine is a FILL only, never text: #FFC21A on
 * white is about 1.7:1 and cannot be read. Anything that has to be read is ink
 * or deep amber. Mobile first, because moderation happens away from a desk.
 */

:root {
  --sun: #FFC21A;
  --sun-soft: #FFF6DF;
  --amber-deep: #8A5B00;   /* readable on white where yellow would not be */
  --ink: #1E2130;
  --ink-2: #5C6275;
  --ink-3: #8D94A6;
  --page: #F4F5F7;
  --card: #FFFFFF;
  --line: #E6E8ED;
  --red: #F0443A;
  --red-soft: #FEECEB;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

.wrap { width: 100%; max-width: 880px; margin: 0 auto; padding: 0 16px; }

h1 { font-size: 24px; line-height: 1.25; margin: 20px 0 8px; }
h2 { font-size: 17px; margin: 0 0 10px; }
h3 { font-size: 15px; margin: 16px 0 6px; color: var(--ink-2); }
p { margin: 0 0 10px; }
a { color: var(--ink); }
code { background: var(--page); padding: 1px 5px; border-radius: 5px; font-size: 90%; }

.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.big { font-size: 18px; }
.alarm-text { color: var(--red); font-weight: 600; }
.danger-title { color: var(--red); }

/* -- top bar ------------------------------------------------------------- */
.topbar { background: var(--ink); color: #fff; border-bottom: 3px solid var(--sun); }
.topbar-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 10px; padding-bottom: 10px; }
.brand { color: #fff; text-decoration: none; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.brand-sub { color: var(--ink-3); font-weight: 500; font-size: 13px; }
.brand-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--sun); display: inline-block; }
.brand-dot.big { width: 18px; height: 18px; }

.nav { display: flex; gap: 4px; overflow-x: auto; flex: 1 1 100%; order: 3; }
.nav a {
  color: #fff; text-decoration: none; padding: 8px 12px; border-radius: 8px;
  font-size: 14px; white-space: nowrap; opacity: 0.85;
}
.nav a.on { background: var(--sun); color: var(--ink); font-weight: 600; opacity: 1; }

.signout { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.who { font-size: 13px; color: #fff; display: flex; flex-direction: column; line-height: 1.2; }
.role { color: var(--ink-3); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }

/* -- cards, rows --------------------------------------------------------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin: 0 0 14px;
}
.rows { list-style: none; margin: 0 0 14px; padding: 0; }
.rows.plain li { border-bottom: 1px solid var(--line); padding: 10px 0; }
.rows.plain li:last-child { border-bottom: 0; }
.row-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.row-title { font-weight: 700; text-decoration: none; font-size: 17px; }
.row-meta { color: var(--ink-2); font-size: 14px; margin: 6px 0 0; }
.row-actions { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.row-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; }
.row-alarm { border-left: 4px solid var(--red); }
li.row.row-alarm { padding-left: 12px; }

.empty { color: var(--ink-2); }
.crumb { margin: 14px 0 0; font-size: 14px; }
.lead { color: var(--ink-2); max-width: 62ch; }

/* -- badges, chips ------------------------------------------------------- */
.badge {
  font-size: 11px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; white-space: nowrap;
}
.badge-alarm { background: var(--red); color: #fff; }
.badge-fill { background: var(--sun); color: var(--ink); }     /* yellow as fill, ink text */
.badge-muted { background: var(--page); color: var(--ink-2); border: 1px solid var(--line); }
.chip {
  display: inline-block; background: var(--page); border: 1px solid var(--line);
  color: var(--ink-2); border-radius: 999px; padding: 2px 10px; font-size: 12px; margin: 0 4px 4px 0;
}
.chip-alarm { background: var(--red-soft); border-color: var(--red); color: #8C1C15; font-weight: 700; }

/* -- banners, flashes ---------------------------------------------------- */
.banner, .flash {
  border-radius: var(--radius); padding: 12px 14px; margin: 0 0 14px;
  font-size: 15px; border: 1px solid var(--line); background: var(--card);
}
.banner-alarm, .flash-error { background: var(--red-soft); border-color: var(--red); color: #8C1C15; }
.banner-warn { background: var(--sun-soft); border-color: var(--sun); color: var(--amber-deep); }
.flash-ok { background: #ECF7EE; border-color: #B7DFC0; color: #1C5A2A; }
.flash-info { background: var(--page); color: var(--ink-2); }

.gone { background: var(--page); border-radius: var(--radius); padding: 12px; color: var(--ink-2); }
.resolved { background: var(--page); border-radius: var(--radius); padding: 12px; }

/* -- tiles --------------------------------------------------------------- */
.tile {
  display: flex; flex-direction: column; gap: 2px; text-decoration: none;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; color: var(--ink);
}
.tile-number { font-size: 28px; font-weight: 700; line-height: 1.1; }
.tile-label { font-size: 13px; color: var(--ink-2); }
.tile-note { font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.tile-hero { margin-bottom: 14px; }
.tile-hero .tile-number { font-size: 56px; }
.tile-hero .tile-label { font-size: 16px; color: var(--ink); font-weight: 600; }
.tile-alarm { background: var(--red-soft); border-color: var(--red); }
.tile-alarm .tile-number { color: var(--red); }
.tile-calm { background: var(--sun-soft); border-color: var(--sun); }
.tile-warn { background: var(--sun-soft); border-color: var(--sun); }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }

/* -- forms --------------------------------------------------------------- */
.field { display: block; margin: 0 0 14px; border: 0; padding: 0; }
.label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.help { display: block; font-size: 12px; color: var(--ink-2); margin-top: 4px; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px;
}
input:focus, select:focus, textarea:focus, .btn:focus {
  outline: 3px solid var(--sun); outline-offset: 1px;
}
textarea { resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; font-size: 15px; }
.check input { width: 20px; height: 20px; margin: 0; flex: none; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.filters .field { margin: 0; }
.field.inline { flex: 0 1 auto; }
.field.grow { flex: 1 1 200px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.inline-form { display: inline; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px 16px;           /* a thumb-sized target */
  border-radius: 10px; border: 1px solid var(--line); background: #fff;
  color: var(--ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--sun); border-color: var(--sun); color: var(--ink); }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-quiet { background: transparent; color: var(--ink-2); }
.btn.block { width: 100%; }
.small-btn { min-height: 32px; padding: 4px 10px; font-size: 13px; }
.pager { display: flex; gap: 8px; margin: 0 0 20px; }

/* -- the reported media --------------------------------------------------- */
/* Big enough to judge, capped so a tall picture cannot push the actions off
   the screen. A failed load shows the alt text inside this box, which is why
   the box has a border and a background of its own: a moderator sees a
   sentence explaining that the file is gone, never a broken-image icon. */
.media-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 14px; }
.media-item { margin: 0; min-width: 0; }
.media {
  display: block; width: 100%; max-width: 460px; height: auto; max-height: 60vh;
  object-fit: contain; background: var(--page);
  border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink-2); font-size: 14px;
}
.media-cap { color: var(--ink-2); font-size: 13px; margin: 6px 0 0; }
.media-count { color: var(--ink-2); font-size: 14px; margin: 0 0 10px; }

@media (min-width: 760px) {
  .media-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* -- text blocks --------------------------------------------------------- */
.quote {
  margin: 0 0 10px; padding: 12px 14px; background: var(--page);
  border-left: 3px solid var(--line); border-radius: 0 8px 8px 0;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.quote-inline { color: var(--ink-2); overflow-wrap: anywhere; }
.facts { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0; }
.facts > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.facts > div:last-child { border-bottom: 0; }
.facts dt { color: var(--ink-2); font-size: 14px; }
.facts dd { margin: 0; font-weight: 600; text-align: right; }
.events { margin: 0; padding-left: 18px; font-size: 14px; }
.events li { margin-bottom: 10px; }

/* -- sign-in and error pages --------------------------------------------- */
.signin { max-width: 420px; margin: 40px auto; }
/* A message on its own - "that request was refused", "not found". Wider than
   the sign-in card because a heading like "That request was refused" is wider
   than 420px at h1 size and would otherwise spill out of its own column. */
.notice { max-width: 560px; margin: 40px auto; }
/* Signed out, the page is one narrow column in the middle of the screen. The
   footer is the full 880px, so left-aligned it starts ~230px to the left of
   the card above it and reads as part of a different page. Centred, the two
   line up. Signed in, content fills the 880px and the footer aligns with it,
   so this is only for the signed-out pages. */
.foot-centered { text-align: center; }
.signin-brand { display: flex; align-items: center; gap: 10px; font-size: 26px; }
.signin-sub { color: var(--ink-2); font-weight: 400; }
.foot { color: var(--ink-3); font-size: 12px; padding-top: 8px; padding-bottom: 28px; }

@media (min-width: 760px) {
  h1 { font-size: 30px; }
  .nav { flex: 0 1 auto; order: 0; margin-left: 16px; overflow: visible; }
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .facts { grid-template-columns: 1fr 1fr; column-gap: 28px; }
  .tile-hero { flex-direction: row; align-items: baseline; gap: 16px; }
  .tile-hero .tile-note { margin-top: 0; margin-left: auto; }
}

@media (prefers-reduced-motion: no-preference) {
  .btn { transition: filter 0.12s ease; }
  .btn:hover { filter: brightness(0.96); }
}
