/* ═══════════════════════════════════════════════════════
   NeoPoint — Driver App Styles
   ═══════════════════════════════════════════════════════ */

:root {
  --bg:       #070912;
  --bg2:      #0c0f1a;
  --surface:  #131725;
  --surface2: #1b2032;
  --surface3: #232940;
  --border:   #262b42;
  --border2:  #323a57;
  --text:     #f3f5ff;
  --muted:    #7a8195;
  --accent:   #ff3b3b;
  --accent2:  #ff7a3d;
  --green:    #22c55e;
  --red:      #ef4444;
  --blue:     #3b82f6;
  --yellow:   #f59e0b;
  --grad:     linear-gradient(135deg, #ff3b3b 0%, #ff7a3d 100%);
  --grad-soft:linear-gradient(135deg, rgba(255,59,59,.16) 0%, rgba(255,122,61,.16) 100%);
  --shadow:    0 6px 24px rgba(0,0,0,.35);
  --shadow-sm: 0 2px 10px rgba(0,0,0,.28);
  --shadow-accent: 0 8px 28px rgba(255,59,59,.30);
  --hi: inset 0 1px 0 rgba(255,255,255,.05);
  --header-h: 64px;
  --nav-h:    66px;
  --radius:   18px;
  --font: 'Inter', 'Segoe UI Variable', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
}

* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }

html, body {
  height: 100%;
  background: radial-gradient(1200px 600px at 50% -10%, #111525 0%, var(--bg) 55%) fixed;
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
}

::selection { background: rgba(255,59,59,.30); color: #fff; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 6px; }
::-webkit-scrollbar-track { background: transparent; }

/* ─── ПОЛИШ: глубина карточек + плавные секции ──────────────── */
.stat-card, .next-gift-card, .level-card, .badges-card, .progress-card,
.calc-card, .calc-info-card, .new-ticket-form, .ticket-card,
.gift-card, .insight-banner, .all-gifts-complete, .badge-item {
  box-shadow: var(--shadow-sm), var(--hi);
}
.app-section.active { animation: fadeUp .35s ease; }
@keyframes fadeUp { from { opacity:0; transform: translateY(8px); } to { opacity:1; transform: translateY(0); } }

/* интерактивный отклик на тач */
.stat-card, .level-card, .badges-card, .next-gift-card, .progress-card { transition: transform .15s ease, box-shadow .15s ease; }

/* ─── HEADER ───────────────────────────────────────────────── */
.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(10,12,20,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
}

.header-left { display:flex; align-items:center; gap:12px; }

.header-avatar-wrap { flex-shrink:0; }
.header-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
}
.avatar-initials {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--grad);
  display: flex; align-items:center; justify-content:center;
  font-weight: 800; font-size: 16px; color: white;
}

.header-name   { font-weight: 700; font-size: 15px; line-height: 1.2; }
.header-status { font-size: 12px; color: var(--muted); }

.notif-btn {
  position: relative;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 40px; height: 40px;
  display: flex; align-items:center; justify-content:center;
  font-size: 18px; cursor: pointer; color: var(--text);
  transition: .2s;
}
.notif-btn:hover { background: var(--border); }
.notif-badge {
  position: absolute;
  top: -4px; right: -4px;
  background: var(--accent);
  color: white;
  font-size: 10px; font-weight: 800;
  border-radius: 10px;
  padding: 1px 5px;
  min-width: 18px;
  text-align: center;
}

/* ─── MAIN ─────────────────────────────────────────────────── */
.app-main {
  padding-top: var(--header-h);
  padding-bottom: calc(var(--nav-h) + 8px);
  min-height: 100vh;
  overflow-y: auto;
}

.app-section { display: none; padding: 16px; }
.app-section.active { display: block; }

/* ─── HERO POINTS CARD ─────────────────────────────────────── */
.points-hero {
  background: var(--grad);
  border-radius: var(--radius);
  padding: 1.5px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-accent);
  position: relative;
}
.points-hero-inner {
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(255,122,61,.12), transparent 60%),
    linear-gradient(135deg, rgba(12,15,26,.92), rgba(7,9,18,.96));
  border-radius: calc(var(--radius) - 1.5px);
  padding: 30px 20px;
  text-align: center;
}
.points-hero-lbl  { font-size: 12px; text-transform:uppercase; letter-spacing:1px; color:rgba(255,255,255,.6); margin-bottom:8px; }
.points-hero-val  { font-size: 48px; font-weight: 900; line-height: 1;
                    background:var(--grad);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text; }
