:root {
  --ivory: #f7f3ea;
  --ivory-2: #efe7d9;
  --ink: #111827;
  --muted: #6b7280;
  --paper: #fffdf8;
  --paper-strong: #ffffff;
  --navy: #071323;
  --navy-2: #0d2138;
  --gold: #b88a44;
  --gold-soft: #e7d2a7;
  --line: #e4dccd;
  --line-cool: #d7dde6;
  --danger: #9f352d;
  --success: #1f6f52;
  --shadow: 0 26px 70px rgba(7, 19, 35, 0.11);
  --shadow-soft: 0 14px 34px rgba(7, 19, 35, 0.07);
  --glow: 0 18px 48px rgba(184, 138, 68, 0.16);
  --radius: 14px;
}

.lucia-panel {
  margin-bottom: 18px;
  padding: 22px;
  background: rgba(255, 253, 248, 0.96);
  border: 1px solid rgba(184, 138, 68, 0.22);
  border-radius: 16px;
  box-shadow: 0 18px 42px rgba(7, 19, 35, 0.075);
}

.lucia-panel .panel-head {
  margin-bottom: 14px;
}

.lucia-panel .panel-head h2 {
  font-size: 23px;
}

.cassa-operativa-panel {
  background:
    linear-gradient(145deg, rgba(255, 253, 248, 0.96), rgba(249, 244, 234, 0.96)),
    radial-gradient(circle at 100% 0%, rgba(184, 138, 68, 0.09), transparent 30%);
}

.lucia-zero-note {
  margin: 14px 0 0;
  color: #6f5b3d;
  font-size: 13px;
}

.lucia-diagnostics {
  background:
    linear-gradient(145deg, rgba(255, 253, 248, 0.96), rgba(246, 239, 226, 0.96)),
    radial-gradient(circle at 0% 0%, rgba(7, 19, 35, 0.05), transparent 32%);
}

.diagnostic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.diagnostic-grid div {
  padding: 12px;
  border: 1px solid rgba(184, 138, 68, 0.2);
  border-radius: 12px;
  background: rgba(255, 250, 240, 0.7);
}

.diagnostic-grid span,
.diagnostic-lists h3 {
  display: block;
  color: #7a6b59;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.diagnostic-grid strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 24px;
}

.diagnostic-lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.diagnostic-lists > div {
  padding: 14px;
  border: 1px solid rgba(7, 19, 35, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.48);
}

.diagnostic-lists p {
  margin: 8px 0 0;
  color: #5f4b2c;
  font-size: 12px;
  line-height: 1.45;
}

.lucia-table-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  gap: 18px;
  align-items: start;
}

.lucia-table-grid h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 21px;
}

@media (max-width: 1100px) {
  .lucia-table-grid {
    grid-template-columns: 1fr;
  }

  .diagnostic-grid,
  .diagnostic-lists {
    grid-template-columns: 1fr;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 77% 9%, rgba(184, 138, 68, 0.16), transparent 30%),
    radial-gradient(circle at 18% 32%, rgba(7, 19, 35, 0.055), transparent 24%),
    linear-gradient(135deg, #fbf8f0 0%, var(--ivory) 48%, #eee6d8 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  right: 38px;
  bottom: 34px;
  z-index: -1;
  width: 260px;
  height: 220px;
  background: url("./assets/logo.jpeg") center / contain no-repeat;
  opacity: 0.045;
  filter: saturate(0.65);
}

button,
input,
select {
  font: inherit;
}

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

.readonly-badge {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  color: #fff8e8;
  background: rgba(184, 138, 68, 0.22);
  border: 1px solid rgba(184, 138, 68, 0.55);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 12px 28px rgba(7, 19, 35, 0.16);
}

.readonly-locked .app-shell,
.readonly-locked .sidebar {
  filter: blur(6px);
  pointer-events: none;
  user-select: none;
}

.readonly-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 19, 35, 0.58);
  backdrop-filter: blur(8px);
}

.readonly-card {
  width: min(430px, 100%);
  padding: 30px;
  color: var(--ink);
  background: linear-gradient(145deg, rgba(255, 253, 248, 0.98), rgba(247, 243, 234, 0.94));
  border: 1px solid rgba(184, 138, 68, 0.42);
  border-radius: 18px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
}

.readonly-card h2 {
  margin: 0 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
}

.readonly-card p {
  color: var(--muted);
  line-height: 1.55;
}

.readonly-card input {
  width: 100%;
  height: 48px;
  margin: 12px 0;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.readonly-card button {
  width: 100%;
  min-height: 46px;
  color: #fff;
  background: var(--navy);
  border: 1px solid var(--navy);
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
}

.readonly-card small {
  display: block;
  min-height: 18px;
  margin-top: 12px;
  color: var(--danger);
  font-weight: 700;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 274px;
  padding: 26px 20px;
  color: #fff;
  background:
    radial-gradient(circle at 18% 8%, rgba(184, 138, 68, 0.13), transparent 23%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 34%),
    #071323;
  border-right: 1px solid rgba(231, 210, 167, 0.18);
}

.sidebar::after {
  content: "";
  position: absolute;
  inset: auto 22px 26px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(184, 138, 68, 0.65), transparent);
}

.brand {
  display: grid;
  gap: 14px;
  align-items: center;
  justify-items: start;
  padding: 4px 2px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-mark {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  overflow: hidden;
  background: #1d1d1d;
  border: 1px solid rgba(184, 138, 68, 0.9);
  border-radius: 16px;
  box-shadow: inset 0 0 0 5px rgba(7, 19, 35, 0.8), 0 16px 34px rgba(0, 0, 0, 0.22);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  max-width: 190px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 1.13;
}

.brand small {
  margin-top: 6px;
  color: #aeb9c7;
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 5px;
  margin-top: 28px;
}

.nav a {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  color: #dce4ef;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 0 12px 12px 0;
  border-left: 2px solid transparent;
  transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}

.nav a span {
  color: rgba(184, 138, 68, 0.62);
  font-size: 11px;
  font-weight: 700;
}

.nav a:first-child,
.nav a.active,
.nav a:hover {
  color: #fff;
  background: linear-gradient(90deg, rgba(184, 138, 68, 0.18), rgba(255, 255, 255, 0.052));
  border-left-color: var(--gold);
  box-shadow: inset 0 0 0 1px rgba(184, 138, 68, 0.06);
}

.nav a:hover {
  transform: translateX(4px);
}

.app-shell {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 100vh;
  height: 100vh;
  margin-left: 274px;
  width: calc(100vw - 274px);
  padding: 34px;
  overflow: hidden;
}

.topbar {
  position: relative;
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  min-height: 268px;
  padding: 34px;
  overflow: hidden;
  background:
    radial-gradient(circle at 68% 18%, rgba(184, 138, 68, 0.28), transparent 22%),
    linear-gradient(96deg, rgba(255, 253, 248, 0.98) 0%, rgba(255, 253, 248, 0.9) 39%, rgba(7, 19, 35, 0.9) 100%),
    url("./assets/background.jpeg") right center / cover no-repeat;
  border: 1px solid rgba(228, 220, 205, 0.95);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(8px);
}

.topbar::after {
  content: "";
  position: absolute;
  inset: 16px;
  pointer-events: none;
  border: 1px solid rgba(184, 138, 68, 0.28);
  border-radius: 12px;
}

.topbar > * {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 680px;
}

.hero-copy {
  max-width: 680px;
}

h1 {
  margin-bottom: 5px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 48px;
  font-weight: 600;
  line-height: 1.05;
}

h2 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  font-weight: 600;
}

h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
}

.subtitle {
  margin-bottom: 7px;
  color: var(--navy-2);
  font-size: 16px;
  letter-spacing: 0.04em;
}

.muted {
  color: var(--muted);
}

.quick-filters {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(138px, 1fr));
  gap: 10px;
  margin-top: 16px;
  padding: 10px;
  background: rgba(255, 253, 248, 0.68);
  border: 1px solid rgba(184, 138, 68, 0.28);
  border-radius: 14px;
  box-shadow: 0 14px 30px rgba(7, 19, 35, 0.08);
  backdrop-filter: blur(10px);
}

.quick-filters label {
  display: grid;
  gap: 5px;
}

.quick-filters span {
  color: var(--gold);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.quick-filters select {
  min-height: 38px;
  min-width: 138px;
  padding: 0 11px;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(184, 138, 68, 0.36);
  border-radius: 10px;
  outline: none;
}

.quick-filters select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184, 138, 68, 0.14);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.auth-status {
  display: flex;
  flex: 1 1 100%;
  justify-content: flex-end;
  gap: 6px;
  min-height: 30px;
}

.auth-login {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.auth-login input {
  width: 132px;
  min-height: 30px;
  padding: 0 9px;
  color: var(--navy);
  background: rgba(255, 253, 248, 0.94);
  border: 1px solid rgba(184, 138, 68, 0.46);
  border-radius: 8px;
}

.auth-login button,
.auth-logout,
.auth-pill {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.auth-pill {
  display: inline-flex;
  align-items: center;
  color: #fff8e8;
  background: rgba(7, 19, 35, 0.76);
  border: 1px solid rgba(231, 210, 167, 0.36);
}

.auth-pill.warning {
  color: #7c1f12;
  background: #fff4dd;
}

.mobile-menu-button {
  display: none;
}

#toggleFilters.active {
  color: var(--navy);
  background: #fff7e8;
  border-color: var(--gold);
}

button,
.file-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  color: #fff;
  background: var(--navy);
  border: 1px solid var(--navy);
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(7, 19, 35, 0.12);
  cursor: pointer;
  transition: background 0.22s ease, border-color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}

.file-button input {
  display: none;
}

button:hover,
.file-button:hover {
  background: var(--navy-2);
  border-color: var(--gold);
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(7, 19, 35, 0.18), 0 0 0 3px rgba(184, 138, 68, 0.08);
}

.section {
  display: none;
  min-height: 0;
  margin-bottom: 0;
  padding-right: 4px;
  overflow: auto;
  scroll-margin-top: 22px;
}

.section.active {
  display: block;
  flex: 1 1 auto;
}

.executive-strip {
  display: none;
  margin: -6px 0 18px;
}

.executive-strip.active {
  display: block;
}

.hero-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.hero-kpi {
  position: relative;
  min-height: 168px;
  overflow: hidden;
  padding: 25px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 249, 238, 0.96)),
    radial-gradient(circle at 88% 10%, rgba(184, 138, 68, 0.16), transparent 30%);
  border: 1px solid rgba(184, 138, 68, 0.38);
  border-radius: 18px;
  box-shadow: var(--shadow), var(--glow);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.hero-kpi::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-top: 2px solid var(--gold);
}

.hero-kpi::after {
  content: "◆";
  position: absolute;
  top: 22px;
  right: 22px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--gold);
  border: 1px solid rgba(184, 138, 68, 0.28);
  border-radius: 12px;
  font-size: 13px;
}

.hero-kpi.positive::after {
  content: "↗";
}

.hero-kpi.warning::after {
  content: "!";
}

.hero-kpi:hover {
  transform: translateY(-3px);
  border-color: rgba(184, 138, 68, 0.64);
  box-shadow: 0 34px 80px rgba(7, 19, 35, 0.14), 0 16px 46px rgba(184, 138, 68, 0.18);
}

