﻿/* ============================================================
   TeraMid — Webapp
   Design tokens extracted from Figma-ready/Asha Tourism iran-001
   ============================================================ */

:root {
  --primary: #8B5CF6;          /* violet — بنفش اصلی */
  --primary-deep: #5B21B6;     /* purple midnight */
  --primary-mid: #A78BFA;      /* light violet */
  --primary-soft: #241A45;     /* dark violet tint surface */
  --accent: #22D3EE;           /* cyan neoni — رنگ مکمل */
  --accent-dark: #67E8F9;
  --accent-soft: #0E3A47;      /* dark cyan tint surface */
  --violet: #C4B5FD;           /* creative iris — روشن */
  --teal: #5EEAD4;             /* fresh cyan */
  --ink: #EEE8FF;
  --gray: #A89BC8;
  --gray-2: #8E81B8;
  --gray-3: #6E6394;
  --line: rgba(168, 139, 250, 0.16);
  --bg: #0B0714;               /* black-violet — مشکی بنفشه */
  --card: #171230;             /* کارت تیره */
  --success: #34D399;
  --danger: #F87171;

  /* surface / chrome tokens (themeable) */
  --body-bg: linear-gradient(160deg, #0B0714 0%, #150E2B 50%, #0B0620 100%);
  --app-glow: rgba(124, 58, 237, 0.28);
  --header-bg: linear-gradient(135deg, #0B0714 0%, #241651 55%, #6D28D9 140%);
  --header-glow: rgba(255,255,255,0.22);
  --header-glow-2: rgba(103,232,249,0.28);
  --tabs-bg: rgba(23, 18, 48, 0.85);
  --search-bg: rgba(27, 21, 58, 0.9);
  --search-border: rgba(168,139,250,0.25);
  --nav-bg: rgba(15, 10, 28, 0.92);
  --toast-bg: #1D1740;
  --active-tile-bg: linear-gradient(160deg, #0B2E38 0%, var(--accent-soft) 100%);
  --emoji-bg: linear-gradient(150deg, var(--primary-soft) 0%, #2C1E58 100%);
  --emoji-active-bg: linear-gradient(150deg, #0B3A44 0%, #0C2A33 100%);
  --itin-head-bg: linear-gradient(135deg, var(--primary-soft), #2A1C52);
  --pz-ico-bg: linear-gradient(150deg, var(--primary-soft) 0%, #2A1C52 60%, #0E3A47 100%);
  --shadow-primary: rgba(124, 58, 237, 0.45);

  --radius: 16px;
  --radius-sm: 11px;
  --shadow-card: 0 8px 28px rgba(124, 58, 237, 0.18);
  --shadow-hover: 0 18px 42px rgba(124, 58, 237, 0.32);
  --grad-brand: linear-gradient(135deg, #7C3AED 0%, #4C1D95 45%, #A855F7 130%);
  --grad-gold: linear-gradient(135deg, #67E8F9 0%, #22D3EE 50%, #0E7490 100%);
  --grad-aurora: radial-gradient(120% 90% at 15% 0%, rgba(139,92,246,0.28), transparent 45%),
                 radial-gradient(120% 90% at 100% 20%, rgba(34,211,238,0.14), transparent 50%),
                 radial-gradient(100% 80% at 50% 100%, rgba(196,181,253,0.10), transparent 55%);
  --header-h: 64px;
  --nav-h: 62px;
}

/* ================= Themes ================= */
html[data-theme="light"] {
  --primary: #7C3AED;
  --primary-deep: #5B21B6;
  --primary-mid: #8B5CF6;
  --primary-soft: #EFE9FE;
  --accent: #0891B2;
  --accent-dark: #0E7490;
  --accent-soft: #D9F6FB;
  --violet: #6D28D9;
  --teal: #0D9488;
  --ink: #1E1B33;
  --gray: #5F5A82;
  --gray-2: #6E67A0;
  --gray-3: #A29AC4;
  --line: rgba(109, 40, 217, 0.16);
  --bg: #F4F1FB;
  --card: #FFFFFF;
  --success: #059669;
  --danger: #DC2626;

  --body-bg: linear-gradient(160deg, #F4F1FB 0%, #ECE6FB 50%, #F0EDFF 100%);
  --app-glow: rgba(124, 58, 237, 0.16);
  --header-bg: linear-gradient(135deg, #6D28D9 0%, #7C3AED 60%, #A855F7 140%);
  --header-glow: rgba(255,255,255,0.30);
  --header-glow-2: rgba(255,255,255,0.20);
  --tabs-bg: rgba(255,255,255,0.85);
  --search-bg: rgba(255,255,255,0.92);
  --search-border: rgba(124,58,237,0.20);
  --nav-bg: rgba(255,255,255,0.94);
  --toast-bg: #3B2270;
  --active-tile-bg: linear-gradient(160deg, #D9F6FB 0%, #C7F0F9 100%);
  --emoji-bg: linear-gradient(150deg, #EFE9FE 0%, #E0D6FD 100%);
  --emoji-active-bg: linear-gradient(150deg, #D9F6FB 0%, #C7F0F9 100%);
  --itin-head-bg: linear-gradient(135deg, #EFE9FE, #E0D6FD);
  --pz-ico-bg: linear-gradient(150deg, #EFE9FE 0%, #E0D6FD 60%, #D9F6FB 100%);
  --shadow-primary: rgba(124, 58, 237, 0.35);

  --shadow-card: 0 8px 28px rgba(109, 40, 217, 0.12);
  --shadow-hover: 0 18px 42px rgba(109, 40, 217, 0.22);
  --grad-brand: linear-gradient(135deg, #7C3AED 0%, #6D28D9 45%, #A855F7 130%);
}

html[data-theme="midnight"] {
  --primary: #60A5FA;
  --primary-deep: #1E3A8A;
  --primary-mid: #93C5FD;
  --primary-soft: #16254E;
  --accent: #22D3EE;
  --accent-dark: #67E8F9;
  --accent-soft: #0A2A3D;
  --violet: #A5B4FC;
  --teal: #2DD4BF;
  --ink: #E7EEFF;
  --gray: #8FA6D0;
  --gray-2: #7189C4;
  --gray-3: #52618F;
  --line: rgba(96, 165, 250, 0.18);
  --bg: #050914;
  --card: #0C1530;
  --success: #34D399;
  --danger: #F87171;

  --body-bg: linear-gradient(160deg, #050914 0%, #0A1230 50%, #050B18 100%);
  --app-glow: rgba(37, 99, 235, 0.30);
  --header-bg: linear-gradient(135deg, #050914 0%, #0E1E4E 55%, #2563EB 140%);
  --header-glow: rgba(147,197,253,0.25);
  --header-glow-2: rgba(34,211,238,0.25);
  --tabs-bg: rgba(10, 18, 48, 0.85);
  --search-bg: rgba(12, 21, 48, 0.9);
  --search-border: rgba(96,165,250,0.25);
  --nav-bg: rgba(6, 10, 24, 0.92);
  --toast-bg: #0F2148;
  --active-tile-bg: linear-gradient(160deg, #0B2A44 0%, #0A2A3D 100%);
  --emoji-bg: linear-gradient(150deg, #16254E 0%, #10204A 100%);
  --emoji-active-bg: linear-gradient(150deg, #0B2A44 0%, #0A2A3D 100%);
  --itin-head-bg: linear-gradient(135deg, #16254E, #0F2148);
  --pz-ico-bg: linear-gradient(150deg, #16254E 0%, #10204A 60%, #0A2A3D 100%);
  --shadow-primary: rgba(37, 99, 235, 0.45);

  --shadow-card: 0 8px 28px rgba(37, 99, 235, 0.18);
  --shadow-hover: 0 18px 42px rgba(37, 99, 235, 0.32);
  --grad-brand: linear-gradient(135deg, #2563EB 0%, #1E40AF 45%, #60A5FA 130%);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Vazirmatn", Tahoma, "Segoe UI", sans-serif;
  background: var(--body-bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.7;
  min-height: 100vh;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  box-shadow: 0 0 80px var(--app-glow);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* ================= Header ================= */
#header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: var(--header-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  box-shadow: 0 6px 22px var(--shadow-primary);
}
#header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 120% at 88% -10%, var(--header-glow), transparent 55%),
              radial-gradient(50% 100% at 8% 120%, var(--header-glow-2), transparent 60%);
  pointer-events: none;
}
.hdr-top { display: flex; flex-direction: column; line-height: 1.2; position: relative; }
.brand {
  font-weight: 900;
  color: #fff;
  font-size: 19px;
  letter-spacing: 0.5px;
  background: linear-gradient(120deg, #fff 40%, #67E8F9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hdr-tag { color: rgba(255,255,255,0.8); font-size: 11px; }
.hdr-actions { display: flex; align-items: center; gap: 10px; position: relative; }
.icon-btn {
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.22);
  color: #fff;
  width: 36px; height: 36px;
  border-radius: 50%;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
  transition: transform 0.15s, background 0.2s;
}
.icon-btn:active { transform: scale(0.92); background: rgba(255,255,255,0.3); }
#hdrAvatar img {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.7);
  object-fit: cover;
  background: #fff;
}

/* ================= Main ================= */
#view { padding-bottom: calc(var(--nav-h) + 24px); }

.screen { animation: fadeSlide 0.28s ease; }
@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page-head {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  background: var(--bg);
  padding: 12px 16px 10px;
  border-bottom: 1px solid var(--line);
}
.page-title { font-size: 17px; font-weight: 800; }

/* ================= Hero (home) ================= */
.hero {
  margin: 14px 14px 0;
  background: var(--grad-brand);
  border-radius: 22px;
  padding: 22px 18px 20px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  right: -30px; top: -50px;
  width: 190px; height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139,92,246,0.8), transparent 70%);
}
.hero::after {
  content: "";
  position: absolute;
  left: -40px; bottom: -70px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34,211,238,0.5), transparent 70%);
}
.hero .glow-line {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(80% 60% at 20% 120%, rgba(34,211,238,0.32), transparent 60%),
    radial-gradient(60% 50% at 100% 0%, rgba(139,92,246,0.45), transparent 55%);
  pointer-events: none;
}
.hero-title { font-size: 21px; font-weight: 900; margin-bottom: 4px; position: relative; }
.hero-sub { font-size: 12.5px; color: rgba(255,255,255,0.88); margin-bottom: 16px; position: relative; }

/* tabs (domestic / international) */
.tabs {
  display: flex;
  background: var(--tabs-bg);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 4px;
  gap: 4px;
  position: relative;
  z-index: 2;
  box-shadow: var(--shadow-card);
}
.tabs .tab {
  flex: 1;
  text-align: center;
  padding: 9px 6px;
  border: 0;
  background: transparent;
  color: var(--gray);
  font-weight: 600;
  font-size: 13.5px;
  border-radius: 11px;
  transition: all 0.2s;
}
.tabs .tab.active {
  background: var(--grad-brand);
  color: #fff;
  box-shadow: 0 6px 16px rgba(124,58,237,0.45);
}
.tabs .tab.alt.active { background: var(--grad-gold); box-shadow: 0 6px 16px rgba(34,211,238,0.45); }

/* search form */
.search-card {
  background: var(--search-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--search-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  margin: 12px 14px;
  overflow: hidden;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
}
.search-field:last-child { border-bottom: 0; }
.search-field .f-ico {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex: 0 0 auto;
}
.search-field .f-main { flex: 1; }
.search-field .f-label { font-size: 11px; color: var(--gray-3); }
.search-field .f-value { font-weight: 700; font-size: 14.5px; color: var(--ink); }
.search-field .f-swap { color: var(--accent); font-size: 18px; }
.swap-route {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
}
.swap-route .btn { background: var(--primary-soft); color: var(--primary); font-weight: 700; }

/* ================= Section ================= */
.sec { margin: 22px 14px 0; }
.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.sec-title { font-size: 16px; font-weight: 800; }
.sec-more { color: var(--primary); font-size: 12.5px; font-weight: 600; }

/* ================= Cards: horizontal scroll ================= */
.hscroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 14px 8px;
  margin: 0 -14px;
  scrollbar-width: none;
}
.hscroll::-webkit-scrollbar { display: none; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  flex: 0 0 auto;
}
.card:active { transform: scale(0.98); }

.card-v { width: 172px; }
.card-img { position: relative; }
.card-img img { width: 100%; height: 118px; object-fit: cover; }
.card-body { padding: 10px 12px 12px; }
.card-title { font-weight: 700; font-size: 13.5px; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-sub { font-size: 11.5px; color: var(--gray-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-price { margin-top: 8px; font-weight: 800; font-size: 13.5px; color: var(--primary); }
.card-price small { font-size: 10.5px; color: var(--gray-3); font-weight: 500; }

.badge {
  position: absolute;
  top: 8px; right: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  box-shadow: 0 3px 8px rgba(34,211,238,0.5);
}
.badge-blue { background: var(--primary); box-shadow: 0 3px 8px rgba(124,58,237,0.5); }

.rating { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-size: 12px; font-weight: 700; }

/* icon tiles (services grid) */
.grid-icons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 18px 14px;
}
.icon-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.icon-tile .tile-ico {
  width: 52px; height: 52px;
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow-card);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  border: 1px solid var(--line);
  transition: all 0.2s;
}
.icon-tile:active .tile-ico { transform: scale(0.92); }
.icon-tile .tile-label { font-size: 11px; color: var(--gray-2); font-weight: 600; }
.icon-tile img.tile-ico { padding: 0; object-fit: cover; }

/* ================= Promotion banners ================= */
.promo {
  margin: 20px 14px 0;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  color: #fff;
  min-height: 110px;
  display: flex;
  align-items: flex-end;
  padding: 16px;
}
.promo img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.promo .dim { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(60,10,120,0.94), rgba(124,58,237,0.7)); }
.promo .p-body { position: relative; z-index: 2; }
.promo .p-title { font-weight: 800; font-size: 15.5px; margin-bottom: 2px; }
.promo .p-sub { font-size: 11.5px; color: rgba(255,255,255,0.85); }
.promo .p-cta { margin-top: 8px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 12px;
  padding: 11px 18px;
  font-weight: 700;
  font-size: 13px;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.btn:active { transform: scale(0.97); }
.btn::after {
  content: "";
  position: absolute;
  top: 0; left: -60%;
  width: 45%; height: 100%;
  background: linear-gradient(110deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.45s ease;
}
.btn:hover::after { left: 130%; }
.btn-primary { background: var(--grad-brand); color: #fff; box-shadow: 0 8px 20px rgba(124,58,237,0.45); }
.btn-accent { background: var(--grad-gold); color: #fff; box-shadow: 0 8px 20px rgba(34,211,238,0.4); }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-white { background: #fff; color: var(--primary); box-shadow: 0 6px 16px rgba(124,58,237,0.2); }
.btn-white-accent { background: #fff; color: var(--accent); }
.btn-ghost { background: var(--primary-soft); color: var(--ink); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 12px; border-radius: 9px; }
.btn-pz {
  background: linear-gradient(135deg, #7C3AED 0%, #4C1D95 55%, #22D3EE 140%);
  box-shadow: 0 10px 26px rgba(124,58,237,0.55);
  font-size: 14.5px;
  padding: 14px 18px;
  border-radius: 16px;
  letter-spacing: 0.3px;
}
.btn-danger { background: linear-gradient(135deg, #D64545 0%, #B83232 100%); color: #fff; box-shadow: 0 8px 20px rgba(214,69,69,0.4); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.btn[disabled]::after { display: none; }

/* ================= Flight ticket design ================= */
.ticket {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  margin: 12px 14px 0;
}
.ticket-head {
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: #fff;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 13px;
}
.ticket-time-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 14px 8px;
}
.t-time { display: flex; flex-direction: column; align-items: center; }
.t-time b { font-size: 19px; font-weight: 800; }
.t-time span { font-size: 11px; color: var(--gray-3); }
.t-route {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--gray-3);
  font-size: 11px;
  gap: 4px;
  flex: 1;
}
.t-route .line { width: 100%; height: 2px; background: repeating-linear-gradient(90deg, var(--primary) 0 6px, transparent 6px 12px); position: relative; }
.t-price { text-align: center; padding: 4px 14px 12px; color: var(--accent); font-weight: 900; font-size: 15px; }
.tickets-sep {
  border-top: 2px dashed var(--primary-mid);
  position: relative;
  margin: 0 6px;
}
.tickets-sep::before, .tickets-sep::after {
  content: "";
  position: absolute;
  top: -9px;
  width: 16px; height: 16px;
  background: var(--bg);
  border-radius: 50%;
  border: 2px dashed transparent;
}
.tickets-sep::before { right: -12px; }
.tickets-sep::after { left: -12px; }
.ticket-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 12px 14px 14px;
}
.tinfo { display: flex; flex-direction: column; }
.tinfo .k { font-size: 10.5px; color: var(--gray-3); }
.tinfo .v { font-weight: 700; font-size: 12.5px; }
.tinfo .v small { font-weight: 500; color: var(--gray); }

/* steps indicator */
.steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 4px;
}
.steps-scroll { overflow-x: auto; scrollbar-width: none; justify-content: flex-start; gap: 4px; }
.steps-scroll::-webkit-scrollbar { display: none; }
.step { display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; flex: 1; }
.steps-scroll .step { flex: 0 0 auto; min-width: 64px; }
.step::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 62%;
  width: 100%;
  height: 2px;
  background: var(--line);
}
.step:last-child::after { display: none; }
.step .dot {
  width: 25px; height: 25px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--gray-3);
  color: var(--gray-3);
  font-size: 12px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
}
.step.done .dot { background: var(--grad-gold); border-color: var(--accent); color: #fff; }
.step.active .dot { background: var(--grad-brand); border-color: var(--primary); color: #fff; box-shadow: 0 0 0 5px rgba(124,58,237,0.22); }
.step span { font-size: 10px; color: var(--gray-3); font-weight: 600; white-space: nowrap; }
.step.active span { color: var(--primary); font-weight: 800; }
.step.done span { color: var(--accent-dark); }

/* ================= Lists ================= */
.list { margin: 10px 14px 0; display: flex; flex-direction: column; gap: 10px; }
.list-item {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.list-item img.th {
  width: 64px; height: 64px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex: 0 0 auto;
}
.list-item .li-body { flex: 1; min-width: 0; }
.li-title { font-weight: 700; font-size: 13.5px; }
.li-sub { font-size: 11.5px; color: var(--gray-3); }
.li-row { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.li-price { font-weight: 800; color: var(--primary); font-size: 13px; }
.li-price small { color: var(--gray-3); font-weight: 500; font-size: 10px; }

/* service check cards (special flight services) */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px; }
.svc-item {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-2);
  text-align: center;
  position: relative;
  transition: all 0.2s;
  cursor: pointer;
}
.svc-item.checked { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); }
.svc-item .s-ico { font-size: 22px; }
.svc-item .ck {
  position: absolute; top: 6px; left: 6px;
  width: 17px; height: 17px;
  border-radius: 50%;
  background: var(--line);
  color: transparent;
  font-size: 11px;
  display: flex; align-items: center; justify-content: center;
}
.svc-item.checked .ck { background: var(--accent); color: #fff; }

/* filter chips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 14px 8px; margin: 0 -14px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--gray-2);
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(124,58,237,0.15);
}
.chip:active { transform: scale(0.96); }
.chip.active { background: var(--grad-brand); border-color: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(124,58,237,0.4); }
.chip.accent.active { background: var(--grad-gold); border-color: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(34,211,238,0.4); }
.chips-sm { padding: 0; margin: 0; flex-wrap: wrap; }
.chips-sm .chip { padding: 5px 11px; font-size: 11.5px; }
.chip-static { opacity: 0.7; cursor: default; }

/* ================= Forms ================= */
.form { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.field label { display: block; font-size: 11.5px; color: var(--gray-2); font-weight: 600; margin-bottom: 5px; }
.input, .select, textarea.input {
  width: 100%;
  padding: 11px 12px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 13.5px;
  background: var(--card);
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input:focus, .select:focus, textarea.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.2);
}
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}
.stepper .st-info b { display: block; font-size: 13.5px; }
.stepper .st-info span { font-size: 11px; color: var(--gray-3); }
.stepper .st-ctrl { display: flex; align-items: center; gap: 10px; }
.stepper .st-btn {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--primary);
  color: var(--primary);
  background: transparent;
  font-size: 15px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.stepper .st-btn.minus { border-color: var(--accent); color: var(--accent); }
.stepper .st-num { font-weight: 800; font-size: 15px; min-width: 22px; text-align: center; }

/* ================= Detail pages ================= */
.detail-hero { position: relative; height: 210px; }
.detail-hero img { width: 100%; height: 100%; object-fit: cover; }
.detail-hero .back {
  position: absolute; top: 12px; right: 12px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(23,18,48,0.9);
  border: 1px solid var(--line);
  font-size: 18px;
  color: var(--primary-mid);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.detail-card {
  background: var(--card);
  border-radius: 18px 18px 0 0;
  margin-top: -24px;
  position: relative;
  padding: 18px 16px;
  box-shadow: 0 -6px 30px rgba(124,58,237,0.16);
}
.detail-title { font-size: 18px; font-weight: 900; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; color: var(--gray-2); font-size: 12px; }
.meta-pill { background: var(--bg); border: 1px solid var(--line); padding: 3px 10px; border-radius: 999px; }
.facility-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.facility {
  background: var(--bg);
  border-radius: 12px;
  padding: 12px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--gray-2);
  text-align: center;
}
.facility .f-ico { font-size: 20px; }
.place-around { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.place-card { border-radius: 12px; overflow: hidden; background: var(--card); box-shadow: var(--shadow-card); }
.place-card img { height: 86px; width: 100%; object-fit: cover; }
.place-card .pc-body { padding: 8px 10px; }
.place-card .pc-title { font-size: 12px; font-weight: 700; }
.place-card .pc-sub { font-size: 10.5px; color: var(--gray-3); }
.section-block { margin-top: 18px; }
.section-block h3 { font-size: 15px; font-weight: 800; margin-bottom: 8px; }
.section-block p { color: var(--gray-2); font-size: 12.5px; }

/* review */
.review { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.review:last-child { border-bottom: 0; }
.review img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.review .rv-name { font-size: 12.5px; font-weight: 700; }
.review .rv-date { font-size: 10.5px; color: var(--gray-3); }
.review .rv-text { font-size: 12px; color: var(--gray-2); }

/* price bar (sticky bottom of content) */
.price-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--card);
  border-top: 1px solid var(--line);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 24px rgba(124,58,237,0.22);
}
.price-bar .pb-price b { color: var(--accent); font-size: 16px; font-weight: 900; }
.price-bar .pb-price span { font-size: 11px; color: var(--gray-3); display: block; }

/* ================= Profile ================= */
.profile-hero {
  background: var(--grad-brand);
  color: #fff;
  padding: 22px 18px 44px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.profile-hero::before {
  content: "";
  position: absolute;
  right: -40px; top: -40px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34,211,238,0.42), transparent 70%);
}
.profile-hero::after {
  content: "";
  position: absolute;
  left: -50px; bottom: -60px;
  width: 190px; height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(103,232,249,0.32), transparent 70%);
}
.profile-hero .ph-avatar {
  width: 84px; height: 84px;
  border-radius: 50%;
  border: 3px solid #fff;
  object-fit: cover;
  margin: 0 auto 10px;
  background: #fff;
}
.profile-hero .ph-name { font-size: 17px; font-weight: 800; }
.profile-hero .ph-role { font-size: 11.5px; color: rgba(255,255,255,0.8); }
.profile-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: -26px 14px 0;
  position: relative;
  z-index: 2;
}
.pstat {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 12px;
  text-align: center;
}
.pstat b { display: block; font-size: 17px; color: var(--primary); }
.pstat span { font-size: 11px; color: var(--gray-3); }
.profile-menu { margin: 16px 14px 0; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-card); overflow: hidden; }
.profile-menu a { display: flex; align-items: center; gap: 12px; padding: 14px 14px; border-bottom: 1px solid var(--line); }
.profile-menu a:last-child { border-bottom: 0; }
.profile-menu .pm-ico { width: 32px; height: 32px; border-radius: 9px; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 15px; }
.profile-menu .pm-arrow { margin-right: auto; color: var(--gray-3); }

/* ================= Notifications ================= */
.ntf-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--accent-soft);
  border: 1px solid rgba(34,211,238,0.4);
  color: var(--accent-dark);
  border-radius: 12px;
  padding: 10px 14px;
  margin: 12px 14px 0;
  font-size: 12.5px;
  font-weight: 600;
}

/* ================= Bottom nav ================= */
#bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  margin: 0 auto;
  max-width: 480px;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  z-index: 60;
}
#bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--gray-3);
  font-size: 10px;
  font-weight: 600;
  transition: color 0.2s;
}
#bottom-nav a .nav-ico { font-size: 19px; }
#bottom-nav a.active { color: var(--primary-mid); text-shadow: 0 0 12px rgba(139,92,246,0.65); }
#bottom-nav a.active .nav-ico { transform: translateY(-2px); }

/* ================= Toast ================= */
#toast {
  position: fixed;
  bottom: calc(var(--nav-h) + 24px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--toast-bg);
  color: #fff;
  border: 1px solid var(--line);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  z-index: 100;
  max-width: 90%;
  text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ================= Misc ================= */
.empty { text-align: center; color: var(--gray-3); padding: 40px 20px; font-size: 13px; }
.divider { height: 1px; background: var(--line); margin: 0 14px; }
.price-line { display: flex; justify-content: space-between; padding: 7px 0; font-size: 13px; color: var(--gray-2); }
.price-line.total { border-top: 1.5px dashed var(--primary-mid); margin-top: 8px; padding-top: 12px; font-weight: 800; color: var(--ink); font-size: 14px; }
.price-line.total b { color: var(--accent); }
.big-num { font-variant-numeric: tabular-nums; }

/* ================= Category grid (medical / puzzle) ================= */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 2px 14px;
}
.cat-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 13px 6px 11px;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.cat-tile:active { transform: scale(0.95); }
.cat-tile.active {
  border-color: var(--accent);
  background: var(--active-tile-bg);
  box-shadow: 0 8px 22px rgba(34,211,238,0.3);
}
.cat-tile .cat-ico {
  width: 52px; height: 52px;
  border-radius: 15px;
  object-fit: cover;
  background: var(--primary-soft);
}
.cat-tile .cat-ico.emoji {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  background: var(--emoji-bg);
}
.cat-tile.active .cat-ico.emoji { background: var(--emoji-active-bg); transform: scale(1.08); }
.cat-tile .cat-name { font-size: 12px; font-weight: 700; color: var(--ink); line-height: 1.35; }
.cat-tile .cat-count { font-size: 10.5px; color: var(--gray-3); }
.cat-tile .cat-check {
  position: absolute;
  top: -7px; left: -7px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--grad-gold);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(34,211,238,0.5);
}
.cat-tile.active .cat-check { display: flex; }

/* ================= Puzzle scheduling UI ================= */
.sec-desc { font-size: 12px; color: var(--gray-2); margin: -6px 0 14px; }
.subs-group { margin-bottom: 16px; }
.subs-head { font-size: 13px; font-weight: 800; color: var(--primary); margin-bottom: 8px; }

.plan-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 14px;
  margin-bottom: 6px;
}
.plan-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.plan-label { font-size: 12px; font-weight: 700; color: var(--gray-2); }
.stepper { display: flex; align-items: center; gap: 12px; }
.step-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 17px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.step-btn:active { transform: scale(0.9); }
.step-val { font-weight: 800; font-size: 14px; color: var(--ink); min-width: 52px; text-align: center; }

.plan-list { display: flex; flex-direction: column; gap: 10px; }
.plan-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  padding: 10px 12px;
  flex-wrap: wrap;
}
.plan-item-ico {
  width: 36px; height: 36px;
  border-radius: 11px;
  background: var(--primary-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex: 0 0 auto;
}
.plan-item-name { font-size: 12.5px; font-weight: 700; flex: 1 1 90px; min-width: 90px; }
.chips-day { gap: 5px; }
.chip-day { padding: 4px 9px !important; font-size: 11px !important; }

/* itinerary timeline */
.itin { display: flex; flex-direction: column; gap: 10px; }
.itin-day {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.itin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 13px;
  background: var(--itin-head-bg);
  border-bottom: 1px solid var(--line);
}
.itin-d { font-size: 13px; font-weight: 800; color: var(--primary); }
.itin-wd { font-size: 11.5px; font-weight: 700; color: var(--violet); }
.itin-body { padding: 10px 13px; display: flex; flex-wrap: wrap; gap: 8px; }
.itin-item {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  background: var(--primary-soft);
  border-radius: 999px;
  padding: 5px 11px;
}
.itin-item.itin-free { background: var(--accent-soft); color: var(--accent-dark); }

/* saved puzzle card */
.pz-saved { transition: transform 0.18s, box-shadow 0.18s; }
.pz-saved:active { transform: scale(0.98); }
.pz-saved-ico {
  width: 58px; height: 58px;
  border-radius: 15px;
  background: var(--pz-ico-bg);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex: 0 0 auto;
}

/* ================= Theme picker ================= */
.theme-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 14px;
}
.theme-card {
  position: relative;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  cursor: pointer;
  text-align: right;
  padding: 0;
  transition: transform 0.18s, border-color 0.18s;
}
.theme-card:active { transform: scale(0.96); }
.theme-card.active { border-color: var(--accent); box-shadow: 0 8px 22px rgba(34,211,238,0.25); }
.theme-prev {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0,0,0,0.35);
}
.theme-card .theme-check {
  position: absolute;
  top: 8px; left: 8px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--grad-gold);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(34,211,238,0.5);
}
.theme-card.active .theme-check { display: flex; }
.theme-name { display: block; padding: 10px 12px; font-size: 12.5px; font-weight: 700; color: var(--ink); }

@media (min-width: 520px) {
  body { padding: 0; }
}

@media print { #bottom-nav, #header, .price-bar, .btn { display: none !important; } }