.points-hero-azn  { font-size: 16px; color: rgba(255,255,255,.7); margin-top: 6px; }
.points-hero-rate { font-size: 12px; color: rgba(255,255,255,.45); margin-top: 4px; }

/* ─── STAT ROW ─────────────────────────────────────────────── */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.stat-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 10px;
  text-align: center;
}
.stat-val { font-size: 20px; font-weight: 800; }
.stat-lbl { font-size: 11px; color: var(--muted); margin-top: 3px; }

/* ─── NEXT GIFT CARD ───────────────────────────────────────── */
.next-gift-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}
.ngc-top { display:flex; gap:12px; align-items:center; margin-bottom:12px; }
.ngc-icon { font-size: 32px; flex-shrink: 0; }
.ngc-text { font-size: 13px; color: var(--muted); line-height: 1.5; }
.ngc-text b { color: var(--text); }

.progress-bar-wrap {
  background: var(--border);
  border-radius: 20px;
  height: 8px;
  overflow: hidden;
  margin-bottom: 6px;
}
.progress-bar {
  height: 100%;
  background: var(--grad);
  border-radius: 20px;
  transition: width .6s ease;
}
.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}

/* ─── LEVEL CARD (Фаза 2) ──────────────────────────────────── */
.level-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 14px;
}
.lc-top { display:flex; align-items:center; gap:12px; margin-bottom:10px; }
.lc-icon { font-size: 34px; flex-shrink:0; }
.lc-info { flex:1; min-width:0; }
.lc-name { font-size: 15px; font-weight: 800; }
.lc-next { font-size: 12px; color: var(--muted); margin-top: 2px; }
.lc-rank {
  flex-shrink:0; font-size: 12px; font-weight: 800; color: var(--accent2);
  background: var(--grad-soft); border:1px solid rgba(255,107,53,.3);
  padding: 4px 10px; border-radius: 20px;
}

