@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,100..900;1,9..144,100..900&family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700;800&display=swap');
/* =========================================================
   HotelYtic — Luxury Redesign
   Palette: deep Navy + Champagne Gold on warm Ivory
   Fonts: Fraunces (serif) · Inter (UI) · Plex Arabic
   ========================================================= */

:root {
  /* Neutrals */
  --ivory:      #FAF7F2;
  --cream:      #F3ECE0;
  --parchment:  #EFE7D6;
  --hairline:   #E5DDCB;
  --white:      #FFFFFF;

  /* Ink & muted */
  --ink:        #0B1F3A;
  --ink-2:      #14284A;
  --muted:      #5C6B82;
  --muted-2:    #8A98AF;

  /* Navy scale */
  --navy:       #0B1F3A;
  --navy-deep:  #061428;
  --navy-soft:  #1E3358;

  /* Gold scale */
  --gold:       #C9A961;
  --gold-dark:  #A68A48;
  --gold-soft:  #E9D9AE;
  --gold-glow:  #F0DEA6;

  /* Emerald / signal */
  --emerald:    #1B9C86;
  --emerald-2:  #4ADE80;
  --amber:      #F5A623;
  --coral:      #EF4444;

  /* Elevation */
  --shadow-sm:  0 1px 2px rgba(11,31,58,0.05);
  --shadow-md:  0 4px 16px -4px rgba(11,31,58,0.10);
  --shadow-lg:  0 20px 40px -20px rgba(11,31,58,0.30);

  /* Radii */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-full: 999px;

  /* Font stacks — system fonts only, no custom web fonts */
  --font-serif: "Fraunces", "IBM Plex Sans Arabic", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, serif;
  --font-sans:  "Inter", "IBM Plex Sans Arabic", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono:  ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

/* -------- reset -------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--ivory);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
[dir="rtl"] body { font-family: var(--font-sans); }

img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
a { color: inherit; text-decoration: none; }
input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
hr.divider { border: 0; height: 1px; background: var(--hairline); margin: 18px 0; }

/* -------- reusable atoms -------- */
.container { max-width: 1240px; margin: 0 auto; padding: 0 28px; }
@media (max-width: 720px) { .container { padding: 0 18px; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  border-radius: var(--r-full);
  background: rgba(201,169,97,0.14);
  color: var(--gold-dark);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.25em; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--gold-dark); }

h1, h2, h3, h4 { font-family: var(--font-serif); color: var(--ink); font-weight: 700; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.08; }
h2 { font-size: clamp(28px, 3.6vw, 42px); line-height: 1.15; }
h3 { font-size: 20px; line-height: 1.3; }
h4 { font-size: 16px; line-height: 1.35; }
p  { margin: 0; color: var(--muted); line-height: 1.75; }

.accent { color: var(--gold-dark); position: relative; }
.accent::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
}
[dir="rtl"] .accent::after {
  background: linear-gradient(270deg, var(--gold), transparent);
}

