:root {
  --navy: #10233e;
  --navy-light: #16324f;
  --accent: #2f80ed;
  --accent-dark: #1c63c9;
  --accent-soft: #eaf2ff;
  --green: #1f9d55;
  --green-soft: #e7f8ee;
  --amber: #b7791f;
  --amber-soft: #fff6e0;
  --gray: #64748b;
  --gray-soft: #eef1f5;
  --red: #d64545;
  --red-soft: #fdeaea;
  --bg: #f4f6fa;
  --card: #ffffff;
  --border: #e4e8f0;
  --text: #1c2733;
  --text-dim: #6b7789;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 35, 62, 0.06), 0 4px 16px rgba(16, 35, 62, 0.05);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  font-size: 14.5px;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Auth pages ---------- */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top left, #1b3a63, var(--navy) 60%);
}
.auth-card {
  width: 380px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 32px;
}
.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.auth-logo .mark {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 18px;
}
.auth-logo .name { font-weight: 700; font-size: 15px; color: var(--navy); line-height: 1.25; min-width: 0; }
.auth-logo .mark-logo { width: 68px; height: 68px; background: #fff; border: 1px solid var(--border); padding: 6px; }
.auth-logo .mark-logo img { width: 100%; height: 100%; object-fit: contain; }
.auth-card h1 { font-size: 20px; margin: 18px 0 4px; color: var(--navy); }
.auth-card p.sub { color: var(--text-dim); margin: 0 0 22px; font-size: 13.5px; }
.auth-card p.sub .property-name { color: var(--navy); font-weight: 700; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--navy); }
.form-control {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 14px; background: #fbfcfe;
}
.form-control:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px var(--accent-soft); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 16px; border-radius: 8px; border: 1px solid transparent;
  font-size: 13.5px; font-weight: 600; cursor: pointer; transition: all .15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-block { width: 100%; }
