:root {
  --midnight: #050817;
  --deep-navy: #0f172a;
  --panel: #111827;
  --panel-2: #172033;
  --slate: #334155;
  --border: #263247;
  --text: #f8fafc;
  --muted: #94a3b8;
  --blue: #2563eb;
  --cyan: #06b6d4;
  --green: #22c55e;
  --red: #ef4444;
  --amber: #f59e0b;
  --purple: #8b5cf6;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
  font-family: Inter, ui-sans-serif, system-ui, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: var(--midnight);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 10% 0%, rgba(37, 99, 235, 0.16), transparent 32rem),
    linear-gradient(180deg, #080d1c 0%, var(--midnight) 42rem);
}

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

button {
  cursor: pointer;
}

.app-shell {
  width: min(1560px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 48px;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.9);
  box-shadow: var(--shadow);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 390px;
}

.brand-mark {
  display: grid;
  width: 102px;
  height: 102px;
  place-items: center;
  border: 1px solid rgba(6, 182, 212, 0.5);
  border-radius: 28px;
  background: rgba(6, 182, 212, 0.12);
  overflow: hidden;
}

.brand-logo {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 26px;
  object-fit: cover;
}

@media (prefers-reduced-motion: reduce) {
  .brand-logo {
    animation: none;
  }
}

.brand-copy {
  display: grid;
  gap: 0;
}

.brand-title {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.28rem, 1.75vw, 1.72rem);
  font-weight: 950;
  line-height: 1.02;
  transform: translateY(-3px);
}

.brand-credit {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin: 7px 0 0;
  color: #c7d6ea;
  font-size: clamp(0.95rem, 1.4vw, 1.2rem);
  font-weight: 800;
  line-height: 1.15;
}

h2 {
  margin-bottom: 14px;
  font-size: 1.35rem;
  line-height: 1.2;
}

h3 {
  margin-bottom: 8px;
  font-size: 1rem;
  line-height: 1.25;
}

.topbar-controls {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  align-self: flex-end;
  transform: translateY(6px);
}

.compact-field,
.form-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.compact-field input,
.compact-field select {
  min-width: 150px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0b1222;
  color: var(--text);
  outline: none;
}

input,
select {
  min-height: 42px;
  padding: 9px 11px;
}

textarea {
  min-height: 190px;
  padding: 12px;
  resize: vertical;
}

.record-form-grid textarea,
.inline-record-grid textarea {
  min-height: 88px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.16);
}

.confidence-controls {
  display: flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0b1222;
}

.chip {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 7px 10px;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.chip.active {
  background: rgba(37, 99, 235, 0.22);
  border-color: rgba(37, 99, 235, 0.55);
  color: var(--text);
}

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.kpi-card {
  min-height: 118px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(17, 24, 39, 0.94);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.24);
}

.kpi-label {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.kpi-value {
  font-family: "Roboto Mono", "SFMono-Regular", Consolas, monospace;
  font-size: clamp(1.25rem, 2vw, 1.85rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.kpi-subtext {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.85rem;
}

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

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

.neutral {
  color: var(--text);
}

.primary-tabs {
  display: flex;
  gap: 10px;
  margin: 16px 0;
  padding: 14px 10px 10px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.85);
  overflow-x: auto;
}

.kpi-strip:empty,
.primary-tabs:empty {
  display: none;
}

.tab-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: 11px;
  padding: 10px 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  white-space: nowrap;
}

.tab-button.active {
  background: var(--blue);
  color: var(--text);
}

.tab-notification {
  position: absolute;
  top: -13px;
  right: -6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 24px;
  padding: 0 8px;
  border: 3px solid #050817;
  border-radius: 999px;
  background: #c62828;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 1000;
  line-height: 1;
  z-index: 2;
  box-shadow: 0 10px 24px rgba(198, 40, 40, 0.38), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.main-view {
  min-height: 600px;
}

.section-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
  align-items: start;
}

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

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

.records-layout {
  display: grid;
  gap: 16px;
}

.today-layout {
  display: grid;
  gap: 16px;
}

.day-expense-section {
  display: grid;
  gap: 12px;
}

.day-expense-section + .day-expense-section {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.day-expense-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.day-expense-header h3 {
  margin-bottom: 0;
  font-size: 1.25rem;
}

.day-label {
  margin-bottom: 5px;
  color: var(--cyan);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.day-total {
  display: grid;
  gap: 3px;
  text-align: right;
}

.day-total span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.day-total strong {
  font-family: "Roboto Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 1.25rem;
}

.today-header-actions {
  margin-top: 0;
  justify-content: flex-end;
}

.revenue-clearing-check {
  display: grid;
  gap: 14px;
}

.revenue-clearing-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(34, 197, 94, 0.22);
  border-radius: 12px;
  background: rgba(34, 197, 94, 0.08);
  color: #c7d6ea;
  font-weight: 800;
}

.revenue-clearing-list {
  display: grid;
  gap: 12px;
}

.revenue-clearing-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--green);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.7);
}

