:root {
  --ink: #172326;
  --muted: #667173;
  --line: #dce4e2;
  --soft: #f5f8f7;
  --paper: #ffffff;
  --teal: #0c7c74;
  --teal-dark: #075e59;
  --gold: #bf8a1f;
  --red: #b42318;
  --green: #157347;
  --blue: #2d5b9f;
  --shadow: 0 16px 44px rgba(23, 35, 38, 0.11);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: #eef3f1;
}

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

button {
  border: 0;
  cursor: pointer;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 420px;
  background:
    linear-gradient(rgba(9, 68, 66, 0.46), rgba(9, 68, 66, 0.46)),
    url("https://images.unsplash.com/photo-1559592413-7cec4d0cae2b?auto=format&fit=crop&w=1800&q=80") center/cover;
}

.login-hero {
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 54px;
}

.login-hero h1 {
  max-width: 760px;
  margin: 0 0 14px;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 0.95;
  letter-spacing: 0;
}

.login-hero p {
  max-width: 620px;
  margin: 0;
  font-size: 18px;
  line-height: 1.55;
}

.login-panel {
  background: rgba(255, 255, 255, 0.95);
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: block;
  object-fit: contain;
  background: white;
  border-radius: 8px;
  padding: 3px;
}

.brand-title {
  font-weight: 800;
  font-size: 18px;
}

.brand-subtitle,
.hint {
  color: var(--muted);
  font-size: 13px;
}

.error-text {
  color: #b42318;
  font-weight: 700;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 15px;
}

.field label {
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 11px 12px;
  color: var(--ink);
}

.field textarea {
  min-height: 88px;
  resize: vertical;
}

.remember-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: -2px 0 15px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.remember-row input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--teal);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--teal);
  color: white;
  font-weight: 750;
}

.btn:hover {
  background: var(--teal-dark);
}

.btn.secondary {
  background: #e7efed;
  color: var(--ink);
}

.btn.danger {
  background: var(--red);
}

.btn.ghost {
  background: transparent;
  color: var(--teal-dark);
  border: 1px solid var(--line);
}

.demo-users {
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  display: grid;
  gap: 8px;
}

.demo-user {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  background: var(--soft);
  font-size: 13px;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px 1fr;
}

