/* ==========================================================================
   Top Cliff Lodge — Hotel Management System
   Visual system aligned with the public site: deep lodge green, warm gold,
   ivory surfaces, Playfair Display headings and Outfit body text.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Tokens
   -------------------------------------------------------------------------- */
:root {
  --brand: #1e3a1f;
  --brand-dark: #122413;
  --brand-soft: #2f5233;
  --gold: #b88656;
  --gold-light: #d4a373;
  --gold-pale: #efe3d3;
  --gold-ink: #8a5f2e;

  --ink: #211f1c;
  --text: #2f2b26;
  --muted: #6d675f;
  --subtle: #8d867c;

  --bg: #f7f3ec;
  --surface: #fffdfa;
  --surface-alt: #faf6ef;
  --line: #e7ddcf;
  --line-strong: #d9ccb9;

  --success: #2f6b46;
  --warning: #8a5a16;
  --danger: #9b2c22;
  --info: #356173;

  /* Compatibility aliases used by a few inline templates */
  --primary: var(--brand);
  --primary-dark: var(--brand-dark);
  --primary-light: var(--brand-soft);
  --dark: var(--ink);
  --text-light: var(--subtle);
  --background: var(--surface);
  --background-alt: var(--surface-alt);
  --border: var(--line);

  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --radius-sm: 3px;
  --radius: 5px;
  --radius-lg: 8px;

  --shadow-sm: 0 1px 2px rgba(33, 31, 28, 0.03);
  --shadow: 0 12px 28px rgba(33, 31, 28, 0.07);
  --shadow-lg: 0 24px 64px rgba(25, 22, 18, 0.18);

  --transition: 0.18s ease;
  --sidebar-w: 248px;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

::selection {
  background: var(--gold-light);
  color: #fff;
}

::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold-light);
}

*:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Shell
   -------------------------------------------------------------------------- */
.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--brand);
  border-right: 1px solid var(--brand-dark);
  z-index: 30;
}

.sidebar .logo {
  padding: 1.35rem 1.4rem 1.2rem;
  border-bottom: 1px solid rgba(247, 241, 232, 0.12);
}

.sidebar .logo a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.sidebar .logo .logo-img {
  width: auto;
  height: 36px;
  flex-shrink: 0;
  object-fit: contain;
  padding: 2px;
  border-radius: 2px;
  background: #fbf7ef;
}

.sidebar .logo span {
  font-family: var(--font-heading);
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.15;
  color: #fbf7ef;
  white-space: nowrap;
}

.sidebar .logo span span {
  color: var(--gold-light);
  font-weight: 700;
}

.sidebar nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 1rem 0.85rem;
  overflow-y: auto;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.62rem 0.8rem;
  border-radius: 4px;
  font-size: 0.79rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(247, 241, 232, 0.72);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.nav-item i {
  width: 1.15rem;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(212, 163, 115, 0.8);
  transition: color var(--transition);
}

.nav-item:hover {
  background: rgba(247, 241, 232, 0.07);
  color: #fbf7ef;
}

.nav-item:hover i {
  color: var(--gold-light);
}

.nav-item.active {
  background: rgba(212, 163, 115, 0.16);
  color: #ffffff;
  font-weight: 600;
}

.nav-item.active i {
  color: var(--gold-light);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 60%;
  border-radius: 2px;
  background: var(--gold-light);
}

.sidebar-footer {
  margin-top: auto;
  padding: 1.1rem 1.4rem 1.25rem;
  border-top: 1px solid rgba(247, 241, 232, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.sidebar-footer span:first-child {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.sidebar-footer span:last-child {
  font-size: 0.72rem;
  color: rgba(247, 241, 232, 0.55);
}

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* --------------------------------------------------------------------------
   Page header
   -------------------------------------------------------------------------- */
.main-header {
  position: sticky;
  top: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.95rem 2rem;
  background: rgba(255, 253, 250, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.page-heading {
  min-width: 0;
}

.page-eyebrow {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.main-header h1 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.main-header h1 i {
  display: none;
}

.main-header .actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
}

.header-date {
  padding-right: 0.9rem;
  border-right: 1px solid var(--line);
  font-size: 0.73rem;
  color: var(--muted);
  white-space: nowrap;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.2rem;
  border-radius: 4px;
}

.user-avatar {
  width: 1.85rem;
  height: 1.85rem;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: #f6efe3;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.user-name {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink);
  text-transform: capitalize;
}

.user-role {
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--subtle);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.58rem 0.95rem;
  border: 1px solid transparent;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.075em;
  line-height: 1.1;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition);
}

.btn i {
  font-size: 0.78rem;
}

.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fcfaf4;
}

.btn-primary:hover {
  background: var(--brand-soft);
  border-color: var(--brand-soft);
}

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

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

.btn-success {
  background: transparent;
  border-color: #c9dbcd;
  color: var(--success);
}

.btn-success:hover {
  background: #eef5ef;
  border-color: var(--success);
}

.btn-danger {
  background: transparent;
  border-color: #e7cfca;
  color: var(--danger);
}

.btn-danger:hover {
  background: #f8ecea;
  border-color: var(--danger);
}

.btn-icon {
  width: 2.2rem;
  height: 2.2rem;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  color: var(--muted);
  justify-content: center;
}

.btn-icon:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-sm {
  padding: 0.34rem 0.6rem;
  border-radius: 3px;
  font-size: 0.58rem;
  letter-spacing: 0.06em;
}

.btn-sm i {
  font-size: 0.7rem;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-group {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Views, sections and cards
   -------------------------------------------------------------------------- */
main > .view:not(#view-dashboard) {
  padding: 1.6rem 2rem 2.4rem;
}

.view h2 {
  font-family: var(--font-heading) !important;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink) !important;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.9rem;
  padding: 1.6rem 2rem 1.15rem;
}

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

.stat-card {
  position: relative;
  padding: 1.1rem 1.2rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color var(--transition);
}

.stat-card:hover {
  border-color: var(--line-strong);
}

.stat-card-label {
  margin-bottom: 0.55rem;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--subtle);
}

.stat-card-value {
  display: block;
  font-family: var(--font-body);
  font-size: 1.5rem;
  white-space: nowrap;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--ink);
}

#statsDashboard .stat-card-value {
  font-size: 1.9rem;
}

.stat-card-value i {
  margin-right: 0.3rem;
  font-size: 0.85rem;
  opacity: 0.8;
  vertical-align: 0.12em;
}

.stat-currency {
  margin-right: 0.28rem;
  font-size: 0.56em;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--muted);
}

.stat-unit {
  margin-left: 0.1rem;
  font-size: 0.55em;
  font-weight: 400;
  color: var(--muted);
}

.stat-card-icon {
  display: none;
}

.cards-section {
  padding: 0 2rem 2rem;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.section-subtitle {
  font-size: 0.76rem;
  color: var(--subtle);
}

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

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.95rem 1.2rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
}

.card-body {
  padding: 1.1rem 1.2rem;
}

/* --------------------------------------------------------------------------
   Dashboard lower grid and quick actions
   -------------------------------------------------------------------------- */
.dashboard-lower {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(270px, 1fr);
  gap: 1rem;
  align-items: start;
}

.quick-panel .card-body {
  padding: 0;
}

.quick-actions {
  display: flex;
  flex-direction: column;
}

.quick-action {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.72rem 1.1rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition);
}

.quick-action:last-child {
  border-bottom: 0;
}

.quick-action:hover {
  background: var(--surface-alt);
}

.quick-icon {
  width: 1.85rem;
  height: 1.85rem;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface-alt);
  color: var(--gold);
  font-size: 0.7rem;
}

.quick-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.quick-copy strong {
  font-size: 0.79rem;
  font-weight: 600;
  color: var(--ink);
}

.quick-copy small {
  font-size: 0.69rem;
  color: var(--subtle);
}

.quick-action > i.fa-arrow-right {
  font-size: 0.6rem;
  color: var(--subtle);
}

.watch-card {
  margin-top: 1rem;
}

.watch-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}

.watch-row:first-child {
  padding-top: 0;
}

.watch-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.watch-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.watch-main strong {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
}

.watch-main span {
  font-size: 0.68rem;
  color: var(--subtle);
}

.watch-qty {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.empty-note {
  margin: 0;
  font-size: 0.8rem;
  color: var(--subtle);
}

/* --------------------------------------------------------------------------
   Recent activity
   -------------------------------------------------------------------------- */
.activity-list {
  display: flex;
  flex-direction: column;
}

.activity-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem 0.15rem;
  border-bottom: 1px solid var(--line);
  background: transparent;
  border-radius: 0;
}

.activity-row:last-child {
  border-bottom: 0;
}

.activity-icon {
  width: 1.9rem;
  height: 1.9rem;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface-alt);
  color: var(--gold);
  font-size: 0.75rem;
}

.activity-main {
  flex: 1;
  min-width: 0;
}

.activity-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink);
}

.activity-sub {
  font-size: 0.74rem;
  color: var(--subtle);
}

.activity-time {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--subtle);
  white-space: nowrap;
}

.empty-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.2rem 0;
}

.empty-row-icon {
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface-alt);
  color: var(--gold);
  font-size: 0.8rem;
}

.empty-row strong {
  display: block;
  margin-bottom: 0.1rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink);
}

.empty-row p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */
.table-responsive {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  margin: 1rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

th {
  padding: 0.62rem 0.9rem;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--line-strong);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-align: left;
  color: var(--muted);
  white-space: nowrap;
}