/* ─── BADGES (Фаза 2) ──────────────────────────────────────── */
.badges-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}
.badges-grid { display:grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.badge-item {
  background: var(--bg); border:1px solid var(--border); border-radius: 12px;
  padding: 12px 6px; text-align:center; position:relative;
}
.badge-item.earned { border-color: rgba(255,107,53,.4); background: var(--grad-soft); }
.badge-item.locked { opacity: .85; }
.bi-icon { font-size: 26px; }
.bi-name { font-size: 11px; font-weight: 700; margin-top: 4px; }
.badge-item.locked .bi-name { color: var(--muted); }
.bi-done { position:absolute; top:6px; right:8px; color: var(--green); font-weight:800; font-size:13px; }
.bi-prog { background: var(--border); border-radius:20px; height:4px; margin-top:6px; overflow:hidden; }
.bi-prog-bar { height:100%; background: var(--grad); border-radius:20px; }

/* ─── REFERRAL CARD ────────────────────────────────────────── */
.referral-card {
  background: linear-gradient(160deg, rgba(255,59,59,.10), rgba(255,122,61,.06)), var(--surface);
  border: 1px solid rgba(255,107,53,.30);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm), var(--hi);
}
.rc-head { display:flex; gap:12px; align-items:flex-start; margin-bottom:14px; }
.rc-emoji { font-size: 30px; flex-shrink:0; filter: drop-shadow(0 4px 12px rgba(255,107,53,.4)); }
.rc-title { font-size: 15px; font-weight: 800; line-height:1.3; }
.rc-sub { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.rc-link-row { display:flex; gap:8px; }
.rc-link-row input {
  flex:1; min-width:0; background: var(--bg); border:1.5px solid var(--border);
  border-radius: 12px; padding: 11px 14px; color: var(--text);
  font-size: 13px; outline:none;
}
.rc-copy {
  flex-shrink:0; background: var(--grad); border:none; border-radius: 12px;
  padding: 0 16px; color:#fff; font-size: 13px; font-weight: 700; cursor:pointer;
  box-shadow: var(--shadow-accent); transition: transform .15s ease;
}
.rc-copy:active { transform: scale(.95); }
.rc-stats { display:flex; gap:10px; margin-top:14px; }
.rc-stats > div { flex:1; text-align:center; background:var(--bg); border:1px solid var(--border); border-radius:12px; padding:10px; }
.rc-stats span { display:block; font-size:20px; font-weight:800; }
.rc-stats small { font-size:11px; color:var(--muted); }

/* ─── RULES LIST (Фаза 1) ──────────────────────────────────── */
.rules-list { margin: 0 0 4px; padding-left: 20px; }
.rules-list li { font-size: 13px; line-height: 1.55; color: var(--muted); margin-bottom: 10px; }
.rules-list li b { color: var(--text); }

/* ─── INSIGHT BANNER (Фаза 1) ──────────────────────────────── */
.insight-banner {
  display: flex; align-items: center; gap: 8px;
  background: var(--grad-soft);
  border: 1px solid rgba(255,107,53,.3);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 13px; font-weight: 600; color: var(--text);
  line-height: 1.4;
}

/* ─── MONTHLY CHART (Фаза 1) ───────────────────────────────── */
.progress-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}
.pc-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:14px; }
.pc-title { font-size: 14px; font-weight: 700; }
.pc-growth { font-size: 13px; font-weight: 800; padding: 2px 8px; border-radius: 8px; }
.pc-growth.up   { color: var(--green); background: rgba(34,197,94,.12); }
.pc-growth.down { color: var(--muted); background: var(--border); }
.month-chart { display:flex; align-items:flex-end; justify-content:space-around; gap:6px; height: 110px; margin-bottom: 12px; }
.mc-col { flex:1; display:flex; flex-direction:column; align-items:center; height:100%; justify-content:flex-end; }
.mc-bar-wrap { flex:1; width:100%; display:flex; align-items:flex-end; justify-content:center; }
.mc-bar { width: 70%; max-width: 34px; background: var(--grad); border-radius: 6px 6px 0 0; transition: height .6s ease; }
.mc-bar.best { box-shadow: 0 0 0 2px var(--accent2), 0 0 12px rgba(255,107,53,.5); }
.mc-val { font-size: 10px; font-weight: 700; margin-top: 5px; }
.mc-lbl { font-size: 11px; color: var(--muted); margin-top: 2px; }
.pc-record { font-size: 13px; color: var(--muted); text-align: center; padding-top: 4px; border-top: 1px solid var(--border); }
.pc-record b { color: var(--text); }

.all-gifts-complete {
  background: linear-gradient(135deg, rgba(34,197,94,.1), rgba(34,197,94,.2));
  border: 1px solid rgba(34,197,94,.3);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  color: var(--green);
  font-weight: 600;
  margin-bottom: 14px;
}

/* ─── QUICK ACTIONS ─────────────────────────────────────────── */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.qa-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 6px;
  display: flex; flex-direction:column; align-items:center;
  gap: 6px;
  font-size: 20px;
  cursor: pointer; color: var(--text);
  transition: .15s;
}
.qa-btn span { font-size: 11px; color: var(--muted); }
.qa-btn:active { transform: scale(.95); background: var(--border); }

/* ─── SECTION TITLE ─────────────────────────────────────────── */
.section-title {
  font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
  color: var(--muted);
  margin-bottom: 10px;
}
.section-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.section-header h2 { font-size: 20px; font-weight: 800; }
.sh-bal { font-size: 13px; color: var(--muted); }

