/* portal.css: uses design tokens from tokens.css. */

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px var(--font-sans);
}
button, input, select, textarea {
  font: inherit;
}
button, a, input, select, textarea {
  -webkit-tap-highlight-color: transparent;
}
a {
  color: var(--accent);
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: .55;
  cursor: wait;
}
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.brand {
  font-size: 25px;
  font-weight: 780;
  text-decoration: none;
  letter-spacing: -1px;
  color: var(--ink);
}
.app-header {
  height: 83px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 15px;
  max-width: 1100px;
  margin: auto;
  padding: 0 30px;
}
.workspace-link {
  margin-left: auto;
  font-size: 12px;
  text-decoration: none;
}
.badge {
  background: var(--neutral-bg);
  color: var(--neutral-ink);
  padding: 6px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 650;
}
.app {
  max-width: 850px;
  margin: auto;
  padding: 34px 26px 120px;
}
.app-intro {
  margin-bottom: 28px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 750;
  color: var(--muted);
  margin: 0 0 10px;
}
h1 {
  font-size: 36px;
  letter-spacing: -1.4px;
  font-weight: 650;
  line-height: 1.15;
  margin: 0 0 15px;
}
h2 {
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -.5px;
  margin: 0 0 13px;
}
h3 {
  font-size: 15px;
  margin: 0 0 8px;
}
.muted {
  color: var(--muted);
  line-height: 1.6;
}
.small {
  font-size: 12px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 25px;
  margin-bottom: 18px;
}
.feature-card {
  background: var(--ink);
  color: var(--on-accent);
  border-radius: var(--radius-xl);
  padding: 28px;
  margin: 0 0 20px;
}
.feature-card .muted {
  color: var(--inverse-muted);
}
.feature-card .eyebrow {
  color: var(--inverse-muted);
}
.amount {
  font-size: 43px;
  letter-spacing: -2px;
  font-weight: 600;
  margin: 10px 0;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 16px;
}
.stack {
  display: grid;
  gap: 15px;
}
label {
  display: grid;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
}
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--field);
  border-radius: var(--radius-md);
  min-height: 50px;
  padding: 12px;
  color: var(--ink);
}
input.plate-input {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-family: var(--font-mono);
  font-size: 21px;
  font-weight: 600;
}
button.primary, .button {
  display: block;
  width: 100%;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: var(--on-accent);
  min-height: 51px;
  padding: 14px 20px;
  font-weight: 650;
  text-align: center;
  text-decoration: none;
}
.button.secondary, button.secondary {
  background: var(--surface-muted);
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  min-height: 45px;
  font-weight: 600;
  text-decoration: none;
}
.text-button {
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 9px;
  font-size: 13px;
}
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.list-row {
  padding: 17px 0;
  border-bottom: 1px solid var(--line-subtle);
}
.list-row:last-child {
  border: 0;
}
.status {
  font-size: 11px;
  padding: 5px 9px;
  border-radius: var(--radius-full);
  background: var(--ok-bg);
  color: var(--ok-ink);
}
.status.pending {
  background: var(--warn-bg);
  color: var(--warn-ink);
}
.status.failed {
  background: var(--danger-bg);
  color: var(--danger-ink);
}
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  gap: 8px;
  background: var(--glass);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  justify-content: center;
  padding: 10px 18px max(10px,env(safe-area-inset-bottom));
  z-index: 5;
}
.bottom-nav button {
  border: 0;
  background: transparent;
  color: var(--muted);
  min-width: 100px;
  min-height: 48px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
}
.bottom-nav button.active {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 700;
}
.pill-number {
  padding: 4px 9px;
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  font-size: 12px;
}
.offline {
  padding: 12px 20px;
  text-align: center;
  background: var(--warn-bg);
  color: var(--warn-ink);
  font-size: 13px;
}
.error {
  padding: 14px 18px;
  background: var(--danger-bg);
  color: var(--danger-ink);
  border-radius: var(--radius-md);
  margin-bottom: 18px;
  line-height: 1.5;
}
.success {
  padding: 14px 18px;
  background: var(--ok-bg);
  color: var(--ok-ink);
  border-radius: var(--radius-md);
  margin-bottom: 18px;
  line-height: 1.5;
}
.empty {
  text-align: center;
  padding: 32px 20px;
  color: var(--muted);
}
.empty-symbol {
  font-size: 35px;
  color: var(--muted);
  margin-bottom: 16px;
}
.receipt {
  padding: 28px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.receipt dl, .summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}
