:root {
  --bg: #eef0f4;
  --surface: #ffffff;
  --sidebar: #1a2332;
  --sidebar-border: #2a3544;
  --sidebar-text: #9aa5b4;
  --sidebar-active-bg: rgba(255, 107, 74, 0.12);
  --sidebar-active-text: #ff7a5c;
  --sidebar-hover: rgba(255, 255, 255, 0.06);
  --text: #1a2332;
  --text-muted: #6b7280;
  --border: #e2e6ec;
  --primary: #ff5c3a;
  --primary-hover: #e84e2d;
  --primary-soft: #fff0eb;
  --danger: #dc2626;
  --warning: #d97706;
  --success: #059669;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(26, 35, 50, 0.06);
  --font: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
}

.hidden { display: none !important; }

/* —— Brand wordmark —— */
.brand-wordmark {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.brand-wordmark.sm { font-size: 1.25rem; }

.brand-mark {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}
.brand-mark.sm { width: 8px; height: 8px; }

.brand-text strong {
  display: block;
  color: #fff;
  font-size: 0.85rem;
  line-height: 1.2;
}

/* —— Login (Ezus-style centered card) —— */
.login-screen {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.login-center { width: 100%; max-width: 400px; }

.login-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem 2.25rem;
  box-shadow: 0 12px 40px rgba(26, 35, 50, 0.08);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
}

.login-card h1 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
}

.login-lead {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.login-error {
  color: var(--danger);
  font-size: 0.85rem;
  margin: 0;
}

.login-cmc-step {
  margin-top: 0.5rem;
}

.login-cmc-title {
  margin: 0 0 0.35rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.cmc-code-input {
  font-size: 1.35rem;
  letter-spacing: 0.35em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.cmc-demo-hint {
  margin: 0.75rem 0;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  background: rgba(233, 71, 46, 0.08);
  border: 1px solid rgba(233, 71, 46, 0.18);
  color: var(--text);
  font-size: 0.875rem;
}

.cmc-demo-hint strong {
  font-size: 1.05rem;
  letter-spacing: 0.12em;
}

.cmc-confirm-body .cmc-code-input {
  width: 100%;
}

.demo-users {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.demo-users p { margin: 0 0 0.75rem; font-size: 0.75rem; color: var(--text-muted); }

.demo-user-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.demo-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}
.demo-user-chip:hover { border-color: var(--primary); background: var(--primary-soft); }

.btn-block { width: 100%; justify-content: center; }

/* —— App shell —— */
.app {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--sidebar);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  padding: 0.75rem 0.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 0.75rem 1rem;
  border-bottom: 1px solid var(--sidebar-border);
  margin-bottom: 0.5rem;
}

.brand-sub {
  display: block;
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--sidebar-text);
  margin-top: 0.1rem;
}

.nav { flex: 1; }

.nav-section { margin-bottom: 1rem; }

.nav-section-label {
  display: block;
  padding: 0.5rem 0.85rem 0.35rem;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7a8c;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: none;
  background: transparent;
  color: var(--sidebar-text);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 5px;
  cursor: pointer;
  text-align: left;
  border-left: 3px solid transparent;
}

.nav-btn:hover:not(:disabled) { background: var(--sidebar-hover); color: #e8edf3; }
.nav-btn.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-text);
  border-left-color: var(--primary);
  font-weight: 600;
}
.nav-btn.disabled, .nav-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.nav-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-svg { width: 18px; height: 18px; }

.nav-btn-footer {
  color: var(--sidebar-text) !important;
  font-size: 0.75rem !important;
}
.nav-btn-footer:hover { color: #fff !important; }

.sidebar-footer {
  padding: 0.5rem;
  border-top: 1px solid var(--sidebar-border);
  margin-top: 0.5rem;
}

.main { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1.25rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  min-height: 52px;
}

.topbar-left { min-width: 140px; }
.topbar-center { flex: 1; max-width: 420px; }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
}
.crumb-muted { color: var(--text-muted); }
.crumb-sep { color: #cbd5e1; }
.crumb-current { font-weight: 600; color: var(--text); }

.icon-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
}
.icon-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.page-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1.25rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.page-toolbar-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
}

.toolbar-spacer { flex: 1; }

.ezus-tabs .view-tab {
  border-radius: 4px;
  padding: 0.4rem 0.9rem;
  font-size: 0.8125rem;
}

.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  background: #fafbfc;
}

.toolbar-filters {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}

.toolbar-search {
  max-width: 220px;
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  font: inherit;
  font-size: 0.8125rem;
}

.th-sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.th-sortable:hover { color: var(--accent); }
.th-sortable.sorted { color: var(--accent); font-weight: 600; }
.sort-indicator { font-size: 0.75em; opacity: 0.85; }
.reservation-list-toolbar-compact .toolbar-search { max-width: 180px; }
.reservation-list-toolbar .toolbar-select { min-width: 9rem; }

.toolbar-select {
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  font: inherit;
  font-size: 0.8125rem;
  background: white;
}

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.search-wrap input {
  width: 100%;
  padding: 0.5rem 0.85rem 0.5rem 2rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
  background: var(--bg);
}