.hero-kpi span {
  display: block;
  max-width: calc(100% - 44px);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-kpi strong {
  display: block;
  margin: 18px 0 9px;
  color: var(--ink);
  font-size: 42px;
  line-height: 0.95;
}

.hero-kpi small {
  display: block;
  color: var(--muted);
}

.hero-kpi em {
  display: inline-flex;
  margin-top: 18px;
  padding: 5px 10px;
  color: #7c551c;
  background: rgba(184, 138, 68, 0.12);
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.filter-bar {
  display: none;
  grid-template-columns: repeat(4, minmax(132px, 1fr)) minmax(190px, 1.35fr) auto;
  gap: 12px;
  align-items: end;
  flex: 0 0 auto;
  margin-bottom: 18px;
  padding: 18px;
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.filter-bar.open {
  display: grid;
}

.filter-auto-notice {
  display: none;
  align-self: center;
  color: #146c43;
  font-size: 12px;
  font-weight: 800;
}

.filter-auto-notice.is-visible {
  display: inline-flex;
}

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

.filter-bar .wide {
  min-width: 0;
}

.filter-bar label {
  display: grid;
  gap: 7px;
}

.filter-bar span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.filter-bar select,
.filter-bar input,
.section-head input,
.section-head select {
  min-height: 44px;
  width: 100%;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
}

.filter-bar select:focus,
.filter-bar input:focus,
.section-head input:focus,
.section-head select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184, 138, 68, 0.14);
}

.summary-pill {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 12px;
  color: var(--navy);
  background: #f5eddb;
  border: 1px solid var(--gold-soft);
  border-radius: 999px;
  font-weight: 800;
}

.section-head,
.panel-head {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-head input,
.section-head select {
  min-width: 260px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.kpi-grid.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.kpi {
  position: relative;
  min-height: 134px;
  overflow: hidden;
  padding: 23px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(255, 249, 239, 0.96)),
    radial-gradient(circle at 88% 15%, rgba(184, 138, 68, 0.11), transparent 28%);
  border: 1px solid var(--line);
  border-top: 2px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.kpi.is-clickable {
  cursor: pointer;
}

.kpi.is-clickable:hover {
  transform: translateY(-2px);
  border-color: rgba(184, 138, 68, 0.48);
  box-shadow: 0 28px 66px rgba(7, 19, 35, 0.12), 0 12px 34px rgba(184, 138, 68, 0.14);
}

.kpi-detail-hint {
  margin-top: 12px;
  padding: 6px 10px;
  border: 1px solid rgba(184, 138, 68, 0.34);
  border-radius: 999px;
  color: #7c551c;
  background: rgba(255, 246, 226, 0.72);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.inline-action {
  padding: 6px 10px;
  border: 1px solid rgba(184, 138, 68, 0.36);
  border-radius: 999px;
  color: #071323;
  background: #fff7e6;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.inline-action:hover {
  border-color: rgba(184, 138, 68, 0.68);
  background: #f6dfad;
}

.kpi::before {
  content: "◇";
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--gold);
  border: 1px solid rgba(184, 138, 68, 0.35);
  border-radius: 10px;
  font-size: 15px;
}

.kpi:nth-child(1)::before {
  content: "€";
}

.kpi:nth-child(2)::before {
  content: "↗";
}

.kpi:nth-child(3)::before {
  content: "∑";
}

.kpi:nth-child(4)::before {
  content: "◆";
}

.kpi span {
  display: block;
  max-width: calc(100% - 40px);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.kpi strong {
  display: block;
  margin: 14px 0 8px;
  font-size: 34px;
  line-height: 1;
}

.kpi small {
  color: var(--muted);
}

.trend {
  display: inline-flex;
  margin-top: 14px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.trend.good {
  color: #1f6f52;
  background: rgba(31, 111, 82, 0.1);
}

.trend.warn {
  color: #8a4f11;
  background: rgba(184, 138, 68, 0.13);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.9fr);
  gap: 18px;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.insight {
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(184, 138, 68, 0.14), transparent 42%),
    #071323;
  color: #fff;
  border: 1px solid rgba(184, 138, 68, 0.5);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.insight span,
.insight small {
  display: block;
  color: #b9c4d2;
}

.insight strong {
  display: block;
  margin: 10px 0;
  color: #fff;
  font-size: 18px;
}

.panel,
.chart-panel,
.table-wrap,
.alerts-grid {
  background: rgba(255, 253, 248, 0.96);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel,
.chart-panel {
  padding: 26px;
}

.panel-head span {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chart {
  min-height: 350px;
}

.chart svg {
  display: block;
  width: 100%;
  height: 350px;
}

.donut-chart {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(260px, 1.1fr);
  gap: 24px;
  align-items: center;
  min-height: 350px;
}

.donut-visual {
  position: relative;
  display: grid;
  place-items: center;
}

.donut-visual svg {
  width: min(100%, 300px);
  height: auto;
  filter: drop-shadow(0 18px 24px rgba(7, 19, 35, 0.1));
}

.donut-segment {
  transition: stroke-width 0.2s ease, filter 0.2s ease;
}

.donut-segment:hover {
  stroke-width: 32;
  filter: drop-shadow(0 8px 12px rgba(7, 19, 35, 0.16));
}

.donut-total {
  position: absolute;
  display: grid;
  place-items: center;
  text-align: center;
}

.donut-total span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.donut-total strong {
  margin-top: 4px;
  color: var(--navy);
  font-size: 26px;
}

.donut-legend {
  display: grid;
  gap: 10px;
}

.donut-legend-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(228, 220, 205, 0.8);
}

.donut-legend-row i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.donut-legend-row span {
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.donut-legend-row strong {
  color: var(--navy);
  font-size: 13px;
}

.donut-legend-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.winter-focus {
  display: grid;
  gap: 12px;
}

.simulator-panel {
  margin-top: 18px;
}

.strategy-panel {
  margin: 18px 0;
}

.strategy-controls {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid rgba(184, 138, 68, 0.18);
  border-radius: 12px;
  background: rgba(247, 243, 234, 0.58);
}

.strategy-controls label {
  display: grid;
  gap: 6px;
}

.strategy-controls span {
  color: #8a6a3c;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.strategy-controls input,
.strategy-controls select {
  min-height: 38px;
  border: 1px solid rgba(184, 138, 68, 0.28);
  border-radius: 9px;
  background: rgba(255, 253, 248, 0.96);
}

.strategy-focus-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 14px 0;
}

.strategy-focus-card {
  padding: 18px;
  border: 1px solid rgba(184, 138, 68, 0.22);
  border-radius: 12px;
  background: linear-gradient(145deg, #071323, #0d1c2f);
  color: #fffdf8;
}

.strategy-focus-card h3 {
  margin-bottom: 12px;
  color: #eac27a;
}

.strategy-focus-line {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.strategy-focus-line span {
  color: rgba(255, 253, 248, 0.78);
  text-align: right;
}

@media (max-width: 1100px) {
  .strategy-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .strategy-controls,
  .strategy-focus-grid {
    grid-template-columns: 1fr;
  }
}

.legacy-hidden-section {
  display: none !important;
}

.compact-header .topbar {
  min-height: 132px;
  height: 132px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.compact-header .topbar h1 {
  font-size: 34px;
}

.compact-header .topbar .subtitle,
.compact-header .topbar .eyebrow {
  display: none;
}

.compact-header .quick-filters {
  margin-top: 10px;
}

.import-shortcut {
  color: var(--navy);
  text-decoration: none;
}

.lucia-diagnostics summary,
.ocr-raw summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--navy);
}

.lucia-diagnostics:not([open]) {
  padding: 16px 20px;
}

.ocr-raw {
  margin-top: 16px;
}

.break-even-advanced {
  margin-top: 18px;
}

.break-even-advanced > summary {
  cursor: pointer;
  padding: 16px 18px;
  border: 1px solid var(--gold-soft);
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
}

.break-even-advanced[open] > summary {
  margin-bottom: 16px;
}

.personal-profit-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.6fr);
  gap: 18px;
  align-items: end;
  margin-bottom: 16px;
  padding: 18px 20px;
  border-left: 4px solid var(--gold);
}

.personal-profit-panel h2 {
  margin: 0 0 6px;
  font-size: 24px;
}

.personal-profit-panel p {
  margin: 0;
  color: var(--muted);
}

.personal-profit-panel label {
  display: grid;
  gap: 8px;
}

.personal-profit-panel span {
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.personal-profit-panel input {
  min-height: 48px;
  border-radius: 8px;
}

.three-night-cost-panel {
  margin: 12px 0 16px;
}

.three-night-cost-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.three-night-cost-metric {
  border: 1px solid rgba(192, 139, 56, 0.22);
  border-radius: 8px;
  background: rgba(255, 250, 241, 0.72);
  padding: 12px 14px;
}

.three-night-cost-metric span {
  color: var(--muted);
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.three-night-cost-metric strong {
  color: var(--ink);
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2vw, 2rem);
  line-height: 1.1;
  margin-top: 6px;
}

.three-night-cost-metric small {
  color: var(--muted);
  display: block;
  line-height: 1.45;
  margin-top: 6px;
}

@media (max-width: 760px) {
  .personal-profit-panel {
    grid-template-columns: 1fr;
  }

  .three-night-cost-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .compact-header .topbar {
    height: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow: visible;
    flex: 0 0 auto;
  }

  .compact-header .topbar h1 {
    max-width: 100%;
    font-size: 28px;
    line-height: 1.08;
    overflow-wrap: anywhere;
  }

  .compact-header .hero-copy,
  .compact-header .toolbar {
    width: 100%;
    flex: 0 0 auto;
  }

  .compact-header .toolbar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compact-header .toolbar button,
  .compact-header .toolbar .file-button {
    min-width: 0;
    width: 100%;
  }

  .compact-header #printReport {
    grid-column: auto;
    justify-self: stretch;
  }
}

.table-wrap.embedded {
  box-shadow: none;
  border-color: rgba(184, 138, 68, 0.22);
}

.pricing-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.pricing-strip article {
  padding: 18px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(184, 138, 68, 0.18), transparent 48%),
    var(--navy);
  border-bottom: 3px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.pricing-strip strong,
.pricing-strip span {
  display: block;
}

.pricing-strip strong {
  margin: 8px 0;
  color: var(--gold-soft);
  font-size: 28px;
}

.pricing-strip .airbnb-price-summary {
  display: grid;
  align-content: center;
  min-height: 132px;
}

.monthly-airbnb-panel {
  margin: 0 0 16px;
}

.stay-profit-panel {
  margin: 0 0 16px;
}

.inline-price-input {
  display: grid;
  gap: 6px;
  min-width: 220px;
}

.inline-price-input span {
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.inline-price-input input {
  min-height: 44px;
  border-radius: 8px;
}

.airbnb-price-summary > span,
.airbnb-price-summary > small,
.airbnb-price-summary > b {
  display: block;
}

.airbnb-price-summary > small {
  color: #d9c7a9;
  font-size: 11px;
}

.airbnb-price-summary > b {
  color: #fff;
  font-size: 13px;
}

.airbnb-price-summary strong em,
.airbnb-price-callout strong em {
  font-family: inherit;
  font-size: 14px;
  font-style: normal;
  font-weight: 600;
}

.pricing-card {
  padding: 18px;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-top: 3px solid var(--navy);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.pricing-card h3 {
  margin-bottom: 16px;
}

.airbnb-price-callout {
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid rgba(184, 138, 68, 0.42);
  border-left: 4px solid var(--gold);
  background: #071323;
  color: #fff;
}

.airbnb-price-callout span,
.airbnb-price-callout small {
  display: block;
}

.airbnb-price-callout span {
  color: #d9c7a9;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.airbnb-price-callout strong {
  display: block;
  margin: 6px 0 3px;
  color: var(--gold-soft);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
}

.airbnb-price-callout small {
  color: #d9c7a9;
  font-size: 11px;
}

.metric-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.metric-line strong {
  color: var(--navy);
}

.table-wrap {
  overflow: auto;
  max-height: 620px;
  scrollbar-gutter: stable;
}

table {
  width: 100%;
  min-width: 780px;
  border-collapse: separate;
  border-spacing: 0;
  background: transparent;
  table-layout: auto;
}

#costControlTable table {
  min-width: 0;
}

#costControlTable th,
#costControlTable td {
  font-size: 13px;
  line-height: 1.45;
  padding-top: 13px;
  padding-bottom: 13px;
}

#costControlTable .badge,
#costControlTable .status-pill {
  font-size: 10px;
}

.cost-action-text {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
}

.inline-action.subtle {
  padding: 5px 10px;
  box-shadow: none;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #f8f1e4;
  background: var(--navy);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

th:first-child {
  border-top-left-radius: 12px;
}

th:last-child {
  border-top-right-radius: 12px;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(228, 220, 205, 0.92);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
  font-size: 13px;
  line-height: 1.35;
}

tbody tr {
  background: rgba(255, 255, 255, 0.55);
}

tbody tr:nth-child(even) {
  background: rgba(247, 243, 234, 0.62);
}

tbody tr:hover {
  background: #fff7e8;
}

td.wrap {
  white-space: nowrap;
  min-width: 0;
}

td.cell-clip {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

th.col-actions,
td.col-actions {
  position: sticky;
  right: 0;
  z-index: 2;
  width: 160px;
  min-width: 160px;
  background: rgba(255, 253, 248, 0.98);
  box-shadow: -14px 0 22px rgba(7, 19, 35, 0.08);
}

th.col-actions {
  z-index: 4;
  background: var(--navy);
  box-shadow: none;
}

th.col-date,
td.col-date,
th.col-checkIn,
td.col-checkIn {
  width: 112px;
}

th.col-nights,
td.col-nights {
  width: 70px;
}

th.col-amount,
td.col-amount,
th.col-grossRevenue,
td.col-grossRevenue,
th.col-correctedRealCost,
td.col-correctedRealCost,
th.col-correctedRealProfit,
td.col-correctedRealProfit {
  width: 118px;
}

th.col-associationNature,
td.col-associationNature,
th.col-sourceBadge,
td.col-sourceBadge,
th.col-visibleAlert,
td.col-visibleAlert,
th.col-realMarginAlert,
td.col-realMarginAlert {
  width: 128px;
}

td.col-description,
td.col-linkedStayLabel,
td.col-guest,
td.col-suggestion,
td.col-notes {
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 2px 9px;
  color: var(--navy);
  background: #eef2f7;
  border: 1px solid #d5dee8;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge.warn {
  color: #7d281f;
  background: #fff1ed;
  border-color: #efc4b9;
}

.badge.ok {
  color: #176347;
  background: #edf8f2;
  border-color: #c7e8d9;
}

.alerts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
}

.entry-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(360px, 0.6fr);
  gap: 16px;
}

.entry-panel,
.entry-preview-panel,
.pending-panel {
  padding: 18px;
}

.entry-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.entry-tabs button,
.entry-buttons button {
  min-height: 40px;
  padding: 0 14px;
  color: var(--navy);
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid rgba(184, 138, 68, 0.34);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.entry-tabs button:hover,
.entry-buttons button:hover {
  transform: translateY(-1px);
  background: #fff7e8;
  border-color: rgba(184, 138, 68, 0.72);
  box-shadow: 0 10px 24px rgba(184, 138, 68, 0.12);
}

.entry-tabs button.active,
.entry-buttons button[data-entry-action="confirm"],
.entry-buttons button[data-entry-action="export-json"],
.entry-buttons button[data-entry-action="export-soggiorni"],
.entry-buttons button[data-entry-action="export-costi"],
.entry-buttons button[data-entry-action="export-extra"],
.entry-buttons button[data-entry-action="export-lucia"],
.entry-buttons button[data-entry-action="export-cassa"] {
  color: #fffaf0;
  background: var(--navy);
  border-color: rgba(7, 19, 35, 0.9);
}

.guided-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.guided-form label {
  display: grid;
  gap: 7px;
}

.guided-form label.wide {
  grid-column: 1 / -1;
}

.guided-form span {
  color: #667085;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.guided-form textarea {
  min-height: 86px;
  resize: vertical;
}

.guided-form input,
.guided-form select,
.guided-form textarea {
  width: 100%;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(184, 138, 68, 0.26);
  border-radius: 12px;
  outline: none;
  padding: 12px 13px;
}

.guided-form input:focus,
.guided-form select:focus,
.guided-form textarea:focus {
  border-color: rgba(184, 138, 68, 0.84);
  box-shadow: 0 0 0 4px rgba(184, 138, 68, 0.12);
}

.entry-buttons {
  display: flex;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  gap: 10px;
  margin-top: 4px;
}

.entry-preview {
  display: grid;
  gap: 16px;
}

.entry-impact {
  display: grid;
  gap: 8px;
  padding: 13px;
  background: linear-gradient(135deg, rgba(184, 138, 68, 0.13), rgba(255, 253, 248, 0.9));
  border: 1px solid rgba(184, 138, 68, 0.25);
  border-radius: 12px;
}

.entry-impact > strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
}

.preview-metrics {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.entry-checks {
  display: grid;
  gap: 8px;
}

.entry-checks p {
  margin: 0;
  padding: 10px 12px;
  color: #6d430c;
  background: #fff4de;
  border: 1px solid rgba(184, 138, 68, 0.28);
  border-radius: 12px;
}

.pending-panel {
  margin-top: 16px;
}

.pending-counts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.entry-notice {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(184, 138, 68, 0.34);
  background: rgba(255, 253, 248, 0.95);
  color: var(--ink);
  font-weight: 700;
  line-height: 1.35;
}

.entry-notice-success {
  border-color: rgba(28, 118, 86, 0.32);
  background: rgba(231, 244, 237, 0.95);
  color: #105a42;
}

.entry-notice-warning {
  border-color: rgba(184, 138, 68, 0.42);
  background: #fff7e8;
  color: #6f3d08;
}

.entry-notice-error {
  border-color: rgba(154, 46, 30, 0.3);
  background: #fff1ec;
  color: #822718;
}

.dashboard-notice {
  position: fixed;
  top: 22px;
  right: 24px;
  z-index: 120;
  width: min(440px, calc(100vw - 36px));
  padding: 15px 18px;
  color: #105a42;
  background: rgba(231, 244, 237, 0.98);
  border: 1px solid rgba(28, 118, 86, 0.34);
  border-left: 5px solid #1c7656;
  border-radius: 12px;
  box-shadow: 0 22px 62px rgba(7, 19, 35, 0.18);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.35;
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.dashboard-notice.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.dashboard-notice-warning {
  color: #6f3d08;
  background: #fff7e8;
  border-color: rgba(184, 138, 68, 0.44);
  border-left-color: var(--gold);
}

.dashboard-notice-error {
  color: #822718;
  background: #fff1ec;
  border-color: rgba(154, 46, 30, 0.32);
  border-left-color: #9a2e1e;
}

.lucia-detail-panel {
  margin-top: 18px;
}

.lucia-detail-panel h3 {
  margin-bottom: 10px;
}

.lucia-duplicate-tool {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid rgba(184, 138, 68, 0.34);
  border-radius: 10px;
  background: #fff7e8;
  color: #6f3d08;
}

.lucia-duplicate-tool span {
  flex: 1;
}

.table-note {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.excel-lock-alert {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
  padding: 14px 16px;
  color: #5f3608;
  background:
    linear-gradient(135deg, rgba(184, 138, 68, 0.16), rgba(255, 253, 248, 0.92)),
    #fff7e8;
  border: 1px solid rgba(184, 138, 68, 0.42);
  border-left: 4px solid var(--gold);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(184, 138, 68, 0.1);
}

.excel-lock-alert strong {
  color: #7a4309;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
}

.excel-lock-alert span {
  color: #765a33;
  font-size: 13px;
  line-height: 1.45;
}

.pending-counts article {
  padding: 14px;
  background: rgba(255, 253, 248, 0.82);
  border: 1px solid rgba(184, 138, 68, 0.2);
  border-radius: 12px;
}

.pending-counts span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.pending-counts strong {
  display: block;
  margin-top: 5px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
}

.compact-table {
  margin-top: 14px;
  max-height: 360px;
}

.airbnb-upload {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.airbnb-upload p {
  flex: 1 1 320px;
  margin: 0;
}

.image-preview {
  display: grid;
  min-height: 180px;
  place-items: center;
  margin-bottom: 18px;
  overflow: hidden;
  background: rgba(255, 253, 248, 0.72);
  border: 1px dashed rgba(184, 138, 68, 0.42);
  border-radius: 14px;
}

.image-preview img {
  display: block;
  max-width: 100%;
  max-height: 420px;
  object-fit: contain;
}

.ocr-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ocr-fields div {
  padding: 12px;
  background: rgba(255, 253, 248, 0.82);
  border: 1px solid rgba(184, 138, 68, 0.22);
  border-radius: 12px;
}

.ocr-fields span,
.ocr-fields small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ocr-fields strong {
  display: block;
  margin: 5px 0;
  font-size: 15px;
}

.ocr-raw {
  margin-top: 16px;
  color: var(--muted);
}

.ocr-raw h3 {
  margin: 0 0 6px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
}

.ocr-raw p {
  margin: 0 0 10px;
  font-size: 12px;
}

.ocr-raw pre {
  max-height: 220px;
  overflow: auto;
  padding: 12px;
  white-space: pre-wrap;
  background: rgba(7, 19, 35, 0.04);
  border: 1px solid rgba(184, 138, 68, 0.18);
  border-radius: 12px;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 210px;
}

.row-actions button {
  min-height: 30px;
  padding: 0 10px;
  color: var(--navy);
  background: rgba(255, 253, 248, 0.9);
  border: 1px solid rgba(184, 138, 68, 0.34);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.row-actions button:hover {
  background: #fff7e8;
  border-color: rgba(184, 138, 68, 0.7);
}

#pendingRegistry {
  max-height: none;
  overflow: visible;
}

.pending-decision-panel,
.pending-archive-panel {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(184, 138, 68, 0.22);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.72);
}

.pending-archive-panel {
  background: rgba(250, 246, 238, 0.62);
}

.pending-confirm-message {
  margin-top: 5px;
  color: #075c43;
  font-size: 11px;
  font-weight: 800;
}

.pending-highlight-row td {
  background: rgba(223, 246, 232, 0.38);
}

.pending-registry-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  font-size: 12px;
}

.pending-registry-table th,
.pending-registry-table td {
  padding: 10px 9px;
  line-height: 1.35;
}

.pending-registry-table .badge {
  min-height: 20px;
  padding: 1px 7px;
  font-size: 9px;
  letter-spacing: 0.01em;
}

.pending-registry-table .cell-clip {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pending-registry-table .col-date {
  width: 78px;
}

.pending-registry-table .col-type {
  width: 82px;
}

.pending-registry-table .col-data {
  width: 150px;
}

.pending-registry-table .col-money {
  width: 86px;
}

.pending-registry-table .col-stay {
  width: 92px;
}

.pending-registry-table .col-status,
.pending-registry-table .col-excel {
  width: 96px;
}

.pending-registry-table .col-alert {
  width: 110px;
}

.pending-registry-table .col-impact {
  width: 150px;
}

.pending-registry-table .col-actions {
  position: sticky;
  right: 0;
  z-index: 2;
  width: 176px;
  min-width: 176px;
  background: rgba(255, 253, 248, 0.98);
  box-shadow: -14px 0 22px rgba(7, 19, 35, 0.08);
}

.pending-registry-table th.col-actions {
  z-index: 3;
  background: var(--navy);
  box-shadow: none;
}

.pending-registry-table .row-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
  gap: 5px;
}

.pending-registry-table .row-actions button {
  min-height: 27px;
  padding: 0 6px;
  font-size: 10px;
}

#staysTable table,
#costsTable table,
#luciaTable table,
#luciaClosureTable table,
#cassaTable table,
#alertRegistryList table {
  font-size: 12px;
}

#staysTable th,
#staysTable td,
#costsTable th,
#costsTable td,
#luciaTable th,
#luciaTable td,
#luciaClosureTable th,
#luciaClosureTable td,
#cassaTable th,
#cassaTable td,
#alertRegistryList th,
#alertRegistryList td {
  padding-top: 10px;
  padding-bottom: 10px;
}

#staysTable .row-actions,
#costsTable .row-actions,
#luciaTable .row-actions,
#luciaClosureTable .row-actions,
#cassaTable .row-actions,
#alertRegistryList .row-actions {
  min-width: 0;
  gap: 5px;
}

#staysTable .row-actions button,
#costsTable .row-actions button,
#luciaTable .row-actions button,
#luciaClosureTable .row-actions button,
#cassaTable .row-actions button,
#alertRegistryList .row-actions button {
  min-height: 27px;
  padding: 0 8px;
  font-size: 10px;
}

.entry-detail-card {
  width: min(1020px, 96vw);
}

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

.detail-row {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(184, 138, 68, 0.22);
  border-radius: 12px;
  background: rgba(255, 250, 240, 0.72);
}

.detail-row span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-row strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--navy);
  font-size: 13px;
  white-space: pre-wrap;
}

.entry-raw-data {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(184, 138, 68, 0.22);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.9);
}

