/* Katara Connect — My eSIM. Brand: green #487d2d, yellow #f8c35e, charcoal #282828, ink #1c1c1c. */
:root {
  --green: #487d2d;
  --green-dark: #3a6624;
  --green-tint: #e3f1dc;
  --yellow: #f8c35e;
  --yellow-tint: #fdf0cf;
  --yellow-ink: #7a5a0c;
  --charcoal: #282828;
  --ink: #1c1c1c;
  --body: #4a4a4a;
  --muted: #6b6b6b;
  --faint: #8a8a8a;
  --line: #e4e8e1;
  --line-strong: #cfd6cb;
  --bg: #f4f6f2;
  --card: #ffffff;
  --red: #b3261e;
  --red-tint: #fbe9e7;
  --radius: 18px;
  --font-display: 'Funnel Display', 'Outfit', system-ui, sans-serif;
  --font-body: 'Outfit', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); -webkit-font-smoothing: antialiased; }
body { min-height: 100dvh; }
a { color: var(--green); }
button { font: inherit; }
img { max-width: 100%; display: block; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; z-index: 10; }

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: calc(16px + env(safe-area-inset-top)) 20px calc(28px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}
@media (min-width: 560px) {
  body { background: #e9ede5; }
  .app { background: var(--bg); min-height: calc(100dvh - 48px); margin: 24px auto; border-radius: 32px; box-shadow: 0 20px 60px rgba(0,0,0,0.12); padding-top: 28px; }
}

/* header */
.top { display: flex; align-items: center; justify-content: space-between; min-height: 44px; margin-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { height: 30px; width: auto; }
.top .link { font-size: 14px; font-weight: 600; text-decoration: none; }
.back { width: 42px; height: 42px; border-radius: 12px; background: var(--card); display: flex; align-items: center; justify-content: center; text-decoration: none; border: 0; cursor: pointer; }
.top .title { font-size: 15px; font-weight: 600; }
.top .spacer { width: 42px; }

h1 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 30px; line-height: 1.08; letter-spacing: -0.4px; }
h1.big { font-size: 36px; }
.lede { margin: 10px 0 0; font-size: 16px; line-height: 1.45; color: var(--body); }
.sub { font-size: 14px; color: var(--muted); margin-top: 6px; }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--body); text-transform: uppercase; letter-spacing: 0.6px; }

/* forms */
.field { display: flex; flex-direction: column; gap: 8px; }
.input { height: 54px; border: 1.5px solid var(--line-strong); border-radius: 12px; padding: 0 16px; font: 500 17px var(--font-body); color: var(--ink); background: var(--card); width: 100%; }
.input:focus { outline: 3px solid rgba(72,125,45,0.25); border-color: var(--green); }
.row { display: flex; gap: 10px; }
.row .input { flex: 1; min-width: 0; }

