:root {
  --ink: #15202b;
  --muted: #5a6b78;
  --line: #d5dde3;
  --paper: #eef2f4;
  --card: #ffffff;
  --accent: #0d5c63;
  --accent-dark: #09454a;
  --accent-soft: #e6f3f4;
  --warn: #9a3412;
  --ok: #166534;
  --danger: #b91c1c;
  --paid: #166534;
  --unpaid: #9a3412;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font: "DM Sans", "Segoe UI", sans-serif;
  --shadow: 0 8px 24px rgba(21, 32, 43, 0.06);
  --radius: 2px;
}

* { box-sizing: border-box; }
html { font-size: 18px; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--ink);
  background:
    radial-gradient(ellipse 90% 50% at 50% -10%, rgba(13, 92, 99, 0.1), transparent 55%),
    linear-gradient(180deg, #e4ecee 0%, var(--paper) 220px);
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; padding: 1.1rem 0 2.75rem; }

.topbar {
  background: linear-gradient(180deg, #1a2834 0%, #15202b 100%);
  color: #fff;
  border-bottom: 3px solid var(--accent);
  box-shadow: 0 4px 18px rgba(0,0,0,0.18);
}
.topbar-inner {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0.7rem 0;
}
.topbar-brandrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: nowrap;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 0.6rem;
}
.brand {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
  text-decoration: none;
  font-size: 1.28rem;
  line-height: 1;
  display: flex;
  align-items: center;
  min-height: 2.35rem;
}
.brand:hover { text-decoration: none; color: #fff; }
.userbox {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  font-size: 1rem;
  color: #aeb8c4;
}
.userbox a,
.userbox .logout-trigger,
.userbox .user-menu-trigger {
  color: #fff;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border: 1px solid rgba(255,255,255,0.28);
  text-decoration: none;
  background: rgba(255,255,255,0.04);
  font: inherit;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.userbox a:hover,
.userbox .logout-trigger:hover,
.userbox .user-menu-trigger:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.45);
  text-decoration: none;
}

.user-menu {
  position: relative;
}
.user-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 18rem;
  border-radius: 999px;
  padding: 0.28rem 0.7rem 0.28rem 0.32rem;
}
.userbox-name-full {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.userbox-icon {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  flex-shrink: 0;
}
.userbox-icon svg {
  display: block;
  width: 1.05rem;
  height: 1.05rem;
}
.user-menu-caret {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid rgba(255,255,255,0.85);
  flex-shrink: 0;
}
.user-menu.is-open .user-menu-caret {
  transform: rotate(180deg);
}
.user-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.45rem);
  width: 280px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(21, 32, 43, 0.16);
  z-index: 40;
  padding: 0.7rem 0.7rem 0.75rem;
  border-radius: 12px;
}
.user-menu-panel[hidden] { display: none !important; }
.user-menu-hero {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.15rem 0.35rem 0.75rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.45rem;
}
.user-menu-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.user-menu-name {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  word-break: break-word;
}
.user-menu-role {
  margin-top: 0.12rem;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}
.user-menu-list {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.user-menu-panel a,
.user-menu-panel .user-menu-logout {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  color: var(--ink);
  border: none;
  background: transparent;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.62rem 0.65rem;
  text-align: left;
  cursor: pointer;
  border-radius: 8px;
  text-decoration: none;
}
.user-menu-panel a svg {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.75;
}
.user-menu-panel a:hover,
.user-menu-panel .user-menu-logout:hover {
  background: var(--accent-soft);
  color: var(--accent-dark);
  border: none;
  text-decoration: none;
}
.user-menu-panel .user-menu-logout {
  justify-content: center;
  margin-top: 0.45rem;
  color: var(--danger);
  background: #fef2f2;
  font-weight: 700;
}
.user-menu-panel .user-menu-logout:hover {
  background: #fee2e2;
  color: #991b1b;
}
.user-menu-mode {
  padding: 0.65rem 0.35rem 0.15rem;
  border-top: 1px solid var(--line);
  margin-top: 0.45rem;
}
.user-menu-mode-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.user-menu-mode .mode-switch {
  display: flex;
  width: 100%;
  border: 1px solid var(--line);
  background: #f4f8f9;
  padding: 3px;
  gap: 3px;
  border-radius: 999px;
}
.user-menu-mode .mode-switch-btn {
  flex: 1;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 0.42rem 0.5rem;
  border-radius: 999px;
}
.user-menu-mode .mode-switch-btn:hover { color: var(--ink); }
.user-menu-mode .mode-switch-btn.is-active {
  background: var(--accent);
  color: #fff;
}

/* Logout modal + loading spinner */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(26, 35, 50, 0.55);
  display: grid;
  place-items: center;
  padding: 1rem;
}
.modal-overlay[hidden] { display: none !important; }
.modal-card {
  width: min(420px, 100%);
  background: #fff;
  border-top: 4px solid var(--accent);
  padding: 1.5rem 1.35rem;
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}
.modal-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.4rem;
}
.modal-card p {
  margin: 0 0 1.25rem;
  font-size: 1.1rem;
  color: var(--muted);
}
.modal-actions {
  display: flex;
  gap: 0.65rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(26, 35, 50, 0.45);
  display: grid;
  place-items: center;
}
.loading-overlay[hidden] { display: none !important; }
.loading-box {
  background: #fff;
  padding: 1.5rem 2rem;
  text-align: center;
  border-top: 4px solid var(--accent);
  min-width: 200px;
}
.loading-box p {
  margin: 0.85rem 0 0;
  font-size: 1.1rem;
  font-weight: 600;
}
.spinner {
  width: 42px;
  height: 42px;
  margin: 0 auto;
  border: 4px solid #d8dde3;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.topbar-nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.28rem;
}
.topbar-nav a {
  color: #d5dee6;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.42rem 0.62rem;
  border: 1px solid transparent;
  background: rgba(255,255,255,0.03);
  white-space: nowrap;
  flex: 0 0 auto;
  transition: background 0.15s ease, color 0.15s ease;
}
.topbar-nav a:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
  text-decoration: none;
}
.topbar-nav a.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.15rem;
  flex-wrap: wrap;
}
.page-head h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.page-head p { margin: 0.3rem 0 0; color: var(--muted); font-size: 1.1rem; }
.page-head .actions {
  padding-top: 0.2rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.5rem;
}
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 1.1rem 1.15rem;
  border-left: 5px solid var(--accent);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease;
}
.stat:hover { transform: translateY(-2px); }
.stat .label {
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 600;
}
.stat .value { font-size: 1.55rem; font-weight: 700; margin-top: 0.3rem; font-variant-numeric: tabular-nums; }
.stat.unpaid { border-left-color: var(--unpaid); background: linear-gradient(180deg, #fff 60%, #fff7ed 100%); }
.stat.paid { border-left-color: var(--paid); background: linear-gradient(180deg, #fff 60%, #f0fdf4 100%); }

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 1.25rem 1.35rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
}
.panel h2 {
  margin: 0 0 0.9rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--line);
}

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  align-items: end;
}
.filters .js-range-error,
.filters .alert {
  grid-column: 1 / -1;
}
.filters .filter-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.5rem;
  align-items: center;
  min-width: max-content;
}
.filters .filter-actions .btn {
  width: auto;
  white-space: nowrap;
  flex: 0 0 auto;
}
label { display: block; font-size: 1rem; color: var(--muted); margin-bottom: 0.35rem; font-weight: 600; }
input[type="text"],
input[type="password"],
input[type="date"],
input[type="number"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: 0.75rem 0.8rem;
  border: 1.5px solid var(--line);
  background: #fff;
  font: inherit;
  font-size: 1.05rem;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 92, 99, 0.18);
}