td {
  padding: 0.62rem 0.9rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  color: var(--text);
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover td {
  background: #fbf7f0;
}

td strong {
  font-weight: 600;
  color: var(--ink);
}

td code {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

td .btn-group {
  flex-wrap: nowrap;
}

td .btn-sm.btn-secondary,
td .btn-sm.btn-danger {
  padding: 0.28rem 0.42rem;
  border-color: transparent;
  background: transparent;
}

td .btn-sm.btn-secondary {
  color: var(--muted);
}

td .btn-sm.btn-secondary:hover {
  border-color: var(--line);
  background: var(--surface-alt);
  color: var(--ink);
}

td .btn-sm.btn-danger {
  color: var(--danger);
}

td .btn-sm.btn-danger:hover {
  border-color: #eed4cf;
  background: #f8ecea;
  color: var(--danger);
}

.table-empty-cell {
  padding: 2.75rem 1.25rem !important;
}

.table-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  text-align: center;
}

.table-empty strong {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}

.table-empty span {
  max-width: 26rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.table-empty .btn {
  margin-top: 0.55rem;
}

/* --------------------------------------------------------------------------
   Badges and pills
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.16rem 0.42rem;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 0.57rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge i {
  font-size: 0.55rem;
}

.badge-primary {
  background: #eef2ea;
  border-color: #d9e2d4;
  color: #2c5230;
}

.badge-success {
  background: #eef5ef;
  border-color: #d5e6da;
  color: var(--success);
}

.badge-warning {
  background: #fbf3e4;
  border-color: #efdfc2;
  color: var(--warning);
}

.badge-danger {
  background: #f8ecea;
  border-color: #eed4cf;
  color: var(--danger);
}

.badge-info {
  background: #eef3f5;
  border-color: #d6e2e7;
  color: var(--info);
}

.badge-secondary {
  background: var(--surface-alt);
  border-color: var(--line);
  color: var(--muted);
}

.badge-category-kitchen {
  background: #f8efe3;
  border-color: #eeddc8;
  color: #8c5a2b;
}

.badge-category-bar {
  background: #f2eef4;
  border-color: #e4dbe8;
  color: #6a4c73;
}

.badge-category-housekeeping {
  background: #eef3f4;
  border-color: #dbe6e8;
  color: #42636b;
}

.badge-category-maintenance {
  background: #f1f0ed;
  border-color: #e3dfd7;
  color: #5a564f;
}

.badge-category-general {
  background: #f0f3ec;
  border-color: #dfe6d7;
  color: #4d6144;
}

.pill-count {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--surface-alt);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--muted);
}

.pill-count.alert {
  background: #f8ecea;
  border-color: #eed4cf;
  color: var(--danger);
}

.flag-tag {
  display: inline-block;
  margin-right: 0.22rem;
  padding: 0.05rem 0.32rem;
  border: 1px solid currentColor;
  border-radius: 2px;
  background: transparent;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.5;
  text-transform: uppercase;
  opacity: 0.9;
}

.flag-veg {
  color: #4f7a56;
}

.flag-vegan {
  color: #2f6b46;
}

.flag-alcohol {
  color: #9b2c22;
}

.flag-gluten-free {
  color: #9a6a1f;
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.61rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.form-control,
.form-select {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1.4;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control::placeholder {
  color: #b0a89c;
}

.form-control:focus,
.form-select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184, 134, 86, 0.14);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%238d867c' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.6' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  background-size: 0.7rem;
  padding-right: 2rem;
}

.form-control:disabled,
.form-select:disabled {
  background: var(--surface-alt);
  color: var(--subtle);
  cursor: not-allowed;
}

/* Password input with a show/hide eye button */
.password-field {
  position: relative;
}

.password-field .form-control {
  padding-right: 2.6rem;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.3rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.password-toggle:hover {
  color: var(--ink);
}

.password-toggle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.password-toggle .icon-eye-off {
  display: none;
}

.password-field.is-revealed .password-toggle .icon-eye {
  display: none;
}

.password-field.is-revealed .password-toggle .icon-eye-off {
  display: block;
}

textarea.form-control {
  resize: vertical;
  min-height: 3.2rem;
}

input[type='checkbox'] {
  appearance: none;
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  display: inline-grid;
  place-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--surface);
  cursor: pointer;
  vertical-align: middle;
  transition: background var(--transition), border-color var(--transition);
}

input[type='checkbox']::before {
  content: '';
  width: 9px;
  height: 9px;
  transform: scale(0);
  transition: transform 0.1s ease-in-out;
  background: var(--surface);
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

input[type='checkbox']:hover {
  border-color: var(--gold);
}

input[type='checkbox']:checked {
  background: var(--brand);
  border-color: var(--brand);
}

input[type='checkbox']:checked::before {
  transform: scale(1);
}

.form-row {
  display: grid;
  gap: 1rem;
}

.form-row.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.form-row.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.help-text {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.68rem;
  color: var(--subtle);
}

/* --------------------------------------------------------------------------
   Sub-tabs, filters, stock bars
   -------------------------------------------------------------------------- */
.sub-tabs {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.sub-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.05rem 0.7rem;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  font-family: var(--font-body);
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--subtle);
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--transition), border-color var(--transition);
}

.sub-tab i {
  font-size: 0.72rem;
  opacity: 0.8;
}

.sub-tab:hover {
  color: var(--brand);
}

.sub-tab.active {
  color: var(--brand);
  border-bottom-color: var(--gold);
}

.filter-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
  padding: 0.75rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.stock-bar-container {
  width: 96px;
  height: 4px;
  margin-top: 5px;
  border-radius: 3px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  overflow: hidden;
}

.stock-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* --------------------------------------------------------------------------
   Room board
   -------------------------------------------------------------------------- */
.room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
  gap: 0.85rem;
}

.room-card {
  padding: 0.85rem 0.95rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.room-card:hover {
  background: var(--surface-alt);
  border-color: var(--line-strong);
}

.room-card.room-status-available {
  border-left-color: #7f9c7f;
}

.room-card.room-status-occupied {
  border-left-color: var(--brand);
}

.room-card.room-status-dirty {
  border-left-color: #c08a3e;
}

.room-card.room-status-maintenance {
  border-left-color: #a54b40;
}

.room-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.room-number {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
}

.room-type {
  margin-top: 2px;
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.005em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.room-guest {
  margin-top: 0.55rem;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--brand);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.room-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.6rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--line);
  font-size: 0.68rem;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Front desk: check-in and guest folio
   -------------------------------------------------------------------------- */
.dialog-lead {
  margin-bottom: 1.1rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.dialog-lead strong {
  font-weight: 600;
  color: var(--ink);
}

.guest-summary {
  display: grid;
  grid-template-columns: 1.5fr 1.2fr 1fr;
  gap: 1px;
  overflow: hidden;
  margin-bottom: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.guest-summary-item {
  min-width: 0;
  padding: 0.7rem 0.85rem;
  background: var(--surface-alt);
}

.guest-summary-item.wide {
  grid-column: 1 / -1;
}

.guest-summary-label {
  display: block;
  margin-bottom: 0.22rem;
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--subtle);
}

.guest-summary-value {
  display: block;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--ink);
}

.guest-summary-value strong {
  font-weight: 600;
}

.guest-summary-value span {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
}

.guest-summary-notes {
  white-space: pre-line;
  font-size: 0.76rem;
  color: var(--text);
}

.dialog-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.dialog-section-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
}

.dialog-section-note {
  margin-top: 0.15rem;
  font-size: 0.7rem;
  color: var(--muted);
}

.dialog-hint {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--gold-ink);
  white-space: nowrap;
}

.room-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  max-height: 16rem;
  overflow-y: auto;
  padding: 2px;
}

.room-option {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.62rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.room-option:hover {
  border-color: var(--line-strong);
  background: var(--surface-alt);
}

.room-option:focus-within {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

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

.room-choice-mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  margin-top: 0.18rem;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
}

.room-choice-mark::after {
  content: '';
  width: 7px;
  height: 7px;
  transform: scale(0);
  border-radius: 50%;
  background: var(--brand);
  transition: transform 0.12s ease;
}

.room-option.is-selected {
  border-color: var(--brand);
  background: #f1f5ee;
  box-shadow: inset 0 0 0 1px var(--brand);
}

.room-option.is-selected .room-choice-mark {
  border-color: var(--brand);
}

.room-option.is-selected .room-choice-mark::after {
  transform: scale(1);
}

.room-option-main {
  flex: 1;
  min-width: 0;
}

.room-option-number {
  display: block;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
}

.room-option-type {
  display: block;
  margin-top: 0.12rem;
  overflow: hidden;
  font-size: 0.67rem;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-option-match {
  display: inline-block;
  margin-top: 0.3rem;
  font-size: 0.52rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.room-option-side {
  flex: 0 0 auto;
  text-align: right;
}

.room-option-rate {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--brand);
  white-space: nowrap;
}

.room-option-unit {
  display: block;
  font-size: 0.54rem;
  color: var(--subtle);
}

.dialog-empty {
  padding: 1.5rem 1.25rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-alt);
  text-align: center;
}

.dialog-empty strong {
  display: block;
  margin-bottom: 0.25rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}

.dialog-empty span {
  display: block;
  max-width: 34rem;
  margin: 0 auto;
  font-size: 0.75rem;
  color: var(--muted);
}

.dialog-loading {
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
}

.folio-estimate {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: 1px;
  overflow: hidden;
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.estimate-cell {
  padding: 0.65rem 0.85rem;
  background: var(--surface-alt);
}

.estimate-cell span {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 0.54rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--subtle);
}

.estimate-cell strong {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
}

.estimate-cell.total {
  background: #f1f5ee;
}

.estimate-cell.total strong {
  color: var(--brand);
}

.dialog-footnote {
  margin-top: 0.85rem;
  font-size: 0.68rem;
  line-height: 1.5;
  color: var(--muted);
}

.folio-sheet {
  padding: 1.9rem 2rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #fff;
  color: var(--text);
}

.folio-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 2px solid var(--brand);
}

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