/* -------- buttons -------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: var(--r-full);
  font-weight: 600; font-size: 14px; letter-spacing: 0.01em;
  transition: all 0.2s ease; white-space: nowrap;
  border: 1px solid transparent;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-primary { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 100%); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { box-shadow: var(--shadow-lg); }
.btn-gold { background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%); color: var(--navy-deep); box-shadow: 0 4px 16px -6px rgba(201,169,97,0.6); }
.btn-gold:hover { box-shadow: 0 12px 28px -10px rgba(201,169,97,0.7); }
.btn-ghost { background: transparent; border: 1px solid var(--hairline); color: var(--ink); }
.btn-ghost:hover { background: var(--cream); }
.btn-danger-ghost { border: 1px solid rgba(239,68,68,0.28); background: #fff; color: var(--coral); }
.btn-danger-ghost:hover { background: rgba(239,68,68,0.05); }

/* -------- input -------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.input {
  width: 100%; padding: 12px 16px; border-radius: var(--r-full);
  border: 1px solid var(--hairline); background: var(--ivory); color: var(--ink);
  font-size: 14px; transition: border-color .2s, box-shadow .2s; outline: none;
}
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,169,97,0.15); background: #fff; }
select.input { appearance: none; padding-inline-end: 40px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235C6B82' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: right 16px center; background-size: 14px; }
[dir="rtl"] select.input { background-position: left 16px center; }

/* -------- card -------- */
.card { background: #fff; border: 1px solid var(--hairline); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow-sm); }
.card-soft { background: linear-gradient(180deg, var(--cream) 0%, rgba(243,236,224,0) 100%); border: 1px solid var(--hairline); }

/* -------- toast -------- */
.toast-stack { position: fixed; z-index: 200; bottom: 22px; inset-inline-end: 22px; display: flex; flex-direction: column; gap: 10px; max-width: 360px; }
.toast { padding: 12px 16px; border-radius: 14px; background: #fff; color: var(--ink); border: 1px solid var(--hairline); box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px; animation: toastIn .25s ease-out; }
.toast.error { border-color: rgba(239,68,68,0.3); background: #FFF5F5; color: #7F1D1D; }
.toast.success { border-color: rgba(74,222,128,0.35); background: #F0FDF4; color: #14532D; }
@keyframes toastIn { from { opacity:0; transform: translateY(8px);} to { opacity:1; transform: translateY(0);} }

/* -------- modal -------- */
.modal-scrim {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(6,20,40,0.55); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; animation: fadeIn .2s ease-out;
  overflow-y: auto;
}
.modal {
  position: relative; background: #fff; border-radius: var(--r-lg);
  max-width: 440px; width: 100%;
  max-height: calc(100vh - 40px);
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg); border-top: 3px solid var(--gold);
  animation: modalPop .25s ease-out;
  margin: auto;
}
.modal-body { padding: 32px; overflow-y: auto; }
.history-modal { max-width: 720px; }
.history-modal .modal-body { padding: 0; }
.modal-close {
  position: absolute; top: 14px; inset-inline-end: 14px; width: 32px; height: 32px;
  border-radius: var(--r-full); background: var(--cream); color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center; font-size: 16px;
  z-index: 2; flex-shrink: 0;
}
.modal-close:hover { background: var(--parchment); color: var(--ink); }
@media (max-width: 520px) {
  .modal-scrim { padding: 0; align-items: flex-end; }
  .modal { max-width: 100%; max-height: calc(100vh - 24px); border-radius: var(--r-lg) var(--r-lg) 0 0; }
}
@keyframes modalPop { from { opacity:0; transform: translateY(12px) scale(.98);} to { opacity:1; transform: translateY(0) scale(1);} }
@keyframes fadeIn  { from { opacity: 0;} to { opacity: 1;} }

/* -------- auth modal -------- */
.auth-tabs { display: flex; gap: 4px; margin-bottom: 22px; background: var(--cream); padding: 4px; border-radius: var(--r-full); }
.auth-tabs button { flex: 1; padding: 9px 14px; border-radius: var(--r-full); font-weight: 600; font-size: 13px; color: var(--muted); transition: all .2s; }
.auth-tabs button.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.auth-error { padding: 10px 14px; border-radius: 12px; background: #FFF5F5; color: #7F1D1D; border: 1px solid rgba(239,68,68,0.28); font-size: 13px; margin-bottom: 12px; }
.or-sep { margin: 18px 0 14px; color: var(--muted); font-size: 12px; text-align: center; position: relative; }
.or-sep::before, .or-sep::after { content: ""; position: absolute; top: 50%; width: 42%; height: 1px; background: var(--hairline); }
.or-sep::before { inset-inline-start: 0; }
.or-sep::after  { inset-inline-end: 0; }
.google-btn { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 11px 16px; border-radius: var(--r-full); background: #fff; border: 1px solid var(--hairline); font-weight: 600; font-size: 14px; color: var(--ink); transition: all .2s; }
.google-btn:hover { background: var(--cream); }

/* =========================================================
   APP SHELL (dashboard)
   ========================================================= */
.app-shell { display: flex; min-height: 100vh; background: var(--ivory); }

.sidebar {
  flex-shrink: 0; width: 268px;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff; display: flex; flex-direction: column;
  padding: 22px 16px 18px;
  position: sticky; top: 0; height: 100vh;
  border-inline-end: 1px solid rgba(255,255,255,0.06);
}
.sidebar .brand { display: flex; align-items: center; gap: 12px; padding: 6px 8px 20px; margin-bottom: 6px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.sidebar .brand-mark { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%); display: inline-flex; align-items: center; justify-content: center; }
.sidebar .brand-mark svg path, .sidebar .brand-mark svg circle { stroke: var(--navy-deep); fill: none; }
.sidebar .brand-mark svg circle:last-child { fill: var(--navy-deep); }
.sidebar .brand-name { font-family: var(--font-serif); font-size: 20px; font-weight: 700; color: #fff; line-height: 1; }
.sidebar .brand-name .dot { color: var(--gold); }
.sidebar .brand-tag { font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-soft); margin-top: 4px; }

.sidebar .nav { display: flex; flex-direction: column; gap: 4px; padding: 12px 0; flex: 1; }
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 14px;
  font-size: 14px; font-weight: 500; color: #C6D0E1;
  transition: all .2s; text-align: start;
  border: 1px solid transparent;
}
.nav-item svg { width: 17px; height: 17px; stroke: currentColor; flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,0.05); color: #fff; }
.nav-item.active { background: rgba(201,169,97,0.12); color: var(--gold); border-color: rgba(201,169,97,0.28); }
.nav-item.active::before { content: ""; position: absolute; inset-inline-start: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold); }
[dir="rtl"] .nav-item.active::before { border-radius: 3px 0 0 3px; }

.sidebar-foot { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.06); }
.credits-pill { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-radius: 14px; background: rgba(201,169,97,0.10); border: 1px solid rgba(201,169,97,0.28); }
.credits-pill .num { font-family: var(--font-serif); font-size: 22px; font-weight: 700; color: var(--gold); line-height: 1; }
.credits-pill .muted { color: var(--gold-soft) !important; letter-spacing: 0.15em; text-transform: uppercase; font-size: 10px !important; font-weight: 600; }

.user-chip { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,0.04); color: #fff; transition: all .2s; }
.user-chip:hover { background: rgba(255,255,255,0.08); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: var(--navy-deep); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }

/* main area */
.main-area { flex: 1; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  padding: 14px 32px; background: rgba(250,247,242,0.85);
  backdrop-filter: blur(14px); border-bottom: 1px solid var(--hairline);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.topbar .brand-name { font-family: var(--font-serif); font-weight: 700; color: var(--ink); }
.topbar .credits-pill { padding: 6px 14px; background: linear-gradient(135deg, var(--gold), var(--gold-dark)); border: 0; color: var(--navy-deep); }
.topbar .credits-pill .num { color: var(--navy-deep); font-size: 14px; }
.icon-btn { width: 38px; height: 38px; border-radius: 12px; background: #fff; border: 1px solid var(--hairline); display: inline-flex; align-items: center; justify-content: center; color: var(--ink); }
.icon-btn:hover { background: var(--cream); }

.panel { padding: 36px 32px 60px; animation: panelIn .35s ease-out; }
@keyframes panelIn { from { opacity: 0; transform: translateY(6px);} to { opacity: 1; transform: translateY(0);} }

.grid-2 { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.15fr); gap: 24px; align-items: start; }
@media (max-width: 980px) { .grid-2 { grid-template-columns: 1fr; } }

/* segments */
.segments { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.segment-chip {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 8px; border-radius: 16px;
  border: 1px solid var(--hairline); background: var(--cream); color: var(--ink);
  font-size: 12.5px; font-weight: 500; transition: all .2s; cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.segment-chip svg { width: 18px; height: 18px; color: var(--muted); }
.segment-chip:hover { border-color: var(--gold-dark); transform: translateY(-1px); }
.segment-chip.active { background: rgba(201,169,97,0.10); border-color: var(--gold); color: var(--gold-dark); box-shadow: 0 0 0 3px rgba(201,169,97,0.15); }
.segment-chip.active svg { color: var(--gold-dark); }
.segment-chip.locked { opacity: .55; }
.segment-chip.locked::after { content: "$"; font-family: var(--font-mono); position: absolute; top: 6px; inset-inline-end: 8px; font-size: 10px; color: var(--gold-dark); }

/* autocomplete */
.input-wrap { position: relative; }
.ac-list { position: absolute; z-index: 40; top: calc(100% + 6px); right: 0; left: 0; background: #fff; border: 1px solid var(--hairline); border-radius: 18px; box-shadow: var(--shadow-lg); max-height: 260px; overflow-y: auto; padding: 6px; }
.ac-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; cursor: pointer; font-size: 13.5px; color: var(--ink); }
.ac-item:hover { background: var(--cream); }
.ac-item svg { width: 14px; height: 14px; color: var(--gold-dark); flex-shrink: 0; }

/* result card */
.result-header { padding: 26px 26px 20px; background: linear-gradient(180deg, var(--cream) 0%, rgba(243,236,224,0) 100%); border-bottom: 1px solid var(--hairline); }
.result-title { font-family: var(--font-serif); font-size: 24px; font-weight: 700; color: var(--ink); margin: 4px 0 4px; }
.result-meta { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.recommend-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: var(--r-full); background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: var(--navy-deep); font-size: 10px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }

.gauge-wrap { position: relative; width: 120px; height: 120px; margin: 0 auto 18px; }
.gauge-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge-track { fill: none; stroke: var(--hairline); stroke-width: 9; }
.gauge-fill  { fill: none; stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset 0.85s cubic-bezier(0.4, 0, 0.2, 1); }
.hero-card .gauge-fill { stroke: url(#gaugeGrad); }
.gauge-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gauge-num { font-family: var(--font-serif); font-size: 32px; font-weight: 700; color: var(--ink); line-height: 1; }
.gauge-lbl, .gauge-label { font-size: 9px; text-transform: uppercase; letter-spacing: 0.22em; color: var(--muted); margin-top: 4px; }

.safety-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: var(--r-full); font-size: 12px; font-weight: 600; border: 1px solid; }
.safety-low      { color: #166534; background: rgba(74,222,128,0.10); border-color: rgba(74,222,128,0.35); }
.safety-moderate { color: #92400E; background: rgba(245,166,35,0.10); border-color: rgba(245,166,35,0.35); }
.safety-high     { color: #B91C1C; background: rgba(239,68,68,0.10); border-color: rgba(239,68,68,0.35); }
.safety-severe   { color: #7F1D1D; background: rgba(127,29,29,0.10); border-color: rgba(127,29,29,0.4); }

.subrating-row { display: grid; grid-template-columns: 110px 1fr 40px; gap: 12px; align-items: center; margin-top: 10px; }
.subrating-row .name { font-size: 12.5px; color: var(--ink); display: inline-flex; align-items: center; gap: 6px; }
.subrating-track { height: 6px; border-radius: var(--r-full); background: var(--parchment); overflow: hidden; }
.subrating-fill  { height: 100%; border-radius: var(--r-full); background: linear-gradient(90deg, var(--gold), var(--gold-dark)); transition: width .5s; }
.subrating-row .val { font-family: var(--font-mono); font-size: 12.5px; font-weight: 700; color: var(--ink); text-align: end; }

.proscons-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--hairline); }
@media (max-width: 720px) { .proscons-grid { grid-template-columns: 1fr; } }
.pc-col { padding: 22px 26px; }
.pc-col + .pc-col { border-inline-start: 1px solid var(--hairline); }
@media (max-width: 720px) { .pc-col + .pc-col { border-inline-start: 0; border-top: 1px solid var(--hairline); } }
.pc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.pc-head .icon-badge { width: 32px; height: 32px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; }
.pc-head h4 { font-family: var(--font-serif); font-size: 17px; font-weight: 700; color: var(--ink); }
.pc-item { margin-bottom: 12px; }
.pc-item .t { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.pc-item .d { font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.6; }

.final-rec { padding: 22px 26px; background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%); color: #fff; display: flex; gap: 14px; align-items: flex-start; }
.final-rec .icon-badge { width: 44px; height: 44px; border-radius: 14px; background: linear-gradient(135deg, var(--gold), var(--gold-dark)); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--navy-deep); }
.final-rec .rec-label { font-size: 10px; letter-spacing: 0.25em; text-transform: uppercase; color: var(--gold-soft); font-weight: 600; }
.final-rec p { color: #C6D0E1; font-size: 14px; margin-top: 8px; }
.final-rec p b { color: #fff; font-weight: 600; }

/* loader / analysis pipeline */
.loader-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 60px 20px; }
.compass { width: 64px; height: 64px; border-radius: 50%; background: rgba(201,169,97,0.12); border: 1px solid rgba(201,169,97,0.35); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 18px; animation: spin 3.4s linear infinite; }
.compass svg path { stroke: var(--gold-dark); }
@keyframes spin { to { transform: rotate(360deg); } }
.loader-text { font-family: var(--font-serif); font-size: 16px; color: var(--ink); font-weight: 500; }

.analysis-loader { padding: 30px 20px; text-align: center; }
.al-ring-wrap { position: relative; margin: 0 auto 22px; }
.al-ring { display: block; width: 100%; height: 100%; transform: rotate(-90deg); }
.al-ring circle { fill: none; stroke-width: 8; }
.al-ring-track { stroke: var(--hairline); }
.al-ring-fill { stroke: url(#alGrad); stroke-linecap: round; transition: stroke-dashoffset .5s ease; }
.al-ring-center { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.al-percent { font-family: var(--font-serif); font-size: 26px; font-weight: 700; color: var(--ink); transition: color .3s; }
.al-step-text { font-family: var(--font-serif); font-size: 15px; color: var(--ink); font-weight: 500; min-height: 44px; line-height: 1.5; opacity: 1; transition: opacity .2s; max-width: 320px; margin: 0 auto 20px; }
.al-compact .al-ring-wrap { margin-bottom: 14px; }
.al-steps { display: flex; align-items: center; justify-content: center; gap: 4px; }
.al-step-node { width: 22px; height: 22px; border-radius: 50%; background: var(--parchment); color: var(--muted); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; transition: all .3s; }
.al-step-node.active { background: var(--gold); color: var(--navy-deep); box-shadow: 0 0 0 3px rgba(201,169,97,0.2); }
.al-step-node.done { background: var(--emerald-2); color: #fff; }
.al-step-connector { width: 18px; height: 2px; background: var(--parchment); }
.al-step-connector.done { background: var(--emerald-2); }

/* history */
.history-item { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 18px; background: #fff; border: 1px solid var(--hairline); transition: all .2s; cursor: pointer; }
.history-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: rgba(201,169,97,0.4); }
.history-icon { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, var(--navy), var(--navy-soft)); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.history-icon svg { color: var(--gold); }
.history-body { flex: 1; min-width: 0; }
.history-name { font-family: var(--font-serif); font-size: 16px; font-weight: 700; color: var(--ink); }
.history-meta { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; margin-top: 3px; flex-wrap: wrap; }
.history-score { font-family: var(--font-serif); font-size: 22px; font-weight: 700; color: var(--ink); text-align: end; line-height: 1; }
.history-score-lbl { font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); text-align: end; margin-top: 2px; }
.btn-delete-history { width: 32px; height: 32px; border-radius: 10px; background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; transition: all .2s; }
.btn-delete-history:hover { background: rgba(239,68,68,0.10); color: var(--coral); }

.pack-card {
  position: relative; background: #fff; border: 1px solid var(--hairline); border-radius: var(--r-lg);
  padding: 28px 24px; transition: all .3s; display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 4px; box-shadow: var(--shadow-sm);
}
.pack-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.pack-card.featured { background: var(--navy); color: #fff; border: 2px solid var(--gold); }
.pack-card.featured .muted { color: var(--gold-soft); }
.pack-card .credits-count { font-family: var(--font-serif); font-size: 42px; font-weight: 700; color: var(--gold-dark); line-height: 1.15; margin-top: 6px; }
.pack-card.featured .credits-count { color: var(--gold); }
.pack-card .credits-label { font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.pack-card.featured .credits-label { color: rgba(255,255,255,0.65); }
.pack-card .featured-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  padding: 4px 14px; border-radius: var(--r-full); background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--navy-deep); font-size: 10px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  white-space: nowrap;
}
.pack-card .buy-pack-btn { margin-top: 18px; }
.pack-card.featured .buy-pack-btn { background: var(--gold); color: var(--navy-deep); }
.pack-card.featured .buy-pack-btn:hover { background: var(--gold-dark); }

/* plans (legacy) */
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; max-width: 1000px; }
.plan-card { position: relative; background: #fff; border: 1px solid var(--hairline); border-radius: var(--r-lg); padding: 28px 24px; transition: all .3s; display: flex; flex-direction: column; }
.plan-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.plan-card.featured { background: var(--navy); color: #fff; border: 2px solid var(--gold); }
.plan-card.featured .plan-name, .plan-card.featured .plan-price, .plan-card.featured .plan-credits-num, .plan-card.featured .plan-features li { color: #fff; }
.plan-card.featured .plan-desc, .plan-card.featured .plan-price-suffix { color: var(--gold-soft); }
.plan-tag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); padding: 4px 14px; border-radius: var(--r-full); background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: var(--navy-deep); font-size: 10px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }
.plan-name { font-size: 11px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.plan-price { font-family: var(--font-serif); font-size: 46px; font-weight: 700; color: var(--ink); margin-top: 6px; line-height: 1; }
.plan-price-suffix { font-size: 12px; color: var(--muted); margin-inline-start: 6px; }
.plan-desc { font-size: 13px; color: var(--muted); margin-top: 10px; min-height: 40px; }
.plan-divider { height: 1px; background: var(--hairline); margin: 18px 0; }
.plan-card.featured .plan-divider { background: rgba(255,255,255,0.12); }
.plan-credits { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.plan-credits-num { font-family: var(--font-serif); font-size: 32px; font-weight: 700; color: var(--gold-dark); line-height: 1; }
.plan-card.featured .plan-credits-num { color: var(--gold); }
.plan-bonus { padding: 3px 8px; border-radius: var(--r-full); background: rgba(201,169,97,0.15); color: var(--gold-dark); border: 1px solid rgba(201,169,97,0.35); font-size: 10px; font-weight: 700; }
.plan-features { list-style: none; padding: 0; margin: 0; flex: 1; }
.plan-features li { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--ink); padding: 5px 0; }
.plan-features li svg { color: var(--gold-dark); margin-top: 2px; flex-shrink: 0; }
.plan-card.featured .plan-features li svg { color: var(--gold); }
.buy-pack-btn { margin-top: 22px; width: 100%; padding: 12px; border-radius: var(--r-full); background: var(--navy); color: #fff; font-weight: 600; font-size: 14px; transition: all .2s; }
.buy-pack-btn:hover { background: var(--navy-soft); box-shadow: var(--shadow-md); }
.plan-card.featured .buy-pack-btn { background: var(--gold); color: var(--navy-deep); }
.plan-card.featured .buy-pack-btn:hover { background: var(--gold-dark); }

/* paid gate */
.paid-gate { display: flex; flex-direction: column; gap: 12px; background: rgba(201,169,97,0.08); border-color: rgba(201,169,97,0.35); }
.paid-gate-icon { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: var(--navy-deep); display: inline-flex; align-items: center; justify-content: center; }

/* mobile drawer */
.scrim { position: fixed; inset: 0; background: rgba(6,20,40,0.5); backdrop-filter: blur(4px); z-index: 60; display: none; }
@media (max-width: 980px) {
  .sidebar { position: fixed; z-index: 70; top: 0; inset-inline-start: 0; height: 100vh; transform: translateX(-100%); transition: transform .3s ease; box-shadow: var(--shadow-lg); }
  [dir="rtl"] .sidebar { transform: translateX(100%); }
  .sidebar.open { transform: translateX(0); }
  .scrim.open, .scrim.show { display: block; animation: fadeIn 0.3s ease-out; }
  .panel { padding: 24px 18px 48px; }
  .topbar { padding: 12px 18px; }
}
@media (min-width: 981px) {
  .topbar .icon-btn.mobile-only { display: none; }
  .topbar .brand-name.mobile-only { display: none; }
  .topbar .credits-pill.mobile-only { display: none; }
}

/* =========================================================
   NEW BUGS FIXES - LUXURY ADJUSTMENTS & SPACING
   ========================================================= */

/* Padded container for analysis output inside card & modals */
.analysis-result {
  padding: 34px 38px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}
@media (max-width: 520px) {
  .analysis-result {
    padding: 22px 18px;
    gap: 16px;
  }
}

/* hotel suggestion card for city search results */
.hotel-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: var(--r-md);
  background: #fff;
  border: 1px solid var(--hairline);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  text-align: start; /* Supports both RTL and LTR cleanly */
}
.hotel-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold-dark);
}
.hotel-card .thumb {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(201,169,97,0.10);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--gold-dark);
  transition: all 0.25s ease;
}
.hotel-card:hover .thumb {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--navy-deep);
}
.hotel-card .thumb svg {
  width: 20px;
  height: 20px;
}
.hotel-card .hotel-info {
  flex: 1;
  min-width: 0;
}
.hotel-card .hotel-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 15.5px;
  color: var(--ink);
  margin: 0 0 4px;
}
.hotel-card .hotel-location {
  font-size: 12.5px;
  color: var(--muted);
}
.hotel-card .btn-ghost {
  flex-shrink: 0;
  padding: 8px 16px;
  font-size: 13px;
  border-radius: var(--r-full);
  border: 1px solid var(--hairline);
  color: var(--gold-dark);
  background: transparent;
  font-weight: 600;
  transition: all 0.2s ease;
}
.hotel-card:hover .btn-ghost {
  background: var(--cream);
  border-color: var(--gold);
  color: var(--navy-deep);
}


/* -------- password toggle & email validation -------- */
.pw-field-wrap { position: relative; }
.pw-toggle {
  position: absolute; top: 50%; inset-inline-end: 10px; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%; background: transparent; border: none;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted); transition: color .2s; z-index: 2;
}
.pw-toggle:hover { color: var(--ink); }
.pw-toggle svg { width: 18px; height: 18px; }

.email-validation-msg {
  font-size: 12px; font-weight: 500; margin-top: 6px; display: flex; align-items: center; gap: 4px;
}
.email-validation-msg.valid { color: #16A34A; }
.email-validation-msg.invalid { color: #EF4444; }

/* verification screen inside modal */
.verify-block { text-align: center; padding: 6px 0 2px; }
.verify-icon {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 16px;
  background: rgba(201,169,97,0.12); border: 2px dashed var(--gold-dark);
  display: flex; align-items: center; justify-content: center;
  animation: pulse-gold 2s ease-in-out infinite;
}
.verify-icon svg { color: var(--gold-dark); }
@keyframes pulse-gold {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.7; }
}
.verify-icon.verified {
  border-style: solid; background: rgba(34,197,94,0.12); border-color: #22C55E;
  animation: none;
}
.verify-icon.verified svg { color: #16A34A; }

.verify-title { font-family: var(--font-serif); font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.verify-sub { font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.verify-email-chip {
  display: inline-block; max-width: 100%; overflow-wrap: anywhere;
  font-weight: 700; font-size: 13.5px; color: var(--ink);
  background: rgba(201,169,97,0.10); border: 1px solid rgba(201,169,97,0.28);
  border-radius: var(--r-full); padding: 6px 16px; margin: 0 0 18px;
}

.verify-msg { padding: 10px 14px; border-radius: 12px; font-size: 13px; margin-bottom: 14px; text-align: start; }
.verify-msg-error { background: #FFF5F5; color: #7F1D1D; border: 1px solid rgba(239,68,68,0.28); }
.verify-msg-success { background: #F0FDF4; color: #14532D; border: 1px solid rgba(74,222,128,0.35); }

.verify-steps {
  list-style: none; margin: 0 0 16px; padding: 0;
  display: flex; flex-direction: column; gap: 8px; text-align: start;
}
.verify-steps li {
  display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink);
  background: var(--parchment); border-radius: 10px; padding: 8px 12px;
}
.verify-step-num {
  flex: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--gold-dark); color: #061428; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.verify-note { font-size: 12px; color: var(--muted); margin: 0 0 14px; line-height: 1.65; }

.verify-autocheck {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 12px; color: var(--muted); margin: 0 0 16px;
}
.verify-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--gold-dark);
  animation: verify-dot-blink 1.4s ease-in-out infinite;
}
@keyframes verify-dot-blink {
  0%, 100% { opacity: 0.3; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1); }
}
