/* HTX Plans Admin workbench - internal tool styling. Not customer facing. */
:root {
  --ink: #1c1a17;
  --muted: #6b655c;
  --line: #e4ded4;
  --bg: #faf8f4;
  --card: #ffffff;
  --accent: #b3541e;
  --accent-dark: #8f4215;
  --ok: #2e7d4f;
  --warn: #a86a00;
  --danger: #b3261e;
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.5;
}
.hidden { display: none !important; }

/* Gate */
.gate-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.gate-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 32px; max-width: 440px; width: 100%; box-shadow: 0 8px 30px rgba(0,0,0,.06); }
.gate-card h1 { margin: 8px 0 4px; font-size: 1.5rem; }
.gate-sub { color: var(--muted); margin-top: 0; }
.internal-badge { display: inline-block; background: #3d2b12; color: #ffd98a; font-size: .7rem; font-weight: 700; letter-spacing: .08em; padding: 3px 10px; border-radius: 999px; }
.internal-badge.small { font-size: .62rem; }
.gate-card label { display: block; font-weight: 600; margin: 16px 0 6px; }
.gate-card input[type=password] { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 1rem; }
.gate-card button[type=submit], .primary-btn {
  margin-top: 16px; background: var(--accent); color: #fff; border: 0; border-radius: 8px;
  padding: 11px 20px; font-size: 1rem; font-weight: 600; cursor: pointer; width: 100%;
}
.gate-card button[type=submit]:hover { background: var(--accent-dark); }
.error { color: var(--danger); font-weight: 600; margin-top: 8px; }
.notice { background: #fff7e8; border: 1px solid #ecd9a8; border-radius: 8px; padding: 14px 16px; margin-top: 16px; }
.notice p { margin: 8px 0 0; color: var(--muted); }
.fineprint { font-size: .8rem; color: var(--muted); margin-top: 14px; }

/* App shell */
.app-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.brand { display: flex; align-items: center; gap: 10px; }
.session-note { font-size: .8rem; color: var(--muted); }
.ghost-btn { background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; cursor: pointer; font-size: .9rem; }
.ghost-btn:hover { background: #f1ece2; }
.tabs { display: flex; gap: 4px; padding: 12px 20px 0; background: var(--card); border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 14px; font-size: .95rem; cursor: pointer; white-space: nowrap; color: var(--muted); }
.tabs button.active { color: var(--ink); border-bottom-color: var(--accent); font-weight: 700; }
.count { background: var(--accent); color: #fff; border-radius: 999px; font-size: .72rem; padding: 1px 8px; margin-left: 4px; }
main { max-width: 860px; margin: 0 auto; padding: 24px 20px 80px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.panel-sub { color: var(--muted); }
.panel-sub code, .guide code { background: #f1ece2; padding: 1px 6px; border-radius: 4px; font-size: .85em; }

/* Forms */
.content-form fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 18px; margin: 0 0 18px; background: var(--card); }
.content-form legend { font-weight: 700; padding: 0 8px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; margin-bottom: 4px; }
.field .req { color: var(--danger); }
.field input[type=text], .field input[type=date], .field input[type=url], .field select, .field textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; font-size: .95rem; font-family: inherit;
}
.field textarea { min-height: 76px; resize: vertical; }
.field .help { font-size: .8rem; color: var(--muted); margin-top: 3px; }
.field .field-error { font-size: .82rem; color: var(--danger); font-weight: 600; margin-top: 3px; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }
.checks label, .checkline label { font-weight: 400; display: flex; gap: 8px; align-items: flex-start; }
.verify-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.verify-list label { font-weight: 400; display: flex; gap: 10px; align-items: flex-start; background: #fffdf7; border: 1px dashed var(--line); border-radius: 8px; padding: 10px 12px; }
.form-actions { display: flex; gap: 10px; margin-top: 6px; }
.form-actions .primary-btn { width: auto; margin-top: 0; }
.form-note { font-size: .85rem; color: var(--muted); }

/* Queue */
.queue-filters { display: flex; gap: 14px; align-items: flex-end; margin-bottom: 16px; flex-wrap: wrap; }
.queue-filters label { font-size: .85rem; font-weight: 600; }
.queue-filters select { margin-left: 6px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; }
.queue-item { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; }
.queue-item .q-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.queue-item .q-title { font-weight: 700; }
.queue-item .q-meta { font-size: .82rem; color: var(--muted); margin-top: 2px; }
.status { font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; background: #eee; }
.status.draft { background: #e8e4da; color: #5c554a; }
.status.in_review { background: #fff3d6; color: #8a6100; }
.status.approved { background: #dff0e4; color: var(--ok); }
.status.published { background: #d7e8f5; color: #1d5f8a; }
.status.archived { background: #f0e6e6; color: #8a4a4a; }
.q-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.q-actions button { font-size: .82rem; padding: 6px 12px; border: 1px solid var(--line); background: #fff; border-radius: 7px; cursor: pointer; }
.q-actions button:hover { background: #f1ece2; }
.q-actions button.danger { color: var(--danger); border-color: #e5b8b4; }
.empty { color: var(--muted); background: var(--card); border: 1px dashed var(--line); border-radius: 10px; padding: 24px; text-align: center; }

/* Guide */
.guide h3 { margin-top: 26px; }
.guide ol, .guide ul { padding-left: 22px; }
.img-helper { display: grid; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.img-helper label { font-weight: 600; font-size: .9rem; }
.img-helper input[type=text] { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; margin-top: 4px; }
.audit { font-size: .82rem; color: var(--muted); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; max-height: 220px; overflow-y: auto; margin-bottom: 10px; }
.audit div { padding: 3px 0; border-bottom: 1px dotted var(--line); }

@media (max-width: 640px) {
  .checks { grid-template-columns: 1fr; }
  main { padding: 16px 14px 60px; }
}