.folio-brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.folio-wordmark {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--ink);
}

.folio-wordmark span {
  color: var(--gold-ink);
}

.folio-sub {
  margin-top: 0.2rem;
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.folio-doc {
  text-align: right;
}

.folio-doc-label {
  display: block;
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

.folio-doc-number {
  display: block;
  margin-top: 0.15rem;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--ink);
}

.folio-status {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0.12rem 0.38rem;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  font-size: 0.52rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.folio-address {
  margin-top: 0.5rem;
  font-size: 0.6rem;
  letter-spacing: 0.015em;
  color: var(--muted);
}

.folio-meta {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1rem;
  margin: 1.15rem 0 1.25rem;
}

.folio-meta-item span {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.53rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.folio-meta-item strong {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
}

.folio-meta-item em {
  display: block;
  font-size: 0.68rem;
  font-style: normal;
  color: var(--muted);
}

.folio-charges {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.76rem;
}

.folio-charges th {
  padding: 0.4rem 0.25rem;
  border-bottom: 1px solid var(--line-strong);
  font-size: 0.54rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-align: left;
  text-transform: uppercase;
  color: var(--muted);
}

.folio-charges th:not(:first-child),
.folio-charges td:not(:first-child) {
  text-align: right;
}

.folio-charges td {
  padding: 0.65rem 0.25rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.charge-name {
  display: block;
  font-weight: 600;
  color: var(--ink);
}

.charge-detail {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.65rem;
  color: var(--muted);
}

.folio-charges tfoot td {
  padding-top: 0.8rem;
  border-bottom: 0;
}

.folio-charges tfoot .total-label {
  font-size: 0.56rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.folio-charges tfoot .total-amount {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--brand);
}

.folio-note {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 1.35rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  font-size: 0.63rem;
  line-height: 1.6;
  color: var(--muted);
}

.folio-note p {
  max-width: 20rem;
}

.folio-sign {
  min-width: 8.5rem;
  text-align: right;
}

.folio-sign span {
  display: block;
  margin-top: 1.2rem;
  padding-top: 0.28rem;
  border-top: 1px solid var(--line-strong);
  font-size: 0.52rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--subtle);
}

.folio-foot {
  margin-top: 1rem;
  font-size: 0.53rem;
  letter-spacing: 0.04em;
  color: var(--subtle);
}

/* --------------------------------------------------------------------------
   Modals
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(25, 30, 24, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 1050;
}

.modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1060;
  width: 90%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: modalFadeIn 0.2s ease-out;
}

.modal-lg {
  max-width: 800px;
}

#loginModal {
  max-width: 420px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface-alt);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-title,
.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}

.modal-header .btn-icon {
  width: 1.9rem;
  height: 1.9rem;
  font-size: 1.05rem;
  line-height: 1;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.modal-header .btn-icon:hover {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.modal-body {
  padding: 1.35rem 1.4rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 0.95rem 1.4rem;
  border-top: 1px solid var(--line);
  background: var(--surface-alt);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -52%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

/* --------------------------------------------------------------------------
   Alerts and toasts
   -------------------------------------------------------------------------- */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-alt);
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.45;
}

.alert i {
  margin-top: 0.1rem;
  font-size: 0.95rem;
}

.alert-success {
  background: #eef5ef;
  border-color: #d5e6da;
  color: var(--success);
}

.alert-error {
  background: #f8ecea;
  border-color: #eed4cf;
  color: var(--danger);
}

.alert-warning {
  background: #fbf3e4;
  border-color: #efdfc2;
  color: var(--warning);
}

.alert-info {
  background: #eef3f5;
  border-color: #d6e2e7;
  color: var(--info);
}

#alertsContainer {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  width: min(370px, calc(100vw - 2rem));
  pointer-events: none;
}

#alertsContainer .alert {
  margin: 0;
  background: var(--surface);
  box-shadow: var(--shadow);
  pointer-events: auto;
  animation: toastIn 0.24s ease-out;
}

#alertsContainer .alert-success {
  border-left: 3px solid var(--success);
  background: var(--surface);
  color: var(--text);
}

#alertsContainer .alert-error {
  border-left: 3px solid var(--danger);
  background: var(--surface);
  color: var(--text);
}

#alertsContainer .alert-warning {
  border-left: 3px solid var(--warning);
  background: var(--surface);
  color: var(--text);
}

#alertsContainer .alert-info {
  border-left: 3px solid var(--info);
  background: var(--surface);
  color: var(--text);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   Loading and utilities
   -------------------------------------------------------------------------- */
.hidden {
  display: none !important;
}

.loading {
  display: block;
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--subtle);
  font-size: 0.8rem;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3.5rem 2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}

.empty-state-icon {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface-alt);
  color: var(--gold);
  font-size: 1.1rem;
}

.empty-state h3 {
  margin-bottom: 0.35rem;
  font-family: var(--font-heading);
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--ink);
}

.empty-state p {
  max-width: 400px;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--muted);
}

.spinner {
  border: 2px solid var(--line);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.w-100 {
  width: 100% !important;
}

.mt-2 {
  margin-top: 0.75rem;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  :root {
    --sidebar-w: 224px;
  }

  .main-header,
  .dashboard-stats,
  .cards-section,
  main > .view:not(#view-dashboard) {
    padding-left: 1.6rem;
    padding-right: 1.6rem;
  }
}

@media (max-width: 980px) {
  .layout {
    flex-direction: column;
  }

  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--brand-dark);
  }

  .sidebar .logo {
    padding: 1rem 1.25rem 0.85rem;
    border-bottom: 0;
  }

  .sidebar nav {
    flex: none;
    flex-direction: row;
    gap: 0.3rem;
    padding: 0 0.9rem 0.75rem;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 2.2rem), transparent 100%);
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 2.2rem), transparent 100%);
  }

  .sidebar nav::-webkit-scrollbar {
    display: none;
  }

  .nav-item {
    flex: 0 0 auto;
    padding: 0.55rem 0.7rem;
    white-space: nowrap;
  }

  .nav-item.active::before {
    display: none;
  }

  .sidebar-footer {
    display: none;
  }

  .main-header {
    padding: 0.9rem 1.25rem;
  }

  .header-date {
    display: none;
  }

  .user-info {
    display: none;
  }

  .user-chip {
    padding: 0.22rem;
    border: 0;
    background: none;
  }

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

  .dashboard-lower {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .main-header h1 {
    font-size: 1.3rem;
  }

  .page-eyebrow {
    font-size: 0.52rem;
  }

  .main-header .actions {
    gap: 0.5rem;
  }

  .dashboard-stats {
    padding: 1.25rem 1.1rem 0.9rem;
    gap: 0.7rem;
  }

  .cards-section {
    padding: 0 1.1rem 1.6rem;
  }

  main > .view:not(#view-dashboard) {
    padding: 1.25rem 1.1rem 1.8rem;
  }

  .stat-card {
    padding: 1rem 1.05rem;
  }

  .stat-card-value {
    font-size: 1.45rem;
  }

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

  .section-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.25rem;
  }

  .form-row.cols-2,
  .form-row.cols-3 {
    grid-template-columns: 1fr;
  }

  .filter-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-group {
    width: 100%;
  }

  .filter-group .form-control,
  .filter-group .form-select {
    max-width: none !important;
    width: 100% !important;
  }

  .modal {
    width: calc(100% - 1.5rem);
    max-height: 92vh;
  }

  .modal-body {
    padding: 1.1rem;
  }

  .modal-footer {
    padding: 0.85rem 1.1rem;
  }

  .activity-time {
    display: none;
  }

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

  .table-responsive table {
    min-width: 700px;
  }

  .guest-summary {
    grid-template-columns: 1fr 1fr;
  }

  .room-picker {
    grid-template-columns: 1fr;
    max-height: 15rem;
  }

  .folio-sheet {
    padding: 1.25rem 1.15rem 1.1rem;
  }

  .folio-meta {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .folio-note {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.9rem;
  }

  .folio-sign {
    width: 100%;
    text-align: left;
  }

  .folio-charges {
    font-size: 0.7rem;
  }

  .folio-meta-item strong,
  .folio-meta-item em {
    word-break: break-word;
  }
}

@media (max-width: 460px) {
  #statsDashboard,
  .room-grid {
    grid-template-columns: 1fr;
  }

  .header-date {
    display: none;
  }

  .btn {
    padding: 0.55rem 0.8rem;
    font-size: 0.65rem;
  }

  .guest-summary {
    grid-template-columns: 1fr;
  }

  .folio-estimate {
    grid-template-columns: 1fr 1fr;
  }

  .estimate-cell.total {
    grid-column: 1 / -1;
  }

  .folio-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.6rem;
  }

  .folio-doc {
    text-align: left;
  }
}

/* --------------------------------------------------------------------------
   Guest folio print layout
   -------------------------------------------------------------------------- */
