/* Resolve valet — web preview. Tokens copied from app/src/main/res/values/colors.xml. */
:root {
  --bg: #0B0E11;
  --surface: #14181C;
  --surface-raised: #1B2025;
  --border: #262C33;
  --border-strong: #35414D;
  --text: #F2F4F5;
  --text-muted: #8C96A0;
  --text-faint: #5F6973;
  --brand-green: #00FE8F;
  --brand-blue: #00A2FE;
  --accent: #00D0C6;
  --accent-tint: rgba(0, 208, 198, .10);
  --on-brand: #04131A;
  --requested: #3DB8FF;
  --requested-tint: rgba(61, 184, 255, .12);
  --success: #2EE59D;
  --success-tint: rgba(46, 229, 157, .12);
  --warning: #FFB547;
  --warning-tint: rgba(255, 181, 71, .14);
  --danger: #FF5A62;
  --danger-tint: rgba(255, 90, 98, .14);
  --gradient: linear-gradient(90deg, #00FE8F, #00A2FE);
  --page: #06080A;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--page);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; color: inherit; }
.mono { font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; }

/* ── Page: phone frame beside a briefing panel on a computer; the app fills a phone ───── */
.page {
  min-height: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 48px;
  padding: 24px;
}
.device {
  width: 392px;
  height: min(860px, calc(100vh - 48px));
  min-height: 600px;
  position: sticky;
  top: 24px;
  border-radius: 46px;
  padding: 12px;
  background: #1a1d21;
  box-shadow: 0 0 0 1px #2c3138, 0 30px 80px rgba(0, 0, 0, .6), inset 0 0 0 2px #0d0f11;
  flex-shrink: 0;
}
.screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 36px;
  overflow: hidden;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}
.statusbar {
  height: 30px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.statusbar .sig { display: flex; gap: 6px; align-items: center; font-size: 11px; }

.panel { width: 380px; max-width: 100%; padding-top: 12px; }
.panel h1 { font-size: 26px; line-height: 1.2; margin: 0 0 10px; letter-spacing: -.01em; }
.panel h1 span { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.panel p { color: var(--text-muted); font-size: 14.5px; line-height: 1.55; margin: 0 0 14px; }
.panel .eyebrow { font-size: 11px; letter-spacing: .14em; font-weight: 600; color: var(--accent); text-transform: uppercase; margin-bottom: 10px; }
.tries { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 8px; }
.tries li { font-size: 13.5px; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; line-height: 1.45; }
.tries li b { color: var(--accent); font-weight: 600; }
.fb { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 18px; padding: 16px; }
.fb h2 { font-size: 16px; margin: 0 0 4px; }
.fb .sub { font-size: 12.5px; color: var(--text-muted); margin: 0 0 12px; }
.fb input, .fb textarea {
  width: 100%; background: var(--surface-raised); border: 1px solid var(--border-strong);
  border-radius: 12px; padding: 10px 12px; font-size: 14px; outline: none; margin-bottom: 8px;
}
.fb input:focus, .fb textarea:focus { border-color: var(--accent); }
.fb textarea { min-height: 96px; resize: vertical; }
.fb .ctx { font-size: 12px; color: var(--text-faint); margin: -2px 0 10px; }
.fb .row { display: flex; gap: 8px; align-items: center; }
.fb .done { color: var(--success); font-size: 13px; }
.fb .err { color: var(--danger); font-size: 13px; }
.panel .foot { margin-top: 14px; font-size: 12px; color: var(--text-faint); line-height: 1.5; }
.panel .foot button { background: none; border: 0; color: var(--accent); padding: 0; cursor: pointer; font-size: 12px; }

.mobile-bar { display: none; }

@media (max-width: 900px) {
  .page { padding: 0; gap: 0; display: block; min-height: 0; height: 100%; height: 100dvh; }
  .device { width: 100%; height: 100%; min-height: 0; border-radius: 0; padding: 0; background: none; box-shadow: none; position: static; }
  .screen { border-radius: 0; }
  .statusbar { display: none; }
  .panel { display: none; }
  .mobile-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 6px 12px; padding-top: calc(6px + env(safe-area-inset-top));
    background: #0f1418; border-bottom: 1px solid var(--border); font-size: 12px; color: var(--text-muted);
    flex-shrink: 0;
  }
  .mobile-bar button {
    border: 0; border-radius: 100px; padding: 6px 12px; font-size: 12px; font-weight: 600;
    background: var(--gradient); color: var(--on-brand); cursor: pointer;
  }
  .page.mobile-panel .panel {
    display: block; position: fixed; inset: 0; z-index: 50; overflow-y: auto;
    background: var(--page); padding: 20px 16px calc(24px + env(safe-area-inset-bottom)); width: auto;
  }
  .panel .close-panel { display: inline-block !important; }
}
.panel .close-panel { display: none; float: right; background: var(--surface-raised); border: 1px solid var(--border-strong); border-radius: 100px; padding: 6px 12px; cursor: pointer; font-size: 13px; }

/* ── The app ─────────────────────────────────────────────────────────────────────── */
.app { position: relative; flex: 1; display: flex; flex-direction: column; min-height: 0; }
.header { padding: 10px 16px 12px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.header .top { display: flex; align-items: center; gap: 10px; }
.header .logo { height: 34px; }
.badge { font-size: 11px; letter-spacing: .14em; border: 1px solid var(--border-strong); color: var(--text-muted); border-radius: 100px; padding: 3px 9px; font-weight: 500; }
.chip-op { margin-left: auto; background: var(--surface-raised); border: 1px solid var(--border-strong); border-radius: 100px; padding: 8px 14px; font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.chips { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.chip { font-size: 12.5px; font-weight: 600; border-radius: 100px; padding: 5px 11px; background: var(--surface-raised); color: var(--text); }
.chip.req { background: var(--requested-tint); color: var(--requested); }
.chip.warn { background: var(--warning-tint); color: var(--warning); }
.alert { margin-top: 10px; background: var(--warning-tint); border: 1px solid rgba(255, 181, 71, .45); color: var(--warning); border-radius: 12px; padding: 9px 12px; font-size: 13px; line-height: 1.4; white-space: pre-line; }
.alert.tap { cursor: pointer; }

.content { flex: 1; overflow-y: auto; padding: 18px 16px 28px; overscroll-behavior: contain; }
.content::-webkit-scrollbar { width: 0; }
.h1 { font-size: 25px; font-weight: 700; margin: 6px 0 6px; letter-spacing: -.01em; }
.lede { color: var(--text-muted); font-size: 14px; line-height: 1.45; margin: 0 0 16px; }
.label { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; margin: 22px 0 10px; }
.hint { color: var(--text-muted); font-size: 13px; line-height: 1.5; }

.tabs { display: flex; border-top: 1px solid var(--border); background: #0e1215; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); flex-shrink: 0; }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 0 6px; border-radius: 16px; background: none; border: 0; color: var(--text-muted); font-size: 12.5px; cursor: pointer; }
.tab svg { width: 24px; height: 24px; }
.tab.on { background: var(--accent-tint); color: var(--accent); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 16px; }
.card + .card { margin-top: 10px; }
.card.danger { border-color: var(--danger); }
.card.req { border-color: var(--requested); }
.card.tap { cursor: pointer; transition: background .12s; }
.card.tap:active { background: var(--surface-raised); }

.btn {
  display: flex; align-items: center; justify-content: center; text-align: center;
  width: 100%; min-height: 50px; border-radius: 100px; padding: 10px 16px; cursor: pointer;
  font-weight: 600; font-size: 15px; border: 1px solid var(--border-strong); background: var(--surface-raised); color: var(--text);
}
.btn.primary { background: var(--gradient); border: 0; color: var(--on-brand); }
.btn.ghost { background: none; border: 0; color: var(--accent); min-height: 44px; }
.btn.danger { background: var(--danger-tint); border-color: var(--danger); color: var(--danger); }
.btn.small { min-height: 40px; width: auto; padding: 8px 16px; font-size: 14px; }
.btn:disabled { opacity: .45; cursor: default; }
.stack > * + * { margin-top: 10px; }
.even { display: flex; gap: 10px; }
.even > * { flex: 1; }

.field {
  width: 100%; min-height: 50px; background: var(--surface-raised); border: 1px solid var(--border-strong);
  border-radius: 14px; padding: 12px 14px; font-size: 16px; outline: none;
}
.field:focus { border-color: var(--accent); }
.field::placeholder { color: var(--text-faint); }
.plate-field { text-align: center; font-size: 30px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; min-height: 76px; border-radius: 18px; }
.err-text { color: var(--danger); font-size: 13px; margin-top: 8px; }

.plate { display: inline-block; background: var(--gradient); color: var(--on-brand); font-weight: 700; letter-spacing: .1em; border-radius: 100px; padding: 6px 14px; font-size: 17px; }
.plate.big { font-size: 24px; padding: 10px 20px; }
.pill { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; border-radius: 100px; padding: 4px 9px; }
.pill.muted { background: var(--surface-raised); color: var(--text-muted); }
.pill.req { background: var(--requested-tint); color: var(--requested); }
.pill.ok { background: var(--success-tint); color: var(--success); }
.pill.warn { background: var(--warning-tint); color: var(--warning); }

.row { display: flex; align-items: center; gap: 8px; }
.spacer { flex: 1; }
.dur { font-size: 18px; font-weight: 600; }
.sub { color: var(--text-muted); font-size: 13px; margin-top: 4px; }
.line { font-size: 15px; margin-top: 10px; }

.menu-row { display: flex; align-items: center; padding: 14px 4px; border-bottom: 1px solid var(--border); cursor: pointer; }
.menu-row:last-child { border-bottom: 0; }
.menu-row .t { font-size: 16px; font-weight: 600; }
.menu-row .d { font-size: 13px; color: var(--text-muted); margin-top: 3px; }
.menu-row svg { margin-left: auto; color: var(--text-muted); flex-shrink: 0; }

.op-row { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; cursor: pointer; }
.op-row + .op-row { margin-top: 10px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--gradient); color: var(--on-brand); display: grid; place-items: center; font-weight: 700; font-size: 18px; flex-shrink: 0; }
.op-row .n { font-size: 17px; font-weight: 600; }
.op-row .r { font-size: 13px; color: var(--text-muted); }

.info { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; margin-top: 14px; }
.info .k { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; }
.info .v { font-size: 15px; margin-top: 3px; word-break: break-word; }
.info .wide { grid-column: 1 / -1; }
.typed { color: var(--text-faint); font-size: 13px; border-top: 1px solid var(--border); margin-top: 14px; padding-top: 12px; }

.total { font-size: 38px; font-weight: 700; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1.1; }
.working { font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--text-muted); border-top: 1px solid var(--border); margin-top: 12px; padding-top: 10px; white-space: pre-line; line-height: 1.6; }
.kicker { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }

.timeline { padding: 4px 16px; }
.ev { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.ev:last-child { border-bottom: 0; }
.ev .dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.ev .when { font-size: 12px; color: var(--text-muted); }
.ev .what { font-size: 15px; font-weight: 600; margin-top: 2px; line-height: 1.35; word-break: break-word; }
.ev .meta { font-family: ui-monospace, Menlo, monospace; font-size: 11px; color: var(--text-faint); margin-top: 3px; }
.ev .pl { color: var(--accent); font-weight: 600; font-size: 12px; margin-right: 6px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 12px; }
.stat .n { font-size: 22px; font-weight: 700; }
.stat .k { font-size: 12px; color: var(--text-muted); margin-top: 2px; line-height: 1.3; }

.switch-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.switch-row:last-child { border-bottom: 0; }
.switch-row .t { font-size: 15px; font-weight: 600; }
.switch-row .d { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.toggle { margin-left: auto; width: 48px; height: 28px; border-radius: 100px; background: var(--border-strong); position: relative; cursor: pointer; border: 0; flex-shrink: 0; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left .15s; }
.toggle.on { background: var(--accent); }
.toggle.on::after { left: 23px; }
.seg { display: flex; gap: 6px; }
.seg button { flex: 1; min-height: 42px; border-radius: 100px; border: 1px solid var(--border-strong); background: var(--surface-raised); font-weight: 600; font-size: 14px; cursor: pointer; }
.seg button.on { background: var(--gradient); color: var(--on-brand); border: 0; }

/* ── Dialogs, inside the phone ──────────────────────────────────────────────────── */
.scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .62); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 20; animation: fade .12s ease-out; }
.dialog { background: #1B2025; border: 1px solid var(--border-strong); border-radius: 24px; padding: 22px 22px 12px; width: 100%; max-width: 340px; max-height: 88%; display: flex; flex-direction: column; }
.dialog h3 { margin: 0 0 10px; font-size: 21px; font-weight: 600; line-height: 1.25; }
.dialog .msg { font-size: 15px; line-height: 1.45; color: #D8DDE1; white-space: pre-line; overflow-y: auto; }
.dialog .msg .field { margin-top: 12px; }
.dialog .acts { display: flex; justify-content: flex-end; gap: 4px; margin-top: 14px; flex-wrap: wrap; }
.dialog .acts button { background: none; border: 0; font-weight: 700; font-size: 15px; padding: 10px 10px; cursor: pointer; color: var(--accent); border-radius: 10px; }
.dialog .acts button.neg { color: var(--text-muted); }
.dialog .acts button.bad { color: var(--danger); }
.dialog .items { overflow-y: auto; margin: 0 -8px; }
.dialog .item { padding: 11px 8px; border-radius: 10px; cursor: pointer; font-size: 15px; line-height: 1.4; white-space: pre-line; border-bottom: 1px solid var(--border); }
.dialog .item:last-child { border-bottom: 0; }
.dialog .item:active { background: var(--surface); }
.dialog .item .w { color: var(--warning); }

.toast { position: absolute; left: 50%; bottom: 92px; transform: translateX(-50%); background: #2A3138; color: var(--text); padding: 10px 16px; border-radius: 100px; font-size: 14px; z-index: 30; max-width: 86%; text-align: center; box-shadow: 0 8px 30px rgba(0, 0, 0, .4); animation: fade .15s ease-out; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* The printed ticket — thermal paper is white whatever the screen theme. */
.paper { background: #fff; color: #111; border-radius: 4px; padding: 14px 14px 12px; font-family: Inter, sans-serif; }
.paper .ttl { text-align: center; font-weight: 800; font-size: 20px; letter-spacing: .02em; border-bottom: 2px solid #111; padding-bottom: 6px; }
.paper .meta { font-size: 13.5px; line-height: 1.35; padding: 8px 0; border-bottom: 2px solid #111; }
.paper .qr { display: flex; justify-content: center; padding: 10px 0 4px; }
.paper .qr svg { width: 168px; height: 168px; }
.paper .code { text-align: center; font-family: ui-monospace, Menlo, monospace; font-size: 14px; letter-spacing: .06em; padding-bottom: 6px; border-bottom: 2px solid #111; }
.paper .fine { text-align: center; font-size: 12px; padding-top: 8px; }
.paper .lines { font-family: ui-monospace, Menlo, monospace; font-size: 12px; white-space: pre-line; padding: 8px 0; border-bottom: 2px solid #111; line-height: 1.5; }
.paper .big { font-size: 26px; font-weight: 800; text-align: center; padding: 8px 0 2px; }

/* The Clover payment screen stand-in */
.clover { position: absolute; inset: 0; z-index: 25; background: #f4f6f5; color: #1d1f21; display: flex; flex-direction: column; animation: fade .15s ease-out; }
.clover .bar { background: #228800; color: #fff; padding: 14px 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; font-size: 15px; }
.clover .bar small { margin-left: auto; font-weight: 500; opacity: .85; font-size: 11px; }
.clover .body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; text-align: center; }
.clover .amt { font-size: 46px; font-weight: 700; }
.clover .ins { color: #555; margin: 8px 0 26px; font-size: 15px; }
.clover .cardart { width: 150px; height: 96px; border-radius: 12px; background: linear-gradient(135deg, #2b3a55, #121b2c); position: relative; margin-bottom: 26px; animation: tap 1.6s ease-in-out infinite; }
.clover .cardart::after { content: ""; position: absolute; left: 16px; top: 30px; width: 30px; height: 22px; border-radius: 4px; background: #d8b45a; }
@keyframes tap { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.clover .go { background: #228800; color: #fff; border: 0; border-radius: 100px; padding: 14px 30px; font-size: 16px; font-weight: 700; cursor: pointer; }
.clover .cancel { background: none; border: 0; color: #555; margin-top: 14px; font-size: 14px; cursor: pointer; text-decoration: underline; }
.clover .note { font-size: 11.5px; color: #777; margin-top: 18px; max-width: 260px; line-height: 1.4; }
.spin { width: 38px; height: 38px; border-radius: 50%; border: 4px solid #cfd8cf; border-top-color: #228800; animation: rot .8s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }

.empty { text-align: center; padding: 22px 16px; }
.empty .t { font-size: 17px; font-weight: 600; }
.empty .d { color: var(--text-muted); font-size: 14px; margin-top: 6px; }
.back { display: flex; align-items: center; gap: 10px; padding: 12px 12px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.back button { background: none; border: 0; cursor: pointer; padding: 6px; display: flex; color: var(--text); }
.back .t { font-size: 20px; font-weight: 600; }
