:root {
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-soft: #f8fafb;
  --line: #dfe6ea;
  --text: #17212b;
  --muted: #667786;
  --accent: #007c68;
  --accent-soft: #e6f4f1;
  --blue: #1769e0;
  --amber: #b77900;
  --pink: #b83280;
  --danger: #c83e3e;
  --shadow: 0 14px 34px rgba(24, 39, 55, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
}

a { color: inherit; }

.mobile-shell,
.login-shell {
  width: min(100%, 900px);
  margin: 0 auto;
  padding: 16px 14px 32px;
}

.ops-shell { width: min(100%, 1180px); }
.expense-shell { width: min(100%, 960px); }

.mobile-topbar,
.focus-strip,
.section-block,
.login-panel,
.ops-header-card,
.ops-kpi-card,
.ops-compare-card,
.expense-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.mobile-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
}

.mini-kicker {
  margin: 0;
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.mobile-topbar h1,
.section-head h2,
.ops-header-card h2,
.expense-intro h2,
.login-panel h1 {
  margin: 7px 0 0;
  line-height: 1.14;
}

.mobile-topbar h1,
.login-panel h1 {
  font-size: clamp(26px, 7vw, 38px);
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.text-link,
.text-button {
  border: 0;
  background: transparent;
  color: var(--accent);
  text-decoration: none;
  font: inherit;
  padding: 0;
  cursor: pointer;
}

.finance-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.finance-actions select {
  min-height: 40px;
  width: auto;
  min-width: 132px;
}

.finance-report-block {
  display: grid;
  gap: 14px;
}

.finance-source-strip,
.finance-summary,
.finance-grid {
  display: grid;
  gap: 12px;
}

.finance-source-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.finance-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.finance-source-pill,
.finance-kpi,
.finance-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.finance-source-pill,
.finance-kpi {
  padding: 14px;
}

.finance-source-pill strong,
.finance-kpi strong {
  display: block;
  margin-top: 6px;
  font-size: clamp(20px, 5vw, 30px);
  line-height: 1.08;
}

.finance-source-pill span,
.finance-kpi span,
.finance-bar-row small,
.finance-rank-row span,
.finance-source-item p {
  color: var(--muted);
}

.finance-panel {
  padding: 14px;
}

.finance-bars,
.finance-rank-list,
.finance-source-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.finance-bar-row {
  display: grid;
  gap: 6px;
}

.finance-bar-meta,
.finance-rank-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.finance-bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef0;
}

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

.finance-rank-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.finance-rank-row:last-child {
  border-bottom: 0;
}

.finance-rank-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-insights {
  margin: 12px 0 0;
  padding-left: 20px;
  line-height: 1.75;
}

.finance-source-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.finance-source-item:last-child {
  border-bottom: 0;
}

.finance-source-item p {
  margin: 4px 0 0;
  font-size: 13px;
}

.focus-strip {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 14px;
  margin-top: 14px;
  padding: 16px;
}

.date-card,
.status-card,
.metric-card,
.alert-card,
.detail-link,
.detail-item,
.detail-summary,
.history-row,
.health-row,
.login-form label {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  border-radius: 12px;
}

.date-card,
.status-card {
  padding: 14px;
}

label {
  display: grid;
  gap: 8px;
}

label span,
.freshness,
.detail-subtext,
.ops-subtitle,
.expense-status,
.login-copy,
.login-hint {
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

.date-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.metrics-section,
.section-block,
.ops-header-card,
.ops-grid,
.ops-chart-card,
.expense-panel {
  margin-top: 14px;
}

.section-block,
.expense-panel {
  padding: 16px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}

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

.metric-card {
  min-height: 128px;
  padding: 16px;
  text-decoration: none;
  display: block;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.metric-card:hover,
.detail-link:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 124, 104, 0.34);
}

.metric-card.large {
  grid-column: span 2;
  background: linear-gradient(135deg, var(--accent-soft), #fff);
}

.metric-card strong {
  display: block;
  margin-top: 13px;
  font-size: clamp(26px, 5vw, 40px);
  line-height: 1;
}

.metric-card em {
  display: block;
  margin-top: 8px;
  color: var(--blue);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.35;
}

.metric-card span,
.ops-kpi-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.alert-stream,
.detail-links,
.detail-list,
.health-list,
.expense-type-list {
  display: grid;
  gap: 10px;
}

.detail-list-spaced {
  margin-top: 14px;
}

.alert-card,
.detail-link,
.detail-item,
.detail-summary,
.health-row {
  padding: 14px;
}

.alert-card.warning {
  background: #fff7e8;
  border-color: #f0c875;
}

.alert-card.info {
  background: #edf5ff;
  border-color: #b6d3ff;
}

.alert-card.neutral {
  background: var(--surface-soft);
}

.alert-card strong,
.detail-link strong,
.detail-item strong,
.history-row strong,
.health-row strong {
  display: block;
}

.alert-card p,
.detail-link p,
.detail-item p,
.history-row p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.detail-link {
  text-decoration: none;
  color: inherit;
  transition: transform 160ms ease, border-color 160ms ease;
}

.detail-summary {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.detail-summary > div {
  min-width: 0;
}

.detail-summary strong {
  font-size: 22px;
}

.detail-section-head {
  padding: 4px 2px 8px;
}

.detail-section-head h3 {
  margin: 4px 0 0;
  font-size: 18px;
}

.detail-section-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.health-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.health-row span {
  color: var(--muted);
  white-space: nowrap;
}

.mobile-chart-grid {
  display: grid;
  gap: 12px;
}

.mobile-chart-card,
.mobile-table-wrap,
.bar-list {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.mobile-chart-card {
  padding: 14px;
  overflow: hidden;
}

.mobile-chart-head,
.bar-label,
.mobile-compare-row p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mobile-chart-head span,
.bar-label span,
.mobile-compare-row span {
  color: var(--muted);
  font-size: 12px;
}

.mobile-trend-chart {
  width: 100%;
  height: auto;
  min-height: 180px;
  margin-top: 10px;
  display: block;
}

.mobile-compare-chart {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.mobile-compare-row p {
  margin: 8px 0 5px;
  font-size: 13px;
}

.bar-list {
  display: grid;
  gap: 12px;
  padding: 14px;
  margin-bottom: 14px;
}

.bar-label {
  margin-bottom: 8px;
}

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

.mobile-data-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.mobile-data-table th,
.mobile-data-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.mobile-data-table th {
  color: var(--text);
  font-weight: 800;
  background: #eef3f5;
}

.mobile-data-table td {
  color: var(--muted);
}

.mobile-data-table tr:last-child td {
  border-bottom: 0;
}

.value-board {
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 2%, rgba(255, 197, 55, 0.18), transparent 23%),
    radial-gradient(circle at 18% 20%, rgba(204, 218, 231, 0.34), transparent 18%),
    radial-gradient(circle at 82% 24%, rgba(226, 147, 77, 0.18), transparent 16%),
    linear-gradient(180deg, #ffffff 0%, #f6faf8 100%);
  padding: clamp(18px, 4vw, 32px);
  overflow: hidden;
}

.value-board-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.value-board-head h3 {
  margin: 4px 0 0;
  font-size: clamp(28px, 4vw, 36px);
  letter-spacing: -0.04em;
}

.value-board-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.value-podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
  max-width: 620px;
  margin: 4px auto 28px;
}

.value-medal {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  padding: 16px 10px;
  transform: translateY(10px);
}

.value-medal.rank-1 {
  min-height: 238px;
  transform: translateY(-8px);
}

.medal-badge {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  background: linear-gradient(145deg, #ffd85a, #ffad21);
  box-shadow: inset 0 0 0 10px rgba(255, 255, 255, 0.25), 0 18px 34px rgba(196, 126, 0, 0.24);
  position: relative;
}

.value-medal.rank-2 .medal-badge {
  background: linear-gradient(145deg, #d8e2ec, #a9b7c4);
  box-shadow: inset 0 0 0 10px rgba(255, 255, 255, 0.28), 0 18px 34px rgba(81, 101, 118, 0.22);
}

.value-medal.rank-3 .medal-badge {
  background: linear-gradient(145deg, #f2b06b, #d98139);
  box-shadow: inset 0 0 0 10px rgba(255, 255, 255, 0.22), 0 18px 34px rgba(157, 82, 21, 0.22);
}

.medal-badge::before,
.medal-badge::after {
  content: "";
  position: absolute;
  bottom: -24px;
  width: 18px;
  height: 34px;
  background: rgba(8, 34, 52, 0.28);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 76%, 0 100%);
}

.medal-badge::before {
  left: 22px;
}

.medal-badge::after {
  right: 22px;
}

.medal-badge span {
  font-size: 38px;
  font-weight: 900;
  color: rgba(8, 34, 52, 0.72);
}

.value-medal strong {
  margin-top: 18px;
  font-size: 19px;
  color: #343d46;
}

.value-medal b {
  margin-top: 4px;
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1;
}

.value-rank-list {
  max-width: 620px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
}

.value-rank-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 16px;
  align-items: center;
  min-height: 62px;
  padding: 0 18px;
  font-size: 17px;
}

.user-value-detail .section-block {
  max-width: 760px;
  margin-inline: auto;
  border-radius: 32px;
}

.user-value-detail .section-head {
  margin-bottom: 10px;
}

.user-value-detail .detail-summary {
  display: none;
}

.user-value-detail .detail-list {
  gap: 0;
}

.value-rank-row:nth-child(odd) {
  background: #f4f6f7;
}

.value-rank-row span,
.value-rank-row b {
  color: #343d46;
}

.value-rank-row b {
  font-size: 20px;
}

.hidden { display: none !important; }

.ops-header-card {
  padding: 18px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.ops-range-switch,
.ops-tab-switch {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ops-range-switch .active,
.ops-tab-switch .active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

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

.ops-kpi-card,
.ops-compare-card {
  padding: 16px;
}

.ops-kpi-card p,
.ops-compare-card span {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.ops-kpi-card strong {
  display: block;
  margin-top: 10px;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.15;
}

.ops-kpi-card.green strong { color: var(--accent); }
.ops-kpi-card.blue strong { color: var(--blue); }
.ops-kpi-card.amber strong { color: var(--amber); }
.ops-kpi-card.violet strong { color: #6f42c1; }
.ops-kpi-card.pink strong { color: var(--pink); }

.ops-chart-wrap {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 10px;
}

.ops-chart {
  width: 100%;
  height: 320px;
  display: block;
}

.ops-compare-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.ops-compare-card strong {
  display: block;
  margin-bottom: 12px;
  font-size: 17px;
}

.ops-compare-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0 7px;
}

.ops-compare-row b {
  font-size: 14px;
}

.ops-bar {
  height: 9px;
  border-radius: 999px;
  background: #edf1f3;
  overflow: hidden;
}

.ops-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.ops-bar .green { background: var(--accent); }
.ops-bar .blue { background: var(--blue); }

.expense-intro {
  margin-bottom: 14px;
}

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

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

.expense-field {
  display: grid;
  gap: 8px;
}

.expense-field span {
  color: var(--muted);
  font-size: 13px;
}

.expense-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.expense-primary,
.login-button,
.primary-button {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.expense-result {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: var(--surface-soft);
}

.expense-result.success {
  border-color: rgba(0, 124, 104, 0.35);
  background: var(--accent-soft);
}

.expense-result.error {
  border-color: rgba(200, 62, 62, 0.35);
  background: #fff1f1;
}

.expense-overview-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 12px;
}

.expense-type-list {
  margin-bottom: 12px;
}

.login-body {
  display: grid;
  place-items: center;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

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

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

.login-form label {
  padding: 14px;
}

.sync-shell {
  width: min(100%, 980px);
}

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

.sync-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) 170px;
  gap: 12px;
  align-items: end;
}

.captcha-box {
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.captcha-box img {
  max-width: 100%;
  max-height: 84px;
  display: block;
}

.sync-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
}

.sync-step-list {
  display: grid;
  gap: 10px;
}

.sync-step {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 14px;
  background: var(--surface-soft);
}

.sync-step strong {
  display: block;
}

.sync-step p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.sync-step span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.sync-step.running {
  border-color: rgba(23, 105, 224, 0.35);
  background: #edf5ff;
}

.sync-step.succeeded {
  border-color: rgba(0, 124, 104, 0.35);
  background: var(--accent-soft);
}

.sync-step.failed {
  border-color: rgba(200, 62, 62, 0.35);
  background: #fff1f1;
}

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

.sync-report-grid div,
.empty-report {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 14px;
}

.sync-report-grid span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.sync-report-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
  line-height: 1.1;
}

.sync-report-foot {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.sync-logs {
  margin: 0;
  min-height: 180px;
  max-height: 420px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #111827;
  color: #e5eef5;
  padding: 14px;
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 1.6;
}

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

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

@media (max-width: 720px) {
  .mobile-shell,
  .login-shell {
    padding: 12px 10px 24px;
  }

  .mobile-topbar,
  .focus-strip,
  .section-head,
  .detail-summary,
  .ops-header-card {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-actions {
    justify-content: flex-start;
  }

  .focus-strip,
  .hero-metrics,
  .ops-grid,
  .ops-compare-grid,
  .expense-overview-grid,
  .expense-grid,
  .sync-focus,
  .sync-form-grid,
  .sync-report-grid {
    grid-template-columns: 1fr;
  }

  .metric-card.large {
    grid-column: span 1;
  }

  .date-actions,
  .expense-actions {
    width: 100%;
  }

  .date-actions button,
  .expense-actions button,
  .sync-actions button,
  .ops-range-switch button,
  .ops-tab-switch button {
    flex: 1;
  }

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

/* Final brand layer. Kept last so older page rules cannot override it. */
:root {
  --bg: #eef4f2;
  --surface: rgba(255, 255, 255, 0.94);
  --surface-soft: #f6faf8;
  --line: rgba(11, 51, 77, 0.13);
  --text: #092235;
  --muted: #637783;
  --accent: #d59b2c;
  --accent-soft: #fff6dc;
  --blue: #0a6d91;
  --cyan: #20b8ad;
  --radius: 8px;
  --shadow: 0 18px 42px rgba(9, 34, 53, 0.10);
}

body {
  background:
    linear-gradient(135deg, rgba(213, 155, 44, 0.12), transparent 31%),
    linear-gradient(215deg, rgba(32, 184, 173, 0.12), transparent 30%),
    repeating-linear-gradient(90deg, rgba(9, 34, 53, 0.035) 0 1px, transparent 1px 72px),
    var(--bg);
  font-family: "Aptos", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

.brand-lockup-login {
  align-items: flex-start;
}

.brand-mark {
  display: grid;
  place-items: center;
  overflow: hidden;
}

.brand-mark img {
  width: 86%;
  height: 86%;
  object-fit: contain;
  display: block;
}

.brand-mark {
  display: inline-block;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(213, 155, 44, 0.34);
  border-radius: var(--radius);
  background:
    url("/assets/brand-mark.png"),
    linear-gradient(145deg, rgba(255, 246, 220, 0.90), rgba(232, 248, 246, 0.86));
  background-repeat: no-repeat;
  background-size: 88%;
  background-position: center;
  box-shadow: 0 14px 30px rgba(9, 34, 53, 0.12);
}

.mobile-topbar,
.focus-strip,
.section-block,
.login-panel,
.ops-header-card,
.ops-kpi-card,
.ops-compare-card,
.expense-panel {
  border-color: var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(250,253,252,0.94));
  backdrop-filter: blur(14px);
}

.mobile-chart-card,
.mobile-table-wrap,
.bar-list,
.date-card,
.status-card,
.metric-card,
.alert-card,
.detail-link,
.detail-item,
.detail-summary,
.history-row,
.health-row,
.login-form label,
input,
select,
textarea,
button,
.sync-step,
.sync-report-grid div,
.empty-report,
.sync-logs,
.expense-result {
  border-radius: var(--radius);
}

.mobile-topbar,
.login-panel {
  position: relative;
  overflow: hidden;
}

.mobile-topbar::after,
.login-panel::after {
  content: "";
  position: absolute;
  inset: auto -18px -30px auto;
  width: 210px;
  aspect-ratio: 1;
  background-image: url("/assets/brand-logo.png");
  background-repeat: no-repeat;
  background-size: 170%;
  background-position: 75% 70%;
  opacity: 0.055;
  pointer-events: none;
}

.brand-lockup,
.topbar-actions,
.login-panel > * {
  position: relative;
  z-index: 1;
}

.mini-kicker {
  color: var(--accent);
  letter-spacing: 0.16em;
  font-weight: 800;
}

.mobile-topbar h1,
.login-panel h1 {
  color: var(--text);
  letter-spacing: 0;
}

.topbar-actions {
  gap: 8px;
}

.text-link,
.text-button {
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: #0a5871;
}

.text-link:hover,
.text-button:hover {
  border-color: rgba(10, 88, 113, 0.18);
  background: rgba(32, 184, 173, 0.08);
}

input,
select,
textarea {
  border-color: rgba(9, 34, 53, 0.14);
  background: rgba(255,255,255,0.88);
}

.expense-primary,
.login-button,
.primary-button,
.ops-range-switch .active,
.ops-tab-switch .active {
  border-color: transparent;
  background: linear-gradient(135deg, #0b324c, #0a6d91);
  color: #fff;
}

.metric-card.large {
  background: linear-gradient(135deg, rgba(255, 246, 220, 0.96), rgba(235, 251, 248, 0.98));
}

.metric-card strong,
.ops-kpi-card strong,
.sync-report-grid strong {
  color: #092235;
}

.metric-card em {
  color: var(--cyan);
}

.alert-card.warning {
  background: #fff8e8;
  border-color: rgba(213, 155, 44, 0.34);
}

.alert-card.info {
  background: #eef9f8;
  border-color: rgba(32, 184, 173, 0.25);
}

.mobile-data-table th {
  background: #e8f0ef;
}

.sync-logs {
  background: #07111c;
  color: #eaf5f7;
}

@media (max-width: 720px) {
  .brand-mark {
    width: 46px;
    height: 46px;
  }

  .text-link,
  .text-button {
    padding-inline: 9px;
  }

  .finance-source-strip,
  .finance-summary,
  .finance-grid {
    grid-template-columns: 1fr;
  }

  .finance-actions {
    justify-content: flex-start;
  }
}