@media print {
  @page {
    size: A4;
    margin: 16mm;
  }

  body.printing-folio {
    background: #fff;
  }

  body.printing-folio > *:not(#folioModal) {
    display: none !important;
  }

  body.printing-folio #folioModal {
    display: block !important;
    position: static;
    width: auto;
    max-width: none;
    max-height: none;
    overflow: visible;
    transform: none;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    animation: none;
  }

  body.printing-folio #folioModal .modal-header,
  body.printing-folio #folioModal .modal-footer {
    display: none !important;
  }

  body.printing-folio #folioModal .modal-body {
    padding: 0;
  }

  body.printing-folio .folio-sheet {
    padding: 0;
    border: 0;
  }

  body.printing-folio .folio-head {
    border-bottom-color: #1e3a1f;
  }
}

/* --------------------------------------------------------------------------
   Module 4 — Reservations, front desk calendar and guest accounts
   -------------------------------------------------------------------------- */
.reso-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
}

.page-note {
  margin: 0;
  max-width: 620px;
  font-size: 0.88rem;
  color: var(--muted);
}

.reso-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.reso-summary-item {
  padding: 0.7rem 0.9rem;
  background: var(--surface-alt);
}

.reso-summary-item span {
  display: block;
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--subtle);
}

.reso-summary-item strong {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
}

.reso-filters {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.reso-availability {
  margin: -0.3rem 0 1rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-alt);
  font-size: 0.76rem;
  color: var(--muted);
}

.reso-availability.is-free {
  border-color: #bcd3bd;
  background: #f1f6ef;
  color: var(--brand);
}

.reso-availability.is-blocked {
  border-color: #e3bdb8;
  background: #fbf1ef;
  color: var(--danger);
}

.checkin-fields {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.checkin-fields .form-group {
  margin-bottom: 0;
}

.detail-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.guest-profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.guest-profile-grid > div {
  min-width: 0;
  padding: 0.65rem 0.8rem;
  background: var(--surface-alt);
}

.guest-profile-grid span {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--subtle);
}

.guest-profile-grid strong {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  word-break: break-word;
}

.guest-profile-grid .badge {
  display: inline-flex;
}

.folio-totals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.folio-totals > div {
  padding: 0.6rem 0.8rem;
  background: var(--surface-alt);
}

.folio-totals span {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 0.54rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--subtle);
}

.folio-totals strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}

.folio-totals .folio-balance {
  background: #f1f5ee;
}

.folio-totals .folio-balance strong {
  color: var(--brand);
}

.folio-charge-form {
  margin-top: 1rem;
  padding: 0.95rem 1rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-alt);
}

.folio-charge-form .dialog-section-head {
  margin-bottom: 0.7rem;
}

.charge-form-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 0.7fr 1fr auto;
  gap: 0.5rem;
  align-items: center;
}

.charge-form-grid .form-control,
.charge-form-grid .form-select {
  min-width: 0;
}

.charge-remove {
  margin-left: 0.45rem;
  border: 0;
  background: none;
  color: var(--danger);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  vertical-align: middle;
}

/* Calendar */
.cal-controls {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.cal-range {
  font-size: 0.78rem;
  color: var(--muted);
}

.reso-calendar-wrap {
  padding: 0;
  overflow: auto;
  max-height: 68vh;
}

.reso-calendar {
  min-width: 1040px;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
}

.reso-calendar th,
.reso-calendar td {
  padding: 0.3rem 0.4rem;
  border-right: 1px solid rgba(231, 221, 207, 0.75);
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.reso-calendar thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-alt);
  text-align: center;
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.reso-calendar thead th span {
  display: block;
  font-weight: 600;
  color: var(--subtle);
}

.reso-calendar thead th strong {
  display: block;
  font-size: 0.72rem;
  color: var(--ink);
}

.cal-room-head,
.cal-room {
  position: sticky;
  left: 0;
  z-index: 1;
  width: 124px;
  min-width: 124px;
  background: var(--surface);
  text-align: left;
}

.cal-room-head {
  z-index: 3;
}

.cal-room strong {
  display: block;
  font-size: 0.76rem;
  color: var(--ink);
}

.cal-room span {
  display: block;
  font-size: 0.6rem;
  color: var(--subtle);
}

.cal-day.is-weekend {
  background: #faf6ef;
}

.cal-day.is-today {
  background: #f1f5ee;
}

.cal-cell {
  height: 46px;
}

.cal-cell.is-today {
  background: #f7faf4;
}

.cal-stay {
  height: 46px;
  min-width: 88px;
  cursor: pointer;
  background: #eef4ea;
  color: var(--brand);
  transition: filter var(--transition);
}

.cal-stay:hover {
  filter: brightness(0.97);
}

.cal-stay span {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-stay small {
  display: block;
  font-size: 0.55rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-stay-pending {
  background: #fdf4e5;
  color: var(--warning);
}

.cal-stay-confirmed {
  background: #edf3e9;
  color: var(--brand);
}

.cal-stay-checked-in {
  background: #dce9da;
  color: var(--brand-dark);
  box-shadow: inset 2px 0 0 var(--brand);
}

.cal-legend {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.9rem;
  font-size: 0.7rem;
  color: var(--muted);
}

.cal-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: #eef4ea;
}

.cal-dot-pending {
  background: #fdf4e5;
  border-color: #e5c48e;
}

.cal-dot-confirmed {
  background: #edf3e9;
  border-color: #9fba9d;
}

.cal-dot-checked-in {
  background: var(--brand);
  border-color: var(--brand);
}

.cal-legend-note {
  margin-left: auto;
}

@media (max-width: 860px) {
  .reso-summary,
  .folio-totals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .guest-profile-grid,
  .checkin-fields {
    grid-template-columns: 1fr 1fr;
  }

  .charge-form-grid {
    grid-template-columns: 1fr 1fr;
  }

  .charge-form-grid .btn {
    grid-column: 1 / -1;
  }

  .cal-legend-note {
    margin-left: 0;
  }
}

@media print {
  .no-print {
    display: none !important;
  }
}
/* --------------------------------------------------------------------------
   Module 5 — Point of sale, kitchen display and cash-up
   -------------------------------------------------------------------------- */
.modal-xl {
  max-width: 1120px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.cell-sub {
  margin-top: 2px;
  font-size: 0.66rem;
  color: var(--subtle);
}

.cell-sub.warn {
  color: var(--warning);
}

.cell-items {
  max-width: 300px;
  font-size: 0.8rem;
}

/* Order entry */
.pos-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.95fr);
  gap: 1rem;
  min-height: 0;
}

.pos-menu,
.pos-cart {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-alt);
}

.pos-menu {
  display: flex;
  flex-direction: column;
  max-height: 62vh;
}

.pos-menu-tools {
  padding: 0.75rem 0.8rem 0.5rem;
  border-bottom: 1px solid var(--line);
}

.pos-categories {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 0.55rem;
}

.pos-category {
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--font-body);
  font-size: 0.66rem;
  color: var(--muted);
  cursor: pointer;
}

.pos-category:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.pos-category.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.pos-menu-list {
  overflow-y: auto;
  padding: 0.55rem;
  display: grid;
  gap: 0.4rem;
}

.pos-menu-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 24px;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
}

.pos-menu-item:hover {
  border-color: var(--brand);
  background: #f7faf4;
}

.pos-menu-item-main {
  min-width: 0;
}

.pos-menu-item-main strong {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pos-menu-item-main small {
  display: block;
  margin-top: 1px;
  font-size: 0.6rem;
  color: var(--subtle);
}

.pos-menu-item-price {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--brand);
  white-space: nowrap;
}

.pos-menu-item-add {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gold-pale);
  color: var(--gold-ink);
  font-size: 0.6rem;
}

.pos-cart {
  display: flex;
  flex-direction: column;
  padding: 0.8rem;
  max-height: 62vh;
  overflow-y: auto;
}

.pos-cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--subtle);
}

.pos-cart-head strong {
  color: var(--ink);
  font-size: 0.66rem;
}

.pos-cart-lines {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0;
  min-height: 80px;
}

.pos-cart-empty {
  margin: 1.1rem 0;
  font-size: 0.75rem;
  color: var(--subtle);
  text-align: center;
}

.pos-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.5rem;
  align-items: center;
  padding: 0.45rem 0;
  border-bottom: 1px dashed var(--line);
}

.pos-line-main strong {
  display: block;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--ink);
}

.pos-line-main span {
  display: block;
  font-size: 0.62rem;
  color: var(--subtle);
}

.qty-controls {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.qty-controls button {
  width: 22px;
  height: 22px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.8rem;
  line-height: 1;
  cursor: pointer;
}

.qty-controls span {
  min-width: 16px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
}

.pos-line-total {
  min-width: 64px;
  text-align: right;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink);
}

.pos-cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-top: 1px solid var(--line-strong);
  margin-bottom: 0.6rem;
}

.pos-cart-total span {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--subtle);
}

.pos-cart-total strong {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--brand);
}

.pos-cart .form-group:last-child {
  margin-bottom: 0;
}

/* Kitchen display */
.kitchen-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
  font-size: 0.72rem;
  color: var(--muted);
}

.kitchen-note i {
  margin-right: 4px;
  color: var(--brand);
}

.kitchen-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  align-items: start;
}

.kitchen-column {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-alt);
  overflow: hidden;
}

.kitchen-column > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.62rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.kitchen-column > header strong {
  font-weight: 600;
}

.kitchen-column > header span {
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 0.62rem;
  color: var(--ink);
}

.kitchen-column-new > header {
  border-top: 3px solid var(--gold);
}

.kitchen-column-preparing > header {
  border-top: 3px solid var(--info);
}

.kitchen-column-served > header {
  border-top: 3px solid var(--success);
}

