/* Same tokens as transport-planner and purchase-request — navy #16214d on a
   #f0f2f5 page — so this reads as one of the SNT apps rather than a new thing.

   This styles four small admin pages: log in, fetch your key, manage staff, edit
   saved replies. The chat window and pairing screen this file used to dress went
   with the bridge on 2026-08-07 — the panel staff actually look at lives in the
   browser extension and has its own stylesheet (extension/panel.css). */

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: Arial, sans-serif; font-size: 13px; background: #f0f2f5; color: #1a1a2e; }
a { color: #16214d; }
.nowrap { white-space: nowrap; }

/* ── top bar ───────────────────────────────────────────────────────────── */
.topbar { background: #16214d; color: white; padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.topbar h1 { font-size: 16px; }
.topbar-brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.topbar-logo { height: 30px; background: #fff; padding: 4px 8px; border-radius: 5px; display: block; }
.topbar-nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.topbar-nav a { color: #cfd6ee; font-size: 12px; text-decoration: none; }
.topbar-nav a:hover { color: white; text-decoration: underline; }
.topbar .who { color: #8f9bc4; font-size: 11px; }
.warn-banner { background: #fff3cd; color: #856404; padding: 9px 24px; font-size: 12.5px; border-bottom: 1px solid #f2e2b0; }

/* ── login ─────────────────────────────────────────────────────────────── */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.login-box { background: white; border: 1px solid #dde1e7; border-radius: 6px; padding: 28px; width: 100%; max-width: 340px; }
.login-box h2 { font-size: 15px; text-align: center; color: #16214d; margin-bottom: 16px; }
.login-logo { display: block; height: 46px; margin: 0 auto 16px; }

/* ── shared building blocks (cards, forms, tables) ─────────────────────── */
.container { max-width: 1180px; margin: 0 auto; padding: 22px; }
/* Two classes, so this beats .container's own max-width regardless of order. */
.container.narrow { max-width: 660px; }
.card { background: white; border: 1px solid #dde1e7; border-radius: 6px; margin-bottom: 18px; }
.card-head { padding: 12px 16px; border-bottom: 1px solid #eee; font-weight: bold; background: #f7f9fb; border-radius: 6px 6px 0 0; }
.card-body { padding: 16px; }
.empty { color: #8a92a8; font-size: 12px; padding: 14px 12px; }
.steps { margin: 0 0 10px 18px; font-size: 12.5px; line-height: 1.7; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* 760 suits the admin tables, whose cells hold inputs and selects. */
.table-wrap table { min-width: 760px; }
/* The tickets table is text, and its last column is the button that closes an
   issue. At 760 that button sat off the right edge in a normal window, so
   closing a ticket meant scrolling sideways to find it. */
.table-wrap.compact table { min-width: 0; }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th { background: #16214d; color: white; padding: 8px 10px; text-align: left; }
td { padding: 7px 10px; border-bottom: 1px solid #eee; vertical-align: middle; }
.btn { display: inline-block; padding: 8px 16px; border: none; border-radius: 4px; cursor: pointer; font-size: 13px; font-weight: bold; text-decoration: none; font-family: inherit; }
.btn-primary { background: #16214d; color: white; }
.btn-primary:hover { background: #0f1836; }
.btn-secondary { background: white; border: 1px solid #16214d; color: #16214d; }
.btn-danger { background: #b3261e; color: white; }
.btn-sm { padding: 5px 12px; font-size: 11.5px; }
.btn-block { width: 100%; margin-top: 14px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
input, select, textarea { padding: 7px 9px; border: 1px solid #ccd2dc; border-radius: 4px; font-size: 13px; width: 100%; font-family: inherit; }
label { display: block; font-weight: bold; margin: 10px 0 4px; font-size: 12px; color: #16214d; }
.form-row { margin-bottom: 10px; }
.row-grid { display: grid; gap: 10px 14px; align-items: end; }
.row-grid-2 { grid-template-columns: repeat(2, 1fr); }
.row-grid-3 { grid-template-columns: repeat(3, 1fr); }
.row-grid-4 { grid-template-columns: repeat(4, 1fr); }
.row-grid > .form-row { display: flex; flex-direction: column; margin-bottom: 0; }
.row-grid > .form-row > label { margin-top: 0; }
/* The last cell holds a password box and a Save button side by side. Without a
   cap the input takes the whole cell and pushes Save off the edge of the table. */
td.nowrap { display: flex; gap: 6px; align-items: center; }
td.nowrap input { max-width: 190px; }
.reply-edit { border-bottom: 1px solid #eef0f4; padding-bottom: 12px; margin-bottom: 14px; }
.reply-edit:last-of-type { border-bottom: none; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 11px; font-weight: bold; white-space: nowrap; }
.badge-ok { background: #c9e6d5; color: #0f5132; }
.badge-off { background: #e4e8ef; color: #4a5578; }
.caveat { color: #856404; background: #fff8e5; border: 1px solid #f2e2b0; border-radius: 4px; padding: 7px 9px; font-size: 11px; line-height: 1.45; margin-bottom: 8px; }
/* ── the tickets page ──────────────────────────────────────────────────── */
.tabs-row { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.pill-link {
  display: inline-block; padding: 5px 13px; border-radius: 14px; font-size: 12px;
  text-decoration: none; color: #4a5578; background: #eef1f6; border: 1px solid #dde1e7;
}
.pill-link:hover { background: #e3e8f2; }
.pill-link.on { background: #16214d; border-color: #16214d; color: #fff; font-weight: bold; }
.sub { color: #7a8397; font-size: 11.5px; margin-top: 2px; }
/* The customer's own words, so newlines are kept and a long message is capped
   rather than making one row as tall as the screen. */
.sub.body { white-space: pre-wrap; max-height: 4.6em; overflow: hidden; }
td.nowrap-cell { white-space: nowrap; }
td.nowrap-cell form { display: flex; gap: 6px; align-items: center; }
.chip {
  display: inline-block; background: #eef1f6; border: 1px solid #dde1e7;
  border-radius: 10px; padding: 1px 8px; margin: 2px 3px 0 0; font-size: 11px; color: #4a5578;
}
.warn-text { color: #8a5a00; }
.rule { border: none; border-top: 1px solid #eef0f4; margin: 16px 0; }
.list-head { font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
             color: #8a92a8; font-weight: bold; margin: 14px 0 6px; }
.row-inline { display: flex; gap: 8px; align-items: center; }
.row-inline input { flex: 1; min-width: 0; }
/* One search result: name on the left, Add on the right, never wrapping under. */
.hit-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid #f1f3f7;
}
.hit-row:last-of-type { border-bottom: none; }
.hit-row .sub { display: block; }

.error { background: #fdecea; color: #b3261e; padding: 10px 14px; border-radius: 4px; margin-bottom: 12px; font-size: 12.5px; }
.notice { background: #e7f1ff; color: #084298; padding: 10px 14px; border-radius: 4px; margin-bottom: 12px; font-size: 12.5px; }
.error[hidden] { display: none; }

/* ── narrow screens ────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .row-grid-3, .row-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .row-grid-2, .row-grid-3, .row-grid-4 { grid-template-columns: 1fr; }
}
