/* =====================================================================
   هتل هوشمند — سیستم طراحی تمیز و حرفه‌ای (ShAI.D)
   تم تیره پرمیوم + اکسنت طلایی/برنجی، سلسله‌مراتب روشن، فضای تنفس.
   ===================================================================== */

:root {
  --bg:        #0d0e11;
  --bg-2:      #111317;
  --panel:     #161922;
  --panel-2:   #1b1f29;
  --raised:    #20242f;
  --line:      rgba(255,255,255,0.07);
  --line-2:    rgba(255,255,255,0.12);
  --ink:       #f2f1ee;
  --muted:     #a7aab4;
  --dim:       #6f7280;

  --gold:      #c8a45c;
  --gold-soft: #e7c885;
  --gold-deep: #9c7c3e;
  --gold-glow: rgba(200,164,92,0.18);

  --ok:        #58c98c;
  --ok-bg:     rgba(88,201,140,0.12);
  --warn:      #e3a64b;
  --warn-bg:   rgba(227,166,75,0.13);
  --bad:       #e8705f;
  --bad-bg:    rgba(232,112,95,0.12);

  --radius:    18px;
  --radius-sm: 12px;
  --shadow:    0 18px 50px rgba(0,0,0,0.45);
  --shadow-sm: 0 8px 24px rgba(0,0,0,0.32);
  --font:      'Vazirmatn', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1100px 600px at 85% -10%, rgba(200,164,92,0.08), transparent 60%),
    radial-gradient(900px 500px at -5% 5%, rgba(120,140,200,0.05), transparent 55%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.7;
}
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--gold-glow); }
svg.lucide { width: 1em; height: 1em; stroke-width: 1.9; }

.eyebrow {
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin: 0 0 8px;
}

/* ---------- Layout shells ---------- */
.h-shell { max-width: 1240px; margin: 0 auto; padding: 0 22px 60px; }
.h-main  { padding-top: 26px; }

/* ---------- Topbar ---------- */
.h-topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 18px;
  max-width: 1240px; margin: 0 auto; padding: 14px 22px;
  background: rgba(13,14,17,0.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.h-brand { display: flex; align-items: center; gap: 12px; }
.h-brand-mark {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center; flex: none;
  background: linear-gradient(145deg, var(--gold-soft), var(--gold-deep));
  color: #1a1306; font-size: 20px;
  box-shadow: 0 6px 18px var(--gold-glow);
}
.h-brand-mark svg { width: 22px; height: 22px; }
.h-brand-text b { display: block; font-size: 16px; line-height: 1.2; }
.h-brand-text span { font-size: 11px; color: var(--dim); letter-spacing: 0.04em; }

.h-nav { display: flex; gap: 4px; margin-inline-start: auto; flex-wrap: wrap; }
.h-nav a {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 11px; font-size: 13.5px; font-weight: 500;
  color: var(--muted); border: 1px solid transparent; transition: .18s;
}
.h-nav a svg { width: 16px; height: 16px; }
.h-nav a:hover { color: var(--ink); background: var(--panel); }
.h-nav a.is-active { color: #1a1306; background: linear-gradient(145deg, var(--gold-soft), var(--gold)); border-color: transparent; font-weight: 600; }
.h-nav a.ghost:hover { border-color: var(--line-2); background: transparent; }

.h-chip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 13px 7px 9px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--line);
}
.h-chip .av { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: var(--raised); color: var(--gold); }
.h-chip .av svg { width: 17px; height: 17px; }
.h-chip b { font-size: 13px; }
.h-chip span { display: block; font-size: 10.5px; color: var(--dim); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 12px; font-size: 14px; font-weight: 600;
  border: 1px solid var(--line-2); background: var(--panel); color: var(--ink);
  transition: .18s;
}
.btn svg { width: 17px; height: 17px; }
.btn:hover { border-color: var(--gold); color: var(--gold-soft); }
.btn-gold { background: linear-gradient(145deg, var(--gold-soft), var(--gold)); color: #1a1306; border-color: transparent; }
.btn-gold:hover { filter: brightness(1.05); color: #1a1306; }
.btn-ghost { background: transparent; }

/* ---------- Generic card ---------- */
.card {
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* ---------- Health dots / status pills ---------- */
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; }
.dot.online, .dot.ok { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.dot.warning, .dot.warn { background: var(--warn); box-shadow: 0 0 8px var(--warn); }
.dot.bad { background: var(--bad); box-shadow: 0 0 8px var(--bad); }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
}
.pill.online, .pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warning, .pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }

/* =====================================================================
   GUEST PAGE
   ===================================================================== */
.guest-hero {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 30px; align-items: center;
  padding: 38px 36px; margin-bottom: 26px;
  border-radius: 24px;
  background:
    radial-gradient(600px 300px at 90% 10%, var(--gold-glow), transparent 60%),
    linear-gradient(180deg, var(--panel-2), var(--bg-2));
  border: 1px solid var(--line);
}
.guest-hero h1 { font-size: clamp(26px, 4vw, 38px); margin-bottom: 12px; }
.guest-hero p.lead { color: var(--muted); font-size: 15.5px; max-width: 48ch; }
.guest-quick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.guest-quick button {
  display: flex; align-items: center; gap: 11px;
  padding: 14px 16px; border-radius: 14px; text-align: start;
  background: var(--panel); border: 1px solid var(--line); color: var(--ink);
  font-size: 14px; font-weight: 500; transition: .18s;
}
.guest-quick button svg { width: 20px; height: 20px; color: var(--gold); flex: none; }
.guest-quick button:hover { border-color: var(--gold); transform: translateY(-2px); background: var(--panel-2); }

.guest-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 22px; }