.entry-raw-data summary {
  cursor: pointer;
  color: var(--navy);
  font-weight: 850;
}

.entry-raw-data pre {
  max-height: 260px;
  overflow: auto;
  margin: 12px 0 0;
  white-space: pre-wrap;
  font-size: 12px;
}

.incassi-detail-table th:last-child,
.incassi-detail-table td:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
}

.incassi-detail-table th:last-child {
  background: var(--navy);
}

.incassi-detail-table td:last-child {
  min-width: 140px;
  background: rgba(255, 253, 248, 0.98);
  box-shadow: -12px 0 18px rgba(7, 19, 35, 0.08);
}

.incassi-row-actions {
  min-width: 0;
}

.bar-track {
  height: 9px;
  margin-bottom: 11px;
  background: #e8edf2;
}

.bar-track div {
  height: 9px;
  background: linear-gradient(90deg, var(--gold), #d4b56e);
}

.alert-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(184, 138, 68, 0.34);
  background:
    linear-gradient(135deg, rgba(184, 138, 68, 0.16), transparent 44%),
    linear-gradient(180deg, #fffdf8, #fff5ee);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.alert-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--gold), var(--danger));
}

.alert-card:hover {
  transform: translateY(-2px);
  border-color: rgba(184, 138, 68, 0.58);
}

.alert-card strong {
  display: block;
  margin-bottom: 8px;
}

.alert-card-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

.alert-card p {
  margin: 9px 0 0;
  line-height: 1.45;
}

.alert-card p b {
  color: var(--ink);
}

.review-badge {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 22px;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.review-badge.todo {
  color: #8a4d12;
  background: #fff3da;
  border: 1px solid #efd2a4;
}

.review-badge.checked {
  color: #0f4e39;
  background: #eaf7f1;
  border: 1px solid #bfdccb;
}

.review-badge.resolved {
  color: #46505d;
  background: #f1f3f5;
  border: 1px solid #d9dde3;
}

.alert-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.alert-actions button {
  min-height: 34px;
  padding: 0 12px;
  color: var(--navy);
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid rgba(184, 138, 68, 0.34);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.alert-actions button:hover {
  transform: translateY(-1px);
  background: #fff7e8;
  border-color: rgba(184, 138, 68, 0.7);
}

.alert-actions button[data-alert-action="resolved"] {
  color: #fffaf0;
  background: var(--navy);
  border-color: rgba(7, 19, 35, 0.9);
}

.alert-actions button[data-alert-action="reload"] {
  color: #6d430c;
  background: #fff3d8;
}

.alert-card-actionable {
  border-color: rgba(184, 138, 68, 0.52);
  background:
    linear-gradient(135deg, rgba(184, 138, 68, 0.18), transparent 42%),
    linear-gradient(180deg, #fffdf8, #fff7ed);
}

.alert-detail {
  display: none;
  margin-top: 14px;
  padding: 14px;
  background: rgba(255, 253, 248, 0.78);
  border: 1px solid rgba(184, 138, 68, 0.22);
  border-radius: 12px;
}

.alert-detail.open {
  display: block;
}

.alert-data {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.alert-data div {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(228, 220, 205, 0.9);
  border-radius: 10px;
}

.alert-data span,
.alert-options b,
.alert-cost-list b {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.alert-data strong {
  margin-top: 4px;
  color: var(--ink);
  font-size: 14px;
}

.alert-cost-list,
.alert-options {
  margin-top: 12px;
}

.alert-cost-list p,
.alert-options p {
  margin: 7px 0 0;
  padding: 9px 10px;
  background: rgba(247, 243, 234, 0.72);
  border-radius: 10px;
}

.alert-options .recommended {
  border: 1px solid rgba(184, 138, 68, 0.38);
  background: rgba(255, 244, 222, 0.9);
}

.alert-actions button[data-alert-action="ignore"] {
  color: #6d430c;
  background: #fff8ec;
}

.alert-registry-list {
  margin-top: 18px;
  padding: 18px;
  background: rgba(255, 253, 248, 0.9);
  border: 1px solid rgba(184, 138, 68, 0.18);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}

.alert-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -4px 0 12px;
}

.alert-filter-bar button {
  min-height: 32px;
  padding: 0 12px;
  color: var(--navy);
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid rgba(184, 138, 68, 0.28);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.alert-filter-bar button.active,
.alert-filter-bar button:hover {
  color: #fffdf8;
  background: var(--navy);
  border-color: rgba(184, 138, 68, 0.78);
}

.alert-empty-card {
  padding: 28px;
  text-align: left;
}

.alert-empty-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--navy);
  font-family: var(--serif);
  font-size: 24px;
}

.alert-empty-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.alert-empty-summary span {
  padding: 8px 12px;
  color: var(--muted);
  background: rgba(184, 138, 68, 0.08);
  border: 1px solid rgba(184, 138, 68, 0.18);
  border-radius: 999px;
  font-size: 12px;
}

.alert-registry-list:empty {
  display: none;
}

.modal-shell[aria-hidden="true"] {
  display: none;
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 19, 35, 0.58);
  backdrop-filter: blur(10px);
  border: 0;
  cursor: default;
}

.correction-card {
  position: relative;
  z-index: 1;
  width: min(980px, 96vw);
  max-height: 90vh;
  overflow: auto;
  padding: 24px;
  background:
    linear-gradient(145deg, rgba(255, 253, 248, 0.98), rgba(247, 243, 234, 0.98)),
    radial-gradient(circle at 100% 0%, rgba(184, 138, 68, 0.13), transparent 32%);
  border: 1px solid rgba(184, 138, 68, 0.35);
  border-radius: 18px;
  box-shadow: 0 30px 90px rgba(7, 19, 35, 0.28);
}

.icon-button {
  min-height: 34px;
  padding: 0 12px;
  color: var(--navy);
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid rgba(184, 138, 68, 0.32);
  border-radius: 999px;
  cursor: pointer;
}

.modal-title-row {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.modal-title-row h2 {
  margin: 4px 0 0;
  font-family: var(--serif);
  font-size: 28px;
}

.incassi-detail-card {
  width: min(1320px, 97vw);
}

.incassi-formula-box,
.incassi-diagnosis {
  margin: 0 0 16px;
  padding: 14px 16px;
  color: #5d4930;
  background: rgba(255, 250, 240, 0.76);
  border: 1px solid rgba(184, 138, 68, 0.22);
  border-radius: 12px;
  line-height: 1.5;
}

.incassi-formula-box p {
  margin: 8px 0 0;
}

.incassi-total-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.incassi-detail-group {
  margin-top: 18px;
}

.incassi-detail-group h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
}

.incassi-detail-table {
  max-height: 360px;
}

.incassi-detail-table table {
  min-width: 1450px;
}

.cost-detail-table {
  max-height: 380px;
}

.cost-detail-table table {
  min-width: 1240px;
}

.cost-detail-table th.col-actions,
.cost-detail-table td.col-actions {
  position: sticky;
  right: 0;
  width: 158px;
  min-width: 158px;
  background: rgba(255, 253, 248, 0.98);
  box-shadow: -8px 0 18px rgba(7, 19, 35, 0.08);
}

.cost-detail-table th.col-actions {
  z-index: 5;
  color: #fffaf0;
  background: var(--navy);
}

.cost-detail-table .row-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.cost-detail-table .row-actions button {
  min-height: 27px;
  padding: 0 7px;
  font-size: 10px;
}

.cost-actions-menu {
  position: relative;
  display: inline-block;
}

.cost-actions-menu summary {
  display: grid;
  width: 34px;
  height: 28px;
  place-items: center;
  color: var(--navy);
  background: #fff8ec;
  border: 1px solid rgba(184, 138, 68, 0.42);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
  list-style: none;
}

.cost-actions-menu summary::-webkit-details-marker {
  display: none;
}

.cost-actions-menu div {
  position: absolute;
  top: 32px;
  right: 0;
  z-index: 12;
  display: grid;
  min-width: 128px;
  gap: 5px;
  padding: 8px;
  background: #fffdf8;
  border: 1px solid rgba(184, 138, 68, 0.32);
  border-radius: 10px;
  box-shadow: 0 18px 38px rgba(7, 19, 35, 0.16);
}

.cost-actions-menu:not([open]) div {
  display: none;
}

.cost-actions-menu button {
  min-height: 28px;
  padding: 0 9px;
  text-align: left;
  font-size: 11px;
  color: var(--navy);
}

.incassi-detail-table tfoot td {
  position: sticky;
  bottom: 0;
  color: #071323;
  background: #fff4dd;
  font-weight: 900;
}

.empty {
  padding: 20px;
  color: var(--muted);
}

/* Executive page redesign: premium home view only. */
.topbar {
  min-height: 136px;
  padding: 20px 26px;
  margin-bottom: 14px;
  background:
    radial-gradient(circle at 79% 18%, rgba(184, 138, 68, 0.22), transparent 20%),
    linear-gradient(100deg, rgba(255, 253, 248, 0.99) 0%, rgba(255, 253, 248, 0.9) 43%, rgba(7, 19, 35, 0.84) 100%),
    url("./assets/background.jpeg") right 43% / cover no-repeat;
}

.topbar::after {
  inset: 11px;
}

.hero-copy .eyebrow {
  margin-bottom: 5px;
}

h1 {
  font-size: clamp(31px, 2.75vw, 40px);
}

.subtitle {
  font-size: 13px;
}

.quick-filters {
  margin-top: 8px;
}

.executive-strip {
  margin: 0 0 18px;
}

.hero-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.hero-kpi {
  min-height: 154px;
  padding: 25px 24px;
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 250, 241, 0.97)),
    radial-gradient(circle at 88% 14%, rgba(184, 138, 68, 0.12), transparent 32%);
  box-shadow: 0 22px 48px rgba(7, 19, 35, 0.105), 0 12px 34px rgba(184, 138, 68, 0.095);
}

.hero-kpi::after,
.hero-kpi em {
  display: none;
}

.hero-kpi span {
  max-width: 100%;
  color: #697385;
  font-size: 11px;
  letter-spacing: 0.12em;
}

.hero-kpi strong {
  margin: 18px 0 10px;
  font-size: clamp(34px, 3vw, 45px);
}

.hero-kpi small {
  min-height: 0;
  color: #5e6877;
  font-size: 13px;
}

#executive .section-head {
  margin-bottom: 14px;
}

