/* Fortulox account — extends the landing tokens from /assets/style.css */
.app { min-height: 100vh; }
.app-main { padding-top: clamp(24px, 4vw, 40px); padding-bottom: 80px; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.center { text-align: center; }
.pad { padding: 40px 0; }
.gold { color: var(--gold); }
.break { word-break: break-all; }
.page-title { font: 700 clamp(1.5rem, 3vw, 2rem)/1.15 var(--font-display); margin-bottom: 24px; }
.lead-sm { margin: -12px 0 24px; }
.app h2 { font-size: 1.05rem; font-weight: 700; }

/* demo banner */
.demo-banner {
  background: repeating-linear-gradient(-45deg, rgba(124, 140, 255, .16) 0 12px, rgba(124, 140, 255, .1) 12px 24px);
  color: #c9d0ff; text-align: center; font-size: 13.5px; font-weight: 600; padding: 8px var(--gutter);
  border-bottom: 1px solid rgba(124, 140, 255, .3);
}

/* tabs */
.tabs { display: flex; gap: 4px; margin-left: 12px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 8px 14px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 14.5px; white-space: nowrap; }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { color: var(--text); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
button.lang { background: none; cursor: pointer; }

/* panels & layout */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 3vw, 26px); margin-bottom: 20px; min-width: 0; }
.panel h2 { margin-bottom: 14px; }
.panel__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.panel__head h2 { margin: 0; margin-right: auto; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.grid2 > .panel { margin-bottom: 0; }
.grid2 + .panel, .grid2 + section { margin-top: 20px; }
.empty { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; display: grid; gap: 6px; min-width: 0; }
.stat span { color: var(--muted); font-size: 13.5px; }
.stat b { font: 700 1.25rem/1.2 var(--font-mono); overflow-wrap: anywhere; }
.stat--gold { border-color: rgba(242, 193, 78, .4); background: linear-gradient(180deg, var(--gold-soft), var(--surface) 80%); }
.stat--gold b { color: var(--gold); }

/* draw card */
.big { font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 500; letter-spacing: .02em; margin: 2px 0 6px; }
.draw-card .cycle { margin-top: 16px; }
.draw-card__note { margin: 10px 0 6px; font-size: 13.5px; color: var(--gold); }

/* key/value rows & lists */
.kv { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.kv:first-of-type { border-top: 0; }
.kv span:first-child { color: var(--muted); font-size: 14px; }
.kv b { text-align: right; overflow-wrap: anywhere; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list li > span:first-child { font-weight: 600; margin-right: auto; }
.list--addr li > div, .list--sessions li > div { display: grid; gap: 2px; margin-right: auto; min-width: 0; flex: 1 1 220px; }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--ok { background: var(--mint-soft); color: var(--mint); }
.badge--wait { background: var(--gold-soft); color: var(--gold); }
.badge--muted { background: rgba(255, 255, 255, .05); color: var(--faint); }

/* forms */
.auth { max-width: 440px; margin: clamp(16px, 6vw, 56px) auto 0; }
.auth h1 { font: 700 1.8rem/1.15 var(--font-display); margin-bottom: 8px; }
.form { display: grid; gap: 16px; margin-top: 24px; }
.panel .form { margin-top: 8px; }
.field { display: grid; gap: 6px; }
.field__label { font-weight: 600; font-size: 14px; }
.field__hint { color: var(--faint); font-size: 12.5px; }
.app input[type=text], .app input[type=email], .app input[type=password], .app input:not([type]), .app select {
  width: 100%; min-height: 48px; padding: 0 14px; border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text); border: 1px solid var(--line-strong);
  font: 500 16px/1.2 var(--font-body);
}
.app input:focus, .app select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.app select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%239aa3b2' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 12px; padding-right: 36px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: #cdd2dc; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--gold); flex: none; }
.check a, .auth a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.form-error { color: #ff9b9b; background: rgba(255, 92, 92, .1); border: 1px solid rgba(255, 92, 92, .3); padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.form-error[hidden] { display: none; }
.code-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; }
.code-row input { font-family: var(--font-mono) !important; letter-spacing: .3em; text-align: center; }
.code-hint { font: 600 14px/1.4 var(--font-mono); color: #c9d0ff; background: rgba(124, 140, 255, .12); border-radius: 10px; padding: 10px 12px; }
.input-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.btn.is-busy { opacity: .6; pointer-events: none; }
.btn:disabled { opacity: .6; cursor: default; }
.btn--demo { background: rgba(124, 140, 255, .14); color: #c9d0ff; border-color: rgba(124, 140, 255, .45); margin-top: 16px; }
.btn--demo:hover { background: rgba(124, 140, 255, .22); }
.link-btn { background: none; border: 0; color: var(--muted); font: 600 13.5px var(--font-body); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; padding: 6px 0; }
.link-btn:hover { color: #ff9b9b; }
.icon-btn { background: none; border: 1px solid var(--line-strong); color: var(--muted); border-radius: 8px; width: 32px; height: 32px; cursor: pointer; font-size: 15px; vertical-align: middle; }
.icon-btn:hover { color: var(--text); }
details.add { margin-top: 16px; }
details.add summary { list-style: none; display: inline-flex; }
details.add summary::-webkit-details-marker { display: none; }
details.add[open] summary { display: none; }

/* buy */
.choice { border: 0; margin: 0 0 20px; padding: 0; }
.choice__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.product { position: relative; display: grid; gap: 6px; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); cursor: pointer; transition: border-color .15s; }
.product input { position: absolute; opacity: 0; pointer-events: none; }
.product.is-on { border-color: var(--gold); background: linear-gradient(180deg, var(--gold-soft), var(--surface) 70%); box-shadow: 0 0 0 1px var(--gold) inset; }
.product:focus-within { outline: 2px solid var(--gold); outline-offset: 2px; }
.product__name { color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 13px; }
.product__price b { font: 700 2.2rem/1 var(--font-display); margin-right: 4px; color: var(--text); }
.product__price { color: var(--muted); font-weight: 600; }
.product__per { font-size: 12.5px; color: var(--gold); }
.buy__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.buy__row > div:first-child { display: grid; gap: 4px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; }
.stepper button { width: 44px; height: 44px; background: none; border: 0; color: var(--text); font-size: 20px; cursor: pointer; }
.stepper button:hover { background: var(--surface-2); }
.stepper output { min-width: 36px; text-align: center; font-size: 17px; }
.nets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 10px 0 20px; }
.net { position: relative; cursor: pointer; }
.net input { position: absolute; opacity: 0; }
.net span { display: grid; gap: 2px; padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--bg); height: 100%; }
.net small { color: var(--faint); }
.net em { font-style: normal; color: var(--muted); font-size: 12.5px; }
.net input:checked + span { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.net input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.buy__total { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0; border-top: 1px solid var(--line); margin-bottom: 12px; }
.buy__total b { font: 700 1.5rem/1 var(--font-mono); color: var(--gold); }

/* pay */
.pay__amount { font-size: clamp(2rem, 6vw, 3rem); font-weight: 500; line-height: 1.1; margin-bottom: 10px; overflow-wrap: anywhere; }
.pay__amount small { font-size: .45em; color: var(--muted); }
.pay__suffix { color: var(--gold); background: var(--gold-soft); border-radius: 6px; padding: 0 .08em; }
.addr { display: flex; align-items: center; gap: 10px; margin: 10px 0 18px; padding: 12px 12px 12px 14px; background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font-size: 14px; }
.addr span { word-break: break-all; flex: 1; }
.warn { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.warn li { position: relative; padding-left: 26px; font-size: 14px; color: #e8d6a8; }
.warn li::before { content: "!"; position: absolute; left: 0; top: 1px; width: 18px; height: 18px; border-radius: 50%; background: var(--gold-soft); color: var(--gold); font: 800 12px/18px var(--font-body); text-align: center; }
.ok-box { margin: 14px 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--mint-soft); color: var(--mint); font-weight: 600; }

/* tables */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font: 600 11.5px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); padding: 0 4px 10px; white-space: nowrap; }
.table td { padding: 11px 4px; border-top: 1px solid var(--line); vertical-align: middle; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 80; background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--text); padding: 12px 18px; border-radius: 12px; box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .8); font-weight: 600; max-width: calc(100% - 32px); }

@media (max-width: 900px) {
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .topbar__in { flex-wrap: wrap; height: auto; padding-top: 12px; padding-bottom: 0; row-gap: 8px; }
  .tabs { order: 3; flex: 1 0 100%; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 10px; }
}
@media (max-width: 640px) {
  .stats { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .stat { grid-template-columns: 1fr auto; align-items: center; }
  .stat b { font-size: 1.05rem; text-align: right; }
  .choice__grid, .nets { grid-template-columns: minmax(0, 1fr); }
  .product__price b { font-size: 1.8rem; }
  .code-row { grid-template-columns: minmax(0, 1fr); }
}