.guest-chat { display: flex; flex-direction: column; overflow: hidden; min-height: 460px; }
.guest-chat-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.guest-chat-head .orb {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: radial-gradient(circle at 35% 30%, var(--gold-soft), var(--gold-deep));
  color: #1a1306; box-shadow: 0 0 18px var(--gold-glow);
}
.guest-chat-head .orb svg { width: 21px; height: 21px; }
.guest-chat-head b { font-size: 15px; display: block; }
.guest-chat-head span { font-size: 12px; color: var(--dim); }
.guest-chat-head .pill { margin-inline-start: auto; }
.guest-chat-body { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.g-msg { max-width: 80%; }
.g-msg .who { font-size: 11px; color: var(--dim); margin-bottom: 5px; display: block; }
.g-msg p { padding: 11px 15px; border-radius: 15px; font-size: 14px; }
.g-msg.bot { align-self: flex-start; }
.g-msg.bot p { background: var(--raised); border: 1px solid var(--line); border-end-start-radius: 5px; }
.g-msg.user { align-self: flex-end; text-align: start; }
.g-msg.user p { background: linear-gradient(145deg, var(--gold-soft), var(--gold)); color: #1a1306; border-end-end-radius: 5px; }
.guest-chat-foot { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--line); }
.guest-chat-foot input {
  flex: 1; min-width: 0; padding: 12px 15px; border-radius: 12px; font: inherit; font-size: 16px;
  background: var(--bg); border: 1px solid var(--line-2); color: var(--ink); outline: none;
}
.guest-chat-foot input:focus { border-color: var(--gold); }
.guest-chat-foot button {
  width: 46px; border: 0; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--gold-soft), var(--gold)); color: #1a1306;
}
.guest-chat-foot button svg { width: 20px; height: 20px; }

.guest-info { display: flex; flex-direction: column; gap: 14px; }
.guest-info article {
  display: flex; gap: 14px; align-items: flex-start; padding: 18px;
}
.guest-info article svg { width: 22px; height: 22px; color: var(--gold); flex: none; margin-top: 2px; }
.guest-info article b { display: block; font-size: 14.5px; margin-bottom: 3px; }
.guest-info article span { font-size: 13px; color: var(--muted); }

/* =====================================================================
   STAFF PAGE
   ===================================================================== */
.section-head { margin-bottom: 22px; }
.section-head h1 { font-size: clamp(22px, 3vw, 30px); margin-bottom: 8px; }
.section-head p:not(.eyebrow) { color: var(--muted); font-size: 14.5px; max-width: 60ch; }

.staff-top { display: flex; gap: 24px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 24px; }
.staff-stats { display: flex; gap: 12px; }
.staff-stats article { padding: 14px 20px; text-align: center; min-width: 96px; }
.staff-stats article span { font-size: 12px; color: var(--dim); display: block; }
.staff-stats article strong { font-size: 26px; color: var(--gold-soft); }