#executive .section-head h2 {
  font-size: 27px;
}

#executive #kpiGrid {
  display: grid;
  grid-template-columns: 1.25fr repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
  margin-bottom: 20px;
  padding: 15px;
  background:
    linear-gradient(135deg, rgba(7, 19, 35, 0.96), rgba(13, 33, 56, 0.96)),
    radial-gradient(circle at 93% 14%, rgba(184, 138, 68, 0.16), transparent 30%);
  border: 1px solid rgba(184, 138, 68, 0.34);
  border-radius: 16px;
  box-shadow: 0 20px 46px rgba(7, 19, 35, 0.14);
}

.manager-insight-title {
  display: grid;
  align-content: center;
  padding: 14px 18px;
  border-right: 1px solid rgba(231, 210, 167, 0.18);
}

.manager-insight-title span {
  color: #fff8e8;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  font-weight: 600;
}

.manager-insight-title small {
  margin-top: 6px;
  color: #aeb9c7;
  font-size: 12px;
}

.manager-insight {
  min-height: 96px;
  padding: 15px 14px;
  background: rgba(255, 253, 248, 0.075);
  border: 1px solid rgba(231, 210, 167, 0.16);
  border-radius: 12px;
}

.manager-insight span,
.manager-insight small {
  display: block;
  color: #b9c4d2;
}