.shell.sidebar-collapsed {
  grid-template-columns: 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: #102b2c;
  color: white;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.sidebar-collapsed .sidebar {
  display: none;
}

.sidebar-close {
  display: none;
}

.mobile-logout {
  display: none;
}

.mobile-team-nav {
  display: none;
}

.mobile-team-nav.compact-team-nav {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.floating-chat {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 18;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 8px;
  background: var(--teal);
  color: white;
  font-weight: 850;
  box-shadow: 0 12px 28px rgba(7, 94, 89, 0.3);
}

.floating-chat:hover {
  background: var(--teal-dark);
}

.floating-chat-icon {
  font-size: 19px;
  line-height: 1;
}

.floating-chat b {
  position: absolute;
  top: -6px;
  right: -5px;
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 999px;
  background: #f6c15a;
  color: #102b2c;
  font-size: 11px;
}

.team-quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.quick-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 58px;
  border-radius: 8px;
  color: white;
  font-weight: 850;
}

.quick-action b {
  font-size: 24px;
}

.quick-action.income {
  background: var(--green);
}

.quick-action.expense {
  background: var(--red);
}

.team-entry-list {
  display: grid;
}

.team-entry-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.team-entry-item:last-child {
  border-bottom: 0;
}

.team-entry-item > div:first-child,
.team-entry-status {
  display: grid;
  gap: 4px;
}

.team-entry-item span,
.team-entry-item small {
  color: var(--muted);
  font-size: 12px;
}

.team-entry-status {
  justify-items: end;
  white-space: nowrap;
}

.sidebar .brand-subtitle {
  color: #b9cbca;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav button {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  color: #d7e3e1;
  background: transparent;
  padding: 10px 11px;
  border-radius: 8px;
  font-weight: 700;
}

.nav-badge {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  margin-left: auto;
  padding: 0 6px;
  border-radius: 999px;
  background: #f6c15a;
  color: #102b2c;
  font-size: 11px;
  font-weight: 900;
}

.nav button.active,
.nav button:hover {
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

.nav-more {
  display: grid;
}

.nav-more summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 11px;
  border-radius: 8px;
  color: #d7e3e1;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.nav-more summary::-webkit-details-marker {
  display: none;
}

.nav-more summary:hover,
.nav-more summary.active {
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

.nav-more[open] summary span {
  transform: rotate(180deg);
}

.nav-more-menu {
  display: grid;
  gap: 4px;
  margin-top: 4px;
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.17);
}

.nav-more-menu button {
  padding-top: 8px;
  padding-bottom: 8px;
  font-size: 13px;
}

.user-box {
  margin-top: auto;
  display: grid;
  gap: 10px;
  color: #d7e3e1;
  font-size: 13px;
}

.main {
  min-width: 0;
  padding: 22px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: -22px -22px 18px;
  padding: 22px;
  background: rgba(238, 243, 241, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.page-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  width: 38px;
  min-height: 38px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}

.topbar-logo {
  width: 38px;
  height: 38px;
}

.print-company {
  display: none;
  font-size: 12px;
  font-weight: 850;
}

.topbar h2 {
  margin: 0;
  font-size: 24px;
}

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

.notification-center {
  position: relative;
}

.notification-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  min-height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.notification-button.has-unread {
  border-color: #c98a17;
  background: #fff6df;
  color: #8a5a08;
}

.notification-button b {
  position: absolute;
  top: -7px;
  right: -7px;
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 2px solid white;
  border-radius: 999px;
  background: var(--red);
  color: white;
  font-size: 10px;
  line-height: 1;
}

.notification-panel {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 24;
  width: min(390px, calc(100vw - 24px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 18px 45px rgba(23, 35, 38, 0.2);
}

.notification-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 13px;
  border-bottom: 1px solid var(--line);
}

.notification-panel-head button {
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
}

.notification-permission {
  width: 100%;
  padding: 9px 13px;
  border-bottom: 1px solid var(--line);
  background: #eef6f4;
  color: var(--teal-dark);
  text-align: left;
  font-size: 12px;
  font-weight: 800;
}

.notification-permission.enabled {
  color: #2f7a49;
}

.notification-list {
  max-height: min(430px, calc(100vh - 180px));
  overflow-y: auto;
}

.notification-item {
  display: grid;
  width: 100%;
  gap: 3px;
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
  background: white;
  color: var(--ink);
  text-align: left;
}

.notification-item.unread {
  border-left: 4px solid #c98a17;
  background: #fffaf0;
  padding-left: 9px;
}

.notification-item:hover {
  background: var(--soft);
}

.notification-item strong {
  font-size: 13px;
}

.notification-item span,
.notification-item small {
  color: var(--muted);
  font-size: 12px;
}

.grid {
  display: grid;
  gap: 14px;
}

.dashboard-warning {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #e4b34d;
  border-radius: 8px;
  background: #fff6df;
  color: #714909;
}

.dashboard-warning button {
  padding: 6px 9px;
  border-radius: 7px;
  background: white;
  color: #714909;
  font-size: 12px;
  font-weight: 800;
}

.file-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 180px;
}

.file-actions span {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.opening-balance-group {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.opening-balance-group .field:last-child {
  margin-bottom: 0;
}

.stats {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.dashboard-hero {
  display: grid;
  grid-template-columns: 1fr minmax(240px, 340px);
  gap: 18px;
  align-items: end;
  margin-bottom: 14px;
  padding: 22px;
  border: 1px solid #cbd9d6;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(12, 124, 116, 0.95), rgba(16, 43, 44, 0.97)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.09), transparent);
  color: white;
  box-shadow: var(--shadow);
}

.dashboard-hero h3 {
  margin: 5px 0 8px;
  font-size: 26px;
  line-height: 1.15;
}

.dashboard-hero p {
  margin: 0;
  max-width: 680px;
  color: #d7e8e5;
  line-height: 1.5;
}

.eyebrow {
  color: #f6c15a;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.hero-balance {
  display: grid;
  gap: 6px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.hero-balance span {
  color: #d7e8e5;
  font-size: 12px;
  font-weight: 800;
}

.hero-balance strong {
  font-size: 24px;
}

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.metric-card {
  position: relative;
  overflow: hidden;
  min-height: 138px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 1px 0 rgba(23, 35, 38, 0.03);
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--teal);
}

.metric-card.expense::before,
.metric-card.loss::before {
  background: var(--red);
}

.metric-card.profit::before,
.metric-card.income::before {
  background: var(--green);
}

.metric-card.pending::before {
  background: var(--gold);
}

.metric-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.metric-top b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #edf4f2;
  color: var(--teal-dark);
}

.metric-card strong {
  display: block;
  margin-top: 14px;
  font-size: 25px;
  line-height: 1.12;
}

.metric-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
  align-items: start;
}

.dashboard-main,
.dashboard-side {
  display: grid;
  gap: 14px;
}

.dashboard-card {
  padding: 0;
  overflow: hidden;
}

.dashboard-card .section-title {
  margin: 0;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  background: #fbfdfc;
}

.dashboard-card .table-wrap,
.dashboard-card .empty,
.dashboard-card .balance-list,
.dashboard-card .approval-list {
  margin: 0;
}

.section-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.balance-list,
.approval-list {
  display: grid;
}

.balance-row,
.approval-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.balance-row:last-child,
.approval-item:last-child {
  border-bottom: 0;
}

.balance-row div,
.approval-item div {
  display: grid;
  gap: 4px;
}

.balance-row strong,
.approval-item strong {
  font-size: 13px;
}

.balance-row span,
.approval-item span {
  color: var(--muted);
  font-size: 12px;
}

.balance-row b,
.approval-item b {
  white-space: nowrap;
  font-size: 13px;
}

.positive-text {
  color: var(--green);
}

.negative-text {
  color: var(--red);
}

.empty.tight {
  margin: 14px;
  padding: 14px;
}

.report-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  padding: 0 0 14px;
}

.property-chart-filter {
  grid-template-columns: minmax(190px, 300px);
}

.report-chart-block {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
}

.chart-period {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.report-pie-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
}

.report-pie {
  position: relative;
  width: 220px;
  max-width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(23, 35, 38, 0.08);
}

.report-pie-center {
  position: absolute;
  inset: 25%;
  display: grid;
  place-content: center;
  gap: 3px;
  border-radius: 50%;
  background: white;
  text-align: center;
  box-shadow: 0 2px 12px rgba(23, 35, 38, 0.12);
}

.report-pie-center strong {
  font-size: 22px;
}

.report-pie-center span {
  max-width: 100px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-pie-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 7px 16px;
}

.pie-legend-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

.pie-legend-row i {
  width: 11px;
  height: 11px;
  border-radius: 3px;
}

.pie-legend-row span {
  overflow: hidden;
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pie-legend-row b {
  font-size: 12px;
}

.pie-legend-row small {
  grid-column: 2 / -1;
  color: var(--muted);
  font-size: 10px;
}

.master-textarea {
  min-height: 220px;
  line-height: 1.45;
}

.compact-table table {
  min-width: 420px;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 1px 0 rgba(23, 35, 38, 0.03);
}

.stat-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.stat-value {
  margin-top: 8px;
  font-size: 26px;
  font-weight: 850;
}

.stat-value.positive {
  color: var(--green);
}

.stat-value.negative {
  color: var(--red);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-title h3 {
  margin: 0;
  font-size: 16px;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

th,
td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

.property-expense-row td {
  background: #f0fbf5;
}

.property-expense-row .entry-kind {
  color: var(--green);
  font-weight: 850;
}

.staff-expense-row td {
  background: #eef5ff;
}

.staff-expense-row .entry-kind {
  color: var(--blue);
  font-weight: 850;
}

input[readonly] {
  background: #f4f7f6;
  color: var(--muted);
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  background: #f7faf9;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.pending {
  background: #fff2d5;
  color: #8a5b00;
}

.approved {
  background: #dcf5e8;
  color: #0b6336;
}

.rejected {
  background: #ffe2de;
  color: #8f1f17;
}

.cancelled {
  background: #e7e9e9;
  color: #4d5657;
}

.overdue {
  background: #ffe2de;
  color: #8f1f17;
}

.due-today {
  background: #fff2d5;
  color: #8a5b00;
}

.upcoming {
  background: #e7efed;
  color: var(--teal-dark);
}

.paid {
  background: #dcf5e8;
  color: #0b6336;
}

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

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

.receipt-preview-card {
  overflow: hidden;
}

.receipt-print-area {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}

.booking-receipt {
  max-width: 900px;
  margin: 0 auto;
  color: #132321;
  background: #fff;
}

.receipt-header {
  display: grid;
  grid-template-columns: 86px 1fr 180px;
  gap: 18px;
  align-items: start;
}

.receipt-logo {
  width: 76px;
  height: 76px;
  padding: 0;
  background: transparent;
  border-radius: 0;
}

.receipt-brand h1 {
  margin: 0;
  color: #102f2d;
  font-size: 34px;
  line-height: 1.05;
}

.receipt-brand p,
.receipt-meta {
  color: #4d5c5a;
  font-size: 15px;
  line-height: 1.35;
}

.receipt-meta {
  display: grid;
  gap: 3px;
  text-align: left;
}

.receipt-meta span:not(:first-child) {
  margin-top: 16px;
}

.booking-receipt h2 {
  margin: 46px 0 26px;
  padding: 12px;
  border: 1px solid #d8e2df;
  background: #eef5f3;
  color: #102f2d;
  text-align: center;
  font-size: 28px;
  letter-spacing: 0;
}

.receipt-intro {
  margin: 0 0 28px;
  font-size: 18px;
  line-height: 1.4;
}

.receipt-details {
  min-width: 0;
  border: 1px solid #d8e2df;
}

.receipt-details th,
.receipt-details td {
  border: 1px solid #d8e2df;
  padding: 14px 16px;
  font-size: 17px;
  text-transform: none;
}

.receipt-details th {
  width: 260px;
  color: #51615f;
  background: #f6faf9;
}

.receipt-notes {
  margin-top: 34px;
  padding: 14px 16px;
  border: 1px solid #e6d7ac;
  background: #fff9ea;
  color: #5d6b68;
  font-size: 14px;
}

.receipt-notes ol {
  margin: 4px 0 0 18px;
  padding: 0;
}

.generated-receipt-note {
  margin-top: 80px;
  padding: 18px;
  border: 1px solid #d8e2df;
  background: #f6faf9;
  color: #102f2d;
  text-align: center;
  font-size: 18px;
  font-weight: 850;
}

.receipt-print-frame {
  position: fixed;
  right: 0;
  bottom: 0;
  width: 0;
  height: 0;
  border: 0;
  opacity: 0;
}

.booking-calendar-toolbar {
  margin-bottom: 12px;
}

.calendar-toolbar-row,
.calendar-period-row,
.calendar-legend {
  display: flex;
  align-items: end;
  gap: 10px;
}

.calendar-toolbar-row {
  justify-content: space-between;
}

.calendar-property-field {
  width: min(520px, 100%);
  margin-bottom: 0;
}

.calendar-mode-switch {
  display: flex;
  gap: 6px;
}

.calendar-period-row {
  align-items: center;
  justify-content: center;
  margin-top: 14px;
}

.calendar-period-title {
  display: grid;
  min-width: 230px;
  text-align: center;
}

.calendar-period-title strong {
  font-size: 20px;
}

.calendar-period-title span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-period-input {
  width: 150px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: white;
  color: var(--ink);
}

.calendar-legend {
  align-items: center;
  flex-wrap: wrap;
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
}

.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.calendar-legend i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.calendar-legend i.approved {
  background: var(--teal);
}

.calendar-legend i.pending {
  background: #d08b13;
}

.calendar-legend small {
  margin-left: auto;
}

.booking-calendar-card {
  overflow: visible;
}

.booking-weekdays,
.booking-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.booking-weekdays {
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #f3f7f6;
}

.booking-weekdays div {
  padding: 9px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}

.booking-month-grid {
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.booking-week {
  position: relative;
  grid-template-rows: 30px repeat(var(--booking-lanes), 32px);
  min-height: calc(30px + var(--booking-lanes) * 32px);
}

.booking-day {
  position: relative;
  z-index: 0;
  min-width: 0;
  padding: 7px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: white;
}

.booking-day.outside {
  background: #f7f9f8;
}

.booking-day.today {
  box-shadow: inset 0 0 0 2px var(--gold);
}

.booking-day.occupied {
  background: #f9fcfb;
}

.booking-day-number {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.booking-chip {
  position: relative;
  z-index: 2;
  align-self: center;
  display: block;
  min-width: 0;
  margin: 2px 3px;
  padding: 6px 9px;
  border-radius: 6px;
  color: white;
  text-align: left;
  font-size: 11px;
  font-weight: 800;
}

.booking-chip.approved {
  background: var(--teal);
}

.booking-chip.pending {
  background: #d08b13;
}

.booking-chip.cancellation-pending {
  background: #a86311;
  outline: 2px dashed #ffe0a1;
  outline-offset: -3px;
}

.booking-chip > span:first-child {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.booking-popover {
  position: absolute;
  z-index: 30;
  top: calc(100% + 5px);
  left: 0;
  display: none;
  width: 270px;
  padding: 11px;
  border: 1px solid #294748;
  border-radius: 8px;
  background: #102b2c;
  box-shadow: 0 14px 32px rgba(16, 43, 44, 0.24);
  color: white;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
}

.booking-popover strong,
.booking-popover span {
  display: block;
}

.booking-popover strong {
  margin-bottom: 6px;
  font-size: 13px;
}

.booking-popover-actions {
  display: flex !important;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.booking-popover-actions .btn {
  min-height: 34px;
  padding: 7px 9px;
  font-size: 11px;
}

.booking-chip:hover .booking-popover,
.booking-chip:focus .booking-popover,
.booking-chip:focus-within .booking-popover {
  display: block;
}

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

.booking-mini-month {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: white;
}

.mini-month-title {
  width: 100%;
  padding: 9px;
  background: #edf4f2;
  color: var(--teal-dark);
  text-align: left;
  font-size: 13px;
  font-weight: 850;
}

.mini-weekdays,
.mini-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.mini-weekdays span {
  padding: 5px 2px;
  color: var(--muted);
  text-align: center;
  font-size: 9px;
  font-weight: 800;
}

.mini-day {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 28px;
  border-top: 1px solid #edf1f0;
  border-left: 1px solid #edf1f0;
  background: white;
  color: var(--ink);
  font-size: 10px;
}

.mini-day.outside {
  background: #f8faf9;
}

.mini-day.approved {
  background: #d8efeb;
  color: var(--teal-dark);
  font-weight: 850;
}

.mini-day.pending {
  background: #ffedc9;
  color: #7d5100;
  font-weight: 850;
}

.mini-day.today {
  box-shadow: inset 0 0 0 2px var(--gold);
}

.calendar-empty {
  margin-top: 12px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.loan-mobile-tabs {
  display: none;
}

.loan-filter-card {
  margin-bottom: 10px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.loan-filter-grid {
  grid-template-columns: minmax(220px, 360px);
}

.loan-filter-grid .field {
  margin-bottom: 0;
}

.report-tabs {
  position: sticky;
  top: 73px;
  z-index: 8;
  display: flex;
  gap: 7px;
  overflow-x: auto;
  margin-bottom: 10px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef3f1;
  scrollbar-width: thin;
}

.report-tabs .btn {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 8px 11px;
  font-size: 12px;
}

.report-panel {
  display: none;
}

.report-panel.active {
  display: block;
}

.sheet-header-card {
  margin-bottom: 10px;
}

.sheet-header-card .section-title {
  align-items: flex-start;
}

.sheet-header-card .hint {
  margin: 5px 0 0;
}

.sheet-frame-wrap {
  width: 100%;
  min-width: 0;
  height: calc(100vh - 220px);
  min-height: 520px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.sheet-frame {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 520px;
  border: 0;
  background: white;
}

.sheet-scroll-hint {
  font-weight: 750;
  color: var(--teal-dark);
}

.chat-shell {
  display: grid;
  grid-template-rows: auto minmax(300px, 1fr) auto;
  height: calc(100vh - 115px);
  min-height: 620px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.chat-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 340px) 1fr;
  gap: 14px;
  align-items: end;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #f7faf9;
}

.chat-toolbar .field {
  margin-bottom: 0;
}

.chat-toolbar-note {
  display: grid;
  gap: 3px;
  padding-bottom: 4px;
}

.chat-toolbar-note span {
  color: var(--muted);
  font-size: 12px;
}

.chat-stream {
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  background: #eef3f1;
}

.chat-message {
  width: min(72%, 680px);
  margin: 0 auto 10px 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.chat-message.own {
  margin-right: 0;
  margin-left: auto;
  border-color: #b7d9d4;
  background: #e6f5f2;
}

.chat-message-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
}

.chat-message-head strong {
  color: var(--ink);
  font-size: 12px;
}

.chat-message p {
  margin: 7px 0 0;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.chat-attachment {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  padding: 7px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.chat-compose {
  padding: 12px;
  border-top: 1px solid var(--line);
  background: white;
}

.chat-compose-main {
  display: grid;
  grid-template-columns: 1fr 44px;
  gap: 8px;
  align-items: end;
}

.chat-compose-main textarea {
  width: 100%;
  min-height: 50px;
  max-height: 110px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
}

.chat-send {
  width: 44px;
  min-height: 44px;
  padding: 0;
  font-size: 19px;
}

.chat-attach-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 7px;
}

.chat-file-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.chat-file-button input {
  display: none;
}

.selected-file-status {
  display: block;
  margin-top: 6px;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.booking-conflict-message {
  padding: 10px 12px;
  border: 1px solid #efb4ae;
  border-radius: 6px;
  background: #fff1f0;
  color: var(--red);
  font-size: 13px;
  font-weight: 750;
}

.income-detail-field.hidden {
  display: none;
}

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

.calendar-head {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.calendar-cell {
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: white;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calendar-cell strong {
  font-size: 18px;
}

.calendar-cell span,
.calendar-cell small {
  font-size: 12px;
  color: var(--muted);
}

.calendar-cell.blocked {
  border-color: #f1b6ac;
  background: #fff0ed;
}

.calendar-cell.blocked span {
  color: #9f1d12;
  font-weight: 800;
}

.calendar-cell.available {
  background: #f6fbf4;
}

.calendar-cell.available span {
  color: #1f7a3f;
  font-weight: 800;
}

.calendar-cell.muted {
  background: #f4f4ef;
  border-style: dashed;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.small {
  min-height: 32px;
  padding: 7px 10px;
  font-size: 12px;
}

.notice {
  border-left: 4px solid var(--gold);
  background: #fff8e8;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 14px;
}

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

.tabs button {
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  padding: 9px 12px;
  font-weight: 800;
}

.tabs button.active {
  background: var(--teal);
  color: white;
  border-color: var(--teal);
}

.split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 14px;
}

.empty {
  color: var(--muted);
  padding: 18px;
  background: var(--soft);
  border-radius: 8px;
}

.closing-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.closing-row .hint {
  margin-top: 5px;
  line-height: 1.45;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  background: #102b2c;
  color: white;
  padding: 12px 14px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.lang-switch {
  display: inline-flex;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.lang-switch button {
  min-width: 42px;
  padding: 8px;
  background: transparent;
  font-weight: 800;
}

.lang-switch button.active {
  background: var(--teal);
  color: white;
}

@media (max-width: 980px) {
  .report-pie-layout {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 14px;
  }

  .report-pie {
    width: min(210px, 72vw);
  }

  .report-pie-legend {
    grid-template-columns: 1fr;
    width: 100%;
  }

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

  .calendar-mode-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .calendar-mode-switch .btn {
    min-width: 0;
    padding: 8px;
    font-size: 12px;
  }

  .calendar-period-row {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 40px;
  }

  .calendar-period-title {
    min-width: 0;
  }

  .calendar-period-title strong {
    font-size: 17px;
  }

  .calendar-period-input {
    grid-column: 1 / -1;
    width: 100%;
  }

  .calendar-legend small {
    width: 100%;
    margin-left: 0;
  }

  .booking-calendar-card {
    padding: 8px;
    overflow-x: auto;
  }

  .booking-month {
    min-width: 760px;
  }

  .booking-day {
    padding: 5px;
  }

  .booking-week {
    grid-template-rows: 28px repeat(var(--booking-lanes), 31px);
    min-height: calc(28px + var(--booking-lanes) * 31px);
  }

  .booking-chip {
    padding: 5px;
    font-size: 10px;
  }

  .booking-popover {
    position: fixed;
    top: auto;
    right: 10px;
    bottom: 76px;
    left: 10px;
    width: auto;
    max-height: 45vh;
    overflow-y: auto;
    font-size: 12px;
  }

  .booking-year-grid {
    grid-template-columns: 1fr;
  }

  .mini-day {
    min-height: 34px;
  }

  .login-shell,
  .shell,
  .split,
  .dashboard-hero,
  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .login-hero {
    min-height: 24vh;
    padding: 20px;
  }

  .login-hero h1 {
    font-size: 34px;
  }

  .login-hero p {
    font-size: 14px;
  }

  .login-panel {
    padding: 18px;
  }

  .main {
    padding: 10px 10px 82px;
  }

  .topbar {
    margin: -10px -10px 10px;
    padding: 8px 10px;
    gap: 8px;
  }

  .tools {
    flex-wrap: nowrap;
    gap: 6px;
  }

  .notification-button {
    width: 34px;
    min-height: 34px;
  }

  .notification-panel {
    position: fixed;
    top: 58px;
    right: 8px;
    left: 8px;
    width: auto;
    max-height: calc(100vh - 136px);
  }

  .notification-list {
    max-height: calc(100vh - 245px);
  }

  .page-title {
    gap: 7px;
    min-width: 0;
  }

  .topbar h2 {
    font-size: 18px;
    white-space: nowrap;
  }

  .topbar-logo {
    width: 30px;
    height: 30px;
  }

  .icon-btn {
    width: 34px;
    min-height: 34px;
    font-size: 18px;
  }

  .lang-switch button {
    min-width: 34px;
    padding: 7px 6px;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 20;
    width: min(82vw, 300px);
    height: 100vh;
    overflow-y: auto;
    padding: 14px;
    box-shadow: 18px 0 40px rgba(16, 43, 44, 0.22);
  }

  .sidebar-close {
    position: absolute;
    top: 10px;
    right: 10px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.14);
    color: white;
    font-size: 25px;
    line-height: 1;
  }

  .mobile-logout {
    display: flex;
    width: 100%;
    margin: 44px 0 10px;
  }

  .sidebar .user-box {
    display: none;
  }

  .sidebar-collapsed .sidebar {
    display: none;
  }

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

  .nav button {
    padding: 9px 10px;
    font-size: 14px;
  }

  .brand {
    margin-bottom: 12px;
  }

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

  .brand-title {
    font-size: 15px;
  }

  .brand-subtitle,
  .hint {
    font-size: 12px;
  }

  .stats,
  .dashboard-metrics,
  .report-filters,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-warning {
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
    padding: 9px;
  }

  .dashboard-warning button {
    min-height: 38px;
    text-align: left;
  }

  .form-grid,
  .form-grid > *,
  .income-detail-field,
  .date-field,
  .split,
  .split > * {
    min-width: 0;
    max-width: 100%;
  }

  .loan-mobile-tabs {
    position: sticky;
    top: 58px;
    z-index: 8;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 8px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #eef3f1;
  }

  .loan-mobile-tabs .btn {
    min-width: 0;
    min-height: 44px;
    padding: 7px 8px;
    font-size: 12px;
    line-height: 1.2;
    white-space: normal;
  }

  .loan-form-panel {
    display: none;
  }

  .loan-form-panel.mobile-active {
    display: block;
  }

  .report-tabs {
    top: 58px;
    margin-bottom: 8px;
    padding: 6px;
  }

  .report-tabs .btn {
    min-height: 42px;
    padding: 7px 10px;
    white-space: nowrap;
  }

  .sheet-header-card .section-title {
    display: grid;
    gap: 9px;
  }

  .sheet-header-card .btn {
    width: 100%;
  }

  .sheet-frame-wrap {
    height: calc(100vh - 260px);
    min-height: 500px;
  }

  .sheet-frame {
    width: 100%;
    height: 100%;
    min-height: 500px;
  }

  .chat-shell {
    height: calc(100vh - 155px);
    min-height: 560px;
    grid-template-rows: auto minmax(220px, 1fr) auto;
  }

  .chat-toolbar {
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 9px;
  }

  .chat-toolbar-note {
    padding-bottom: 0;
  }

  .chat-toolbar-note span {
    display: none;
  }

  .chat-stream {
    padding: 10px;
  }

  .chat-message {
    width: 88%;
  }

  .chat-compose {
    position: sticky;
    bottom: 0;
    z-index: 4;
    padding: 9px;
  }

  .chat-compose-main {
    grid-template-columns: 1fr 42px;
  }

  .chat-compose-main textarea {
    min-height: 44px;
    max-height: 78px;
  }

  .chat-send {
    width: 42px;
    min-height: 42px;
  }

  .chat-attach-row .hint {
    display: none;
  }

  .grid {
    gap: 8px;
  }

  .card,
  .metric-card,
  .dashboard-hero {
    padding: 10px;
    margin-bottom: 8px;
  }

  .closing-row {
    display: grid;
  }

  .dashboard-hero h3 {
    font-size: 20px;
  }

  .dashboard-hero p,
  .metric-card p {
    font-size: 12px;
  }

  .dashboard-metrics,
  .dashboard-main,
  .dashboard-side,
  .dashboard-layout {
    gap: 8px;
  }

  .metric-card {
    min-height: 96px;
  }

  .metric-card strong {
    margin-top: 8px;
    font-size: 19px;
  }

  .section-title {
    margin-bottom: 8px;
  }

  .section-title h3 {
    font-size: 15px;
  }

  .field {
    gap: 5px;
    margin-bottom: 9px;
  }

  .field input,
  .field select,
  .field textarea {
    min-width: 0;
    max-width: 100%;
    padding: 9px 10px;
    border-radius: 7px;
  }

  .date-field input[type="date"] {
    display: block;
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    inline-size: 100% !important;
    min-inline-size: 0 !important;
    height: 42px;
    min-height: 42px;
    max-height: 42px;
    padding: 8px 10px;
    overflow: hidden;
    -webkit-appearance: none;
    appearance: none;
    font-size: 16px;
    line-height: 1.2;
    text-align: left;
  }

  .date-field,
  .income-detail-field {
    width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .date-field input[type="date"]::-webkit-date-and-time-value {
    min-height: 20px;
    margin: 0;
    text-align: left;
  }

  .date-field input[type="date"]::-webkit-calendar-picker-indicator {
    margin: 0;
    padding: 0;
  }

  .field textarea {
    min-height: 70px;
  }

  .btn {
    min-height: 36px;
    padding: 8px 10px;
  }

  .table-wrap {
    margin: 0 -4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-team-nav {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 15;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 5px max(5px, env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) max(5px, env(safe-area-inset-left));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -8px 24px rgba(23, 35, 38, 0.08);
  }

  .mobile-team-nav.compact-team-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .floating-chat {
    right: 12px;
    bottom: 76px;
    width: 42px;
    min-height: 42px;
    padding: 0;
    justify-content: center;
  }

  .floating-chat b {
    position: absolute;
    top: -6px;
    right: -5px;
  }

  .toast {
    right: 10px;
    bottom: calc(72px + env(safe-area-inset-bottom));
    left: 10px;
    max-height: 35vh;
    overflow-y: auto;
    padding: 11px 12px;
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
  }

  .mobile-team-nav button {
    display: grid;
    place-items: center;
    gap: 1px;
    min-width: 0;
    padding: 5px 2px;
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
  }

  .mobile-team-nav button.active {
    background: #e7efed;
    color: var(--teal-dark);
  }

  .mobile-team-nav b {
    font-size: 18px;
    line-height: 1;
  }

  .mobile-team-nav span {
    max-width: 100%;
    overflow: hidden;
    font-size: 9px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .team-quick-actions {
    margin-bottom: 8px;
  }

  .quick-action {
    min-height: 52px;
    font-size: 14px;
  }

  .team-entry-item {
    padding: 10px 0;
  }

  .team-entry-status b {
    font-size: 13px;
  }

  table {
    min-width: 720px;
  }

  th,
  td {
    padding: 8px 7px;
    font-size: 12px;
  }

  .calendar-grid {
    gap: 4px;
  }

  .calendar-cell {
    min-height: 64px;
    padding: 6px;
  }

  .calendar-cell strong {
    font-size: 14px;
  }

  .calendar-cell span,
  .calendar-cell small {
    font-size: 10px;
  }
}

@media print {
  @page {
    size: A4 landscape;
    margin: 8mm;
  }

  body.print-receipt-only {
    background: white;
  }

  .sidebar,
  .topbar .tools,
  .no-print,
  .tabs,
  .actions,
  .btn {
    display: none !important;
  }

  body.print-receipt-only .topbar,
  body.print-receipt-only .card,
  body.print-receipt-only .floating-chat,
  body.print-receipt-only .mobile-team-nav {
    display: none !important;
  }

  body.print-receipt-only .receipt-preview-card,
  body.print-receipt-only .receipt-print-area {
    display: block !important;
  }

  body.print-receipt-only .receipt-preview-card {
    border: 0;
    padding: 0;
    margin: 0 !important;
    box-shadow: none;
  }

  body.print-receipt-only .receipt-print-area {
    border: 0;
    padding: 0;
  }

  body.print-receipt-only .main {
    padding: 0;
  }

  body.print-receipt-only .booking-receipt {
    max-width: none;
  }

  body.print-receipt-only .receipt-header {
    grid-template-columns: 62px 1fr 145px;
    gap: 12px;
  }

  body.print-receipt-only .receipt-logo {
    width: 58px;
    height: 58px;
  }

  body.print-receipt-only .receipt-brand h1 {
    font-size: 24px;
  }

  body.print-receipt-only .receipt-brand p,
  body.print-receipt-only .receipt-meta {
    font-size: 10px;
  }

  body.print-receipt-only .booking-receipt h2 {
    margin: 28px 0 20px;
    padding: 8px;
    font-size: 19px;
  }

  body.print-receipt-only .receipt-intro {
    margin-bottom: 20px;
    font-size: 12px;
  }

  body.print-receipt-only .receipt-details th,
  body.print-receipt-only .receipt-details td {
    padding: 8px 10px;
    font-size: 11px;
  }

  body.print-receipt-only .receipt-details th {
    width: 185px;
  }

  body.print-receipt-only .receipt-notes {
    margin-top: 24px;
    padding: 9px 11px;
    font-size: 9px;
  }

  body.print-receipt-only .generated-receipt-note {
    margin-top: 55px;
    padding: 12px;
    font-size: 12px;
  }

  .report-panel.active {
    display: block;
  }

  body.print-income-only .income-report-section,
  body.print-expense-only .expense-report-section,
  body.print-activity-only .activity-log-section {
    display: block !important;
  }

  .shell {
    display: block;
  }

  body {
    background: white;
    color: #111;
    font-size: 10px;
  }

  .main {
    padding: 0;
  }

  .topbar {
    position: static;
    margin-bottom: 6px;
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
    padding: 0 0 5px;
    background: white;
    backdrop-filter: none;
    padding-bottom: 5px;
    border-bottom: 1px solid #cfd8d6;
  }

  .topbar h2 {
    font-size: 13px;
  }

  .topbar-logo {
    width: 30px;
    height: 30px;
    padding: 1px;
  }

  .print-company {
    display: block;
    font-size: 10px;
  }

  .card {
    padding: 7px;
    margin-top: 6px !important;
    border-color: #cfd8d6;
    border-radius: 0;
    box-shadow: none;
    break-inside: avoid;
  }

  .section-title {
    margin-bottom: 5px;
  }

  .section-title h3 {
    font-size: 11px;
  }

  .grid,
  .split,
  .report-filters {
    gap: 5px;
  }

  .report-chart-block {
    margin-top: 5px;
    padding: 6px;
    border-radius: 0;
  }

  .report-pie-layout {
    grid-template-columns: 110px 1fr;
    gap: 8px;
  }

  .report-pie {
    width: 100px;
  }

  .report-pie-center strong {
    font-size: 11px;
  }

  .report-pie-center span {
    max-width: 48px;
    font-size: 6px;
  }

  .report-pie-legend {
    grid-template-columns: repeat(2, 1fr);
    gap: 1px 8px;
  }

  .pie-legend-row {
    grid-template-columns: 7px minmax(0, 1fr) auto;
    gap: 3px;
    padding: 2px 0;
  }

  .pie-legend-row i {
    width: 6px;
    height: 6px;
  }

  .pie-legend-row span,
  .pie-legend-row b {
    font-size: 7px;
  }

  .pie-legend-row small {
    font-size: 6px;
  }

  .stats {
    grid-template-columns: repeat(4, 1fr);
  }

  .report-filters {
    grid-template-columns: repeat(5, 1fr);
    padding-bottom: 4px;
  }

  .field {
    gap: 2px;
    margin-bottom: 3px;
  }

  .field label,
  .hint,
  .stat-label {
    font-size: 8px;
  }

  .field input,
  .field select,
  .field textarea {
    padding: 3px 4px;
    border-radius: 0;
    font-size: 9px;
  }

  .stat-value {
    margin-top: 2px;
    font-size: 12px;
  }

  .table-wrap {
    overflow: visible;
  }

  table {
    min-width: 0;
    table-layout: fixed;
    page-break-inside: auto;
  }

  tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  th,
  td {
    padding: 3px 4px;
    font-size: 8px;
    line-height: 1.2;
    word-break: break-word;
  }

  th {
    font-size: 7px;
  }

  .pill {
    min-height: 0;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 7px;
  }

  .empty {
    padding: 6px;
    border-radius: 0;
    font-size: 9px;
  }

  body.print-income-only .report-summary,
  body.print-income-only .expense-report-section,
  body.print-income-only .report-extra-section {
    display: none !important;
  }

  body.print-expense-only .report-summary,
  body.print-expense-only .income-report-section,
  body.print-expense-only .report-extra-section {
    display: none !important;
  }

  body.print-activity-only .report-summary,
  body.print-activity-only .report-section,
  body.print-activity-only .report-extra-section:not(.activity-log-section) {
    display: none !important;
  }
}
