/* ═══════════════════════════════════════════════════════════════════
   SAMD — dizayn sistemi (2026 maketləri)
   İsti mint→şaftalı fon · ağ kartlar · yaşıl/narıncı vurğular
   Sinif adları köhnə ilə eynidir ki, bütün modullar avtomatik yenilənsin.
   ═══════════════════════════════════════════════════════════════════ */

:root {
  /* Palitra (Android Samd ilə eyni) */
  --bg: #f3f8f1;
  --ink: #183d2d;
  --ink-2: #586b5c;
  --ink-3: #8b9a8c;
  --sep: rgba(24, 61, 45, 0.08);
  --field: #e9efe4;
  --mint: #d9edcd;
  --mint-chip: #e3f0d9;
  --green: #21643e;
  --green-t: #2e6b45;
  --lime: #bee195;
  --orange: #b94a0b;
  --orange-soft: #f29b4b;
  --peach: #ffe5cd;
  --peach-strong: #ffd9b4;
  --peach-t: #a15626;
  --gray: #ebede2;
  --gray-chip: #eeece6;
  --red: #c4372f;
  --blue: #2f6fb5;
  --scan-bg: #132d2a;
  --scan-seg: #2f4545;
  --scan-frame: #24423f;
  --scan-border: #f5af6e;

  /* Köhnə adlar (modullar istifadə edir) */
  --g: #6fa22c; --g-d: var(--green-t); --g-dd: var(--green);
  --o: var(--orange-soft); --o-d: var(--orange);

  --card: rgba(255, 255, 255, 0.86);
  --shadow: 0 1px 2px rgba(24, 61, 45, 0.04), 0 8px 24px rgba(24, 61, 45, 0.06);

  --r-xl: 30px; --r-lg: 24px; --r-md: 18px; --r-sm: 12px;
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --soft: cubic-bezier(0.22, 1, 0.36, 1);

  --safe-t: env(safe-area-inset-top);
  --safe-b: env(safe-area-inset-bottom);
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", system-ui, sans-serif;
  font-size: 17px; line-height: 1.35; letter-spacing: -0.012em;
  color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
svg { display: block; flex: none; }
.hidden { display: none !important; }

/* ───────── Fon: solda mint, sağda şaftalı ───────── */
.scene { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.scene::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(70% 55% at 0% 0%, rgba(206, 232, 196, 0.85), transparent 70%),
    radial-gradient(65% 60% at 100% 45%, rgba(255, 222, 196, 0.75), transparent 72%),
    radial-gradient(70% 50% at 20% 105%, rgba(228, 241, 220, 0.9), transparent 70%),
    var(--bg);
}
.orb { display: none; }

/* ───────── Kart materialı ───────── */
.glass {
  position: relative;
  background: var(--card);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: var(--shadow);
}
.glass.strong { background: rgba(255, 255, 255, 0.96); }
.glass.tint-g { background: var(--green); color: #fff; box-shadow: 0 8px 22px rgba(33, 100, 62, 0.25); }
.glass.tint-o { background: var(--orange); color: #fff; box-shadow: 0 8px 22px rgba(185, 74, 11, 0.28); }
.glass.tint-r { background: #fbe1dc; color: var(--red); box-shadow: none; }
.glass.tint-mint { background: var(--mint); box-shadow: none; }
.glass.tint-peach { background: var(--peach); box-shadow: none; }
.glass.tint-dark { background: var(--green); color: #fff; box-shadow: 0 10px 30px rgba(33, 100, 62, 0.22); }

.press { transition: transform 0.35s var(--spring), filter 0.2s; cursor: pointer; user-select: none; -webkit-user-select: none; }
.press:active { transform: scale(0.965); filter: brightness(0.97); transition-duration: 0.1s; }

/* ───────── Tipografiya ───────── */
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--green-t); margin: 0 0 4px; }
.large-title { font-size: 30px; line-height: 1.12; font-weight: 800; letter-spacing: -0.03em; margin: 0; }
.title-2 { font-size: 23px; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.title-3 { font-size: 19px; font-weight: 700; letter-spacing: -0.015em; margin: 0; }
.headline { font-size: 17px; font-weight: 600; }
.sub { font-size: 15px; color: var(--ink-2); }
.foot { font-size: 13px; color: var(--ink-2); }
.caps { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; }
.big-num { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.big-time { font-size: 64px; font-weight: 900; letter-spacing: -0.05em; line-height: 1.02; font-variant-numeric: tabular-nums; margin: 4px 0 2px; }

/* ───────── Səhifə quruluşu ───────── */
.page { max-width: 760px; margin: 0 auto; padding: calc(var(--safe-t) + 76px) 20px calc(var(--safe-b) + 120px); }
.stack > * + * { margin-top: 14px; }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.section-label { padding: 18px 6px 4px; }
.divider { height: 1px; background: rgba(24, 61, 45, 0.1); margin: 16px 0 14px; border: 0; }

.navbar {
  position: fixed; z-index: 30; left: 12px; right: 12px; top: calc(var(--safe-t) + 8px);
  max-width: 736px; margin: 0 auto; height: 56px; padding: 0 8px 0 10px;
  display: flex; align-items: center; gap: 10px; border-radius: 999px;
}
.navbar .logo { width: 38px; height: 38px; border-radius: 50%; background: #fff; padding: 2px; object-fit: contain; }
.navbar .t { flex: 1; min-width: 0; }
.navbar .t b { display: block; font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.navbar .t span { display: block; font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; background: transparent; color: var(--ink); position: relative; }
.icon-btn.glass { background: rgba(255, 255, 255, 0.8); box-shadow: var(--shadow); }
.icon-btn.round { width: 50px; height: 50px; background: rgba(255, 255, 255, 0.85); box-shadow: var(--shadow); }
.icon-btn.orange { background: var(--orange); color: #fff; box-shadow: 0 8px 20px rgba(185, 74, 11, 0.28); }
.icon-btn .badge { position: absolute; top: 9px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 2px #fff; }

/* ───────── Kartlar ───────── */
.card { border-radius: var(--r-lg); padding: 18px; }
.card.xl { border-radius: var(--r-xl); padding: 22px; }
.stat { border-radius: var(--r-lg); padding: 16px 14px; }
.stat .l { font-size: 13px; color: var(--ink-2); margin-top: 8px; font-weight: 500; }
.stat .ic { display: none; }
.stat.mint { background: var(--mint); box-shadow: none; }
.stat.peach { background: var(--peach); box-shadow: none; }
.stat.peach .big-num { color: var(--peach-t); }
.stat.gray { background: var(--gray); box-shadow: none; }
.stat.field { background: var(--field); box-shadow: none; }

.ic.g { background: var(--mint-chip); color: var(--green-t); }
.ic.o { background: var(--peach); color: var(--peach-t); }
.ic.r { background: #fbe1dc; color: var(--red); }
.ic.b { background: #e1ecf7; color: var(--blue); }
.ic.n { background: var(--gray-chip); color: var(--ink-2); }

/* Siyahı */
.list { border-radius: var(--r-lg); overflow: hidden; }
.list .li { display: flex; align-items: center; gap: 14px; padding: 14px 16px; min-height: 60px; position: relative; }
.list .li + .li::before { content: ""; position: absolute; top: 0; right: 0; left: 62px; height: 1px; background: var(--sep); }
.list .li.no-ic + .li.no-ic::before, .list .li.no-ic::before { left: 16px; }
.list .li .ic { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.list .li .main { flex: 1; min-width: 0; }
.list .li .main b { display: block; font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list .li .main span { display: block; font-size: 13px; color: var(--ink-2); margin-top: 1px; }
.list .li .trail { text-align: right; font-size: 15px; color: var(--ink-2); }
.list .li.tap { cursor: pointer; transition: background 0.2s; }
.list .li.tap:active { background: rgba(24, 61, 45, 0.05); }
.empty { padding: 26px 16px; text-align: center; color: var(--ink-2); font-size: 15px; }

.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700; font-size: 15px; background: var(--mint-chip); color: var(--green-t); }
.time-chip { flex: none; padding: 8px 10px; border-radius: 14px; font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; background: var(--mint-chip); color: var(--ink); }
.time-chip.late { background: var(--peach); color: var(--peach-t); }
.time-chip.out { background: var(--gray-chip); }

/* Çip */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.pill.g { background: var(--mint-chip); color: var(--green-t); }
.pill.o { background: var(--peach); color: var(--peach-t); }
.pill.r { background: #fbe1dc; color: var(--red); }
.pill.b { background: #e1ecf7; color: var(--blue); }
.pill.n { background: var(--gray-chip); color: var(--ink-2); }
.pill.w { background: rgba(255, 255, 255, 0.7); color: var(--ink-2); }
.pill.lime { background: var(--lime); color: var(--ink); }
.pill .dot { width: 7px; height: 7px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.dot.g { background: #3f9a5a; }
.dot.o { background: var(--orange-soft); }
.dot.r { background: var(--red); }
.dot.n { background: var(--ink-3); }

/* ───────── Düymələr ───────── */
.btn {
  height: 56px; padding: 0 22px; border: 0; border-radius: 999px; width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 17px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink);
  text-decoration: none;
}
.btn.glass:not(.tint-g):not(.tint-o):not(.tint-r) { background: rgba(255, 255, 255, 0.85); }
.btn.cta { justify-content: space-between; padding: 0 24px; height: 60px; }
.btn.sm { height: 38px; padding: 0 14px; font-size: 15px; width: auto; }
.btn.md { height: 48px; font-size: 16px; }
.btn.danger { color: var(--red); }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.link-btn { border: 0; background: none; color: var(--green-t); font-weight: 600; font-size: 15px; padding: 6px 4px; cursor: pointer; }

/* ───────── Form ───────── */
.field { display: block; }
.field > span { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink-2); margin: 0 4px 6px; }
.input {
  width: 100%; height: 54px; padding: 0 16px; border-radius: 18px; outline: none; font-size: 17px; font-weight: 500;
  border: 0; color: var(--ink); background: var(--field); box-shadow: none;
  -webkit-appearance: none; appearance: none;
  transition: box-shadow 0.2s, background 0.2s;
}
.input:focus { background: #fff; box-shadow: inset 0 0 0 2px var(--green); }
textarea.input { height: auto; padding: 14px 16px; line-height: 1.4; }
select.input { background-image: none; }
.input-box { position: relative; display: block; background: var(--field); border-radius: 18px; padding: 10px 16px 10px; }
.input-box > span { display: block; font-size: 12px; color: var(--ink-2); }
.input-box input { width: 100%; border: 0; outline: none; background: none; font-size: 17px; font-weight: 500; color: var(--ink); padding: 2px 40px 0 0; height: 28px; }
.input-box:focus-within { background: #fff; box-shadow: inset 0 0 0 2px var(--green); }
.input-box .eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--ink-2); width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; }
.search { display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 52px; border-radius: 999px; background: rgba(255, 255, 255, 0.85); box-shadow: var(--shadow); color: var(--ink-2); }
.search input { flex: 1; border: 0; outline: none; background: none; font-size: 16px; color: var(--ink); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
[data-days].chips { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
[data-days] .chip { min-width: 0; padding: 0; font-size: 13px; border-radius: 14px; height: 42px; }
.chip { height: 38px; min-width: 44px; padding: 0 16px; border-radius: 999px; border: 0; font-size: 14px; font-weight: 600; color: var(--ink); background: var(--field); transition: all 0.25s var(--soft); cursor: pointer; }
.chip.on { color: #fff; background: var(--green); }

/* ───────── Seqmentli idarə ───────── */
.segmented { position: relative; display: flex; padding: 4px; border-radius: 999px; background: var(--field) !important; box-shadow: none !important; -webkit-backdrop-filter: none; backdrop-filter: none; }
.segmented button { position: relative; z-index: 1; flex: 1; height: 42px; border: 0; background: none; border-radius: 999px; font-size: 15px; font-weight: 600; color: var(--ink-2); transition: color 0.3s; cursor: pointer; }
.segmented button.on { color: var(--ink); }
.segmented .thumb {
  position: absolute; z-index: 0; top: 4px; bottom: 4px; border-radius: 999px; background: #fff;
  box-shadow: 0 2px 8px rgba(24, 61, 45, 0.1);
  transition: left 0.45s var(--spring), width 0.45s var(--spring);
}
.segmented.dark { background: var(--scan-seg) !important; }
.segmented.dark button { color: rgba(255, 255, 255, 0.85); }
.segmented.dark button.on { color: var(--ink); }
.segmented.dark .thumb { background: var(--mint); }

/* ───────── Alt naviqasiya ───────── */
.tabbar {
  position: fixed; z-index: 30; left: 16px; right: 16px; margin: 0 auto; max-width: 560px;
  bottom: calc(var(--safe-b) + 10px);
  display: flex; padding: 6px; border-radius: 28px;
  background: rgba(240, 246, 236, 0.92) !important;
}
.tabbar button {
  position: relative; z-index: 1; flex: 1; border: 0; background: none; color: var(--ink-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-width: 0; height: 58px; padding: 0 4px; border-radius: 22px;
  font-size: 11.5px; font-weight: 600; transition: color 0.3s; cursor: pointer;
}
.tabbar button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tabbar button.on { color: var(--ink); font-weight: 700; }
.tabbar .lens {
  position: absolute; z-index: 0; top: 6px; bottom: 6px; border-radius: 22px; background: #ffe0bd;
  transition: left 0.45s var(--spring), width 0.45s var(--spring);
}

/* ───────── Alt vərəq ───────── */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(19, 45, 42, 0.32); opacity: 0; transition: opacity 0.35s; pointer-events: none; }
.scrim.on { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; z-index: 41; left: 8px; right: 8px; bottom: calc(var(--safe-b) + 8px);
  max-width: 600px; margin: 0 auto; max-height: calc(100vh - var(--safe-t) - 40px); overflow: auto;
  border-radius: 34px; padding: 10px 20px 22px;
  background: #f7faf4 !important;
  transform: translateY(calc(100% + 40px)); transition: transform 0.5s var(--spring);
}
.sheet.on { transform: translateY(0); }
.sheet .grabber { width: 38px; height: 5px; border-radius: 3px; background: var(--ink-3); margin: 0 auto 12px; opacity: 0.5; }

/* ───────── Bildiriş ───────── */
.toast {
  position: fixed; z-index: 90; left: 50%; top: calc(var(--safe-t) + 10px);
  transform: translate(-50%, -140%) scale(0.9); opacity: 0;
  display: flex; align-items: center; gap: 10px; min-height: 48px; max-width: calc(100vw - 32px);
  padding: 10px 18px 10px 12px; border-radius: 999px; font-size: 15px; font-weight: 600;
  background: #fff !important;
  transition: transform 0.55s var(--spring), opacity 0.3s;
}
.toast.on { transform: translate(-50%, 0) scale(1); opacity: 1; }
.toast .ti { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex: none; }
.toast.ok .ti { background: var(--green); }
.toast.err .ti { background: var(--red); }
.toast.info .ti { background: var(--orange); }

/* ───────── Yükləmə ───────── */
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid rgba(24, 61, 45, 0.15); border-top-color: var(--green); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.splash { min-height: 100vh; display: grid; place-items: center; }

.rise { animation: rise 0.5s var(--soft) both; }
.rise:nth-child(2) { animation-delay: 0.03s; } .rise:nth-child(3) { animation-delay: 0.06s; }
.rise:nth-child(4) { animation-delay: 0.09s; } .rise:nth-child(5) { animation-delay: 0.12s; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

.app-mark { width: 92px; height: 92px; border-radius: 28px; display: grid; place-items: center; margin: 0 auto; }
.app-mark img { width: 72px; height: 72px; border-radius: 20px; }

@media (min-width: 900px) {
  .page { max-width: 1040px; }
  .grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
}

/* ───────── Çap: yalnız QR plakatı ───────── */
#print-area { display: none; }
@media print {
  .scene, #app, .toast, .sheet, .scrim { display: none !important; }
  body { background: #fff; color: #000; }
  #print-area { display: block; text-align: center; padding-top: 1.5cm; font-family: -apple-system, system-ui, sans-serif; }
  #print-area .plogo { width: 4cm; height: 4cm; }
  #print-area h1 { font-size: 28pt; color: #b94a0b; margin: 0.4cm 0 0.2cm; }
  #print-area p { font-size: 16pt; margin: 0 0 0.6cm; }
  #print-area .pqr { width: 12cm; height: 12cm; image-rendering: pixelated; }
}

/* ───────── Başlıq + profil ───────── */
.top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 0 2px; }
.avatar-btn {
  width: 46px; height: 46px; border-radius: 50%; border: 0; flex: none; margin-top: 2px;
  display: grid; place-items: center; font-size: 16px; font-weight: 700; color: var(--green-t);
  background: var(--mint) !important; box-shadow: none !important;
}
.page.no-nav { padding-top: calc(var(--safe-t) + 26px); }
.profile-head { display: flex; align-items: center; gap: 14px; padding: 4px 4px 6px; }
.profile-head .avatar-btn { width: 60px; height: 60px; font-size: 20px; margin: 0; }
.icon-btn[disabled] { opacity: 0.3; pointer-events: none; }

/* ───────── Powered by Nexora ───────── */
.powered { text-align: center; font-size: 12.5px; letter-spacing: 0.02em; color: var(--ink-3); margin: 22px 0 6px; }
.powered a { color: var(--green-t); font-weight: 700; text-decoration: none; }
.month-switch { display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px; background: var(--field) !important; box-shadow: none !important; }
.month-switch .t { flex: 1; text-align: center; font-weight: 600; white-space: nowrap; }
.month-switch .icon-btn { flex: none; }
.ev-time { font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink); }

/* ───────── Giriş ekranı ───────── */
.brand b { display: block; font-size: 23px; font-weight: 800; color: var(--green-t); letter-spacing: -0.01em; }
.brand span { font-size: 14px; color: var(--ink-2); }
.hero-card { border-radius: 30px; padding: 26px 22px; background: rgba(255, 255, 255, 0.72); box-shadow: var(--shadow); }
.hero-card h2 { font-size: 31px; line-height: 1.16; font-weight: 800; letter-spacing: -0.03em; margin: 0 0 12px; }

/* ───────── Status kartı ───────── */
.status-card { border-radius: 30px; padding: 22px; background: rgba(255, 255, 255, 0.86); box-shadow: var(--shadow); }
.status-card.mint { background: var(--mint); box-shadow: none; }

/* ───────── İcmal kartı (rəhbərlik) ───────── */
.overview { border-radius: 30px; padding: 22px; background: var(--green); color: #fff; box-shadow: 0 12px 30px rgba(33, 100, 62, 0.22); }
.overview .caps { color: rgba(255, 255, 255, 0.75); }
.overview .n { font-size: 60px; font-weight: 900; letter-spacing: -0.04em; line-height: 1; }
.overview .of { font-size: 18px; color: rgba(255, 255, 255, 0.8); }
.overview .sub { color: rgba(255, 255, 255, 0.82); }
.bar { display: flex; gap: 4px; height: 10px; margin-top: 16px; }
.bar i { display: block; border-radius: 99px; min-width: 6px; }

/* ───────── QR skan ekranı ───────── */
.scan-screen {
  position: fixed; inset: 0; z-index: 70; background: var(--scan-bg); color: #fff; overflow: auto;
  padding: calc(var(--safe-t) + 16px) 22px calc(var(--safe-b) + 20px);
  animation: rise 0.35s var(--soft) both;
}
.scan-screen .inner { max-width: 460px; margin: 0 auto; }
.scan-screen .x { width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.12); color: #fff; display: grid; place-items: center; cursor: pointer; }
.scan-frame { position: relative; aspect-ratio: 1 / 1; border-radius: 30px; border: 3px solid var(--scan-border); background: var(--scan-frame); overflow: hidden; }
.scan-frame #reader, .scan-frame #reader video { width: 100% !important; height: 100% !important; object-fit: cover; }
.scan-frame #reader img, .scan-frame #qr-shaded-region { display: none !important; }
.scan-line { position: absolute; left: 8%; right: 8%; height: 2px; background: var(--scan-border); box-shadow: 0 0 10px var(--scan-border); top: 10%; animation: scanline 1.8s ease-in-out infinite alternate; }
@keyframes scanline { to { top: 90%; } }
.scan-busy { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(19, 45, 42, 0.6); }

/* ───────── Təsdiq ekranı ───────── */
.confirm-mark { width: 112px; height: 112px; border-radius: 34px; display: grid; place-items: center; margin: 26px auto 30px; color: var(--green-t); background: var(--mint); transform: rotate(-8deg); }
.confirm-mark.out { background: var(--peach-strong); transform: rotate(8deg); }
.confirm-mark svg { transform: rotate(8deg); }
.confirm-mark.out svg { transform: rotate(-8deg); }
.back-bar { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; padding: 0 0 6px; }
.back-bar b { text-align: center; font-size: 17px; font-weight: 600; }

/* ═══════════ Animasiyalar ═══════════ */
/* Skelet (yüklənmə) */
.sk { display: block; border-radius: 10px; height: 14px; background: rgba(24, 61, 45, 0.07); position: relative; overflow: hidden; }
.sk::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent); animation: shimmer 1.3s infinite; }
.overview .sk, .scan-screen .sk { background: rgba(255, 255, 255, 0.14); }
.overview .sk::after { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent); }
@keyframes shimmer { to { transform: translateX(100%); } }
.sk-ic { width: 38px; height: 38px; border-radius: 12px; flex: none; }
.sk-rows .li { pointer-events: none; }
.sk-fade { animation: skIn 0.3s both; }
@keyframes skIn { from { opacity: 0; } }

/* Bölmə/tab dəyişəndə */
.view-in { animation: viewIn 0.38s var(--soft) both; }
.view-in.back { animation-name: viewInBack; }
@keyframes viewIn { from { opacity: 0; transform: translateX(26px); } }
@keyframes viewInBack { from { opacity: 0; transform: translateX(-26px); } }
.page-in { animation: pageIn 0.42s var(--soft) both; }
@keyframes pageIn { from { opacity: 0; transform: translateX(60px); } }

/* Siyahı elementləri pillə-pillə */
.list > .li, .stack > .card { animation: rise 0.45s var(--soft) both; }
.list > .li:nth-child(2) { animation-delay: 0.03s; } .list > .li:nth-child(3) { animation-delay: 0.06s; }
.list > .li:nth-child(4) { animation-delay: 0.09s; } .list > .li:nth-child(5) { animation-delay: 0.12s; }
.list > .li:nth-child(6) { animation-delay: 0.15s; } .list > .li:nth-child(n+7) { animation-delay: 0.18s; }

/* Rəqəm dəyişəndə yüngül "pop" */
.bump { animation: bump 0.45s var(--spring); }
@keyframes bump { 40% { transform: scale(1.12); } }

/* Təsdiq işarəsi: fırlanaraq açılır */
.confirm-mark { animation: markIn 0.7s var(--spring) both; }
.confirm-mark.out { animation-name: markInOut; }
@keyframes markIn { from { transform: rotate(-50deg) scale(0.3); opacity: 0; } }
@keyframes markInOut { from { transform: rotate(50deg) scale(0.3); opacity: 0; } }
.confirm-mark svg { animation: checkDraw 0.5s 0.25s var(--soft) both; }
@keyframes checkDraw { from { opacity: 0; transform: scale(0.4); } }
.scan-screen > .inner > * { animation: rise 0.45s var(--soft) both; }
.scan-screen > .inner > *:nth-child(2) { animation-delay: 0.05s; } .scan-screen > .inner > *:nth-child(3) { animation-delay: 0.1s; }
.scan-screen > .inner > *:nth-child(4) { animation-delay: 0.15s; } .scan-screen > .inner > *:nth-child(5) { animation-delay: 0.2s; }
.scan-screen.closing { animation: pageOut 0.28s ease-in both; }
@keyframes pageOut { to { opacity: 0; transform: translateX(40%); } }

/* Kənardan sürüşdürərək geri (iPhone) */
.swiping { transition: none !important; }
.swipe-back-anim { transition: transform 0.3s var(--soft), border-radius 0.3s, opacity 0.3s; }

/* Çiplərin rəngi yumşaq keçsin */
.chip, .pill, .time-chip { transition: background 0.25s, color 0.25s, transform 0.3s var(--spring); }
.chip:active { transform: scale(0.94); }
.status-card, .overview { transition: background 0.4s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; transition-duration: 0.01ms !important; }
}
.bar i { animation: barGrow 0.8s var(--soft) both; transform-origin: left; }
@keyframes barGrow { from { transform: scaleX(0); } }

/* ═══════════ Tünd mövzu ═══════════ */
:root[data-dark] {
  color-scheme: dark;
  --bg: #0e1914; --ink: #e4efe7; --ink-2: #a3b5a8; --ink-3: #6f8275; --sep: rgba(228, 239, 231, 0.08);
  --field: #1d2b25; --mint: #1d3a2a; --mint-chip: #254633; --green: #1f6a41; --green-t: #8fd4a6;
  --orange: #d0601c; --peach: #3b2a1d; --peach-strong: #4d3220; --peach-t: #ffb98a;
  --gray: #222f29; --gray-chip: #26342e; --red: #ff7d6e; --blue: #8ab8ec;
  --card: rgba(23, 37, 32, 0.92);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
}
:root[data-dark] .scene::before {
  background:
    radial-gradient(70% 55% at 0% 0%, rgba(40, 90, 60, 0.45), transparent 70%),
    radial-gradient(65% 60% at 100% 45%, rgba(120, 60, 25, 0.32), transparent 72%),
    radial-gradient(70% 50% at 20% 105%, rgba(30, 70, 50, 0.4), transparent 70%), var(--bg);
}
:root[data-dark] .glass.strong, :root[data-dark] .sheet, :root[data-dark] .toast { background: #17251f !important; }
:root[data-dark] .btn.glass:not(.tint-g):not(.tint-o):not(.tint-r),
:root[data-dark] .icon-btn.glass, :root[data-dark] .icon-btn.round, :root[data-dark] .search,
:root[data-dark] .hero-card, :root[data-dark] .status-card:not(.mint) { background: rgba(23, 37, 32, 0.92); }
:root[data-dark] .tabbar { background: rgba(21, 34, 28, 0.94) !important; }
:root[data-dark] .tabbar .lens { background: #4a3320; }
:root[data-dark] .segmented .thumb { background: #2a3b33; box-shadow: none; }
:root[data-dark] .pill.w { background: rgba(255, 255, 255, 0.08); }
:root[data-dark] .input:focus, :root[data-dark] .input-box:focus-within { background: #22332b; }
:root[data-dark] .ic.r, :root[data-dark] .pill.r, :root[data-dark] .glass.tint-r { background: #3d1e1a; }
:root[data-dark] .ic.b, :root[data-dark] .pill.b { background: #1c2c3d; }
:root[data-dark] .sk { background: rgba(255, 255, 255, 0.07); }
:root[data-dark] .sk::after { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent); }
:root[data-dark] .toast .ti { color: #fff; }
:root[data-dark] .confirm-mark { color: var(--green-t); }
:root[data-dark] .scrim { background: rgba(0, 0, 0, 0.5); }

/* Mövzu keçidi: yeni mövzu toxunulan yerdən dairə kimi açılır */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
.theme-btn { position: fixed; z-index: 20; right: 18px; top: calc(var(--safe-t) + 18px); }
.pill.lime { color: #183d2d !important; }