.revenue-clearing-card.overdue {
  border-left-color: var(--red);
  background: rgba(127, 29, 29, 0.14);
}

.revenue-clearing-main,
.revenue-clearing-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.revenue-clearing-main h3 {
  margin: 2px 0 4px;
  font-size: 1.05rem;
}

.revenue-clearing-main p {
  color: var(--muted);
}

.revenue-clearing-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.revenue-clearing-meta span {
  padding: 5px 8px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.28);
  color: #bfd0e6;
  font-size: 0.76rem;
  font-weight: 800;
}

.revenue-clearing-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.revenue-clearing-actions span {
  margin-right: auto;
  color: var(--text);
  font-weight: 900;
}

.help-layout {
  display: grid;
  gap: 16px;
}

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

.help-card {
  min-height: 220px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.74);
}

.help-card.wide {
  grid-column: 1 / -1;
  min-height: 0;
}

.raised-help-card {
  order: 99;
  scroll-margin-top: 18px;
}

.help-card h3 {
  margin-bottom: 10px;
  color: var(--text);
}

.help-card h4 {
  margin-bottom: 8px;
  color: var(--text);
  font-size: 0.98rem;
}

.help-card p {
  margin-bottom: 10px;
  color: #c7d6ea;
  line-height: 1.5;
}

.help-card ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.45;
}

.help-card li::marker {
  color: var(--cyan);
}

.help-code {
  display: block;
  margin: 10px 0 12px;
  padding: 10px 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0b1222;
  color: #bfdbfe;
  font-family: "Roboto Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.82rem;
  overflow-x: auto;
}

.doc-link-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.doc-link {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0b1222;
  color: #bfdbfe;
  font-weight: 900;
  text-decoration: none;
}

.doc-link:hover {
  border-color: rgba(6, 182, 212, 0.6);
  color: var(--text);
}

.help-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.help-detail-block {
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.28);
}

.help-callout {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid rgba(6, 182, 212, 0.28);
  border-radius: 12px;
  background: rgba(6, 182, 212, 0.08);
}

.help-callout strong {
  color: var(--text);
}

.help-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 14px 0;
}

.help-mini-table {
  min-width: 980px;
}

.help-mini-table th,
.help-mini-table td {
  vertical-align: top;
}

.record-form-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.panel {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(17, 24, 39, 0.94);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.startup-error-view {
  max-width: 920px;
  margin: 0 auto;
  padding-top: 72px;
}

.startup-error-panel {
  padding: 28px;
}

.startup-error-panel h1 {
  margin: 0 0 12px;
  font-size: 26px;
}

.startup-error-panel p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.panel-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.panel-header p {
  margin-bottom: 0;
  color: var(--muted);
}

.panel-body {
  padding: 18px 20px;
}

.cash-chart {
  width: 100%;
  height: 360px;
  display: block;
}

.axis-label,
.chart-tick {
  fill: var(--muted);
  font-size: 12px;
  font-family: "Roboto Mono", "SFMono-Regular", Consolas, monospace;
}

.chart-grid {
  stroke: rgba(148, 163, 184, 0.18);
  stroke-width: 1;
}

.zero-line {
  stroke: var(--red);
  stroke-width: 2;
}

.cash-line {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 3;
}

.cash-area {
  fill: rgba(6, 182, 212, 0.12);
}

.bucket-spend-chart-wrap {
  display: grid;
  gap: 14px;
}

.bucket-spend-chart {
  display: block;
  width: 100%;
  height: 380px;
}

.bucket-spend-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.bucket-spend-legend-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 9px;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.62);
  color: #dbe7f5;
  font-size: 0.86rem;
}

