:root {
  color-scheme: light;
  --bg: #eef2f4;
  --ink: #182126;
  --muted: #69777f;
  --line: #d9e1e5;
  --panel: #fbfcfd;
  --panel-strong: #ffffff;
  --teal: #0f8b8d;
  --green: #18a558;
  --blue: #2563eb;
  --coral: #e05d4f;
  --amber: #d99825;
  --expense: #e4572e;
  --shadow: 0 22px 60px rgba(23, 36, 42, 0.12);
}

html {
  scrollbar-gutter: stable;
}

* {
  box-sizing: border-box;
}

[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(15, 139, 141, 0.14), transparent 32rem),
    linear-gradient(135deg, #f7fafb 0%, var(--bg) 46%, #e8edef 100%);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.auth-gate {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 1.25rem;
}

.auth-card {
  display: grid;
  width: min(27rem, 100%);
  gap: 1.35rem;
  border: 1px solid rgba(24, 33, 38, 0.08);
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, 0.94);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.auth-brand h1,
.auth-brand p,
.auth-form h2,
.auth-form p {
  margin: 0;
}

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

.auth-form > div:first-child {
  display: grid;
  gap: 0.35rem;
}

.auth-form p,
.auth-checking {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.auth-message,
.app-auth-confirm-message {
  min-height: 1.15rem;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 750;
}

.metric-card strong,
.balance-label,
.expense-amount,
.office-card-totals,
.target-card-totals {
  font-variant-numeric: tabular-nums;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.app-shell {
  display: grid;
  grid-template-columns: 18rem minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.25rem;
  border-right: 1px solid rgba(24, 33, 38, 0.08);
  background: rgba(251, 252, 253, 0.78);
  backdrop-filter: blur(22px);
}

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

.brand-mark {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border-radius: 0.9rem;
  background: var(--ink);
  color: white;
  font-weight: 800;
}

.brand h1,
.brand p,
.topbar h2,
.topbar p,
.panel h3,
.panel p,
.modal h3 {
  margin: 0;
}

.brand h1 {
  font-size: 1rem;
}

.brand p,
.eyebrow {
  color: var(--muted);
  font-size: 0.78rem;
}

.primary-action,
.submit-button {
  display: inline-flex;
  min-height: 2.8rem;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border: 0;
  border-radius: 0.6rem;
  background: var(--ink);
  color: #fff;
  font-weight: 750;
  box-shadow: 0 12px 28px rgba(24, 33, 38, 0.18);
}

.primary-action span {
  font-size: 1.35rem;
  line-height: 1;
}

.main-nav {
  display: grid;
  gap: 0.45rem;
}

.session-panel,
.bootstrap-notice {
  display: grid;
  gap: 0.7rem;
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.68);
  padding: 0.8rem;
}

.session-panel > div,
.bootstrap-notice {
  min-width: 0;
}

.session-panel small,
.bootstrap-notice span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.session-panel strong {
  display: block;
  overflow: hidden;
  margin-top: 0.15rem;
  font-size: 0.84rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bootstrap-notice {
  border-color: rgba(217, 152, 37, 0.34);
  background: rgba(217, 152, 37, 0.08);
}

.bootstrap-notice strong {
  color: #925f0b;
  font-size: 0.8rem;
}

.expense-subnav, .user-subnav { display: none; gap: .2rem; margin: -.25rem 0 .25rem; padding-left: .75rem; }
body[data-page="expenses"] .expense-subnav { display: grid; }
body[data-page="users"] .user-subnav { display: grid; }
.expense-subnav-item, .user-subnav-item { min-height: 2.15rem; border: 0; border-left: 2px solid var(--line); background: transparent; color: var(--muted); padding: 0 .75rem; text-align: left; font-size: .8rem; font-weight: 750; }
.expense-subnav-item:hover, .expense-subnav-item.active, .user-subnav-item:hover, .user-subnav-item.active { border-left-color: var(--teal); color: var(--teal); }

.main-nav-item {
  min-height: 2.65rem;
  border: 1px solid transparent;
  border-radius: 0.58rem;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
  text-align: left;
  padding: 0 0.85rem;
}

.main-nav-item:hover,
.main-nav-item.active {
  border-color: var(--line);
  background: #fff;
}

.office-list {
  display: grid;
  gap: 0.5rem;
  overflow: auto;
}

.office-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.8rem;
  border: 1px solid transparent;
  border-radius: 0.7rem;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.office-main {
  min-width: 0;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
}

.office-item:hover,
.office-item.active {
  border-color: var(--line);
  background: var(--panel-strong);
}

.office-item strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.office-item span {
  color: var(--muted);
  font-size: 0.8rem;
}

.office-tools {
  display: flex;
  gap: 0.25rem;
}

.icon-button,
.mini-button {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: #fff;
  color: var(--ink);
}

.boss-access-panel {
  display: grid;
  gap: 0.75rem;
  border: 1px solid rgba(15, 139, 141, 0.22);
  border-radius: 0.85rem;
  background: rgba(15, 139, 141, 0.055);
  padding: 0.85rem;
}

.boss-access-panel[hidden] {
  display: none;
}

.mini-button.copy-success {
  border-color: rgba(35, 159, 91, 0.35);
  background: rgba(35, 159, 91, 0.1);
  color: #159447;
}

.workspace {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
  padding: 1.25rem;
}

.page {
  display: none;
}

.page.active {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.topbar h2 {
  margin-top: 0.15rem;
  font-size: 2.25rem;
  letter-spacing: 0;
}

.filters,
.inline-fields,
.modal-actions {
  display: flex;
  gap: 0.75rem;
  align-items: end;
}

.filters label {
  min-width: 8rem;
}

.filters label:first-child {
  min-width: 14rem;
}

label {
  display: grid;
  gap: 0.4rem;
}

label span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.office-picker-field {
  display: grid;
  gap: 0.4rem;
}

.office-picker-field > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 0.58rem;
  background: #fff;
  color: var(--ink);
  padding: 0 0.8rem;
  outline: 0;
}

input:focus,
select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(15, 139, 141, 0.12);
}

.ghost-button {
  min-height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 0.58rem;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  padding: 0 0.9rem;
  font-weight: 700;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.metric-card {
  position: relative;
  overflow: hidden;
  min-height: 8rem;
  padding: 1rem;
  border: 1px solid rgba(24, 33, 38, 0.08);
  border-radius: 0.5rem;
  background: var(--panel);
  box-shadow: 0 12px 38px rgba(24, 33, 38, 0.06);
}

.metric-card::after {
  position: absolute;
  right: -2rem;
  bottom: -2.5rem;
  width: 8rem;
  height: 8rem;
  border-radius: 2rem;
  content: "";
  transform: rotate(18deg);
}

.metric-card.trx::after {
  background: rgba(224, 93, 79, 0.2);
}

.metric-card.usdt::after {
  background: rgba(24, 165, 88, 0.2);
}

.metric-card.usdt-live-card {
  border-color: transparent;
  color: var(--panel);
  background:
    radial-gradient(circle at 14% 8%, rgba(46, 213, 173, 0.2), transparent 38%),
    linear-gradient(135deg, #102a2d 0%, #0d4d49 58%, #126c63 100%);
}

.metric-card.usdt-live-card::after {
  content: none;
}

.metric-card.usdt-live-card span {
  color: var(--panel);
}

.usdt-live-card em,
.paid-expenses-card em {
  position: absolute;
  z-index: 3;
  right: 1rem;
  bottom: 1rem;
  padding: 0.5rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 850;
}

.crypto-symbol-cloud {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.crypto-symbol-cloud i {
  position: absolute;
  color: rgba(255, 255, 255, 0.07);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 3.5rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  transform: rotate(-12deg);
}

.crypto-symbol-cloud i:nth-child(1) { top: -0.5rem; right: 7%; font-size: 6rem; }
.crypto-symbol-cloud i:nth-child(2) { top: 0.5rem; right: 31%; font-size: 2rem; transform: rotate(16deg); }
.crypto-symbol-cloud i:nth-child(3) { right: 18%; bottom: -1rem; font-size: 4rem; transform: rotate(9deg); }
.crypto-symbol-cloud i:nth-child(4) { top: 0.8rem; left: 52%; font-size: 2.8rem; }
.crypto-symbol-cloud i:nth-child(5) { left: 42%; bottom: -1.8rem; font-size: 4.5rem; transform: rotate(18deg); }

.metric-card.offices::after {
  background: rgba(37, 99, 235, 0.18);
}

.metric-card.paid-expenses-card {
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
  background:
    radial-gradient(circle at 88% 16%, rgba(255, 255, 255, 0.2), transparent 31%),
    linear-gradient(135deg, #3f474c 0%, #626d73 54%, #899398 100%);
  box-shadow: 0 14px 34px rgba(42, 50, 54, 0.2);
}

.metric-card.paid-expenses-card::after { content: none; }
.metric-card.paid-expenses-card > span,
.metric-card.paid-expenses-card > small { color: rgba(255, 255, 255, 0.76); }
.paid-expenses-card em { background: rgba(23, 30, 34, 0.24); }

.paid-expenses-art {
  position: absolute;
  right: 5.1rem;
  bottom: 1rem;
  display: flex;
  height: 4.9rem;
  align-items: end;
  gap: 0.4rem;
  opacity: 0.2;
  pointer-events: none;
}

.paid-expenses-art i {
  display: block;
  width: 1.05rem;
  border-radius: 0.35rem 0.35rem 0.12rem 0.12rem;
  background: #fff;
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.2);
}

.paid-expenses-art i:nth-child(1) { height: 35%; }
.paid-expenses-art i:nth-child(2) { height: 62%; }
.paid-expenses-art i:nth-child(3) { height: 94%; }

.metric-card.wallets::after {
  background: rgba(217, 152, 37, 0.22);
}

.metric-card.total-target-card {
  border-color: rgba(100, 129, 255, 0.22);
  color: #fff;
  background:
    radial-gradient(circle at 18% -20%, rgba(112, 229, 255, 0.38), transparent 42%),
    linear-gradient(135deg, #26366f 0%, #3a5ba9 52%, #518fc4 100%);
  box-shadow: 0 14px 34px rgba(40, 71, 145, 0.22);
}

.metric-card.total-target-card::after {
  content: none;
}

.metric-card.total-target-card > span { color: rgba(255, 255, 255, 0.76); }

.metric-card.run-total-card {
  border-color: transparent;
  color: #fff;
  background:
    radial-gradient(circle at 85% 8%, rgba(255, 255, 255, 0.18), transparent 32%),
    linear-gradient(135deg, #303b42 0%, #53636a 55%, #75858a 100%);
  box-shadow: 0 14px 34px rgba(39, 49, 54, 0.2);
  transition: background 180ms ease, box-shadow 180ms ease;
}

.metric-card.run-total-card.positive {
  background:
    radial-gradient(circle at 85% 8%, rgba(155, 255, 214, 0.2), transparent 32%),
    linear-gradient(135deg, #134b3b 0%, #197052 55%, #2f9470 100%);
  box-shadow: 0 14px 34px rgba(20, 100, 73, 0.24);
}

.metric-card.run-total-card.negative {
  background:
    radial-gradient(circle at 85% 8%, rgba(255, 202, 175, 0.2), transparent 32%),
    linear-gradient(135deg, #6f2c2a 0%, #a84639 55%, #d2674d 100%);
  box-shadow: 0 14px 34px rgba(133, 53, 45, 0.24);
}

.metric-card.run-total-card.unavailable {
  opacity: 0.8;
}

.metric-card.run-total-card::after { content: none; }
.metric-card.run-total-card > span,
.metric-card.run-total-card > small { color: rgba(255, 255, 255, 0.78); }
.metric-card.run-total-card > small {
  position: relative;
  z-index: 2;
  display: block;
  max-width: calc(100% - 3.6rem);
  margin-top: 0.55rem;
  overflow: hidden;
  font-size: 0.72rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-total-card em {
  position: absolute;
  z-index: 3;
  right: 1rem;
  bottom: 1rem;
  min-width: 2rem;
  padding: 0.45rem 0.6rem;
  border-radius: 999px;
  background: rgba(20, 28, 32, 0.25);
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 900;
  text-align: center;
}

.run-filter-art {
  position: absolute;
  top: 0.7rem;
  right: 0.8rem;
  z-index: 0;
  display: flex;
  align-items: center;
  opacity: 0.16;
  pointer-events: none;
  transform: rotate(-8deg);
}

.run-filter-art svg {
  width: 3.5rem;
  height: 3.5rem;
  margin-left: -1.35rem;
  fill: none;
  stroke: #fff;
  stroke-linejoin: round;
  stroke-width: 4;
}

.run-filter-art svg:nth-child(2) { transform: translateY(1.5rem) scale(0.82); }
.run-filter-art svg:nth-child(3) { transform: translateY(3rem) scale(0.64); }

.target-card-art {
  position: absolute;
  top: -3.3rem;
  right: -1.4rem;
  width: 10.5rem;
  height: 10.5rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  pointer-events: none;
}

.target-card-art::before,
.target-card-art::after,
.target-card-art i {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  content: "";
}

.target-card-art::before { inset: 1.5rem; }
.target-card-art::after { inset: 3rem; background: rgba(255, 255, 255, 0.06); }
.target-card-art i:nth-child(1) { inset: 4.15rem; background: rgba(255, 255, 255, 0.18); }
.target-card-art i:nth-child(2) {
  top: 53%;
  left: -2rem;
  width: 13rem;
  height: 1px;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.1);
}
.target-card-art i:nth-child(3) {
  top: -1rem;
  left: 50%;
  width: 1px;
  height: 13rem;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.1);
}
.target-card-art > b {
  position: absolute;
  right: 4.4rem;
  bottom: 3.5rem;
  width: 4.6rem;
  height: 0.32rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 2.8rem -1.8rem 0 -0.06rem rgba(255, 255, 255, 0.24);
  transform: rotate(-34deg);
}

.total-target-card .target-progress {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  height: 0.5rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.total-target-card .target-progress span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff756f 0%, #ff9e67 48%, #ffe275 65%, #63e1c2 100%);
}

.total-target-card .target-reticle {
  position: absolute;
  right: 0.65rem;
  bottom: 0.42rem;
  z-index: 2;
  display: grid;
  width: 1.75rem;
  height: 1.75rem;
  place-items: center;
  border: 2px solid var(--panel);
  border-radius: 50%;
  background: #16995a;
  color: var(--panel);
  box-shadow: 0 8px 20px rgba(22, 153, 90, 0.28);
}

.total-target-card .target-reticle::before,
.total-target-card .target-reticle::after {
  position: absolute;
  background: currentColor;
  content: "";
}

.total-target-card .target-reticle::before {
  width: 0.9rem;
  height: 2px;
}

.total-target-card .target-reticle::after {
  width: 2px;
  height: 0.9rem;
}

.total-target-card .target-reticle b {
  width: 0.5rem;
  height: 0.5rem;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.metric-card span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.metric-card strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 1.4rem;
  font-size: 2.15rem;
  line-height: 1;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(18rem, 24rem) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.balances-wallet-center {
  width: 100%;
  max-width: 96rem;
  margin: 0 auto;
}

.office-management-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(20rem, 1fr));
  gap: 1rem;
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
  align-items: start;
}

.office-management-list {
  max-height: calc(100vh - 17rem);
  padding: 0.75rem;
}

.office-add-button {
  min-height: 2.35rem;
  padding: 0 0.85rem;
  box-shadow: none;
}

.panel {
  border: 1px solid rgba(24, 33, 38, 0.08);
  border-radius: 0.5rem;
  background: rgba(251, 252, 253, 0.86);
  box-shadow: var(--shadow);
}

.panel-heading {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid var(--line);
}

.panel h3 {
  margin-top: 0.15rem;
  font-size: 1.05rem;
}

.wallet-form {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
}

.inline-fields {
  align-items: stretch;
}

.inline-fields label {
  flex: 1;
  min-width: 0;
}

.balance-note {
  border: 1px dashed var(--line);
  border-radius: 0.58rem;
  background: rgba(15, 139, 141, 0.07);
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
  padding: 0.8rem;
}

.search-box {
  width: min(17rem, 44%);
}

.wallet-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
}

.wallet-heading-actions .search-box {
  width: 17rem;
}

.office-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(238, 245, 247, 0.52);
}

.office-table-toolbar[hidden] {
  display: none;
}

.office-table-filter-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.office-table-office-filter {
  width: min(22rem, 100%);
}

.office-table-office-filter summary {
  min-height: 2.45rem;
}

.office-summary-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  margin: 0.8rem 0.8rem 0;
  border-bottom: 1px solid var(--line);
  padding: 0 1rem 0.55rem;
}

.office-summary-header[hidden] {
  display: none;
}

.office-summary-header-totals {
  display: grid;
  grid-template-columns: 21rem 9rem 11rem 9rem;
  gap: 0.75rem;
  align-items: center;
}

.office-summary-sort-button {
  min-width: 0;
  min-height: 1.8rem;
  border: 0;
  border-radius: 0.4rem;
  background: transparent;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
}

.office-summary-sort-button:hover,
.office-summary-sort-button.active {
  background: rgba(15, 139, 141, 0.08);
  color: var(--teal);
}

.office-summary-sort-button span {
  display: inline-block;
  min-width: 0.8rem;
  margin-left: 0.25rem;
  font-size: 0.8rem;
}

.office-name-sort {
  justify-self: start;
  text-align: left;
}

.target-delta-reset-button {
  display: flex;
  min-height: 2.7rem;
  align-items: center;
  gap: 0.65rem;
  border: 0;
  border-radius: 0.55rem;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-weight: 850;
  padding: 0.4rem 0.5rem 0.4rem 0.8rem;
  white-space: nowrap;
}

.positive-target-total {
  display: grid;
  min-height: 2.7rem;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  column-gap: 0.55rem;
  align-items: center;
  border: 1px solid rgba(24, 165, 88, 0.28);
  border-radius: 0.55rem;
  background: linear-gradient(135deg, rgba(24, 165, 88, 0.08), rgba(24, 165, 88, 0.14));
  color: var(--green);
  padding: 0.35rem 0.75rem 0.35rem 0.45rem;
  white-space: nowrap;
}

.positive-target-total i {
  display: grid;
  grid-row: 1 / 3;
  width: 1.9rem;
  height: 1.9rem;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 1rem;
  font-style: normal;
  font-weight: 900;
}

.positive-target-total span {
  align-self: end;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1;
}

.positive-target-total strong {
  align-self: start;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.target-delta-reset-button strong {
  min-width: 4.75rem;
  border-radius: 0.38rem;
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  padding: 0.35rem 0.45rem;
  text-align: center;
}

.target-delta-reset-button:hover:not(:disabled) {
  background: var(--teal);
}

.target-delta-reset-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.wallet-sync-timer {
  display: grid;
  gap: 0.45rem;
  margin: 0.8rem 0.8rem 0;
  border: 1px solid rgba(15, 139, 141, 0.2);
  border-radius: 0.55rem;
  background: rgba(15, 139, 141, 0.06);
  padding: 0.7rem 0.8rem;
}

.sync-monitor {
  margin: 0.8rem 0.8rem 0;
  overflow: hidden;
  border: 1px solid rgba(15, 139, 141, 0.2);
  border-radius: 0.58rem;
  background: rgba(15, 139, 141, 0.035);
}

.sync-monitor-toggle {
  display: flex;
  width: 100%;
  min-height: 2.75rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0.65rem 0.8rem;
  text-align: left;
}

.sync-monitor-toggle > span {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 0.75rem;
}

.sync-monitor-toggle strong {
  font-size: 0.82rem;
  white-space: nowrap;
}

.sync-monitor-toggle small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sync-monitor-toggle i {
  display: grid;
  flex: 0 0 1.8rem;
  width: 1.8rem;
  height: 1.8rem;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 0.75rem;
  font-style: normal;
}

.sync-monitor-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  padding: 0 0.8rem 0.8rem;
}

.sync-monitor-body[hidden] {
  display: none;
}

.sync-monitor .wallet-sync-timer {
  min-width: 0;
  margin: 0;
}

.sync-monitor.collapsed .sync-monitor-toggle {
  min-height: 2.45rem;
}

.wallet-sync-timer-head {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 750;
}

.wallet-sync-timer-head strong {
  color: var(--teal);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.wallet-sync-progress {
  overflow: hidden;
  height: 0.42rem;
  border-radius: 999px;
  background: rgba(15, 139, 141, 0.14);
}

.wallet-sync-progress span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f8b8d, #4eb9b4);
  transition: width 0.4s linear;
}

.wallet-sync-timer small {
  color: var(--muted);
  font-size: 0.72rem;
}

.wallet-sync-timer.syncing .wallet-sync-progress span {
  width: 100% !important;
  animation: wallet-sync-pulse 1s ease-in-out infinite alternate;
}

.wallet-sync-timer.warning {
  border-color: rgba(224, 93, 79, 0.28);
  background: rgba(224, 93, 79, 0.06);
}

.wallet-sync-timer.warning .wallet-sync-timer-head strong,
.wallet-sync-timer.warning small {
  color: var(--coral);
}

@keyframes wallet-sync-pulse {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

.wallet-table {
  display: grid;
  gap: 0.55rem;
  padding: 0.8rem;
}

.office-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: #fff;
}

.office-card-head {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  background: transparent;
  color: var(--ink);
  padding: 1rem;
  text-align: left;
}

.office-card-identity {
  display: grid;
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
}

.office-number-badge {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  border: 1px solid rgba(24, 165, 88, 0.34);
  border-radius: 50%;
  background: linear-gradient(135deg, #20aa65, #118b55);
  color: #fff;
  box-shadow: 0 7px 18px rgba(24, 165, 88, 0.2);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.office-card-head strong,
.office-card-head span {
  display: block;
}

.office-card-head strong {
  overflow: hidden;
  font-size: 1.02rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.office-card-head span {
  color: var(--muted);
  font-size: 0.8rem;
}

.office-card-totals {
  display: grid;
  grid-template-columns: 21rem 9rem 11rem 9rem 1.7rem;
  gap: 0.75rem;
  align-items: center;
}

.target-live-group {
  display: grid;
  grid-template-columns: 7rem 13.5rem;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.target-delta {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.target-delta.empty {
  visibility: hidden;
}

.target-delta.negative {
  color: var(--coral);
}

.office-card-totals span {
  display: flex;
  min-height: 2.35rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: #f8fafb;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  padding: 0 0.65rem;
  white-space: nowrap;
}

.office-card-totals .office-summary-value {
  display: flex;
  min-height: 2.35rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: #f8fafb;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  padding: 0 0.65rem;
  white-space: nowrap;
}

.office-card-totals .office-summary-value:hover,
.office-card-totals .office-summary-value.active {
  box-shadow: 0 0 0 3px rgba(15, 139, 141, 0.1);
  transform: translateY(-1px);
}

.office-card-totals .office-summary-value b {
  color: var(--ink);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.office-card-totals b {
  color: var(--ink);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.office-card-totals .sheet-target-value {
  width: 100%;
  border-color: rgba(24, 165, 88, 0.28);
  background: rgba(24, 165, 88, 0.1);
  color: var(--green);
}

.office-card-totals .sheet-target-value b {
  color: var(--green);
}

.office-card-totals .sheet-target-value.warning {
  border-color: rgba(224, 93, 79, 0.3);
  background: rgba(224, 93, 79, 0.08);
  color: var(--coral);
}

.office-card-totals .sheet-target-value.warning b {
  color: var(--coral);
  font-size: 0.82rem;
}

.office-card-totals .office-expense-total {
  border-color: rgba(228, 87, 46, 0.38);
  background: rgba(228, 87, 46, 0.1);
  color: var(--expense);
}

.office-card-totals .office-expense-total.active {
  border-color: var(--expense);
  background: rgba(228, 87, 46, 0.16);
}

.office-card-totals .office-expense-total b {
  color: var(--expense);
}

.office-card-totals .office-target-gap.positive {
  border-color: rgba(24, 165, 88, 0.3);
  background: rgba(24, 165, 88, 0.08);
  color: var(--green);
}

.office-card-totals .office-target-gap.positive b {
  color: var(--green);
}

.office-card-totals .office-target-gap.negative {
  border-color: rgba(224, 93, 79, 0.32);
  background: rgba(224, 93, 79, 0.08);
  color: var(--coral);
}

.office-card-totals .office-target-gap.negative b {
  color: var(--coral);
}

.office-card-totals .office-target-gap.neutral,
.office-card-totals .office-target-gap.unavailable {
  color: var(--muted);
}

.office-card-totals .office-usdt-total.active {
  border-color: var(--teal);
  background: rgba(15, 139, 141, 0.1);
  color: var(--teal);
}

.office-card-details {
  display: grid;
  gap: 0.5rem;
  border-top: 1px solid var(--line);
  background: #f8fafb;
  padding: 0.75rem;
}

.office-card:not(.expanded) .office-card-details {
  display: none;
}

.office-wallet-row {
  display: grid;
  grid-template-columns: minmax(13rem, 1.4fr) repeat(2, minmax(7rem, 0.55fr)) auto;
  gap: 0.7rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: #fff;
  padding: 0.75rem;
}

.office-card-empty {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 0.6rem 0.2rem;
}

.office-expense-breakdown-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-radius: 0.5rem;
  background: rgba(228, 87, 46, 0.07);
  padding: 0.75rem 0.85rem;
}

.office-expense-breakdown-head > div {
  display: grid;
  gap: 0.2rem;
}

.office-expense-breakdown-head span,
.office-expense-category-row small {
  color: var(--muted);
  font-size: 0.7rem;
}

.office-expense-breakdown-head > b {
  color: var(--expense);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.office-expense-category-list {
  display: grid;
  gap: 0.45rem;
}

.office-expense-category-columns,
.office-expense-category-row {
  display: grid;
  grid-template-columns: minmax(10rem, 1.4fr) minmax(8rem, 0.55fr) minmax(10rem, 0.7fr) minmax(9rem, auto);
  gap: 0.8rem;
  align-items: center;
}

.office-expense-category-columns {
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.85rem;
  text-transform: uppercase;
}

.office-expense-category-columns span:not(:first-child) {
  text-align: right;
}

.office-expense-category-row {
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: #fff;
  padding: 0.7rem 0.85rem;
}

.office-expense-percentage {
  display: grid;
  justify-items: end;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.office-expense-percentage > small {
  display: none;
}

.office-expense-category-row > b {
  color: var(--expense);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.wallet-row {
  display: grid;
  grid-template-columns: minmax(13rem, 1.35fr) minmax(9rem, 0.8fr) repeat(2, minmax(7rem, 0.55fr)) auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: #fff;
}

.wallet-row.header {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.wallet-title {
  min-width: 0;
}

.wallet-title strong,
.wallet-title span,
.wallet-cell span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-title span,
.wallet-cell small {
  color: var(--muted);
  font-size: 0.78rem;
}

.wallet-title .wallet-source-badge {
  display: inline-flex;
  width: fit-content;
  margin-top: 0.3rem;
  border: 1px solid rgba(15, 139, 141, 0.24);
  border-radius: 999px;
  background: rgba(15, 139, 141, 0.09);
  color: var(--teal);
  padding: 0.18rem 0.48rem;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
}

.wallet-cell .sync-error {
  color: var(--coral);
  font-weight: 750;
}

.balance-label {
  display: flex;
  min-height: 2.25rem;
  align-items: center;
  justify-content: flex-end;
  border-radius: 0.45rem;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  line-height: 1;
  padding: 0 0.2rem;
  white-space: nowrap;
}

.row-actions {
  display: flex;
  gap: 0.35rem;
}

.google-panel {
  overflow: hidden;
}

.google-sheet-list {
  display: grid;
  gap: 0.75rem;
  padding: 0.8rem;
}

.google-sheet-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: #fff;
}

.google-sheet-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem;
}

.google-sheet-head strong,
.google-sheet-head span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.google-sheet-head span {
  color: var(--muted);
  font-size: 0.78rem;
}

.google-sheet-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.google-preview {
  overflow: auto;
  border-top: 1px solid var(--line);
  background: #f8fafb;
  padding: 0.5rem;
}

.google-preview-row {
  display: grid;
  min-width: max-content;
}

.google-preview-row span {
  overflow: hidden;
  min-height: 2rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.78rem;
  padding: 0.45rem 0.55rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.google-preview-row:first-child span {
  background: rgba(15, 139, 141, 0.09);
  font-weight: 800;
}

.google-preview-empty {
  border-top: 1px solid var(--line);
  background: #f8fafb;
  color: var(--muted);
  font-size: 0.86rem;
  padding: 0.85rem;
}

.target-list {
  display: grid;
  gap: 0.75rem;
  padding: 0.8rem;
}

.target-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: #fff;
}

.target-card-head {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 1rem;
  text-align: left;
}

.target-card-head strong,
.target-card-head span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.target-card-head span {
  color: var(--muted);
  font-size: 0.8rem;
}

.target-card-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(7rem, auto)) 1.7rem;
  gap: 0.65rem;
  align-items: center;
}

.target-card-totals span {
  display: flex;
  min-height: 2.35rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: #f8fafb;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  padding: 0 0.65rem;
}

.target-card-totals b {
  color: var(--ink);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.target-card-totals i {
  display: grid;
  width: 1.7rem;
  height: 1.7rem;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-style: normal;
  line-height: 1;
}

.target-card-links {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  padding: 0 1rem 0.85rem;
}

.target-card-links a {
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.target-card-links a:hover {
  text-decoration: underline;
}

.target-sections {
  display: grid;
  gap: 0.5rem;
  border-top: 1px solid var(--line);
  background: #f8fafb;
  padding: 0.75rem;
}

.target-card:not(.expanded) .target-sections {
  display: none;
}

.target-section-row {
  display: grid;
  grid-template-columns: minmax(14rem, 1fr) minmax(8rem, 0.45fr) minmax(8rem, 0.45fr) minmax(10rem, 0.65fr);
  gap: 0.75rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: #fff;
  padding: 0.75rem;
}

.target-section-main {
  min-width: 0;
}

.target-section-main strong,
.target-section-main span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.target-section-main span,
.target-section-number small {
  color: var(--muted);
  font-size: 0.78rem;
}

.target-section-number {
  display: grid;
  gap: 0.25rem;
  text-align: right;
}

.target-section-number b {
  font-variant-numeric: tabular-nums;
}

.target-progress {
  display: grid;
  gap: 0.4rem;
}

.target-progress span {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
  text-align: right;
}

.target-progress div {
  overflow: hidden;
  height: 0.55rem;
  border-radius: 999px;
  background: #e3eaee;
}

.target-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  padding: 3rem 1rem;
  text-align: center;
}

.empty-state p {
  max-width: 31rem;
  color: var(--muted);
}

.empty-art {
  display: grid;
  grid-template-columns: repeat(3, 2.5rem);
  gap: 0.45rem;
  align-items: end;
  height: 4.4rem;
}

.empty-art span {
  display: block;
  border-radius: 0.45rem;
}

.empty-art span:nth-child(1) {
  height: 2.6rem;
  background: var(--teal);
}

.empty-art span:nth-child(2) {
  height: 4.1rem;
  background: var(--coral);
}

.empty-art span:nth-child(3) {
  height: 3.2rem;
  background: var(--amber);
}

.modal {
  width: min(30rem, calc(100vw - 2rem));
  border: 0;
  border-radius: 0.8rem;
  padding: 0;
  box-shadow: var(--shadow);
}

.user-modal {
  width: min(50rem, calc(100vw - 2rem));
}

.modal::backdrop {
  background: rgba(24, 33, 38, 0.34);
  backdrop-filter: blur(6px);
}

.modal form {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
}

.user-permission-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.checkbox-option {
  display: flex;
  min-width: 0;
  min-height: 3.25rem;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: #fff;
  padding: 0.65rem 0.75rem;
  cursor: pointer;
}

.checkbox-option > input {
  width: 1rem;
  min-width: 1rem;
  height: 1rem;
  min-height: 1rem;
  margin: 0;
  padding: 0;
  accent-color: var(--teal);
  box-shadow: none;
}

.checkbox-option > span {
  color: var(--ink);
  font-size: 0.76rem;
  line-height: 1.25;
}

.checkbox-option:has(input:checked) {
  border-color: rgba(15, 139, 141, 0.58);
  background: rgba(15, 139, 141, 0.055);
}

.app-auth-panel {
  display: grid;
  gap: 0.85rem;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 0.85rem;
  background: rgba(37, 99, 235, 0.045);
  padding: 0.9rem;
}

.app-auth-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.app-auth-heading > div {
  display: grid;
  gap: 0.2rem;
}

.app-auth-heading span {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.4;
}

.app-auth-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #eef1f5;
  color: var(--muted) !important;
  padding: 0.3rem 0.55rem;
  font-size: 0.68rem !important;
  font-weight: 850;
}

.app-auth-badge.ready {
  background: rgba(24, 165, 88, 0.12);
  color: #13753f !important;
}

.app-auth-reset {
  width: max-content;
  max-width: 100%;
}

.authenticator-setup {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: 1rem;
  border-top: 1px solid rgba(37, 99, 235, 0.16);
  padding-top: 0.9rem;
}

.authenticator-setup > img {
  width: 11rem;
  height: 11rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: #fff;
  padding: 0.4rem;
}

.authenticator-setup-copy {
  display: grid;
  align-content: start;
  gap: 0.6rem;
}

.authenticator-setup-copy > span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.authenticator-setup-copy > code {
  overflow-wrap: anywhere;
  border: 1px dashed rgba(37, 99, 235, 0.32);
  border-radius: 0.55rem;
  background: #fff;
  padding: 0.65rem;
  color: #214fbe;
  font-size: 0.78rem;
  font-weight: 750;
}

.add-expense-button { min-height: 2.9rem; padding: 0 1rem; }
.metric-card small { display: block; margin-top: .45rem; color: var(--muted); font-size: .78rem; }
.metric-card .metric-text { max-width: 85%; font-size: 1.45rem; line-height: 1.2; }
.expense-total {
  border-color: transparent;
  color: #fff;
  background:
    radial-gradient(circle at 88% 12%, rgba(80, 231, 210, 0.24), transparent 34%),
    linear-gradient(135deg, #123c3b 0%, #126f70 56%, #1c9996 100%);
  box-shadow: 0 14px 34px rgba(16, 100, 99, 0.2);
}
.expense-total::after { content: none; }
.expense-total span, .expense-total small { color: rgba(255,255,255,.76); }
.expense-total-art {
  position: absolute;
  top: 0.55rem;
  right: 0.85rem;
  z-index: 0;
  width: 5.6rem;
  height: 5.6rem;
  opacity: 0.14;
  pointer-events: none;
  transform: rotate(8deg);
}
.expense-total-art svg {
  width: 100%;
  height: 100%;
  fill: rgba(255, 255, 255, 0.12);
  stroke: #fff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}
.expense-operation-card {
  border-color: transparent;
  color: #fff;
  background:
    radial-gradient(circle at 88% 16%, rgba(167, 213, 255, 0.24), transparent 34%),
    linear-gradient(135deg, #273746 0%, #3f5c72 55%, #6f8fa3 100%);
  box-shadow: 0 14px 34px rgba(39, 67, 86, 0.2);
}
.expense-operation-card::after { content: none; }
.expense-operation-card > span,
.expense-operation-card > small { color: rgba(255, 255, 255, 0.76); }
.expense-operation-card > span {
  position: relative;
  z-index: 2;
  display: block;
  max-width: calc(100% - 3.5rem);
}
.expense-operation-art {
  position: absolute;
  top: 1.05rem;
  right: 1rem;
  z-index: 0;
  display: grid;
  width: 4.8rem;
  gap: 0.55rem;
  opacity: 0.18;
  pointer-events: none;
}
.expense-operation-art i {
  display: block;
  height: 0.82rem;
  border-radius: 999px;
  background:
    radial-gradient(circle at 0.42rem 50%, #fff 0 0.28rem, transparent 0.3rem),
    linear-gradient(90deg, transparent 0 1.15rem, #fff 1.15rem 100%);
}
.expense-operation-art i:nth-child(2) { width: 82%; margin-left: 18%; }
.expense-operation-art i:nth-child(3) { width: 64%; margin-left: 36%; }
.expense-top-category-card {
  border-color: transparent;
  color: #fff;
  background:
    radial-gradient(circle at 87% 12%, rgba(255, 206, 224, 0.24), transparent 34%),
    linear-gradient(135deg, #513346 0%, #80536a 55%, #ad7485 100%);
  box-shadow: 0 14px 34px rgba(92, 51, 72, 0.2);
}
.expense-top-category-card::after { content: none; }
.expense-top-category-card > span,
.expense-top-category-card > small { color: rgba(255, 255, 255, 0.76); }
.expense-top-category-card > .metric-text {
  position: relative;
  z-index: 2;
  max-width: calc(100% - 4.4rem);
  color: #fff;
}
.expense-top-category-art {
  position: absolute;
  top: 0.7rem;
  right: 0.8rem;
  z-index: 0;
  width: 5.3rem;
  height: 5.3rem;
  opacity: 0.16;
  pointer-events: none;
  transform: rotate(5deg);
}
.expense-top-category-art svg {
  width: 100%;
  height: 100%;
  fill: rgba(255, 255, 255, 0.08);
  stroke: #fff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}
.pending-expenses-card {
  border-color: rgba(217, 152, 37, 0.35);
  background:
    radial-gradient(circle at 86% 18%, rgba(255, 255, 255, 0.7), transparent 30%),
    linear-gradient(135deg, #fff8e8 0%, #f8e4b8 100%);
  box-shadow: 0 12px 38px rgba(154, 101, 12, 0.1);
}
.pending-expenses-card::after { content: none; }
.pending-expenses-card > strong {
  color: #a76508;
}
.pending-expense-wait {
  position: relative;
  z-index: 2;
  display: flex !important;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
}
.pending-expense-wait span {
  color: #8b6a35;
  font-size: 0.7rem;
}
.pending-expense-wait b {
  padding: 0.22rem 0.42rem;
  border: 1px solid rgba(167, 101, 8, 0.18);
  border-radius: 0.38rem;
  background: rgba(255, 255, 255, 0.58);
  color: #8c5408;
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
}
.pending-expense-clock-art {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 3.7rem;
  height: 3.7rem;
  border: 0.28rem solid rgba(167, 101, 8, 0.12);
  border-radius: 50%;
  pointer-events: none;
}
.pending-expense-clock-art::before,
.pending-expense-clock-art::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.18rem;
  border-radius: 999px;
  background: rgba(167, 101, 8, 0.22);
  content: "";
  transform-origin: 50% 100%;
}
.pending-expense-clock-art::before {
  height: 1rem;
  transform: translate(-50%, -100%) rotate(25deg);
}
.pending-expense-clock-art::after {
  height: 1.35rem;
  transform: translate(-50%, -100%) rotate(120deg);
}
.pending-expense-clock-art i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: rgba(167, 101, 8, 0.3);
  transform: translate(-50%, -50%);
}
.expense-panel { overflow: hidden; }
.expense-toolbar { display: grid; grid-template-columns: repeat(10,minmax(7rem,1fr)); align-items: end; gap: .65rem; padding: .8rem; border-bottom: 1px solid var(--line); }
.expense-search { width: auto; }
.expense-toolbar .expense-search { grid-column: span 2; }
.expense-period-filter { gap: .3rem; }
.expense-office-filter { min-width: 9rem; }
.expense-office-filter summary { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.expense-office-filter .office-picker-options { min-width: 13rem; }
.expense-table-wrap { overflow-x: auto; }
.expense-pagination { display: flex; align-items: center; justify-content: flex-end; gap: .75rem; border-top: 1px solid var(--line); padding: .8rem 1rem; background: #fbfcfc; }
.expense-pagination[hidden] { display: none; }
.expense-pagination > span { min-width: 7rem; color: var(--muted); font-size: .82rem; font-weight: 750; text-align: center; }
.expense-pagination label { display: flex; align-items: center; gap: .45rem; color: var(--muted); font-size: .78rem; font-weight: 700; }
.expense-pagination select { min-width: 4.5rem; }
.expense-table { width: 100%; min-width: 75rem; border-collapse: collapse; }
.expense-table th { color: var(--muted); font-size: .72rem; text-align: left; text-transform: uppercase; letter-spacing: .04em; padding: .75rem 1rem; background: #f6f8f9; }
.expense-sort-button { display: inline-flex; align-items: center; gap: .35rem; border: 0; padding: 0; background: transparent; color: inherit; font: inherit; font-weight: 800; letter-spacing: inherit; text-transform: inherit; white-space: nowrap; cursor: pointer; }
.expense-sort-button:hover, .expense-sort-button.active { color: var(--teal); }
.expense-sort-button span { min-width: .8rem; font-size: .8rem; text-align: center; }
.expense-table td { border-top: 1px solid var(--line); padding: .9rem 1rem; font-size: .86rem; vertical-align: middle; }
.expense-table td strong, .expense-table td small { display: block; }
.expense-table td small { margin-top: .2rem; color: var(--muted); }
.expense-date-cell { min-width: 12rem; }
.expense-date-time { display: flex; align-items: baseline; gap: .45rem; white-space: nowrap; }
.expense-date-time span { color: var(--muted); font-size: .78rem; }
.expense-table tbody tr:hover { background: rgba(15,139,141,.035); }
.expense-category-row { background: var(--category-row-bg); }
.expense-table tbody tr.expense-category-row:hover { background: var(--category-row-hover); }
.expense-category-label { display: inline-flex; align-items: center; gap: .45rem; border: 1px solid var(--category-border); border-radius: 999px; background: var(--category-bg); padding: .35rem .6rem; color: var(--category-ink); font-weight: 800; white-space: nowrap; }
.expense-category-icon { display: inline-flex; width: 1rem; height: 1rem; }
.expense-category-icon svg, .directory-icon svg { width: 100%; height: 100%; }
.office-chip { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; background: #fff; padding: .3rem .55rem; font-size: .76rem; font-weight: 800; }
.office-chip-list { display: flex; flex-wrap: wrap; gap: .35rem; }
.expense-amount { font-size: .95rem !important; font-weight: 850; white-space: nowrap; }
.expense-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: .55rem; white-space: nowrap; }
.pay-expense-button { min-height: 2rem; border: 1px solid rgba(15,139,141,.35); border-radius: .5rem; padding: 0 .75rem; background: rgba(15,139,141,.09); color: var(--teal); font-size: .72rem; font-weight: 850; letter-spacing: .02em; }
.pay-expense-button:hover { background: var(--teal); color: white; }
.pay-expense-button:disabled { border-color: var(--line); background: #f0f3f4; color: var(--muted); cursor: not-allowed; }
.payment-modal { width: min(46rem, calc(100vw - 2rem)); }
.payment-modal form { gap: 1.1rem; padding: 1.25rem; }
.payment-expense-summary { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: .75rem; padding: 1rem; border-radius: .8rem; background: var(--bg); }
.payment-expense-summary div { display: grid; min-width: 0; gap: .25rem; }
.payment-expense-summary span { color: var(--muted); font-size: .72rem; }
.payment-expense-summary b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.payment-step-title { display: flex; align-items: center; gap: .55rem; margin-bottom: .55rem; }
.payment-step-title > span { display: inline-flex; border-radius: 999px; background: var(--ink); color: white; padding: .25rem .55rem; font-size: .68rem; font-weight: 850; text-transform: uppercase; }
.payment-step-title > b { font-size: .9rem; }
.payment-methods { display: grid; grid-template-columns: 1fr; gap: .65rem; }
.payment-method-card { display: grid; grid-template-columns: auto 2.4rem minmax(0,1fr) 1.7rem; min-height: 4.5rem; align-items: center; gap: .8rem; border: 1px solid var(--line); border-radius: .8rem; padding: .8rem 1rem; cursor: pointer; }
.payment-method-card > input { width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--teal); }
.payment-method-card:has(input:checked) { border-color: var(--teal); background: rgba(15,139,141,.06); box-shadow: 0 0 0 3px rgba(15,139,141,.08); }
.payment-method-card .payment-method-number { display: grid; width: 2.4rem; height: 2.4rem; place-items: center; border-radius: .65rem; background: var(--bg); color: var(--ink); font-size: .9rem; font-weight: 900; }
.payment-method-card .payment-method-copy { display: flex; min-width: 0; flex-direction: column; gap: .22rem; color: var(--ink); font-size: .88rem; }
.payment-method-copy b { font-size: .9rem; }
.payment-method-copy small { display: block; color: var(--muted); font-size: .76rem; font-weight: 600; }
.payment-method-check { visibility: hidden; color: var(--teal) !important; font-size: 1rem !important; font-weight: 900; }
.payment-method-card:has(input:checked) .payment-method-check { visibility: visible; }
.payment-section-heading { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .65rem; }
.payment-section-heading small { color: var(--muted); font-size: .72rem; }
.payment-wallet-options { display: grid; gap: .55rem; max-height: 19rem; overflow: auto; }
.payment-wallet-option { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: .9rem; border: 1px solid var(--line); border-radius: .7rem; padding: .85rem; cursor: pointer; }
.payment-wallet-option > input { width: 1rem; height: 1rem; accent-color: var(--teal); }
.payment-wallet-option:has(input:checked) { border-color: var(--teal); background: rgba(15,139,141,.05); }
.payment-wallet-option > span { display: grid; min-width: 0; gap: .2rem; }
.payment-wallet-option code { overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.payment-wallet-option small { color: var(--muted); font-size: .7rem; }
.payment-wallet-option > strong { text-align: right; white-space: nowrap; }
.payment-placeholder { display: grid; gap: .35rem; border: 1px dashed var(--line); border-radius: .65rem; padding: 1rem; color: var(--muted); }
.payment-placeholder b { color: var(--ink); }
.manual-payment-warning { border-color: rgba(217,152,37,.38); background: rgba(217,152,37,.07); }
.payment-verification-status { min-height: 1.2rem; color: var(--coral); font-size: .8rem; font-weight: 700; }
.payment-verification-status.success { color: var(--green); }
.approval-status { display: inline-flex; align-items: center; border-radius: 999px; padding: .35rem .55rem; font-size: .74rem; font-weight: 800; white-space: nowrap; }
.approval-status.approved { background: rgba(24,165,88,.11); color: var(--green); }
.approval-status.approved[href] { text-decoration: none; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(24,165,88,.2); }

.analytics-page { --analytics-orange: #f04b55; --analytics-blue: #2563eb; --analytics-green: #55ad42; --analytics-purple: #7c3aed; background: #f7f8fb; }
.analytics-topbar { align-items: end; }
.analytics-topbar h2 { font-size: 1.55rem; letter-spacing: -.025em; }
.analytics-subtitle { margin: .2rem 0 0; color: var(--muted); font-size: .68rem; }
.analytics-filters label:first-child { min-width: 8rem; }
.analytics-offices-panel { padding: 1rem; }
.analytics-report-period { border: 1px solid var(--line); border-radius: 999px; background: #f7f9fa; color: var(--muted); padding: .42rem .7rem; font-size: .72rem; font-weight: 800; white-space: nowrap; }
.analytics-report-metrics { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: .55rem; margin-bottom: .8rem; }
.analytics-report-metric { position: relative; display: grid; min-width: 0; gap: .2rem; overflow: hidden; border: 1px solid #edf0f4; border-radius: .28rem; background: #fff; padding: .78rem .85rem; box-shadow: 0 3px 12px rgba(30,41,59,.035); }
.analytics-report-metric::before { display: grid; width: 1.65rem; height: 1.65rem; place-items: center; border-radius: 50%; background: color-mix(in srgb,var(--report-accent) 11%,#fff); color: var(--report-accent); content: "↗"; font-size: .75rem; font-weight: 900; }
.analytics-report-metric span { color: var(--muted); font-size: .7rem; font-weight: 800; }
.analytics-report-metric strong { overflow: hidden; color: var(--report-accent); font-size: 1.2rem; text-overflow: ellipsis; white-space: nowrap; }
.analytics-report-metric small { color: var(--muted); font-size: .64rem; font-weight: 750; }
.analytics-report-metric.target { --report-accent:#d39a28; }
.analytics-report-metric.target::before { content:"◇"; }
.analytics-report-metric.expenses { --report-accent:var(--analytics-blue); }
.analytics-report-metric.expenses::before { content:"▣"; }
.analytics-report-metric.balance { --report-accent:var(--analytics-orange); }
.analytics-report-metric.balance::before { content:"⌁"; }
.analytics-report-metric.work { --report-accent:var(--analytics-green); }
.analytics-report-metric.work::before { content:"↗"; }
.analytics-report-metric.operations { --report-accent:#ef4655; }
.analytics-report-metric.operations::before { content:"△"; }
.analytics-reference-reports { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(18rem,.7fr); gap: .65rem; margin-bottom: .8rem; }
.analytics-reference-card { overflow: hidden; border: 1px solid #edf0f4; border-radius: .28rem; background: #fff; }
.analytics-reference-heading,.analytics-section-title { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .68rem .8rem; }
.analytics-reference-heading { border-bottom: 1px solid #edf0f4; }
.analytics-reference-heading strong,.analytics-section-title strong { font-size: .72rem; letter-spacing: .025em; }
.analytics-reference-heading span,.analytics-section-title span { color: var(--muted); font-size: .62rem; font-weight: 750; }
.analytics-financial-summary { display: grid; padding: .35rem .8rem .55rem; }
.analytics-financial-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid #f0f2f5; padding: .48rem 0; font-size: .7rem; }
.analytics-financial-row:last-child { border-bottom: 0; }
.analytics-financial-row strong { font-size: .72rem; white-space: nowrap; }
.analytics-financial-row.expense strong { color: var(--analytics-orange); }
.analytics-financial-row.balance strong { color: var(--analytics-green); }
.analytics-financial-row.work strong,.analytics-financial-row.percent strong { color: var(--analytics-blue); }
.analytics-office-ranking { display: grid; max-height: 13.5rem; overflow-y: auto; padding: .35rem .8rem .55rem; }
.analytics-office-ranking > div { display: grid; grid-template-columns: minmax(4rem,.65fr) minmax(5rem,1fr) 3.6rem; align-items: center; gap: .55rem; padding: .42rem 0; font-size: .66rem; }
.analytics-office-ranking > div > span { overflow: hidden; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.analytics-office-ranking i { height: .34rem; overflow: hidden; border-radius: 999px; background: #e8edf2; }
.analytics-office-ranking i b { display: block; height: 100%; border-radius: inherit; background: var(--analytics-blue); }
.analytics-office-ranking strong { text-align: right; }
.analytics-section-title { padding: .15rem 0 .55rem; }
.analytics-report-table-wrap { overflow-x: auto; border: 1px solid #edf0f4; border-radius: .28rem; }
.analytics-report-table { width: 100%; min-width: 58rem; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.analytics-report-table th { color: var(--muted); background: #f6f8f9; font-size: .66rem; text-align: right; text-transform: uppercase; letter-spacing: .035em; }
.analytics-report-table th:first-child,.analytics-report-table td:first-child { text-align: left; }
.analytics-report-table th,.analytics-report-table td { padding: .78rem .9rem; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.analytics-report-table td { font-size: .78rem; font-weight: 750; }
.analytics-report-table td:first-child strong { font-size: .82rem; }
.analytics-report-table small { color: var(--muted); font-size: .58rem; }
.analytics-report-table .analytics-report-expense { color: var(--analytics-orange); }
.analytics-report-table .analytics-report-work { color: var(--analytics-blue); }
.analytics-report-table tfoot th { border-bottom: 0; background: #eef2f4; color: var(--ink); font-size: .72rem; }
.analytics-coverage { display: grid; grid-template-columns: minmax(4.5rem,1fr) 3.6rem; align-items: center; gap: .5rem; }
.analytics-coverage > span { height: .42rem; overflow: hidden; border-radius: 999px; background: #e6ebee; }
.analytics-coverage > span b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--analytics-blue),#63a4ff); }
.analytics-coverage.complete > span b { background: linear-gradient(90deg,var(--analytics-green),#55ca8b); }
.analytics-coverage.empty > span b { width: 0 !important; }
.analytics-coverage strong { font-size: .68rem; }
.analytics-report-note { margin: .7rem .1rem 0; color: var(--muted); font-size: .68rem; }
.analytics-grid { display: grid; grid-template-columns: minmax(0,1.05fr) minmax(0,1.35fr); gap: .65rem; }
.analytics-card { min-width: 0; padding: 1rem; }
.analytics-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.analytics-card-heading h3 { margin-top: .15rem; font-size: 1.05rem; }
.analytics-chart-key { color: var(--analytics-orange); font-size: .72rem; font-weight: 750; white-space: nowrap; }
.analytics-category-content { display: grid; grid-template-columns: minmax(10rem,15rem) minmax(0,1fr); align-items: center; gap: 1.25rem; min-height: 19rem; }
.analytics-donut { display: grid; width: min(15rem,100%); aspect-ratio: 1; place-items: center; justify-self: center; border-radius: 50%; background: conic-gradient(#e8edef 0 100%); }
.analytics-donut::after { grid-area: 1/1; width: 58%; aspect-ratio: 1; border-radius: 50%; background: #fff; content: ""; box-shadow: 0 0 0 1px rgba(24,33,38,.04); }
.analytics-donut > div { z-index: 1; grid-area: 1/1; max-width: 52%; text-align: center; }
.analytics-donut strong,.analytics-donut span { display: block; }
.analytics-donut strong { overflow: hidden; font-size: 1.05rem; text-overflow: ellipsis; }
.analytics-donut span { margin-top: .2rem; color: var(--muted); font-size: .7rem; }
.analytics-legend { display: grid; gap: .65rem; }
.analytics-legend > div { display: grid; grid-template-columns: .7rem minmax(0,1fr) auto; align-items: center; gap: .55rem; }
.analytics-legend i { width: .65rem; height: .65rem; border-radius: 50%; background: var(--analytics-color); }
.analytics-legend span b,.analytics-legend span small { display: block; }
.analytics-legend span b { overflow: hidden; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.analytics-legend span small { color: var(--muted); font-size: .68rem; }
.analytics-legend strong { font-size: .75rem; white-space: nowrap; }
.analytics-bars { display: grid; min-height: 19rem; grid-template-columns: repeat(6,1fr); align-items: end; gap: .8rem; padding: .5rem .4rem 0; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to bottom,transparent 0,transparent calc(25% - 1px),rgba(24,33,38,.06) 25%); }
.analytics-bar-column { display: grid; height: 100%; grid-template-rows: 1.3rem 1fr 1.6rem; align-items: end; text-align: center; }
.analytics-bar-column > strong { overflow: hidden; color: var(--analytics-orange); font-size: .65rem; text-overflow: ellipsis; }
.analytics-bar-column > div { display: flex; height: 100%; align-items: end; justify-content: center; }
.analytics-bar-column i { display: block; width: min(3.4rem,70%); min-height: .18rem; border-radius: .35rem .35rem 0 0; background: linear-gradient(180deg,#ff7a25,var(--analytics-orange)); box-shadow: 0 6px 14px rgba(255,104,21,.15); }
.analytics-bar-column > span { align-self: center; color: var(--muted); font-size: .72rem; font-weight: 750; }
.analytics-office-category-card { grid-column: 1 / 2; }
.analytics-office-category-list { display: grid; gap: .15rem; }
.analytics-office-category-row { display: grid; grid-template-columns: minmax(6rem,.7fr) minmax(12rem,2fr) auto; align-items: center; gap: .85rem; padding: .65rem 0; border-bottom: 1px solid var(--line); }
.analytics-office-category-row:last-child { border-bottom: 0; }
.analytics-office-category-name strong,.analytics-office-category-name small { display: block; }
.analytics-office-category-name strong { font-size: .8rem; }
.analytics-office-category-name small { color: var(--muted); font-size: .64rem; }
.analytics-office-category-chart > div { display: flex; height: .7rem; overflow: hidden; border-radius: 999px; background: #e9edef; }
.analytics-office-category-chart > div > i { min-width: 2px; height: 100%; background: var(--analytics-color); }
.analytics-office-category-chart > div > i.empty { width: 100% !important; min-width: 100%; background: #e9edef; }
.analytics-office-category-chart > small { display: flex; flex-wrap: wrap; gap: .35rem .65rem; margin-top: .4rem; color: var(--muted); font-size: .58rem; }
.analytics-office-category-chart > small span { display: inline-flex; align-items: center; gap: .25rem; }
.analytics-office-category-chart > small i { width: .42rem; height: .42rem; border-radius: 50%; background: var(--analytics-color); }
.analytics-office-category-chart > small b { color: var(--ink); font-size: inherit; }
.analytics-office-category-total { font-size: .76rem; white-space: nowrap; }
.analytics-office-category-total small { color: var(--muted); font-size: .58rem; }
.analytics-status-list { display: grid; gap: 1rem; padding-top: .5rem; }
.analytics-status-row { display: grid; gap: .55rem; }
.analytics-status-row > div { display: grid; grid-template-columns: .7rem minmax(0,1fr) auto; align-items: center; gap: .65rem; }
.analytics-status-row > div > i { width: .7rem; height: .7rem; border-radius: 50%; background: var(--analytics-green); }
.analytics-status-row.pending > div > i { background: var(--analytics-orange); }
.analytics-status-row span b,.analytics-status-row span small { display: block; }
.analytics-status-row span small,.analytics-status-row strong small { color: var(--muted); font-size: .7rem; }
.analytics-status-row > span { height: .65rem; overflow: hidden; border-radius: 999px; background: #e9edef; }
.analytics-status-row > span b { height: 100%; border-radius: inherit; background: var(--analytics-green); }
.analytics-status-row.pending > span b { background: var(--analytics-orange); }
.analytics-status-row em { color: var(--muted); font-size: .7rem; font-style: normal; text-align: right; }
.analytics-history-card { padding: 1rem; }
.analytics-history-wrap { overflow-x: auto; border: 1px solid #edf0f4; border-radius: .28rem; }
.analytics-history-table { width: 100%; min-width: 52rem; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.analytics-history-table th { background: #f7f8fb; color: var(--muted); font-size: .64rem; text-align: left; text-transform: uppercase; letter-spacing: .035em; }
.analytics-history-table th,.analytics-history-table td { padding: .68rem .8rem; border-bottom: 1px solid var(--line); }
.analytics-history-table tr:last-child td { border-bottom: 0; }
.analytics-history-table td { max-width: 18rem; overflow: hidden; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.analytics-history-table td:nth-last-child(-n+2) { text-align: right; }
.analytics-history-status { display: inline-flex; border-radius: 999px; padding: .25rem .48rem; font-size: .62rem; font-weight: 850; }
.analytics-history-status.paid { background: rgba(85,173,66,.1); color: var(--analytics-green); }
.analytics-history-status.pending { background: rgba(240,75,85,.1); color: var(--analytics-orange); }

@media (max-width: 1180px) {
  .analytics-report-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .analytics-reference-reports { grid-template-columns: 1fr; }
  .analytics-grid { grid-template-columns: 1fr; }
  .analytics-office-category-card { grid-column: auto; }
}
@media (max-width: 720px) {
  .analytics-topbar,.analytics-filters { align-items: stretch; flex-direction: column; }
  .analytics-filters label,.analytics-filters label:first-child { min-width: 0; }
  .analytics-card-heading { flex-direction: column; }
  .analytics-report-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .analytics-category-content { grid-template-columns: 1fr; }
  .analytics-bars { gap: .25rem; min-height: 15rem; }
  .analytics-office-category-row { grid-template-columns: 1fr; gap: .45rem; }
  .analytics-office-category-total { justify-self: end; }
}

/* Reference-based reporting layout */
.analytics-page { --report-blue:#2878ee; --report-green:#2fac38; --report-orange:#f0a000; --report-red:#ed1c24; gap: .65rem; background: #fff; }
.analytics-title { padding: .2rem .1rem .15rem; }
.analytics-title h2 { margin: 0; font-size: 1.72rem; letter-spacing: -.035em; }
.analytics-title p { margin: .18rem 0 0; color: #56607a; font-size: .7rem; font-weight: 650; }
.analytics-kpis { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: .7rem; }
.analytics-kpi { display: grid; min-width: 0; grid-template-columns: 2rem minmax(0,1fr); gap: .12rem .55rem; border: 1px solid #e8ebf0; border-radius: .45rem; background: #fff; padding: .85rem .9rem; box-shadow: 0 4px 14px rgba(24,33,38,.035); }
.analytics-kpi i { display: grid; grid-row: 1 / 2; width: 1.75rem; height: 1.75rem; place-items: center; border-radius: 50%; background: color-mix(in srgb,var(--kpi-color) 9%,#fff); color: var(--kpi-color); font-size: 1rem; font-style: normal; font-weight: 900; }
.analytics-kpi span { align-self: center; overflow: hidden; font-size: .68rem; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.analytics-kpi strong { grid-column: 1 / -1; margin-top: .35rem; color: var(--kpi-color); font-size: clamp(1.05rem,1.55vw,1.45rem); line-height: 1; letter-spacing: -.025em; white-space: nowrap; }
.analytics-kpi small { grid-column: 1 / -1; margin-top: .38rem; color: #394257; font-size: .62rem; font-weight: 750; }
.analytics-kpi.target { --kpi-color:var(--report-orange); }
.analytics-kpi.balance { --kpi-color:var(--report-blue); }
.analytics-kpi.expenses,.analytics-kpi.work { --kpi-color:var(--report-red); }
.analytics-kpi.paid { --kpi-color:var(--report-green); }
.analytics-report-row { display: grid; gap: .7rem; }
.analytics-main-reports { grid-template-columns: minmax(20rem,.68fr) minmax(30rem,1fr); }
.analytics-detail-reports { grid-template-columns: minmax(18rem,.55fr) minmax(30rem,1.45fr); }
.analytics-box { min-width: 0; overflow: hidden; border: 1px solid #e8ebf0; border-radius: .45rem; background: #fff; box-shadow: 0 4px 14px rgba(24,33,38,.025); }
.analytics-box-title { display: flex; min-height: 2.2rem; align-items: center; justify-content: space-between; gap: .75rem; padding: .62rem .85rem .35rem; }
.analytics-box-title h3 { margin: 0; font-size: .76rem; letter-spacing: .015em; }
.analytics-box-title span { color: #31394b; font-size: .64rem; font-weight: 750; }
.analytics-report-filters { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .55rem; padding: 0 .75rem .55rem; }
.analytics-report-filters label { position: relative; }
.analytics-report-filters label > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.analytics-report-filters select { min-height: 2rem; border-radius: .35rem; padding: .35rem .55rem; font-size: .66rem; font-weight: 750; }
.analytics-simple-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.analytics-simple-table th { background: #fafbfc; color: #262d3c; font-size: .59rem; text-align: left; }
.analytics-simple-table th,.analytics-simple-table td { height: 1.75rem; border-top: 1px solid #edf0f4; padding: .34rem .78rem; }
.analytics-simple-table td { font-size: .64rem; }
.analytics-simple-table th:last-child,.analytics-simple-table td:last-child { text-align: right; }
.analytics-financial-row strong { font-size: .66rem; }
.analytics-financial-row.expense strong,.analytics-financial-row.work strong { color: var(--report-red); }
.analytics-financial-row.paid strong,.analytics-financial-row.balance strong { color: var(--report-green); }
.analytics-financial-row.percent strong { color: var(--report-blue); }
.analytics-office-report-layout { display: grid; grid-template-columns: minmax(0,1fr) 11.5rem; border-top: 1px solid #edf0f4; }
.analytics-office-report-table-wrap { max-height: 15.4rem; overflow-y: auto; }
.analytics-office-report-table th,.analytics-office-report-table td { padding-right: .5rem; padding-left: .5rem; }
.analytics-office-report-table td:not(:first-child),.analytics-office-report-table th:not(:first-child) { text-align: right; }
.analytics-office-report-table td:first-child { display: flex; align-items: center; gap: .35rem; font-weight: 800; }
.analytics-office-dot { display: grid; flex: 0 0 1.15rem; height: 1.15rem; place-items: center; border-radius: 50%; background: var(--report-blue); color: #fff; font-size: .5rem; }
.analytics-positive { color: var(--report-green); font-weight: 800; }
.analytics-office-highlights { display: grid; align-content: start; border-left: 1px solid #edf0f4; padding: .35rem .65rem; }
.analytics-office-highlights > div { display: grid; grid-template-columns: 1.8rem minmax(0,1fr); align-items: center; gap: .55rem; border-bottom: 1px solid #edf0f4; padding: .55rem 0; }
.analytics-office-highlights > div:last-child { border-bottom: 0; }
.analytics-office-highlights i { display: grid; width: 1.65rem; height: 1.65rem; place-items: center; border-radius: .32rem; background: #f5f8ff; color: var(--report-blue); font-style: normal; }
.analytics-office-highlights .trophy i::after { content:"◆"; color:var(--report-orange); }
.analytics-office-highlights .gift i::after { content:"✚"; color:var(--report-green); }
.analytics-office-highlights .wallet i::after { content:"▣"; }
.analytics-office-highlights .chart i::after { content:"◕"; }
.analytics-office-highlights span { min-width: 0; }
.analytics-office-highlights small,.analytics-office-highlights strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.analytics-office-highlights small { color: #667085; font-size: .56rem; }
.analytics-office-highlights strong { margin-top: .15rem; font-size: .65rem; }
.analytics-wallet-report .analytics-simple-table tbody { display: table-row-group; }
.analytics-wallet-report .analytics-simple-table { display: table; }
.analytics-wallet-report tbody { max-height: 11rem; overflow-y: auto; }
.analytics-wallet-report tfoot th { color: var(--report-blue); font-size: .64rem; }
.analytics-category-featured { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: .5rem; padding: .25rem .75rem .55rem; }
.analytics-category-featured > div { display: grid; justify-items: center; gap: .12rem; border: 1px solid #e8ebf0; border-radius: .35rem; padding: .45rem .35rem; text-align: center; }
.analytics-category-featured i { display: grid; width: 1.8rem; height: 1.8rem; place-items: center; color: var(--analytics-color); font-style: normal; }
.analytics-category-featured i svg { width: 1.45rem; height: 1.45rem; }
.analytics-category-featured span { overflow: hidden; max-width: 100%; font-size: .56rem; text-overflow: ellipsis; white-space: nowrap; }
.analytics-category-featured strong { font-size: .67rem; }
.analytics-category-featured small { color: #56607a; font-size: .54rem; }
.analytics-category-bars { display: grid; gap: .36rem; padding: .35rem .8rem .55rem; }
.analytics-category-bars > div { display: grid; grid-template-columns: minmax(5.5rem,.65fr) minmax(8rem,1.45fr) 7.2rem; align-items: center; gap: .55rem; font-size: .59rem; }
.analytics-category-bars > div > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.analytics-category-bars i { height: .35rem; overflow: hidden; border-radius: 999px; background: #edf0f4; }
.analytics-category-bars i b { display: block; height: 100%; border-radius: inherit; background: var(--analytics-color,var(--report-blue)); }
.analytics-category-bars strong { text-align: right; white-space: nowrap; }
.analytics-category-bars small { color: #56607a; font-size: .52rem; }
.analytics-category-total { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #edf0f4; padding: .65rem .85rem; font-size: .72rem; font-weight: 850; }
.analytics-category-total strong { color: var(--report-red); }
.analytics-history-card { padding: 0; }
.analytics-history-wrap { overflow-x: auto; border: 0; border-radius: 0; }
.analytics-history-table th,.analytics-history-table td { padding: .5rem .7rem; font-size: .6rem; }
.analytics-history-table th { background: #fafbfc; }

@media (max-width: 1250px) {
  .analytics-kpis { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .analytics-main-reports,.analytics-detail-reports { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .analytics-kpis { grid-template-columns: 1fr; }
  .analytics-office-report-layout { grid-template-columns: 1fr; }
  .analytics-office-highlights { grid-template-columns: repeat(2,minmax(0,1fr)); border-top: 1px solid #edf0f4; border-left: 0; }
  .analytics-category-featured { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .analytics-category-bars > div { grid-template-columns: minmax(4.5rem,.7fr) 1fr; }
  .analytics-category-bars strong { grid-column: 2; }
}
.approval-status.approved[href]:hover { background: rgba(24,165,88,.2); }
.approval-status.pending { background: rgba(217,152,37,.12); color: #a66c09; }
.expense-empty { display: grid; justify-items: center; gap: .4rem; padding: 4rem 1rem; color: var(--muted); text-align: center; }
.expense-empty[hidden] { display: none; }
.expense-empty span { display: grid; width: 3.2rem; height: 3.2rem; place-items: center; border-radius: 50%; background: rgba(15,139,141,.1); color: var(--teal); font-size: 1.5rem; }
.expense-empty strong { color: var(--ink); }
.expense-empty p { margin: 0; font-size: .86rem; }
.expense-modal { width: min(44rem, calc(100vw - 2rem)); }
.expense-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .85rem; }
.expense-note-field { grid-column: 1 / -1; }
textarea { width: 100%; resize: vertical; border: 1px solid var(--line); border-radius: .58rem; background: #fff; color: var(--ink); padding: .75rem .8rem; font: inherit; outline: 0; }
textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(15,139,141,.12); }
.danger-button { margin-right: auto; color: var(--coral); }
.approval-toggle { align-content: end; }
.toggle-control { display: flex; min-height: 2.75rem; align-items: center; gap: .65rem; color: var(--ink); cursor: pointer; }
.toggle-control input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.toggle-control i { position: relative; width: 2.6rem; height: 1.45rem; border-radius: 999px; background: #cfd8dc; transition: .2s; }
.toggle-control i::after { position: absolute; top: .2rem; left: .2rem; width: 1.05rem; height: 1.05rem; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.2); content: ""; transition: .2s; }
.toggle-control input:checked + i { background: var(--green); }
.toggle-control input:checked + i::after { transform: translateX(1.15rem); }
.toggle-control b { font-size: .82rem; }
.directory-view { display: grid; gap: 1.25rem; }
.directory-panel { overflow: hidden; }
.directory-add-form { display: grid; grid-template-columns: minmax(12rem, 1fr) auto; gap: .65rem; padding: 1rem; border-bottom: 1px solid var(--line); }
.directory-add-form .submit-button { padding: 0 1rem; }
.directory-list { display: grid; gap: .5rem; padding: .8rem; }
.directory-entry { display: grid; gap: .4rem; }
.directory-row { display: flex; min-height: 3.5rem; align-items: center; justify-content: space-between; gap: 1rem; border: 1px solid var(--category-border, var(--line)); border-radius: .55rem; background: var(--category-bg, #fff); padding: .6rem .75rem; }
.directory-row > div { display: flex; align-items: center; gap: .65rem; }
.directory-icon { display: grid; width: 2rem; height: 2rem; place-items: center; border-radius: .5rem; background: rgba(255,255,255,.68); color: var(--category-ink, var(--teal)); padding: .38rem; font-weight: 900; }
.category-palette { display: grid; grid-template-columns: minmax(9rem,.22fr) minmax(0,1fr); align-items: center; gap: 1rem; margin: 0 .45rem; border: 1px solid var(--line); border-radius: .7rem; background: #fff; padding: .8rem; box-shadow: 0 10px 24px rgba(65,48,38,.08); }
.category-palette[hidden] { display: none; }
.category-palette-heading { display: grid; gap: .2rem; }
.category-palette-heading span { color: var(--ink); font-size: .8rem; font-weight: 850; }
.category-palette-heading small { color: var(--muted); font-size: .68rem; }
.category-palette-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(7.6rem,1fr)); gap: .45rem; }
.category-color-swatch { display: grid; grid-template-columns: 1.55rem minmax(0,1fr); min-height: 2.4rem; align-items: center; gap: .5rem; border: 1px solid var(--category-border); border-radius: .65rem; background: var(--category-row-bg); color: var(--category-ink); padding: .35rem .5rem; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.category-color-swatch i { position: relative; display: block; width: 1.55rem; height: 1.55rem; border: 2px solid #fff; border-radius: 999px; background: var(--category-bg); box-shadow: 0 0 0 1px var(--category-border); }
.category-color-swatch span { overflow: hidden; font-size: .7rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.category-color-swatch:hover { box-shadow: 0 4px 12px rgba(65,48,38,.12); transform: translateY(-1px); }
.category-color-swatch.selected { border-color: var(--category-ink); box-shadow: 0 0 0 2px color-mix(in srgb, var(--category-ink) 18%, transparent); }
.category-color-swatch.selected i::after { position: absolute; inset: .22rem; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.82); content: "✓"; font-size: .72rem; font-style: normal; font-weight: 950; }
.category-tone-cream { --category-bg:#fff5df; --category-row-bg:#fffbf2; --category-row-hover:#fff6e4; --category-border:#efd9ad; --category-ink:#86622d; }
.category-tone-vanilla { --category-bg:#fff0c9; --category-row-bg:#fffbef; --category-row-hover:#fff3d3; --category-border:#ecd194; --category-ink:#806024; }
.category-tone-honey { --category-bg:#f6e2b7; --category-row-bg:#fcf8ee; --category-row-hover:#f8e8c5; --category-border:#ddc084; --category-ink:#77581f; }
.category-tone-sand { --category-bg:#f7eadb; --category-row-bg:#fcf8f2; --category-row-hover:#f8eee2; --category-border:#dfc7ab; --category-ink:#76583c; }
.category-tone-almond { --category-bg:#efe0cf; --category-row-bg:#faf6f0; --category-row-hover:#f2e5d7; --category-border:#d9bfa4; --category-ink:#6d5138; }
.category-tone-caramel { --category-bg:#ead3bd; --category-row-bg:#f9f4ef; --category-row-hover:#eddcca; --category-border:#d3aa87; --category-ink:#704c34; }
.category-tone-peach { --category-bg:#fbe7dc; --category-row-bg:#fff8f4; --category-row-hover:#fcebe2; --category-border:#e8c2af; --category-ink:#8b5740; }
.category-tone-apricot { --category-bg:#f8ddca; --category-row-bg:#fdf6f1; --category-row-hover:#f9e3d3; --category-border:#e3b79b; --category-ink:#865137; }
.category-tone-terracotta { --category-bg:#efd1c2; --category-row-bg:#faf3ef; --category-row-hover:#f2dacf; --category-border:#d8a790; --category-ink:#80503b; }
.category-tone-coral { --category-bg:#f5d8d2; --category-row-bg:#fcf5f4; --category-row-hover:#f7e0dc; --category-border:#dfa9a0; --category-ink:#864c47; }
.category-tone-rose { --category-bg:#f7e4e1; --category-row-bg:#fdf8f7; --category-row-hover:#f9eae7; --category-border:#dfbeba; --category-ink:#855553; }
.category-tone-dusty-rose { --category-bg:#edd8d8; --category-row-bg:#faf5f5; --category-row-hover:#f0e0e0; --category-border:#d2aeaf; --category-ink:#765052; }
.category-tone-blush { --category-bg:#f4e8ec; --category-row-bg:#fcf8fa; --category-row-hover:#f7ebef; --category-border:#dbc3cc; --category-ink:#785a66; }
.category-tone-mauve { --category-bg:#eadde4; --category-row-bg:#faf6f8; --category-row-hover:#eee2e8; --category-border:#ceb6c2; --category-ink:#705463; }
.category-tone-lavender { --category-bg:#e9e3ef; --category-row-bg:#f9f7fb; --category-row-hover:#eee8f3; --category-border:#cbbfd8; --category-ink:#655774; }
.category-tone-sage { --category-bg:#eef0df; --category-row-bg:#fafbf5; --category-row-hover:#f0f2e5; --category-border:#d1d5b3; --category-ink:#667044; }
.category-tone-olive { --category-bg:#e5e6ce; --category-row-bg:#f8f8f2; --category-row-hover:#e9ead8; --category-border:#c6c89f; --category-ink:#62643d; }
.category-tone-stone { --category-bg:#ebe4dc; --category-row-bg:#faf8f6; --category-row-hover:#eee8e1; --category-border:#cfc2b6; --category-ink:#675b51; }
.category-tone-gray { --category-bg:#e5e8ea; --category-row-bg:#f7f8f9; --category-row-hover:#eceff1; --category-border:#c3c9cd; --category-ink:#566168; }
.category-tone-brown { --category-bg:#e6d5c9; --category-row-bg:#faf6f3; --category-row-hover:#ecddd3; --category-border:#c6a692; --category-ink:#704c39; }
.category-tone-sky { --category-bg:#dcecf3; --category-row-bg:#f5fafc; --category-row-hover:#e2f0f6; --category-border:#acd0df; --category-ink:#3f6d7f; }
.category-tone-green { --category-bg:#dcebdd; --category-row-bg:#f5faf5; --category-row-hover:#e3f0e4; --category-border:#add0b0; --category-ink:#426c47; }

@media (max-width: 760px) {
  .category-palette { grid-template-columns: 1fr; }
  .category-palette-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 1400px) {
  .expense-toolbar { grid-template-columns: repeat(5, minmax(8rem, 1fr)); }
}

@media (max-width: 900px) {
  .expense-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .expense-toolbar .expense-search { grid-column: 1 / -1; }
}

.add-user-button { min-height: 2.9rem; padding: 0 1rem; }
.user-panel { overflow: hidden; }
.user-toolbar { display: grid; grid-template-columns: minmax(15rem, 1fr); gap: .65rem; padding: .8rem; border-bottom: 1px solid var(--line); }
.user-search { width: auto; }
.user-table-wrap { overflow-x: auto; }
.user-table { width: 100%; min-width: 48rem; border-collapse: collapse; }
.user-table th { color: var(--muted); font-size: .72rem; text-align: left; text-transform: uppercase; letter-spacing: .04em; padding: .75rem 1rem; background: #f6f8f9; }
.user-table td { border-top: 1px solid var(--line); padding: .9rem 1rem; font-size: .86rem; vertical-align: middle; }
.user-table td strong { display: block; }
.user-table td > small { display: block; margin-top: .25rem; font-size: .7rem; font-weight: 750; }
.pin-ready { color: var(--green); }
.pin-missing { color: var(--coral); }
.user-table code { display: inline-flex; border: 1px solid var(--line); border-radius: .45rem; background: #f8fafb; color: var(--ink); padding: .28rem .45rem; font-family: inherit; font-size: .82rem; font-weight: 800; }
.user-table tbody tr:hover { background: rgba(15,139,141,.035); }
.office-picker {
  position: relative;
}
.office-picker summary {
  display: flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  border: 1px solid var(--line);
  border-radius: .58rem;
  background: #fff;
  color: var(--ink);
  padding: 0 .8rem;
  cursor: pointer;
  list-style: none;
}
.office-picker summary::-webkit-details-marker { display: none; }
.office-picker summary::after { color: var(--muted); content: "⌄"; font-weight: 900; }
.office-picker[open] summary {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(15,139,141,.12);
}
.office-picker[open] summary::after { content: "⌃"; }
.office-picker-options {
  position: absolute;
  z-index: 20;
  top: calc(100% + .35rem);
  right: 0;
  left: 0;
  display: grid;
  max-height: 15rem;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: .58rem;
  background: #fff;
  box-shadow: 0 20px 42px rgba(24,33,38,.18);
  padding: .4rem;
}
.office-picker-option {
  display: flex;
  min-height: 2.35rem;
  align-items: center;
  grid-template-columns: auto 1fr;
  gap: .6rem;
  border-radius: .45rem;
  padding: .35rem .45rem;
  cursor: pointer;
}
.office-picker-option:hover { background: rgba(15,139,141,.07); }
.office-picker-option input {
  width: 1rem;
  min-height: 1rem;
  accent-color: var(--teal);
}
.office-picker-option span {
  color: var(--ink);
  font-size: .88rem;
  font-weight: 760;
}

.settings-panel {
  max-width: 42rem;
  overflow: hidden;
}

.fintech-panel { margin-top: 1.25rem; }
.fintech-sync-timer { margin: 1.25rem 0 0; }
.fintech-wallet-list, .fintech-office-group { display: grid; gap: 1rem; }
.fintech-office-group h4 { margin: .5rem 0 0; display: flex; align-items: center; gap: .5rem; }
.fintech-office-group h4 span { color: var(--muted); font-size: .75rem; }
.fintech-wallet-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(21rem, 1fr)); gap: .8rem; }
.fintech-wallet-card { display: grid; gap: .85rem; padding: 1rem; border: 1px solid var(--line); border-radius: .75rem; background: white; }
.fintech-wallet-head, .fintech-wallet-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.fintech-wallet-head div { display: grid; gap: .2rem; }
.fintech-wallet-head span, .fintech-wallet-foot span { color: var(--muted); font-size: .75rem; }
.fintech-wallet-card code { overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.fintech-balances { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
.fintech-balances b { padding: .65rem; border-radius: .55rem; background: var(--bg); font-variant-numeric: tabular-nums; }
.fintech-balances small { color: var(--muted); font-size: .65rem; }
.fintech-minimum-balance-form {
  display: grid;
  grid-template-columns: minmax(12rem, 22rem) auto;
  gap: .55rem .75rem;
  align-items: end;
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: .65rem;
  background: var(--bg);
}
.fintech-minimum-balance-form label { display: grid; gap: .35rem; }
.fintech-minimum-balance-form label span,
.fintech-minimum-balance-form small { color: var(--muted); font-size: .75rem; font-weight: 750; }
.fintech-minimum-balance-form input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: .5rem;
  background: white;
  padding: .6rem .7rem;
  font: inherit;
}
.fintech-minimum-balance-form small { grid-column: 1 / -1; }

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

.settings-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
}

.settings-status {
  color: var(--muted);
  font-size: .86rem;
  font-weight: 800;
}

.modal-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#deleteOffice {
  margin-right: auto;
}

@media (max-width: 1050px) {
  .app-shell,
  .content-grid,
  .office-management-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    border-right: 0;
    border-bottom: 1px solid rgba(24, 33, 38, 0.08);
  }

  .sidebar .office-list {
    grid-auto-flow: column;
    grid-auto-columns: minmax(13rem, 1fr);
  }

  .office-management-list {
    max-height: none;
  }
}

@media (max-width: 760px) {
  .payment-expense-summary { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .payment-section-heading { display: grid; gap: .25rem; }
  .payment-wallet-option { grid-template-columns: auto minmax(0,1fr); }
  .payment-wallet-option > strong { grid-column: 2; text-align: left; }

  .workspace,
  .sidebar {
    padding: 0.9rem;
  }

  .user-permission-row {
    gap: 0.4rem;
  }

  .checkbox-option {
    min-height: 3.7rem;
    align-items: flex-start;
    padding: 0.55rem;
  }

  .authenticator-setup {
    grid-template-columns: 1fr;
  }

  .authenticator-setup > img {
    justify-self: center;
  }

  .topbar h2 {
    font-size: 1.8rem;
  }

  .topbar,
  .filters,
  .panel-heading,
  .inline-fields {
    align-items: stretch;
    flex-direction: column;
  }

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

  .search-box {
    width: 100%;
  }

  .wallet-heading-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .office-table-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .office-table-office-filter {
    width: 100%;
  }

  .office-table-filter-label {
    white-space: normal;
  }

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

  .office-summary-header-totals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .office-summary-header-totals i {
    display: none;
  }

  .wallet-heading-actions .search-box,
  .positive-target-total,
  .target-delta-reset-button {
    width: 100%;
  }

  .target-delta-reset-button {
    justify-content: space-between;
  }

  .wallet-sync-timer-head {
    align-items: flex-start;
  }

  .sync-monitor-body {
    grid-template-columns: 1fr;
  }

  .sync-monitor-toggle > span {
    display: grid;
    gap: 0.15rem;
  }

  .wallet-row,
  .wallet-row.header,
  .office-wallet-row,
  .office-card-head,
  .target-card-head,
  .target-section-row {
    grid-template-columns: 1fr;
  }

  .office-card-totals,
  .target-card-totals {
    grid-template-columns: 1fr;
  }

  .office-expense-breakdown-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .office-expense-category-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .office-expense-category-columns {
    display: none;
  }

  .office-expense-category-row > strong,
  .office-expense-category-row > b {
    grid-column: 1 / -1;
  }

  .office-expense-percentage {
    justify-items: start;
  }

  .office-expense-percentage > small {
    display: block;
    margin-bottom: 0.15rem;
  }

  .office-expense-category-row > b {
    text-align: left;
  }

  .target-live-group {
    grid-template-columns: minmax(4.75rem, auto) minmax(9rem, 1fr);
    width: 100%;
  }

  .target-live-group .sheet-target-value {
    flex: 1;
  }

  .target-card-totals i {
    display: none;
  }

  .target-section-number,
  .target-progress span {
    text-align: left;
  }

  .balance-label {
    justify-content: space-between;
  }

  .balance-label::before {
    color: var(--muted);
    content: attr(aria-label);
    font-size: 0.76rem;
    font-weight: 800;
  }

  .wallet-row.header {
    display: none;
  }

  .expense-toolbar, .expense-form-grid, .directory-add-form { grid-template-columns: 1fr; }
  .expense-note-field { grid-column: auto; }
  .expense-pagination { justify-content: space-between; flex-wrap: wrap; }
  .expense-pagination > span { order: -1; width: 100%; text-align: left; }
}

@media (max-width: 430px) {
  .metrics {
    grid-template-columns: 1fr;
  }
}

.payroll-page {
  --payroll-border: #e3e8ed;
  --payroll-soft: #f8fafb;
  --payroll-green: #21a33a;
  --payroll-orange: #ff9800;
  --payroll-purple: #6d28d9;
  gap: .8rem !important;
}

.payroll-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.payroll-header h2 {
  margin: .18rem 0 0;
  font-size: 1.15rem;
  font-weight: 780;
}

.payroll-period-controls {
  display: flex;
  align-items: center;
  gap: .65rem;
}

.payroll-select-control,
.payroll-filter-count-button,
.payroll-import-button,
.payroll-export-button {
  display: flex;
  min-height: 2.8rem;
  align-items: center;
  gap: .55rem;
  border: 1px solid var(--payroll-border);
  border-radius: .55rem;
  background: #fff;
  padding: 0 .7rem;
  box-shadow: 0 2px 8px rgba(30, 41, 59, .025);
}

.payroll-select-control {
  grid-template-columns: 1rem minmax(6.5rem, 1fr);
}

.payroll-select-control svg,
.payroll-filter-count-button svg,
.payroll-import-button svg,
.payroll-export-button svg,
.payroll-search svg,
.payroll-reset-button svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.payroll-select-control select {
  min-width: 7rem;
  border: 0;
  outline: 0;
  background: transparent;
  color: #1d2939;
  font-size: .82rem;
  font-weight: 700;
}

.payroll-filter-count-button {
  color: #5a6675;
  font-size: .78rem;
  font-weight: 750;
}

.payroll-import-button {
  border-color: rgba(49, 94, 251, .22);
  background: #315efb;
  color: #fff;
  font-size: .78rem;
  font-weight: 800;
  white-space: nowrap;
}

.payroll-export-button {
  border-color: rgba(16, 24, 40, .18);
  background: #101828;
  color: #fff;
  font-size: .78rem;
  font-weight: 800;
  white-space: nowrap;
}

.payroll-import-button:disabled {
  cursor: wait;
  opacity: .68;
}

.payroll-filter-count-button b {
  display: grid;
  min-width: 1.25rem;
  height: 1.25rem;
  place-items: center;
  border-radius: .28rem;
  background: #315efb;
  color: #fff;
  font-size: .65rem;
}

.payroll-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .7rem;
}

.payroll-metric {
  display: flex;
  min-width: 0;
  min-height: 5.25rem;
  align-items: center;
  gap: .95rem;
  border: 1px solid var(--payroll-border);
  border-radius: .55rem;
  background: rgba(255, 255, 255, .94);
  padding: .85rem 1rem;
}

.payroll-metric > i,
.payroll-summary-item > i {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  font-style: normal;
}

.payroll-metric > i {
  width: 3.15rem;
  height: 3.15rem;
}

.payroll-metric > i svg,
.payroll-summary-item > i svg {
  width: 1.55rem;
  height: 1.55rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.payroll-metric-fund > i,
.payroll-summary-paid > i {
  background: #e9f7ec;
  color: var(--payroll-green);
}

.payroll-metric-employees > i,
.payroll-metric-rate > i,
.payroll-summary-employees > i {
  background: #fff3e5;
  color: var(--payroll-orange);
}

.payroll-metric-bonus > i,
.payroll-summary-advance > i {
  background: #f2ebff;
  color: var(--payroll-purple);
}

.payroll-metric span {
  display: block;
  overflow: hidden;
  color: #657083;
  font-size: .7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payroll-metric strong {
  display: block;
  margin-top: .25rem;
  overflow: hidden;
  color: #121826;
  font-size: 1.45rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payroll-panel {
  overflow: hidden;
  border: 1px solid var(--payroll-border);
  border-radius: .55rem;
  background: #fff;
}

.payroll-import-status {
  margin: .75rem .8rem 0;
  border: 1px solid var(--payroll-border);
  border-radius: .55rem;
  padding: .65rem .8rem;
  color: #344054;
  font-size: .76rem;
  font-weight: 750;
}

.payroll-import-status.success {
  border-color: #b7ebc4;
  background: #eefbf1;
  color: #14742a;
}

.payroll-import-status.warning {
  border-color: #fedf89;
  background: #fffbeb;
  color: #9a5b00;
}

.payroll-import-status.error {
  border-color: #fecaca;
  background: #fff1f2;
  color: #b42318;
}

.payroll-import-status.info {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.payroll-toolbar {
  display: grid;
  grid-template-columns: minmax(14rem, 1.65fr) minmax(9rem, .75fr) minmax(9rem, .75fr) minmax(10rem, .8fr) auto;
  gap: .7rem;
  align-items: center;
  padding: .8rem;
  border-bottom: 1px solid var(--payroll-border);
}

.payroll-history,
.payroll-groups {
  display: grid;
  gap: .65rem;
  padding: .75rem .9rem 0;
}

.payroll-history {
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
}

.payroll-history button,
.payroll-group-card {
  border: 1px solid var(--payroll-border);
  border-radius: .95rem;
  background: linear-gradient(180deg, #fff, #fbfcff);
  box-shadow: 0 .45rem 1.25rem rgba(16, 24, 40, .045);
}

.payroll-history button {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  padding: .65rem .75rem;
  color: #172033;
}

.payroll-history button.active {
  border-color: rgba(49, 94, 251, .45);
  background: #f3f6ff;
}

.payroll-history b,
.payroll-group-card strong {
  font-size: .78rem;
}

.payroll-history span,
.payroll-group-card small {
  color: #667085;
  font-size: .64rem;
}

.payroll-groups {
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  padding-bottom: .8rem;
}

.payroll-group-card {
  padding: .85rem;
}

.payroll-group-card span {
  display: block;
  color: #536079;
  font-size: .66rem;
  font-weight: 760;
}

.payroll-group-card strong,
.payroll-group-card small {
  display: block;
  margin-top: .2rem;
}

.payroll-search {
  display: flex;
  min-width: 0;
  min-height: 2.45rem;
  align-items: center;
  gap: .65rem;
  border: 1px solid var(--payroll-border);
  border-radius: .48rem;
  padding: 0 .8rem;
  color: #111827;
}

.payroll-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: .75rem;
}

.payroll-toolbar-select select,
.payroll-pagination select {
  width: 100%;
  min-height: 2.45rem;
  border: 1px solid var(--payroll-border);
  border-radius: .48rem;
  background: #fff;
  color: #344054;
  padding: 0 .75rem;
  font-size: .75rem;
  font-weight: 700;
}

.payroll-reset-button {
  display: inline-flex;
  min-height: 2.45rem;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border: 0;
  background: transparent;
  color: #4d5767;
  padding: 0 .55rem;
  font-size: .72rem;
  font-weight: 750;
  white-space: nowrap;
}

.payroll-table-wrap {
  overflow-x: auto;
}

.payroll-table {
  width: 100%;
  min-width: 68rem;
  border-collapse: collapse;
  color: #172033;
  font-variant-numeric: tabular-nums;
}

.payroll-table th,
.payroll-table td {
  border-bottom: 1px solid #edf0f3;
  padding: .58rem .62rem;
  font-size: .68rem;
  text-align: left;
  white-space: nowrap;
}

.payroll-table th {
  height: 2.25rem;
  background: #fbfcfd;
  color: #536079;
  font-weight: 720;
}

.payroll-table th:nth-child(n+5):nth-child(-n+11),
.payroll-table td:nth-child(n+5):nth-child(-n+11) {
  text-align: right;
}

.payroll-table th:first-child,
.payroll-table td:first-child {
  width: 2.25rem;
  text-align: center;
}

.payroll-table th:last-child,
.payroll-table td:last-child {
  width: 2rem;
  padding-right: .85rem;
  text-align: right;
}

.payroll-table tbody tr:not(.payroll-detail-row):hover {
  background: #fbfdfb;
}

.payroll-table tr.payroll-person-manager {
  background: linear-gradient(90deg, rgba(255, 152, 0, .08), transparent 34%);
}

.payroll-table tr.payroll-person-student {
  background: linear-gradient(90deg, rgba(109, 40, 217, .07), transparent 34%);
}

.payroll-table tr.payroll-person-dismissed {
  opacity: .74;
}

.payroll-table input[type="checkbox"] {
  width: .82rem;
  height: .82rem;
  accent-color: #315efb;
}

.payroll-employee {
  display: flex;
  min-width: 9rem;
  align-items: center;
  gap: .6rem;
}

.payroll-avatar {
  display: grid;
  width: 1.7rem;
  height: 1.7rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--avatar-bg, #e9efff);
  color: var(--avatar-color, #315efb);
  font-size: .62rem;
  font-weight: 850;
}

.payroll-employee strong {
  max-width: 10rem;
  overflow: hidden;
  font-size: .7rem;
  text-overflow: ellipsis;
}

.payroll-manager {
  color: #f0a000;
  font-size: .72rem;
}

.payroll-status {
  display: inline-flex;
  align-items: center;
  border-radius: .25rem;
  background: #e7f7e9;
  color: #219236;
  padding: .2rem .38rem;
  font-size: .61rem;
  font-weight: 760;
}

.payroll-status.leave {
  background: #fff4dd;
  color: #b56b00;
}

.payroll-status.dismissed {
  background: #fdebec;
  color: #c33e4b;
}

.payroll-status.neutral {
  background: #eef1f5;
  color: #667085;
}

.payroll-payable {
  color: var(--payroll-green);
  font-weight: 850;
}

.payroll-row-toggle {
  display: inline-grid;
  width: 1.5rem;
  height: 1.5rem;
  place-items: center;
  border: 0;
  background: transparent;
  color: #344054;
  font-size: 1.2rem;
}

.payroll-detail-row td {
  background: #fbfcfd;
  color: #687386;
  font-size: .63rem;
  white-space: normal;
}

.payroll-record-modal {
  width: min(58rem, calc(100vw - 2rem));
  border: 0;
  border-radius: 1.35rem;
  padding: 0;
  background: transparent;
}

.payroll-record-modal::backdrop {
  background: rgba(15, 23, 42, .42);
  backdrop-filter: blur(4px);
}

.payroll-record-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 1.35rem;
  background: #fff;
  box-shadow: 0 1.5rem 4rem rgba(15, 23, 42, .22);
}

.payroll-record-card > header,
.payroll-record-card > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  background: #fbfcff;
}

.payroll-record-card h3 {
  margin: .1rem 0;
  font-size: 1.05rem;
}

.payroll-record-card header span,
.payroll-record-card footer span {
  color: #667085;
  font-size: .72rem;
}

.payroll-record-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: .8rem;
  padding: 1rem 1.15rem;
}

.payroll-record-grid label {
  display: grid;
  gap: .35rem;
  color: #536079;
  font-size: .68rem;
  font-weight: 760;
}

.payroll-record-grid input {
  border: 1px solid var(--payroll-border);
  border-radius: .75rem;
  padding: .68rem .75rem;
  color: #172033;
  font: inherit;
}

.payroll-record-checkbox {
  align-content: end;
  grid-template-columns: auto 1fr;
  align-items: center;
}

.payroll-record-history {
  padding: 0 1.15rem 1rem;
}

.payroll-record-history h4 {
  margin: 0 0 .55rem;
}

.payroll-history-row {
  display: grid;
  grid-template-columns: 8rem 8rem 1fr;
  gap: .75rem;
  border-top: 1px solid #edf0f3;
  padding: .55rem 0;
  font-size: .72rem;
}

.payroll-history-row small {
  color: #667085;
}

.payroll-empty,
.payroll-loading {
  min-width: 68rem;
  padding: 2.1rem 1rem;
  text-align: center;
}

.payroll-empty > span {
  display: block;
  color: #b3bdca;
  font-size: 1.8rem;
}

.payroll-empty strong {
  display: block;
  margin-top: .35rem;
}

.payroll-empty p,
.payroll-loading {
  margin: .35rem auto 0;
  max-width: 36rem;
  color: #778294;
  font-size: .72rem;
  line-height: 1.5;
}

.payroll-pagination {
  display: grid;
  grid-template-columns: minmax(10rem, 1fr) auto minmax(8rem, 1fr);
  align-items: center;
  gap: 1rem;
  min-height: 3rem;
  padding: .55rem .85rem;
  color: #667085;
  font-size: .67rem;
}

.payroll-pagination > label {
  width: 7.5rem;
  justify-self: end;
}

.payroll-page-buttons,
.payroll-page-buttons > div {
  display: flex;
  align-items: center;
  gap: .45rem;
}

.payroll-page-buttons button {
  display: grid;
  min-width: 1.75rem;
  height: 1.75rem;
  place-items: center;
  border: 1px solid var(--payroll-border);
  border-radius: .35rem;
  background: #fff;
  color: #344054;
  font-size: .72rem;
}

.payroll-page-buttons button.active {
  border-color: #315efb;
  background: #315efb;
  color: #fff;
}

.payroll-page-buttons button:disabled {
  cursor: default;
}

.payroll-period-summary {
  display: grid;
  grid-template-columns: minmax(9rem, 1.05fr) repeat(4, minmax(8rem, 1fr));
  gap: .8rem;
  align-items: center;
  border: 1px solid var(--payroll-border);
  border-radius: .55rem;
  background: #fff;
  padding: .75rem 1rem;
}

.payroll-period-summary > strong {
  font-size: .82rem;
  line-height: 1.25;
}

.payroll-summary-item {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: .65rem;
}

.payroll-summary-item > i {
  width: 2.35rem;
  height: 2.35rem;
}

.payroll-summary-penalty > i {
  background: #ffeaec;
  color: #ec3347;
  font-size: 1rem;
}

.payroll-summary-item b,
.payroll-summary-item span {
  display: block;
}

.payroll-summary-item b {
  overflow: hidden;
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payroll-summary-item span {
  margin-top: .16rem;
  color: #747f91;
  font-size: .6rem;
}

@media (max-width: 1180px) {
  .payroll-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .payroll-toolbar {
    grid-template-columns: minmax(14rem, 1fr) repeat(2, minmax(9rem, .55fr));
  }

  .payroll-reset-button {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .payroll-period-summary {
    grid-template-columns: repeat(4, minmax(8rem, 1fr));
  }

  .payroll-period-summary > strong {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .payroll-header,
  .payroll-period-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .payroll-select-control,
  .payroll-filter-count-button,
  .payroll-import-button {
    width: 100%;
  }

  .payroll-select-control select {
    flex: 1;
  }

  .payroll-metrics,
  .payroll-toolbar,
  .payroll-period-summary {
    grid-template-columns: 1fr;
  }

  .payroll-reset-button {
    grid-column: auto;
    justify-self: stretch;
  }

  .payroll-period-summary > strong {
    grid-column: auto;
  }

  .payroll-pagination {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .payroll-page-buttons {
    justify-content: center;
  }

  .payroll-pagination > label {
    width: 100%;
    justify-self: stretch;
  }
}
.expense-allocation-toggle { display: block; margin-top: 16px; padding: 10px 14px; border: 1px solid #d8e1e5; border-radius: 12px; background: #f8fbfc; }
.expense-allocation-editor { margin-top: 10px; padding: 16px; border: 1px solid #d8e1e5; border-radius: 14px; background: #f8fbfc; }
.expense-allocation-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.expense-allocation-heading div { display: grid; gap: 3px; }
.expense-allocation-heading small { color: #6d7d85; }
.expense-allocation-row { display: grid; grid-template-columns: 1fr 1fr minmax(120px,.55fr) auto; gap: 10px; align-items: end; margin-top: 10px; }
.expense-allocation-row label { margin: 0; }
.expense-allocation-status { margin-top: 12px; color: #60727b; font-weight: 700; }
.expense-allocation-status.invalid { color: #e25549; }
.allocation-summary { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.allocation-summary small { padding: 3px 7px; border-radius: 999px; background: #edf3f5; color: #566870; }
@media (max-width: 760px) { .expense-allocation-row { grid-template-columns: 1fr; } .expense-allocation-heading { align-items: flex-start; flex-direction: column; } }

.credit-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.credit-toolbar { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(170px, .32fr) minmax(170px, .32fr); gap: 12px; padding: 16px; border-bottom: 1px solid var(--line); }
.credit-toolbar .search-box { min-width: 0; }
.credit-table { min-width: 1240px; }
.credit-table th, .credit-table td { white-space: nowrap; }
.credit-table td:nth-child(1), .credit-table td:nth-child(2) { max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.credit-calendar-button { display: grid; grid-template-columns: auto 1fr; gap: 1px 7px; min-width: 145px; padding: 8px 11px; border: 1px solid #d6e0e4; border-radius: 11px; background: #f7fafb; color: var(--ink); text-align: left; cursor: pointer; }
.credit-calendar-button > span { grid-row: 1 / 3; align-self: center; font-size: 1.25rem; }
.credit-calendar-button b { font-size: .82rem; }
.credit-calendar-button small { color: var(--muted); font-size: .7rem; }
.credit-calendar-button:hover { border-color: #399b9e; background: #f0fafa; }
.credit-outstanding { color: #126d70; }
.credit-status { display: inline-flex; align-items: center; padding: 6px 9px; border-radius: 999px; font-size: .76rem; font-weight: 800; }
.credit-status.active { color: #176f73; background: #eaf8f7; }
.credit-status.overdue { color: #cf4d3e; background: #fff0ed; }
.credit-status.paid { color: #1f9d59; background: #eaf8ef; }
.credit-modal { width: min(1080px, calc(100vw - 32px)); max-width: 1080px; }
.credit-repayment-field { grid-column: 1 / -1; }
.credit-repayment-field output { display: flex; align-items: center; min-height: 46px; padding: 0 14px; border: 1px solid #abdcc5; border-radius: 10px; background: #eefaf3; color: #14824a; font-size: 1.25rem; font-weight: 900; }
.credit-percent-input { display: grid; grid-template-columns: 1fr auto; align-items: center; }
.credit-percent-input input { grid-column: 1 / -1; grid-row: 1; padding-right: 38px; }
.credit-percent-input b { grid-column: 2; grid-row: 1; padding-right: 14px; color: var(--muted); pointer-events: none; }
.credit-schedule-editor { margin-top: 16px; padding: 16px; border: 1px solid #d8e1e5; border-radius: 14px; background: #f8fbfc; }
.credit-schedule-generator { display: grid; grid-template-columns: minmax(190px, 1.2fr) minmax(155px, .75fr) minmax(140px, .6fr) auto auto; gap: 10px; align-items: end; margin: 0 0 16px; padding: 14px; border: 1px solid #cfe2e2; border-radius: 12px; background: #eef8f8; }
.credit-schedule-generator > div { display: grid; gap: 3px; align-self: center; }
.credit-schedule-generator small { color: var(--muted); }
.credit-schedule-generator label { margin: 0; }
.credit-schedule-generator button { min-height: 46px; }
.credit-schedule-header, .credit-schedule-row { display: grid; grid-template-columns: minmax(145px, .9fr) minmax(125px, .65fr) minmax(145px, .75fr) minmax(160px, .8fr) 40px; gap: 10px; align-items: end; }
.credit-schedule-header { padding: 0 2px 7px; color: var(--muted); font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.credit-schedule-row { padding: 10px 0; border-top: 1px solid #dfe7ea; }
.credit-schedule-row label { margin: 0; }
.credit-schedule-row label > span:first-child { display: none; }
.credit-paid-toggle .toggle-control { min-height: 46px; padding: 0 10px; border: 1px solid #d8e1e5; border-radius: 10px; background: white; }
.credit-schedule-row > button { align-self: center; }
.credit-schedule-row input:disabled { color: #8b989e; background: #edf1f2; cursor: not-allowed; }

@media (max-width: 900px) {
  .credit-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .credit-toolbar { grid-template-columns: 1fr; }
  .credit-schedule-generator { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .credit-schedule-generator > div { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .credit-metrics { grid-template-columns: 1fr; }
  .credit-schedule-header { display: none; }
  .credit-schedule-row { grid-template-columns: 1fr; padding: 14px 0; }
  .credit-schedule-generator { grid-template-columns: 1fr; }
  .credit-schedule-generator > div { grid-column: auto; }
  .credit-schedule-row label > span:first-child { display: block; }
  .credit-schedule-row > button { justify-self: end; }
}

.audit-event-list { display: grid; gap: 10px; }
.audit-event { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.audit-event-mark { width: 8px; height: 38px; border-radius: 999px; background: #8c98a5; }
.audit-action-create .audit-event-mark, .audit-action-payment_confirmed .audit-event-mark { background: #2d9d68; }
.audit-action-update .audit-event-mark { background: #d49a36; }
.audit-action-delete .audit-event-mark, .audit-action-archive .audit-event-mark { background: #d45e55; }
.audit-event-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.audit-event-title span { padding: 3px 8px; border-radius: 999px; background: #edf3f5; color: var(--muted); font-size: .75rem; }
.audit-event-main p, .audit-event-main small { margin: 4px 0 0; color: var(--muted); }
.audit-event time { color: var(--muted); font-size: .84rem; white-space: nowrap; }

@media (max-width: 720px) {
  .audit-event { grid-template-columns: 6px minmax(0, 1fr); }
  .audit-event time { grid-column: 2; }
}