.receipt dd {
  margin: 0;
  text-align: right;
}
.receipt dt {
  color: var(--muted);
  font-size: 13px;
}
.check {
  width: 58px;
  height: 58px;
  background: var(--ok-bg);
  color: var(--ok-ink);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 28px;
  margin: 0 auto 18px;
}
.progress {
  display: flex;
  gap: 7px;
  margin: 25px 0;
}
.progress span {
  flex: 1;
  height: 4px;
  border-radius: 3px;
  background: var(--line);
}
.progress span.done {
  background: var(--accent);
}
dialog {
  border: 0;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 30px;
  width: min(560px,94vw);
  color: var(--ink);
}
dialog::backdrop {
  background: var(--backdrop);
}
.close {
  float: right;
  border: 0;
  background: var(--surface-muted);
  border-radius: 50%;
  width: 35px;
  height: 35px;
}
.qr {
  width: 180px;
  height: 180px;
  display: block;
  margin: 18px auto;
}
.linkbox {
  font-size: 12px;
  overflow-wrap: anywhere;
  background: var(--surface-sunken);
  padding: 13px;
  border-radius: var(--radius-sm);
}
.welcome {
  max-width: 1050px;
  padding: 60px 32px;
  margin: auto;
}
.welcome>.badge {
  float: right;
}
.welcome>.eyebrow {
  margin-top: 70px;
}
.welcome h1 {
  font-size: 60px;
  letter-spacing: -3px;
}
.lead {
  color: var(--muted);
  font-size: 18px;
  max-width: 580px;
  line-height: 1.7;
  margin-bottom: 40px;
}
.workspace-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 18px;
}
.workspace-grid>button {
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  color: var(--ink);
}
.workspace-grid>button:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.workspace-grid p {
  color: var(--muted);
  line-height: 1.6;
}
.workspace-grid button>span:last-child {
  font-size: 12px;
  font-weight: 650;
}
.workspace-icon {
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  width: 43px;
  height: 43px;
  border-radius: var(--radius-md);
  font-size: 22px;
  margin-bottom: 20px;
}
.skeleton {
  height: 180px;
  border-radius: var(--radius-lg);
  background: linear-gradient(110deg,var(--surface-muted),var(--surface-sunken),var(--surface-muted));
}
details>summary {
  cursor: pointer;
  padding: 10px 0;
  font-size: 13px;
}
details .stack {
  padding-top: 12px;
}
.inline-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}
.inline-actions>button {
  flex: 1;
}
.hidden, [hidden] {
  display: none!important;
}
.install {
  background: var(--accent-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 15px;
  font-size: 12px;
  line-height: 1.6;
  margin-bottom: 20px;
}
.tender {
  display: flex;
  gap: 10px;
}
.tender label {
  display: flex;
  align-items: center;
  flex: 1;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px;
}
.tender input {
  width: 18px;
  min-height: 18px;
}
.receipt-reference {
  font-size: 10px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.table-scroll {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 13px;
}
td, th {
  padding: 12px;
  border-bottom: 1px solid var(--line);
}
th {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--muted);
}
@media(max-width:600px) {
  .app-header {
    height: 69px;
    padding: 0 20px;
    gap: 10px;
  }
  .brand {
    font-size: 23px;
  }
  .app {
    padding: 28px 20px 110px;
  }
  .app h1 {
    font-size: 32px;
  }
  .card {
    padding: 22px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .workspace-link {
    font-size: 11px;
  }
  .workspace-grid {
    grid-template-columns: 1fr;
  }
  .welcome {
    padding: 32px 22px;
  }
  .welcome>.eyebrow {
    margin-top: 50px;
  }
  .welcome h1 {
    font-size: 44px;
    letter-spacing: -2px;
  }
  .lead {
    font-size: 16px;
  }
  .amount {
    font-size: 39px;
  }
  .bottom-nav button {
    min-width: 80px;
    padding: 10px 15px;
  }
}
@media print {
  .app-header, .bottom-nav, .app-intro, button, .offline {
    display: none;
  }
  .app {
    padding: 0;
  }
  .receipt {
    border: 0;
  }
}