.bucket-spend-legend-item strong {
  font-family: "Roboto Mono", "SFMono-Regular", Consolas, monospace;
  color: var(--text);
}

.bucket-spend-swatch {
  width: 10px;
  height: 24px;
  border-radius: 999px;
}

.raised-chart-wrap {
  display: grid;
  gap: 14px;
}

.raised-chart {
  display: block;
  width: 100%;
  height: 360px;
}

.raised-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.raised-line.projected {
  stroke: var(--blue);
}

.raised-line.actual {
  stroke: var(--green);
}

.raised-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.raised-summary-group {
  display: grid;
  gap: 8px;
}

.raised-summary-title {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.raised-legend,
.raised-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.raised-legend-item,
.raised-status-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.62);
  color: #dbe7f5;
  font-size: 0.86rem;
}

.raised-legend-item {
  grid-template-columns: auto 1fr auto;
}

.raised-status-card {
  border-left: 4px solid var(--muted);
}

.raised-status-card.overdue {
  border-left-color: var(--red);
}

.raised-legend-item strong,
.raised-status-card strong {
  font-family: "Roboto Mono", "SFMono-Regular", Consolas, monospace;
  color: var(--text);
  justify-self: end;
}

.raised-line-key {
  width: 24px;
  height: 4px;
  border-radius: 999px;
}

.raised-line-key.projected {
  background: var(--blue);
}

.raised-line-key.actual {
  background: var(--green);
}

.raised-help-link {
  display: flex;
  justify-content: flex-end;
}

.breakdown {
  display: grid;
  gap: 10px;
}

.breakdown-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(130px, auto);
  gap: 12px;
  align-items: center;
}

.breakdown-label {
  color: var(--muted);
  font-weight: 800;
}

.breakdown-value {
  font-family: "Roboto Mono", "SFMono-Regular", Consolas, monospace;
  font-weight: 900;
  text-align: right;
}

.bar-track {
  grid-column: 1 / -1;
  height: 9px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--cyan);
}

.warning-list,
.bucket-list,
.audit-list {
  display: grid;
  gap: 10px;
}

.warning-item {
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
}

.warning-item.high {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.08);
}

.warning-item.medium {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.08);
}

.warning-title {
  margin-bottom: 5px;
  font-weight: 900;
}

.warning-detail {
  margin-bottom: 0;
  color: var(--muted);
}

.insights-panel {
  scroll-margin-top: 18px;
}

.insight-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.insight-item {
  padding: 15px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.76);
}

.insight-item.positive {
  border-color: rgba(34, 197, 94, 0.36);
  background: rgba(34, 197, 94, 0.07);
}

.insight-item.warning {
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(245, 158, 11, 0.08);
}

.insight-item.urgent {
  border-color: rgba(239, 68, 68, 0.46);
  background: rgba(239, 68, 68, 0.08);
}

.insight-title {
  color: var(--text);
  font-weight: 950;
  line-height: 1.25;
}

.insight-detail {
  margin-top: 7px;
  color: #c7d6ea;
  line-height: 1.45;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.form-field.wide {
  grid-column: span 2;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 10px 14px;
  background: var(--blue);
  color: var(--text);
  font-weight: 900;
}

.button.secondary {
  border-color: var(--border);
  background: #0b1222;
  color: var(--text);
}

.button.danger {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.45);
  color: #fecaca;
}

.button.small {
  min-height: 32px;
  padding: 6px 9px;
  border-radius: 9px;
  font-size: 0.8rem;
}

.preference-toggle {
  display: inline-flex;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #0b1222;
}

.preference-toggle-button {
  min-width: 112px;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.preference-toggle-button.active {
  background: rgba(37, 99, 235, 0.24);
  border-color: rgba(37, 99, 235, 0.62);
  color: var(--text);
}

.preference-note {
  margin-top: 12px;
  max-width: 720px;
}

.today-button {
  min-height: 42px;
  align-self: end;
}

.account-chip,
.local-auth-status {
  display: grid;
  gap: 3px;
  min-width: 160px;
  max-width: 240px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid rgba(6, 182, 212, 0.22);
  border-radius: 12px;
  background: rgba(6, 182, 212, 0.08);
}

.account-chip span,
.local-auth-status span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 950;
  text-transform: uppercase;
}