.kitchen-tickets {
  display: grid;
  gap: 0.6rem;
  padding: 0.6rem;
  max-height: 64vh;
  overflow-y: auto;
}

.kitchen-ticket {
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.kitchen-ticket-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.kitchen-ticket-head strong {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--ink);
}

.kitchen-ticket-head span {
  font-size: 0.65rem;
  color: var(--muted);
}

.kitchen-ticket-head .ticket-late {
  color: var(--danger);
  font-weight: 600;
}

.kitchen-ticket-meta {
  margin-top: 1px;
  font-size: 0.64rem;
  color: var(--subtle);
}

.kitchen-items {
  margin: 0.45rem 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.15rem;
  font-size: 0.75rem;
  color: var(--text);
}

.kitchen-items strong {
  color: var(--brand);
  font-weight: 600;
}

.kitchen-notes {
  margin: 0.35rem 0;
  padding: 0.35rem 0.5rem;
  border-left: 2px solid var(--gold);
  background: var(--gold-pale);
  font-size: 0.68rem;
  color: var(--gold-ink);
}

.kitchen-ticket-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--line);
}

.ticket-settled {
  font-size: 0.66rem;
  color: var(--success);
}

.ticket-settled i {
  margin-right: 3px;
}

.kitchen-empty {
  margin: 0.5rem 0.2rem;
  font-size: 0.72rem;
  color: var(--subtle);
  text-align: center;
}

/* Cash-up */
.cashup-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.cashup-toolbar .form-group {
  min-width: 170px;
}

.cashup-closed {
  font-size: 0.72rem;
  color: var(--muted);
}

.cashup-closed i {
  margin-right: 4px;
  color: var(--brand);
}

.cashup-stats .stat-card {
  padding: 0.85rem 0.95rem;
}

.cashup-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.cashup-card {
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.cashup-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.cashup-card-head h4 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
}

.cashup-card-head span {
  font-size: 0.65rem;
  color: var(--subtle);
}

.drawer-figures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  margin: 0.85rem 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--line);
}

.drawer-figures > div {
  padding: 0.55rem 0.65rem;
  background: var(--surface-alt);
}

.drawer-figures span {
  display: block;
  font-size: 0.54rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--subtle);
}

.drawer-figures strong {
  display: block;
  margin-top: 2px;
  font-size: 0.8rem;
  color: var(--ink);
}

.drawer-figures .is-balanced {
  color: var(--success);
}

.drawer-figures .is-over {
  color: var(--warning);
}

.drawer-figures .is-short {
  color: var(--danger);
}

.method-list {
  display: grid;
  gap: 0.4rem;
}

.method-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px dashed var(--line);
  font-size: 0.75rem;
  color: var(--muted);
}

.method-list i {
  width: 16px;
  margin-right: 4px;
  color: var(--gold-ink);
}

.method-list strong {
  color: var(--ink);
}

.method-list .method-tips {
  border-bottom: 0;
  padding-top: 0.15rem;
  font-weight: 600;
  color: var(--ink);
}

.cashup-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
  font-size: 0.66rem;
  color: var(--subtle);
}

.cashup-payments {
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

/* Payment modal */
.payment-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.payment-summary > div {
  padding: 0.55rem 0.65rem;
  background: var(--surface-alt);
}

.payment-summary span {
  display: block;
  font-size: 0.52rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--subtle);
}

.payment-summary strong {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  color: var(--ink);
}

.payment-summary .payment-balance {
  background: #f1f5ee;
}

.payment-summary .payment-balance strong {
  color: var(--brand);
}

.payment-items {
  margin: 0 0 0.75rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.25rem;
  font-size: 0.76rem;
}

.payment-items li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
}

.payment-items li strong {
  color: var(--ink);
  font-weight: 500;
}

.payment-form {
  margin-top: 0.75rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-alt);
}

.payment-form .btn {
  margin-top: 0.25rem;
}

.pay-change {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 0 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand);
}

.pay-change.is-short {
  color: var(--danger);
}

.payment-settled {
  margin-top: 0.75rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid #bcd3bd;
  border-radius: var(--radius);
  background: #f1f6ef;
  font-size: 0.8rem;
  color: var(--brand);
}

.payment-settled i {
  margin-right: 4px;
}

.payment-history {
  margin-top: 1rem;
}

/* Receipt */
.receipt-sheet {
  padding: 1.5rem 1.7rem 1.2rem;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  max-width: 520px;
  margin: 0 auto;
}

.receipt-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.receipt-brand {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.receipt-brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.receipt-status {
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--line-strong);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.receipt-status.paid {
  border-color: #bcd3bd;
  color: var(--success);
}

.receipt-status.unpaid,
.receipt-status.partial {
  border-color: #e5c48e;
  color: var(--warning);
}

.receipt-status.refunded {
  border-color: #e3bdb8;
  color: var(--danger);
}

.receipt-address {
  margin: 0.35rem 0 0.9rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.6rem;
  color: var(--subtle);
}

.receipt-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem 1rem;
  margin-bottom: 0.9rem;
}

.receipt-meta span {
  display: block;
  font-size: 0.52rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--subtle);
}

.receipt-meta strong {
  display: block;
  font-size: 0.72rem;
  color: var(--ink);
}

.receipt-items {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0.8rem;
}

.receipt-items th {
  padding: 0.3rem 0.2rem;
  border-bottom: 1px solid var(--line-strong);
  font-size: 0.52rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--subtle);
  text-align: left;
}

.receipt-items th:not(:first-child),
.receipt-items td:not(:first-child) {
  text-align: right;
}

.receipt-items td {
  padding: 0.32rem 0.2rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.72rem;
  color: var(--text);
}

.receipt-items tfoot td {
  padding-top: 0.4rem;
  border-bottom: 0;
  font-size: 0.72rem;
  font-weight: 600;
}

.receipt-items tfoot .total-label {
  text-align: right;
  color: var(--muted);
}

.receipt-items tfoot .total-amount {
  color: var(--brand);
  font-size: 0.85rem;
}

.receipt-payments {
  display: grid;
  gap: 0.2rem;
  padding: 0.65rem 0;
  border-top: 1px dashed var(--line-strong);
  border-bottom: 1px dashed var(--line-strong);
  font-size: 0.7rem;
}

.receipt-payments > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
}

.receipt-payments strong {
  color: var(--ink);
}

.receipt-foot {
  margin-top: 0.8rem;
  font-size: 0.6rem;
  line-height: 1.5;
  color: var(--subtle);
}

.receipt-foot p {
  margin: 0 0 0.2rem;
}

/* 80mm thermal receipt preview. The print rules below strip the modal chrome
   and send only this block to the printer. */
.receipt-thermal {
  width: 78mm;
  max-width: 100%;
  padding: 14px 12px 16px;
  border: 1px dashed #c9bba6;
  border-radius: 2px;
  font-family: 'Courier New', Courier, monospace;
  line-height: 1.35;
  box-shadow: 0 8px 24px rgba(28, 25, 20, 0.08);
}

.receipt-thermal .receipt-head {
  align-items: center;
}

.receipt-thermal .receipt-brand {
  gap: 0.45rem;
}

.receipt-thermal .receipt-brand img {
  width: 30px;
  height: 30px;
}

.receipt-thermal .folio-wordmark {
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.receipt-thermal .folio-wordmark span {
  color: inherit;
}

.receipt-thermal .folio-sub {
  font-size: 7px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.receipt-thermal .receipt-status {
  padding: 2px 4px;
  font-size: 7.5px;
  letter-spacing: 0.08em;
}

.receipt-thermal .receipt-address {
  margin: 7px 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--line-strong);
  font-size: 8px;
  line-height: 1.45;
  text-align: center;
}

.receipt-thermal .receipt-meta {
  gap: 3px 8px;
  margin-bottom: 8px;
}

.receipt-thermal .receipt-meta span {
  font-size: 7px;
  letter-spacing: 0.06em;
}

.receipt-thermal .receipt-meta strong {
  font-size: 9.5px;
  font-weight: 600;
}

.receipt-thermal .receipt-items {
  margin-bottom: 6px;
}

.receipt-thermal .receipt-items th {
  padding: 3px 2px;
  border-bottom: 1px dashed var(--line-strong);
  font-size: 7px;
}

.receipt-thermal .receipt-items td {
  padding: 2.5px 2px;
  border-bottom: 1px dotted #e3dbcd;
  font-size: 9.5px;
}

.receipt-thermal .receipt-items tfoot td {
  padding-top: 4px;
  font-size: 10px;
}

.receipt-thermal .receipt-items tfoot .total-amount {
  font-size: 11px;
}

.receipt-thermal .receipt-payments {
  gap: 1px;
  padding: 6px 0;
  font-size: 9px;
}

.receipt-thermal .receipt-foot {
  margin-top: 8px;
  font-size: 8px;
}

.receipt-served {
  margin-bottom: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line-strong);
  text-align: center;
}

.receipt-served span {
  display: block;
  margin-bottom: 2px;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--subtle);
}

.receipt-served strong {
  display: block;
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  letter-spacing: 0.03em;
  color: var(--ink);
}

.receipt-thanks {
  margin: 0 0 3px;
  text-align: center;
  font-size: 8.5px;
}

.receipt-ref {
  display: block;
  text-align: center;
  font-size: 7.5px;
  letter-spacing: 0.05em;
}

@media (max-width: 960px) {
  .pos-layout,
  .kitchen-board,
  .cashup-grid {
    grid-template-columns: 1fr;
  }

  .payment-summary {
    grid-template-columns: 1fr 1fr;
  }
}