/* ─── HISTORY LIST ──────────────────────────────────────────── */
.history-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.history-item:last-child { border-bottom: none; }
.hi-icon { font-size: 22px; width: 36px; text-align: center; flex-shrink: 0; }
.hi-info { flex: 1; min-width: 0; }
.hi-desc { font-size: 14px; font-weight: 500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.hi-time { font-size: 12px; color: var(--muted); margin-top: 2px; }
.hi-amount { font-size: 15px; font-weight: 800; text-align: right; white-space: nowrap; }
.hi-amount.pos { color: var(--green); }
.hi-amount.neg { color: var(--red); }

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.loading-placeholder {
  text-align: center;
  padding: 30px;
  color: var(--muted);
}

/* ─── BALANCE CARD ──────────────────────────────────────────── */
.balance-card {
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(255,255,255,.14), transparent 50%),
    var(--grad);
  border-radius: var(--radius);
  padding: 24px 20px;
  margin-bottom: 16px;
  text-align: center;
  box-shadow: var(--shadow-accent), var(--hi);
}
.bc-lbl  { font-size: 12px; color: rgba(255,255,255,.7); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 1px; }
.bc-val  { font-size: 42px; font-weight: 900; color: white; line-height: 1; }
.bc-azn  { font-size: 14px; color: rgba(255,255,255,.7); margin-top: 6px; margin-bottom: 16px; }
.bc-row  { display: flex; justify-content: space-around; }
.bc-sub-lbl { font-size: 11px; color: rgba(255,255,255,.6); margin-bottom: 4px; }
.bc-sub-val { font-size: 16px; font-weight: 700; color: white; }

/* ─── FILTER TABS ───────────────────────────────────────────── */
.filter-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.filter-tabs::-webkit-scrollbar { display: none; }
.ftab {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px; color: var(--muted);
  cursor: pointer; white-space: nowrap;
  transition: .15s;
}
.ftab.active { background: var(--grad); border-color:transparent; color: white; font-weight: 700; }

.load-more-btn {
  width: 100%; background: var(--surface2); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px; color: var(--muted);
  cursor: pointer; margin-top: 10px; font-size: 14px;
}

/* ─── GIFTS GRID ────────────────────────────────────────────── */
.gifts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.gift-card {
  background: var(--surface2);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
  transition: .2s;
}
.gift-card:active { transform: scale(.97); }
.gift-card.unlocked { border-color: rgba(34,197,94,.4); background: linear-gradient(135deg, rgba(34,197,94,.05), var(--surface2)); }
.gc-icon   { font-size: 40px; margin-bottom: 10px; }
.gc-name   { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.gc-cost   { font-size: 16px; font-weight: 900; color: var(--accent); margin-bottom: 6px; }
.gc-status { font-size: 11px; font-weight: 600; }
.gc-status.ok { color: var(--green); }
.gc-status.no { color: var(--muted); }

.exchange-history-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-bottom: 10px; }

