/* ╔══════════════════════════════════════════════════════════════════════╗
   ║  360 Hotel Group — Hospitality Skin                                  ║
   ║  Overrides Armorock defaults. Gold + Navy. Fraunces display.         ║
   ║  No glassmorphism. Micro-motion with reduced-motion support.         ║
   ╚══════════════════════════════════════════════════════════════════════╝ */

/* ── App shell body ──────────────────────────────────────────────────────── */
body.app-shell, body.login-body {
  font-family: var(--sans);
  background-image: var(--paper-texture);
  background-color: var(--paper);
  background-size: 18px 18px, 100% 100%;
}
body.login-body {
  background: var(--login-bg);
  background-size: 18px 18px, auto;
}

/* ── Fraunces display font ───────────────────────────────────────────────── */
.page-title, .funnel-v, .housing-kpi-val, .kpi-val, .job-title, .job-stat-v,
.login-org, .login-btn, .rail-name, .num, h1, h2,
.portfolio-prop-name, .spine-flow-label, .aup-rung-title,
.fnb-name, .connector-node-label {
  font-family: var(--display);
}

.login-product, .page-eyebrow, .rail-sub, .rail-group, .k, .funnel-k,
code, pre, .badge {
  font-family: var(--mono);
}

/* ── Login card ──────────────────────────────────────────────────────────── */
.login-btn {
  background: var(--orange);
  color: var(--paper);
  border-radius: var(--radius);
}
.login-btn:hover { background: var(--orange-dim); }
.login-card { border-radius: var(--radius-lg); }
.login-input { background: var(--surface); border-radius: var(--radius); }
.mark-fallback {
  background: var(--orange);
  color: var(--paper);
  font-family: var(--display);
}

/* ── Rail active state: gold on navy, not navy-on-navy ───────────────────── */
html[data-skin="hospitality"] .rail-link.on {
  background: rgba(196, 163, 90, 0.14);
  box-shadow: inset 3px 0 0 var(--orange);
  color: var(--rail-ink);
}

/* ── KPI tile top rule ───────────────────────────────────────────────────── */
html[data-skin="hospitality"] .kpi-tile {
  border-top: 3px solid var(--orange);
}

/* ── Page title weight ───────────────────────────────────────────────────── */
html[data-skin="hospitality"] .page-title {
  font-weight: 600;
  letter-spacing: -0.03em;
}

/* ── Login card accent line ──────────────────────────────────────────────── */
html[data-skin="hospitality"] .login-card {
  box-shadow: 0 2px 0 var(--orange), 0 28px 60px rgba(14, 42, 71, 0.35);
}

/* ── Nav stripe override (non-app-shell pages) ───────────────────────────── */
html[data-skin="hospitality"] .nav {
  box-shadow: inset 0 3px 0 var(--orange);
  background: rgba(248, 246, 241, 0.97);
  backdrop-filter: none;               /* no glassmorphism */
  -webkit-backdrop-filter: none;
}

/* ── Strip (app-shell header) ────────────────────────────────────────────── */
html[data-skin="hospitality"] .strip {
  background: var(--strip-bg);
  border-bottom: 1px solid var(--border);
}

/* ── Deck / special iframes ──────────────────────────────────────────────── */
.special-frame-wrap { background: var(--rail-bg); }
iframe.deck, iframe.special-frame {
  width: 100%;
  height: calc(100vh - 48px);
  min-height: 640px;
  border: 0;
  display: block;
  background: var(--paper);
}

/* ══════════════════════════════════════════════════════════════════════════
   FOCUS STATES — strong, visible, accessible
   ══════════════════════════════════════════════════════════════════════════ */
:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
  border-radius: var(--radius);
}
.rail-link:focus-visible,
.ask-chip:focus-visible,
.ask-go:focus-visible,
.strip-ask:focus-visible {
  outline-color: var(--orange);
  outline-offset: 1px;
}

/* ══════════════════════════════════════════════════════════════════════════
   MICRO-MOTION — purposeful, reduced-motion safe
   ══════════════════════════════════════════════════════════════════════════ */