@media print {
  body.printing-receipt > *:not(#receiptModal) {
    display: none !important;
  }

  body.printing-receipt #receiptModal {
    position: static;
    display: block !important;
    width: auto;
    max-width: none;
    max-height: none;
    border: 0;
    box-shadow: none;
  }

  body.printing-receipt #receiptModal .modal-header,
  body.printing-receipt #receiptModal .modal-footer {
    display: none !important;
  }

  body.printing-receipt #receiptModal .modal-body {
    padding: 0;
  }

  body.printing-receipt .receipt-sheet {
    width: 72mm;
    max-width: 72mm;
    padding: 0;
    border: 0;
    box-shadow: none;
    color: #000;
    font-family: 'Courier New', Courier, monospace;
  }

  body.printing-receipt .receipt-brand img {
    width: 22px;
    height: 22px;
    filter: grayscale(1);
  }

  body.printing-receipt .receipt-status {
    border: 1px solid #000;
    color: #000;
  }

  body.printing-receipt .receipt-address,
  body.printing-receipt .receipt-meta span,
  body.printing-receipt .receipt-meta strong,
  body.printing-receipt .receipt-items th,
  body.printing-receipt .receipt-items td,
  body.printing-receipt .receipt-items tfoot td,
  body.printing-receipt .receipt-payments,
  body.printing-receipt .receipt-payments strong,
  body.printing-receipt .receipt-foot {
    color: #000;
  }

  body.printing-receipt .receipt-address,
  body.printing-receipt .receipt-items th {
    border-color: #000;
  }

  body.printing-receipt .receipt-meta {
    grid-template-columns: 1fr 1fr;
    gap: 2px 8px;
  }

  body.printing-receipt .receipt-meta span,
  body.printing-receipt .receipt-items th {
    font-size: 8px;
  }

  body.printing-receipt .receipt-meta strong,
  body.printing-receipt .receipt-items td,
  body.printing-receipt .receipt-items tfoot td,
  body.printing-receipt .receipt-payments {
    font-size: 9px;
  }

  body.printing-receipt .receipt-foot {
    margin-top: 2mm;
    padding-top: 2mm;
    border-top: 1px dashed #000;
    font-size: 8px;
    text-align: center;
  }

  body.printing-receipt .receipt-foot p {
    margin-bottom: 1mm;
  }

  body.printing-receipt .receipt-served {
    margin-bottom: 2mm;
    padding-top: 2mm;
    border-top: 0;
  }

  body.printing-receipt .receipt-served span {
    color: #000;
    font-size: 7px;
  }

  body.printing-receipt .receipt-served strong {
    color: #000;
    font-size: 12px;
  }

  body.printing-receipt .receipt-thanks {
    font-size: 8px;
  }

  body.printing-receipt .receipt-ref {
    color: #000;
    font-size: 7px;
  }
}
/* --------------------------------------------------------------------------
   Module 6 — Housekeeping
   -------------------------------------------------------------------------- */
.hk-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.hk-toolbar-meta {
  display: grid;
  gap: 2px;
  padding-bottom: 0.35rem;
  font-size: 0.7rem;
  color: var(--subtle);
}

.hk-toolbar-meta strong {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
}

.hk-room-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-alt);
}

.hk-room-group-label {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--subtle);
}

.hk-room-group-label strong {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--ink);
}

.hk-room-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.hk-room-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.28rem 0.55rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--ink);
  cursor: default;
}

.hk-room-chip.is-dirty {
  border-color: #e5c48e;
  background: #fdf6ea;
  color: var(--warning);
  cursor: pointer;
}

.hk-room-chip.is-dirty:hover {
  border-color: var(--gold);
}

.hk-room-chip.is-working {
  border-color: #bcd0de;
  background: #f0f6fa;
  color: var(--info);
}

.hk-room-chip i {
  font-size: 0.55rem;
  color: var(--gold-ink);
}

.hk-room-empty {
  font-size: 0.7rem;
  color: var(--subtle);
}

.hk-checklist-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.hk-checklist-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
}

.reservation-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 0.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--line);
}

.reservation-meta > div {
  padding: 0.5rem 0.65rem;
  background: var(--surface-alt);
}

.reservation-meta span {
  display: block;
  font-size: 0.52rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--subtle);
}

.reservation-meta strong {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
}

.hk-checklist {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.6rem;
}

.hk-check-item {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 0.78rem;
  color: var(--text);
  cursor: pointer;
}

.hk-check-item:hover {
  border-color: var(--line-strong);
  background: var(--surface-alt);
}

.hk-check-item input {
  margin-top: 1px;
  accent-color: var(--brand);
}

.hk-check-item.is-done {
  border-color: #bcd3bd;
  background: #f3f8f1;
  color: var(--muted);
}

.hk-check-item.is-done span {
  text-decoration: line-through;
}

@media (max-width: 960px) {
  .hk-room-strip {
    grid-template-columns: 1fr;
  }

  .reservation-meta {
    grid-template-columns: 1fr;
  }
}
/* --------------------------------------------------------------------------
   Module 7 — Conference & events
   -------------------------------------------------------------------------- */
.form-row.cols-4 {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) 90px 120px;
  gap: 0.75rem;
}

.ev-toolbar {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}

/* Month calendar */
.ev-calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.ev-calendar-head strong {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--ink);
}

.ev-calendar {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.ev-calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  background: var(--surface-alt);
  border-bottom: 1px solid var(--line);
}

.ev-calendar-weekdays span {
  padding: 0.45rem 0.6rem;
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--subtle);
}

.ev-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.ev-day {
  min-height: 108px;
  padding: 0.4rem 0.45rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.ev-day:nth-child(7n) {
  border-right: 0;
}

.ev-day.is-empty {
  background: #fbfaf7;
}

.ev-day.is-today {
  background: #f6f9f2;
  box-shadow: inset 0 0 0 1px #cddcc4;
}

.ev-day-number {
  margin-bottom: 0.25rem;
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--muted);
}

.ev-day.is-today .ev-day-number {
  color: var(--brand);
}

.ev-day-events {
  display: grid;
  gap: 0.22rem;
}

.ev-chip {
  display: block;
  width: 100%;
  padding: 0.22rem 0.35rem;
  border: 0;
  border-left: 2px solid var(--gold);
  border-radius: 2px;
  background: var(--gold-pale);
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
}

.ev-chip:hover {
  filter: brightness(0.97);
}

.ev-chip span {
  display: block;
  font-size: 0.5rem;
  letter-spacing: 0.04em;
  color: var(--subtle);
}

.ev-chip strong {
  display: block;
  font-size: 0.58rem;
  font-weight: 600;
  color: var(--gold-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ev-chip em {
  display: block;
  font-style: normal;
  font-size: 0.56rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ev-chip.ev-status-confirmed {
  border-left-color: var(--success);
  background: #f1f7ee;
}

.ev-chip.ev-status-confirmed strong {
  color: var(--brand);
}

.ev-chip.ev-status-completed {
  border-left-color: var(--brand);
  background: #eef3e9;
}

.ev-chip.ev-status-quoted {
  border-left-color: var(--warning);
  background: #fdf6e8;
}

/* Venues */
.ev-venue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.9rem;
}

.ev-venue-card {
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.ev-venue-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.ev-venue-head h4 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}

.ev-venue-head span {
  font-size: 0.65rem;
  color: var(--subtle);
}

.ev-venue-rate {
  margin: 0.4rem 0 0.85rem;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--brand);
}

.ev-venue-rate span {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--subtle);
}

/* Detail */
.ev-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}

.ev-detail-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
}

.ev-detail-status {
  display: grid;
  gap: 4px;
  justify-items: end;
  font-size: 0.65rem;
  color: var(--subtle);
}

.ev-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.ev-summary > div {
  padding: 0.55rem 0.7rem;
  background: var(--surface-alt);
}

.ev-summary span {
  display: block;
  font-size: 0.52rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--subtle);
}

.ev-summary strong {
  display: block;
  margin-top: 2px;
  font-size: 0.85rem;
  color: var(--ink);
}

.ev-summary .ev-summary-balance {
  background: #f1f5ee;
}

.ev-summary .ev-summary-balance strong {
  color: var(--brand);
}

.ev-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
  margin-bottom: 0.9rem;
  align-items: start;
}

.ev-section {
  min-width: 0;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.ev-section .dialog-section-head {
  margin-bottom: 0.6rem;
}

.ev-client {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}

.ev-client span {
  display: block;
  margin-top: 1px;
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--subtle);
}

.ev-brief-row {
  margin-top: 0.55rem;
  padding-top: 0.45rem;
  border-top: 1px dashed var(--line);
}

.ev-brief-row > span {
  display: block;
  font-size: 0.52rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--subtle);
}

.ev-brief-row > strong {
  display: block;
  margin-top: 2px;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--ink);
}

.ev-brief-row p {
  margin: 2px 0 0;
  font-size: 0.74rem;
  line-height: 1.45;
  color: var(--text);
}

.ev-quote-table tfoot td {
  padding-top: 0.45rem;
  border-bottom: 0;
}

.ev-quote-form,
.ev-payment-form,
.ev-runsheet-form {
  margin-top: 0.7rem;
  padding-top: 0.7rem;
  border-top: 1px dashed var(--line);
}

.ev-quote-form .form-group,
.ev-payment-form .form-group,
.ev-runsheet-form .form-group {
  margin-bottom: 0.5rem;
}

.ev-inline-check {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
  font-size: 0.68rem;
  color: var(--muted);
}

