/* Bozh Studio Google Reviews — admin panel.
   Deliberately plain: this is a tool, not a showcase. Legibility over style. */

:root {
  --ink: #16181d;
  --muted: #6b7280;
  --line: #e3e5e9;
  --bg: #f6f6f4;
  --card: #ffffff;
  --accent: #1a73e8;
  --danger: #c5221f;
  --warn: #b26a00;
  --ok: #137333;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.92em; }
.muted { color: var(--muted); }
.small { font-size: 0.85em; }

/* ---------------------------------------------------------------- shell */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.topbar__brand { font-weight: 650; color: inherit; text-decoration: none; }

.topbar__nav { display: flex; align-items: center; gap: 18px; }
.topbar__nav a { color: var(--muted); text-decoration: none; }
.topbar__nav a:hover { color: var(--ink); }
.topbar__logout { margin: 0; }

.wrap { max-width: 980px; margin: 0 auto; padding: 28px 24px 80px; }

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.page-head__title { margin: 0; font-size: 1.6em; font-weight: 650; }

.count {
  font-size: 0.6em;
  color: var(--muted);
  font-weight: 500;
  vertical-align: middle;
}

/* ---------------------------------------------------------------- cards */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 20px;
}

.card__title { margin: 0 0 6px; font-size: 1.05em; font-weight: 650; }
.card__title:not(:first-child) { margin-top: 28px; }
.card--danger { border-color: #f0c9c8; }

.empty {
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 48px;
  text-align: center;
}

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

.table { width: 100%; border-collapse: collapse; background: var(--card); }

.table th,
.table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.table th {
  font-size: 0.8em;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 600;
}

.table tr:last-child td { border-bottom: 0; }
.table__actions { white-space: nowrap; }
.table__actions .btn { margin: 2px 2px 2px 0; }
.inline { display: inline; margin: 0; }

/* ---------------------------------------------------------------- forms */

.field { display: block; margin-bottom: 16px; }
.field__label { display: block; font-weight: 600; font-size: 0.9em; margin-bottom: 5px; }

.field__input {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: inherit;
  font: inherit;
}

.field__input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.field__input[readonly] { background: #f2f3f5; color: var(--muted); }
textarea.field__input { resize: vertical; }

.field__hint { display: block; color: var(--muted); font-size: 0.85em; margin-top: 4px; }

.grid-2, .grid-3 { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.checks { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 18px; }
.check { display: flex; align-items: center; gap: 8px; }

.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.delete-form { max-width: 380px; }

/* Keeps a one-button POST form from breaking out of its table cell. */
.inline-form { display: inline; }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.92em;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn:hover { border-color: #c9ccd2; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn--sm { padding: 5px 10px; font-size: 0.85em; }
.btn--block { width: 100%; }

.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--primary:hover { background: #1765cc; border-color: #1765cc; }

.btn--danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn--link { border: 0; background: none; padding: 0; color: var(--muted); }
.btn--link:hover { color: var(--ink); text-decoration: underline; }

/* ---------------------------------------------------------------- alerts */

.alert {
  padding: 11px 14px;
  border-radius: 8px;
  margin: 0 0 18px;
  font-size: 0.93em;
  border: 1px solid;
}

.alert--ok    { background: #e8f5ec; border-color: #bfe3cb; color: var(--ok); }
.alert--warn  { background: #fdf3e2; border-color: #f0dcb4; color: var(--warn); }
.alert--error { background: #fdecea; border-color: #f5c6c4; color: var(--danger); }

.note {
  background: #fdf3e2;
  border-left: 3px solid #f0c073;
  padding: 9px 12px;
  border-radius: 0 6px 6px 0;
  font-size: 0.88em;
  color: #7a5200;
}

/* ---------------------------------------------------------------- results */

.results { list-style: none; margin: 16px 0 0; padding: 0; border-top: 1px solid var(--line); }

.results__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--line);
}

.results__item--weak { opacity: 0.72; }

.tag {
  display: inline-block;
  font-size: 0.72em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 6px;
}

.tag--warn { background: #fdf3e2; color: var(--warn); border: 1px solid #f0dcb4; }

.verify-result {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfa;
}

.chosen {
  padding: 12px 14px;
  border: 1px solid #bfe3cb;
  background: #f2faf5;
  border-radius: 8px;
  margin-bottom: 16px;
}

/* Secondary settings stay out of the way until wanted. */
.tucked {
  border-top: 1px solid var(--line);
  margin: 4px 0 18px;
  padding-top: 12px;
}

.tucked > summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9em;
  color: var(--muted);
  list-style: revert;
}

.tucked > summary:hover { color: var(--ink); }
.tucked[open] > summary { margin-bottom: 14px; }

.input-row { display: flex; gap: 8px; align-items: stretch; }
.input-row .field__input { flex: 1; }

.field__hint--ok { color: var(--ok); }
.field__hint--error { color: var(--danger); }

/* ---------------------------------------------------------------- code */

.code {
  background: #1c1f26;
  color: #e6e8eb;
  padding: 14px 16px;
  border-radius: 8px;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85em;
  line-height: 1.6;
  margin: 0 0 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

.code--log { max-height: 340px; overflow-y: auto; white-space: pre; }

/* ---------------------------------------------------------------- preview */

.preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px 20px;
  background: #fff;
  margin: 0 auto;
  max-width: 100%;
  transition: max-width 0.2s ease;
  overflow: hidden;
}

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

.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.login {
  width: 100%;
  max-width: 340px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

.login__title { margin: 0; font-size: 1.3em; font-weight: 650; }
.login__sub { margin: 4px 0 22px; color: var(--muted); font-size: 0.9em; }