/* Card entrance */
@keyframes h-fade-up {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Spine pulse on "unwired" nodes */
@keyframes h-pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(196, 163, 90, 0.30); }
  70%  { box-shadow: 0 0 0 6px rgba(196, 163, 90, 0); }
  100% { box-shadow: 0 0 0 0 rgba(196, 163, 90, 0); }
}

/* Job bar fill grow */
@keyframes h-bar-grow {
  from { transform: scaleX(0); transform-origin: left; }
  to   { transform: scaleX(1); }
}

/* Apply entrance animations with staggered delay */
.kpi-tile {
  animation: h-fade-up 0.28s ease both;
}
.kpi-grid .kpi-tile:nth-child(2) { animation-delay: 0.04s; }
.kpi-grid .kpi-tile:nth-child(3) { animation-delay: 0.08s; }
.kpi-grid .kpi-tile:nth-child(4) { animation-delay: 0.12s; }
.kpi-grid .kpi-tile:nth-child(5) { animation-delay: 0.16s; }
.kpi-grid .kpi-tile:nth-child(6) { animation-delay: 0.20s; }

.job { animation: h-fade-up 0.3s ease both; }
.job:nth-child(2) { animation-delay: 0.06s; }
.job:nth-child(3) { animation-delay: 0.12s; }

.portfolio-prop { animation: h-fade-up 0.32s ease both; }
.portfolio-prop:nth-child(2) { animation-delay: 0.07s; }
.portfolio-prop:nth-child(3) { animation-delay: 0.14s; }

.side-card { animation: h-fade-up 0.3s ease both; }

.job-bar span {
  animation: h-bar-grow 0.6s 0.4s ease both;
}

/* Spine unwired node ring */
.spine-flow-node.unwired {
  animation: h-pulse-ring 2.4s ease infinite;
}

/* Honor prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .kpi-tile, .job, .portfolio-prop, .side-card,
  .spine-flow-node.unwired {
    animation: none !important;
  }
  .job-bar span {
    animation: none !important;
    transform: scaleX(1);
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   PORTFOLIO FEDERATION STRIP — 3-property branded view
   ══════════════════════════════════════════════════════════════════════════ */
.portfolio-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0 0 20px;
}
.portfolio-prop {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--orange);
  border-radius: var(--radius-lg);
  padding: 16px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.portfolio-prop:hover {
  border-color: color-mix(in srgb, var(--orange) 50%, var(--border));
  box-shadow: 0 4px 16px rgba(14, 42, 71, 0.07);
}
.portfolio-prop-flag {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
  font-weight: 600;
  margin-bottom: 4px;
}
.portfolio-prop-name {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
  letter-spacing: -0.01em;
}
.portfolio-prop-system {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 6px;
}
.portfolio-prop-occ {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface2);
  border: 1px solid var(--border2);
  padding: 2px 7px;
  border-radius: 2px;
  margin-top: 8px;
  width: fit-content;
}
.portfolio-prop-note {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 4px;
  line-height: 1.3;
}

/* ══════════════════════════════════════════════════════════════════════════
   PMS ↔ PAYROLL ↔ IDENTITY BLOCKING SPINE
   ══════════════════════════════════════════════════════════════════════════ */
.spine-flow {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 18px 0 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  position: relative;
}
.spine-flow::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--orange) 0%, rgba(196,163,90,0.3) 100%);
}
.spine-flow-node {
  flex: 1;
  padding: 16px 18px 14px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}