/* ─── CALCULATOR ────────────────────────────────────────────── */
.calc-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 14px;
}
.calc-hint { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.calc-field { position: relative; margin-bottom: 14px; }
.calc-field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.calc-field input {
  width: 100%;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 13px 44px 13px 16px;
  color: var(--text);
  font-size: 17px; font-weight: 600;
  outline: none;
  transition: .2s;
}
.calc-field input:focus { border-color: var(--accent); }
.calc-clear {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  margin-top: 12px;
  background: none; border: none;
  color: var(--muted); font-size: 16px; cursor: pointer; padding: 4px;
}
.calc-result {
  background: var(--grad-soft);
  border: 1px solid rgba(255,51,51,.3);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  text-align: center;
}
.cr-label { font-size: 12px; text-transform:uppercase; letter-spacing:.5px; color:var(--muted); margin-bottom:8px; }
.cr-value { font-size: 28px; font-weight: 900; background:var(--grad);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text; }
.cr-sub   { font-size: 12px; color: var(--muted); margin-top: 4px; }

.calc-info-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.ci-title { font-weight: 700; margin-bottom: 12px; }
.ci-row   { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.ci-row:last-of-type { border-bottom: none; }
.ci-row b { color: var(--accent); }
.ci-tip   { font-size: 12px; color: var(--muted); margin-top: 12px; line-height: 1.6; }

/* ─── TICKETS ───────────────────────────────────────────────── */
.new-ticket-form {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
}
.ntf-title { font-size: 17px; font-weight: 700; margin-bottom: 16px; }
.inp-group { margin-bottom: 14px; }
.inp-group label { display:block; font-size:12px; color:var(--muted); margin-bottom:6px; font-weight:600; text-transform:uppercase; letter-spacing:.5px; }
.inp-group input,
.inp-select,
.inp-textarea {
  width: 100%;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 13px 16px;
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: .2s;
  font-family: inherit;
}
.inp-select { cursor: pointer; }
.inp-textarea { resize: vertical; min-height: 100px; }
.inp-group input:focus, .inp-select:focus, .inp-textarea:focus { border-color: var(--accent); }
.inp-group input[type="date"],
.inp-group input[type="datetime-local"] { color-scheme: dark; cursor: pointer; }
.inp-group input[type="date"]::-webkit-calendar-picker-indicator,
.inp-group input[type="datetime-local"]::-webkit-calendar-picker-indicator { filter: invert(1) opacity(.7); cursor: pointer; }
.inp-group input[type="date"]::-webkit-calendar-picker-indicator:hover,
.inp-group input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover { filter: invert(1) opacity(1); }

.ticket-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 10px;
}
.tc-top   { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.tc-subj  { font-weight: 700; font-size: 15px; }
.tc-time  { font-size: 12px; color: var(--muted); margin-top: 2px; }
.tc-status { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 20px; background:var(--border); white-space:nowrap; }
.tc-status.st-green  { background:rgba(34,197,94,.2); color:var(--green); }
.tc-status.st-red    { background:rgba(239,68,68,.2); color:var(--red); }
.tc-status.st-blue   { background:rgba(59,130,246,.2); color:var(--blue); }
.tc-status.st-yellow { background:rgba(245,158,11,.2); color:var(--yellow); }
.tc-msg  { font-size: 13px; color: var(--muted); margin-bottom: 8px; line-height: 1.5; }
.tc-note { font-size: 13px; color: var(--yellow); background:rgba(245,158,11,.1); border-radius:8px; padding:8px 12px; margin-bottom:8px; }

/* ─── BUTTONS ───────────────────────────────────────────────── */
.btn-main {
  width: 100%; background: var(--grad); border: none;
  border-radius: 14px; padding: 15px;
  color: white; font-size: 16px; font-weight: 700; letter-spacing: -.01em;
  cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
  box-shadow: var(--shadow-accent);
}
.btn-main:hover   { filter: brightness(1.06); }
.btn-main:active  { transform: scale(.975); box-shadow: var(--shadow-sm); }
.btn-main:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }

.btn-sm {
  background: var(--grad); border: none; border-radius: 10px;
  padding: 8px 16px; color: white; font-size: 13px; font-weight: 700;
  cursor: pointer;
}

.btn-cancel {
  flex: 1; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px;
  color: var(--muted); font-size: 15px; cursor: pointer;
}

.btn-cancel-sm {
  background: none; border: 1px solid rgba(239,68,68,.4);
  border-radius: 8px; padding: 6px 14px;
  color: var(--red); font-size: 13px; cursor: pointer;
  margin-top: 8px;
}

/* ─── BOTTOM NAV ───────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--nav-h);
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(12,15,26,.92);
  backdrop-filter: blur(16px) saturate(1.2);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  z-index: 100;
}
.bnav-btn {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; background: none; border: none; cursor: pointer;
  color: var(--muted); transition: color .15s ease, transform .15s ease; padding: 8px 0;
}
.bnav-btn:active { transform: scale(.9); }
.bnav-btn.active { color: var(--accent); }
.bnav-btn.active::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 26px; height: 3px; border-radius: 0 0 4px 4px; background: var(--grad);
  box-shadow: 0 0 12px rgba(255,59,59,.6);
}
.bnav-icon { font-size: 21px; transition: transform .15s ease; }
.bnav-btn.active .bnav-icon { transform: translateY(-1px) scale(1.08); }
.bnav-lbl  { font-size: 10px; font-weight: 600; }

/* ─── NOTIFICATIONS PANEL ──────────────────────────────────── */
.notif-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 200;
  display: none;
  opacity: 0;
  transition: opacity .2s;
}
.notif-overlay.open { display: block; opacity: 1; }

.notif-panel {
  position: fixed;
  top: 0; right: -360px; bottom: 0;
  width: min(360px, 100vw);
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 201;
  transition: right .25s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
}
.notif-panel.open { right: 0; }

.np-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 700; font-size: 16px;
  flex-shrink: 0;
}
.np-header button {
  background: none; border: none;
  color: var(--accent); font-size: 12px; cursor: pointer;
}

.np-list { flex: 1; overflow-y: auto; padding: 8px 0; }

