/* Avera Home — app concept styles */
:root {
  --navy: #17416F;
  --navy-deep: #0C2A4A;
  --navy-mid: #1C4D82;
  --accent: #0399F8;
  --accent-2: #24B0FF;
  --accent-soft: #E7F5FE;
  --accent-glow: rgba(3, 153, 248, 0.28);
  --bg: #F1F4F8;
  --card: #FFFFFF;
  --text: #13263C;
  --text-2: #5C6E82;
  --line: #E3EAF1;
  --ok: #1BA36A;
  --ok-soft: #E6F7EE;
  --warn: #D9891A;
  --danger: #D64545;
  --shadow: 0 8px 24px rgba(19, 38, 60, 0.08);
  --shadow-lg: 0 18px 50px rgba(12, 42, 74, 0.18);
  --radius: 18px;
  --radius-sm: 12px;
  --tab-h: 84px;
  --safe-top: 54px;
  --phone-w: 390px;
  --phone-h: 844px;
  --font: "Poppins", "Cairo", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background: #0A1E33;
  min-height: 100dvh;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
img { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }

/* ===== Desktop stage ===== */
.stage {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 72px;
  padding: 40px 32px;
  background:
    radial-gradient(900px 500px at 15% 10%, rgba(3, 153, 248, 0.18), transparent 55%),
    radial-gradient(800px 600px at 90% 90%, rgba(23, 65, 111, 0.9), transparent 50%),
    linear-gradient(160deg, #0A1E33 0%, #17416F 55%, #0C2A4A 100%);
}

.stage-copy {
  width: min(380px, 36vw);
  color: #fff;
}
.stage-copy .brand-logo { width: 210px; height: auto; margin-bottom: 28px; }
.stage-copy h1 {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 12px;
}
.stage-copy .lede {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255,255,255,0.82);
  font-weight: 400;
  margin-bottom: 28px;
}
.stage-copy h2 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7EC8F8;
  margin-bottom: 10px;
}
.stage-copy ul { list-style: none; margin-bottom: 28px; }
.stage-copy li {
  font-size: 14px;
  color: rgba(255,255,255,0.88);
  padding: 6px 0 6px 22px;
  position: relative;
  line-height: 1.45;
}
.stage-copy li::before {
  content: "";
  position: absolute;
  left: 0; top: 12px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(3,153,248,0.18);
}
.stage-note {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  line-height: 1.5;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 16px;
}

/* ===== Device frame ===== */
.device {
  position: relative;
  width: calc(var(--phone-w) + 24px);
  height: calc(var(--phone-h) + 24px);
  background: #0B0D10;
  border-radius: 56px;
  padding: 12px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.08),
    0 40px 80px rgba(0,0,0,0.45),
    0 8px 20px rgba(0,0,0,0.35);
  flex-shrink: 0;
}
.device-btn {
  position: absolute;
  background: #1A1D22;
  border-radius: 2px;
}
.device-btn.silent { left: -3px; top: 128px; width: 4px; height: 28px; }
.device-btn.vol-up { left: -3px; top: 176px; width: 4px; height: 52px; }
.device-btn.vol-dn { left: -3px; top: 236px; width: 4px; height: 52px; }
.device-btn.power { right: -3px; top: 200px; width: 4px; height: 72px; }

.phone {
  position: relative;
  width: var(--phone-w);
  height: var(--phone-h);
  background: var(--bg);
  border-radius: 44px;
  overflow: hidden;
  isolation: isolate;
}

.island {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 34px;
  background: #0B0D10;
  border-radius: 20px;
  z-index: 50;
  pointer-events: none;
}

.statusbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: var(--safe-top);
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 28px 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  pointer-events: none;
  transition: color .3s;
}
.statusbar.light { color: #fff; }
.sb-time { width: 56px; }
.sb-icons { display: flex; align-items: center; gap: 6px; }
.sb-icons svg { display: block; }
#statusbar { direction: ltr; }

/* ===== App shell ===== */
#app {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  opacity: 0;
  transform: translateX(16px);
  pointer-events: none;
  transition: opacity .32s cubic-bezier(.32,.72,0,1), transform .32s cubic-bezier(.32,.72,0,1);
  z-index: 1;
}
.screen.active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  z-index: 2;
}
.screen.slide-back {
  transform: translateX(-16px);
}
.screen.has-tab { padding-bottom: var(--tab-h); }
.screen.navy { background: var(--navy); color: #fff; }

.scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.scroll::-webkit-scrollbar { width: 0; height: 0; }

/* ===== Tab bar ===== */
.tabbar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: var(--tab-h);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  padding: 8px 8px 0;
  z-index: 30;
  transform: translateY(110%);
  transition: transform .32s cubic-bezier(.32,.72,0,1);
}
.tabbar.show { transform: none; }
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: #8A97A6;
  font-size: 10px;
  font-weight: 500;
  padding: 4px 0 0;
  position: relative;
}
.tab svg { width: 24px; height: 24px; }
.tab.active { color: var(--navy); }
.tab.active svg { stroke: var(--navy); }
.tab.center { transform: translateY(-18px); }
.tab-add {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 8px 18px var(--accent-glow);
}
.tab-add svg { stroke: #fff; width: 26px; height: 26px; }
.tab.center span { color: var(--text-2); margin-top: 2px; }

/* ===== Shared UI ===== */
.topbar {
  padding: calc(var(--safe-top) + 6px) 16px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: calc(var(--safe-top) + 50px);
  position: relative;
  z-index: 5;
}
.topbar h1 {
  flex: 1;
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  letter-spacing: -0.02em;
}
.icon-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--text);
  background: transparent;
  flex-shrink: 0;
}
.icon-btn:active { background: var(--line); }
.icon-btn.ghost { background: rgba(255,255,255,0.16); color: #fff; }
.icon-btn.light-bg { background: #fff; box-shadow: var(--shadow); }
.topbar .spacer { width: 36px; flex-shrink: 0; }

.hero-navy {
  background: linear-gradient(165deg, #1C4D82 0%, var(--navy) 48%, #0C2A4A 100%);
  color: #fff;
  padding: calc(var(--safe-top) + 8px) 20px 22px;
  position: relative;
  overflow: hidden;
}
.hero-navy::after {
  content: "";
  position: absolute;
  width: 220px; height: 220px;
  right: -60px; top: -40px;
  background: radial-gradient(circle, rgba(3,153,248,0.35), transparent 70%);
  pointer-events: none;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.section {
  padding: 18px 20px 0;
}
.section-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.section-hd h2 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.section-hd .link {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
}

.list {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  width: 100%;
  text-align: start;
  background: #fff;
  min-height: 56px;
}
.row + .row, .list .row + .row { border-top: 1px solid var(--line); }
.row:active { background: #F7F9FB; }
.row .lead {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid; place-items: center;
  flex-shrink: 0;
  background: var(--accent-soft);
  color: var(--accent);
}
.row .lead.navy { background: #E8EEF5; color: var(--navy); }
.row .lead.ok { background: var(--ok-soft); color: var(--ok); }
.row .body { flex: 1; min-width: 0; text-align: start; }
.row .title { font-size: 15px; font-weight: 500; line-height: 1.3; }
.row .sub { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.row .chev { color: #B0BAC6; flex-shrink: 0; }
.row .value { font-size: 13px; color: var(--text-2); flex-shrink: 0; }

.toggle {
  width: 46px; height: 28px;
  border-radius: 14px;
  background: #D5DCE4;
  position: relative;
  flex-shrink: 0;
  transition: background .25s;
}
.toggle::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
  transition: transform .25s cubic-bezier(.32,.72,0,1);
}
.toggle.on { background: var(--accent); }
.toggle.on::after { transform: translateX(18px); }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 52px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: transform .15s, filter .15s, background .2s;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: linear-gradient(180deg, #1AA4FF, var(--accent));
  color: #fff;
  box-shadow: 0 8px 18px var(--accent-glow);
}
.btn-navy { background: var(--navy); color: #fff; }
.btn-ghost {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-soft { background: var(--accent-soft); color: var(--navy); }
.btn.sm { height: 40px; font-size: 13px; border-radius: 12px; width: auto; padding: 0 16px; }

.field {
  background: #F4F7FA;
  border: 1px solid transparent;
  border-radius: 12px;
  height: 52px;
  padding: 0 16px;
  width: 100%;
  font-size: 15px;
  outline: none;
}
.field:focus { border-color: var(--accent); background: #fff; }

.chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 20px 2px;
  scrollbar-width: none;
}
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  height: 34px;
  padding: 0 14px;
  border-radius: 17px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(19,38,60,0.05);
  border: 1px solid transparent;
}
.chip.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.toast {
  position: absolute;
  left: 50%;
  bottom: 108px;
  transform: translate(-50%, 16px);
  background: rgba(19, 38, 60, 0.92);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 12px;
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  white-space: nowrap;
  max-width: 86%;
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.phone.no-tab .toast { bottom: 36px; }

/* ===== Sheets ===== */
.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 20, 35, 0.45);
  z-index: 70;
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s;
}
.sheet-backdrop.show { opacity: 1; pointer-events: auto; }
.sheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: #fff;
  border-radius: 24px 24px 0 0;
  z-index: 71;
  padding: 10px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translateY(110%);
  transition: transform .36s cubic-bezier(.32,.72,0,1);
  max-height: 86%;
  overflow: auto;
}
.sheet.show { transform: none; }
.sheet-handle {
  width: 40px; height: 4px;
  background: #D5DCE4;
  border-radius: 2px;
  margin: 6px auto 14px;
}
.sheet h3 { font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.sheet p.hint { font-size: 13px; color: var(--text-2); margin-bottom: 16px; line-height: 1.45; }

/* ===== Splash / Login ===== */
#screen-splash, #screen-login {
  background: linear-gradient(180deg, #1C4D82 0%, var(--navy) 40%, #0C2A4A 100%);
  color: #fff;
  align-items: center;
  justify-content: center;
}
.splash-logo { width: 220px; height: auto; animation: rise .9s ease both; }
.splash-tag {
  margin-top: 14px;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.8);
  animation: rise .9s ease .15s both;
  font-weight: 400;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.login-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: calc(var(--safe-top) + 28px) 0 0;
}
.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 24px 28px;
}
.login-brand img { width: 180px; }
.login-sheet {
  flex: 1;
  background: #fff;
  color: var(--text);
  border-radius: 28px 28px 0 0;
  padding: 28px 22px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.login-sheet h2 { font-size: 24px; font-weight: 600; letter-spacing: -0.03em; }
.login-sheet .sub { color: var(--text-2); font-size: 13px; margin-bottom: 8px; }
.or {
  display: flex; align-items: center; gap: 12px;
  color: var(--text-2); font-size: 12px; margin: 4px 0;
}
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login-legal {
  font-size: 11px;
  color: var(--text-2);
  text-align: center;
  margin-top: auto;
  line-height: 1.45;
}

/* ===== Home ===== */
.home-greet { position: relative; z-index: 1; }
.home-greet .kicker {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  font-weight: 400;
}
.home-greet h1 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 2px 0 14px;
}
.weather {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.14);
  border-radius: 999px;
  padding: 6px 12px 6px 8px;
  font-size: 13px;
  font-weight: 500;
}
.weather svg { width: 18px; height: 18px; }

.scenes-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 0 20px 4px;
  scrollbar-width: none;
}
.scenes-row::-webkit-scrollbar { display: none; }
.scene-card {
  flex: 0 0 118px;
  height: 96px;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: start;
}
.scene-card .ico {
  width: 32px; height: 32px;
  border-radius: 10px;
  display: grid; place-items: center;
}
.scene-card .name { font-size: 12px; font-weight: 600; line-height: 1.25; }
.scene-card:active { transform: scale(0.97); }

.device-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.device-card {
  background: #fff;
  border-radius: 18px;
  padding: 14px;
  box-shadow: var(--shadow);
  text-align: start;
  min-height: 138px;
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1.5px solid transparent;
  transition: border-color .25s, box-shadow .25s;
}
.device-card.on {
  border-color: rgba(3,153,248,0.35);
  box-shadow: 0 8px 24px rgba(3,153,248,0.12);
}
.device-card .dc-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.device-card .thumb {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: #F4F7FA;
  object-fit: contain;
  padding: 4px;
}
.device-card .hub-ico {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid; place-items: center;
}
.device-card h3 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: auto;
  line-height: 1.25;
}
.device-card .meta {
  font-size: 11px;
  color: var(--text-2);
  margin-top: 2px;
}
.device-card .meta .dot-on { color: var(--accent); font-weight: 600; }
.device-card .meta .dot-off { color: var(--text-2); }

/* ===== Device detail ===== */
.device-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 20px 24px;
}
.device-hero img.product {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin-bottom: 8px;
  filter: drop-shadow(0 10px 16px rgba(19,38,60,0.12));
}
.device-hero .model {
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 18px;
}
.power-btn {
  width: 168px; height: 168px;
  border-radius: 50%;
  background: #EEF2F6;
  display: grid;
  place-items: center;
  color: #8A97A6;
  position: relative;
  box-shadow:
    inset 0 2px 10px rgba(19,38,60,0.08),
    0 12px 28px rgba(19,38,60,0.10);
  transition: background .35s, color .35s, box-shadow .35s, transform .15s;
}
.power-btn:active { transform: scale(0.96); }
.power-btn svg { width: 64px; height: 64px; position: relative; z-index: 1; }
.power-btn.on {
  background: radial-gradient(circle at 50% 38%, #4EC2FF, #0399F8 52%, #0278C9);
  color: #fff;
  box-shadow:
    0 0 0 14px rgba(3,153,248,0.14),
    0 0 48px rgba(3,153,248,0.5),
    0 16px 32px rgba(3,153,248,0.28);
}
.power-btn.on::before {
  content: "";
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  border: 2px solid rgba(3,153,248,0.25);
  animation: pulse-ring 2.2s ease-out infinite;
}
@keyframes pulse-ring {
  0% { transform: scale(0.86); opacity: 0.7; }
  100% { transform: scale(1.12); opacity: 0; }
}
.power-state {
  margin-top: 16px;
  font-size: 16px;
  font-weight: 600;
}
.power-state.on { color: var(--accent); }
.timer-chip {
  margin-top: 8px;
  font-size: 12px;
  color: var(--accent);
  font-weight: 500;
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
  display: none;
}
.timer-chip.show { display: inline-flex; }

/* ===== Add device ===== */
.cat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 8px 20px 20px;
}
.cat-card {
  background: #fff;
  border-radius: 18px;
  padding: 20px 16px;
  box-shadow: var(--shadow);
  text-align: start;
  min-height: 124px;
}
.cat-card .ico {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: grid; place-items: center;
  margin-bottom: 16px;
  background: var(--accent-soft);
  color: var(--accent);
}
.cat-card h3 { font-size: 15px; font-weight: 600; }
.cat-card p { font-size: 12px; color: var(--text-2); margin-top: 2px; }

.search-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
}
.radar {
  width: 220px; height: 220px;
  position: relative;
  margin-bottom: 28px;
}
.radar .ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(3,153,248,0.25);
  animation: radar 2.4s ease-out infinite;
}
.radar .ring:nth-child(2) { animation-delay: .8s; }
.radar .ring:nth-child(3) { animation-delay: 1.6s; }
.radar .core {
  position: absolute;
  left: 50%; top: 50%;
  width: 72px; height: 72px;
  margin: -36px 0 0 -36px;
  border-radius: 50%;
  background: linear-gradient(180deg, #1AA4FF, var(--accent));
  color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 8px 24px var(--accent-glow);
  z-index: 1;
}
@keyframes radar {
  0% { transform: scale(0.3); opacity: 0.8; }
  100% { transform: scale(1); opacity: 0; }
}
.success-mark {
  width: 88px; height: 88px;
  border-radius: 50%;
  background: var(--ok);
  color: #fff;
  display: grid; place-items: center;
  margin-bottom: 20px;
  box-shadow: 0 12px 28px rgba(27,163,106,0.3);
  animation: pop .45s cubic-bezier(.32,.72,0,1);
}
@keyframes pop {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ===== Scenes page ===== */
.scene-list-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}
.scene-list-card .ico {
  width: 44px; height: 44px;
  border-radius: 14px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.ifttt {
  background: #fff;
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
  margin-bottom: 10px;
}
.ifttt .lbl {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.ifttt .choice {
  width: 100%;
  text-align: start;
  font-size: 15px;
  font-weight: 500;
  padding: 8px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ===== Warranty ===== */
.warranty-hero {
  background: linear-gradient(165deg, #1C4D82, var(--navy) 60%, #0C2A4A);
  color: #fff;
  margin: 8px 20px 0;
  border-radius: 20px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.warranty-hero .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(27,163,106,0.2);
  color: #8BE0B2;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.warranty-hero h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.warranty-hero p { font-size: 13px; color: rgba(255,255,255,0.75); margin-top: 4px; }
.progress {
  height: 6px;
  background: rgba(255,255,255,0.16);
  border-radius: 3px;
  margin-top: 16px;
  overflow: hidden;
}
.progress span {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #8BE0B2, #1BA36A);
  border-radius: 3px;
}
.scan-frame {
  width: 220px; height: 220px;
  border: 2px solid rgba(255,255,255,0.25);
  border-radius: 20px;
  position: relative;
  margin: 20px auto;
}
.scan-frame::before, .scan-frame::after,
.scan-frame span::before, .scan-frame span::after {
  content: "";
  position: absolute;
  width: 28px; height: 28px;
  border: 3px solid #fff;
}
.scan-frame::before { top: -2px; left: -2px; border-right: 0; border-bottom: 0; border-radius: 8px 0 0 0; }
.scan-frame::after { top: -2px; right: -2px; border-left: 0; border-bottom: 0; border-radius: 0 8px 0 0; }
.scan-frame span::before { bottom: -2px; left: -2px; border-right: 0; border-top: 0; border-radius: 0 0 0 8px; }
.scan-frame span::after { bottom: -2px; right: -2px; border-left: 0; border-top: 0; border-radius: 0 0 8px 0; }
.scan-line {
  position: absolute;
  left: 12px; right: 12px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #0399F8, transparent);
  box-shadow: 0 0 12px #0399F8;
  animation: scan 2s ease-in-out infinite;
}
@keyframes scan {
  0%, 100% { top: 16px; }
  50% { top: calc(100% - 16px); }
}

/* ===== Profile ===== */
.profile-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 20px 18px;
}
.avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(180deg, #1C4D82, var(--navy));
  color: #fff;
  display: grid; place-items: center;
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}
.profile-head h2 { font-size: 20px; font-weight: 600; }
.profile-head p { font-size: 13px; color: var(--text-2); }

.seg {
  display: flex;
  background: #E8EEF5;
  border-radius: 12px;
  padding: 3px;
  gap: 3px;
}
.seg button {
  flex: 1;
  height: 36px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}
.seg button.active { background: #fff; color: var(--navy); box-shadow: 0 2px 8px rgba(19,38,60,0.08); }

.offer-card {
  background: linear-gradient(135deg, var(--navy) 0%, #1C4D82 60%, #0399F8 160%);
  color: #fff;
  border-radius: 20px;
  padding: 18px 18px 16px;
  margin: 0 20px 8px;
}
.offer-card .tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9FD6FF;
  margin-bottom: 6px;
}
.offer-card h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.offer-card p { font-size: 13px; color: rgba(255,255,255,0.8); margin-top: 4px; line-height: 1.45; }

.product-tile {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
}
.product-tile img {
  width: 64px; height: 64px;
  object-fit: contain;
  background: #F4F7FA;
  border-radius: 12px;
  padding: 6px;
}
.tag-pill {
  display: inline-flex;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--ok-soft);
  color: var(--ok);
}
.tag-pill.soon { background: #EEF2F6; color: var(--text-2); }

.choice-grid { display: flex; flex-direction: column; gap: 8px; }
.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: #fff;
  text-align: start;
  width: 100%;
  font-size: 14px;
  font-weight: 500;
}
.choice.selected { border-color: var(--accent); background: var(--accent-soft); }
.choice .tick { margin-inline-start: auto; color: var(--accent); opacity: 0; }
.choice.selected .tick { opacity: 1; }

/* Voice */
.voice-card {
  background: #fff;
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
  margin: 0 20px 12px;
}
.voice-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.voice-card p { font-size: 13px; color: var(--text-2); line-height: 1.45; margin-bottom: 14px; }

/* RTL */
[dir="rtl"] .stage-copy li { padding: 6px 22px 6px 0; }
[dir="rtl"] .stage-copy li::before { left: auto; right: 0; }
[dir="rtl"] .screen.active { transform: none; }
[dir="rtl"] .device-card, [dir="rtl"] .cat-card, [dir="rtl"] .scene-card, [dir="rtl"] .row .body { text-align: start; }

/* Hide tab on auth screens handled via .tabbar.show */

/* ===== Mobile full screen ===== */
@media (max-width: 860px) {
  .stage {
    display: block;
    padding: 0;
    background: #000;
    min-height: 100dvh;
  }
  .stage-copy { display: none; }
  .device {
    width: 100%;
    height: 100dvh;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    background: transparent;
  }
  .device-btn { display: none; }
  .phone {
    width: 100%;
    height: 100dvh;
    border-radius: 0;
  }
  .island { display: none; }
  :root {
    --safe-top: calc(env(safe-area-inset-top, 0px) + 28px);
    --tab-h: calc(72px + env(safe-area-inset-bottom, 0px));
  }
  .tabbar { padding-bottom: env(safe-area-inset-bottom, 0px); }
}

/* Shot / screenshot mode: just the phone UI, no desktop chrome */
body.shot {
  background: #0A1E33;
  min-height: auto;
}
body.shot .stage { min-height: auto; padding: 40px; gap: 0; }
body.shot .stage-copy { display: none; }
body.shot-bare {
  background: #fff;
}
body.shot-bare .stage,
body.shot-bare .device {
  padding: 0;
  min-height: auto;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  width: 390px;
  height: 844px;
}
body.shot-bare .device-btn, body.shot-bare .stage-copy { display: none; }
body.shot-bare .phone { border-radius: 0; }

@media print {
  .stage-copy { display: none; }
}


/* Keep inline SVG icons at a consistent size */
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.icon-btn svg { width: 20px; height: 20px; }
.row .lead svg,
.scene-card .ico svg,
.cat-card .ico svg,
.hub-ico svg { width: 22px; height: 22px; }
.warranty-hero .badge { white-space: nowrap; }
.warranty-hero .badge svg { width: 16px; height: 16px; flex-shrink: 0; }
.device-card .thumb {
  background: #E8EEF5;
  border: 1px solid #E3EAF1;
}
.device-hero img.product {
  background: #fff;
  border-radius: 20px;
  padding: 8px;
}