.staff-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 16px; }
.staff-card { display: flex; flex-direction: column; gap: 14px; padding: 20px; position: relative; }
.staff-card::before {
  content: ""; position: absolute; inset-block: 18px; inset-inline-start: 0; width: 3px;
  border-radius: 3px; background: var(--gold);
}
.staff-card.فوری::before { background: var(--bad); }
.staff-card.فروش::before { background: var(--gold-soft); }
.staff-card-top { display: flex; align-items: center; gap: 13px; }
.staff-card-top .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: var(--raised); color: var(--gold); }
.staff-card-top .ic svg { width: 21px; height: 21px; }
.staff-card-top b { font-size: 15px; display: block; }
.staff-card-top span { font-size: 12px; color: var(--dim); }
.staff-card p.desc { font-size: 13px; color: var(--muted); }
.staff-card-actions { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.staff-card-actions .pill { margin-inline-end: auto; }
.staff-card-actions button {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 10px;
  font-size: 12.5px; font-weight: 600; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink);
}
.staff-card-actions button svg { width: 15px; height: 15px; }
.staff-card-actions button:hover { border-color: var(--gold); color: var(--gold-soft); }
.staff-card-actions button.go { background: linear-gradient(145deg, var(--gold-soft), var(--gold)); color: #1a1306; border-color: transparent; }

/* =====================================================================
   MANAGER DASHBOARD
   ===================================================================== */
.mgr-hero {
  display: grid; grid-template-columns: 1fr auto; gap: 26px; align-items: center;
  padding: 30px 32px; margin-bottom: 22px; border-radius: 22px;
  background:
    radial-gradient(500px 260px at 88% 0%, var(--gold-glow), transparent 62%),
    linear-gradient(180deg, var(--panel-2), var(--bg-2));
  border: 1px solid var(--line);
}
.mgr-hero h1 { font-size: clamp(24px, 3.4vw, 34px); margin-bottom: 8px; }
.mgr-hero p:not(.eyebrow) { color: var(--muted); font-size: 14.5px; max-width: 54ch; }
.mgr-hero .eyebrow .dot { margin-inline-end: 6px; }
.mgr-hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* Live snapshot card */
.mgr-snapshot {
  min-width: 270px; padding: 18px; border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(0,0,0,.12));
  border: 1px solid var(--line-2);
  display: flex; flex-direction: column; gap: 14px;
}
.snap-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13.5px; }
.snap-head svg { width: 17px; height: 17px; color: var(--gold-soft); }
.snap-head .pill { margin-inline-start: auto; }
.snap-ring {
  --p: 76; width: 132px; height: 132px; border-radius: 50%; margin: 2px auto;
  background: conic-gradient(var(--gold) calc(var(--p) * 1%), rgba(255,255,255,.08) 0);
  display: grid; place-items: center;
}
.snap-ring-in {
  width: 102px; height: 102px; border-radius: 50%; background: var(--bg-2);
  display: grid; place-items: center; text-align: center; border: 1px solid var(--line);
}
.snap-ring-in strong { font-size: 26px; color: var(--gold-soft); }
.snap-ring-in span { font-size: 12px; color: var(--dim); }
.snap-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.snap-stats div {
  display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center;
  padding: 10px 6px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid var(--line);
}
.snap-stats svg { width: 16px; height: 16px; color: var(--gold-soft); }
.snap-stats b { font-size: 15px; }
.snap-stats span { font-size: 10.5px; color: var(--dim); }
.snap-note {
  display: flex; align-items: flex-start; gap: 7px; font-size: 12px; color: var(--muted);
  line-height: 1.7; padding: 10px 12px; border-radius: 12px;
  background: rgba(212,160,70,.07); border: 1px solid rgba(212,160,70,.18);
}
.snap-note svg { width: 15px; height: 15px; color: var(--gold-soft); flex: none; margin-top: 1px; }

/* KPI row */
.kpi-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi {
  padding: 18px; position: relative; overflow: hidden;
}
.kpi svg { width: 22px; height: 22px; color: var(--gold); }
.kpi .t { font-size: 12.5px; color: var(--muted); margin: 10px 0 4px; }
.kpi strong { font-size: 28px; line-height: 1; display: block; }
.kpi em { font-size: 11.5px; color: var(--dim); font-style: normal; display: block; margin-top: 7px; }

/* health strip */
.health-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.health-strip .hc {
  display: inline-flex; align-items: center; gap: 9px; padding: 9px 14px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--line); font-size: 13px;
}
.health-strip .hc svg { width: 16px; height: 16px; color: var(--muted); }
.health-strip .hc strong { font-weight: 600; }
.health-strip .hc em { font-style: normal; color: var(--dim); font-size: 12px; }