.spine-flow-node:last-child {
  border-right: 0;
}
.spine-flow-status {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}
.spine-flow-status.unwired { color: #C9A227; }
.spine-flow-status.required { color: var(--orange); }
.spine-flow-label {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.1;
}
.spine-flow-note {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.35;
  margin-top: 2px;
}
.spine-flow-connector {
  display: flex;
  align-items: center;
  padding: 0 2px;
  color: var(--text-muted);
  font-size: 14px;
  flex-shrink: 0;
  align-self: center;
}
.spine-flow-blocker {
  background: rgba(201, 162, 39, 0.08);
  border: 1px solid rgba(201, 162, 39, 0.25);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 12px;
  color: #7A600A;
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.spine-flow-blocker-icon { font-size: 14px; flex-shrink: 0; }

/* ══════════════════════════════════════════════════════════════════════════
   AUP ENFORCEMENT LADDER
   ══════════════════════════════════════════════════════════════════════════ */
.aup-ladder {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0 20px;
}
.aup-rung {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  transition: border-color 0.18s;
}
.aup-rung:hover { border-color: var(--border2); }
.aup-rung.rung-block {
  border-left: 3px solid var(--orange);
}
.aup-rung.rung-gate {
  border-left: 3px solid #8B2942;
  background: rgba(139, 41, 66, 0.03);
}
.aup-rung-step {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--orange);
  letter-spacing: 0.08em;
  flex-shrink: 0;
  padding-top: 2px;
  min-width: 28px;
}
.aup-rung-body { flex: 1; }
.aup-rung-title {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}
.aup-rung-note {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 3px;
  line-height: 1.35;
}
.aup-rung-status {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 2px;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 1px;
}
.aup-rung-status.rung-control { background: rgba(196,163,90,0.12); color: #7A6025; border: 1px solid rgba(196,163,90,0.3); }
.aup-rung-status.rung-gap     { background: rgba(92,107,94,0.10); color: #5C6B5E; border: 1px solid rgba(92,107,94,0.25); }
.aup-rung-status.rung-blocked { background: rgba(139,41,66,0.10); color: #8B2942; border: 1px solid rgba(139,41,66,0.25); }
.aup-rung-status.rung-veto    { background: rgba(139,41,66,0.12); color: #8B2942; border: 1px solid rgba(139,41,66,0.35); }

/* ══════════════════════════════════════════════════════════════════════════
   F&B ATTACHMENT VIEW
   ══════════════════════════════════════════════════════════════════════════ */
.fnb-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.fnb-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--orange);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  transition: box-shadow 0.18s;
}
.fnb-card:hover {
  box-shadow: 0 3px 12px rgba(14, 42, 71, 0.06);
}
.fnb-eyebrow {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 4px;
}
.fnb-name {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 6px;
}
.fnb-property {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.fnb-covers {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--surface2);
  border: 1px solid var(--border2);
  padding: 2px 7px;
  border-radius: 2px;
  color: var(--text-muted);
}
.fnb-note {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 6px;
}

/* ══════════════════════════════════════════════════════════════════════════
   DASHBOARD SECTION LABELS
   ══════════════════════════════════════════════════════════════════════════ */
.dash-section-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 22px 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dash-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Two-panel bottom row for AUP ladder + F&B */
.dash-bottom-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 24px;
}
.dash-bottom-card {
  background: var(--job-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
}
.dash-bottom-card h3 {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

/* ══════════════════════════════════════════════════════════════════════════
   TELEMETRY — Hospitality connector status (replaces CAST/CURE plant nodes)
   ══════════════════════════════════════════════════════════════════════════ */
.conn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.conn-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.conn-card.conn-unwired { border-left: 3px solid rgba(201, 162, 39, 0.6); }
.conn-card.conn-required { border-left: 3px solid rgba(196, 163, 90, 0.5); }
.conn-eyebrow {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.conn-label {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.conn-status-pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
  width: fit-content;
  margin-top: 2px;
}
.conn-status-pill.pill-unwired {
  background: rgba(201, 162, 39, 0.10);
  color: #7A600A;
  border: 1px solid rgba(201, 162, 39, 0.28);
}
.conn-status-pill.pill-required {
  background: rgba(196, 163, 90, 0.10);
  color: #7A6025;
  border: 1px solid rgba(196, 163, 90, 0.28);
}
.conn-note {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}
.conn-empty-state {
  background: var(--surface);
  border: 1px dashed var(--border2);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.conn-empty-icon {
  font-size: 28px;
  margin-bottom: 12px;
  opacity: 0.5;
}
.conn-empty-title {
  font-family: var(--display);
  font-size: 16px;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.conn-empty-note {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Connector sequence spine in telemetry */
.conn-sequence {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-family: var(--mono);
  font-size: 11px;
}
.conn-seq-node {
  padding: 4px 10px;
  border: 1px solid var(--border2);
  border-radius: 2px;
  color: var(--text-dim);
}
.conn-seq-node.seq-unwired {
  border-color: rgba(201, 162, 39, 0.4);
  color: #7A600A;
  background: rgba(201, 162, 39, 0.06);
}
.conn-seq-arrow {
  color: var(--text-muted);
  font-size: 12px;
  flex-shrink: 0;
}
.conn-seq-block {
  color: #8B2942;
  font-size: 10px;
  padding: 4px 8px;
  border: 1px solid rgba(139, 41, 66, 0.25);
  border-radius: 2px;
  background: rgba(139, 41, 66, 0.06);
}

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE — portfolio and F&B panels
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .portfolio-strip {
    grid-template-columns: 1fr;
  }
  .dash-bottom-row {
    grid-template-columns: 1fr;
  }
  .fnb-strip {
    grid-template-columns: 1fr;
  }
  .spine-flow {
    flex-direction: column;
  }
  .spine-flow-node {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .spine-flow-node:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 640px) {
  .conn-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Seat polish pass: shared interaction language ───────────────────────── */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
.rail { box-shadow: 10px 0 30px rgba(0,0,0,.06); }
.rail-brand { min-height: 72px; }
.rail-logo { max-height: 40px; }
.rail-link { transition: background .16s ease, color .16s ease, opacity .16s ease, transform .16s ease; }
.rail-link:hover { transform: translateX(2px); }
.strip { box-shadow: 0 2px 12px rgba(0,0,0,.04); }
.main { scrollbar-gutter: stable; }
.page-header { max-width: 900px; }
.page-title { text-wrap: balance; }
.page-sub { max-width: 72ch; }
.kpi-tile, .kpi-card, .section-card, .job, .side-card, .agent-card, .chain-card,
.feat-card, .policy-item, .housing-kpi, .wf-kpi, .conn-card, .calaim-code-card,
.spine-flow, .aup-rung, .fnb-card, .portfolio-prop, .special-frame-wrap {
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.kpi-tile:hover, .kpi-card:hover, .section-card:hover, .side-card:hover, .agent-card:hover,
.chain-card:hover, .feat-card:hover, .policy-item:hover, .housing-kpi:hover, .wf-kpi:hover,
.conn-card:hover, .calaim-code-card:hover, .aup-rung:hover, .fnb-card:hover, .portfolio-prop:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--orange) 48%, var(--border));
  box-shadow: 0 12px 28px color-mix(in srgb, var(--text) 9%, transparent);
}
.btn, .act, .ask-go, .strip-ask, .chat-send { transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease; }
.btn:hover, .act:hover, .ask-go:hover, .strip-ask:hover, .chat-send:hover:not(:disabled) { transform: translateY(-1px); }
.rail-logo, .login-logo { object-position: center; }
.login-card { animation: seat-card-in .35s ease both; }
@keyframes seat-card-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .kpi-tile, .kpi-card, .section-card, .job, .side-card, .agent-card, .chain-card,
  .feat-card, .policy-item, .housing-kpi, .wf-kpi, .conn-card, .calaim-code-card,
  .aup-rung, .fnb-card, .portfolio-prop, .btn, .act, .ask-go, .strip-ask, .chat-send {
    transition: none !important; transform: none !important;
  }
}

/* Demo-ready brand cleanup: logo-only login, calm navy field. */
body.login-body { background: #0E2A47; background-image: radial-gradient(rgba(196,163,90,.10) 1px, transparent 1px); background-size: 28px 28px; }
.login-brand-logo-only { justify-content: center; margin-bottom: 30px; }
.login-brand-logo-only .login-logo { height: auto; max-height: 84px; max-width: min(300px, 72vw); object-fit: contain; }
.login-card { background: #F8F6F1; border-color: rgba(196,163,90,.55); }

/* Demo-ready rail cleanup: logo only, no duplicate generated product type. */
.rail-brand { justify-content:center; min-height:78px; padding:16px 14px; }
.rail-brand > span:not(.mark-fallback) { display:none !important; }
.rail-logo { max-width:148px; max-height:52px; width:auto; height:auto; object-fit:contain; background:transparent; padding:0; border-radius:0; }
.mark-fallback { width:42px; height:42px; border-radius:12px; display:grid; place-items:center; }