.search-wrap input:focus {
  outline: 2px solid var(--primary-soft);
  border-color: var(--primary);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.subnav {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1.25rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.subnav-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.view-tabs { display: flex; gap: 0.25rem; }

.view-tab {
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  color: var(--text-muted);
}

.view-tab.active {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.view-tab:disabled { opacity: 0.45; cursor: not-allowed; }

.content { padding: 1.25rem; flex: 1; }

/* —— User menu —— */
.user-menu { position: relative; }

.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  z-index: 50;
}

.user-dropdown-head {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
}

.user-dropdown-head span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: 0.65rem 1rem;
  border: none;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.dropdown-item:hover { background: var(--bg); }

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}
.avatar.sm { width: 28px; height: 28px; font-size: 0.75rem; }
.avatar.xs { width: 22px; height: 22px; font-size: 0.65rem; }

.user-cell {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

/* —— Dashboard —— */
.dash-header { margin-bottom: 1.25rem; }
.dash-header h1 { margin: 0; font-size: 1.35rem; }
.dash-header p { margin: 0.35rem 0 0; color: var(--text-muted); }

.dash-stat-shell {
  display: grid;
  grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.dash-stat-folders {
  position: sticky;
  top: 0.75rem;
  overflow: hidden;
}

.dash-stat-folder-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dash-stat-folder-icon {
  display: inline-flex;
  color: var(--primary);
}

.dash-stat-folder-icon .nav-svg {
  width: 1rem;
  height: 1rem;
}

.dash-stat-folder-nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.5rem;
}

.dash-folder-btn {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.8125rem;
  text-align: left;
  cursor: pointer;
}

.dash-folder-btn:hover {
  background: var(--bg);
}

.dash-folder-btn.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}

.dash-folder-item-icon {
  display: inline-flex;
  flex-shrink: 0;
  opacity: 0.85;
}

.dash-folder-item-icon .nav-svg {
  width: 1rem;
  height: 1rem;
}

.dash-folder-label {
  line-height: 1.25;
}

.dash-stat-main {
  min-width: 0;
}

@media (max-width: 900px) {
  .dash-stat-shell {
    grid-template-columns: 1fr;
  }

  .dash-stat-folders {
    position: static;
  }

  .dash-stat-folder-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .dash-folder-btn {
    width: auto;
    flex: 1 1 auto;
  }
}

.task-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.task-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.task-item:last-child { border-bottom: none; }

.task-check { color: var(--text-muted); }

.task-meta {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.task-item.priority-high .badge { background: #fee2e2; color: var(--danger); }

/* —— Typography & layout —— */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.page-header h1 { margin: 0; font-size: 1.35rem; }
.page-header p { margin: 0.35rem 0 0; color: var(--text-muted); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border: 1px solid transparent;
  border-radius: 6px;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); }

.btn-secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
.btn-secondary:hover { background: var(--bg); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--bg); }

.sidebar .btn-ghost {
  color: var(--sidebar-text);
  border-color: var(--sidebar-border);
}
.sidebar .btn-ghost:hover {
  background: var(--sidebar-hover);
  color: #fff;
}

.btn-danger {
  background: #fef2f2;
  color: var(--danger);
  border-color: #fecaca;
}

.btn-sm { padding: 0.3rem 0.6rem; font-size: 0.78rem; }

.grid-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
}