.notif-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: .15s;
  position: relative;
}
.notif-item:hover  { background: var(--surface2); }
.notif-item.unread { background: rgba(255,51,51,.05); }
.ni-icon  { font-size: 22px; flex-shrink: 0; }
.ni-body  { flex: 1; }
.ni-title { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.ni-msg   { font-size: 13px; color: var(--muted); line-height: 1.4; }
.ni-time  { font-size: 11px; color: var(--muted); margin-top: 4px; }
.ni-dot   { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; flex-shrink: 0; margin-top: 6px; }

/* ─── MODAL ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.7);
  z-index: 300;
  display: flex; align-items: flex-end;
}
.modal-box {
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  padding: 24px 20px 40px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  animation: slideUp .25s ease;
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: var(--surface2); border: none;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items:center; justify-content:center;
  font-size: 16px; cursor: pointer; color: var(--muted);
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* ─── TOAST ─────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: calc(var(--nav-h) + 14px);
  left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 10px 20px;
  font-size: 14px; font-weight: 600;
  z-index: 500;
  opacity: 0;
  transition: opacity .2s, transform .2s;
  max-width: calc(100vw - 32px);
  text-align: center;
  pointer-events: none;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: rgba(34,197,94,.15); border-color: rgba(34,197,94,.4); color: var(--green); }
.toast.error   { background: rgba(239,68,68,.15); border-color: rgba(239,68,68,.4); color: var(--red); }
.toast.info    { background: rgba(59,130,246,.15); border-color: rgba(59,130,246,.4); color: var(--blue); }

/* ─── SCROLLBAR ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ─── MISC ───────────────────────────────────────────────────── */
.err-msg { color: #ef4444; font-size: 13px; min-height: 18px; }

/* ════════════════════════════════════════════════════════════
   ФИНИШНЫЙ ПОЛИШ — премиум-поверхности, фокус, тени
   ════════════════════════════════════════════════════════════ */

/* Премиум-фон для «плоских» карточек (мягкий градиент вместо ровного) */
.stat-card, .level-card, .badges-card, .next-gift-card, .progress-card,
.calc-card, .calc-info-card, .new-ticket-form, .ticket-card, .notif-btn {
  background: linear-gradient(160deg, var(--surface2) 0%, var(--surface) 100%);
  border-color: var(--border);
}

/* Тактильный отклик для тач-карточек */
.stat-card:active, .level-card:active, .next-gift-card:active,
.badges-card:active, .progress-card:active { transform: scale(.985); }

/* Свечение фокуса у полей ввода */
.calc-field input:focus,
.inp-group input:focus, .inp-select:focus, .inp-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255,59,59,.14);
}

/* Заголовки секций — чуть крупнее и контрастнее */
.section-header h2 { letter-spacing: -.02em; }

/* Чипы статусов и фильтров — мягкая глубина */
.ftab { box-shadow: var(--shadow-sm); }
.ftab.active { box-shadow: var(--shadow-accent); }

/* Модалка — поднять и затемнить фон сильнее */
.modal-overlay { background: rgba(4,6,12,.78); backdrop-filter: blur(4px); }
.modal-box { box-shadow: 0 -12px 48px rgba(0,0,0,.5); border-top: 1px solid var(--border2); }
.modal-close { transition: background .15s ease, transform .15s ease; }
.modal-close:active { transform: scale(.9); background: var(--surface3); }

/* Тосты — приподнять тенью */
.toast { box-shadow: var(--shadow); }

/* Уведомления-панель — глубже тень */
.notif-panel { box-shadow: -16px 0 48px rgba(0,0,0,.5); }

/* Аватар/иконки — мягкое свечение акцентом */
.header-avatar, .avatar-initials { box-shadow: 0 0 0 1px rgba(255,59,59,.25), 0 4px 14px rgba(255,59,59,.25); }

/* Прогресс-бары — лёгкое внутреннее свечение */
.progress-bar, .bi-prog-bar { box-shadow: 0 0 8px rgba(255,107,53,.5); }

/* Плавность для всех интерактивных кнопок */
.qa-btn, .gift-card, .ftab, .btn-sm, .load-more-btn { transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease; }
.btn-sm:active, .load-more-btn:active { transform: scale(.97); }
