/* OpenLine dashboard — mobile-first, self-contained. */
:root {
  --ink: #1c1917;
  --muted: #78716c;
  --line: #e7e5e4;
  --bg: #fafaf9;
  --card: #ffffff;
  --accent: #c2410c;
  --accent-soft: #fff7ed;
  --good: #15803d;
  --good-soft: #f0fdf4;
  --warn: #b45309;
  --warn-soft: #fffbeb;
  --radius: 14px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  -webkit-text-size-adjust: 100%;
}
.wrap { max-width: 680px; margin: 0 auto; padding: 0 16px 48px; }
h1, h2, h3 { font-family: "Manrope", "DM Sans", sans-serif; letter-spacing: -0.01em; }
.kicker {
  text-transform: uppercase; letter-spacing: 0.08em;
  font-size: 12px; font-weight: 700; color: var(--accent); margin: 0 0 6px;
}
/* Header */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: var(--card); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.brand { font-family: "Manrope", sans-serif; font-weight: 800; font-size: 18px; }
.brand em { font-style: normal; color: var(--accent); }
.bizname { font-size: 13px; color: var(--muted); }
/* Tabs */
.tabs { display: flex; gap: 8px; padding: 12px 16px 0; max-width: 680px; margin: 0 auto; }
.tab {
  flex: 1; padding: 10px; border: 1px solid var(--line); border-bottom: none;
  background: var(--bg); border-radius: 10px 10px 0 0; font: inherit;
  font-weight: 600; color: var(--muted); cursor: pointer;
}
.tab[aria-selected="true"] { background: var(--card); color: var(--ink); }
/* Cards and panels */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; margin: 14px 0;
}
.worth { background: linear-gradient(180deg, var(--accent-soft), var(--card)); border-color: #fed7aa; }
.worth .big { font-family: "Manrope", sans-serif; font-size: 34px; font-weight: 800; margin: 2px 0; }
.worth .row { display: flex; justify-content: space-between; gap: 8px; margin-top: 12px; }
.worth .cell { flex: 1; }
.worth .cell .lbl { font-size: 12px; color: var(--muted); }
.worth .cell .val { font-weight: 700; font-size: 17px; }
.net-pos { color: var(--good); }
.net-neg { color: #b91c1c; }
/* Meter */
.meter { height: 12px; background: #f5f5f4; border-radius: 999px; overflow: hidden; margin: 10px 0 6px; }
.meter > div { height: 100%; background: var(--accent); border-radius: 999px; transition: width 0.4s; }
.meter.over > div { background: #b91c1c; }
.meter-meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
/* Feed */
.feed { list-style: none; margin: 10px 0 0; padding: 0; }
.feed li {
  display: flex; gap: 10px; align-items: baseline;
  padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px;
}
.feed li:first-child { border-top: none; }
.feed .t { color: var(--muted); font-size: 12px; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; transform: translateY(-1px); }
.dot.good { background: var(--good); }
/* Billing rows */
.kv { display: flex; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.kv:first-of-type { border-top: none; }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 600; text-align: right; }
.pill {
  display: inline-block; font-size: 12px; font-weight: 700;
  padding: 2px 10px; border-radius: 999px; background: var(--good-soft); color: var(--good);
}
.pill.open { background: var(--accent-soft); color: var(--accent); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.preorder { background: #ede9fe; color: #6d28d9; }
.pill.off { background: var(--line); color: var(--muted); }
/* Order tickets */
.ticket { border-left: 3px solid var(--good); }
.ticket.open { border-left-color: var(--accent); }
.ticket-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ticket-title { font-weight: 700; font-size: 15px; }
.ticket-items { font-size: 14px; color: var(--ink); margin-top: 4px; }
.ticket-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); margin-top: 6px; }
.ticket-conf { font-size: 13px; margin-top: 6px; color: var(--good); font-weight: 600; }
.ticket-conf.pending { color: var(--warn); }
/* Gatekeeper roster */
.gk { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 10px 0; }
.gk.inactive { opacity: 0.65; }
.gk-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.gk-name { font-weight: 700; font-size: 15px; }
.gk-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 13px; color: var(--muted); margin-top: 4px; }
.gk-actions { display: flex; gap: 12px; margin-top: 8px; }
.linkbtn { background: none; border: none; padding: 0; font: inherit; font-size: 14px; color: var(--accent); cursor: pointer; font-weight: 600; }
.linkbtn.danger { color: #991b1b; }
.gk-form { border: 1px dashed var(--line); border-radius: 10px; padding: 14px; margin-top: 12px; }
.gk-form label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); }
.gk-form .input { margin: 4px 0 10px; }
/* Notices */
.notice {
  background: var(--warn-soft); border: 1px solid #fde68a; color: #92400e;
  border-radius: 10px; padding: 12px 14px; font-size: 14px; margin: 14px 0;
}
.notice.err { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
/* Login */
.login-card { max-width: 400px; margin: 60px auto; }
.input {
  width: 100%; padding: 12px; font: inherit; font-size: 16px;
  border: 1px solid var(--line); border-radius: 10px; margin: 6px 0 12px;
}
.btn {
  display: inline-block; font: inherit; font-weight: 700; cursor: pointer;
  background: var(--accent); color: #fff; border: none; border-radius: 10px;
  padding: 12px 20px; font-size: 16px;
}
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.small { padding: 8px 14px; font-size: 14px; }
/* Show/hide password toggle */
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 46px; }
.pw-toggle {
  position: absolute; right: 4px; top: 6px; bottom: 12px;
  background: none; border: none; cursor: pointer; padding: 0 10px;
  color: var(--muted); display: flex; align-items: center;
}
.pw-toggle svg { width: 20px; height: 20px; display: block; }
.pw-toggle:focus-visible { outline: 2px solid var(--accent); border-radius: 8px; }
/* OpenLine living wave */
.brand-row { display: flex; align-items: center; gap: 10px; }
.wave-mark { width: 34px; height: 34px; border-radius: 10px; flex: none; display: block; }
.wave-hero { width: 100%; height: 96px; border-radius: 10px; display: block; }
.spinner {
  width: 28px; height: 28px; border: 3px solid var(--line);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin 0.8s linear infinite; margin: 20px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.muted { color: var(--muted); font-size: 13px; }