.btn {
  display: inline-block;
  border: none;
  background: var(--accent);
  color: #fff;
  padding: 0.72rem 1.2rem;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.1s ease;
}
.btn:hover { background: var(--accent-dark); text-decoration: none; color: #fff; }
.btn:active { transform: translateY(1px); }
.btn-secondary { background: #4b5563; }
.btn-secondary:hover { background: #374151; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #991b1b; }
.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn-outline:hover { background: var(--accent); color: #fff; }
.btn-sm { padding: 0.48rem 0.8rem; font-size: 1rem; }
.actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }

.row-actions {
  width: 1%;
  white-space: nowrap;
  vertical-align: middle !important;
}
.row-actions-group,
.row-actions-group.is-inline {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.4rem;
}
.row-actions-group .btn,
.row-actions-group.is-inline .btn {
  width: auto;
  flex: 0 0 auto;
  white-space: nowrap;
  text-align: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0.4rem 0.65rem;
}
.row-actions-group form {
  margin: 0;
  display: inline-flex;
}
.row-actions-group form .btn {
  width: auto;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.05rem;
}
table.data th,
table.data td {
  padding: 0.8rem 0.65rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.page-status table.data th,
.page-status table.data td,
.page-statements table.data th,
.page-statements table.data td {
  padding: 0.55rem 0.7rem;
  vertical-align: middle;
}
table.data th {
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: #f4f8f9;
  font-weight: 700;
}
table.data tr:hover td { background: #f7fbfb; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data th.num,
table.data td.num {
  text-align: right;
}
.muted { color: var(--muted); }
.empty {
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 1.1rem;
  background: var(--accent-soft);
  border: 1px dashed rgba(13, 92, 99, 0.35);
  line-height: 1.55;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.85rem;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1;
  vertical-align: middle;
  align-self: center;
  min-height: 2.55rem;
  box-sizing: border-box;
}
table.data .badge {
  min-height: 1.7rem;
  padding: 0.22rem 0.55rem;
  font-size: 0.75rem;
}
.badge-paid { background: #dcfce7; color: var(--paid); }
.badge-unpaid { background: #ffedd5; color: var(--unpaid); }
.badge-followup { background: #fee2e2; color: var(--danger); font-size: 0.78rem; min-height: 1.8rem; padding: 0.3rem 0.55rem; }

.toolbar-print .badge {
  font-size: 1.05rem;
  padding: 0.72rem 1.15rem;
  min-height: auto;
  border: 1.5px solid transparent;
}
body.theme-pro .toolbar-print .badge {
  border-radius: 8px;
}
.toolbar-print .badge-unpaid {
  border-color: #c2410c;
  background: #ffedd5;
  color: #9a3412;
}
.toolbar-print .badge-paid {
  border-color: #15803d;
  background: #dcfce7;
  color: #166534;
}

.alert {
  padding: 0.95rem 1.15rem;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  font-size: 1.05rem;
  box-shadow: var(--shadow);
}
.alert-success { background: #ecfdf5; border-color: #a7f3d0; color: var(--ok); }
.followup-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.85rem 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
}
.followup-card-head h2 {
  margin: 0;
  padding: 0;
  border: none;
  font-size: 1.2rem;
}
.followup-card-head p {
  margin: 0.28rem 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}
.followup-card-head .actions {
  flex: 0 0 auto;
}
.followup-days {
  font-weight: 700;
  color: var(--danger);
  white-space: nowrap;
}
.row-actions-group.is-inline {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.4rem;
}
.followup-preview {
  margin-top: 0.85rem;
}
.followup-preview summary {
  cursor: pointer;
  font-weight: 600;
}
.followup-preview textarea {
  width: 100%;
  margin-top: 0.6rem;
  font-family: inherit;
  font-size: 0.92rem;
  line-height: 1.45;
}
.followup-copy-sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(10, 14, 18, 0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
}
.followup-copy-sheet-card {
  width: min(520px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 1rem;
}
.followup-copy-sheet-card p {
  margin: 0 0 0.65rem;
  font-weight: 600;
}
.followup-copy-sheet-card textarea {
  width: 100%;
  min-height: 10rem;
  margin-bottom: 0.75rem;
  font-size: 16px;
}
.followup-copy-sheet-card .btn { width: 100%; }
body.theme-pro .followup-copy-sheet-card {
  background: #1a2733;
  border-color: #2a3a48;
}

.status-search {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.55rem 0.65rem;
  margin-bottom: 1.1rem;
}
.status-search > div:first-child {
  flex: 1 1 16rem;
  min-width: 0;
  max-width: 28rem;
}
.status-search .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}
.status-list-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--line);
}
.status-list-head h2 {
  margin: 0;
  padding: 0;
  border: none;
}
.status-list-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.status-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.status-stmt-no {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.status-due {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.status-due.is-overdue {
  font-weight: 700;
  color: var(--danger);
}
.status-due.is-missing {
  color: var(--muted);
}
.status-form .stmt-track {
  margin: 0.15rem 0 0;
}
.stmt-list .filters {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
tr.is-focus-row td {
  background: #fff7ed;
}
a.stat {
  display: block;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1rem;
}
.form-grid .full { grid-column: 1 / -1; }
.form-actions { margin-top: 1.25rem; display: flex; gap: 0.6rem; flex-wrap: wrap; }

.items-table input { font-size: 1.05rem; }
.items-table th { white-space: nowrap; }
.login-page {
  --login-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --login-sans: "DM Sans", "Segoe UI", sans-serif;
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  font-family: var(--login-sans);
  background:
    radial-gradient(ellipse 80% 60% at 15% 20%, rgba(13, 92, 99, 0.35), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 80%, rgba(180, 140, 70, 0.18), transparent 50%),
    linear-gradient(145deg, #12202b 0%, #0d5c63 48%, #1a3340 100%);
  position: relative;
  overflow-x: hidden;
}
.login-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  opacity: 0.5;
}
.login-shell {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.login-brand {
  padding: 2.5rem 2.25rem;
  color: #f3f7f8;
  background:
    linear-gradient(165deg, rgba(13, 92, 99, 0.55) 0%, rgba(18, 32, 43, 0.4) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
}
.login-eyebrow {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b7d4d7;
  font-weight: 600;
}
.login-brand-name {
  margin: 0;
  font-family: var(--login-serif);
  font-size: clamp(2rem, 4vw, 2.55rem);
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  letter-spacing: -0.01em;
}
.login-tagline {
  margin: 0.35rem 0 0;
  font-size: 1.15rem;
  line-height: 1.45;
  color: #d5e4e6;
  max-width: 28ch;
}
.login-meta {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 1rem;
  color: #c5d5d8;
  line-height: 1.5;
}
.login-meta p { margin: 0 0 0.45rem; }
.login-meta strong { color: #fff; font-weight: 600; }

.login-card {
  width: auto;
  max-width: none;
  background: #f7fafb;
  padding: 2.5rem 2.25rem;
  border-top: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-card h2 {
  margin: 0 0 0.35rem;
  font-family: var(--login-serif);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--ink);
}
.login-card .sub {
  color: var(--muted);
  margin: 0 0 1.5rem;
  font-size: 1.1rem;
  line-height: 1.4;
}
.login-card .field { margin-bottom: 1.1rem; }
.login-card label {
  font-size: 1.05rem;
  font-weight: 600;
  color: #3d4f5c;
  margin-bottom: 0.4rem;
}
.login-card input[type="text"],
.login-card input[type="password"] {
  font-size: 1.15rem;
  padding: 0.85rem 0.9rem;
  border: 1.5px solid #c5d0d6;
  background: #fff;
}
.login-card input:focus {
  outline: 2px solid rgba(13, 92, 99, 0.35);
  border-color: var(--accent);
}
.password-wrap {
  display: flex;
  gap: 0;
  align-items: stretch;
}
.password-wrap input {
  flex: 1;
  border-right: none;
  min-width: 0;
}
.password-toggle {
  border: 1.5px solid #c5d0d6;
  border-left: 1px solid #c5d0d6;
  background: #eef3f5;
  color: var(--accent-dark);
  width: 3rem;
  min-width: 3rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.password-toggle:hover { background: #e2ecee; }
.password-toggle svg {
  width: 1.35rem;
  height: 1.35rem;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.password-toggle .eye-off { display: none; }
.password-toggle.is-visible .eye-on { display: none; }
.password-toggle.is-visible .eye-off { display: block; }
.login-submit {
  width: 100%;
  margin-top: 0.75rem;
  font-size: 1.2rem;
  padding: 0.95rem 1rem;
  letter-spacing: 0.02em;
}
.login-card .alert {
  font-size: 1.05rem;
  margin-bottom: 1.1rem;
}

.panel-animate {
  animation: loginRise 0.65s ease-out both;
}
.panel-animate.delay {
  animation-delay: 0.12s;
}
@keyframes loginRise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 780px) {
  .login-shell {
    grid-template-columns: 1fr;
  }
  .login-brand {
    padding: 1.75rem 1.5rem 1.5rem;
  }
  .login-brand-name {
    font-size: 1.85rem;
  }
  .login-card {
    padding: 1.75rem 1.5rem 2rem;
  }
  .login-meta { margin-top: 1rem; }
}

.site-footer {
  color: var(--muted);
  font-size: 0.95rem;
  padding-bottom: 1.5rem;
}

/* Printable billing statement */
.statement-sheet {
  background: #fff;
  border: 2px solid #222;
  padding: 1.5rem 1.75rem 2rem;
  max-width: 900px;
  margin: 0 auto;
}
.statement-sheet .title {
  text-align: center;
  font-size: 1.85rem;
  font-weight: 700;
  margin: 0 0 1.25rem;
  letter-spacing: 0.02em;
}
.stmt-meta {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
  font-size: 1.1rem;
}
.stmt-meta .billto strong { display: block; margin-bottom: 0.35rem; }
.stmt-meta .right { text-align: right; }
.stmt-meta .right div { margin-bottom: 0.25rem; }

.stmt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}
.stmt-table th,
.stmt-table td {
  border: 1px solid #333;
  padding: 0.5rem 0.5rem;
}
.stmt-table th {
  background: #f0f0f0;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.stmt-totals {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.75rem;
}
.stmt-totals table { border-collapse: collapse; min-width: 280px; }
.stmt-totals td {
  padding: 0.4rem 0.55rem;
  border: 1px solid #333;
  font-size: 1.05rem;
  color: #15202b;
  background: #fff;
}
.stmt-totals td:first-child { font-weight: 600; background: #f7f7f7; color: #15202b; }
.stmt-totals .due td { font-weight: 700; background: #eee; color: #111; }
.stmt-sign {
  margin-top: 2.5rem;
  max-width: 240px;
  text-align: center;
  font-size: 1.05rem;
}
.stmt-sign .label { font-size: 0.95rem; color: #555; margin-bottom: 2rem; }
.stmt-sign .name { font-weight: 700; border-top: 1px solid #222; padding-top: 0.35rem; }
.stmt-sign .role { font-size: 0.95rem; }

.toolbar-print {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.stmt-tools {
  margin-bottom: 1rem;
}
.stmt-tools-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}
.stmt-back {
  font-weight: 700;
  font-size: 0.95rem;
}
.stmt-tools-head .badge {
  font-size: 0.78rem;
  padding: 0.35rem 0.7rem;
  min-height: 0;
  text-transform: uppercase;
}
.stmt-tools-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  margin-bottom: 0.65rem;
}
.stmt-tools-actions .btn {
  width: 100%;
  text-align: center;
  justify-content: center;
}
.stmt-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  padding: 0.7rem 0.75rem;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.stmt-track span {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.15rem;
}
.stmt-track strong {
  font-size: 0.92rem;
  font-weight: 700;
  word-break: break-word;
}

.page-banner,
.company-banner {
  text-align: center;
  margin-bottom: 1.35rem;
  padding: 1.5rem 1.25rem;
  background:
    linear-gradient(135deg, rgba(13, 92, 99, 0.08), transparent 55%),
    linear-gradient(180deg, #fff 0%, #f3f8f9 100%);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  box-shadow: var(--shadow);
}
.banner-short { display: none; }
.dash-today {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}
.period-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
}
.period-tab {
  flex: 1;
  text-align: center;
  padding: 0.5rem 0.45rem;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--accent);
  background: transparent;
  border: 1.5px solid var(--accent);
  line-height: 1.2;
}
.period-tab:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}
.period-tab.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.dash-stats {
  margin-bottom: 0;
}
.dash-stats .value {
  font-size: 1.25rem;
}
.dash-stats .muted {
  font-size: 0.82rem;
  margin-top: 0.2rem;
}
.page-dashboard .dash-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.page-dashboard .dash-stats:has(.stat:nth-child(7)) {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.dash-followup {
  border-left: 5px solid var(--danger);
}
.dash-followup-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}
.dash-followup-head h2 {
  margin: 0;
  padding: 0;
  border: none;
  color: var(--danger);
}
.dash-followup-head p {
  margin: 0.28rem 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}
.dash-followup-head .actions {
  flex: 0 0 auto;
}
.dash-alert {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 0.85rem;
}
.dash-alert .btn {
  flex: 0 0 auto;
  white-space: nowrap;
  margin: 0;
}
.dash-backup h2 {
  margin: 0 0 0.25rem;
  padding-bottom: 0;
  border-bottom: none;
}
.dash-backup-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.dash-backup-row p {
  margin: 0;
}
.dash-expenses-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}
.dash-expenses-head h2 {
  margin: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.dash-expenses-empty { margin: 0; }
.dash-exp-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.dash-exp-list li + li {
  border-top: 1px solid var(--line);
}
.dash-exp-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0;
  color: inherit;
  text-decoration: none;
  font-size: 0.95rem;
}
.dash-exp-list a:hover { text-decoration: none; color: var(--accent-dark); }
.dash-exp-list strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.dash-expenses-total {
  margin: 0.55rem 0 0;
  padding-top: 0.55rem;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
  font-weight: 700;
}
.field-hint {
  margin: 0.3rem 0 0;
  font-size: 0.85rem;
}

.pay-section-title {
  margin: 1.5rem 0 0.85rem;
  padding-bottom: 0.5rem;
  font-size: 1.05rem;
  border-bottom: 1px solid var(--line);
}
#slip-list {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.pay-slip-editor {
  padding: 1rem 1.1rem 1.1rem;
  margin: 0;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: none;
}
.panel .pay-slip-editor {
  background: #f7fbfb;
}
.pay-slip-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 0.9rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--line);
}
.pay-slip-top .js-slip-label {
  font-size: 1.05rem;
  line-height: 1.3;
}
.pay-slip-top .remove-slip {
  flex: 0 0 auto;
}
.pay-slip-net {
  margin: 1rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.payslip-pack { margin-bottom: 1.5rem; }
.payslip-pack-title {
  text-align: center;
  margin-bottom: 1rem;
}
.payslip-pack-title h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.45rem;
}
.payslip-pack-title p { margin: 0.25rem 0 0; color: var(--muted); }
.payslip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.payslip-card {
  background: #fff;
  border: 1.5px solid #1e3a5f;
  color: #15202b;
  break-inside: avoid;
  page-break-inside: avoid;
  font-size: 0.88rem;
}
.payslip-head {
  background: #1e4d7b;
  color: #fff;
  padding: 0.4rem 0.55rem;
  text-align: center;
}
.payslip-co {
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
}
.payslip-period { font-size: 0.72rem; opacity: 0.92; }
.payslip-name-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.55rem 0.15rem;
  font-size: 0.92rem;
}
.payslip-hub {
  padding: 0 0.55rem 0.35rem;
  font-size: 0.75rem;
  color: #5a6b78;
}
.payslip-lines {
  width: 100%;
  border-collapse: collapse;
}
.payslip-lines td {
  padding: 0.18rem 0.55rem;
  border-top: 1px solid #d8dee6;
}
.payslip-lines .less td {
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  background: #f3f6f8;
}
.payslip-lines .sub td { font-weight: 700; }
.payslip-lines .net td {
  font-weight: 800;
  border-top: 2px solid #1e3a5f;
  text-decoration: underline;
}
.payslip-loan {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  padding: 0.4rem 0.55rem 0.5rem;
  border-top: 1px solid #d8dee6;
  color: #9a3412;
}
.payslip-loan span {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.payslip-summary {
  background: #fff;
  border: 1.5px solid #1e3a5f;
  color: #15202b;
  padding: 0.85rem 1rem;
  max-width: 420px;
  margin-left: auto;
}
.payslip-summary h2 {
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
  border: none;
  padding: 0;
}
.payslip-summary table { width: 100%; border-collapse: collapse; }
.payslip-summary td {
  padding: 0.3rem 0;
  border-bottom: 1px solid #e5eaee;
}
.payslip-summary .net td { font-weight: 800; }
.payslip-note { margin: 0.75rem 0 0; font-size: 0.9rem; }
.page-banner h1,
.company-banner h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.55rem, 3vw, 1.95rem);
  letter-spacing: -0.01em;
  color: var(--ink);
}

.dash-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.dash-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.dash-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(21, 32, 43, 0.09);
}
.dash-card h2 {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-dark);
  font-weight: 700;
  border-bottom: none;
  padding-bottom: 0;
}
.dash-card.full { grid-column: 1 / -1; }
.dash-links {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.dash-links a {
  display: block;
  padding: 0.6rem 0.75rem;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
  text-decoration: none;
  font-size: 1.05rem;
  transition: background 0.15s ease, padding-left 0.15s ease;
}
.dash-links a:hover {
  background: #d5ebee;
  padding-left: 0.95rem;
  text-decoration: none;
}

.modal-card {
  border-radius: var(--radius);
  animation: loginRise 0.25s ease-out;
}
.site-footer {
  color: var(--muted);
  font-size: 0.95rem;
  padding-bottom: 1.75rem;
  text-align: center;
}

.addr-search-wrap { position: relative; }
.addr-results {
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0;
  border: 1px solid var(--line);
  background: #fff;
  max-height: 240px;
  overflow-y: auto;
  position: absolute;
  left: 0;
  right: 0;
  z-index: 20;
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}
.addr-results li {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  font-size: 1.05rem;
  color: #15202b;
  background: #fff;
}
.addr-results li.muted { color: #5a6b78; }
.addr-results li:hover,
.addr-results li:focus {
  background: #eef6f7;
  color: #15202b;
  outline: none;
}
.addr-map {
  height: 220px;
  border: 1px solid var(--line);
  background: #e8eef0;
  z-index: 1;
}

.guide-sheet h2 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.2rem;
  color: var(--accent-dark);
}
.guide-sheet ol, .guide-sheet ul {
  font-size: 1.05rem;
  line-height: 1.55;
  padding-left: 1.35rem;
}
.guide-sheet li { margin-bottom: 0.35rem; }
.guide-sheet code {
  background: #eef3f5;
  padding: 0.1rem 0.35rem;
  font-size: 0.95em;
}

.topbar-tools {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.nav-toggle {
  display: none;
  width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  border: 1px solid rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.06);
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: #fff;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
body.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.date-mdy-display {
  width: 100%;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%235a6b78' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 1.1rem;
  padding-right: 2.4rem !important;
}
body.theme-pro .date-mdy-display {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%239aabba' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
}
.flatpickr-calendar {
  font-family: var(--font);
  box-shadow: 0 12px 28px rgba(21, 32, 43, 0.18);
}
body.theme-pro .flatpickr-calendar {
  background: #1a2733;
  border-color: #2a3a48;
  box-shadow: 0 16px 36px rgba(0,0,0,0.45);
}
body.theme-pro .flatpickr-months .flatpickr-month,
body.theme-pro .flatpickr-current-month .flatpickr-monthDropdown-months,
body.theme-pro .flatpickr-weekday,
body.theme-pro .flatpickr-day {
  color: #e8eef2;
  fill: #e8eef2;
}
body.theme-pro .flatpickr-day:hover,
body.theme-pro .flatpickr-day:focus {
  background: rgba(42, 154, 163, 0.25);
  border-color: transparent;
}
body.theme-pro .flatpickr-day.selected,
body.theme-pro .flatpickr-day.startRange,
body.theme-pro .flatpickr-day.endRange {
  background: #2a9aa3;
  border-color: #2a9aa3;
  color: #fff;
}
body.theme-pro .flatpickr-day.today {
  border-color: #2a9aa3;
}
body.theme-pro .flatpickr-months .flatpickr-prev-month,
body.theme-pro .flatpickr-months .flatpickr-next-month {
  fill: #9aabba;
}

.receipt-preview-box {
  margin-top: 0.85rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  background: #f7fbfb;
}
.receipt-preview-frame {
  background: #fff;
  border: 1px solid var(--line);
  padding: 0.5rem;
  text-align: center;
  margin-bottom: 0.75rem;
}
.receipt-preview-hit {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: zoom-in;
  font: inherit;
  color: inherit;
}
.receipt-preview-hit:hover .receipt-preview-img {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.receipt-preview-img {
  display: block;
  max-width: 100%;
  max-height: 320px;
  width: auto;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}
.receipt-preview-hint {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.9rem;
  color: var(--accent-dark);
  font-weight: 600;
}
.receipt-preview-pdf {
  margin: 0.75rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.receipt-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.receipt-remove {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.95rem;
  margin: 0;
  color: var(--muted);
  font-weight: 500;
}
.receipt-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(10, 18, 24, 0.88);
  display: grid;
  place-items: center;
  padding: 1.25rem;
}
.receipt-lightbox[hidden] { display: none !important; }
.receipt-lightbox img {
  max-width: min(960px, 100%);
  max-height: calc(100vh - 2.5rem);
  object-fit: contain;
  background: #fff;
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
}
.receipt-lightbox-close {
  position: absolute;
  top: 0.75rem;
  right: 0.85rem;
  width: 2.6rem;
  height: 2.6rem;
  border: none;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}
.receipt-lightbox-close:hover { background: rgba(255,255,255,0.28); }

.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 1100px) and (min-width: 721px) {
  .topbar-nav {
    gap: 0.2rem;
  }
  .topbar-nav a {
    font-size: 0.82rem;
    padding: 0.38rem 0.48rem;
  }
  .page-dashboard .dash-stats,
  .page-dashboard .dash-stats:has(.stat:nth-child(7)) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .wrap,
  .topbar-inner {
    width: min(1120px, calc(100% - 1.25rem));
  }
}

@media (max-width: 720px) {
  html { font-size: 16px; }
  .wrap {
    width: min(1120px, calc(100% - 1rem));
    padding: 0.85rem 0 2rem;
  }
  .topbar-inner {
    width: min(1120px, calc(100% - 1rem));
    padding: 0.7rem 0 0.75rem;
  }
  .page-head h1 { font-size: 1.25rem; }
  .page-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 0.85rem;
  }
  .page-head p { font-size: 0.95rem; }
  .page-head .actions {
    width: 100%;
  }
  .page-head > a.btn {
    width: auto;
    padding: 0.4rem 0.75rem;
    font-size: 0.92rem;
    min-height: 0;
    align-self: flex-start;
  }
  .page-head .actions .btn {
    flex: 1;
    text-align: center;
  }
  .panel { padding: 0.9rem; }
  .dash-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .stmt-meta { grid-template-columns: 1fr; }
  .stmt-meta .right { text-align: left; }
  .stats { grid-template-columns: 1fr; gap: 0.65rem; }
  .stat .value { font-size: 1.3rem; }

  .topbar-brandrow {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "menu brand account";
    align-items: center;
    gap: 0.45rem 0.55rem;
    flex-wrap: unset;
  }
  .nav-toggle {
    grid-area: menu;
    display: inline-flex;
  }
  .brand {
    grid-area: brand;
    font-size: 1.05rem;
    max-width: none;
    line-height: 1.25;
    min-width: 0;
  }
  .topbar-tools {
    display: contents;
  }
  .userbox {
    grid-area: account;
  }
  .userbox-name-full { display: none; }
  .user-menu-caret { display: none; }
  .userbox-icon {
    width: 1.55rem;
    height: 1.55rem;
    background: transparent;
  }
  .userbox-icon svg {
    width: 1.35rem;
    height: 1.35rem;
  }
  .user-menu-trigger {
    max-width: none;
    width: 2.6rem;
    height: 2.6rem;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }
  body.theme-pro .userbox .user-menu-trigger {
    border-radius: 50%;
  }
  .user-menu-panel {
    position: fixed;
    left: auto;
    right: 0.75rem;
    top: 3.7rem;
    width: min(300px, calc(100vw - 1.5rem));
    min-width: 0;
    max-height: calc(100vh - 5rem);
    overflow-y: auto;
  }

  .nav-toggle { display: inline-flex; }
  .topbar-nav {
    display: none;
    flex-direction: column;
    gap: 0.3rem;
    padding-top: 0.35rem;
  }
  body.nav-open .topbar-nav { display: flex; }
  .topbar-nav a {
    width: 100%;
    padding: 0.8rem 0.9rem;
    border-radius: 8px;
  }

  .page-banner,
  .company-banner {
    padding: 0.7rem 0.75rem;
    margin-bottom: 0.75rem;
  }
  .page-banner h1,
  .company-banner h1 {
    font-size: 1.2rem;
  }
  .banner-full { display: none; }
  .banner-short { display: inline; }
  .dash-today { margin-top: 0.25rem; font-size: 0.85rem; }

  .page-dashboard .wrap { padding-top: 0.65rem; }
  .page-dashboard .panel {
    padding: 0.75rem 0.8rem;
    margin-bottom: 0.75rem;
  }
  .page-dashboard .panel h2 {
    margin-bottom: 0.6rem;
    padding-bottom: 0.4rem;
    font-size: 1rem;
  }
  .page-dashboard .stats,
  .page-dashboard .dash-stats,
  .page-dashboard .dash-stats:has(.stat:nth-child(7)) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    margin-bottom: 0;
  }
  .page-dashboard .stat {
    padding: 0.65rem 0.7rem;
    min-width: 0;
  }
  .page-dashboard .stat:hover { transform: none; }
  .page-dashboard .stat .label {
    font-size: 0.7rem;
    letter-spacing: 0.03em;
  }
  .page-dashboard .stat .value,
  .page-dashboard .dash-stats .value {
    font-size: 1.02rem;
    margin-top: 0.15rem;
    overflow-wrap: anywhere;
  }
  .page-dashboard .dash-stats .muted {
    font-size: 0.75rem;
  }
  .page-dashboard .dash-followup-head {
    flex-direction: column;
    align-items: stretch;
  }
  .page-dashboard .dash-followup-head .actions,
  .page-dashboard .dash-followup-head .actions .btn {
    width: auto;
    align-self: flex-start;
  }
  .page-dashboard .dash-alert .btn,
  .page-dashboard .alert .btn {
    width: auto;
  }
  .page-dashboard .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }
  .page-dashboard .table-scroll table.data {
    display: table;
    width: max-content;
    min-width: 100%;
    max-width: none;
  }
  .page-dashboard table.data th,
  .page-dashboard table.data td {
    padding: 0.5rem 0.55rem;
    vertical-align: middle;
    white-space: nowrap;
  }
  .period-tabs {
    gap: 0.3rem;
    margin-bottom: 0.65rem;
  }
  .period-tab {
    padding: 0.42rem 0.3rem;
    font-size: 0.78rem;
  }
  .dash-backup-row {
    flex-wrap: wrap;
  }
  .dash-backup-row .btn {
    width: auto;
  }

  .panel .actions {
    width: 100%;
  }
  .panel .actions .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
  .page-dashboard .panel .actions .btn {
    width: auto;
  }

  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .form-actions .btn,
  .toolbar-print .btn,
  .actions .btn {
    min-height: 2.7rem;
  }
  .toolbar-print {
    flex-direction: column;
    align-items: stretch;
  }
  .toolbar-print .btn,
  .toolbar-print .badge {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
  .stmt-tools-actions {
    grid-template-columns: 1fr 1fr;
  }
  .stmt-tools-actions .btn {
    min-height: 2.35rem;
    padding: 0.45rem 0.5rem;
    font-size: 0.92rem;
  }
  .stmt-track {
    grid-template-columns: 1fr 1fr;
    padding: 0.6rem 0.65rem;
  }
  .stmt-tools-head .badge {
    width: auto;
  }
  .payslip-grid { grid-template-columns: 1fr; }
  .payslip-summary { max-width: none; margin-left: 0; }
  .pay-slip-editor { padding: 0.85rem 0.8rem; }
  .pay-slip-top {
    flex-wrap: wrap;
    align-items: center;
  }

  .alert {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
  }
  .alert .btn {
    width: 100%;
    text-align: center;
  }

  table.data,
  .stmt-table,
  .items-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }
  .statement-sheet {
    padding: 0.85rem;
    overflow-x: auto;
  }
  .filters {
    grid-template-columns: 1fr;
  }
  .filters .filter-actions {
    width: 100%;
  }
  .filters .filter-actions .btn {
    flex: 1;
    text-align: center;
  }

  .row-actions {
    width: 1%;
    white-space: nowrap;
  }
  .row-actions-group,
  .row-actions-group.is-inline {
    display: flex;
    flex-wrap: nowrap;
    min-width: 0;
  }
  .followup-card .row-actions {
    white-space: nowrap;
  }
  .followup-card-head .actions .btn {
    width: auto;
  }
  .status-search {
    flex-direction: column;
    align-items: stretch;
  }
  .status-search > div:first-child {
    max-width: none;
  }
  .status-search .btn {
    width: auto;
    align-self: flex-start;
  }
}

@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr; }
  .page-dashboard .stats,
  .page-dashboard .dash-stats,
  .page-dashboard .dash-stats:has(.stat:nth-child(7)) {
    grid-template-columns: 1fr;
  }
  .page-banner,
  .company-banner { padding: 0.6rem 0.7rem; }
  .form-grid { gap: 0.6rem; }
  .addr-map { height: 150px; }
  .login-page { padding: 0.85rem; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .btn { width: 100%; text-align: center; }
  .mode-switch-btn {
    font-size: 0.75rem;
    padding: 0.4rem 0.35rem;
  }
}

@media print {
  body { background: #fff; color: #000; }
  .no-print { display: none !important; }
  .wrap { width: 100%; margin: 0; padding: 0; }
  .statement-sheet {
    border: 2px solid #222;
    max-width: none;
    padding: 0.5rem;
    background: #fff !important;
    color: #000 !important;
  }
  .guide-sheet { border: none; box-shadow: none; }
  .payslip-pack-title h1,
  .payslip-pack-title p { color: #000; }
  .payslip-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
  }
  .payslip-card,
  .payslip-summary {
    box-shadow: none;
  }
}

/* —— Mode switch (Basic / Pro) —— */
.mode-switch {
  display: inline-flex;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(0,0,0,0.2);
  padding: 2px;
  gap: 2px;
}
.mode-switch-btn {
  border: none;
  background: transparent;
  color: #c5d0da;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.38rem 0.7rem;
  cursor: pointer;
}
.mode-switch-btn:hover { color: #fff; }
.mode-switch-btn.is-active {
  background: var(--accent);
  color: #fff;
}

/* —— Pro mode: sophisticated dark UI —— */
html.theme-pro,
html.theme-pro body,
body.theme-pro {
  --ink: #e8eef2;
  --muted: #9aabba;
  --line: #2a3a48;
  --paper: #0f161c;
  --card: #18232d;
  --accent: #2a9aa3;
  --accent-dark: #1f7f87;
  --accent-soft: #1a3036;
  --warn: #f0a070;
  --ok: #6fcf97;
  --danger: #f07178;
  --paid: #6fcf97;
  --unpaid: #f0a070;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  --radius: 10px;
  color-scheme: dark;
}

html.theme-pro body,
body.theme-pro {
  background:
    radial-gradient(ellipse 70% 45% at 12% -5%, rgba(42, 154, 163, 0.18), transparent 50%),
    radial-gradient(ellipse 55% 40% at 95% 15%, rgba(180, 140, 70, 0.08), transparent 45%),
    linear-gradient(180deg, #0c1218 0%, #101820 40%, #0f161c 100%);
  color: var(--ink);
}

body.theme-pro a { color: #7fd4db; }
body.theme-pro a:hover { color: #b6ebef; }

body.theme-pro .topbar {
  background: linear-gradient(180deg, #0a1016 0%, #0e1620 100%);
  border-bottom: 1px solid #243442;
  box-shadow: 0 8px 28px rgba(0,0,0,0.4);
}
body.theme-pro .topbar-brandrow {
  border-bottom-color: rgba(255,255,255,0.06);
}
body.theme-pro .topbar-nav a {
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  color: #b7c4d0;
}
body.theme-pro .topbar-nav a:hover {
  background: rgba(42, 154, 163, 0.15);
  color: #fff;
}
body.theme-pro .topbar-nav a.active {
  background: linear-gradient(180deg, #2a9aa3 0%, #21848c 100%);
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(42, 154, 163, 0.35);
}
body.theme-pro .userbox a,
body.theme-pro .userbox .logout-trigger,
body.theme-pro .userbox .user-menu-trigger,
body.theme-pro .nav-toggle {
  border-radius: 8px;
  border-color: rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);
}
body.theme-pro .userbox .user-menu-trigger {
  border-radius: 999px;
}
body.theme-pro .userbox-icon {
  background: rgba(42, 154, 163, 0.28);
  color: #d7f4f6;
}
body.theme-pro .user-menu-panel {
  background: #1a2733;
  border-color: #2a3a48;
  border-radius: 12px;
  box-shadow: 0 16px 36px rgba(0,0,0, 0.45);
}
body.theme-pro .user-menu-hero { border-bottom-color: #2a3a48; }
body.theme-pro .user-menu-name { color: #f2f6f8; }
body.theme-pro .user-menu-role { color: #9aabba; }
body.theme-pro .user-menu-panel a {
  color: #e8eef2;
}
body.theme-pro .user-menu-panel a:hover {
  background: rgba(42, 154, 163, 0.18);
  color: #b6ebef;
}
body.theme-pro .user-menu-panel .user-menu-logout {
  color: #f0a0a4;
  background: #2a181a;
}
body.theme-pro .user-menu-panel .user-menu-logout:hover {
  background: #3a2024;
  color: #ffc9cc;
}
body.theme-pro .mode-switch {
  border-radius: 999px;
}
body.theme-pro .mode-switch-btn {
  border-radius: 999px;
}
body.theme-pro .mode-switch-btn.is-active {
  background: linear-gradient(180deg, #2a9aa3, #1f7f87);
}
body.theme-pro .user-menu-mode {
  border-top-color: #2a3a48;
}
body.theme-pro .user-menu-mode-label { color: #9aabba; }
body.theme-pro .user-menu-mode .mode-switch {
  border-color: #2a3a48;
  background: #121c26;
}
body.theme-pro .user-menu-mode .mode-switch-btn { color: #9aabba; }
body.theme-pro .user-menu-mode .mode-switch-btn:hover { color: #e8eef2; }
body.theme-pro .user-menu-mode .mode-switch-btn.is-active {
  background: linear-gradient(180deg, #2a9aa3, #1f7f87);
  color: #fff;
}

body.theme-pro .page-banner,
body.theme-pro .company-banner {
  background:
    linear-gradient(135deg, rgba(42, 154, 163, 0.16), transparent 55%),
    linear-gradient(180deg, #1a2733 0%, #15202a 100%);
  border-color: #2a3a48;
  border-top-color: var(--accent);
  border-radius: var(--radius);
}
body.theme-pro .page-banner h1,
body.theme-pro .company-banner h1,
body.theme-pro .page-head h1 {
  color: #f2f6f8;
}

body.theme-pro .panel,
body.theme-pro .stat,
body.theme-pro .dash-card {
  background: linear-gradient(180deg, #1c2a36 0%, #17232e 100%);
  border-color: #2a3a48;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
body.theme-pro .panel .pay-slip-editor {
  background: #121c26;
  border-color: #2a3a48;
}
body.theme-pro .pay-slip-top,
body.theme-pro .pay-slip-net,
body.theme-pro .pay-section-title {
  border-color: #2a3a48;
}
body.theme-pro .panel h2,
body.theme-pro .dash-card h2 {
  color: #d5e2ea;
  border-bottom-color: #2a3a48;
}
body.theme-pro .dash-card h2 {
  color: #7fd4db;
}
body.theme-pro .stat.unpaid {
  background: linear-gradient(180deg, #1c2a36 50%, #2a221c 100%);
}
body.theme-pro .stat.paid {
  background: linear-gradient(180deg, #1c2a36 50%, #1a2a24 100%);
}
body.theme-pro .dash-links a {
  background: rgba(42, 154, 163, 0.12);
  border-left-color: var(--accent);
  color: #e8eef2;
  border-radius: 0 8px 8px 0;
}
body.theme-pro .dash-links a:hover {
  background: rgba(42, 154, 163, 0.22);
}
body.theme-pro .period-tab {
  color: #7fd4db;
  border-color: #3a6f76;
  border-radius: 8px;
}
body.theme-pro .period-tab:hover {
  background: rgba(42, 154, 163, 0.18);
  color: #fff;
}
body.theme-pro .period-tab.is-active {
  background: linear-gradient(180deg, #2a9aa3 0%, #21848c 100%);
  border-color: transparent;
  color: #fff;
}
body.theme-pro .dash-today { color: #9aabba; }
body.theme-pro .dash-followup {
  border-left-color: #e07070;
  background: linear-gradient(180deg, #2a1c20 0%, #17232e 100%);
}
body.theme-pro .dash-followup-head h2 {
  color: #f8b4b4;
}
body.theme-pro .stmt-track {
  background: linear-gradient(180deg, #1c2a36 0%, #17232e 100%);
  border-color: #2a3a48;
  border-radius: var(--radius);
}
body.theme-pro .stmt-track span { color: #9aabba; }
body.theme-pro .stmt-track strong { color: #e8eef2; }
body.theme-pro .stmt-back { color: #7fd4db; }
body.theme-pro .dash-exp-list li + li { border-top-color: #2a3a48; }
body.theme-pro .dash-exp-list a { color: #e8eef2; }
body.theme-pro .dash-exp-list a:hover { color: #7fd4db; }
body.theme-pro .dash-expenses-total { border-top-color: #2a3a48; }

body.theme-pro input[type="text"],
body.theme-pro input[type="password"],
body.theme-pro input[type="date"],
body.theme-pro input[type="number"],
body.theme-pro input[type="tel"],
body.theme-pro input[type="email"],
body.theme-pro input[type="search"],
body.theme-pro input[type="file"],
body.theme-pro select,
body.theme-pro textarea {
  background: #f4f8fb;
  border-color: #4a6578;
  color: #15202b;
  -webkit-text-fill-color: #15202b;
  caret-color: #15202b;
  color-scheme: light;
  border-radius: 8px;
}
body.theme-pro input::placeholder,
body.theme-pro textarea::placeholder {
  color: #5a6b78;
  -webkit-text-fill-color: #5a6b78;
  opacity: 1;
}
body.theme-pro input:focus,
body.theme-pro select:focus,
body.theme-pro textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(42, 154, 163, 0.25);
  color: #15202b;
  -webkit-text-fill-color: #15202b;
}
body.theme-pro input:-webkit-autofill,
body.theme-pro input:-webkit-autofill:hover,
body.theme-pro input:-webkit-autofill:focus,
body.theme-pro textarea:-webkit-autofill,
body.theme-pro select:-webkit-autofill {
  -webkit-text-fill-color: #15202b !important;
  caret-color: #15202b;
  box-shadow: 0 0 0 1000px #f4f8fb inset !important;
  -webkit-box-shadow: 0 0 0 1000px #f4f8fb inset !important;
  border-color: #4a6578;
  transition: background-color 99999s ease-out 0s;
}
body.theme-pro label { color: #c5d2dc; }
body.theme-pro .addr-results {
  background: #f4f8fb;
  border-color: #4a6578;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}
body.theme-pro .addr-results li {
  background: #f4f8fb;
  color: #15202b;
  border-bottom-color: #c5d0d8;
}
body.theme-pro .addr-results li.muted { color: #5a6b78; }
body.theme-pro .addr-results li:hover,
body.theme-pro .addr-results li:focus {
  background: #dce8ee;
  color: #15202b;
}

body.theme-pro .btn {
  border-radius: 8px;
  background: linear-gradient(180deg, #2a9aa3 0%, #21848c 100%);
  box-shadow: 0 4px 12px rgba(42, 154, 163, 0.25);
}
body.theme-pro .btn:hover {
  background: linear-gradient(180deg, #33aab3 0%, #249199 100%);
}
body.theme-pro .btn-secondary {
  background: #3a4a5a;
  box-shadow: none;
}
body.theme-pro .btn-secondary:hover { background: #4a5c6e; }
body.theme-pro .btn-outline {
  background: transparent;
  color: #7fd4db;
  border-color: #3a6f76;
  box-shadow: none;
}
body.theme-pro .btn-outline:hover {
  background: rgba(42, 154, 163, 0.18);
  color: #fff;
}
body.theme-pro .btn-danger {
  background: #b43a42;
  box-shadow: none;
}

body.theme-pro table.data th {
  background: #121c26;
  color: #c5d2dc;
  border-bottom-color: #2a3a48;
}
body.theme-pro table.data td {
  border-bottom-color: #243442;
}
body.theme-pro table.data tr:hover td {
  background: rgba(42, 154, 163, 0.08);
}

body.theme-pro .badge-paid {
  background: rgba(111, 207, 151, 0.22);
  color: #9ee6b8;
  border: 1.5px solid rgba(111, 207, 151, 0.45);
}
body.theme-pro .badge-unpaid {
  background: rgba(240, 160, 112, 0.24);
  color: #ffc9a0;
  border: 1.5px solid rgba(240, 160, 112, 0.5);
}
body.theme-pro .badge-followup {
  background: rgba(220, 80, 80, 0.38);
  color: #ffd6d6;
  border: 1.5px solid rgba(248, 180, 180, 0.55);
}
body.theme-pro .toolbar-print .badge-unpaid {
  background: #5a2e18;
  color: #ffd2ad;
  border-color: #f0a070;
}
body.theme-pro .toolbar-print .badge-paid {
  background: #1a3a2a;
  color: #9ee6b8;
  border-color: #6fcf97;
}

body.theme-pro .alert {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
body.theme-pro .alert-success {
  background: #15261e;
  border-color: #2d5a40;
  color: #8fdeb0;
}
body.theme-pro .followup-card-head {
  border-bottom-color: #2a3a48;
}
body.theme-pro .status-list-head,
body.theme-pro .stmt-list .filters {
  border-bottom-color: #2a3a48;
}
body.theme-pro .followup-days {
  color: #f8b4b4;
}
body.theme-pro .status-due.is-overdue {
  color: #f8b4b4;
}
body.theme-pro .status-due.is-missing {
  color: #8fa0b0;
}
body.theme-pro .status-form .stmt-track {
  background: #121c26;
}
body.theme-pro tr.is-focus-row td {
  background: rgba(42, 154, 163, 0.14);
}
body.theme-pro .alert-error {
  background: #2a181a;
  border-color: #6a3036;
  color: #f0a0a4;
}

body.theme-pro .empty {
  background: rgba(42, 154, 163, 0.08);
  border-color: rgba(42, 154, 163, 0.28);
  color: #9aabba;
  border-radius: var(--radius);
}

body.theme-pro .modal-card,
body.theme-pro .loading-box {
  background: #1a2733;
  color: #e8eef2;
  border-radius: var(--radius);
  border-top-color: var(--accent);
}
body.theme-pro .modal-card p { color: #9aabba; }
body.theme-pro .modal-overlay,
body.theme-pro .loading-overlay {
  background: rgba(6, 10, 14, 0.72);
}

body.theme-pro .receipt-preview-box {
  background: #121c26;
  border-color: #2a3a48;
  border-radius: var(--radius);
}
body.theme-pro .receipt-preview-frame {
  background: #0c1218;
  border-color: #2a3a48;
}
body.theme-pro .receipt-preview-hint { color: #7fd4db; }

/* Keep printable statement paper light even in Pro */
body.theme-pro .statement-sheet {
  background: #fff !important;
  color: #15202b !important;
  border-color: #222;
  border-radius: 0;
}
body.theme-pro .statement-sheet,
body.theme-pro .statement-sheet * {
  color: #15202b;
}
body.theme-pro .statement-sheet a {
  color: #0d5c63;
}

/* Totals table (view + form preview) — always high contrast in Pro */
body.theme-pro .stmt-totals table {
  background: #fff;
}
body.theme-pro .stmt-totals td {
  color: #15202b !important;
  border-color: #333;
  background: #fff;
}
body.theme-pro .stmt-totals td:first-child {
  background: #f0f0f0 !important;
  color: #15202b !important;
}
body.theme-pro .stmt-totals .due td {
  background: #e8e8e8 !important;
  color: #111 !important;
  font-weight: 700;
}
body.theme-pro .stmt-table th {
  background: #f0f0f0 !important;
  color: #15202b !important;
}
body.theme-pro .stmt-table td {
  background: #fff !important;
  color: #15202b !important;
}
body.theme-pro .stmt-sign .label { color: #555; }
body.theme-pro .payslip-pack-title h1 { color: #f2f6f8; }
body.theme-pro .payslip-card,
body.theme-pro .payslip-summary {
  background: #fff !important;
  color: #15202b !important;
}
body.theme-pro .payslip-card *,
body.theme-pro .payslip-summary * {
  color: #15202b;
}
body.theme-pro .payslip-head,
body.theme-pro .payslip-head * { color: #fff !important; }
body.theme-pro .payslip-loan,
body.theme-pro .payslip-loan * { color: #9a3412 !important; }
body.theme-pro .site-footer { color: #6f8090; }

@media (max-width: 720px) {
  .mode-switch-btn {
    padding: 0.42rem 0.5rem;
    font-size: 0.8rem;
  }
}

/* Flatpickr date fields — display mm/dd/yyyy with calendar */
.date-mdy-display {
  width: 100%;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%235a6b78' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 1.1rem;
  padding-right: 2.4rem !important;
}
body.theme-pro .date-mdy-display {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%239aabba' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
}
.flatpickr-calendar {
  font-family: var(--font);
  box-shadow: 0 12px 28px rgba(21, 32, 43, 0.18);
}
body.theme-pro .flatpickr-calendar {
  background: #1a2733;
  border-color: #2a3a48;
  box-shadow: 0 16px 36px rgba(0,0,0,0.45);
}
body.theme-pro .flatpickr-months .flatpickr-month,
body.theme-pro .flatpickr-current-month .flatpickr-monthDropdown-months,
body.theme-pro .flatpickr-weekday,
body.theme-pro .flatpickr-day {
  color: #e8eef2;
  fill: #e8eef2;
}
body.theme-pro .flatpickr-day:hover,
body.theme-pro .flatpickr-day:focus {
  background: rgba(42, 154, 163, 0.25);
  border-color: transparent;
}
body.theme-pro .flatpickr-day.selected,
body.theme-pro .flatpickr-day.startRange,
body.theme-pro .flatpickr-day.endRange {
  background: #2a9aa3;
  border-color: #2a9aa3;
  color: #fff;
}
body.theme-pro .flatpickr-day.today {
  border-color: #2a9aa3;
}
body.theme-pro .flatpickr-months .flatpickr-prev-month svg,
body.theme-pro .flatpickr-months .flatpickr-next-month svg {
  fill: #9aabba;
}

html.theme-pro .flatpickr-calendar .flatpickr-current-month .cur-month,
html.theme-pro .flatpickr-calendar .flatpickr-current-month .flatpickr-monthDropdown-months,
html.theme-pro .flatpickr-calendar .flatpickr-current-month input.cur-year,
body.theme-pro .flatpickr-calendar .flatpickr-current-month .cur-month,
body.theme-pro .flatpickr-calendar .flatpickr-current-month .flatpickr-monthDropdown-months,
body.theme-pro .flatpickr-calendar .flatpickr-current-month input.cur-year {
  color: #f2f6f8 !important;
  -webkit-text-fill-color: #f2f6f8 !important;
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color-scheme: dark;
  font-weight: 600;
  caret-color: #f2f6f8;
}
html.theme-pro .flatpickr-calendar .flatpickr-monthDropdown-months,
body.theme-pro .flatpickr-calendar .flatpickr-monthDropdown-months {
  -webkit-appearance: none;
  appearance: none;
}