.manager-insight span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.manager-insight strong {
  display: block;
  margin: 9px 0 6px;
  color: #fff8e8;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.manager-insight small {
  font-size: 11px;
  line-height: 1.35;
}

#executive .split {
  grid-template-columns: minmax(0, 1.55fr) minmax(330px, 0.82fr);
  gap: 20px;
}

#executive .panel {
  padding: 24px;
}

#executive .panel-head {
  margin-bottom: 12px;
}

#executive .chart {
  min-height: 370px;
}

#executive .chart svg {
  height: 370px;
}

#categoryChart.chart,
#categoryChart .donut-chart {
  min-height: 370px;
}

#categoryChart .donut-chart {
  grid-template-columns: 1fr;
  gap: 8px;
  align-content: start;
}

#categoryChart .donut-visual svg {
  width: min(100%, 214px);
}

#categoryChart .donut-total strong {
  font-size: 20px;
}

#categoryChart .donut-legend {
  gap: 3px;
}

#categoryChart .donut-legend-row {
  padding: 7px 0;
  grid-template-columns: 8px minmax(0, 1fr) auto auto;
}

#categoryChart .donut-legend-row span,
#categoryChart .donut-legend-row strong {
  font-size: 11px;
}

#breakEvenChart {
  display: grid;
  align-items: center;
}

#breakEvenChart .empty {
  display: grid;
  min-height: 260px;
  place-items: center;
  color: #6b7280;
  background: linear-gradient(135deg, rgba(184, 138, 68, 0.08), rgba(255, 253, 248, 0.8));
  border: 1px dashed rgba(184, 138, 68, 0.34);
  border-radius: 14px;
  font-weight: 700;
}

.break-even-svg {
  display: block;
  width: 100%;
  height: 370px;
}

.break-even-series path,
.break-even-series circle {
  transition: stroke-width 0.18s ease, r 0.18s ease, filter 0.18s ease;
}

.break-even-series:hover path {
  stroke-width: 5;
}

.break-even-series:hover circle {
  filter: drop-shadow(0 6px 8px rgba(7, 19, 35, 0.16));
}

#executive #executiveInsights {
  display: none;
}

/* Premium UI refinement: visual layer only, no data or workflow changes. */
body {
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.58), rgba(247, 243, 234, 0.72)),
    radial-gradient(circle at 82% 8%, rgba(184, 138, 68, 0.13), transparent 28%),
    radial-gradient(circle at 18% 38%, rgba(7, 19, 35, 0.045), transparent 26%),
    #f7f3ea;
}

.sidebar {
  width: 256px;
  padding: 22px 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 28%),
    radial-gradient(circle at 18% 7%, rgba(184, 138, 68, 0.18), transparent 21%),
    linear-gradient(180deg, #081625 0%, #06111f 100%);
}

.brand {
  gap: 12px;
  padding-bottom: 24px;
}

.brand-mark {
  width: 78px;
  height: 78px;
  border-radius: 14px;
  box-shadow: inset 0 0 0 4px rgba(7, 19, 35, 0.82), 0 18px 34px rgba(0, 0, 0, 0.22);
}

.brand strong {
  font-size: 19px;
}

.nav {
  gap: 4px;
  margin-top: 22px;
}

.nav a {
  min-height: 38px;
  padding: 9px 11px;
  border-radius: 0 11px 11px 0;
}

.nav a span {
  min-width: 20px;
  color: rgba(184, 138, 68, 0.48);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.nav a.active,
.nav a:hover {
  background: linear-gradient(90deg, rgba(184, 138, 68, 0.22), rgba(255, 255, 255, 0.045));
  box-shadow: inset 0 0 0 1px rgba(184, 138, 68, 0.08), 0 12px 24px rgba(0, 0, 0, 0.12);
}

.app-shell {
  margin-left: 256px;
  width: calc(100vw - 256px);
  padding: 24px 26px 22px;
}

.topbar {
  min-height: 168px;
  margin-bottom: 16px;
  padding: 24px 28px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 78% 18%, rgba(184, 138, 68, 0.24), transparent 22%),
    linear-gradient(100deg, rgba(255, 253, 248, 0.98) 0%, rgba(255, 253, 248, 0.88) 42%, rgba(7, 19, 35, 0.88) 100%),
    url("./assets/background.jpeg") right 42% / cover no-repeat;
  box-shadow: 0 18px 46px rgba(7, 19, 35, 0.09);
}

.topbar::after {
  inset: 13px;
  border-color: rgba(184, 138, 68, 0.24);
}

h1 {
  max-width: 720px;
  margin-bottom: 3px;
  font-size: clamp(34px, 3.1vw, 44px);
  line-height: 1;
}

h2 {
  font-size: 24px;
}

.subtitle {
  margin-bottom: 5px;
  font-size: 14px;
}

.muted {
  font-size: 13px;
}

.quick-filters {
  grid-template-columns: repeat(2, minmax(112px, 1fr));
  gap: 8px;
  margin-top: 10px;
  padding: 8px;
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(7, 19, 35, 0.065);
}

.quick-filters select {
  min-height: 34px;
  min-width: 112px;
  border-radius: 9px;
}

.toolbar {
  max-width: 430px;
  justify-content: flex-end;
}

button,
.file-button {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 11px;
}

.filter-bar {
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 13px;
  box-shadow: 0 14px 32px rgba(7, 19, 35, 0.075);
}

.filter-bar select,
.filter-bar input,
.section-head input,
.section-head select {
  min-height: 38px;
  border-radius: 9px;
}

.executive-strip {
  margin: 0 0 16px;
}

.hero-kpi-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.hero-kpi {
  min-height: 128px;
  padding: 20px 18px 18px;
  border-radius: 15px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 251, 243, 0.98)),
    radial-gradient(circle at 87% 12%, rgba(184, 138, 68, 0.1), transparent 34%);
  box-shadow: 0 17px 38px rgba(7, 19, 35, 0.09), 0 10px 28px rgba(184, 138, 68, 0.08);
}

.hero-kpi::before {
  border-top-width: 1px;
}

.hero-kpi::after {
  top: 15px;
  right: 15px;
  width: 25px;
  height: 25px;
  border-radius: 999px;
  opacity: 0.62;
  font-size: 10px;
}

.hero-kpi span {
  max-width: calc(100% - 30px);
  font-size: 10px;
  letter-spacing: 0.09em;
}

.hero-kpi strong {
  margin: 14px 0 7px;
  font-size: clamp(24px, 1.9vw, 31px);
  letter-spacing: 0;
}

.hero-kpi small {
  min-height: 30px;
  font-size: 12px;
  line-height: 1.35;
}

.hero-kpi em {
  margin-top: 11px;
  padding: 4px 8px;
  font-size: 9px;
  background: rgba(184, 138, 68, 0.11);
}

.section-head,
.panel-head {
  margin-bottom: 14px;
}

.kpi-grid {
  gap: 14px;
  margin-bottom: 16px;
}

#executive .kpi-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.kpi {
  min-height: 118px;
  padding: 20px;
  border-top-width: 1px;
  border-color: rgba(184, 138, 68, 0.22);
  border-radius: 14px;
  box-shadow: 0 16px 38px rgba(7, 19, 35, 0.08);
}

.kpi::before {
  width: 22px;
  height: 22px;
  top: 16px;
  right: 16px;
  opacity: 0.38;
  border-radius: 999px;
  font-size: 10px;
}

.kpi span {
  color: #687182;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kpi strong {
  margin: 12px 0 7px;
  font-size: clamp(25px, 2.05vw, 32px);
}

.trend {
  margin-top: 11px;
  padding: 3px 8px;
  font-size: 9px;
  letter-spacing: 0.06em;
}

.split {
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.9fr);
  gap: 16px;
}

.panel,
.chart-panel,
.table-wrap,
.alerts-grid {
  border-color: rgba(184, 138, 68, 0.18);
  border-radius: 15px;
  box-shadow: 0 18px 42px rgba(7, 19, 35, 0.075);
}

.panel,
.chart-panel {
  padding: 22px;
}

.panel-head h2 {
  font-size: 24px;
}

.panel-head span {
  color: #77808f;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.chart {
  min-height: 318px;
}

.chart svg {
  height: 318px;
}

#breakEvenChart .break-even-svg {
  min-height: 330px;
  height: 360px;
}

.donut-chart {
  grid-template-columns: minmax(190px, 0.82fr) minmax(230px, 1.18fr);
  gap: 18px;
  min-height: 318px;
}

.donut-visual svg {
  width: min(100%, 260px);
}

.donut-total span {
  font-size: 10px;
  letter-spacing: 0.1em;
}

.donut-total strong {
  font-size: 23px;
}

.donut-legend {
  gap: 7px;
}

.donut-legend-row {
  grid-template-columns: 9px minmax(0, 1fr) auto auto;
  gap: 9px;
  padding: 9px 0;
}

.donut-legend-row span,
.donut-legend-row strong {
  font-size: 12px;
}

.donut-legend-row em {
  min-width: 44px;
  text-align: right;
  font-size: 11px;
}

.insight-grid {
  gap: 14px;
  margin-top: 16px;
}

.insight {
  padding: 16px;
  border-radius: 14px;
}

.summary-pill {
  min-height: 30px;
  padding: 0 11px;
  font-size: 12px;
  box-shadow: 0 8px 18px rgba(184, 138, 68, 0.08);
}

th {
  background: linear-gradient(180deg, #071323, #0a1829);
}

tbody tr:hover {
  background: rgba(255, 247, 232, 0.86);
}

/* Final executive home overrides. Kept after the general premium layer. */
.topbar {
  min-height: 136px;
  padding: 20px 26px;
  margin-bottom: 14px;
  background:
    radial-gradient(circle at 79% 18%, rgba(184, 138, 68, 0.22), transparent 20%),
    linear-gradient(100deg, rgba(255, 253, 248, 0.99) 0%, rgba(255, 253, 248, 0.9) 43%, rgba(7, 19, 35, 0.84) 100%),
    url("./assets/background.jpeg") right 43% / cover no-repeat;
}

h1 {
  font-size: clamp(31px, 2.75vw, 40px);
}

.hero-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.hero-kpi {
  min-height: 154px;
  padding: 25px 24px;
}

.hero-kpi::after,
.hero-kpi em {
  display: none;
}

.hero-kpi strong {
  margin: 18px 0 10px;
  font-size: clamp(34px, 3vw, 45px);
}

#executive .split {
  grid-template-columns: minmax(0, 1.55fr) minmax(330px, 0.82fr);
}

#executive .chart,
#executive .chart svg,
#categoryChart.chart,
#categoryChart .donut-chart {
  min-height: 370px;
}

#executive .chart svg {
  height: 370px;
}

@media (max-width: 1520px) {
  .hero-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  #executive #kpiGrid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .manager-insight-title {
    grid-column: 1 / -1;
    border-right: 0;
    border-bottom: 1px solid rgba(231, 210, 167, 0.16);
  }
}

