:root {
  color-scheme: light;
  --ink: #181d15;
  --muted: #565d50;
  --line: #e4e8de;
  --canvas: #f2f3ef;
  --paper: #fff;
  --forest: #164423;
  --forest-dark: #103418;
  --lime: #bef326;
  --lime-light: #c5f62d;
  --lime-deep: #a9e710;
  --lime-strong: var(--lime);
  --lime-soft: #f4fbdc;
  --radius: 23px;
  --edge: clamp(16px, 4.4vw, 64px);
  font-family: "DM Sans", "Segoe UI", system-ui, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 305px; background: var(--canvas); color: var(--ink); font-size: 14px; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #367834; outline-offset: 3px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(27px, 3vw, 38px); font-weight: 740; letter-spacing: -.05em; line-height: 1.12; }
h2 { font-size: 18px; font-weight: 700; letter-spacing: -.035em; line-height: 1.26; }
[data-icon] { display: inline-flex; align-items: center; justify-content: center; flex: none; }
[data-icon] svg { width: 18px; height: 18px; }
.sr-only, #main[data-page="dashboard"] .page-head {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar-inner, main { max-width: 1510px; margin-inline: auto; padding-inline: var(--edge); }
.topbar-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}
.topbar-inner::after { content: ""; grid-column: 1 / -1; border-bottom: 1px solid #daddd5; }
.topbar-inner > * { margin-top: 19px; }
.topbar-inner > .button { justify-self: end; }
.brand { display: flex; align-items: center; gap: 11px; width: fit-content; }
.brand-mark { width: 45px; height: 45px; border-radius: 13px; background: var(--forest); color: #fff; }
.brand-mark svg { width: 25px; height: 25px; }
.brand strong, .brand small { display: block; white-space: nowrap; line-height: 1.25; }
.brand strong { font-size: 21px; font-weight: 760; letter-spacing: -.05em; }
.brand small { color: var(--muted); font-size: 11px; margin-top: 2px; }

nav { display: flex; justify-content: center; align-items: center; gap: 4px; }
nav a { padding: 9px 17px; border-radius: 100px; font-weight: 550; font-size: 13px; white-space: nowrap; }
nav a:hover { background: #e8ece2; }
nav a.active { background: var(--lime); color: var(--forest-dark); font-weight: 720; }

main { padding-top: 16px; padding-bottom: 18px; }
.page-head { margin: 4px 0 20px; }
.page-head p { color: var(--muted); margin-top: 6px; line-height: 1.45; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 39px;
  width: fit-content;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 10px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 670;
  transition: background-color .14s ease, border-color .14s ease;
}
.button svg { width: 16px; height: 16px; }
.primary { background: var(--forest); color: #fff; }
.primary:hover { background: var(--forest-dark); }
.secondary { background: var(--paper); color: var(--ink); border-color: #dce1d5; }
.secondary:hover, .quiet:hover { background: #e9eee3; border-color: #d9e3d3; }
.quiet { color: var(--muted); background: transparent; }
.outline { border-color: #738775; background: var(--paper); color: var(--forest-dark); }
.outline:hover { background: var(--lime-soft); }
.lime-light { color: var(--forest-dark); background: #eff9be; }
.lime-light:hover { background: #f7fddb; }
.danger { background: #fff0f1; color: #a51f38; }
.danger:hover { background: #fce2e7; }

.scope { display: flex; justify-content: space-between; gap: 9px 14px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.scope-fields, .scope-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.scope-field { display: flex; align-items: center; position: relative; gap: 8px; min-height: 39px; border-radius: 10px; background: var(--paper); border: 1px solid #dce1d5; padding: 0 12px; color: var(--forest); }
.scope-field svg { width: 15px; height: 15px; }
.scope-field select, .scope-field input { min-width: 0; border: 0; background: transparent; height: 35px; font-size: 12px; color: var(--ink); font-weight: 650; padding: 0; }
.scope-field select { appearance: none; padding: 0 32px 0 35px; margin: 0 -12px 0 -35px; cursor: pointer; position: relative; z-index: 1; }
.select-arrow { position: absolute; right: 9px; pointer-events: none; }
.select-arrow svg { width: 13px; height: 13px; }
.scope-field input { max-width: 162px; }
.month-field input::-webkit-calendar-picker-indicator { opacity: .69; cursor: pointer; }

.panel { min-width: 0; background: var(--paper); border: 1px solid #e8ebe3; border-radius: var(--radius); box-shadow: 0 2px 4px #252d1404; }
.overview {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(0, 1fr);
  gap: 15px;
  margin-bottom: 15px;
}
.balance-card, .waiting-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 244px;
  padding: clamp(20px, 2.35vw, 34px);
}
.balance-card h2, .waiting-card h2 { font-size: clamp(16px, 1.6vw, 21px); }
.waiting-card { background: var(--lime); border-color: var(--lime-deep); isolation: isolate; color: #142911; overflow: hidden; }
.waiting-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: -2px;
  top: 9px;
  width: clamp(102px, 13vw, 208px);
  aspect-ratio: 1;
  background: #5b740027;
  clip-path: polygon(50% 0, 57% 9%, 68% 32%, 91% 43%, 100% 50%, 91% 57%, 68% 68%, 57% 91%, 50% 100%, 43% 91%, 32% 68%, 9% 57%, 0 50%, 9% 43%, 32% 32%, 43% 9%);
  border-radius: 25%;
  pointer-events: none;
}
.hero-value {
  display: block;
  width: 100%;
  margin-top: 14px;
  font-variant-numeric: tabular-nums;
  font-size: clamp(28px, 4.55vw, 71px);
  font-weight: 770;
  line-height: 1.01;
  letter-spacing: -.075em;
  overflow-wrap: anywhere;
}
.waiting-card .hero-value { font-size: clamp(25px, 3.85vw, 58px); }
.hero-sub { color: var(--muted); margin: 8px 0 17px; font-size: clamp(13px, 1.25vw, 17px); line-height: 1.45; }
.waiting-card .hero-sub { color: #304c27; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: 100%; margin-top: auto; }
.hero-actions .button { border-radius: 100px; padding-inline: 14px; }
.report-shortcut {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--lime);
  color: var(--forest-dark);
}
.report-shortcut:hover { background: var(--lime-deep); }
.report-shortcut svg { width: 24px; height: 24px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, .96fr) minmax(0, 1.35fr); gap: 15px; }
.dashboard-grid > .panel { padding: clamp(15px, 1.65vw, 24px); }
.dashboard-heading { display: flex; align-items: center; gap: 9px; font-size: clamp(15px, 1.48vw, 20px); }
.card-icon { width: 34px; height: 34px; border: 1px solid #e4e8de; border-radius: 10px; color: var(--forest); background: #f8faf6; }
.card-icon svg { width: 17px; height: 17px; }
.card-icon.cash-in { background: var(--lime-soft); border-color: #e7efc6; }
.spending-ring {
  width: min(174px, 94%);
  aspect-ratio: 1;
  margin: 19px auto 12px;
  padding: 10px;
  display: grid;
  place-items: stretch;
  border-radius: 50%;
  background: conic-gradient(var(--lime-strong) var(--share), #e8ebe3 0);
}
.spending-amount { min-width: 0; min-height: 0; border-radius: 50%; display: grid; align-content: center; text-align: center; background: var(--paper); padding: 17px; }
.spending-amount strong { font-size: clamp(15px, 1.5vw, 21px); letter-spacing: -.04em; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.spending-amount span, .spending-caption { color: var(--muted); font-size: 11px; line-height: 1.4; }
.spending-amount span { margin-top: 4px; }
.spending-caption { text-align: center; margin-bottom: 2px; }
.flow-lines { display: grid; gap: 24px; margin-top: 28px; }
.flow-line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 3px 9px; margin-bottom: 9px; font-size: 13px; color: var(--muted); }
.flow-line strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.flow-track { background: #e9ece4; border-radius: 10px; overflow: hidden; height: 8px; }
.flow-fill { display: block; border-radius: 10px; height: 100%; background: var(--lime-strong); }
.flow-fill.out { background: #779724; }
.recent-heading { display: flex; justify-content: space-between; align-items: center; gap: 5px 10px; flex-wrap: wrap; }
.text-link { display: inline-flex; align-items: center; gap: 4px; color: var(--forest); font-size: 11px; white-space: nowrap; font-weight: 690; }
.text-link:hover { text-decoration: underline; }
.text-link svg { width: 14px; height: 14px; }
.recent-list { list-style: none; margin: 10px 0 0; padding: 0; }
.recent-list li + li { border-top: 1px solid #ebeee7; }
.recent-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 52px;
  padding: 6px 0;
  text-align: left;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
}
.recent-row:hover { background: #f4f8ef; }
.recent-row .card-icon { width: 31px; height: 31px; }
.recent-row .tx-name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; min-width: 0; font-size: 12px; }
.recent-meta { color: var(--muted); font-size: 10px; line-height: 1.3; display: block; margin-top: 3px; }
.recent-amount { max-width: 110px; overflow-wrap: anywhere; text-align: right; font-variant-numeric: tabular-nums; font-size: 12px; }

.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 18px 19px 15px; }
.panel-head p { color: var(--muted); font-size: 12px; margin-top: 5px; line-height: 1.4; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { background: #f6f8f3; color: #4e594b; font-size: 11px; font-weight: 720; white-space: nowrap; }
th, td { padding: 11px 12px; border-bottom: 1px solid #edf0e9; }
th:first-child, td:first-child { padding-left: 19px; }
th:last-child, td:last-child { padding-right: 19px; }
td { font-size: 12px; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcfa; }
.date-col, .money, .status-col { white-space: nowrap; }
.money { text-align: right; font-variant-numeric: tabular-nums; }
td.money { font-weight: 685; }
.incoming { color: #1d6740; }
.date-col { color: var(--muted); }
.tx-name { color: var(--ink); display: block; font-weight: 680; line-height: 1.3; min-width: 115px; overflow-wrap: anywhere; }
.row-detail { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; line-height: 1.3; overflow-wrap: anywhere; }
.status { display: inline-flex; align-items: center; width: max-content; max-width: 100%; gap: 5px; border-radius: 20px; padding: 4px 7px; font-size: 10px; line-height: 1.25; font-weight: 690; background: #eef0eb; color: #50584a; }
.status::before { content: ""; flex: none; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status.waiting { color: #854d0b; background: #fff2db; }
.status.complete { color: #36642c; background: #edf6e3; }
.status.reimbursed { color: #1a6744; background: #e7f7ee; }
.icon-button { width: 30px; height: 30px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); padding: 0; display: grid; place-items: center; }
.icon-button:hover { color: var(--forest); background: var(--lime-soft); }
.icon-button svg { width: 16px; height: 16px; }
.table-footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 19px; border-top: 1px solid #edf0e9; color: var(--muted); font-size: 11px; }
.pagination { display: flex; gap: 3px; align-items: center; }
.pagination button { width: 27px; height: 27px; }
.pagination button:disabled { opacity: .4; cursor: default; }
.empty { padding: 28px 16px; color: var(--muted); text-align: center; }

.filters { padding: 0 19px 15px; display: flex; gap: 8px; flex-wrap: wrap; }
.filters label { display: flex; align-items: center; position: relative; }
.filters input, .filters select, .form-grid input, .form-grid select, form textarea, #opening-form input, #cash-count {
  width: 100%;
  min-height: 38px;
  border: 1px solid #dce2d6;
  border-radius: 8px;
  padding: 7px 9px;
  background: var(--paper);
  color: var(--ink);
}
.filters input, .filters select { font-size: 12px; }
.filters .search-filter { flex: 1 1 240px; }
.search-filter [data-icon] { position: absolute; left: 9px; color: var(--muted); }
.search-filter svg { width: 14px; height: 14px; }
.search-filter input { padding-left: 30px; }
.report-summary { padding: 19px; }
.report-summary > p { color: var(--muted); margin-top: 6px; font-size: 12px; line-height: 1.5; }
.summary-rows { margin: 14px 0 0; }
.summary-rows > div { padding: 11px 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); }
.summary-rows dt { color: var(--muted); font-size: 12px; }
.summary-rows dd { margin: 0; font-weight: 715; font-variant-numeric: tabular-nums; }
.summary-rows .closing dt, .summary-rows .closing dd { color: var(--forest); font-weight: 740; }
.report-table { margin-top: 15px; }
.reconcile-output { margin-top: 12px; padding: 10px; border-radius: 8px; background: #f1f5ec; color: var(--forest); line-height: 1.4; font-size: 12px; }
.reconcile-output[data-result="match"] { background: #e7f7ee; color: #1a6744; }
.reconcile-output[data-result="mismatch"] { background: #fff2db; color: #854d0b; }

.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px 14px; padding-top: 13px; margin-top: 14px; border-top: 1px solid #daddd5; color: var(--muted); font-size: 11px; }
.footer > span:last-child { display: inline-flex; align-items: center; gap: 6px; }
.footer-divider { color: #6d7866; padding-inline: 3px; }
.demo-dot { width: 6px; height: 6px; border-radius: 50%; background: #70a04a; }

dialog { padding: 0; width: min(535px, calc(100% - 30px)); max-height: calc(100dvh - 26px); border: 1px solid var(--line); border-radius: 17px; box-shadow: 0 22px 80px #18261b56; color: var(--ink); }
dialog::backdrop { background: #17291b78; }
.dialog-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; padding: 17px 20px 13px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { font-size: 21px; }
.dialog-head p, .form-hint { color: var(--muted); margin-top: 5px; font-size: 12px; line-height: 1.4; }
dialog form { padding: 14px 20px 17px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-grid label, #opening-form label { display: grid; gap: 5px; font-size: 12px; font-weight: 700; min-width: 0; }
form textarea { resize: vertical; }
.span-2 { grid-column: 1 / -1; }
.direction { padding: 0; margin: 0 0 12px; border: 0; display: flex; gap: 7px; }
.direction legend { padding: 0; margin-bottom: 5px; font-size: 12px; font-weight: 700; }
.direction label { flex: 1; cursor: pointer; }
.direction input { position: absolute; opacity: 0; }
.direction label > span { border: 1px solid #dce2d6; color: var(--muted); min-height: 36px; border-radius: 8px; display: flex; justify-content: center; align-items: center; gap: 6px; font-weight: 690; font-size: 12px; }
.direction input:checked + span { background: var(--lime-soft); border-color: #bfd76b; color: var(--forest); }
.direction input:focus-visible + span { outline: 2px solid #367834; outline-offset: 2px; }
.direction svg { width: 15px; height: 15px; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; margin-top: 15px; }
.dialog-actions .danger { margin-right: auto; }
.form-error { color: #a51f38; font-size: 12px; margin-top: 9px; line-height: 1.4; }
.toast { position: fixed; z-index: 10; right: 22px; bottom: 20px; max-width: calc(100% - 44px); border-radius: 10px; box-shadow: 0 8px 30px #18261b38; padding: 11px 14px; color: #fff; background: var(--forest-dark); font-size: 12px; }

@media (max-width: 900px) {
  .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recent-panel { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .topbar-inner { grid-template-columns: minmax(0, 1fr) auto; gap: 11px 8px; }
  .topbar-inner > * { margin-top: 12px; }
  .topbar-inner > nav { grid-row: 2; grid-column: 1 / -1; justify-content: flex-start; margin-top: 0; }
  .topbar-inner .brand-mark { width: 39px; height: 39px; }
  .brand strong { font-size: 17px; }
  .brand small { font-size: 10px; }
  .topbar-inner > .button { padding-inline: 9px; gap: 4px; }
  .overview { gap: 10px; }
  .balance-card, .waiting-card { min-height: 195px; padding: 17px; }
  .dashboard-grid { gap: 10px; }
  .hero-value { font-size: clamp(31px, 6.5vw, 48px); }
  .waiting-card .hero-value { font-size: clamp(28px, 5.6vw, 42px); }
}
@media (max-width: 520px) {
  .overview { grid-template-columns: minmax(0, 1fr); }
  .balance-card, .waiting-card { min-height: 0; }
  .hero-sub { margin-bottom: 13px; }
  .scope { margin-bottom: 12px; }
  .scope-fields, .scope-actions { gap: 6px; }
  .scope-field { padding-inline: 9px; }
  .scope-field select { margin-right: -9px; margin-left: -32px; padding-left: 32px; }
  .scope-actions .button { min-height: 34px; }
  .spending-ring { padding: 7px; margin: 16px auto 10px; }
  .spending-amount { padding-inline: 11px; }
  .spending-amount strong { font-size: clamp(12px, 3.55vw, 18px); }
  .spending-amount span, .spending-caption { font-size: 10px; }
  .dashboard-grid > .panel { padding: 12px; }
  .dashboard-heading { gap: 5px; font-size: 14px; }
  .dashboard-heading .card-icon { width: 25px; height: 25px; border-radius: 8px; }
  .dashboard-heading .card-icon svg { width: 14px; height: 14px; }
  .flow-lines { gap: 16px; margin-top: 16px; }
  .flow-line { font-size: 11px; margin-bottom: 6px; }
  .flow-track { height: 7px; }
}
@media (max-width: 360px) {
  .brand { gap: 7px; }
  .topbar-inner > .button { font-size: 11px; }
  .report-shortcut { display: none; }
}
@media print {
  body { background: #fff; }
  .topbar, .scope, .footer, .table-footer, .reconcile, .actions-col, .filters, .text-link, #print-report { display: none !important; }
  main { padding: 0; }
  tr { break-inside: avoid; }
  .table-wrap { overflow: visible; }
}

#company-logo,.profile-logo{display:block;object-fit:contain;object-position:left center;background:none;border:0;border-radius:0}
#company-logo{max-width:98px;max-height:45px;width:auto;height:auto}
.profile-logo{max-width:min(260px,100%);max-height:110px;margin:13px 0}
.settings-layout{display:grid;grid-template-columns:218px minmax(0,1fr);gap:15px;align-items:start}
.settings-nav{padding:10px;display:grid;gap:4px}.settings-nav button{width:100%;justify-content:flex-start}
.settings-nav .selected{background:var(--lime);color:var(--forest-dark)}
.settings-body{padding:20px}.settings-body h2,.settings-note,.settings-body dl{margin:0 0 14px}
.settings-note{color:var(--muted);line-height:1.5}.settings-body table{margin-top:14px}
.settings-body td .button{margin:3px 5px 3px 0}.footer button{min-height:29px;padding:0 6px}
@media(max-width:850px){.topbar-inner{grid-template-columns:minmax(0,1fr) auto;gap:9px}.topbar-inner nav{grid-row:2;grid-column:1/-1;justify-content:flex-start;margin-top:0;overflow:auto}.topbar-inner::after{grid-row:3}}
@media(max-width:620px){.settings-layout{grid-template-columns:minmax(0,1fr)}.settings-nav{display:flex;flex-wrap:wrap}.settings-nav button{width:auto}.settings-body{padding:15px}#company-logo{max-width:63px}}

.balance-detail{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px 15px;width:100%;margin:14px 0 18px;padding:11px 0 0;border-top:1px solid var(--line)}
.balance-detail dt{color:var(--muted);font-size:11px;margin-bottom:4px}
.balance-detail dd{margin:0;font-weight:700;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.settings-body>button+button{margin-left:8px}
@media(max-width:360px){.balance-detail{gap:8px}.balance-detail dd{font-size:11px}}
.detail-grid{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(0,1fr);gap:14px;margin-top:15px}
.detail-panel{padding:18px 16px;min-width:0}
.detail-caption{color:var(--muted);font-size:12px;margin:5px 0 12px}
.detail-panel .table-wrap{margin-top:8px}
.detail-panel .current-period{background:var(--lime-soft)}
.detail-panel .period-link{font-size:12px;min-height:29px;padding:0 5px;text-align:left}
.balance-detail small{display:block;margin-top:4px;font-weight:500;color:var(--muted)}
@media(max-width:860px){.detail-grid{grid-template-columns:minmax(0,1fr)}}


/* Petty Cash sign-in */
body:has(#sign-in:not([hidden])) {
  min-height:100vh;
  min-height:100dvh;
  display:grid;
  place-items:center;
  padding:24px 16px;
  background:
    radial-gradient(ellipse at 19% 91%, #f3ebcc 0, transparent 43%),
    radial-gradient(ellipse at 76% 14%, #98a3f5 0, #8998ee 22%, transparent 61%),
    linear-gradient(132deg,#30334c,#252737 70%,#444047);
}
.sign-in {
  width:min(100%,420px);
  margin:0;
  padding:24px 32px 32px;
  border:1px solid #e0ff754f;
  border-radius:29px;
  color:#1b2039;
  background:linear-gradient(166deg,var(--lime-light),var(--lime) 66%,var(--lime-deep));
  box-shadow:0 22px 55px #15173555,inset 0 1px 1px #fff7;
}
.login-brand {display:flex;align-items:center;justify-content:center;gap:8px;font-size:12px;font-weight:710;letter-spacing:.015em}
.login-brand .brand-mark {width:29px;height:29px;border-radius:8px;background:#222745;color:#daff64}
.login-brand .brand-mark svg {width:17px;height:17px}
.login-mascot {width:178px;margin:21px auto 17px}
.mascot-sprout {position:relative;width:30px;height:26px;margin:0 auto 12px}
.mascot-sprout::before,.mascot-sprout::after {content:"";position:absolute;background:#fffce9;border-radius:60%}
.mascot-sprout::before {width:16px;height:22px;left:3px;top:5px;transform:rotate(-17deg)}
.mascot-sprout::after {width:16px;height:24px;right:1px;top:0;transform:rotate(31deg)}
.mascot-eyes {display:flex;justify-content:center;gap:9px}
.mascot-eye {position:relative;width:73px;height:71px;border-radius:50%;background:#fffcf0;display:grid;place-items:center}
.mascot-eye::before {content:"";position:absolute;width:27px;height:9px;top:-11px;left:22px;border-top:6px solid #20223a;border-radius:70% 65% 0 0;transform:rotate(-12deg)}
.mascot-eye:nth-child(2)::before {transform:rotate(12deg)}
.mascot-eye i {position:relative;width:39px;height:39px;border-radius:50%;background:#151d3b;box-shadow:inset 0 0 0 7px #252c4a;transform:translate(var(--gaze-x,0px),calc(5px + var(--gaze-y,0px)))}
.mascot-eye i::after {content:"";position:absolute;top:5px;left:7px;width:11px;height:11px;border-radius:50%;background:#fff}
.mascot-nose {margin:4px auto 0;width:5px;height:5px;border-radius:50%;background:#343c26;box-shadow:9px 0 #343c26;transform:translateX(-4px)}
.sign-in h1 {margin:0;text-align:center;font-size:30px;line-height:1.12;font-weight:770;letter-spacing:-.045em}
.login-description {margin:8px 0 20px;text-align:center;color:#2f3b29;font-size:13px;line-height:1.5}
.login-fields {display:grid;gap:12px}
.login-fields label {display:grid;gap:5px;font-size:13px;font-weight:700}
.login-fields input {width:100%;min-height:43px;padding:8px 12px;border:1px solid #51610030;border-radius:11px;background:#faffddbd;color:#1b2039;font-size:15px}
.login-fields input:focus {outline:2px solid #2b355e;outline-offset:1px;background:#fffdec}
.login-password {position:relative}
.login-password input {padding-right:108px}
.login-reveal {position:absolute;right:8px;bottom:6px;min-height:31px;border:0;border-radius:7px;background:transparent;color:#262c46;padding:0 6px;cursor:pointer;font-size:12px;font-weight:720}
.login-reveal:hover {background:#e5f4b7}
.login-hint {margin:-5px 0 0;color:#303b29;font-size:12px}
.sign-in .form-error {margin:12px 0 0;padding:8px 10px;border-radius:9px;background:#fff3e8;color:#821f1f}
.sign-in .login-submit {display:flex;justify-content:center;align-items:center;gap:9px;width:100%;min-height:44px;margin-top:17px;border-radius:11px;background:#202744;color:#fff;font-size:14px}
.sign-in .login-submit:hover {background:#313c62}
.login-submit:disabled {opacity:.65;cursor:wait}
@media(max-width:440px){
  body:has(#sign-in:not([hidden])){padding:18px 14px}
  .sign-in{padding:21px 22px 26px}
  .login-mascot{margin-top:17px}
  .sign-in h1{font-size:27px}
}

.login-brand {flex-direction:column;text-align:center;gap:7px}
.login-brand .brand-mark {width:37px;height:37px;border-radius:10px}
.login-brand .brand-mark svg {width:20px;height:20px}
.login-company-logo {display:block;width:auto;max-width:min(155px,100%);height:auto;max-height:60px;object-fit:contain}


/* Greeting after an explicit sign-in */
#welcome-dialog {
  width:min(560px,calc(100% - 28px));
  overflow-wrap:anywhere;
  padding:clamp(20px,5vh,43px) clamp(21px,7vw,48px) clamp(24px,5vh,40px);
  text-align:center;
  background:radial-gradient(ellipse at 50% 0%,#edfac8 0%,transparent 60%),linear-gradient(155deg,#f8fce9,#fff 72%);
  border-color:#e5edce;
  border-radius:29px;
}
#welcome-dialog::backdrop {background:#151b34a6}
.welcome-emblem {
  position:relative;
  display:grid;
  place-items:center;
  width:60px;
  height:60px;
  margin:0 auto 17px;
  border-radius:19px;
  color:#1b2039;
  background:var(--lime);
  transform:rotate(-7deg);
}
.welcome-emblem svg {width:29px;height:29px;transform:rotate(7deg)}
.welcome-sparkle {
  position:absolute;
  top:-5px;
  right:-10px;
  width:23px;
  height:23px;
  background:#263153;
  clip-path:polygon(50% 0,62% 38%,100% 50%,62% 62%,50% 100%,38% 62%,0 50%,38% 38%);
}
#welcome-title {font-size:clamp(30px,6vw,45px);letter-spacing:-.05em;line-height:1.08;color:#1b2039}
#welcome-description {max-width:35ch;margin:13px auto 0;color:#394734;font-size:clamp(14px,3.8vw,17px);line-height:1.5}
#welcome-dialog form {padding:0;margin-top:24px}
#welcome-dialog .button {min-width:172px;min-height:46px;font-size:14px;background:#202744;color:#fff}
#welcome-dialog .button:hover {background:#313c62}
@media (prefers-reduced-motion:no-preference) {
  #welcome-dialog[open] {animation:welcome-in .25s ease-out}
  @keyframes welcome-in {
    from {opacity:0;transform:translateY(9px) scale(.97)}
    to {opacity:1;transform:translateY(0) scale(1)}
  }
}


@media (prefers-reduced-motion:no-preference) {
  .mascot-eyes {animation:mascot-blink 5.8s infinite;transform-origin:center 60%}
  .mascot-eye i {transition:transform .15s ease-out}
  @keyframes mascot-blink {
    0%,88%,94%,100% {transform:scaleY(1)}
    91% {transform:scaleY(.08)}
  }
}

/* Full-page reporting and reconciliation */
.report-table .table-wrap {max-height:none;overflow-x:auto}
.report-table table {width:100%}
.reconcile-page {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.45fr);overflow:hidden}
.reconcile-balance {background:var(--lime-soft);padding:clamp(20px,4vw,42px);display:grid;align-content:center;gap:9px}
.reconcile-balance strong {font-size:clamp(25px,4vw,48px);letter-spacing:-.045em;overflow-wrap:anywhere}
.reconcile-balance p,.reconcile-form>p:not(.reconcile-output) {color:var(--muted);font-size:13px}
.reconcile-form {padding:clamp(20px,4vw,42px);min-width:0}
.reconcile-form>p {margin:7px 0 13px}
.reconcile-form label {display:grid;gap:5px;font-size:12px;font-weight:690}
.reconcile-form label input {margin-top:4px}
@media(max-width:700px){.reconcile-page{grid-template-columns:1fr}}
@media print{.report-table .table-wrap{overflow:visible}}

.welcome-sparkle-small {width:14px;height:14px;top:auto;right:auto;bottom:-4px;left:-9px}
@media(prefers-reduced-motion:no-preference) {
  #welcome-dialog[open] {animation:welcome-in .36s cubic-bezier(.2,.85,.3,1.15) both}
  #welcome-dialog[open] .welcome-emblem {animation:emblem-arrival .68s .08s ease-out both}
  #welcome-dialog[open] .welcome-sparkle {animation:sparkle-arrival .55s .32s ease-out both}
  #welcome-dialog[open] .welcome-sparkle-small {animation-delay:.45s}
  @keyframes emblem-arrival {
    0% {opacity:0;transform:translateY(16px) scale(.62) rotate(-19deg)}
    58% {opacity:1;transform:translateY(-7px) scale(1.08) rotate(4deg)}
    79% {transform:translateY(2px) scale(.98) rotate(-8deg)}
    100% {opacity:1;transform:translateY(0) scale(1) rotate(-4deg)}
  }
  @keyframes sparkle-arrival {
    from {opacity:0;transform:scale(.3) rotate(-26deg)}
    to {opacity:1;transform:scale(1) rotate(0deg)}
  }
}

/* Smiling mascot on the welcome card */
#welcome-dialog .welcome-emblem {
  width:160px;
  height:136px;
  border-radius:28px;
  transform:rotate(-4deg);
}
#welcome-dialog .login-mascot {
  position:absolute;
  top:8px;
  left:calc(50% - 89px);
  margin:0;
  transform:scale(.84);
  transform-origin:top center;
}
.mascot-smile {
  width:29px;
  height:14px;
  margin:3px auto 0;
  overflow:hidden;
  border-radius:2px 2px 17px 17px;
  background:#1b2039;
}
.mascot-smile::before {
  content:"";
  display:block;
  width:21px;
  height:4px;
  margin:0 auto;
  border-radius:0 0 3px 3px;
  background:#fffcf0;
}
.welcome-wave {
  position:absolute;
  bottom:0;
  right:-19px;
  font-size:29px;
  line-height:1.2;
  transform:rotate(12deg);
  transform-origin:70% 92%;
}
@media(prefers-reduced-motion:no-preference) {
  #welcome-dialog[open] .welcome-wave {animation:mascot-wave .9s .31s ease-in-out 2 both}
  #welcome-dialog[open] .mascot-smile {animation:mascot-grin .35s .23s ease-out both}
  @keyframes mascot-wave {
    0%,100% {transform:rotate(12deg)}
    25%,70% {transform:rotate(-14deg)}
    48%,88% {transform:rotate(23deg)}
  }
  @keyframes mascot-grin {
    from {transform:scale(.65,.48)}
    to {transform:scale(1)}
  }
}

.welcome-stage {position:relative;width:min(100%,314px);margin:0 auto 23px}
#welcome-dialog .welcome-emblem {margin-bottom:0}
.welcome-confetti {position:absolute;inset:0;pointer-events:none}
.welcome-confetti i {
  position:absolute;left:var(--x);top:var(--y);width:var(--size,9px);height:var(--size,9px);
  border-radius:var(--shape,3px);background:var(--color,#668020);
  opacity:.72;transform:rotate(var(--turn,18deg));
}
.welcome-confetti i:nth-child(1){--x:13%;--y:16%;--color:#8caf1a;--turn:35deg}
.welcome-confetti i:nth-child(2){--x:4%;--y:51%;--size:6px;--shape:50%;--color:#263153;--turn:-25deg}
.welcome-confetti i:nth-child(3){--x:18%;--y:86%;--size:8px;--color:#d0a32b;--turn:48deg}
.welcome-confetti i:nth-child(4){--x:82%;--y:8%;--size:6px;--shape:50%;--color:#263153}
.welcome-confetti i:nth-child(5){--x:95%;--y:34%;--color:#d0a32b;--turn:42deg}
.welcome-confetti i:nth-child(6){--x:87%;--y:78%;--size:7px;--shape:50%;--color:#8caf1a}
@media(prefers-reduced-motion:no-preference) {
  #welcome-dialog[open] .welcome-confetti i {animation:welcome-confetti .72s .2s ease-out both}
  #welcome-dialog[open] .welcome-confetti i:nth-child(even) {animation-delay:.29s}
  @keyframes welcome-confetti {
    from {opacity:0;left:49%;top:50%;transform:scale(.3) rotate(0deg)}
    70% {opacity:.9}
    to {opacity:.72;left:var(--x);top:var(--y);transform:scale(1) rotate(var(--turn,18deg))}
  }
}

.topbar .brand {
  min-width: 0;
  max-width: 100%;
  gap: 10px;
  padding-block: 3px;
}
.topbar .brand-mark { flex: none; }
#company-logo { flex: none; max-width: clamp(44px, 5.4vw, 76px); max-height: 54px; }
.brand-copy { display: grid; min-width: 0; gap: 3px; }
.brand-copy strong { font-size: 18px; letter-spacing: -.025em; }
.brand-copy small { font-size: 11px; margin-top: 0; }
.brand-copy :is(strong, small) { overflow: hidden; text-overflow: ellipsis; }
.brand-greeting {
  display: flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  gap: 6px;
  padding: 4px 11px 4px 8px;
  margin-top: 3px;
  border-radius: 100px;
  background: #e9f9b7;
  color: #202744;
  font-size: clamp(16px, 1.45vw, 21px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.045em;
}
.brand-sparkle {
  display: grid;
  flex: none;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--lime);
  font-size: 12px;
  letter-spacing: 0;
}
#header-greeting { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 520px) {
  .topbar .brand { gap: 9px; }
  .brand-copy strong { font-size: 14px; }
  .brand-copy small { font-size: 10px; }
  .brand-greeting { gap: 4px; padding: 3px 7px 3px 5px; }
  .brand-sparkle { width: 16px; height: 16px; font-size: 10px; }
}
.topbar-actions { display: flex; justify-self: end; align-items: center; gap: 8px; }
.topbar-actions > .button { white-space: nowrap; }
.account-menu { position: relative; }
.account-menu summary {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 4px 9px 4px 4px;
  border: 1px solid #daddd5;
  border-radius: 50px;
  background: #fff;
  color: #202744;
  font-size: 12px;
  font-weight: 720;
  cursor: pointer;
  list-style: none;
}
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu summary:hover, .account-menu[open] summary { border-color: #7e963d; }
.account-menu summary svg { display: block; width: 12px; height: 12px; }
.account-menu[open] summary svg { transform: rotate(180deg); }
.account-avatar {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: var(--lime);
  color: #202744;
}
#account-name { max-width: 75px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-popover {
  position: absolute;
  z-index: 10;
  inset: calc(100% + 9px) 0 auto auto;
  width: 222px;
  padding: 6px;
  border: 1px solid #daddd5;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 14px 36px #20274424;
}
.account-menu-heading {
  display: grid;
  gap: 3px;
  overflow-wrap: anywhere;
  padding: 9px 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid #edf0e9;
  color: #202744;
}
.account-menu-heading small { color: var(--muted); }
.account-popover button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #202744;
  font-size: 13px;
  cursor: pointer;
}
.account-popover button:hover { background: #f2f8e6; }
.account-popover button svg { display: block; width: 17px; height: 17px; }
.account-popover #log-out { color: #a43639; }
.account-popover #log-out:hover { background: #fdf0f0; }
.ledger-pagination { border-top: 0; border-bottom: 1px solid #edf0e9; flex-wrap: wrap; }
.ledger-pagination .pagination { flex-wrap: wrap; }
.ledger-pagination .pagination button { min-width: 30px; width: auto; height: 31px; padding-inline: 5px; }
.ledger-pagination [aria-current="page"] { background: var(--lime); border-color: transparent; color: #202744; font-weight: 750; }
.pagination-gap { padding-inline: 4px; }
@media (max-width: 1100px) {
  .topbar-inner { grid-template-columns: auto minmax(0, 1fr) auto; }
  nav a { padding-inline: 10px; }
  #account-name { display: none; }
}
@media (max-width: 850px) {
  .topbar-inner { grid-template-columns: minmax(0, 1fr) auto; }
}
@media (max-width: 520px) {
  #new-transaction { padding-inline: 10px; }
  #new-transaction > span:last-child { display: none; }
  .account-menu summary { gap: 4px; padding-right: 5px; }
}

.login-workspace { min-width: 0; margin: 0; padding: 0; border: 0; }
.login-workspace legend { padding: 0; margin-bottom: 6px; font-size: 13px; font-weight: 750; }
.login-workspace > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 12px; background: #faffdd9e; }
.login-workspace label { position: relative; cursor: pointer; }
.login-workspace input { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; opacity: 0; }
.login-workspace label span { padding: 10px 4px; border-radius: 8px; text-align: center; }
.login-workspace input:checked + span { background: #202744; color: #fff; }
.login-workspace input:focus-visible + span { outline: 2px solid #202744; outline-offset: 2px; }

.collect-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.collect-toolbar { justify-content: space-between; }
.collect-toolbar .scope-field { gap: 8px; }
.collect-register .table-wrap { max-height: none; overflow-x: auto; }
.collect-register td { vertical-align: middle; }
.collect-register { margin-bottom: 16px; overflow: hidden; }
.collect-register .panel-head { padding: 16px 18px; }
.collect-register :is(th, td):first-child { white-space: nowrap; }
@media (max-width: 1100px) {
  .topbar-inner nav { overflow: auto; justify-content: flex-start; }
}

.login-logo-preview { max-height: 65px; max-width: min(180px, 100%); margin-bottom: 14px; }

.greeting-photo {
  flex: none;
  width: clamp(56px, 5.5vw, 76px);
  aspect-ratio: 1;
  border: 3px solid #fff;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 0 0 1px #b0ce72, 0 3px 9px #24371420;
  object-fit: cover;
  object-position: center;
}
.topbar .brand:has(.greeting-photo:not([hidden])) { gap: 12px; }
@media (max-width: 520px) {
  .greeting-photo { width: 44px; border-radius: 12px; }
  .topbar .brand:has(.greeting-photo:not([hidden])) { gap: 9px; }
}

:root[data-apgc-theme="blue"] { --lime:#9bd4ff; --lime-light:#b4e1ff; --lime-deep:#74b8f4; --lime-soft:#e9f5ff; --forest:#164d86; --forest-dark:#123e6d; }
:root[data-apgc-theme="teal"] { --lime:#8fe7d2; --lime-light:#b1f1e2; --lime-deep:#64cfb7; --lime-soft:#e7f9f5; --forest:#126457; --forest-dark:#0e4e43; }
:root:is([data-apgc-theme="blue"], [data-apgc-theme="teal"]) .lime-light,
:root:is([data-apgc-theme="blue"], [data-apgc-theme="teal"]) .brand-greeting { background:var(--lime-soft); }
.workspace-button { color:#202744; background:var(--lime); padding-inline:10px; min-height:34px; white-space:nowrap; font-size:12px; }
#workspace-picker { width:min(430px, calc(100% - 32px)); padding:0; border:0; border-radius:22px; background:#fff; }
.workspace-picker-head { padding:20px 22px; color:#fff; background:#202744; }
.workspace-picker-head h2 { color:#fff; }
.workspace-picker-head p { margin-top:5px; color:#c6ccdc; font-size:13px; }
.workspace-choices { display:grid; padding:14px; gap:9px; }
.workspace-choices button { display:grid; grid-template-columns:38px 1fr auto; gap:10px; align-items:center; text-align:left; padding:11px; border:1px solid #e0e6dc; border-radius:13px; color:#202744; background:#fff; }
.workspace-choices button[aria-pressed="true"] { border-color:var(--lime-deep); background:var(--lime-soft); }
.workspace-choices strong, .workspace-choices button > span:nth-child(2) > span { display:block; }
.workspace-choices button > span:nth-child(2) > span { margin-top:4px; color:#526151; font-size:11px; }
.workspace-choices small { font-weight:700; color:var(--forest); }
.workspace-choice-icon { display:grid; place-items:center; width:36px; height:36px; border-radius:10px; background:var(--lime); }
.workspace-choice-icon svg { width:20px; height:20px; }
#workspace-picker form { padding:0 14px 12px; text-align:right; }
.workspace-error:empty { display:none; }
.greeting-settings { grid-column:1 / -1; min-width:0; border:1px solid #e0e6dc; border-radius:10px; padding:10px; }
.greeting-settings textarea { width:100%; min-width:0; }
@media (max-width:520px) { .workspace-button { padding-inline:6px; font-size:10px; } .topbar-actions { gap:4px; } }

:root[data-apgc-theme="custom"] {
  --lime:color-mix(in srgb,var(--apgc-accent) 60%,white);
  --lime-light:color-mix(in srgb,var(--apgc-accent) 45%,white);
  --lime-deep:color-mix(in srgb,var(--apgc-accent) 66%,white);
  --lime-soft:color-mix(in srgb,var(--apgc-accent) 13%,white);
  --forest:color-mix(in srgb,var(--apgc-accent) 36%,#131a23);
  --forest-dark:color-mix(in srgb,var(--apgc-accent) 23%,#131a23);
}
:root[data-apgc-theme="custom"] :is(.lime-light,.brand-greeting) { background:var(--lime-soft); }
:root[data-apgc-theme="custom"] .workspace-choice-icon { background:var(--lime); }
.theme-color-inputs { display:grid; grid-template-columns:68px minmax(0,1fr); gap:8px; }
.theme-color-inputs input[type="color"] { width:100%; cursor:pointer; padding:4px; }
.appearance-note { grid-column:1 / -1; }
@media (max-width:500px) { .theme-color-inputs { grid-column:1 / -1; } }

:root[data-apgc-theme="custom"] :is(.sign-in,.waiting-card,.workspace-button) {
  background:linear-gradient(110deg,var(--lime),color-mix(in srgb,var(--apgc-gradient-end,var(--apgc-accent)) 60%,white));
}
.appearance-picker { grid-column:1 / -1; min-width:0; margin:0; padding:12px; border:1px solid #e4e8de; border-radius:16px; background:#fff; }
.picker-modes { display:grid; grid-template-columns:1fr 1fr; margin-bottom:12px; }
.picker-modes label { position:relative; text-align:center; cursor:pointer; }
.picker-modes input { position:absolute; width:1px; height:1px; opacity:0; padding:0; }
.picker-modes span { padding:8px; border-bottom:3px solid #e9ede4; }
.picker-modes input:checked + span { border-color:var(--forest); color:var(--forest-dark); }
.picker-modes input:focus-visible + span { outline:2px solid var(--forest); }
.picker-plane { position:relative; height:112px; border-radius:12px; touch-action:none; cursor:crosshair; background:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,var(--picker-hue,red)); }
.picker-plane span { position:absolute; transform:translate(-50%,-50%); width:17px; height:17px; border:2px solid white; border-radius:50%; box-shadow:0 0 0 1px #20274480; pointer-events:none; }
#picker-hue { width:100%; height:16px; min-height:0; margin:12px 0; padding:0; appearance:none; border:0; border-radius:999px; background:linear-gradient(90deg,red,#ff0,lime,cyan,blue,magenta,red); cursor:pointer; }
#picker-hue::-webkit-slider-thumb { appearance:none; width:18px; height:18px; border:3px solid white; border-radius:50%; background:#263128; box-shadow:0 0 0 1px #263128; }
#picker-hue::-moz-range-thumb { width:14px; height:14px; border:3px solid white; border-radius:50%; background:#263128; box-shadow:0 0 0 1px #263128; }
.picker-preview { height:26px; border-radius:8px; margin-bottom:8px; }
.picker-stops { display:flex; gap:7px; margin-bottom:10px; }
.picker-stops button { padding:5px 8px; border:1px solid #dce1d5; border-radius:8px; background:#fff; color:var(--ink); }
.picker-stops button[aria-pressed="true"] { border-color:var(--forest); font-weight:700; }
.picker-stops button::before { content:""; display:inline-block; width:12px; height:12px; margin-right:5px; vertical-align:-2px; border-radius:50%; background:var(--stop-color); border:1px solid #20274433; }
.picker-hex-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; align-items:end; }
.picker-hex-row input[type="color"] { width:76px; cursor:pointer; padding:4px; }

#welcome-period-icon { display:block; font-size:30px; line-height:1.3; margin:6px auto; }

.greeting-emoji-toolbar { display:flex; justify-content:flex-end; margin:5px 0 10px; }
.greeting-emoji-toolbar .button { min-height:30px; padding:5px 10px; font-size:12px; }
.greeting-emoji-panel { width:100%; min-width:0; padding:10px; margin:0 0 10px; border:1px solid #dce1d5; border-radius:14px; background:var(--lime-soft); }
.emoji-panel-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.emoji-panel-heading strong { font-size:13px; }
.emoji-panel-heading .button { min-height:28px; font-size:11px; }
.greeting-emoji-panel p { margin:10px 0 5px; color:var(--muted); font-size:11px; }
.greeting-emoji-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(34px,1fr)); gap:3px; }
.greeting-emoji-grid button { display:grid; place-items:center; min-width:0; min-height:36px; border:0; border-radius:8px; background:transparent; font-size:24px; padding:2px; cursor:pointer; }
.greeting-emoji-grid button:hover { background:var(--paper); }
.greeting-emoji-grid button:focus-visible { outline:2px solid var(--forest); outline-offset:1px; }

.brand-wrap { display:flex; align-items:center; gap:12px; min-width:0; max-width:100%; }
.photo-preview-trigger { display:flex; align-items:center; flex:none; border:0; padding:0; background:transparent; border-radius:16px; cursor:zoom-in; }
.photo-preview-trigger:focus-visible { outline:2px solid var(--forest); outline-offset:4px; }
#profile-photo-dialog { width:min(760px,calc(100% - 24px)); max-height:calc(100dvh - 32px); padding:14px; border:0; border-radius:20px; background:var(--paper); }
.photo-preview-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.photo-preview-head h2 { min-width:0; overflow-wrap:anywhere; font-size:18px; }
.photo-preview-head .icon-button { flex:none; width:36px; height:36px; background:var(--lime-soft); }
#profile-photo-full { display:block; width:100%; max-height:calc(100dvh - 130px); object-fit:contain; border-radius:12px; }
#profile-photo-dialog::backdrop { background:#151b30b8; }
#profile-photo-error { padding:24px 12px; color:var(--muted); text-align:center; }
@media(max-width:520px) { .brand-wrap { gap:9px; } }

/* Dashboard portrait: shared by both workspaces. */
.profile-overview { grid-template-columns: 210px minmax(0, 1.28fr) minmax(0, 1fr); }
.dashboard-profile-card { position: relative; display: block; min-width: 0; min-height: 260px; overflow: hidden; border: 1px solid #e8ebe3; border-radius: var(--radius); padding: 0; background: var(--lime); color: white; text-align: left; font: inherit; isolation: isolate; box-shadow: 0 3px 12px #18251b0b; }
button.dashboard-profile-card { cursor: pointer; }
.dashboard-profile-card > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform .25s ease; }
button.dashboard-profile-card:hover > img { transform: scale(1.035); }
.dashboard-profile-card:focus-visible { outline: 3px solid var(--lime); outline-offset: 4px; }
.profile-card-caption { position: absolute; inset: auto 0 0; display: flex; flex-direction: column; gap: 5px; padding: 55px 18px 20px; background: linear-gradient(transparent, #101c24e8); }
.profile-card-caption > small { font-size: 9px; font-weight: 650; letter-spacing: .15em; color: #ffffffc9; }
.profile-card-caption > strong { font-size: 23px; line-height: 1.15; overflow-wrap: anywhere; }
.profile-card-caption > span { font-size: 12px; color: #ffffffdf; }
.profile-card-caption .profile-card-preview { margin-top: 7px; font-size: 11px; display: flex; justify-content: space-between; }
.profile-card-initials { position: absolute; inset: 12% 0 auto; text-align: center; font-size: 72px; font-weight: 750; color: #183f25; }
.profile-overview .hero-value { font-size: clamp(28px, 3.65vw, 58px); }
.profile-overview .waiting-card .hero-value { font-size: clamp(26px, 3.2vw, 50px); }
@media (max-width: 1100px) and (min-width: 701px) {
  .profile-overview { grid-template-columns: 190px minmax(0, 1fr); }
  .profile-overview .dashboard-profile-card { grid-row: span 2; }
}
@media (max-width: 700px) {
  .profile-overview { grid-template-columns: minmax(0, 1fr); }
  .dashboard-profile-card { min-height: 240px; }
  .dashboard-profile-card > img { object-position: center 38%; }
  .profile-card-caption { padding: 55px 22px 20px; }
  .profile-card-caption > strong { font-size: 25px; }
  .profile-overview .hero-value { font-size: clamp(31px, 8vw, 48px); }
  .profile-overview .waiting-card .hero-value { font-size: clamp(28px, 7.5vw, 42px); }
}
@media (prefers-reduced-motion: reduce) { .dashboard-profile-card > img { transition: none; } }