.account-chip strong,
.local-auth-status strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 950;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-chip small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.account-signout {
  width: max-content;
  min-height: 24px;
  border: 0;
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(15, 23, 42, 0.76);
  color: #bfdbfe;
  font-size: 0.7rem;
  font-weight: 900;
}

.account-signout:hover {
  color: var(--text);
  background: rgba(37, 99, 235, 0.26);
}

.login-layout {
  display: grid;
  place-items: start center;
  padding: 48px 0 80px;
}

.login-panel {
  width: min(1080px, 100%);
}

.login-form {
  display: grid;
  gap: 14px;
}

.access-request-form {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.signin-mode-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.58);
}

.primary-signin-card {
  grid-template-columns: minmax(0, 1.3fr) minmax(220px, 0.7fr);
  align-items: end;
}

.signin-mode-card h3 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 1rem;
}

.signin-mode-card p,
.field-help {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
  text-transform: none;
}

.privacy-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid rgba(6, 182, 212, 0.22);
  border-radius: 12px;
  background: rgba(6, 182, 212, 0.07);
  color: #cbd5e1;
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1.4;
}

.privacy-check.full {
  grid-column: 1 / -1;
}

.privacy-check input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  margin-top: 1px;
}

.login-note-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
  opacity: 0.76;
  font-size: 0.76rem;
}

.login-note-grid .help-detail-block {
  padding: 10px 11px;
}

.login-note-grid .help-detail-block h3 {
  font-size: 0.78rem;
}

.login-note-grid .help-detail-block p {
  font-size: 0.74rem;
  line-height: 1.42;
}

.login-admin-link-row {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

.login-admin-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 7px 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.56);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
  transition: border-color 140ms ease, color 140ms ease, background 140ms ease;
}

.login-admin-link:hover {
  border-color: rgba(6, 182, 212, 0.34);
  background: rgba(6, 182, 212, 0.08);
  color: #dbeafe;
}

.auth-home {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 500px);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: clamp(38px, 7vw, 92px) 0 86px;
}

.auth-home-copy {
  max-width: 620px;
  padding: clamp(12px, 2vw, 24px) 0;
}

.auth-brand-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin-bottom: 22px;
  padding: 7px 12px;
  border: 1px solid rgba(6, 182, 212, 0.24);
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.1);
  color: #a7f3ff;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0;
}

.auth-home-copy h2 {
  max-width: 760px;
  margin-bottom: 18px;
  color: #f8fafc;
  font-size: clamp(2.4rem, 5vw, 4.85rem);
  font-weight: 1000;
  line-height: 0.98;
}

.auth-home-copy p {
  max-width: 560px;
  color: #b7c6db;
  font-size: clamp(1rem, 1.5vw, 1.22rem);
  line-height: 1.55;
}

.auth-signal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 34px;
}

.auth-signal-grid span {
  display: grid;
  gap: 4px;
  min-height: 104px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.58);
  color: #aebdd2;
  font-size: 0.84rem;
  line-height: 1.38;
}

.auth-signal-grid strong {
  color: #f8fafc;
  font-size: 0.86rem;
}

.auth-card {
  display: grid;
  gap: 18px;
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid rgba(219, 226, 237, 0.9);
  border-radius: 24px;
  background: #f8fafc;
  color: #0f172a;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.34);
}

.auth-card-header {
  display: grid;
  gap: 7px;
}

.auth-card-header h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  font-weight: 1000;
}

.auth-card-header p {
  margin: 0;
  color: #536175;
  font-size: 0.96rem;
  line-height: 1.48;
}

.auth-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 5px;
  border: 1px solid #d9e2ee;
  border-radius: 16px;
  background: #eaf0f8;
}

.auth-mode-button {
  display: grid;
  gap: 2px;
  min-height: 58px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 9px 11px;
  background: transparent;
  color: #64748b;
  text-align: left;
}

.auth-mode-button strong {
  color: #334155;
  font-size: 0.95rem;
  font-weight: 950;
}

.auth-mode-button span {
  font-size: 0.74rem;
  font-weight: 850;
}

.auth-mode-button.active {
  border-color: rgba(37, 99, 235, 0.18);
  background: #ffffff;
  color: #475569;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}

.auth-mode-button.active strong {
  color: #1d4ed8;
}

.auth-form {
  gap: 14px;
}

.auth-form-heading {
  display: grid;
  gap: 5px;
}

.auth-form-heading h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1.08rem;
  font-weight: 950;
}