@media (max-width: 1180px) {
  #executive #kpiGrid {
    grid-template-columns: 1fr;
  }

  .manager-insight-title {
    border-right: 0;
    border-bottom: 1px solid rgba(231, 210, 167, 0.16);
  }

  #executive .split {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    z-index: 20;
    width: min(310px, 88vw);
    transform: translateX(-105%);
    transition: transform 0.24s ease;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .brand {
    display: flex;
  }

  .app-shell {
    margin-left: 0;
    width: 100%;
    padding: 22px;
  }

  .mobile-menu-button {
    display: inline-flex;
  }

  .nav {
    grid-template-columns: 1fr;
  }

  .split,
  .pricing-grid,
  .pricing-strip,
  .hero-kpi-grid,
  .filter-bar,
  .donut-chart,
  .insight-grid,
  .alerts-grid,
  .entry-layout {
    grid-template-columns: 1fr;
  }

  .kpi-grid,
  .kpi-grid.compact,
  .guided-form,
  .pending-counts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .topbar,
  .section-head {
    display: grid;
  }

  .toolbar {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .quick-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .quick-filters select {
    min-width: 0;
    width: 100%;
  }

  button,
  .file-button {
    width: 100%;
  }

  .nav {
    grid-template-columns: 1fr;
  }

  .brand-mark {
    width: 58px;
    height: 58px;
  }

  h1 {
    font-size: 30px;
  }

  .app-shell {
    padding: 16px;
  }

  .topbar,
  .filter-bar,
  .panel,
  .chart-panel {
    padding: 16px;
  }

  .topbar {
    background:
      linear-gradient(180deg, rgba(255, 253, 248, 0.97) 0%, rgba(255, 253, 248, 0.92) 58%, rgba(7, 19, 35, 0.32) 100%),
      url("./assets/background.jpeg") center center / cover no-repeat;
  }

  .kpi-grid,
  .kpi-grid.compact,
  .hero-kpi-grid,
  .donut-chart,
  .guided-form,
  .pending-counts {
    grid-template-columns: 1fr;
  }

  .section-head input,
  .section-head select {
    min-width: 0;
    width: 100%;
  }

  table {
    min-width: 760px;
  }
}

@media print {
  body {
    background: #fff;
  }

  body::before,
  .sidebar,
  .toolbar,
  .filter-bar,
  #stays,
  #costs,
  #cassa {
    display: none;
  }

  .app-shell {
    margin: 0;
    width: 100%;
    padding: 0;
  }

  .topbar,
  .section {
    break-inside: avoid;
    margin-bottom: 18px;
  }

  .panel,
  .chart-panel,
  .table-wrap,
  .kpi,
  .pricing-card,
  .alert-card,
  .insight {
    box-shadow: none;
  }

  .table-wrap {
    max-height: none;
  }

  table {
    min-width: 0;
    font-size: 10px;
  }
}

/* Estate executive direction: closer to the approved luxury reference. */
body {
  color: #111827;
  background:
    radial-gradient(circle at 18% 8%, rgba(184, 138, 68, 0.12), transparent 26%),
    linear-gradient(135deg, #071323 0%, #081524 48%, #040b13 100%);
}

body::before {
  opacity: 0;
}

.sidebar {
  width: 246px;
  padding: 28px 18px;
  background:
    radial-gradient(circle at 50% 7%, rgba(184, 138, 68, 0.14), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 28%),
    #071323;
  border: 1px solid rgba(184, 138, 68, 0.58);
  border-radius: 8px;
  inset: 8px auto 8px 8px;
  height: calc(100vh - 16px);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

.brand {
  justify-items: center;
  text-align: center;
  padding: 12px 0 22px;
  border-bottom-color: rgba(184, 138, 68, 0.24);
}

.brand-mark {
  width: 110px;
  height: 110px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.brand-mark img {
  object-fit: contain;
}

.brand strong {
  max-width: 170px;
  color: #e4c98f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 0.13em;
  line-height: 1.34;
  text-transform: uppercase;
}

.brand small {
  color: #f4efe3;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
}

.nav {
  gap: 7px;
  margin-top: 18px;
}

.nav a {
  position: relative;
  gap: 12px;
  min-height: 42px;
  padding: 10px 14px 10px 44px;
  color: #f7f0e4;
  border: 0;
  border-radius: 10px;
}

.nav a span {
  display: none;
}

.nav a::before {
  content: "•";
  position: absolute;
  left: 16px;
  top: 50%;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  color: #e3b760;
  border: 1px solid rgba(227, 183, 96, 0.78);
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
  transform: translateY(-50%);
}

.nav a:nth-child(1)::before { content: "♜"; }
.nav a:nth-child(2)::before { content: "▥"; }
.nav a:nth-child(3)::before { content: "♧"; }
.nav a:nth-child(4)::before { content: "⌁"; }
.nav a:nth-child(5)::before { content: "▣"; }
.nav a:nth-child(6)::before { content: "▤"; }
.nav a:nth-child(7)::before { content: "◇"; }
.nav a:nth-child(8)::before { content: "☆"; }
.nav a:nth-child(9)::before { content: "⊙"; }
.nav a:nth-child(10)::before { content: "!"; }
.nav a:nth-child(11)::before { content: "+"; }
.nav a:nth-child(12)::before { content: "⌬"; }

.nav a.active,
.nav a:hover {
  color: #fff;
  background: linear-gradient(90deg, rgba(184, 138, 68, 0.34), rgba(255, 255, 255, 0.08));
  border-left: 0;
  box-shadow: inset 0 0 0 1px rgba(184, 138, 68, 0.14), 0 18px 34px rgba(0, 0, 0, 0.22);
}

.app-shell {
  margin-left: 252px;
  width: calc(100vw - 252px);
  padding: 12px 12px 16px;
  background: #071323;
}

.topbar {
  min-height: 266px;
  margin-bottom: 16px;
  padding: 46px 64px;
  align-items: center;
  border: 1px solid rgba(184, 138, 68, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(7, 19, 35, 0.98) 0%, rgba(7, 19, 35, 0.78) 42%, rgba(7, 19, 35, 0.62) 100%),
    linear-gradient(180deg, rgba(184, 138, 68, 0.12), transparent 38%),
    url("./assets/background.jpeg") right center / cover no-repeat;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.32);
}

.topbar::after {
  display: none;
}

.hero-copy {
  max-width: 760px;
}

.hero-copy .eyebrow {
  margin: 0 0 14px;
  color: #e3b760;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.31em;
}

.hero-copy .eyebrow::after {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  margin-top: 14px;
  background: #e3b760;
}

h1 {
  color: #fffaf0;
  font-size: clamp(42px, 3.3vw, 58px);
  font-weight: 500;
  text-shadow: 0 18px 40px rgba(0, 0, 0, 0.38);
}

.subtitle,
.muted {
  color: rgba(255, 250, 240, 0.78);
}

.toolbar {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 14px;
  justify-content: end;
  align-content: center;
  max-width: 470px;
}

.toolbar button,
.toolbar .file-button {
  min-width: 132px;
  min-height: 46px;
  color: #f8ead2;
  background: rgba(7, 19, 35, 0.68);
  border: 1px solid rgba(184, 138, 68, 0.58);
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.26);
}

.toolbar .file-button {
  color: #071323;
  background: linear-gradient(180deg, #f2c978, #d6a552);
  border-color: rgba(255, 236, 181, 0.75);
}

#printReport {
  grid-column: 2 / 4;
  justify-self: end;
}

.quick-filters {
  gap: 14px;
  margin-top: 18px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.quick-filters span {
  color: #e3b760;
  font-size: 11px;
  letter-spacing: 0.2em;
}

.quick-filters select {
  min-width: 160px;
  min-height: 44px;
  color: #f8ead2;
  background: rgba(7, 19, 35, 0.62);
  border: 1px solid rgba(184, 138, 68, 0.58);
  border-radius: 7px;
}

.filter-bar {
  background: #0b1a2c;
  border-color: rgba(184, 138, 68, 0.38);
}

.executive-strip {
  margin: 0 0 14px;
}

.hero-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.hero-kpi {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  min-height: 138px;
  padding: 26px 28px;
  background:
    radial-gradient(circle at 4% 96%, rgba(184, 138, 68, 0.14), transparent 26%),
    linear-gradient(145deg, #fffaf0, #f7efe0);
  border: 1px solid rgba(184, 138, 68, 0.7);
  border-radius: 8px;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.24);
}

.hero-kpi i {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  color: #b88a44;
  background: rgba(184, 138, 68, 0.06);
  border: 1px solid rgba(184, 138, 68, 0.3);
  border-radius: 999px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 33px;
  font-style: normal;
}

.hero-kpi span {
  color: #141a24;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.24em;
}

.hero-kpi strong {
  margin: 8px 0 8px;
  color: #080f19;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 3.15vw, 54px);
  font-weight: 500;
}

.hero-kpi small {
  color: #344052;
  font-size: 14px;
}

.detail-pill {
  min-height: 34px;
  padding: 8px 13px;
  color: #071323;
  background: rgba(255, 250, 240, 0.86);
  border: 1px solid rgba(184, 138, 68, 0.42);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.detail-pill:hover {
  transform: translateY(-1px);
  background: #fffaf0;
  border-color: rgba(184, 138, 68, 0.78);
}

.hero-detail-pill {
  margin-top: 12px;
}

.panel-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

#executive .section-head {
  display: none;
}

#executive #kpiGrid {
  display: grid;
  grid-template-columns: 1.15fr repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 14px;
  padding: 20px 28px;
  color: #fffaf0;
  background:
    radial-gradient(circle at 13% 52%, rgba(184, 138, 68, 0.13), transparent 19%),
    linear-gradient(90deg, #071323 0%, #0a1b2e 100%);
  border: 1px solid rgba(184, 138, 68, 0.66);
  border-radius: 8px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
}

.manager-insight-title {
  padding: 8px 26px 8px 6px;
  border-right: 1px solid rgba(184, 138, 68, 0.22);
}

.manager-insight-title span {
  color: #e3b760;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.manager-insight-title small {
  color: rgba(255, 250, 240, 0.8);
  font-size: 13px;
}

.manager-insight {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  min-height: 74px;
  padding: 8px 24px;
  background: transparent;
  border: 0;
  border-right: 1px solid rgba(184, 138, 68, 0.2);
  border-radius: 0;
}

.manager-insight:last-child {
  border-right: 0;
}

.manager-insight i {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  color: #e3b760;
  border: 1px solid rgba(227, 183, 96, 0.85);
  border-radius: 999px;
  font-style: normal;
  font-size: 23px;
}

.manager-insight span {
  color: rgba(255, 250, 240, 0.72);
  font-size: 11px;
  letter-spacing: 0.17em;
}

.manager-insight strong {
  margin: 4px 0;
  color: #fffaf0;
  font-size: 27px;
}

.manager-insight small {
  color: rgba(255, 250, 240, 0.72);
  font-size: 12px;
}

#executive .split {
  grid-template-columns: minmax(0, 1.15fr) minmax(420px, 0.98fr);
  gap: 14px;
}

#executive .panel {
  min-height: 362px;
  padding: 26px;
  background: linear-gradient(145deg, #fffaf0, #f4ecdc);
  border: 1px solid rgba(184, 138, 68, 0.58);
  border-radius: 8px;
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.24);
}

#executive .panel-head h2 {
  color: #151923;
  font-size: 25px;
}

#executive .panel-head span {
  color: #6f5b3c;
  font-size: 11px;
}

#executive .chart,
#executive .chart svg {
  min-height: 298px;
  height: 298px;
}

#categoryChart .donut-chart {
  grid-template-columns: minmax(205px, 0.72fr) minmax(260px, 1fr);
  min-height: 296px;
}

#categoryChart .donut-visual svg {
  width: min(100%, 240px);
}

#categoryChart .donut-legend-row {
  padding: 10px 0;
}

#categoryChart .donut-legend-row span,
#categoryChart .donut-legend-row strong {
  font-size: 13px;
}

@media (max-width: 1300px) {
  .topbar {
    padding: 30px;
  }

  .hero-kpi-grid,
  #executive .split {
    grid-template-columns: 1fr 1fr;
  }

  #executive #kpiGrid {
    grid-template-columns: 1fr 1fr;
  }

  .manager-insight-title {
    grid-column: 1 / -1;
    border-right: 0;
    border-bottom: 1px solid rgba(184, 138, 68, 0.22);
  }
}

@media (max-width: 1180px) {
  .sidebar {
    inset: 0 auto 0 0;
    height: 100vh;
    border-radius: 0;
  }

  .app-shell {
    margin-left: 0;
    width: 100%;
    background: #071323;
  }
}