.ev-inline-check input {
  accent-color: var(--brand);
}

.ev-runsheet {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.35rem;
}

.ev-runsheet li {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: start;
  padding: 0.4rem 0;
  border-bottom: 1px dashed var(--line);
}

.ev-run-time {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--gold-ink);
}

.ev-runsheet strong {
  display: block;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--ink);
}

.ev-runsheet div span {
  display: block;
  font-size: 0.62rem;
  color: var(--subtle);
}

.ev-runsheet p {
  margin: 2px 0 0;
  font-size: 0.66rem;
  color: var(--muted);
}

.ev-doc .receipt-meta {
  grid-template-columns: 1fr 1fr;
}

.ev-doc .cell-sub {
  font-size: 0.58rem;
}

body.printing-doc > *:not(#evDocModal) {
  display: none !important;
}

body.printing-doc #evDocModal {
  position: static;
  display: block !important;
  width: auto;
  max-width: none;
  max-height: none;
  border: 0;
  box-shadow: none;
}

body.printing-doc #evDocModal .modal-header,
body.printing-doc #evDocModal .modal-footer {
  display: none !important;
}

body.printing-doc #evDocModal .modal-body {
  padding: 0;
}

body.printing-doc #evDocModal .receipt-sheet {
  border: 0;
  max-width: none;
}

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

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

  .form-row.cols-4 {
    grid-template-columns: 1fr 1fr;
  }

  .ev-calendar-grid,
  .ev-calendar-weekdays {
    min-width: 640px;
  }

  .ev-calendar {
    overflow-x: auto;
  }
}
/* --------------------------------------------------------------------------
   Module 8 — Finance & reporting
   -------------------------------------------------------------------------- */
.fin-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.fin-stats .stat-card {
  border-top: 3px solid var(--line);
}

.fin-stat-revenue {
  border-top-color: var(--brand) !important;
}

.fin-stat-profit {
  border-top-color: var(--success) !important;
}

.fin-stat-loss {
  border-top-color: var(--danger) !important;
}

.fin-stat-expense {
  border-top-color: var(--warning) !important;
}

.fin-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
  margin-bottom: 0.9rem;
  align-items: start;
}

.fin-card {
  min-width: 0;
  padding: 0.95rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.fin-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.fin-card-head h4 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}

.fin-card-head span {
  font-size: 0.65rem;
  color: var(--subtle);
}

.fin-streams {
  display: grid;
  gap: 0.55rem;
}

.fin-stream {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
}

.fin-stream-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--gold-pale);
  color: var(--gold-ink);
  font-size: 0.75rem;
}

.fin-stream div span {
  display: block;
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--subtle);
}

.fin-stream div strong {
  display: block;
  font-size: 0.85rem;
  color: var(--ink);
}

.fin-stream em {
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--brand);
}

.fin-chart {
  display: grid;
  grid-template-columns: repeat(31, minmax(0, 1fr));
  align-items: end;
  gap: 2px;
  height: 130px;
  padding-top: 0.4rem;
}

.fin-bar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  height: 100%;
  min-width: 0;
}

.fin-bar {
  width: 100%;
  max-width: 12px;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, var(--gold) 0%, var(--brand) 100%);
  opacity: 0.85;
  transition: opacity var(--transition);
}

.fin-bar-wrap:hover .fin-bar {
  opacity: 1;
}

.fin-bar-wrap span {
  font-size: 0.42rem;
  color: var(--subtle);
  transform: rotate(-55deg);
  transform-origin: center;
  margin-top: 2px;
  white-space: nowrap;
}

.fin-table-scroll {
  max-height: 420px;
  overflow-y: auto;
}

.fin-table-scroll thead th {
  position: sticky;
  top: 0;
  background: var(--surface-alt);
  z-index: 1;
}

.fin-table-scroll tr.is-quiet td {
  color: var(--subtle);
}

.fin-qty {
  font-style: normal;
  font-size: 0.6rem;
  color: var(--subtle);
}

@media (max-width: 1000px) {
  .fin-two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .fin-chart {
    grid-template-columns: repeat(15, minmax(0, 1fr));
    height: auto;
    row-gap: 0.6rem;
  }

  .fin-bar-wrap {
    height: 70px;
  }
}

/* --------------------------------------------------------------------------
   Module 9 — System administration
   -------------------------------------------------------------------------- */
.nav-item.is-nav-hidden {
  display: none !important;
}

.admin-tabs {
  margin-bottom: 1rem;
}

.admin-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.admin-filters {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.admin-filters .form-control,
.admin-filters .form-select,
.admin-audit-filters .form-control,
.admin-audit-filters .form-select {
  width: auto;
  flex: 0 0 auto;
}

.admin-filters .form-control {
  min-width: 220px;
}

.admin-filters .form-select {
  min-width: 130px;
}

.admin-stats {
  margin-bottom: 1rem;
}

.admin-card {
  min-width: 0;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.admin-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}

.admin-card-head h3 {
  margin: 0 0 0.15rem;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}

.admin-card-head p {
  margin: 0;
  max-width: 58ch;
  font-size: 0.76rem;
  color: var(--subtle);
}

.admin-note {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  background: var(--surface-alt);
}

.admin-note > i {
  margin-top: 0.2rem;
  color: var(--gold-ink);
}

.admin-note strong {
  display: block;
  margin-bottom: 0.15rem;
  color: var(--ink);
}

.admin-note p {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.6;
  color: var(--muted);
}

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

.admin-user-cell div span {
  display: block;
  font-size: 0.68rem;
  color: var(--subtle);
}

.admin-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  background: var(--gold-pale);
  color: var(--gold-ink);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.admin-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
}

.admin-row-actions-wrap {
  flex-wrap: wrap;
}

.admin-check-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.25rem 0 0.75rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.admin-check-inline input,
.admin-check input {
  accent-color: var(--brand);
}

.admin-role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.admin-role-card {
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.admin-role-card.is-locked {
  border-color: rgba(184, 134, 86, 0.45);
  background: linear-gradient(135deg, #fffdfa, #faf3e8);
}

.admin-role-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.55rem;
}

.admin-role-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--gold-pale);
  color: var(--gold-ink);
  font-size: 0.72rem;
}

.admin-role-count {
  font-size: 0.68rem;
  color: var(--subtle);
}

.admin-role-card h4 {
  margin: 0 0 0.25rem;
  font-size: 0.86rem;
  color: var(--ink);
}

.admin-role-card p {
  margin: 0;
  font-size: 0.7rem;
  line-height: 1.55;
  color: var(--subtle);
}

.admin-lock {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.5rem;
  font-size: 0.63rem;
  font-weight: 600;
  color: var(--gold-ink);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-matrix-wrap {
  max-height: 620px;
  overflow: auto;
}

.admin-matrix th,
.admin-matrix td {
  white-space: nowrap;
}

.admin-matrix thead th:first-child,
.admin-matrix tbody td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--surface);
}

.admin-matrix thead th:first-child {
  background: var(--surface-alt);
  z-index: 2;
}

.admin-module {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--ink);
  font-weight: 500;
}

.admin-module i {
  width: 14px;
  color: var(--gold-ink);
  font-size: 0.68rem;
}

.admin-matrix-cell {
  min-width: 118px;
}

.admin-check {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-right: 0.55rem;
  font-size: 0.65rem;
  color: var(--muted);
}

.admin-audit-filters {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}

.admin-audit-filters .form-control {
  min-width: 150px;
}

.admin-audit-filters .form-control[type="date"] {
  min-width: 135px;
}

.admin-audit-filters #auditSearch {
  min-width: 220px;
}

.admin-audit-filters .form-select {
  min-width: 120px;
}

.admin-path {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.6rem;
}

.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.8rem;
  font-size: 0.72rem;
  color: var(--subtle);
}

.admin-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.admin-detail-grid div {
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
}

.admin-detail-grid span {
  display: block;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--subtle);
}

.admin-detail-grid strong {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.76rem;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.admin-detail-title {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  color: var(--ink);
}

.admin-json {
  margin: 0;
  padding: 0.8rem;
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #1f241f;
  color: #e9e3d7;
  font-size: 0.66rem;
  line-height: 1.55;
}

.admin-settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
  align-items: start;
}

.admin-save-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.9rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}

.admin-alert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.admin-alert-card {
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.admin-alert-card.has-alert {
  border-left: 3px solid var(--warning);
}

.admin-alert-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.6rem;
}

.admin-alert-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--surface-alt);
  color: var(--gold-ink);
  font-size: 0.72rem;
}

.admin-alert-head div span {
  display: block;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--subtle);
}

.admin-alert-head div strong {
  display: block;
  font-size: 1.1rem;
  color: var(--ink);
}