.auth-form-heading p {
  margin: 0;
  color: #536175;
  font-size: 0.9rem;
  line-height: 1.45;
}

.auth-card .form-grid.two,
.auth-card .user-capture-grid {
  grid-template-columns: 1fr;
  gap: 11px;
}

.auth-card .form-field {
  color: #475569;
}

.auth-card .form-field span {
  color: #475569;
}

.auth-card input,
.auth-card select,
.auth-card textarea {
  border-color: #d8e1ef;
  background: #ffffff;
  color: #0f172a;
}

.auth-card input::placeholder,
.auth-card textarea::placeholder {
  color: #94a3b8;
}

.auth-card input:focus,
.auth-card select:focus,
.auth-card textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.13);
}

.auth-card .field-help {
  color: #64748b;
}

.auth-card .privacy-check {
  border-color: #d8e1ef;
  background: #eef6ff;
  color: #475569;
}

.auth-card .button {
  width: 100%;
  min-height: 46px;
  border-radius: 12px;
}

.auth-card .button.secondary {
  border-color: rgba(37, 99, 235, 0.2);
  background: #2563eb;
  color: #ffffff;
}

.auth-form-actions {
  margin-top: 4px;
}

.auth-security-note {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #d8e1ef;
  border-radius: 14px;
  background: #ffffff;
}

.auth-security-note strong {
  color: #0f172a;
  font-size: 0.76rem;
  font-weight: 950;
}

.auth-security-note span {
  color: #64748b;
  font-size: 0.72rem;
  line-height: 1.45;
}

.auth-admin-link-row {
  margin-top: 0;
}

.auth-card .login-admin-link {
  border-color: #d8e1ef;
  background: #ffffff;
  color: #64748b;
}

.auth-card .login-admin-link:hover {
  border-color: rgba(37, 99, 235, 0.28);
  background: #eff6ff;
  color: #1d4ed8;
}

.account-summary {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  border: 1px solid rgba(6, 182, 212, 0.22);
  border-radius: 12px;
  background: rgba(6, 182, 212, 0.08);
}

.account-summary span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.account-summary strong {
  color: var(--text);
  font-size: 1rem;
  font-weight: 950;
}

.account-summary small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.user-access-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.user-access-meta span {
  padding: 6px 9px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.64);
  color: #dbe7f5;
  font-size: 0.75rem;
  font-weight: 850;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 16px;
  align-items: start;
}

.admin-wide {
  grid-row: span 2;
}

.admin-summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-summary span {
  min-width: 104px;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.32);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  text-align: center;
}

.admin-summary strong {
  display: block;
  color: var(--text);
  font-size: 1.05rem;
}

.account-review-list,
.account-list {
  display: grid;
  gap: 12px;
}

.account-review-list.compact {
  max-height: 620px;
  overflow: auto;
  padding-right: 4px;
}

.access-request-card,
.account-row {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.62);
}

.access-request-card.status-approved {
  border-color: rgba(34, 197, 94, 0.22);
}

.access-request-card.status-rejected {
  border-color: rgba(248, 113, 113, 0.24);
}

.request-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.request-title-row h3,
.account-row h3 {
  margin: 0;
  font-size: 1rem;
}

.access-request-main p,
.account-row p {
  margin: 4px 0 0;
  color: var(--muted);
}

.request-status,
.account-role-list span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.18);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.account-info-grid,
.account-extra-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.account-info-grid span,
.account-extra-fields span {
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.24);
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.35;
}

.account-info-grid strong,
.account-extra-fields strong {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.access-notes {
  padding: 10px 12px;
  border-left: 3px solid rgba(6, 182, 212, 0.66);
  border-radius: 8px;
  background: rgba(6, 182, 212, 0.08);
}

.access-review-controls {
  display: grid;
  gap: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  padding-top: 12px;
}

.account-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.account-detail-card {
  grid-template-columns: 1fr;
}

.account-detail-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.account-detail-header small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-family: "Roboto Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.72rem;
}