@media (max-width: 720px) {
  .topbar {
    min-height: 168px;
    padding: 18px;
    background:
      linear-gradient(180deg, rgba(7, 19, 35, 0.92), rgba(7, 19, 35, 0.72)),
      url("./assets/background.jpeg") center center / cover no-repeat;
  }

  h1 {
    font-size: 31px;
  }

  .toolbar,
  .hero-kpi-grid,
  #executive #kpiGrid,
  #executive .split,
  #categoryChart .donut-chart {
    grid-template-columns: 1fr;
  }

  .hero-kpi {
    grid-template-columns: 64px minmax(0, 1fr);
    min-height: 118px;
    padding: 18px;
  }

  .hero-kpi i {
    width: 54px;
    height: 54px;
    font-size: 25px;
  }

  #printReport {
    grid-column: auto;
    justify-self: stretch;
  }

  .manager-insight {
    border-right: 0;
    border-bottom: 1px solid rgba(184, 138, 68, 0.2);
  }
}

/* Reference executive layout requested by the user. Visual-only overrides. */
body {
  color: #111827;
  background: #f4ead8;
}

.sidebar {
  inset: 0 auto 0 0;
  width: 220px;
  height: 100vh;
  padding: 28px 14px 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(184, 138, 68, 0.12), transparent 25%),
    linear-gradient(180deg, #071828 0%, #061320 100%);
  border: 0;
  border-right: 1px solid rgba(184, 138, 68, 0.18);
  border-radius: 0;
  box-shadow: 12px 0 32px rgba(0, 0, 0, 0.12);
}

.brand {
  padding: 0 0 22px;
}

.brand-mark {
  width: 98px;
  height: 98px;
}

.brand strong {
  color: #e7be72;
  font-size: 17px;
  letter-spacing: 0.12em;
}

.brand small {
  color: #f6ead6;
  font-size: 11px;
}

.nav {
  gap: 6px;
  margin-top: 16px;
}

.nav a {
  min-height: 42px;
  padding: 10px 12px 10px 48px;
  color: #f4ead8;
  border-radius: 8px;
  font-size: 14px;
}

.nav a::before {
  left: 15px;
  width: 18px;
  height: 18px;
  color: #e9b85e;
  border-color: transparent;
}

.nav a.active,
.nav a:hover {
  background: linear-gradient(90deg, rgba(184, 138, 68, 0.52), rgba(255, 255, 255, 0.08));
  box-shadow: inset 4px 0 0 #d8a34e, 0 12px 26px rgba(0, 0, 0, 0.18);
}

.app-shell {
  margin-left: 220px;
  width: calc(100vw - 220px);
  padding: 16px 18px 18px;
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.72), rgba(244, 234, 216, 0.92)),
    #f4ead8;
}

.topbar {
  min-height: 258px;
  margin-bottom: 18px;
  padding: 38px 44px;
  border: 1px solid rgba(184, 138, 68, 0.42);
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(255, 249, 237, 0.98) 0%, rgba(255, 249, 237, 0.86) 30%, rgba(255, 249, 237, 0.2) 52%, rgba(7, 19, 35, 0.48) 100%),
    url("./assets/background.jpeg") right center / cover no-repeat;
  box-shadow: 0 16px 38px rgba(76, 49, 18, 0.12);
}

.hero-copy .eyebrow {
  margin-bottom: 8px;
  color: #b88a44;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.28em;
}

.hero-copy .eyebrow::after {
  display: none;
}

h1 {
  max-width: 760px;
  color: #0d1420;
  font-size: clamp(42px, 3vw, 58px);
  text-shadow: none;
}

.subtitle,
.muted {
  color: #223044;
}

.quick-filters {
  margin-top: 18px;
}

.quick-filters span {
  color: #b88a44;
}

.quick-filters select {
  min-width: 174px;
  min-height: 44px;
  color: #111827;
  background: rgba(255, 250, 240, 0.92);
  border: 1px solid rgba(184, 138, 68, 0.34);
  border-radius: 8px;
}

.toolbar {
  grid-template-columns: repeat(3, max-content);
  gap: 12px;
  align-self: center;
}

.toolbar button,
.toolbar .file-button {
  min-width: 130px;
  min-height: 48px;
  color: #f9eedc;
  background: #071323;
  border: 1px solid rgba(184, 138, 68, 0.52);
  border-radius: 8px;
}

.toolbar .file-button {
  color: #071323;
  background: linear-gradient(180deg, #f0c875, #d7a453);
}

#printReport {
  grid-column: 2 / 4;
  justify-self: end;
}

.executive-strip {
  margin-bottom: 16px;
}

.hero-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.hero-kpi {
  grid-template-columns: 74px minmax(0, 1fr);
  min-height: 142px;
  padding: 25px 26px;
  background: linear-gradient(145deg, #fffaf0, #f6eddd);
  border: 1px solid rgba(184, 138, 68, 0.38);
  border-radius: 8px;
  box-shadow: 0 16px 30px rgba(88, 58, 24, 0.11);
}

.hero-kpi i {
  width: 62px;
  height: 62px;
  color: #b88a44;
  background: rgba(184, 138, 68, 0.05);
  border: 1px solid rgba(184, 138, 68, 0.26);
  font-size: 29px;
}

.hero-kpi span {
  color: #111827;
  font-size: 12px;
  letter-spacing: 0.22em;
}

.hero-kpi strong {
  margin: 6px 0 6px;
  color: #080f19;
  font-size: clamp(39px, 2.75vw, 52px);
}

.hero-kpi small {
  color: #334155;
  font-size: 13px;
}

#executive #kpiGrid {
  min-height: 112px;
  margin-bottom: 16px;
  padding: 18px 28px;
  background:
    linear-gradient(90deg, rgba(7, 19, 35, 0.99), rgba(8, 26, 43, 0.99)),
    radial-gradient(circle at 12% 50%, rgba(184, 138, 68, 0.16), transparent 18%);
  border: 1px solid rgba(184, 138, 68, 0.5);
  border-radius: 8px;
}

.manager-insight-title {
  padding-left: 0;
}

.manager-insight-title span {
  color: #d7a453;
  font-size: 18px;
}

.manager-insight-title small,
.manager-insight small {
  color: rgba(255, 250, 240, 0.78);
}

.manager-insight {
  min-height: 76px;
}

.manager-insight i {
  width: 48px;
  height: 48px;
}

.manager-insight strong {
  font-size: 26px;
}

#executive .split {
  grid-template-columns: minmax(0, 1.16fr) minmax(420px, 0.98fr);
  gap: 16px;
}

#executive .panel {
  min-height: 354px;
  padding: 26px;
  background: linear-gradient(145deg, #fffaf0, #f7eedf);
  border: 1px solid rgba(184, 138, 68, 0.35);
  border-radius: 8px;
  box-shadow: 0 18px 38px rgba(88, 58, 24, 0.12);
}

#executive .panel-head h2 {
  color: #101827;
  font-size: 25px;
}

#executive .panel-head span {
  color: #8a6a3c;
}

#executive .chart,
#executive .chart svg {
  min-height: 292px;
  height: 292px;
}

#categoryChart .donut-chart {
  grid-template-columns: minmax(215px, 0.72fr) minmax(280px, 1fr);
  min-height: 292px;
}

#categoryChart .donut-visual svg {
  width: min(100%, 242px);
}

#categoryChart .donut-total strong {
  color: #0d1420;
  font-size: 26px;
}

#categoryChart .donut-legend-row {
  padding: 9px 0;
}

#categoryChart .donut-legend-row span,
#categoryChart .donut-legend-row strong {
  color: #111827;
  font-size: 13px;
}

@media (max-width: 1360px) {
  .topbar {
    padding: 30px;
  }

  .hero-kpi-grid,
  #executive .split {
    grid-template-columns: 1fr 1fr;
  }

  #executive #kpiGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .app-shell {
    margin-left: 0;
    width: 100%;
  }
}

@media (max-width: 720px) {
  .topbar {
    background:
      linear-gradient(180deg, rgba(255, 249, 237, 0.94), rgba(255, 249, 237, 0.78)),
      url("./assets/background.jpeg") center center / cover no-repeat;
  }

  .toolbar,
  .hero-kpi-grid,
  #executive #kpiGrid,
  #executive .split,
  #categoryChart .donut-chart {
    grid-template-columns: 1fr;
  }
}

/* Executive commercial year-over-year view. */
.revenue-yoy-panel {
  margin-bottom: 16px;
}

.revenue-yoy-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1.25fr) repeat(2, minmax(150px, 0.75fr));
  gap: 12px;
  margin-bottom: 14px;
}

.revenue-yoy-controls label {
  display: grid;
  gap: 6px;
}

.revenue-yoy-controls span {
  color: #8a6a3c;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.revenue-yoy-message {
  margin: 6px 0 16px;
  padding: 14px 16px;
  border: 1px solid rgba(184, 138, 68, 0.22);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(184, 138, 68, 0.13), rgba(255, 250, 240, 0.74));
  color: #111827;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
}

.revenue-yoy-message .positive {
  color: #0f5132;
}

.revenue-yoy-message .negative {
  color: #8a2f20;
}


.revenue-yoy-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.revenue-yoy-kpi {
  min-height: 96px;
  padding: 15px 14px;
  border: 1px solid rgba(184, 138, 68, 0.18);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.78);
  box-shadow: 0 16px 36px rgba(7, 19, 35, 0.07);
}

.revenue-yoy-kpi span,
.revenue-yoy-kpi small {
  display: block;
  color: #596273;
}

.revenue-yoy-kpi span {
  min-height: 24px;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.revenue-yoy-kpi strong {
  display: block;
  margin: 9px 0 5px;
  color: #071323;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(24px, 1.8vw, 32px);
  font-weight: 500;
}

.revenue-yoy-kpi small {
  font-size: 12px;
  line-height: 1.35;
}

.revenue-yoy-kpi.discount-kpi {
  border-color: rgba(166, 61, 47, 0.38);
  background: #fff6f3;
}

.revenue-yoy-kpi.discount-kpi strong,
.discount-amount {
  color: #a13d2f;
}

.discount-amount {
  font-weight: 800;
  white-space: nowrap;
}

tr.discount-row td {
  background: rgba(255, 238, 232, 0.72);
}

tr.discount-row td:first-child {
  box-shadow: inset 4px 0 0 #a13d2f;
}

.revenue-yoy-split {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(290px, 0.65fr);
  gap: 14px;
  align-items: stretch;
}

#executive .revenue-yoy-chart,
#executive .revenue-yoy-chart svg {
  min-height: 250px;
  height: 250px;
}

.revenue-yoy-breakdown-card {
  height: 100%;
  padding: 18px;
  border: 1px solid rgba(184, 138, 68, 0.2);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(7, 19, 35, 0.96), rgba(13, 33, 56, 0.94));
  color: #fffaf0;
}

.revenue-yoy-breakdown-card > span {
  display: block;
  margin-bottom: 12px;
  color: #d7a453;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.revenue-yoy-breakdown-card .metric-line {
  color: rgba(255, 250, 240, 0.76);
  border-color: rgba(231, 210, 167, 0.18);
}

.revenue-yoy-breakdown-card .metric-line strong {
  color: #fffaf0;
}

.revenue-yoy-breakdown-card hr {
  border: 0;
  border-top: 1px solid rgba(231, 210, 167, 0.18);
  margin: 12px 0;
}

.revenue-yoy-detail-toggle {
  margin-top: 12px;
}

.revenue-yoy-detail-toggle button {
  border-color: rgba(184, 138, 68, 0.34);
  color: #8a6a3c;
  background: rgba(255, 250, 240, 0.72);
}

.revenue-yoy-table {
  display: none;
  margin-top: 12px;
}

.revenue-yoy-table.open {
  display: block;
}

.cassa-operativa-note {
  margin: 14px 0 0;
  padding: 13px 15px;
  border: 1px solid rgba(184, 138, 68, 0.2);
  border-radius: 12px;
  background: rgba(255, 250, 240, 0.72);
  color: #5f4b2c;
  font-size: 13px;
  line-height: 1.55;
}

.cassa-page-note {
  margin: 0 0 14px;
}