.admin-alert-card ul {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin-alert-card li {
  padding-top: 0.4rem;
  border-top: 1px solid var(--line);
}

.admin-alert-card li strong {
  display: block;
  font-size: 0.72rem;
  color: var(--ink);
}

.admin-alert-card li span {
  display: block;
  font-size: 0.65rem;
  color: var(--subtle);
}

.admin-rule-list {
  display: grid;
  gap: 0.55rem;
}

.admin-rule {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 0.9rem;
  align-items: center;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
}

.admin-rule.is-paused {
  opacity: 0.68;
}

.admin-rule-main {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.admin-rule-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 7px;
  background: var(--gold-pale);
  color: var(--gold-ink);
  font-size: 0.68rem;
}

.admin-rule h4 {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.15rem;
  font-size: 0.8rem;
  color: var(--ink);
}

.admin-rule p {
  margin: 0;
  font-size: 0.69rem;
  color: var(--subtle);
}

.admin-rule-count {
  display: inline-block;
  margin-top: 0.2rem;
  font-size: 0.64rem;
  font-weight: 600;
  color: var(--warning);
}

.admin-rule-controls {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 0.45rem;
  align-items: center;
}

.admin-rule-controls .admin-check-inline {
  margin: 0;
}

.admin-buffer {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.64rem;
  color: var(--subtle);
}

.admin-buffer .form-control {
  width: 64px;
  padding: 0.35rem 0.45rem;
}

.admin-backup-summary {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.72rem;
  color: var(--subtle);
}

.admin-backup-summary strong {
  color: var(--ink);
}

.admin-file-name {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.7rem;
  overflow-wrap: anywhere;
}

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

  .admin-rule {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .admin-filters .form-control,
  .admin-filters .form-select,
  .admin-audit-filters .form-control,
  .admin-audit-filters .form-select {
    min-width: 100%;
  }

  .admin-rule-controls {
    grid-template-columns: 1fr;
  }

  .admin-detail-grid {
    grid-template-columns: 1fr;
  }

  .admin-toolbar {
    align-items: stretch;
  }
}

@media print {
  body.printing-finance .sidebar,
  body.printing-finance .main-header .actions,
  body.printing-finance .fin-toolbar .btn-group,
  body.printing-finance .sub-tabs {
    display: none !important;
  }

  body.printing-finance .main-header {
    box-shadow: none;
    border-bottom: 1px solid var(--line);
  }

  body.printing-finance .fin-card,
  body.printing-finance .stat-card {
    break-inside: avoid;
  }

  body.printing-finance .view.hidden {
    display: none !important;
  }
}

/* Staff login management */
.staff-secret-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: start;
}

.staff-credentials {
  display: grid;
  gap: 0.55rem;
  padding: 0.9rem 1rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-alt, #faf7f2);
}

.staff-credentials > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.staff-credentials span {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--subtle);
}

.staff-credentials code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.95rem;
  color: var(--ink);
  word-break: break-all;
  text-align: right;
}

@media (max-width: 560px) {
  .staff-secret-field {
    grid-template-columns: 1fr;
  }
}

/* Helper text under a form control */
.form-hint {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.75rem;
  color: #6d675f;
}
/* ==========================================================================
   Boot screen, duty banner, settings, employee profiles
   ========================================================================== */

/* ---- Boot screen ------------------------------------------------------- */
.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 20%, var(--surface-alt), var(--bg) 65%);
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.boot-screen.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot-screen[hidden] {
  display: none;
}

.boot-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem;
}

.boot-logo {
  height: 62px;
  width: auto;
  padding: 4px;
  border-radius: 3px;
  background: #fbf7ef;
  box-shadow: var(--shadow);
}

.boot-eyebrow {
  margin-top: 1.1rem;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.boot-title {
  margin-top: 0.2rem;
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--ink);
}

.boot-message {
  margin-top: 0.55rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.boot-bar {
  width: 170px;
  height: 2px;
  margin-top: 1.2rem;
  overflow: hidden;
  border-radius: 2px;
  background: var(--line);
}

.boot-bar span {
  display: block;
  width: 40%;
  height: 100%;
  background: var(--gold);
  animation: bootSlide 1.3s ease-in-out infinite;
}

@keyframes bootSlide {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(260%); }
}

/* Keep the sidebar honest until the role's modules are known. */
.app-booting .sidebar nav .nav-item[data-view]:not([data-view="dashboard"]),
.app-booting .sidebar-footer,
.app-booting .main {
  visibility: hidden;
}

.nav-badge[hidden] {
  display: none;
}

.nav-badge {
  margin-left: auto;
  min-width: 1.15rem;
  height: 1.15rem;
  display: inline-grid;
  place-items: center;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--gold);
  color: #231a10;
  font-size: 0.56rem;
  font-weight: 700;
  line-height: 1;
}

/* ---- Duty lock --------------------------------------------------------- */
.duty-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.7rem 2rem;
  border-bottom: 1px solid #efdfc2;
  background: #fbf3e4;
  color: var(--warning);
  font-size: 0.78rem;
}

.duty-banner i {
  margin-top: 0.12rem;
}

.duty-banner div {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.duty-banner span {
  color: var(--muted);
  font-size: 0.74rem;
}

/* ---- Settings ---------------------------------------------------------- */
.settings-modal {
  max-width: 640px;
}

.settings-section {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.settings-section:first-child {
  padding-top: 0;
}

.settings-section:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.settings-section h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}

.settings-help {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.theme-choice {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.7rem;
}

.theme-option {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.theme-option i {
  color: var(--gold);
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

.theme-option strong {
  font-size: 0.78rem;
  color: var(--ink);
}

.theme-option span {
  font-size: 0.67rem;
  color: var(--muted);
  line-height: 1.35;
}

.theme-option:hover {
  border-color: var(--line-strong);
}

.theme-option.is-active {
  border-color: var(--gold);
  background: var(--surface-alt);
  box-shadow: inset 0 0 0 1px var(--gold);
}

.settings-toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0.6rem 0 0.75rem;
  cursor: pointer;
}

.settings-toggle span {
  display: flex;
  flex-direction: column;
}

.settings-toggle strong {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
}

.settings-toggle small {
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.4;
}

.settings-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 0.6rem 0 0.9rem;
}

.settings-facts dt {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--subtle);
}

.settings-facts dd {
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: var(--ink);
  word-break: break-word;
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ---- Employee forms and profiles -------------------------------------- */
.modal-wide {
  max-width: 840px;
}

.form-section {
  padding-bottom: 0.5rem;
  margin-bottom: 1.2rem;
  border-bottom: 1px dashed var(--line);
}

.form-section:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: 0;
}

.form-section h4 {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
  font-family: var(--font-heading);
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--ink);
}

.form-section h4 i {
  color: var(--gold);
  font-size: 0.78rem;
}

.staff-leaving {
  margin-top: 0.35rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-left: 2px solid var(--warning);
  border-radius: 4px;
  background: var(--surface-alt);
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
}

.profile-avatar {
  width: 3.3rem;
  height: 3.3rem;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: #f7f1e8;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
}

.profile-head h4 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
}

.profile-head p {
  margin-top: 0.1rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.4rem;
}

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

.profile-grid h5 {
  margin-bottom: 0.4rem;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.profile-row {
  display: grid;
  grid-template-columns: 8.2rem minmax(0, 1fr);
  gap: 0.6rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--line);
}

.profile-row dt {
  font-size: 0.68rem;
  color: var(--subtle);
}

.profile-row dd {
  font-size: 0.77rem;
  color: var(--text);
  word-break: break-word;
  white-space: pre-line;
}

/* ==========================================================================
   Dark theme
   ========================================================================== */
html[data-theme="dark"] {
  --brand: #1b2a1c;
  --brand-dark: #0f1810;
  --brand-soft: #2f5233;
  --gold: #c99a66;
  --gold-light: #d8ae7f;
  --gold-pale: #33291f;
  --gold-ink: #d7ab7a;

  --ink: #f3eee4;
  --text: #ded7cb;
  --muted: #a8a094;
  --subtle: #8b8378;

  --bg: #111310;
  --surface: #191c17;
  --surface-alt: #1f231d;
  --line: #2c3129;
  --line-strong: #3b4236;

  --success: #8fcaa5;
  --warning: #e0b16a;
  --danger: #e89288;
  --info: #93c3d4;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.6);
}

html[data-theme="dark"] .main-header {
  background: rgba(25, 28, 23, 0.94);
}

html[data-theme="dark"] tbody tr:hover td {
  background: var(--surface-alt);
}

html[data-theme="dark"] .sub-tab:hover,
html[data-theme="dark"] .sub-tab.active {
  color: var(--gold-light);
}

html[data-theme="dark"] .form-control::placeholder {
  color: #6f7368;
}

html[data-theme="dark"] input[type="checkbox"]:checked::before {
  background: #f7f3ec;
}

html[data-theme="dark"] .alert-success,
html[data-theme="dark"] .badge-success {
  background: #1d2e23;
  border-color: #2f4a38;
  color: #a8d8b8;
}

html[data-theme="dark"] .alert-error,
html[data-theme="dark"] .badge-danger {
  background: #33211f;
  border-color: #58332f;
  color: #efa39a;
}

html[data-theme="dark"] .alert-warning,
html[data-theme="dark"] .badge-warning {
  background: #322915;
  border-color: #514023;
  color: #ecc07b;
}

html[data-theme="dark"] .alert-info,
html[data-theme="dark"] .badge-info {
  background: #1e2b30;
  border-color: #324650;
  color: #a8d0dd;
}

html[data-theme="dark"] .badge-primary {
  background: #22301f;
  border-color: #33452e;
  color: #a9c9a4;
}

html[data-theme="dark"] .badge-secondary {
  background: var(--surface-alt);
  border-color: var(--line);
  color: var(--muted);
}

html[data-theme="dark"] .pill-count.alert {
  background: #33211f;
  border-color: #58332f;
  color: #efa39a;
}

html[data-theme="dark"] .duty-banner {
  background: #2a2418;
  border-bottom-color: #4a3a1e;
  color: #e0b57f;
}

html[data-theme="dark"] .staff-leaving {
  border-left-color: var(--warning);
}

@media (max-width: 700px) {
  .theme-choice,
  .settings-facts {
    grid-template-columns: 1fr;
  }

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

  .duty-banner {
    padding: 0.7rem 1.2rem;
  }
}