/* dashboard grid */
.mgr-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mgr-grid .rail { padding: 20px; display: flex; flex-direction: column; gap: 13px; }
.rail-head { display: flex; align-items: center; gap: 9px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.rail-head svg { width: 18px; height: 18px; color: var(--gold); }
.rail-head span { font-size: 14px; font-weight: 600; }
.rail-head .pill { margin-inline-start: auto; }

.signal { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.signal:last-child { border-bottom: 0; }
.signal > svg { width: 19px; height: 19px; color: var(--muted); flex: none; }
.signal b { font-size: 13.5px; display: block; }
.signal span { font-size: 12px; color: var(--dim); }
.signal.urgent > svg { color: var(--bad); }
.signal .score { margin-inline-start: auto; font-size: 15px; font-weight: 700; color: var(--gold-soft); }
.signal .trend { font-size: 11px; color: var(--dim); }

.alert-card { display: flex; align-items: center; gap: 13px; padding: 13px; border-radius: 13px; background: var(--panel-2); border: 1px solid var(--line); }
.alert-card svg { width: 20px; height: 20px; color: var(--gold); flex: none; }
.alert-card strong { font-size: 20px; color: var(--gold-soft); }
.alert-card span { font-size: 12.5px; color: var(--muted); }

.flow-link { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 13px; background: var(--panel-2); border: 1px solid var(--line); transition: .18s; }
.flow-link:hover { border-color: var(--gold); transform: translateX(-3px); }
.flow-link > svg { width: 19px; height: 19px; color: var(--gold); flex: none; }
.flow-link b { font-size: 13.5px; display: block; }
.flow-link span { font-size: 12px; color: var(--dim); }
.flow-link .dot { margin-inline-start: auto; }

/* integrations footer */
.integrations { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.integrations span { display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.integrations span svg { width: 15px; height: 15px; }

.span-2 { grid-column: span 2; }

/* =====================================================================
   BROCHURE
   ===================================================================== */
.brochure-hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 26px; align-items: center;
  padding: 34px; margin-bottom: 24px; border-radius: 22px;
  background: linear-gradient(180deg, var(--panel-2), var(--bg-2)); border: 1px solid var(--line); }
.brochure-hero h1 { font-size: clamp(26px, 4vw, 38px); margin-bottom: 12px; }
.brochure-hero p:not(.eyebrow) { color: var(--muted); font-size: 15px; }
.brochure-high { padding: 22px; text-align: center; }
.brochure-high svg { width: 34px; height: 34px; color: var(--gold); }
.brochure-high strong { display: block; font-size: 16px; margin: 12px 0 6px; }
.brochure-high span { font-size: 13px; color: var(--muted); }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; margin-bottom: 24px; }
.feature-card { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.feature-card .fic { width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center;
  background: var(--raised); color: var(--gold); }
.feature-card .fic svg { width: 24px; height: 24px; }
.feature-card h3 { font-size: 16px; margin-bottom: 6px; }
.feature-card > div > p { font-size: 13.5px; color: var(--muted); }
.feature-block { padding: 13px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); }
.feature-block span { font-size: 11px; color: var(--gold); font-weight: 600; letter-spacing: .04em; }
.feature-block p { font-size: 12.5px; color: var(--muted); margin-top: 5px; }

.flow-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.flow-steps article { padding: 22px; text-align: center; position: relative; }
.flow-steps article svg { width: 28px; height: 28px; color: var(--gold); }
.flow-steps article strong { display: block; font-size: 14.5px; margin: 12px 0 5px; }
.flow-steps article span { font-size: 12.5px; color: var(--dim); }

/* =====================================================================
   DETAIL (agents / operations table)
   ===================================================================== */
.detail-stats { display: flex; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.detail-stats article { padding: 16px 22px; text-align: center; min-width: 130px; }
.detail-stats span { font-size: 12px; color: var(--dim); display: block; }
.detail-stats strong { font-size: 26px; color: var(--gold-soft); }
.detail-table { width: 100%; border-collapse: collapse; overflow: hidden; border-radius: var(--radius); }
.detail-table th { text-align: start; font-size: 12px; color: var(--dim); font-weight: 600; padding: 14px 18px; background: var(--panel-2); }
.detail-table td { padding: 15px 18px; font-size: 13.5px; border-top: 1px solid var(--line); color: var(--muted); }
.detail-table td:first-child { color: var(--ink); font-weight: 600; }
.detail-table tr:hover td { background: rgba(255,255,255,0.02); }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1000px) {
  .kpi-row { grid-template-columns: repeat(3, 1fr); }
  .mgr-grid { grid-template-columns: repeat(2, 1fr); }
  .span-2 { grid-column: span 2; }
  .guest-hero, .guest-grid, .mgr-hero, .brochure-hero { grid-template-columns: 1fr; }
  .flow-steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .h-shell { padding: 0 14px 44px; }
  .h-topbar { padding: 12px 14px; gap: 12px; flex-wrap: wrap; }
  .h-chip { display: none; }
  .h-nav { width: 100%; order: 3; margin: 0; flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding-bottom: 2px; scrollbar-width: none; }
  .h-nav::-webkit-scrollbar { display: none; }
  .h-nav a { padding: 7px 11px; font-size: 12.5px; white-space: nowrap; flex: none; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .mgr-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
  .guest-quick { grid-template-columns: 1fr; }
  .flow-steps { grid-template-columns: 1fr; }
  .guest-hero, .mgr-hero, .brochure-hero { padding: 24px 18px; }
}
