/* Placeholder theme. Swap these variables for the final CNCT colors and fonts. */
:root {
  --bg: #0b0b0b;
  --card: #161616;
  --line: #262626;
  --text: #f4f4f4;
  --muted: #8a8a8a;
  --accent: #ffffff;
  --accent-text: #0b0b0b;
  --ok: #4ade80;
  --wait: #fbbf24;
  --no: #f87171;
  --radius: 16px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --display: "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; }
.wrap { max-width: 520px; margin: 0 auto; padding: max(20px, env(safe-area-inset-top)) 16px 40px; }
.screen[hidden] { display: none !important; }
h1 { font-family: var(--display); font-size: 26px; letter-spacing: -0.02em; margin: 2px 0 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; line-height: 1.45; }
.center { text-align: center; }
.err { color: var(--no); font-size: 14px; margin: 10px 0 0; }
.eyebrow { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-top: 12px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* login */
#login { min-height: 90vh; display: flex; flex-direction: column; justify-content: center; }
.brand { text-align: center; margin-bottom: 20px; }
.logo { font-family: var(--display); font-weight: 900; font-size: 54px; letter-spacing: -0.04em; line-height: 1; }
.sub { letter-spacing: 0.5em; font-size: 12px; color: var(--muted); margin-top: 6px; padding-left: 0.5em; }
#loginForm h1 { font-size: 22px; }
label { display: block; font-size: 13px; color: var(--muted); margin-top: 14px; }
input, select { display: block; width: 100%; margin-top: 6px; padding: 14px; font-size: 16px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; outline: none; font-family: inherit; }
input:focus, select:focus { border-color: var(--accent); }
.btn { width: 100%; margin-top: 18px; padding: 15px; font-size: 16px; font-weight: 700; color: var(--accent-text); background: var(--accent); border: 0; border-radius: 12px; cursor: pointer; }
.btn:disabled { opacity: 0.6; }
.ghost { background: none; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-size: 13px; cursor: pointer; }
.mini { background: var(--accent); color: var(--accent-text); border: 0; border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: 12px; cursor: pointer; }

/* dashboard */
.top { display: flex; align-items: flex-end; justify-content: space-between; }
.codepill { display: flex; align-items: center; gap: 10px; margin-top: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 8px 8px 8px 16px; }
.codepill span { font-size: 12px; color: var(--muted); }
.codepill strong { flex: 1; letter-spacing: 0.08em; }
.live { display: flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 13px; font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 var(--ok); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(74,222,128,.6); } 70% { box-shadow: 0 0 0 8px rgba(74,222,128,0); } 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); } }
.hero .big { font-family: var(--display); font-size: 52px; font-weight: 800; letter-spacing: -0.03em; margin: 6px 0 4px; }
.pending { color: var(--wait); font-size: 13px; margin-top: 8px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid .card { margin-top: 12px; padding: 16px; }
.num { font-family: var(--display); font-size: 28px; font-weight: 800; margin-top: 6px; }
.badge { font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; }
.badge.hot { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.bar { height: 10px; background: var(--bg); border-radius: 999px; margin: 14px 0 10px; overflow: hidden; border: 1px solid var(--line); }
.bar > div { height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width .6s ease; }

.board { list-style: none; padding: 0; margin: 10px 0 0; }
.board li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.board li:last-child { border-bottom: 0; }
.board .rk { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--bg); font-size: 12px; font-weight: 700; }
.board li:nth-child(1) .rk { background: var(--accent); color: var(--accent-text); }
.board .nm { flex: 1; }
.board .pc { font-weight: 700; }
.board li.me { background: rgba(255,255,255,.05); margin: 0 -10px; padding: 10px; border-radius: 10px; }

.orders { list-style: none; padding: 0; margin: 10px 0 6px; }
.orders li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.orders li:last-child { border-bottom: 0; }
.orders .right { display: flex; align-items: center; gap: 10px; }
.amt { font-weight: 700; min-width: 34px; text-align: right; }
.tag { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.tag.ok { color: var(--ok); background: rgba(74,222,128,.12); }
.tag.wait { color: var(--wait); background: rgba(251,191,36,.12); }
.tag.no { color: var(--no); background: rgba(248,113,113,.12); }

/* admin */
.wrap.wide { max-width: 1100px; }
.tabs { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.tabs button { background: var(--card); color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; cursor: pointer; font-size: 14px; }
.tabs button.on { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.amb { padding: 16px; }
.amb .head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.amb .facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin: 12px 0; }
.amb .facts div { background: var(--bg); border-radius: 10px; padding: 10px; }
.amb .facts b { display: block; font-size: 18px; margin-top: 2px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.actions button, .smallbtn { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font-size: 13px; cursor: pointer; }
.actions button.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); font-weight: 700; }
.actions button:disabled { opacity: 0.35; cursor: default; }
.actions button.danger { color: var(--no); }
details summary { cursor: pointer; color: var(--muted); font-size: 13px; margin-top: 10px; }
.inline { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.inline label { flex: 1; min-width: 120px; margin-top: 8px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--accent); color: var(--accent-text); padding: 12px 18px; border-radius: 999px; font-weight: 700; font-size: 14px; z-index: 9; }
.off { opacity: 0.5; }