.account-role-list {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.account-detail-section {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.account-detail-section h4 {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.membership-detail-list,
.user-access-history {
  display: grid;
  gap: 10px;
}

.membership-card,
.user-access-history-card {
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.18);
}

.membership-info-grid,
.access-history-grid {
  margin-top: 0;
}

.user-access-history-card.status-approved {
  border-color: rgba(34, 197, 94, 0.2);
}

.user-access-history-card.status-rejected {
  border-color: rgba(248, 113, 113, 0.22);
}

.empty-state.compact {
  min-height: auto;
  padding: 12px;
  font-size: 0.86rem;
}

.account-security-note {
  margin: 0;
}

.record-inline-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.record-toolbar {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: end;
  margin-bottom: 14px;
}

.tag-filter-field {
  min-width: min(360px, 100%);
}

.tag-filter-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.filter-chip {
  min-height: 30px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.filter-chip.active {
  border-color: rgba(37, 99, 235, 0.58);
  background: rgba(37, 99, 235, 0.24);
  color: var(--text);
}

.tag-control {
  position: relative;
  display: grid;
  gap: 6px;
}

.tag-control-box {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 5px 7px;
  background: #0b1222;
}

.tag-control:focus-within .tag-control-box {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.tag-chip-list {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.editable-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: 999px;
  padding: 4px 5px 4px 9px;
  background: rgba(6, 182, 212, 0.11);
  color: #dbeafe;
  font-size: 0.76rem;
  font-weight: 900;
}

.tag-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: rgba(15, 23, 42, 0.72);
  color: #a5f3fc;
  font-size: 0.7rem;
  font-weight: 1000;
}

.tag-chip-remove:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #fecaca;
}

.tag-input {
  flex: 1 1 120px;
  width: auto;
  min-width: 110px;
  min-height: 28px;
  border: 0;
  border-radius: 0;
  padding: 2px 4px;
  background: transparent;
  color: var(--text);
}

.tag-input:focus {
  border-color: transparent;
  box-shadow: none;
}

.tag-suggestion-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 45;
  width: min(320px, 100%);
  max-height: 240px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid rgba(6, 182, 212, 0.34);
  border-radius: 12px;
  background: #07111f;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4);
}

.tag-suggestion-option {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 36px;
  border: 0;
  border-radius: 9px;
  padding: 7px 9px;
  background: transparent;
  color: var(--text);
  font-weight: 900;
  text-align: left;
}

.tag-suggestion-option small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.tag-suggestion-option:hover {
  background: rgba(37, 99, 235, 0.22);
}

.tag-suggestion-empty {
  padding: 9px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.record-table-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 190px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

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

.record-table {
  min-width: 1080px;
  table-layout: fixed;
}

.record-col-timing {
  width: 13%;
}

.record-col-description {
  width: 31%;
}

.record-col-classification {
  width: 32%;
}

.record-col-amount {
  width: 11%;
}

.record-col-actions {
  width: 13%;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  position: relative;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.resizable-header {
  user-select: none;
}

.column-resize-handle {
  position: absolute;
  top: 0;
  right: -5px;
  z-index: 4;
  width: 10px;
  height: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  cursor: col-resize;
}

.column-resize-handle::after {
  position: absolute;
  top: 10px;
  right: 4px;
  bottom: 10px;
  width: 2px;
  border-radius: 999px;
  background: transparent;
  content: "";
}

.column-resize-handle:hover::after,
.is-resizing-columns .column-resize-handle::after {
  background: var(--cyan);
}

.is-resizing-columns,
.is-resizing-columns * {
  cursor: col-resize !important;
  user-select: none !important;
}

td {
  color: #dbe7f5;
  font-size: 0.92rem;
}

.cleared-expense-row {
  background: rgba(239, 68, 68, 0.025);
}

.cleared-expense-row td {
  border-bottom-color: rgba(239, 68, 68, 0.18);
}

.record-main,
.record-timing {
  display: grid;
  gap: 5px;
}

.record-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.record-title-row h3,
.record-title-row strong {
  margin: 0;
}

.record-main strong {
  line-height: 1.28;
}

.note-indicator {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: 1px solid rgba(6, 182, 212, 0.42);
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.13);
  color: #a5f3fc;
  font-size: 0.7rem;
  font-weight: 900;
  cursor: help;
}

.note-tooltip {
  position: absolute;
  z-index: 30;
  left: 50%;
  bottom: calc(100% + 9px);
  width: min(320px, 72vw);
  max-height: 220px;
  overflow-y: auto;
  transform: translateX(-50%) translateY(4px);
  padding: 10px 12px;
  border: 1px solid rgba(6, 182, 212, 0.38);
  border-radius: 12px;
  background: #050817;
  color: var(--text);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.38);
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
  white-space: pre-wrap;
}

.note-indicator:hover .note-tooltip,
.note-indicator:focus .note-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.record-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.record-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(148, 163, 184, 0.09);
  color: #c7d6ea;
  font-size: 0.72rem;
  font-weight: 900;
}

