@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --deep: #3b1f2b;
  --deep-dark: #2a141e;
  --rose: #8e4b55;
  --rose-2: #b76e79;
  --rose-light: #e8c4c0;
  --blush: #f7e7e4;
  --bg: #fbf5f3;
  --panel: #fffdfc;
  --line: #e6d3d0;
  --line-soft: #f1e4e1;
  --gold: #f3be4a;
  --gold-soft: #fdf3da;
  --coral: #de4e4d;
  --ink: #24171c;
  --muted: #75636a;
  --green: #2f6b4f;
  --green-soft: #e8f2ec;
  --amber: #a86b1f;
  --amber-soft: #fbf0dd;
  --red: #a3323f;
  --red-soft: #f9e8e9;
  --serif: "Playfair Display", Didot, "Bodoni 72", "Bodoni MT", Georgia, serif;
  --sans: "Inter", "Helvetica Neue", Arial, sans-serif;
  --shadow: 0 1px 2px rgba(59, 31, 43, .05), 0 8px 24px -18px rgba(59, 31, 43, .25);
  --radius: 6px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--rose); text-decoration: none; }
a:hover { color: var(--deep); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--deep); margin: 0; font-weight: 600; }
h1 { font-size: 30px; line-height: 1.2; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
p { margin: 0 0 12px; }
.icon { width: 18px; height: 18px; flex: none; vertical-align: middle; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.tiny { font-size: 10.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.mono { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; }
.hr { height: 1px; background: var(--line-soft); margin: 18px 0; border: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap-gap { flex-wrap: wrap; }
.stack-8 > * + * { margin-top: 8px; }
.stack-16 > * + * { margin-top: 16px; }
.hidden { display: none !important; }

/* ---------------------------------------------------------------- shell */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 252px;
  flex: none;
  background: var(--deep-dark);
  color: #f4e4e1;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 18px 14px 16px;
  display: flex;
  flex-direction: column;
  z-index: 40;
}
.sidebar::-webkit-scrollbar { width: 5px; }
.sidebar::-webkit-scrollbar-thumb { background: #5a3541; border-radius: 3px; }
.brand-card {
  background: #fff;
  border-radius: 5px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 78px;
}
.brand-card img { max-height: 64px; width: auto; }
.brand-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 10px 2px 18px;
  font-size: 9.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(244, 228, 225, .55);
}
.brand-sub .pill { background: rgba(243, 190, 74, .16); color: var(--gold); padding: 2px 6px; border-radius: 3px; letter-spacing: .08em; }
.property-picker label {
  display: block;
  font-size: 9px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(244, 228, 225, .45);
  margin: 0 2px 6px;
}
.property-picker select {
  width: 100%;
  background: rgba(255, 255, 255, .06);
  color: #f4e4e1;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 4px;
  padding: 8px 9px;
  font-size: 12px;
  font-family: var(--sans);
}
.property-picker option { color: var(--ink); }
.side-nav { margin-top: 20px; flex: 1; }
.nav-label {
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(244, 228, 225, .38);
  margin: 18px 10px 7px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 4px;
  color: rgba(244, 228, 225, .78);
  font-size: 12.5px;
  font-weight: 500;
  margin-bottom: 1px;
  border-left: 2px solid transparent;
}
.nav-item .icon { width: 16px; height: 16px; opacity: .8; }
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(142, 75, 85, .85), rgba(142, 75, 85, .35));
  color: #fff;
  border-left-color: var(--gold);
}
.nav-item.active .icon { opacity: 1; color: var(--gold); }
.nav-badge {
  margin-left: auto;
  background: var(--gold);
  color: var(--deep-dark);
  font-size: 9.5px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  padding: 0 5px;
}
.sidebar-foot { border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 12px; margin-top: 16px; }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 4px 2px 8px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--rose); color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; letter-spacing: .02em; flex: none;
}
.avatar.gold { background: var(--gold); color: var(--deep-dark); }
.user-chip .name { font-size: 12px; font-weight: 600; color: #fff; line-height: 1.3; }
.user-chip .role { font-size: 10px; color: rgba(244, 228, 225, .5); text-transform: capitalize; }
.signout { display: flex; align-items: center; gap: 7px; font-size: 11px; color: rgba(244, 228, 225, .55); padding: 6px 2px; }
.signout:hover { color: var(--gold); }
.signout .icon { width: 14px; height: 14px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(251, 245, 243, .93);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 16px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.page-kicker { font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--rose); font-weight: 600; margin-bottom: 3px; }
.topbar h1 { font-size: 26px; }
.top-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.date-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: #fff; border: 1px solid var(--line); border-radius: 4px;
  padding: 8px 11px; font-size: 11.5px; color: var(--muted);
}
.date-chip .icon { width: 14px; height: 14px; color: var(--rose); }
.mobile-menu { display: none; }
.content { padding: 26px 30px 60px; width: 100%; max-width: 1600px; margin: 0 auto; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--deep); color: #fff; border: 1px solid var(--deep);
  border-radius: 4px; padding: 9px 14px; font-family: var(--sans);
  font-size: 12px; font-weight: 600; letter-spacing: .015em; cursor: pointer;
  line-height: 1.3; transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.btn:hover { background: var(--rose); border-color: var(--rose); color: #fff; }
.btn .icon { width: 15px; height: 15px; }
.btn-gold { background: var(--gold); color: var(--deep-dark); border-color: var(--gold); }
.btn-gold:hover { background: #e9b13a; border-color: #e9b13a; color: var(--deep-dark); }
.btn-outline { background: transparent; color: var(--deep); border-color: var(--line); }
.btn-outline:hover { background: var(--blush); border-color: var(--rose-light); color: var(--deep); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--rose); }
.btn-ghost:hover { background: var(--blush); color: var(--deep); }
.btn-danger { background: var(--red); border-color: var(--red); }
.btn-danger:hover { background: #8d2934; border-color: #8d2934; }
.btn-sm { padding: 5px 9px; font-size: 10.5px; border-radius: 3px; }
.btn-sm .icon { width: 12px; height: 12px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.icon-btn {
  width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--line); border-radius: 4px; color: var(--deep); cursor: pointer;
}
.icon-btn:hover { background: var(--blush); }

/* ---------------------------------------------------------------- cards */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-head { padding: 16px 18px 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card-head h2, .card-head h3 { font-size: 17px; }
.card-head p { font-size: 11.5px; color: var(--muted); margin: 3px 0 0; }
.card-body { padding: 16px 18px; }
.card-body.tight { padding: 12px 14px; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--line-soft); }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 26px 0 12px; }
.section-title h2 { font-size: 19px; }
.section-title .hint { font-size: 11.5px; color: var(--muted); }

/* ---------------------------------------------------------------- KPIs */
.kpi { padding: 17px 18px; position: relative; overflow: hidden; }
.kpi::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 2px; background: var(--line); }
.kpi.accent::before { background: var(--gold); }
.kpi.rose::before { background: var(--rose); }
.kpi.green::before { background: var(--green); }
.kpi-label { font-size: 9.5px; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.kpi-value { font-family: var(--serif); font-size: 30px; line-height: 1.15; color: var(--deep); margin: 5px 0 4px; }
.kpi-value small { font-family: var(--sans); font-size: 12px; color: var(--muted); font-weight: 500; }
.kpi-foot { font-size: 10.5px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.trend-up { color: var(--green); font-weight: 600; }
.trend-down { color: var(--red); font-weight: 600; }

/* ---------------------------------------------------------------- badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px; border-radius: 999px; font-size: 9.5px; font-weight: 700;
  letter-spacing: .055em; text-transform: uppercase; white-space: nowrap;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.no-dot::before { display: none; }
.badge-confirmed { background: var(--blush); color: var(--rose); }
.badge-checked_in { background: var(--green-soft); color: var(--green); }
.badge-checked_out { background: #f1efef; color: #6f6367; }
.badge-cancelled { background: var(--red-soft); color: var(--red); }
.badge-no_show { background: var(--amber-soft); color: var(--amber); }
.badge-pending { background: var(--gold-soft); color: #8a6414; }
.badge-success { background: var(--green-soft); color: var(--green); }
.badge-warning { background: var(--amber-soft); color: var(--amber); }
.badge-error { background: var(--red-soft); color: var(--red); }
.badge-info { background: #eaf0f5; color: #3d5a73; }
.source-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink); }
.source-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }

/* ---------------------------------------------------------------- forms */
label { display: block; font-size: 9.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 5px; }
input, select, textarea {
  width: 100%; font-family: var(--sans); font-size: 13px; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 4px;
  padding: 9px 10px; outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--rose-2); box-shadow: 0 0 0 3px rgba(183, 110, 121, .12); }
input::placeholder, textarea::placeholder { color: #b3a3a8; }
textarea { resize: vertical; min-height: 84px; }
select { appearance: none; background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2375636a' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; }
.field { margin-bottom: 13px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 12px; }
.form-grid .span-2, .form-grid-3 .span-2 { grid-column: span 2; }
.form-grid-3 .span-3 { grid-column: span 3; }
.input-group { position: relative; }
.input-group .icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted); }
.input-group input { padding-left: 32px; }
.check { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: var(--muted); text-transform: none; letter-spacing: 0; font-weight: 400; margin-bottom: 0; cursor: pointer; }
.check input { width: auto; margin-top: 2px; accent-color: var(--rose); }
.inline-form { display: inline; }
.filter-bar { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.filter-bar .field { margin-bottom: 0; min-width: 130px; }
.filter-bar .field.grow { flex: 1; min-width: 180px; }
.search-box { position: relative; min-width: 210px; }
.search-box .icon { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--muted); }
.search-box input { padding-left: 29px; }

/* ---------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.data th {
  text-align: left; font-size: 9px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); font-weight: 700; padding: 9px 12px; border-bottom: 1px solid var(--line);
  background: #fdf8f6; white-space: nowrap;
}
table.data td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr:hover td { background: #fdf9f7; }
table.data .guest { font-weight: 600; color: var(--deep); }
table.data .sub { font-size: 10.5px; color: var(--muted); }
.code { font-size: 11.5px; font-weight: 700; letter-spacing: .03em; color: var(--rose); }
.table-actions { display: flex; gap: 5px; justify-content: flex-end; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .icon { width: 34px; height: 34px; color: var(--rose-light); margin-bottom: 8px; }
.empty h3 { font-size: 17px; margin-bottom: 4px; }
.empty p { font-size: 12px; }

/* ---------------------------------------------------------------- flash */
.flash-wrap { position: fixed; top: 18px; right: 18px; z-index: 120; display: flex; flex-direction: column; gap: 8px; max-width: 380px; }
.flash {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--rose);
  border-radius: 4px; box-shadow: 0 10px 30px -12px rgba(59, 31, 43, .35);
  padding: 11px 34px 11px 13px; font-size: 12px; color: var(--ink); position: relative;
  animation: slidein .25s ease both;
}
.flash.success { border-left-color: var(--green); }
.flash.error { border-left-color: var(--red); }
.flash.info { border-left-color: var(--rose); }
.flash .close { position: absolute; right: 8px; top: 8px; background: none; border: 0; cursor: pointer; color: var(--muted); font-size: 16px; line-height: 1; }
@keyframes slidein { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- dashboard */
.dash-hero {
  background: linear-gradient(105deg, var(--deep-dark), var(--deep) 55%, var(--rose));
  color: #f7e7e4; border-radius: 6px; padding: 22px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  margin-bottom: 18px; position: relative; overflow: hidden;
}
.dash-hero::after {
  content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px;
  border: 1px solid rgba(243, 190, 74, .25); border-radius: 50%;
}
.dash-hero h2 { color: #fff; font-size: 25px; margin-bottom: 3px; }
.dash-hero p { color: rgba(247, 231, 228, .7); font-size: 12px; margin: 0; max-width: 560px; }
.dash-hero .hero-actions { display: flex; gap: 8px; flex-wrap: wrap; position: relative; z-index: 1; }
.dash-hero .btn-gold { background: var(--gold); color: var(--deep-dark); border-color: var(--gold); }
.dash-hero .btn-outline { color: #fff; border-color: rgba(255, 255, 255, .3); }
.dash-hero .btn-outline:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.forecast { display: flex; align-items: flex-end; gap: 6px; height: 180px; padding-top: 12px; }
.forecast .bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 5px; min-width: 0; }
.forecast .bar-fill {
  width: 100%; max-width: 32px; border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, var(--rose-2), var(--rose));
  min-height: 3px; transition: height .3s; position: relative;
}
.forecast .bar.today .bar-fill { background: linear-gradient(180deg, var(--gold), #dca62e); }
.forecast .bar:hover .bar-fill { filter: brightness(1.08); }
.forecast .bar-label { font-size: 9px; color: var(--muted); white-space: nowrap; }
.forecast .bar-val { font-size: 8.5px; color: var(--rose); font-weight: 700; }
.donut-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.donut {
  width: 138px; height: 138px; border-radius: 50%; position: relative; flex: none;
  display: flex; align-items: center; justify-content: center;
}
.donut::before { content: ""; position: absolute; inset: 17px; background: var(--panel); border-radius: 50%; }
.donut .donut-center { position: relative; text-align: center; z-index: 1; }
.donut .donut-center strong { display: block; font-family: var(--serif); font-size: 19px; color: var(--deep); line-height: 1.1; }
.donut .donut-center span { font-size: 9px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.legend { flex: 1; min-width: 160px; display: flex; flex-direction: column; gap: 7px; }
.legend-row { display: flex; align-items: center; gap: 7px; font-size: 11px; }
.legend-row .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.legend-row .name { flex: 1; color: var(--muted); }
.legend-row .val { font-weight: 600; color: var(--deep); }
.arrival-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.arrival-row:last-child { border-bottom: 0; }
.arrival-row .avatar { width: 30px; height: 30px; font-size: 10px; }
.arrival-row .who { flex: 1; min-width: 0; }
.arrival-row .who strong { display: block; font-size: 11.5px; color: var(--deep); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arrival-row .who span { display: block; font-size: 10px; color: var(--muted); }
.arrival-row .room { font-size: 10.5px; color: var(--rose); font-weight: 600; }
.quick-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.quick-link {
  border: 1px solid var(--line); border-radius: 4px; padding: 10px; display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: var(--deep); background: #fff; font-weight: 500;
}
.quick-link:hover { border-color: var(--rose-light); background: var(--blush); }
.quick-link .icon { color: var(--rose); width: 15px; height: 15px; }
.prop-strip { display: flex; align-items: center; gap: 14px; padding: 13px 16px; border-bottom: 1px solid var(--line-soft); }
.prop-strip:last-child { border-bottom: 0; }
.prop-strip img { width: 42px; height: 42px; border-radius: 4px; object-fit: cover; }
.prop-strip .name { flex: 1; font-weight: 600; font-size: 12px; color: var(--deep); }
.prop-strip .meta { font-size: 10px; color: var(--muted); }
.occ-mini { width: 110px; }
.occ-track { height: 5px; background: var(--blush); border-radius: 3px; overflow: hidden; margin-top: 4px; }
.occ-fill { height: 100%; background: var(--rose); border-radius: 3px; }
.occ-fill.high { background: var(--green); }
.occ-fill.low { background: var(--amber); }

/* ---------------------------------------------------------------- tape chart */
.tape-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.tape-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 5px; background: var(--panel); max-height: calc(100vh - 230px); }
table.tape { border-collapse: separate; border-spacing: 0; min-width: 100%; }
table.tape th, table.tape td { padding: 0; }
table.tape thead th {
  position: sticky; top: 0; z-index: 5; background: #fdf8f6; border-bottom: 1px solid var(--line);
  font-size: 9px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700;
  padding: 8px 4px; text-align: center; min-width: 76px;
}
table.tape thead th.weekend { background: #f7ebe8; color: var(--rose); }
table.tape thead th.room-col, table.tape tbody th {
  position: sticky; left: 0; z-index: 6; background: var(--panel); text-align: left;
  min-width: 210px; max-width: 210px; padding: 9px 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line-soft);
}
table.tape thead th.room-col { z-index: 8; background: #fdf8f6; }
table.tape tbody th .rt-name { font-size: 11.5px; font-weight: 600; color: var(--deep); line-height: 1.25; }
table.tape tbody th .rt-meta { font-size: 9.5px; color: var(--muted); margin-top: 2px; display: flex; align-items: center; gap: 6px; }
table.tape tbody th .rt-meta a { font-size: 9px; }
.tape-cell {
  width: 100%; min-height: 55px; height: 55px; border: 0; border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft); background: #fff; cursor: pointer; text-align: left;
  padding: 5px 6px; font-family: var(--sans); display: flex; flex-direction: column; justify-content: center; gap: 1px;
  transition: box-shadow .12s;
}
.tape-cell:hover { box-shadow: inset 0 0 0 2px var(--rose-2); position: relative; z-index: 2; }
.tape-cell .av { font-size: 11px; font-weight: 700; color: var(--green); line-height: 1.2; }
.tape-cell .rate { font-size: 9.5px; color: var(--muted); }
.tape-cell.low .av { color: var(--amber); }
.tape-cell.low { background: #fdf8ee; }
.tape-cell.out .av { color: var(--red); }
.tape-cell.out { background: #fdf0f1; }
.tape-cell.stop { background: var(--deep-dark); }
.tape-cell.stop .av, .tape-cell.stop .rate { color: #f3d9d4; }
.tape-cell.blocked { background: #f4eeee; }
.tape-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 10px; color: var(--muted); margin-top: 10px; }
.tape-legend span { display: inline-flex; align-items: center; gap: 5px; }
.tape-legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.tape-group-title td {
  background: var(--blush); font-size: 10px; text-transform: uppercase; letter-spacing: .12em;
  font-weight: 700; color: var(--rose); padding: 6px 12px; border-bottom: 1px solid var(--line);
}

/* ---------------------------------------------------------------- modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(42, 20, 30, .55); backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--panel); border-radius: 8px; width: 500px; max-width: 96vw; max-height: 90vh;
  overflow-y: auto; box-shadow: 0 24px 70px -20px rgba(0, 0, 0, .5); animation: modalin .18s ease both;
}
@keyframes modalin { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
.modal-head { padding: 18px 20px 12px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.modal-head h3 { font-size: 19px; }
.modal-head p { font-size: 11px; color: var(--muted); margin: 3px 0 0; }
.modal-body { padding: 16px 20px; }
.modal-foot { padding: 12px 20px 18px; display: flex; justify-content: flex-end; gap: 8px; }
.modal-close { background: none; border: 0; font-size: 20px; color: var(--muted); cursor: pointer; line-height: 1; padding: 2px 4px; }

/* ---------------------------------------------------------------- login */
.login-shell { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 100vh; }
.login-visual {
  position: relative; background: var(--deep-dark); color: #f7e7e4; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; padding: 38px 44px;
}
.login-visual::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(42, 20, 30, .35), rgba(42, 20, 30, .9)), url('../img/lsrpd-balcony-sunset.webp') center/cover;
}
.login-visual > * { position: relative; z-index: 1; }
.login-logo { background: #fff; border-radius: 5px; padding: 14px 18px; width: 200px; }
.login-logo img { width: 100%; }
.login-visual h1 { color: #fff; font-size: 40px; line-height: 1.12; max-width: 430px; margin-top: auto; }
.login-visual h1 em { color: var(--gold); font-style: italic; }
.login-visual .sub { color: rgba(247, 231, 228, .72); font-size: 13px; max-width: 390px; margin-top: 12px; }
.login-stats { display: flex; gap: 26px; margin-top: 30px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .15); }
.login-stats strong { display: block; font-family: var(--serif); font-size: 22px; color: #fff; }
.login-stats span { font-size: 9.5px; text-transform: uppercase; letter-spacing: .12em; color: rgba(247, 231, 228, .55); }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--bg); }
.login-form { width: 100%; max-width: 370px; }
.login-form .eyebrow { color: var(--rose); font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; }
.login-form h2 { font-size: 31px; margin: 6px 0 4px; }
.login-form .lead { font-size: 12px; color: var(--muted); margin-bottom: 24px; }
.login-form .btn { margin-top: 6px; }
.demo-box { margin-top: 22px; border: 1px dashed var(--line); border-radius: 5px; padding: 12px; background: #fff; }
.demo-box .title { font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 7px; }
.demo-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 10.5px; padding: 4px 0; border-bottom: 1px solid var(--line-soft); }
.demo-row:last-child { border-bottom: 0; }
.demo-row .role { color: var(--muted); }
.demo-row button { background: none; border: 0; color: var(--rose); font-size: 10px; font-weight: 600; cursor: pointer; padding: 0; }
.login-foot { margin-top: 26px; font-size: 9.5px; color: var(--muted); text-align: center; }

/* ---------------------------------------------------------------- front desk */
.fd-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.fd-col .card-head { padding-bottom: 10px; }
.fd-col .count { font-size: 10px; background: var(--blush); color: var(--rose); padding: 2px 7px; border-radius: 9px; font-weight: 700; }
.fd-item { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); }
.fd-item:last-child { border-bottom: 0; }
.fd-item .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.fd-item .guest { font-size: 12px; font-weight: 600; color: var(--deep); }
.fd-item .meta { font-size: 10px; color: var(--muted); margin-top: 2px; }
.fd-item .room-chip { font-size: 10px; font-weight: 700; background: var(--blush); color: var(--rose); border-radius: 3px; padding: 2px 6px; white-space: nowrap; }
.fd-item .actions { display: flex; gap: 5px; margin-top: 8px; }
.fd-item .balance { font-size: 10px; color: var(--red); font-weight: 600; }
.fd-item .balance.ok { color: var(--green); }

/* ---------------------------------------------------------------- housekeeping */
.hk-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
.hk-col { background: #f6ece9; border-radius: 6px; padding: 10px; min-height: 220px; }
.hk-col-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 9px; }
.hk-col-head h3 { font-family: var(--sans); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.hk-col-head .count { font-size: 10px; font-weight: 700; color: var(--rose); background: #fff; border-radius: 8px; padding: 1px 6px; }
.hk-card { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 10px; margin-bottom: 8px; }
.hk-card .room { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.hk-card .room strong { font-family: var(--serif); font-size: 18px; color: var(--deep); }
.hk-card .type { font-size: 9.5px; color: var(--muted); margin: 2px 0 7px; }
.hk-card .assign { font-size: 9.5px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.hk-card .actions { display: flex; gap: 4px; margin-top: 8px; flex-wrap: wrap; }
.hk-card .actions .btn { padding: 3px 6px; font-size: 9px; }

/* ---------------------------------------------------------------- channels */
.channel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.channel-card { padding: 14px; }
.channel-top { display: flex; align-items: center; gap: 10px; }
.channel-mark {
  width: 36px; height: 36px; border-radius: 5px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 800; letter-spacing: -.02em; flex: none;
}
.channel-card .name { font-size: 12.5px; font-weight: 600; color: var(--deep); }
.channel-card .prop { font-size: 9.5px; color: var(--muted); }
.channel-status { display: inline-flex; align-items: center; gap: 4px; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.channel-status .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.channel-status.connected { color: var(--green); }
.channel-status.paused { color: var(--amber); }
.channel-status.error { color: var(--red); }
.channel-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 10px; color: var(--muted); margin: 10px 0; padding-top: 9px; border-top: 1px solid var(--line-soft); }
.channel-actions { display: flex; gap: 5px; }
.sync-log { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.sync-log:last-child { border-bottom: 0; }
.sync-log .dir { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; background: var(--blush); color: var(--rose); font-size: 10px; font-weight: 700; }
.sync-log .dir.pull { background: #eaf0f5; color: #3d5a73; }
.sync-log .body { flex: 1; min-width: 0; }
.sync-log .body strong { font-size: 11px; color: var(--deep); display: block; }
.sync-log .body span { font-size: 10px; color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; }
.sync-log .time { font-size: 9px; color: var(--muted); white-space: nowrap; }
.mapping-input { font-size: 10.5px; padding: 5px 7px; min-width: 120px; }
.webhook-box { background: #f8efec; border: 1px dashed var(--line); border-radius: 4px; padding: 9px 10px; font-size: 10px; font-family: ui-monospace, Consolas, monospace; color: var(--rose); word-break: break-all; }

/* ---------------------------------------------------------------- reports */
.report-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.hbar-row { display: grid; grid-template-columns: 130px 1fr 90px; align-items: center; gap: 10px; margin-bottom: 9px; font-size: 11px; }
.hbar-track { height: 8px; background: #f4e9e6; border-radius: 4px; overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 4px; }
.hbar-val { text-align: right; font-weight: 600; color: var(--deep); font-size: 10.5px; }
.daily-chart { display: flex; align-items: flex-end; gap: 3px; height: 150px; }
.daily-chart .d { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; min-width: 0; }
.daily-chart .fill { width: 100%; max-width: 18px; background: var(--rose-light); border-radius: 1px 1px 0 0; min-height: 2px; }
.daily-chart .fill.high { background: var(--rose); }
.daily-chart .lbl { font-size: 7.5px; color: var(--muted); white-space: nowrap; }
.report-table td strong { color: var(--deep); }

/* ---------------------------------------------------------------- settings */
.settings-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; align-items: start; }
.brand-preview { background: var(--deep-dark); border-radius: 5px; padding: 18px; display: flex; align-items: center; justify-content: center; }
.brand-preview img { max-height: 100px; width: auto; }
.promo-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.promo-row:last-child { border-bottom: 0; }
.promo-code { font-family: ui-monospace, Consolas, monospace; font-size: 11px; font-weight: 700; background: var(--gold-soft); color: #7a5a10; border: 1px dashed #e8c56f; border-radius: 3px; padding: 3px 7px; }
.promo-desc { flex: 1; font-size: 10.5px; color: var(--muted); }
.switch { position: relative; width: 34px; height: 19px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #d9c9c6; border-radius: 10px; cursor: pointer; transition: .2s; }
.switch span::before { content: ""; position: absolute; width: 13px; height: 13px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::before { transform: translateX(15px); }
.user-table .avatar { width: 28px; height: 28px; font-size: 9px; }

/* ---------------------------------------------------------------- misc */
.stat-line { display: flex; align-items: center; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line-soft); font-size: 11.5px; }
.stat-line:last-child { border-bottom: 0; }
.stat-line .k { color: var(--muted); }
.stat-line .v { font-weight: 600; color: var(--deep); }
.summary-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 11.5px; color: var(--muted); }
.summary-line strong { color: var(--ink); font-weight: 600; }
.detail-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.detail-hero .code-big { font-family: var(--serif); font-size: 27px; color: var(--deep); }
.detail-hero .meta { font-size: 11px; color: var(--muted); }
.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.timeline-item { position: relative; padding-bottom: 13px; }
.timeline-item::before { content: ""; position: absolute; left: -18px; top: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--rose-light); border: 2px solid var(--panel); box-shadow: 0 0 0 1px var(--rose-light); }
.timeline-item strong { font-size: 11px; display: block; color: var(--deep); }
.timeline-item span { font-size: 10px; color: var(--muted); }
.print-only { display: none; }

@media (max-width: 1180px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-5, .report-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .channel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fd-grid { grid-template-columns: 1fr; }
  .sidebar { width: 226px; }
  .content { padding: 22px; }
}
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s; width: 252px; box-shadow: 20px 0 60px rgba(0,0,0,.25); }
  .sidebar.open { transform: none; }
  .mobile-menu { display: inline-flex; }
  .topbar { padding: 14px 18px; }
  .content { padding: 18px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
  .form-grid .span-2, .form-grid-3 .span-2, .form-grid-3 .span-3 { grid-column: auto; }
  .settings-grid { grid-template-columns: 1fr; }
  .login-shell { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-panel { min-height: 100vh; }
  .dash-hero { flex-direction: column; align-items: flex-start; }
  .report-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .channel-grid { grid-template-columns: 1fr; }
  .hk-grid { grid-template-columns: 1fr; }
  .tape-wrap { max-height: none; }
  .topbar h1 { font-size: 22px; }
}
@media (max-width: 560px) {
  .topbar { align-items: flex-start; flex-wrap: wrap; }
  .top-actions { width: 100%; justify-content: flex-start; }
  .grid-5, .report-kpis { grid-template-columns: 1fr; }
  .kpi-value { font-size: 26px; }
  .filter-bar .field { min-width: 100%; }
  .tape-toolbar { align-items: flex-start; flex-direction: column; }
  .modal { width: 100%; }
}
@media print {
  .sidebar, .topbar, .flash-wrap, .no-print { display: none !important; }
  .content { padding: 0; max-width: none; }
  body { background: #fff; }
  .card { box-shadow: none; break-inside: avoid; }
  .print-only { display: block; }
}

/* Integrations / channel adapter console */
.integration-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); gap: 14px; align-items: start; }
.integration-card .card-head .name { font-family: var(--serif); font-size: 17px; color: var(--deep); }
.integration-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 10.5px; color: var(--muted); }
.integration-error { margin-top: 10px; padding: 8px 10px; border-radius: 4px; background: var(--red-soft); color: var(--red); font-size: 10.5px; word-break: break-word; }
.adapter-config { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.adapter-config summary { cursor: pointer; font-size: 11.5px; font-weight: 600; color: var(--rose); list-style: none; display: flex; align-items: center; gap: 5px; }
.adapter-config summary::-webkit-details-marker { display: none; }
.adapter-config summary .icon { width: 14px; height: 14px; }
.adapter-config[open] summary { margin-bottom: 12px; }
.adapter-config .form-grid { gap: 10px; }
.adapter-config .field label { font-size: 9.5px; }
@media (max-width: 640px) {
  .integration-grid { grid-template-columns: 1fr; }
}