.btn { height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 17px; font-weight: 600; text-decoration: none; border: 0; cursor: pointer; width: 100%; padding: 0 18px; }
.btn.primary { background: var(--green); color: #fff; }
.btn.primary:hover { background: var(--green-dark); }
.btn.secondary { background: var(--card); color: var(--green); border: 1.5px solid var(--green); }
.btn.quiet { background: var(--card); color: var(--ink); border: 1.5px solid var(--line-strong); height: 50px; font-size: 15px; }
.btn.small { height: 48px; font-size: 15px; border-radius: 12px; }
.btn[disabled] { opacity: 0.55; cursor: default; }
.btn svg { flex: none; }

.divider { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 13px; margin: 26px 0 18px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.hint { font-size: 13px; color: var(--muted); margin: 4px 0 0; }
.error { background: var(--red-tint); color: var(--red); border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.4; margin-top: 12px; }
.notice { background: var(--yellow-tint); color: var(--yellow-ink); border-radius: 14px; padding: 12px 14px; font-size: 13px; line-height: 1.45; display: flex; gap: 10px; align-items: flex-start; }
.notice svg { flex: none; margin-top: 1px; }
.success { background: var(--green-tint); color: #2f5a1b; border-radius: 14px; padding: 16px; font-size: 15px; line-height: 1.45; }

/* cards */
.card { background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: 0 1px 2px rgba(0,0,0,0.06); }
.card.link { display: block; text-decoration: none; color: var(--ink); }
.card.highlight { border: 1.5px solid var(--yellow); }
.card.dim { color: var(--faint); box-shadow: none; }
.card + .card { margin-top: 14px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card-title { font-family: var(--font-display); font-weight: 700; font-size: 20px; }
.card-sub { font-size: 14px; color: var(--muted); margin-top: 3px; }
.card.dim .card-title { font-size: 17px; font-weight: 600; }
.card-foot { display: flex; align-items: center; justify-content: space-between; font-size: 14px; font-weight: 600; color: var(--green); margin-top: 14px; }

.chip { font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 999px; white-space: nowrap; }
.chip.in_use, .chip.installed { background: var(--green-tint); color: #2f5a1b; }
.chip.ready { background: var(--yellow-tint); color: var(--yellow-ink); }
.chip.pending { background: #e8eef7; color: #2a4a7a; }
.chip.expired, .chip.cancelled, .chip.unknown { background: #eeeeee; color: var(--muted); }
.chip.used_up, .chip.suspended { background: var(--red-tint); color: var(--red); }

.bar { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.bar > span { display: block; height: 8px; background: var(--green); border-radius: 999px; }
.bar.low > span { background: var(--yellow); }
.bar.empty > span { background: var(--red); }
.meta { display: flex; justify-content: space-between; font-size: 14px; margin-top: 14px; }
.meta b { font-weight: 600; }
.meta span { color: var(--muted); }

/* detail */
.ring-card { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 22px 20px; }
.ring { position: relative; width: 172px; height: 172px; }
.ring .centre { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.ring .centre b { font-family: var(--font-display); font-weight: 700; font-size: 34px; letter-spacing: -0.6px; }
.ring .centre span { font-size: 13px; color: var(--muted); }
.stats { display: flex; gap: 10px; width: 100%; }
.stat { flex: 1; background: var(--bg); border-radius: 12px; padding: 12px 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.stat b { font-family: var(--font-display); font-weight: 700; font-size: 19px; }
.stat span { font-size: 12px; color: var(--muted); }
.fine { font-size: 12px; color: var(--faint); text-align: center; }
.fine button { background: none; border: 0; color: var(--green); font-weight: 600; cursor: pointer; padding: 0; }

.table { padding: 6px 18px; }
.table .tr { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid #eef1ec; font-size: 14px; }
.table .tr:last-child { border-bottom: 0; }
.table .tr span { color: var(--muted); flex: none; }
.table .tr b { font-weight: 600; text-align: right; }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }

/* install */
.qr-card { display: flex; gap: 16px; align-items: center; }
.qr { width: 124px; height: 124px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: #fff; flex: none; display: flex; align-items: center; justify-content: center; }
.qr img, .qr canvas, .qr svg { width: 112px !important; height: 112px !important; display: block; }
.qr-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.qr-text b { font-size: 15px; font-weight: 600; }
.qr-text p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.4; }
.steps { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.step { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.45; }
.step .n { width: 26px; height: 26px; border-radius: 999px; background: var(--yellow); color: var(--ink); font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; flex: none; }
details { background: var(--card); border-radius: 14px; padding: 0 16px; }
details summary { cursor: pointer; padding: 14px 0; font-weight: 600; font-size: 14px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details summary::-webkit-details-marker { display: none; }
details .kv { display: flex; flex-direction: column; gap: 10px; padding: 0 0 16px; }
details .kv div { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
details .kv span { color: var(--muted); }
details .kv code { font-size: 13px; word-break: break-all; background: var(--bg); padding: 8px 10px; border-radius: 8px; }
.copy { background: none; border: 1.5px solid var(--line-strong); color: var(--ink); border-radius: 8px; padding: 6px 10px; font-size: 12px; font-weight: 600; cursor: pointer; }

.help { display: flex; gap: 12px; align-items: center; padding: 14px 16px; }
.help img { width: 42px; height: 42px; border-radius: 999px; object-fit: cover; flex: none; }
.help .avatar-fallback { width: 42px; height: 42px; border-radius: 999px; background: var(--green-tint); display: flex; align-items: center; justify-content: center; flex: none; }
.help p { margin: 0; font-size: 13px; line-height: 1.4; color: var(--body); }

/* top up */
.option { width: 100%; text-align: left; background: var(--card); border: 2px solid var(--card); border-radius: 16px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,0.06); }
.option + .option { margin-top: 10px; }
.option.selected { border-color: var(--green); }
.option .l b { font-family: var(--font-display); font-weight: 700; font-size: 20px; display: block; }
.option .l span { font-size: 13px; color: var(--muted); }
.option .dot { width: 22px; height: 22px; border-radius: 999px; border: 2px solid var(--line-strong); flex: none; }
.option.selected .dot { border: 7px solid var(--green); }

.footer-links { margin-top: 18px; text-align: center; font-size: 13px; color: var(--muted); }
.footer-links a { font-weight: 600; }
.tiny { font-size: 12px; color: var(--faint); text-align: center; margin-top: 10px; }
.grow { flex: 1; }
.mt { margin-top: 16px; }
.mt-s { margin-top: 10px; }
.mt-l { margin-top: 24px; }
.center { text-align: center; }

.skeleton { background: linear-gradient(90deg, #eceee9 25%, #f6f7f4 37%, #eceee9 63%); background-size: 400% 100%; animation: shimmer 1.4s infinite; border-radius: 12px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.mock-banner { font-size: 12px; background: var(--charcoal); color: #fff; padding: 6px 12px; border-radius: 999px; align-self: center; margin-bottom: 10px; }