.stat-card.accent { border-color: #fecaca; background: var(--primary-soft); }

.stat-card .label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-card .value {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 0.2rem;
}

.stat-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.sales-dashboard { margin-bottom: 1.25rem; }

.sales-kpi { margin-bottom: 0; }

.sales-charts {
  margin-top: 1.5rem;
  gap: 1.5rem;
}

.chart-title {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.bar-chart-days {
  max-height: 280px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.bar-row {
  display: grid;
  grid-template-columns: 2rem 1fr 4.5rem;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
}

.bar-row.is-today .bar-label { color: var(--primary); font-weight: 700; }
.bar-row.is-today .bar-fill { background: var(--primary); }

.bar-label {
  color: var(--text-muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.bar-track {
  height: 8px;
  background: var(--bg);
  border-radius: 4px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: #3b82f6;
  border-radius: 4px;
  min-width: 2px;
  transition: width 0.3s ease;
}

.bar-value {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  font-size: 0.72rem;
}

.pl-monthly-chart {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.pl-monthly-chart .chart-title {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
}

.pl-monthly-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0.75rem 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.pl-legend-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 0.35rem;
  vertical-align: middle;
}

.pl-legend-profit .pl-legend-swatch {
  background: #16a34a;
}

.pl-legend-expense .pl-legend-swatch {
  background: #dc2626;
}

.pl-monthly-columns-wrap {
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.pl-monthly-columns {
  display: grid;
  grid-template-columns: repeat(12, minmax(3.75rem, 1fr));
  gap: 0.65rem;
  align-items: stretch;
  height: 280px;
  min-width: 54rem;
  padding-top: 0.5rem;
}

.pl-month-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  min-height: 0;
}

.pl-month-col.is-future .pl-month-label {
  opacity: 0.45;
}

.pl-month-chart {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 0;
}

.pl-month-zone-up {
  flex: var(--pl-up-flex, 1) 1 0;
  min-height: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.pl-month-zone-down {
  flex: var(--pl-down-flex, 0) 1 0;
  min-height: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.pl-month-axis {
  flex-shrink: 0;
  height: 2px;
  background: var(--text-muted);
  opacity: 0.45;
  width: 100%;
}

.pl-month-axis-bottom {
  margin-top: auto;
}

.pl-month-bar-group {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  height: 100%;
  width: 100%;
}

.pl-month-zone-down .pl-month-bar-group {
  align-items: flex-start;
}

.pl-bar {
  width: 46%;
  max-width: 26px;
  min-height: 2px;
  transition: height 0.3s ease;
}

.pl-bar-profit {
  background: #16a34a;
  border-radius: 4px 4px 0 0;
}

.pl-bar-profit.is-below {
  border-radius: 0 0 4px 4px;
}

.pl-bar-expense {
  background: #dc2626;
  border-radius: 4px 4px 0 0;
}

.pl-month-col.is-current .pl-month-label {
  color: var(--primary);
  font-weight: 700;
}

.pl-month-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  text-align: center;
  line-height: 1.1;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.card-header {
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.9rem;
}

.card-body { padding: 1.15rem; }

.table-wrap { overflow-x: auto; }

.data-table, table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table th, table th {
  padding: 0.65rem 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #f9fafb;
  border-bottom: 1px solid var(--border);
}

.data-table td, table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
}

.data-table tr:hover td, table tr:hover td { background: #fafbfc; }
.data-table .num-col,
.data-table .num-cell {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.row-self td { background: var(--primary-soft); }

.data-table tr.row-duplicate-reservation td {
  background: #dbeafe;
}

.data-table tr.row-duplicate-reservation:hover td {
  background: #bfdbfe;
}

.pipeline-card.pipeline-card-duplicate {
  border-color: #60a5fa;
  background: #eff6ff;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
}

.badge-draft { background: #f3f4f6; color: #4b5563; }
.badge-sent { background: #dbeafe; color: #1d4ed8; }
.badge-accepted { background: var(--primary-soft); color: var(--primary); }
.badge-paid { background: #d1fae5; color: var(--success); }
.badge-overdue { background: #fee2e2; color: var(--danger); }
.badge-planning { background: #fef3c7; color: #b45309; }
.badge-new { background: #fce7f3; color: #be185d; }
.badge-received { background: #e0e7ff; color: #4338ca; }
.badge-confirmed { background: #d1fae5; color: var(--success); }
.badge-fully_paid { background: #bbf7d0; color: #047857; font-weight: 600; }

.link-btn {
  background: none;
  border: none;
  color: var(--primary);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.link-btn:hover { text-decoration: underline; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form { display: flex; flex-direction: column; gap: 0.85rem; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.form label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: var(--text-muted);
}

.form input,
.form select,
.form textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
  font-size: 0.9rem;
}

.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: 2px solid var(--primary-soft);
  border-color: var(--primary);
}

.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}

.timeline li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.timeline li:last-child { border-bottom: none; }
.timeline time {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Permissions page */
.role-pill {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border: 1px solid;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
}

.demo-pw {
  font-size: 0.8rem;
  background: var(--bg);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.access-tags { font-size: 0.8rem; color: var(--text-muted); }

.perm-card .card-body { padding: 0.85rem; }
.perm-grid { display: flex; flex-direction: column; gap: 0.65rem; }
.perm-group strong {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}
.perm-chip {
  display: inline-block;
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  margin: 0.1rem;
}
.perm-chip.yes { background: #d1fae5; color: var(--success); }
.perm-chip.no { background: #f3f4f6; color: #9ca3af; }

.hint-text {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Itinerary */
.itinerary-days { display: flex; flex-direction: column; gap: 0.85rem; }
.day-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fafbfc;
}
.day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
.activity-list { padding: 0.5rem; }
.activity-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 0.45rem;
}
.activity-time {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
}
.activity-title { font-weight: 600; font-size: 0.875rem; }
.activity-meta { font-size: 0.78rem; color: var(--text-muted); }

.line-items { margin-top: 0.85rem; }
.line-item-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.totals {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  max-width: 280px;
  margin-left: auto;
}
.totals .row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}
.totals .grand {
  font-weight: 700;
  font-size: 1.05rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.invoice-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.invoice-export-note {
  margin: -0.5rem 0 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.invoice-terms,
.invoice-notes {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.invoice-meta {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(26, 43, 60, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}

.modal {
  background: var(--surface);
  border-radius: 10px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow: auto;
}

.modal-wide { max-width: 720px; }

.modal-header {
  padding: 1.15rem 1.35rem;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
}

.modal-body { padding: 1.35rem; }
.modal-footer {
  padding: 0.85rem 1.35rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-top: 4px;
  max-height: 300px;
  overflow: auto;
  z-index: 50;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.search-result-item {
  padding: 0.6rem 0.85rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}
.search-result-item:hover { background: var(--bg); }
.search-result-item small {
  display: block;
  color: var(--text-muted);
  font-size: 0.72rem;
}

.pipeline-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(200px, 1fr));
  gap: 0.75rem;
  align-items: start;
}

.pipeline-col {
  background: #eef0f4;
  border-radius: var(--radius);
  min-height: 320px;
}

.pipeline-col-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0.85rem;
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

.pipeline-count {
  background: var(--surface);
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
  font-size: 0.72rem;
}

.pipeline-cards {
  padding: 0 0.5rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pipeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem;
  cursor: pointer;
  transition: border-color 0.15s;
}

.pipeline-card:hover { border-color: var(--primary); }
.pipeline-card strong { display: block; font-size: 0.875rem; margin-bottom: 0.35rem; }
.pipeline-card-meta { display: block; font-size: 0.75rem; color: var(--text-muted); }

.pipeline-empty {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  padding: 1rem;
  margin: 0;
}

@media (max-width: 900px) {
  .pipeline-board { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .split { grid-template-columns: 1fr; }
  .topbar-center { display: none; }
  .pipeline-board { grid-template-columns: 1fr; }
}

/* Ezus department nav */
.nav-section-label.dept-production { color: #e8956f; }
.nav-section-label.dept-sales { color: #7eb8da; }
.nav-section-label.dept-operations { color: #8bc9a0; }
.nav-section-label.dept-finance { color: #c9b87a; }
.nav-section-label.dept-admin { color: #9aa8b8; }
.nav-section-label.dept-default { color: var(--text-muted); }

.dept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
}

.dept-card .card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.dept-card .nav-section-label {
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: normal;
}

.ranking-panels .ranking-table td small.text-muted {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
}

.ranking-table tbody tr:first-child .rank-badge {
  background: rgba(233, 71, 46, 0.18);
  color: var(--primary);
}

.hotel-stats-table tfoot td {
  border-top: 2px solid var(--border);
  background: var(--bg);
}

.hotel-stats-total-row td {
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.hotel-stat-totals {
  margin-bottom: 0;
}

.stats-zero-row td {
  color: var(--text-muted);
}

.stats-zero-row .rank-badge {
  opacity: 0.55;
}

.nav-btn {
  justify-content: flex-start;
}

.nav-label { flex: 1; min-width: 0; }

.nav-badge {
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.12rem 0.35rem;
  border-radius: 3px;
  background: rgba(255, 92, 58, 0.2);
  color: #ff8a65;
  flex-shrink: 0;
}

/* Module shells */
.module-intro h2 {
  font-size: 0.95rem;
  margin: 0 0 0.35rem;
}

.module-intro p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin: 0;
}

.module-placeholder .card-body { padding: 1.25rem 1.5rem; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.feature-tile {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.feature-tile strong { font-size: 0.8125rem; }
.feature-tile span { font-size: 0.75rem; color: var(--text-muted); }

.ezus-list-card .list-toolbar { border-bottom: 1px solid var(--border); }

.timeline-full li {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.activity-type { font-size: 0.65rem; text-transform: uppercase; }

.task-toggle {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
  color: var(--primary);
  padding: 0;
  width: 1.5rem;
}

.task-toggle:disabled { opacity: 0.4; cursor: default; }

.row-muted { opacity: 0.55; }

.text-success { color: #059669; font-weight: 600; }
.text-danger { color: #dc2626; font-weight: 600; }

.card-header .link-btn {
  float: right;
  font-size: 0.75rem;
  font-weight: 500;
}

.readonly-form input:disabled {
  background: var(--bg);
  color: var(--text-muted);
}

.contact-link {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.8125rem;
}

.contact-link:hover { text-decoration: underline; }

.row-actions {
  white-space: nowrap;
  text-align: right;
}

.row-actions .link-btn + .link-btn { margin-left: 0.5rem; }

/* Partner cabinet */
.partner-body { background: var(--bg); min-height: 100vh; }

.partner-app { min-height: 100vh; display: flex; flex-direction: column; }

.partner-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.partner-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.partner-topbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.partner-user {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.partner-main {
  flex: 1;
  padding: 1.5rem;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.login-footer-link {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.8125rem;
}

.login-footer-link a {
  color: var(--primary);
  text-decoration: none;
}

.login-footer-link a:hover { text-decoration: underline; }

.form-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1rem 0;
}

.form-section-title {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
}

/* Reservation form — destination & hotel picker */
.res-location-section,
.res-room-section {
  background: linear-gradient(165deg, #fafbfc 0%, #f4f6f9 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem 1.15rem;
  margin-bottom: 0.25rem;
}

.res-room-section {
  background: linear-gradient(165deg, #fff 0%, #f8fafc 100%);
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.res-location-title {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.res-location-flow {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.res-location-flow::before {
  content: "";
  position: absolute;
  left: 0.95rem;
  top: 1.75rem;
  bottom: 1.75rem;
  width: 2px;
  background: linear-gradient(180deg, var(--primary-soft) 0%, var(--border) 50%, var(--border) 100%);
  border-radius: 1px;
  pointer-events: none;
}

.res-loc-field {
  position: relative;
  padding: 0.65rem 0 0.85rem 2.5rem;
}

.res-loc-field:last-child {
  padding-bottom: 0.35rem;
}

.res-loc-field.is-disabled {
  opacity: 0.55;
}

.res-loc-field-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.res-loc-field-head label {
  margin-bottom: 0 !important;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
}

.res-loc-step {
  position: absolute;
  left: 0;
  top: 0.72rem;
  width: 1.9rem;
  height: 1.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  z-index: 1;
}

.res-loc-badge {
  margin-left: auto;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
}

.res-input-wrap,
.res-select-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.res-field-icon {
  position: absolute;
  left: 0.75rem;
  font-size: 1rem;
  line-height: 1;
  pointer-events: none;
  z-index: 1;
  opacity: 0.85;
}

.res-input-wrap .res-input,
.res-select-wrap .res-select {
  width: 100%;
  padding: 0.62rem 0.85rem 0.62rem 2.35rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
  font-size: 0.9rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.res-select-wrap .res-select {
  padding-left: 0.85rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2rem;
  cursor: pointer;
}

.res-select-wrap:has(.res-field-icon) .res-select {
  padding-left: 2.35rem;
}

.res-select-country {
  font-size: 0.9375rem;
  font-weight: 500;
}

.res-input-wrap .res-input:focus,
.res-select-wrap .res-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.res-input-wrap .res-input:disabled {
  background: #f1f5f9;
  cursor: not-allowed;
}

.res-loc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.55rem;
}

.res-loc-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.1s;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.res-loc-chip:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

.res-loc-chip.is-active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

.res-loc-chip-hotel {
  max-width: 14rem;
}

.res-loc-hint {
  margin-top: 0.4rem !important;
  font-size: 0.6875rem;
}

.res-loc-room {
  padding-left: 2.5rem;
}

.res-loc-room .res-loc-step {
  top: 0.15rem;
}

.res-loc-room .res-loc-field-head {
  margin-bottom: 0.45rem;
}

.room-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
  gap: 0.55rem;
  margin-top: 0.15rem;
}

.room-type-card {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1.5px solid var(--border, #e2e8f0);
  border-radius: 12px;
  background: var(--surface, #fff);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s, transform 0.12s;
  position: relative;
}

.room-type-card:hover {
  border-color: var(--primary-muted, #93c5fd);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

.room-type-card.is-active {
  border-color: var(--primary, #2563eb);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.06) 0%, rgba(37, 99, 235, 0.02) 100%);
  box-shadow: 0 0 0 1px var(--primary, #2563eb), 0 4px 12px rgba(37, 99, 235, 0.12);
}

.room-type-card-icon {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.95rem;
  background: var(--surface-muted, #f1f5f9);
}

.room-tier-deluxe .room-type-card-icon {
  background: rgba(124, 58, 237, 0.1);
}

.room-tier-superior .room-type-card-icon {
  background: rgba(14, 165, 233, 0.12);
}

.room-tier-suite .room-type-card-icon {
  background: rgba(217, 119, 6, 0.12);
}

.room-type-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.room-type-card-name {
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
}

.room-type-card-rate {
  font-size: 0.6875rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.room-type-card.is-active .room-type-card-rate {
  color: var(--primary, #2563eb);
}

.room-type-card-check {
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 50%;
  border: 1.5px solid var(--border, #cbd5e1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  color: transparent;
  margin-top: 0.1rem;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.room-type-card.is-active .room-type-card-check {
  background: var(--primary, #2563eb);
  border-color: var(--primary, #2563eb);
  color: #fff;
}

.room-type-card-other .room-type-card-icon {
  background: rgba(100, 116, 139, 0.12);
}

.room-type-card-other.is-active {
  border-color: var(--text-muted, #64748b);
  background: linear-gradient(135deg, rgba(100, 116, 139, 0.08) 0%, rgba(100, 116, 139, 0.02) 100%);
  box-shadow: 0 0 0 1px var(--text-muted, #64748b);
}

.room-type-card-other.is-active .room-type-card-check {
  background: var(--text-muted, #64748b);
  border-color: var(--text-muted, #64748b);
}

.res-loc-room-pending .room-type-pending-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 0.85rem 1rem;
  margin-top: 0.15rem;
  border: 1.5px dashed var(--border, #cbd5e1);
  border-radius: 12px;
  background: var(--surface-muted, #f8fafc);
}

.room-type-pending-icon {
  font-size: 1.25rem;
  line-height: 1;
}

#room-type-other-wrap {
  margin-top: 0.5rem;
  padding-left: 2.5rem;
}

#room-type-other-wrap .res-input,
#room-type-other-wrap input {
  border-radius: 10px;
}

.reservation-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 1rem 1.5rem;
}

.reservation-details-grid .detail-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.reservation-details-grid .reservation-names {
  grid-column: 1 / -1;
}

.extra-services-card .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.extra-services-total {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
}

.extra-services-table .extra-service-cat {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.extra-services-table .extra-service-notes {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.extra-services-table .extra-service-actions {
  white-space: nowrap;
}

.extra-services-add-form {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border, #e2e8f0);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.extra-services-add-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: 0.75rem 1rem;
}

.extra-services-name-field {
  grid-column: span 2;
}

.extra-services-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border, #e2e8f0);
}

.extra-services-pricing-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 1rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface-muted, #f8fafc);
  border-radius: 8px;
}

.extra-services-pricing-preview .detail-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.extra-services-add-form label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.settings-add-user-actions {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.settings-add-user-status.field-hint-success {
  color: var(--success, #059669);
}

.field-hint {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.field-hint-success {
  color: var(--success, #059669);
}

.field-action-btn {
  margin-top: 0.5rem;
}

#room-type-other-wrap.hidden {
  display: none;
}

.input-readonly {
  background: var(--surface-muted, #f1f5f9);
  color: var(--text);
  cursor: default;
}

#website-rates-selected-wrap.hidden,
#website-price-wrap.hidden {
  display: none;
}

.website-rates-table-wrap {
  margin-top: 0.75rem;
}

.website-rates-table {
  font-size: 0.8125rem;
}

.website-rates-table th,
.website-rates-table td {
  padding: 0.4rem 0.6rem;
}

.website-rates-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-top: 0.35rem;
}

.rate-option {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  background: var(--surface-muted, #f8fafc);
}

.rate-option:has(input:checked) {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 8%, white);
}

.rate-option input {
  margin-top: 0.2rem;
}

.rate-option-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.rate-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.rate-value {
  font-size: 1rem;
}

#website-rates-wrap {
  margin-top: 0.75rem;
}

.official-site-panel {
  margin: 0.75rem 0;
  padding: 0.85rem 1rem;
  background: var(--surface-muted, #f8fafc);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.official-site-btn {
  display: inline-flex;
  margin-top: 0.35rem;
  text-decoration: none;
}

.field-hint-warn {
  color: #b45309;
}

.sub-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

#manual-rates-selected-wrap.hidden {
  display: none;
}

.rate-display-card {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-muted, #f8fafc);
}

.rate-display-card .rate-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.website-rates-display {
  margin-top: 0.35rem;
}

#room-price-panels-container.hidden {
  display: none;
}

.room-price-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.price-panel {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-muted, #f8fafc);
  overflow: hidden;
}

.price-panel-internet {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.price-panel-official {
  border-color: #fde68a;
  background: #fffbeb;
}

.price-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  background: color-mix(in srgb, white 55%, transparent);
}

.price-panel-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

.price-panel-tag-breakfast {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
  text-transform: none;
  font-weight: 600;
  letter-spacing: 0;
}

.price-panel-title {
  font-size: 0.8125rem;
  font-weight: 600;
}

.price-panel-tag {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.price-panel-body {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.price-panel-main {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.price-panel-value {
  font-size: 1.35rem;
  line-height: 1.2;
}

.price-panel-unit {
  font-size: 0.8125rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.price-panel-rate {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.price-panel-rate .rate-label {
  min-width: 5.5rem;
}

.official-rate-fields {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.official-rate-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.official-rate-fields-readonly .official-rate-field {
  gap: 0.25rem;
}

.official-rate-fields-readonly .price-panel-main {
  margin: 0;
}

.price-comparison-dates {
  margin: 0 0 0.65rem;
  font-size: 0.875rem;
  color: var(--text-muted, #64748b);
  font-weight: 500;
}

.breakfast-toggle {
  display: inline-flex;
  gap: 0.35rem;
  margin: 0 0 0.75rem;
  padding: 0.2rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border) 35%, transparent);
}

.breakfast-toggle-option {
  display: inline-flex;
  align-items: center;
  margin: 0;
  cursor: pointer;
}

.breakfast-toggle-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.breakfast-toggle-option span {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted, #64748b);
  transition: background 0.15s ease, color 0.15s ease;
}

.breakfast-toggle-option.is-active span {
  background: white;
  color: var(--text, #0f172a);
  box-shadow: 0 1px 3px rgb(15 23 42 / 0.08);
}

.price-comparison-dates strong {
  color: var(--text, #0f172a);
}

.reservation-rates-stay-note {
  grid-column: 1 / -1;
  padding-bottom: 0.25rem;
  border-bottom: 1px dashed color-mix(in srgb, var(--border) 60%, transparent);
  margin-bottom: 0.25rem;
}

.official-rate-field .rate-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.official-rate-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.official-rate-input {
  width: 6.5rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.875rem;
}

.price-panel-empty {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.8125rem;
  align-self: flex-start;
}

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

#official-rates-ref-container.hidden {
  display: none;
}

.stay-dates-section {
  margin: 0.25rem 0 0.5rem;
}

.stay-dates-section .form-section-title {
  margin-bottom: 0.5rem;
}

.stay-range-summary {
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.75rem;
  background: var(--surface-muted, #f8fafc);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.stay-range-summary strong {
  color: var(--text);
}

.stay-range-picker {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0.75rem;
}

.stay-range-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.stay-range-months {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.stay-range-months.stay-range-single {
  grid-template-columns: 1fr;
  max-width: 17.6rem;
  margin: 0 auto;
}

.stay-range-month-label {
  text-align: center;
  font-size: 0.79rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.stay-range-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
}

.stay-range-head {
  text-align: center;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.18rem 0;
}

.stay-day {
  aspect-ratio: 1;
  min-height: 1.43rem;
  border: none;
  border-radius: 5px;
  background: transparent;
  font: inherit;
  font-size: 0.79rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.stay-day:hover:not(.stay-day-empty) {
  background: var(--primary-soft);
}

.stay-day.is-today {
  box-shadow: inset 0 0 0 1px var(--primary);
}

.stay-day.in-range {
  background: var(--primary-soft);
  border-radius: 0;
}

.stay-day.range-start {
  background: var(--primary);
  color: #fff;
  border-radius: 6px 0 0 6px;
}

.stay-day.range-end {
  background: var(--primary);
  color: #fff;
  border-radius: 0 6px 6px 0;
}

.stay-day.range-start.range-end {
  border-radius: 6px;
}

.stay-day-empty {
  pointer-events: none;
}

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

.official-rates-ref-wrap {
  margin-top: 0.75rem;
}

.ezus-api-key-input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8125rem;
}

.ezus-save-status {
  margin-top: 0.65rem;
  margin-bottom: 0;
}

.field-hint-error {
  color: #b91c1c;
}

.ezus-import-log {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  background: var(--surface-muted, #f8fafc);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.8125rem;
  white-space: pre-wrap;
  max-height: 12rem;
  overflow: auto;
}

.ezus-import-log.hidden {
  display: none;
}

.ezus-import-log-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.ezus-session-status {
  margin-top: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  background: var(--surface-muted, #f8fafc);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.ezus-session-status.connected {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}

.pricing-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: var(--surface-muted, #f8fafc);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.pricing-summary-item strong {
  display: block;
  font-size: 1.05rem;
  margin-top: 0.15rem;
}

.login-remember {
  margin: 0.25rem 0 0.75rem;
  font-size: 0.875rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.detail-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}

.stat-value-sm { font-size: 1.15rem !important; }

.currency-stat-stack {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.currency-stat-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.35;
}

.currency-stat-code {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  min-width: 2rem;
}

.currency-stat-value {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.currency-stat-empty {
  color: var(--text-muted);
}

.stat-card .currency-stat-stack .currency-stat-line {
  font-size: 0.8125rem;
}

.currency-summary-block {
  margin-bottom: 0.25rem;
}

.chart-hint {
  margin: -0.25rem 0 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.currency-stats-table .currency-col {
  white-space: nowrap;
  min-width: 5.5rem;
}

.currency-stats-table th.currency-col {
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

.quote-ref { margin: 0 0 0.5rem; font-size: 0.875rem; }

.text-muted { color: var(--text-muted); font-size: 0.75rem; }

code {
  font-size: 0.75rem;
  background: var(--bg);
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
}

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

/* Reservation calendar */
.cal-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.cal-month-label { flex: 1; text-align: center; font-size: 1rem; }

.cal-legend {
  display: flex;
  gap: 1.25rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.cal-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.35rem;
  vertical-align: middle;
}

.cal-dot.arrival { background: #059669; }
.cal-dot.departure { background: #d97706; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.cal-head {
  background: var(--bg);
  padding: 0.5rem;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

.cal-cell {
  background: var(--surface);
  min-height: 88px;
  padding: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cal-cell.cal-empty { background: #f8f9fb; }
.cal-cell.cal-today { background: var(--primary-soft); }

.cal-day-num {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

.cal-today .cal-day-num { color: var(--primary); }

.cal-events { display: flex; flex-direction: column; gap: 0.2rem; }

.cal-event {
  border: none;
  border-radius: 4px;
  padding: 0.2rem 0.35rem;
  text-align: left;
  cursor: pointer;
  font: inherit;
  font-size: 0.62rem;
  line-height: 1.25;
}

.cal-event.cal-arrival { background: #d1fae5; color: #065f46; }
.cal-event.cal-departure { background: #fef3c7; color: #92400e; }

.cal-event-type { display: block; font-weight: 700; font-size: 0.58rem; }
.cal-event-title { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 800px) {
  .cal-cell { min-height: 64px; }
  .cal-event-title { display: none; }
}

.status-flow-body {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8125rem;
}

.status-update-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0;
  border-top: 1px solid var(--border);
  margin-top: -0.25rem;
}

.status-update-row label {
  font-size: 0.8125rem;
  font-weight: 600;
  margin: 0;
}

.status-update-row select {
  min-width: 10rem;
}

.status-step {
  color: var(--text-muted);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: var(--bg);
}

.status-step.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}

.team-workload {
  list-style: none;
  margin: 0;
  padding: 0;
}

.team-workload li {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.team-workload li:last-child { border-bottom: none; }

.team-presence-grid {
  display: grid;
  grid-template-columns: minmax(16rem, 1fr) minmax(20rem, 1.4fr);
  gap: 1rem;
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 960px) {
  .team-presence-grid {
    grid-template-columns: 1fr;
  }
}

.team-online-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.team-online-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border, #e2e8f0);
}

.team-online-item:last-child { border-bottom: none; }

.team-online-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.team-online-avatar-muted { opacity: 0.65; }

.team-online-meta {
  flex: 1;
  min-width: 0;
}

.team-online-meta strong {
  display: block;
  font-size: 0.9rem;
}

.team-online-meta span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.presence-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.presence-dot-online {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.presence-dot-offline {
  background: var(--text-muted, #94a3b8);
}

.team-presence-subtitle {
  margin: 1rem 0 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.team-online-list-compact .team-online-item {
  padding: 0.4rem 0;
}

.team-usage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.usage-period-tabs {
  display: flex;
  gap: 0.35rem;
}

.usage-period-btn {
  border: 1px solid var(--border, #e2e8f0);
  background: var(--surface, #fff);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  cursor: pointer;
}

.usage-period-btn.active {
  background: var(--accent, #E9472E);
  border-color: var(--accent, #E9472E);
  color: #fff;
}

.usage-bar-cell {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  justify-content: flex-end;
}

.usage-bar-track {
  width: 5rem;
  height: 0.35rem;
  background: var(--surface-muted, #f1f5f9);
  border-radius: 999px;
  overflow: hidden;
}

.usage-bar-fill {
  height: 100%;
  background: var(--accent, #E9472E);
  border-radius: 999px;
}

.team-usage-table tfoot td {
  border-top: 2px solid var(--border, #e2e8f0);
  padding-top: 0.65rem;
}

.card-header-sub {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.profit-positive { color: #059669; }
.profit-negative { color: #dc2626; }

.financial-block .financial-kpis {
  margin-bottom: 0;
}

.financial-section {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.financial-section-title {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stats-year-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.stats-year-toolbar label {
  font-weight: 600;
  font-size: 0.875rem;
}

.stats-year-toolbar select {
  min-width: 6rem;
}

.stats-year-toolbar .field-hint {
  margin: 0;
  flex: 1 1 12rem;
}

.col-hidden {
  display: none !important;
}

.column-picker-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.column-picker-item {
  padding: 0.35rem 0;
}

.column-add-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.column-add-btn {
  text-align: left;
}

.agency-balance-table { font-size: 0.8125rem; min-width: 1280px; }
.agency-balance-table th { white-space: nowrap; }
.agency-balance-table .num-cell { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.agency-balance-table .balance-due { color: #dc2626; font-weight: 600; }
.agency-balance-table .balance-partial { color: #b45309; font-weight: 600; }
.agency-balance-table .balance-paid { color: #059669; font-weight: 600; }
.agency-balance-table tr.agency-balance-paid { background: #ecfdf5; }
.agency-balance-table tr.agency-balance-paid:hover { background: #d1fae5; }
.agency-balance-table tr.agency-balance-partial { background: #fefce8; }
.agency-balance-table tr.agency-balance-partial:hover { background: #fef9c3; }
.agency-balance-table tr.agency-balance-unpaid { background: #fef2f2; }
.agency-balance-table tr.agency-balance-unpaid:hover { background: #fee2e2; }
.agency-balance-totals td { border-top: 2px solid var(--border); background: var(--surface-muted, #f8fafc); font-weight: 600; }

.accountant-reservations-table { font-size: 0.8125rem; min-width: 1200px; }
.accountant-reservations-table th { white-space: nowrap; }
.accountant-reservations-table .guest-names-cell {
  max-width: 10rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reservation-no {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text, #1e293b);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  background: var(--surface-muted, #f1f5f9);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 999px;
  padding: 2px;
}

.lang-switch button {
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text-muted, #64748b);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.lang-switch button:hover {
  color: var(--text, #1e293b);
}

.lang-switch button.active {
  background: var(--primary, #2563eb);
  color: #fff;
}

.lang-switch-login {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.bank-cashback-quick-entry .bank-cashback-inline-form .form-row {
  align-items: flex-end;
}

.bank-cashback-quick-entry .field-hint {
  margin-bottom: 0.75rem;
}


.bonus-rules-list {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
}

.bonus-rules-list li {
  margin-bottom: 0.35rem;
}

.bonus-example {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted, #64748b);
}

.bonus-period-field {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.bonus-program-table .num-col,
.bonus-program-table .num-cell {
  text-align: right;
  white-space: nowrap;
}

.bonus-program-table tr.bonus-positive td:last-child {
  color: var(--success, #059669);
}

.bonus-program-table tr.bonus-below-min td:first-of-type {
  color: var(--text-muted, #64748b);
}

.badge-role {
  background: var(--surface-2, #f1f5f9);
  color: var(--text-muted, #64748b);
  font-weight: 500;
}

.salary-rules-list {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
}

.salary-rules-list li {
  margin-bottom: 0.35rem;
}

.salary-window-notice {
  margin-bottom: 1.25rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e40af;
  font-size: 0.9rem;
}

.salary-window-closed {
  background: #f8fafc;
  color: #64748b;
}

.salary-table .salary-amount-input {
  width: 7rem;
  text-align: right;
}

.salary-table tr.salary-adjusted td {
  background: #fffbeb;
}

.crm-mode-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  padding: 0.45rem 1rem;
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #7c2d12;
  background: #ffedd5;
  border-bottom: 1px solid #fdba74;
}

body.crm-mode-test #app,
body.crm-mode-test .login-screen {
  padding-top: 2rem;
}

.sales-yoy-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 0.5rem;
}

.sales-yoy-year-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.yoy-baseline-year-select {
  min-width: 5.5rem;
}

.sales-yoy-vs {
  font-size: 0.875rem;
}

.sales-yoy-table .yoy-baseline-input {
  width: 100%;
  min-width: 6.5rem;
  max-width: 9rem;
  text-align: right;
  padding: 0.35rem 0.5rem;
}

.sales-yoy-total-row td {
  border-top: 2px solid var(--border, #e2e8f0);
  background: var(--surface-muted, #f8fafc);
}

.sales-yoy-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.sales-yoy-save-status.field-hint {
  margin: 0;
  color: #059669;
}

.payment-flags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
  margin-top: 0.5rem;
}

.payment-flag-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  cursor: pointer;
}

.payment-flag-label input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent, #2563eb);
}

.future-payments-toolbar-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.future-payments-period-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.future-payments-period-label {
  min-width: 10rem;
  text-align: center;
}

.future-payments-date-input {
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 0.375rem;
}

.payment-planning-cal .cal-has-payment {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.cal-payment-total {
  font-size: 0.6875rem;
  font-weight: 600;
  color: #047857;
  margin-top: 0.25rem;
}

.future-payments-total-row td {
  border-top: 2px solid var(--border, #e2e8f0);
  background: var(--surface-muted, #f8fafc);
}

.sales-yoy-summary-card .card-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sales-yoy-metric {
  padding: 0.85rem 1rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 0.65rem;
  background: var(--surface-muted, #f8fafc);
}

.sales-yoy-metric-label {
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 0.65rem;
}

.sales-yoy-metric-values {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.sales-yoy-metric-caption {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted, #64748b);
  margin-bottom: 0.2rem;
}

.sales-yoy-metric-current {
  font-size: 1.05rem;
}

.sales-yoy-summary-footer {
  margin-top: 0.25rem;
}

@media (max-width: 720px) {
  .sales-yoy-metric-values {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Ivan — sales analytics chart (combo bar + line) */
.sales-analytics-card {
  margin-bottom: 1.25rem;
}

.sales-3y-chart-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.sales-3y-chart-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.sales-3y-period-tabs {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.2rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.sales-3y-period-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
}

.sales-3y-period-btn:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.04);
}

.sales-3y-period-btn.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

@media (max-width: 720px) {
  .sales-3y-chart-header {
    flex-direction: column;
    align-items: stretch;
  }

  .sales-3y-period-tabs {
    align-self: flex-start;
  }
}

.sales-analytics-subtitle {
  margin: 0 0 0.85rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.sales-analytics-chart-wrap {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  padding-bottom: 0.25rem;
  padding-left: 0.15rem;
}

.sales-analytics-svg {
  display: block;
  width: 100%;
  min-width: 640px;
  height: auto;
  overflow: visible;
}

.sales-analytics-grid {
  stroke: #e8ecef;
  stroke-width: 1;
}

.sales-analytics-axis {
  stroke: #cfd8dc;
  stroke-width: 1.25;
}

.sales-analytics-y-label {
  font-size: 11px;
  fill: #607d8b;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.sales-analytics-x-label {
  font-size: 11px;
  fill: #607d8b;
}

.sales-analytics-bar {
  opacity: 0.92;
}

.sales-analytics-line {
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sales-analytics-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem 1.75rem;
  margin-top: 0.65rem;
  padding-top: 0.65rem;
}

.sales-analytics-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #546e7a;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.sales-analytics-swatch {
  width: 1.35rem;
  height: 0.65rem;
  border-radius: 2px;
  background: var(--swatch-color, #2563EB);
}

.sales-analytics-swatch-bar {
  background: #16A34A;
}

.sales-analytics-swatch-line {
  width: 1.5rem;
  height: 0;
  border-top: 2.5px dashed var(--swatch-color, #2563EB);
  border-radius: 0;
  background: transparent;
}

.sales-analytics-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1.1rem;
}

.sales-analytics-kpi {
  background: #f3f5f6;
  border-radius: 8px;
  padding: 1rem 1.1rem;
  text-align: center;
}

.sales-analytics-kpi-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #78909c;
  margin-bottom: 0.35rem;
}

.sales-analytics-kpi-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: #1e293b;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 720px) {
  .sales-analytics-kpis {
    grid-template-columns: 1fr;
  }
}

/* Hotel database */
.hotel-db-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 1rem 0.75rem;
}

.hotel-database-table .hotel-address-cell {
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hotel-database-table,
.agency-database-table {
  min-width: 1100px;
}

body.crm-db-export-locked .crm-db-protect {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

body.crm-db-export-locked .crm-db-protect .hotel-ezus-raw {
  pointer-events: none;
}

.hotel-database-table .crm-db-phone-cell,
.agency-database-table .crm-db-phone-cell {
  min-width: 11.5rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.hotel-stars-num {
  color: var(--text-muted, #64748b);
  font-size: 0.75rem;
  margin-left: 0.15rem;
}

.hotel-stars-palace {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #92400e;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid #f59e0b;
  border-radius: 0.25rem;
  padding: 0.1rem 0.45rem;
}

.hotel-source-badge {
  white-space: nowrap;
}

.hotel-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.hotel-detail-wide {
  grid-column: 1 / -1;
}

.hotel-detail-body {
  display: grid;
  gap: 0.65rem;
}

.hotel-detail-row {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.75rem;
  align-items: start;
}

.hotel-detail-label {
  font-size: 0.8125rem;
  color: var(--text-muted, #64748b);
}

.hotel-detail-value {
  font-size: 0.875rem;
  word-break: break-word;
}

.hotel-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.hotel-chip {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--surface-muted, #f1f5f9);
  font-size: 0.75rem;
}

.hotel-notes {
  white-space: pre-wrap;
  margin: 0;
}

.hotel-ezus-raw {
  margin: 0;
  padding: 0.75rem;
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 0.75rem;
  line-height: 1.45;
  max-height: 24rem;
  overflow: auto;
}

.page-header-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

@media (max-width: 900px) {
  .hotel-detail-grid {
    grid-template-columns: 1fr;
  }

  .hotel-detail-row {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .profit-share-layout {
    flex-direction: column;
    align-items: center;
  }

  .profit-share-legend {
    width: 100%;
  }
}

/* Financial management — profit share donut */
.profit-share-card {
  margin-bottom: 1.25rem;
}

.profit-share-card .chart-hint {
  margin: 0 0 1rem;
}

.profit-share-layout {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.profit-share-chart-wrap {
  position: relative;
  width: 220px;
  height: 220px;
  flex-shrink: 0;
}

.profit-share-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.profit-share-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
  padding: 0 1.5rem;
}

.profit-share-center-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.profit-share-center-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.profit-share-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  flex: 1;
  min-width: 240px;
}

.profit-share-legend-item {
  display: grid;
  grid-template-columns: 14px 1fr auto auto;
  gap: 0.65rem 0.75rem;
  align-items: center;
  font-size: 0.875rem;
}

.profit-share-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: var(--swatch-color, #2563eb);
}

.profit-share-legend-label {
  font-weight: 600;
  color: var(--text);
}

.profit-share-legend-value {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.profit-share-legend-amount {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.profit-share-empty {
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: 1rem 0;
}