.btn-outline { background: #fff; border-color: var(--border); color: var(--navy); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-soft { background: var(--accent-soft); color: var(--accent-dark); }
.btn-soft:hover { background: #dbe9ff; }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: #17803f; }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-danger:hover { background: #f9d5d5; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 7px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.demo-creds {
  margin-top: 18px; background: var(--accent-soft); border-radius: 8px;
  padding: 10px 12px; font-size: 12.5px; color: var(--accent-dark); line-height: 1.6;
}
.alert { padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; }
.alert-error { background: var(--red-soft); color: var(--red); }
.alert-success { background: var(--green-soft); color: var(--green); }

/* ---------- "Powered by" vendor credit ---------- */
.powered-by {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 20px; font-size: 11.5px; color: var(--text-dim); letter-spacing: .02em;
}
.powered-by img { height: 26px; width: auto; opacity: .9; }
.powered-by.on-dark { color: #7c93b3; }
.powered-by.on-dark img { filter: brightness(0) invert(1); opacity: .8; }

/* ---------- App shell ---------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 232px; flex-shrink: 0; background: var(--navy);
  color: #cfe0f5; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 20px 18px; }
.sidebar-brand .mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700;
}
.sidebar-brand .name { color: #fff; font-weight: 700; font-size: 14px; line-height: 1.25; }
.sidebar-brand .mark-logo { background: #fff; padding: 3px; }
.sidebar-brand .mark-logo img { width: 100%; height: 100%; object-fit: contain; }
.sidebar-brand .property-name { color: #93a9c6; font-size: 11px; margin-top: 1px; max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-nav { flex: 1; padding: 10px 12px; overflow-y: auto; }
.sidebar-section { margin-top: 14px; }
.sidebar-link {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 8px; font-size: 13.7px; font-weight: 500; color: #b9cbe3;
  margin-bottom: 2px;
}
.sidebar-link .ic { width: 18px; height: 18px; flex-shrink: 0; opacity: .85; }
.sidebar-link:hover { background: rgba(255,255,255,0.06); color: #fff; }
.sidebar-link.active { background: var(--accent); color: #fff; }
.sidebar-link.sub { padding-left: 40px; font-size: 13px; }
.sidebar-foot { padding: 14px 18px; border-top: 1px solid rgba(255,255,255,0.08); }
.sidebar-user { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.sidebar-user .av {
  width: 30px; height: 30px; border-radius: 50%; background: var(--accent-dark);
  color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12.5px;
}
.sidebar-user .info .nm { color: #fff; font-size: 13px; font-weight: 600; }
.sidebar-user .info .rl { font-size: 11.5px; color: #93a9c6; text-transform: capitalize; }
.sidebar-logout {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px;
  background: rgba(255,255,255,0.06); border: none; border-radius: 7px; color: #cfe0f5; font-size: 12.5px; font-weight: 600;
}
.sidebar-logout:hover { background: rgba(255,255,255,0.12); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 62px; background: var(--card); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 26px; position: sticky; top: 0; z-index: 5;
}
.topbar h1 { font-size: 18px; margin: 0; color: var(--navy); }
.topbar .meta { font-size: 12.5px; color: var(--text-dim); }
.content { padding: 24px 26px 60px; }

/* ---------- Tabs ---------- */
.tabbar { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; flex-wrap: wrap; }
.tab-link {
  padding: 11px 18px; font-size: 13.5px; font-weight: 600; color: var(--text-dim);
  border-bottom: 2px solid transparent; margin-bottom: -1px; display: flex; align-items: center; gap: 8px;
}
.tab-link:hover { color: var(--navy); }
.tab-link.active { color: var(--accent-dark); border-bottom-color: var(--accent); }
.tab-count {
  background: var(--gray-soft); color: var(--text-dim); font-size: 11px; font-weight: 700;
  padding: 1px 7px; border-radius: 20px;
}
.tab-link.active .tab-count { background: var(--accent-soft); color: var(--accent-dark); }

/* ---------- Cards / stats ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
a.stat-card { display: block; transition: transform .12s, box-shadow .12s; }
a.stat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(16,35,62,0.1); }
.stat-card .lbl { font-size: 12.5px; color: var(--text-dim); font-weight: 600; margin-bottom: 8px; }
.stat-card .val { font-size: 26px; font-weight: 700; color: var(--navy); }
.stat-card .sub { font-size: 11.5px; color: var(--text-dim); margin-top: 4px; }
.stat-card.accent-blue .val { color: var(--accent-dark); }
.stat-card.accent-green .val { color: var(--green); }
.stat-card.accent-amber .val { color: var(--amber); }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; margin-bottom: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.card-head h2 { font-size: 15.5px; margin: 0; color: var(--navy); }
.card-head p { margin: 4px 0 0; font-size: 12.5px; color: var(--text-dim); }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; font-size: 13.3px; }
table.grid th {
  text-align: left; padding: 10px 14px; background: #f8fafc; color: var(--text-dim);
  font-weight: 600; font-size: 11.8px; text-transform: uppercase; letter-spacing: .03em;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
table.grid td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.grid tr:last-child td { border-bottom: none; }
table.grid tr:hover td { background: #fafbfd; }
.guest-name { font-weight: 600; color: var(--navy); }
.room-pill {
  display: inline-flex; align-items: center; justify-content: center; min-width: 34px;
  padding: 3px 8px; background: var(--gray-soft); border-radius: 6px; font-weight: 700; font-size: 12px; color: var(--navy);
}
.vip-tag { color: var(--amber); font-size: 11px; font-weight: 700; margin-left: 6px; }

.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 700; }
.badge-blue { background: var(--accent-soft); color: var(--accent-dark); }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-gray { background: var(--gray-soft); color: var(--gray); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }

.empty-state { text-align: center; padding: 50px 20px; color: var(--text-dim); }
.empty-state .ic { font-size: 34px; margin-bottom: 10px; }

/* ---------- Bulk selection bar (Guests) ---------- */
.bulk-bar {
  display: flex; align-items: center; gap: 14px; background: var(--accent-soft); color: var(--accent-dark);
  padding: 10px 16px; border-radius: 10px; margin-bottom: 14px; font-size: 13px; font-weight: 600;
}
.row-select, #selectAll { width: 16px; height: 16px; accent-color: var(--accent); }

/* ---------- Rich text email editor ---------- */
.rte-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 8px; background: #f8fafc;
  border: 1px solid var(--border); border-bottom: none; border-radius: 10px 10px 0 0;
}
.rte-btn {
  min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid transparent; border-radius: 6px;
  background: none; color: var(--text); font-size: 12.5px; font-weight: 600;
}
.rte-btn:hover { background: #fff; border-color: var(--border); }
.rte-select {
  height: 30px; border: 1px solid var(--border); border-radius: 6px; background: #fff;
  font-size: 12px; padding: 0 6px; color: var(--text);
}
.rte-sep { width: 1px; height: 22px; background: var(--border); margin: 0 4px; }
.rte-color-label {
  display: flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--text);
  border: 1px solid var(--border); border-radius: 6px; padding: 0 6px; height: 30px;
}
.rte-color-label input[type="color"] { width: 22px; height: 22px; border: none; padding: 0; background: none; }
.rte-editor {
  min-height: 220px; max-height: 460px; overflow-y: auto; border: 1px solid var(--border); border-radius: 0 0 10px 10px;
  padding: 16px 18px; font-size: 14px; color: #1c2733; background: #fff; line-height: 1.6;
}
.rte-editor:focus { outline: none; border-color: var(--accent); }
.rte-editor a { color: #2f80ed; }

/* ---------- Promotional email recipients ---------- */
.promo-recipients-box { border: 1px solid var(--border); border-radius: 10px; padding: 16px; background: #fbfcfe; }
.promo-guest-list { max-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.promo-guest-row { padding: 6px 4px; border-radius: 6px; }
.promo-guest-row:hover { background: #fff; }
.promo-guest-row.unsub { opacity: .55; }

/* ---------- Dropdown / feedback action menu ---------- */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 6px); background: #fff;
  border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); min-width: 210px; z-index: 20; overflow: hidden;
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu button, .dropdown-menu a {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; padding: 10px 14px;
  background: none; border: none; font-size: 13px; color: var(--text);
}
.dropdown-menu button:hover, .dropdown-menu a:hover { background: var(--accent-soft); color: var(--accent-dark); }

/* ---------- Modal ---------- */
.modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(16,23,33,0.55); z-index: 100;
  align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff; border-radius: 14px; width: 100%; max-width: 480px; max-height: 88vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal.modal-lg { max-width: 640px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; font-size: 16px; color: var(--navy); }
.modal-close { background: none; border: none; font-size: 20px; color: var(--text-dim); line-height: 1; }
.modal-body { padding: 20px 22px; }
.modal-foot { padding: 16px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- Form bits ---------- */
.form-row { display: flex; gap: 14px; }
.form-row .form-group { flex: 1; }
select.form-control { appearance: none; background: #fbfcfe url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="6"><path d="M0 0l5 6 5-6z" fill="%2364748b"/></svg>') no-repeat right 12px center; }
textarea.form-control { resize: vertical; min-height: 70px; }
.help-text { font-size: 12px; color: var(--text-dim); margin-top: 5px; }
.inline-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); }

/* ---------- Question builder ---------- */
.q-list { display: flex; flex-direction: column; gap: 12px; }
.q-item { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; background: #fbfcfe; }
.q-item-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.q-order { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark); font-size: 11.5px; font-weight: 700; margin-right: 8px; }
.q-type-tag { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 2px 8px; border-radius: 5px; margin-left: 8px; }
.q-type-rating { background: var(--amber-soft); color: var(--amber); }
.q-type-multiple_choice { background: var(--accent-soft); color: var(--accent-dark); }
.q-type-text { background: var(--gray-soft); color: var(--gray); }
.q-type-nps { background: var(--green-soft); color: var(--green); }
.q-text { font-size: 14px; font-weight: 600; color: var(--navy); }
.q-actions { display: flex; gap: 6px; flex-shrink: 0; }
.q-options-preview { margin: 10px 0 0 30px; display: flex; flex-wrap: wrap; gap: 6px; }
.q-options-preview span { background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 3px 10px; font-size: 11.8px; color: var(--text-dim); }
.q-section-tag { font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 5px; margin-left: 8px; background: #eef2ff; color: #4338ca; }
.q-section-group { margin-bottom: 22px; }
.q-section-group:last-child { margin-bottom: 0; }
.q-section-heading {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-dim);
  padding-bottom: 8px; margin-bottom: 12px; border-bottom: 1px solid var(--border);
}
.q-children { margin: 12px 0 0 30px; padding-left: 16px; border-left: 2px dashed var(--border); display: flex; flex-direction: column; gap: 10px; }
.q-trigger-note { font-size: 11.8px; color: var(--accent-dark); background: var(--accent-soft); display: inline-block; padding: 2px 9px; border-radius: 6px; margin-top: 8px; margin-left: 30px; }

.option-row { display: flex; gap: 8px; margin-bottom: 8px; }
.option-row .form-control { flex: 1; }
.option-remove { background: var(--red-soft); color: var(--red); border: none; border-radius: 7px; width: 34px; flex-shrink: 0; font-size: 15px; }

/* ---------- PMS integration ---------- */
.pms-status { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.pms-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.pms-dot.off { background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.provider-toggle { display: flex; gap: 10px; margin-bottom: 18px; }
.provider-card {
  flex: 1; border: 2px solid var(--border); border-radius: 10px; padding: 14px 16px; cursor: pointer; position: relative;
}
.provider-card.selected { border-color: var(--accent); background: var(--accent-soft); }
.provider-card .p-name { font-weight: 700; font-size: 13.5px; color: var(--navy); }
.provider-card .p-desc { font-size: 11.5px; color: var(--text-dim); margin-top: 3px; }

/* ---------- Survey (guest-facing) ---------- */
.survey-page { min-height: 100vh; background: linear-gradient(180deg, #eef3fb, var(--bg) 320px); padding: 30px 16px 60px; }
.survey-shell { max-width: 620px; margin: 0 auto; }
.survey-header-card {
  background: linear-gradient(135deg, var(--navy), var(--navy-light)); color: #fff; border-radius: 16px; padding: 26px 26px; margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.survey-header-card .eyebrow { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: #9fc1ea; font-weight: 700; }
.survey-header-card h2 { margin: 6px 0 2px; font-size: 21px; }
.survey-header-card .room-line { font-size: 13.5px; color: #cfe0f5; }
.survey-card { background: #fff; border-radius: 16px; box-shadow: var(--shadow); padding: 24px 26px; margin-bottom: 20px; }
.survey-progress { height: 6px; background: var(--gray-soft); border-radius: 6px; overflow: hidden; margin-bottom: 22px; }
.survey-progress .bar { height: 100%; background: var(--accent); border-radius: 6px; transition: width .25s ease; }

.q-block { display: none; margin-bottom: 26px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.q-block.visible { display: block; }
.q-block:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.q-block .q-label { font-size: 15px; font-weight: 700; color: var(--navy); margin-bottom: 14px; }
.q-block.child { margin-left: 20px; padding: 16px; background: #f8fafd; border-radius: 10px; border-bottom: none; }
.q-block.child .q-label { font-size: 13.5px; }

.star-rating { display: flex; gap: 8px; }
.star-rating .star {
  font-size: 34px; line-height: 1; color: #dbe2ea; cursor: pointer; transition: transform .1s, color .1s; user-select: none;
}
.star-rating .star:hover { transform: scale(1.12); }
.star-rating .star.filled { color: #f5a524; }
.rating-caption { margin-top: 8px; font-size: 12.5px; color: var(--text-dim); font-weight: 600; min-height: 16px; }

.choice-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.choice-chip {
  border: 1.5px solid var(--border); border-radius: 10px; padding: 10px 14px; font-size: 13px; font-weight: 600;
  color: var(--text); background: #fff; display: flex; align-items: center; gap: 8px;
}
.choice-chip input { accent-color: var(--accent); width: 15px; height: 15px; }
.choice-chip.checked { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); }

.survey-submit-bar { display: flex; justify-content: flex-end; margin-top: 6px; }
.survey-thanks { text-align: center; padding: 60px 20px; }
.survey-thanks .emoji { font-size: 52px; margin-bottom: 14px; }
.survey-thanks h2 { color: var(--navy); margin-bottom: 6px; }
.survey-thanks p { color: var(--text-dim); }

.qr-print-card { text-align: center; padding: 10px 6px 4px; }
.qr-print-card img { border: 10px solid #fff; box-shadow: var(--shadow); border-radius: 12px; }
.qr-print-card .room-big { font-size: 30px; font-weight: 800; color: var(--navy); margin-top: 14px; }
.qr-print-card .hint { font-size: 12px; color: var(--text-dim); margin-top: 6px; }

.scan-frame { position: relative; width: 100%; max-width: 420px; margin: 0 auto; border-radius: 16px; overflow: hidden; background: #000; }
.scan-frame video, .scan-frame canvas { width: 100%; display: block; }
.scan-guide { position: absolute; inset: 12%; border: 3px solid rgba(255,255,255,0.85); border-radius: 16px; pointer-events: none; }
.scan-result { margin-top: 16px; text-align: center; }

.toast-wrap { position: fixed; top: 18px; right: 18px; z-index: 300; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 13px; box-shadow: var(--shadow); min-width: 220px; animation: toastIn .2s ease; }
.toast.success { background: var(--green); }
.toast.error { background: var(--red); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Dashboard filter bar ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }

/* ---------- NPS card ---------- */
.nps-card {}
.nps-layout { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.nps-big { font-size: 52px; font-weight: 800; line-height: 1; min-width: 110px; text-align: center; }
.nps-big.positive { color: var(--green); }
.nps-big.negative { color: var(--red); }
.nps-breakdown { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 220px; }
.nps-row { font-size: 13px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.nps-row strong { margin-left: auto; }
.nps-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.nps-dot.promoter { background: var(--green); }
.nps-dot.passive { background: var(--amber); }
.nps-dot.detractor { background: var(--red); }

/* ---------- Section (department) scores ---------- */
.section-score-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.section-score-card { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; text-align: center; background: #fbfcfe; }
.section-score-name { font-size: 12.5px; font-weight: 600; color: var(--text-dim); margin-bottom: 8px; }
.section-score-val { font-size: 22px; font-weight: 800; color: var(--navy); }
.section-score-val.good { color: var(--green); }
.section-score-val.ok { color: var(--amber); }
.section-score-val.poor { color: var(--red); }

/* ---------- Alert / low-rating cards ---------- */
a.stat-card.alert-card { display: block; border-left: 4px solid var(--border); transition: transform .12s, box-shadow .12s; }
a.stat-card.alert-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(16,35,62,0.1); }
.alert-card.critical { border-left-color: var(--red); }
.alert-card.critical .val { color: var(--red); }
.alert-card.high { border-left-color: var(--amber); }
.alert-card.high .val { color: var(--amber); }
.alert-card.medium { border-left-color: var(--accent); }
.alert-card.medium .val { color: var(--accent-dark); }
.stat-card.disconnected { opacity: .55; }

/* ---------- NPS input (guest survey) ---------- */
.nps-scale { display: flex; flex-wrap: wrap; gap: 6px; }
.nps-btn {
  width: 38px; height: 38px; border-radius: 8px; border: 1.5px solid var(--border); background: #fff;
  font-weight: 700; font-size: 13.5px; color: var(--text);
}
.nps-btn:hover { border-color: var(--accent); }
.nps-btn.selected { background: var(--accent); border-color: var(--accent); color: #fff; }
.nps-labels { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-dim); margin-top: 6px; max-width: 460px; }

/* ---------- Feedback Q&A view ---------- */
.qa-list { display: flex; flex-direction: column; gap: 16px; }
.qa-item { padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.qa-item:last-child { border-bottom: none; padding-bottom: 0; }
.qa-item.child { margin-left: 24px; padding: 12px 14px; background: #f8fafd; border-radius: 10px; border-bottom: none; }
.qa-q { font-weight: 600; color: var(--navy); font-size: 13.7px; margin-bottom: 6px; }
.qa-a { font-size: 13.5px; }
.qa-text { color: var(--text-dim); font-style: italic; }
.stars-display { color: #f5a524; font-size: 16px; letter-spacing: 1px; }

/* ---------- OTA Ratings ---------- */
.ota-review-list { display: flex; flex-direction: column; gap: 14px; }
.ota-review { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.ota-review-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ota-platform-tag { background: var(--accent-soft); color: var(--accent-dark); font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 6px; margin-right: 8px; text-transform: uppercase; letter-spacing: .02em; }
.ota-rating { font-weight: 700; color: var(--navy); font-size: 15px; }
.ota-review-title { font-weight: 600; color: var(--navy); margin-top: 8px; font-size: 13.5px; }
.ota-review-text { color: var(--text); font-size: 13.3px; margin-top: 4px; }
.ota-response { margin-top: 10px; background: var(--green-soft); color: var(--green); padding: 8px 12px; border-radius: 8px; font-size: 12.5px; }
.ota-response-area { margin-top: 10px; }
.ota-response-actions { display: flex; gap: 8px; margin-top: 8px; }
.ota-response-editor .ota-response-textarea { resize: vertical; font-family: inherit; }

/* ---------- Print (Guest Feedback Report -> PDF) ---------- */
.print-header { text-align: center; margin-bottom: 18px; }
.print-header h1 { font-size: 18px; color: var(--navy); margin: 0 0 4px; }
@media print {
  .sidebar, .screen-only, .toast-wrap { display: none !important; }
  .app-shell { display: block; }
  .main { width: 100%; }
  .content { padding: 0; }
  .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  .print-header { display: block !important; }
  .print-only { display: block !important; }
  body { background: #fff; }
}

@media (max-width: 860px) {
  .sidebar { position: fixed; left: -232px; z-index: 50; transition: left .2s; }
  .sidebar.open { left: 0; }
  .content { padding: 18px; }
}