.record-timing {
  gap: 4px;
}

.record-date-label {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.record-classification {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px 8px;
  max-width: 100%;
}

.record-bucket-note {
  margin-top: 8px;
}

.record-amount {
  font-weight: 900;
  overflow-wrap: anywhere;
}

.inline-edit-row td {
  padding: 0;
  background: rgba(37, 99, 235, 0.06);
}

.inline-record-form {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(37, 99, 235, 0.38);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.96);
}

.inline-edit-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.inline-edit-header p {
  margin: 4px 0 0;
}

.inline-edit-actions {
  margin-top: 0;
  justify-content: flex-end;
}

.inline-record-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.inline-wide {
  grid-column: span 2;
}

.inline-full {
  grid-column: 1 / -1;
}

.mono {
  font-family: "Roboto Mono", "SFMono-Regular", Consolas, monospace;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 9px;
  background: rgba(148, 163, 184, 0.12);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 900;
}

.classification-control {
  display: inline-grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 34px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 10px;
  padding: 5px 8px;
  background: rgba(148, 163, 184, 0.12);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 900;
  text-align: left;
}

.classification-menu-wrap {
  position: relative;
  display: inline-flex;
  min-width: 0;
}

.classification-label {
  color: var(--muted);
  font-size: 0.63rem;
  font-weight: 900;
  text-transform: uppercase;
}

.classification-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.classification-caret {
  color: var(--muted);
  font-size: 0.76rem;
}

.classification-button {
  border: 1px solid transparent;
  cursor: pointer;
}

.classification-button:hover,
.record-bucket-button:hover {
  border-color: rgba(6, 182, 212, 0.48);
  background: rgba(6, 182, 212, 0.18);
  color: var(--text);
}

.record-bucket-button {
  display: inline-grid;
  max-width: 100%;
  min-height: 34px;
  color: var(--text);
  cursor: pointer;
}

.record-bucket-button .classification-value {
  color: #b7d7ff;
}

.classification-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 20;
  min-width: 180px;
  max-width: 260px;
  padding: 6px;
  border: 1px solid rgba(6, 182, 212, 0.4);
  border-radius: 12px;
  background: #07111f;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.38);
}

.classification-menu-option {
  display: block;
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  padding: 8px 10px;
  background: transparent;
  color: var(--text);
  font-weight: 850;
  text-align: left;
}

.classification-menu-option:hover {
  background: rgba(37, 99, 235, 0.22);
}

.classification-control.cleared {
  background: rgba(34, 197, 94, 0.15);
  color: #bbf7d0;
}

.classification-control.cleared-expense-control {
  background: rgba(34, 197, 94, 0.11);
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.14);
  color: #d7f8df;
}

.status-pill.cleared-expense-control {
  background: rgba(34, 197, 94, 0.11);
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.14);
  color: #d7f8df;
}

.classification-control.committed {
  background: rgba(245, 158, 11, 0.17);
  color: #fde68a;
}

.classification-control.pending {
  background: rgba(6, 182, 212, 0.16);
  color: #a5f3fc;
}

.classification-control.canceled,
.classification-control.archived {
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
}

.status-pill.cleared {
  background: rgba(34, 197, 94, 0.15);
  color: #bbf7d0;
}

.status-pill.committed {
  background: rgba(245, 158, 11, 0.17);
  color: #fde68a;
}

.status-pill.pending {
  background: rgba(6, 182, 212, 0.16);
  color: #a5f3fc;
}

.empty-state {
  padding: 24px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
}

.bucket-card {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
}

.swatch {
  width: 12px;
  height: 42px;
  border-radius: 99px;
}

.usage-meter {
  display: grid;
  gap: 8px;
}

.meter-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
}

