/* STAR ID — the visual language of star-systems.com.ua: ink #0B0D12,
   blue #2667FF, cool paper ground. No scripts, no external resources. */
:root {
  --paper: #F4F6FA;
  --surface: #FFFFFF;
  --ink: #0B0D12;
  --ink-2: #4B5468;
  --ink-3: #5D667A;
  --line: #DCE2EC;
  --line-2: #EEF1F6;
  --field: #C9D2E1;
  --blue: #2667FF;
  --blue-ink: #1F4FCC;
  --blue-soft: #E7EEFF;
  --ok: #17803D;
  --ok-soft: #E5F5EA;
  --warn: #9A4A00;
  --warn-soft: #FFF1E0;
  --bad: #B42318;
  --bad-soft: #FDECEA;
  --sans: "Onest", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
}
a { color: var(--blue); }
a:hover { color: var(--blue-ink); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.mono { font-family: var(--mono); }
h1, h2, h3 { margin: 0; text-wrap: balance; }

/* header and footer */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 18px max(20px, 4vw);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 18px; font-weight: 700; }
.brand img { width: 28px; height: 28px; }
.top .for { font-size: 14px; color: var(--ink-2); }
.top .for b { color: var(--ink); font-weight: 600; }
.foot {
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between;
  padding: 18px max(20px, 4vw); border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3);
}
.foot nav { display: flex; gap: 20px; flex-wrap: wrap; }
.foot a { color: var(--ink-2); }

/* account header */
.bar { background: var(--surface); border-bottom: 1px solid var(--line); }
.bar-in {
  max-width: 1120px; margin: 0 auto; padding: 0 24px; min-height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.bar-left { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; }
.tabs a { padding: 20px 12px; font-size: 15px; color: var(--ink-2); text-decoration: none; }
.tabs a[aria-current="page"] { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--blue); }
.who { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff;
  display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none;
}
.avatar.big { width: 72px; height: 72px; font-size: 24px; }

/* login layout */
.main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px max(20px, 4vw) 40px; }
.split { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; justify-content: center; max-width: 1040px; width: 100%; }
.card {
  flex: 0 1 460px; width: 100%; max-width: 460px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; padding: 36px; display: flex; flex-direction: column; gap: 22px;
  box-shadow: 0 12px 40px rgba(11, 13, 18, .06);
}
.service { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; }
.tag {
  display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 6px;
  background: var(--blue); color: #fff; font-family: var(--mono); font-size: 11px; font-weight: 500;
}
.card h1 { font-size: 28px; line-height: 1.15; letter-spacing: -.01em; }
.lede { margin: 0; font-size: 15px; color: var(--ink-2); line-height: 1.5; }
.lede b { color: var(--ink); font-weight: 600; }
.icon-tile { width: 48px; height: 48px; border-radius: 14px; background: var(--blue-soft); display: grid; place-items: center; }
.icon-tile svg { width: 24px; height: 24px; }

/* forms */
form { margin: 0; display: flex; flex-direction: column; gap: 10px; }
label { font-size: 14px; font-weight: 500; }
input[type=email], input[type=text], input[type=tel], select {
  font: inherit; font-size: 16px; padding: 12px 14px; border: 1px solid var(--field); border-radius: 10px;
  color: var(--ink); background: var(--surface); width: 100%;
}
input.code {
  font-family: var(--mono); font-size: 28px; letter-spacing: .5em; text-align: center; padding: 12px 0 12px .5em;
}
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 18px;
  border-radius: 10px; border: 1px solid transparent; font: inherit; font-size: 16px; font-weight: 600;
  text-decoration: none; cursor: pointer; background: var(--ink); color: #fff;
}
.btn:hover { color: #fff; background: #1C2232; }
.btn.blue { background: var(--blue); }
.btn.blue:hover { background: var(--blue-ink); }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--field); font-weight: 500; }
.btn.ghost:hover { color: var(--ink); background: #F7F9FC; }
.btn.danger { background: var(--surface); color: var(--bad); border-color: #E6B8B3; }
.btn.small { min-height: 38px; font-size: 14px; padding: 0 14px; display: inline-flex; }
.linkbtn { font: inherit; font-size: 14px; color: var(--blue); background: none; border: 0; cursor: pointer; padding: 8px 4px; }
.linkbtn.grey { color: var(--ink-2); }
.linkbtn.red { color: var(--bad); }
.g { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid currentColor; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.or { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.stack { display: flex; flex-direction: column; gap: 10px; }
.fine { margin: 0; font-size: 13px; color: var(--ink-3); line-height: 1.5; }
.hint { background: var(--paper); border-radius: 10px; padding: 12px 14px; font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.row-between { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--ink-3); }
.alert { border-radius: 10px; padding: 12px 14px; font-size: 14px; line-height: 1.45; }
.alert.err { background: var(--bad-soft); color: var(--bad); }
.alert.ok { background: var(--ok-soft); color: var(--ok); }
.chip {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px;
}
.chip .who-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chip .who-text b { font-size: 14px; font-weight: 600; }
.chip .who-text span { font-size: 13px; color: var(--ink-3); overflow-wrap: anywhere; }
.qr { align-self: center; width: 220px; height: 220px; image-rendering: pixelated; border-radius: 8px; }
.secret { font-family: var(--mono); font-size: 15px; letter-spacing: .04em; text-align: center; background: var(--paper); border-radius: 10px; padding: 10px; overflow-wrap: anywhere; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 16px; list-style: none; background: var(--paper); border-radius: 12px; font-family: var(--mono); font-size: 16px; }
.codes li { text-align: center; }

/* account pages */
.page { max-width: 1120px; width: 100%; margin: 0 auto; padding: 36px 24px 56px; display: flex; flex-direction: column; gap: 28px; }
.page h1 { font-size: 32px; letter-spacing: -.01em; }
.hero { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.hero span { color: var(--ink-2); font-size: 15px; }
.cols { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.col-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.col-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 6px; }
.panel h2 { font-size: 20px; font-weight: 600; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.sub { margin: 0 0 8px; font-size: 14px; color: var(--ink-2); }
.line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.line .what { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.line .what b { font-size: 15px; font-weight: 600; }
.line .what span { font-size: 13px; color: var(--ink-3); overflow-wrap: anywhere; }
.ident { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line-2); }
.ident > b { font-size: 14px; font-weight: 600; }
.ident .val { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; overflow-wrap: anywhere; }
.badge { font-size: 12px; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.badge.ok { color: var(--ok); background: var(--ok-soft); }
.badge.blue { color: var(--blue-ink); background: var(--blue-soft); }
.badge.plain { color: var(--ink-2); border: 1px solid var(--line); }
.badge.warn { color: var(--warn); background: var(--warn-soft); }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.inline { display: inline; }
@media (max-width: 560px) {
  .card { padding: 24px; }
  .ident { grid-template-columns: 1fr auto; }
  .ident .val { grid-column: 1 / -1; grid-row: 2; }
}
.stack.tight { gap: 4px; }
form.roomy { gap: 16px; }
.row-between.center { align-items: center; }
.actions { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

/* A small window opened by a service (display=popup): one column, no
   decoration, everything above the fold of a 480×680 window. */
body.popup .top { padding: 14px 20px; }
body.popup .main { align-items: flex-start; padding: 4px 16px 16px; }
body.popup .card { flex-basis: 100%; max-width: none; padding: 8px 4px 4px; border: 0; box-shadow: none; background: transparent; gap: 18px; }
body.popup .card h1 { font-size: 24px; }
body.popup .qr { width: 180px; height: 180px; }
body.popup .foot { padding: 12px 20px; }