@media (max-width: 1280px) {
  .revenue-yoy-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .revenue-yoy-split,
  .revenue-yoy-controls {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .revenue-yoy-kpis {
    grid-template-columns: 1fr;
  }
}

/* Managerial refinement: clearer decisions without changing the luxury language. */
.executive-month-strategy {
  margin-bottom: 18px;
  padding: 22px;
  border-left: 4px solid var(--gold);
  border-radius: 8px;
}

.executive-strategy-head {
  margin-bottom: 16px;
}

.executive-strategy-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 10px;
}

.executive-strategy-metric {
  min-height: 78px;
  padding: 12px;
  border: 1px solid rgba(184, 138, 68, 0.2);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.84);
}

.executive-strategy-metric span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.executive-strategy-metric strong {
  color: var(--navy);
  font-family: var(--serif);
  font-size: 22px;
}

.executive-strategy-metric.highlight {
  border-color: rgba(184, 138, 68, 0.55);
  background: #fff7e8;
}

.executive-strategy-suggestion {
  margin: 14px 0 0;
  padding: 13px 15px;
  border-radius: 8px;
  background: var(--navy);
  color: #fffdf8;
  font-size: 14px;
  line-height: 1.55;
}

#monthly-break-even .kpi {
  min-height: 150px;
  padding: 24px;
}

#monthly-break-even .kpi strong {
  font-size: 30px;
}

#monthly-break-even .kpi small {
  font-size: 13px;
  line-height: 1.45;
}

#seasonalStrategyPanel {
  padding: 28px;
}

#seasonalStrategyPanel .panel-head h2 {
  font-size: 28px;
}

#seasonalStrategyPanel table {
  min-width: 1500px;
  font-size: 13px;
}

#seasonalStrategyPanel th,
#seasonalStrategyPanel td {
  padding: 16px;
  line-height: 1.45;
}

.pricing-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.pricing-card .airbnb-price-callout strong {
  font-size: 31px;
}

.pricing-status {
  margin: 14px 0 0;
}

.season-empty {
  min-height: 160px;
}

.empty-season-message {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

table {
  font-size: 13px;
}

th {
  font-size: 12px;
}

th,
td {
  padding: 15px 16px;
  line-height: 1.4;
}

.badge {
  min-height: 27px;
  padding: 3px 10px;
  font-size: 12px;
}

button,
input,
select {
  font-size: 14px;
}

@media (max-width: 1280px) {
  .executive-strategy-grid {
    grid-template-columns: repeat(4, minmax(140px, 1fr));
  }
}

@media (max-width: 760px) {
  .topbar {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .topbar h1 {
    max-width: 100%;
    font-size: 38px;
    line-height: 1.04;
  }

  .executive-strategy-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #seasonalStrategyPanel {
    padding: 18px;
  }
}

/* Desktop final polish: visual/layout only. */
@media (min-width: 1181px) {
  .sidebar {
    width: 228px;
    padding: 20px 14px;
  }

  .brand-mark {
    width: 88px;
    height: 88px;
  }

  .brand strong {
    font-size: 17px;
    line-height: 1.24;
  }

  .brand small {
    font-size: 10px;
  }

  .nav a {
    min-height: 36px;
    padding: 8px 10px 8px 38px;
    font-size: 12px;
  }

  .app-shell {
    margin-left: 228px;
    width: calc(100vw - 228px);
    padding: 16px 16px 18px;
  }

  .topbar {
    min-height: 150px;
    margin-bottom: 14px;
    padding: 20px 24px;
  }

  .compact-header .topbar {
    min-height: 118px;
    padding: 16px 22px;
  }

  .compact-header h1 {
    font-size: clamp(30px, 2.7vw, 38px);
  }

  .compact-header .subtitle {
    margin-bottom: 2px;
  }

  .compact-header .quick-filters {
    margin-top: 8px;
  }

  .section,
  .panel,
  .chart-panel {
    border-radius: 10px;
  }

  .section {
    padding: 16px;
  }

  .section-head {
    margin-bottom: 10px;
  }

  .section-head h2,
  #seasonalStrategyPanel .panel-head h2 {
    font-size: 24px;
  }

  .table-wrap {
    max-height: calc(100vh - 270px);
    overflow: auto;
  }

  .compact-header .table-wrap {
    max-height: calc(100vh - 235px);
  }

  .table-wrap table {
    min-width: 0;
    width: 100%;
    font-size: 13px;
  }

  .table-wrap th,
  .table-wrap td {
    padding: 10px 10px;
    font-size: 13px;
    line-height: 1.35;
  }

  .table-wrap th {
    font-size: 10px;
    letter-spacing: 0.045em;
  }

  .table-wrap td.cell-clip {
    max-width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .table-wrap .badge {
    min-height: 20px;
    padding: 1px 7px;
    font-size: 9px;
  }

  .row-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
    gap: 5px;
  }

  .row-actions button {
    min-height: 27px;
    padding: 0 7px;
    font-size: 10px;
    white-space: nowrap;
  }

  .table-wrap th.col-actions,
  .table-wrap td.col-actions,
  .pending-registry-table .col-actions {
    position: sticky;
    right: 0;
    z-index: 3;
    width: 150px;
    min-width: 150px;
    background: rgba(255, 253, 248, 0.99);
    box-shadow: -12px 0 18px rgba(7, 19, 35, 0.08);
  }

  .table-wrap th.col-actions,
  .pending-registry-table th.col-actions {
    z-index: 5;
    background: var(--navy);
    box-shadow: none;
  }

  .pending-registry-table {
    min-width: 0;
  }

  .pending-registry-table .col-impact,
  .pending-registry-table .col-alert {
    width: 118px;
  }

  .pending-registry-table .col-actions {
    width: 164px;
    min-width: 164px;
  }

  #staysTable table,
  #costsTable table,
  #cassaTable table,
  #alertRegistryList table,
  #costControlTable table,
  #monthlyTable table {
    min-width: 0;
  }

  #staysTable td.col-guest,
  #costsTable td.col-linkedStayLabel,
  #costsTable td.col-description,
  #cassaTable td.col-description,
  #cassaTable td.col-linkedStayLabel,
  #alertRegistryList td {
    max-width: 190px;
  }

  #costsTable th.col-description,
  #costsTable td.col-description {
    max-width: 180px;
  }

  #costsTable th.col-actions,
  #costsTable td.col-actions,
  #cassaTable th.col-actions,
  #cassaTable td.col-actions,
  #staysTable th.col-actions,
  #staysTable td.col-actions {
    width: 150px;
    min-width: 150px;
  }

  #luciaTable table,
  #luciaClosureTable table,
  #luciaDetailTable table,
  #seasonalStrategyPanel table,
  #monthlyCoveragePlan table,
  #monthlyAirbnbPricing table,
  #breakEvenAirbnbPricing table {
    min-width: 980px;
  }

  .modal-shell .correction-card {
    width: min(1040px, calc(100vw - 56px));
    max-height: calc(100vh - 44px);
    overflow: auto;
  }
}

@media (min-width: 1181px) and (max-width: 1400px) {
  .app-shell {
    padding: 12px;
  }

  .topbar {
    min-height: 132px;
    padding: 16px 20px;
  }

  .compact-header .topbar {
    min-height: 104px;
  }

  h1,
  .compact-header h1 {
    font-size: 30px;
  }

  .toolbar {
    max-width: 370px;
    gap: 8px;
  }

  .toolbar button {
    min-width: 84px;
    padding: 0 10px;
    font-size: 12px;
  }

  .table-wrap th,
  .table-wrap td {
    padding: 8px 8px;
    font-size: 12px;
  }

  .table-wrap td.cell-clip {
    max-width: 160px;
  }

  #costsTable td.col-description,
  #staysTable td.col-guest,
  #cassaTable td.col-description {
    max-width: 150px;
  }

  .table-wrap th.col-actions,
  .table-wrap td.col-actions {
    width: 136px;
    min-width: 136px;
  }
}

/* Final desktop refinement: filters, compact hero and readable cost actions. */
@media (min-width: 1181px) {
  .topbar {
    min-height: 128px;
    align-items: flex-start;
    margin-bottom: 10px;
    padding: 16px 22px;
  }

  .compact-header .topbar {
    min-height: 96px;
    padding: 12px 20px;
  }

  .hero-copy {
    max-width: 720px;
  }

  h1 {
    margin-bottom: 3px;
    font-size: clamp(32px, 2.9vw, 44px);
  }

  .compact-header h1 {
    font-size: clamp(28px, 2.25vw, 34px);
  }

  .subtitle,
  #sourceMeta {
    margin-bottom: 3px;
    font-size: 13px;
  }

  .quick-filters {
    margin-top: 6px;
    padding: 6px;
    gap: 8px;
  }

  .quick-filters label {
    gap: 3px;
  }

  .quick-filters select {
    min-height: 34px;
  }

  .toolbar {
    max-width: 380px;
    justify-content: flex-end;
    gap: 8px;
  }

  .toolbar button,
  .toolbar .file-button {
    min-height: 38px;
    border-radius: 10px;
  }

  .filter-bar {
    grid-template-columns: repeat(5, minmax(118px, 1fr)) minmax(180px, 1.3fr) auto;
    gap: 8px;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 10px;
  }

  .filter-bar select,
  .filter-bar input {
    min-height: 34px;
    border-radius: 8px;
  }

  .filter-bar button {
    min-height: 34px;
    border-radius: 8px;
  }

  .executive-strip {
    margin-bottom: 10px;
  }

  .section.active {
    margin-top: 0;
  }

  .kpi-grid,
  .hero-kpi-grid {
    gap: 10px;
  }

  #costsTable.table-wrap {
    overflow-x: hidden;
  }

  #costsTable table {
    table-layout: fixed;
  }

  #costsTable th.col-date,
  #costsTable td.col-date {
    width: 92px;
  }

  #costsTable th.col-economicCategory,
  #costsTable td.col-economicCategory {
    width: 116px;
  }

  #costsTable th.col-sourceBadge,
  #costsTable td.col-sourceBadge {
    width: 86px;
  }

  #costsTable th.col-amount,
  #costsTable td.col-amount {
    width: 86px;
  }

  #costsTable th.col-linkedStayLabel,
  #costsTable td.col-linkedStayLabel {
    width: 142px;
  }

  #costsTable th.col-associationNature,
  #costsTable td.col-associationNature {
    width: 96px;
  }

  #costsTable th.col-description,
  #costsTable td.col-description {
    width: auto;
    max-width: none;
  }

  #costsTable th.col-visibleAlert,
  #costsTable td.col-visibleAlert {
    width: 154px;
  }

  #costsTable th.col-actions,
  #costsTable td.col-actions {
    width: 126px;
    min-width: 126px;
  }

  #costsTable td.col-description,
  #costsTable td.col-linkedStayLabel {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #costsTable .row-actions {
    display: flex;
    justify-content: flex-end;
    gap: 5px;
  }

  #costsTable .row-actions > button,
  #costsTable .cost-actions-menu summary {
    min-height: 28px;
    padding: 0 7px;
    font-size: 10px;
  }

  #costsTable .row-actions .action-primary {
    color: #7c1f12;
    background: #fff7e8;
    border-color: rgba(184, 138, 68, 0.55);
  }

  #costsTable .cost-actions-menu div {
    right: 0;
    left: auto;
    min-width: 148px;
  }

  .strategy-reference-note {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-family: Inter, Arial, sans-serif;
  }
}

@media (min-width: 1181px) and (max-width: 1440px) {
  .topbar {
    min-height: 116px;
    padding: 12px 18px;
  }

  .compact-header .topbar {
    min-height: 88px;
  }

  h1,
  .compact-header h1 {
    font-size: 29px;
  }

  .quick-filters {
    grid-template-columns: repeat(2, minmax(118px, 1fr));
  }

  .quick-filters select {
    min-width: 118px;
  }

  .toolbar {
    max-width: 350px;
  }

  .toolbar button,
  .toolbar .file-button {
    min-width: 80px;
    padding: 0 9px;
    font-size: 11px;
  }
}