.meter-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.small-note {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.import-note {
  margin: 10px 0 0;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10;
  max-width: 420px;
  padding: 14px 16px;
  border: 1px solid rgba(6, 182, 212, 0.45);
  border-radius: 14px;
  background: #07111f;
  color: var(--text);
  box-shadow: var(--shadow);
}

.hidden {
  display: none !important;
}

.operator-shell .main-view {
  display: block;
}

.operator-login-panel {
  max-width: 860px;
  margin: 0 auto;
}

.operator-login-message {
  margin-bottom: 14px;
  border-color: rgba(6, 182, 212, 0.28);
  background: rgba(6, 182, 212, 0.08);
}

.operator-layout {
  display: grid;
  gap: 16px;
}

.operator-kpi-strip {
  padding: 0;
  margin: 0;
}

.operator-role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.operator-user-card {
  background: rgba(15, 23, 42, 0.7);
}

.app-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 30px 0 8px;
  color: rgba(148, 163, 184, 0.68);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.app-footer > span,
.app-footer > a {
  padding: 6px 10px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.48);
  color: rgba(148, 163, 184, 0.78);
  text-decoration: none;
}

.footer-policy-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 12px;
  font-size: 0.52rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.3;
}

.app-footer .footer-policy-links a {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(148, 163, 184, 0.44);
  text-decoration: none;
}

.app-footer > span {
  border-color: rgba(6, 182, 212, 0.24);
  color: #a5f3fc;
}

.app-footer > a:hover {
  border-color: rgba(148, 163, 184, 0.34);
  color: #dbe7f5;
}

.app-footer .footer-policy-links a:hover {
  color: rgba(219, 231, 245, 0.76);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-disclaimer {
  max-width: 760px;
  margin: 84px auto 0;
  color: rgba(148, 163, 184, 0.46);
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.45;
  text-align: center;
}

@media (max-width: 1180px) {
  .auth-home {
    grid-template-columns: 1fr;
    gap: 28px;
    align-items: start;
    padding-top: 38px;
  }

  .auth-home-copy {
    max-width: 760px;
  }

  .auth-signal-grid {
    max-width: 760px;
  }

  .auth-card {
    width: min(620px, 100%);
  }

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

  .section-grid,
  .section-grid.equal,
  .admin-layout {
    grid-template-columns: 1fr;
  }

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

  .login-note-grid {
    grid-template-columns: 1fr;
  }

  .primary-signin-card {
    grid-template-columns: 1fr;
  }

  .bucket-spend-legend,
  .raised-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid,
  .record-form-grid,
  .inline-record-grid,
  .form-grid.three,
  .form-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-wide {
    grid-row: auto;
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 20px, 1560px);
    padding-top: 10px;
  }

  .auth-home {
    padding: 28px 0 54px;
  }

  .auth-home-copy h2 {
    font-size: clamp(2.05rem, 13vw, 3.2rem);
  }

  .auth-signal-grid,
  .auth-mode-switch {
    grid-template-columns: 1fr;
  }

  .auth-signal-grid span {
    min-height: 0;
  }

  .auth-card {
    padding: 20px;
    border-radius: 20px;
  }

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

  .topbar-controls {
    justify-content: stretch;
  }

  .compact-field,
  .compact-field input,
  .compact-field select,
  .confidence-controls {
    width: 100%;
  }

  .confidence-controls {
    justify-content: space-between;
  }

  .chip {
    flex: 1;
  }

  .kpi-strip,
  .help-grid,
  .help-detail-grid,
  .bucket-spend-legend,
  .raised-summary,
  .raised-legend,
  .raised-status-grid,
  .insight-list,
  .account-info-grid,
  .account-extra-fields,
  .form-grid,
  .record-form-grid,
  .inline-record-grid,
  .form-grid.three,
  .form-grid.two {
    grid-template-columns: 1fr;
  }

  .account-row {
    grid-template-columns: 1fr;
  }

  .admin-summary,
  .account-role-list {
    justify-content: flex-start;
  }

  .form-field.wide {
    grid-column: auto;
  }

  .inline-wide {
    grid-column: auto;
  }

  .inline-edit-header {
    flex-direction: column;
  }

  .panel-header {
    flex-direction: column;
  }

  .day-expense-header {
    align-items: start;
    flex-direction: column;
  }

  .revenue-clearing-main,
  .revenue-clearing-actions,
  .day-total {
    align-items: flex-start;
    flex-direction: column;
    text-align: left;
  }

  .cash-chart {
    height: 300px;
  }

  .bucket-spend-chart,
  .raised-chart {
    height: 320px;
  }
}
