:root {
  color-scheme: light;
  --bg: #f7f8f5;
  --surface: #ffffff;
  --surface-soft: #f3f4f1;
  --ink: #111827;
  --ink-2: #1f2937;
  --text: #374151;
  --muted: #6b7280;
  --muted-light: #9ca3af;
  --line: #e5e7eb;
  --line-soft: #f2f4f7;
  --brand: #1f4d3a;
  --brand-strong: #173a2c;
  --brand-soft: #ecfdf3;
  --gold: #b54708;
  --gold-soft: #fffaeb;
  --gold-line: #fec84b;
  --red: #b42318;
  --red-soft: #fef3f2;
  --red-line: #fda29b;
  --green: #027a48;
  --green-soft: #ecfdf3;
  --blue: #1e3a5f;
  --blue-soft: #eef4fa;
  --purple: #5925dc;
  --purple-soft: #f4f3ff;
  --shadow: 0 16px 42px rgba(17, 24, 39, 0.055);
  --shadow-hover: 0 22px 54px rgba(17, 24, 39, 0.08);
  --radius: 20px;
  --font: Inter, system-ui, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  min-height: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(340px, 0.95fr) minmax(420px, 1.05fr);
  background: linear-gradient(120deg, #eef5f2 0%, #f7f8f5 45%, #fff 100%);
}

.login-visual {
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #113d36;
  color: white;
}

.brand-lockup {
  display: flex;
  gap: 14px;
  align-items: center;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--brand);
  font-weight: 800;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

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

.brand-lockup h1,
.brand-lockup h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
}

.brand-lockup p {
  margin: 4px 0 0;
  opacity: 0.78;
}

.login-visual-main h2 {
  max-width: 560px;
  margin: 0 0 16px;
  font-size: 42px;
  line-height: 1.12;
  font-weight: 800;
}

.login-visual-main p {
  max-width: 560px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.8;
}

.login-facts {
  display: grid;
  gap: 12px;
  margin-top: 32px;
}

.login-fact {
  width: min(100%, 460px);
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.login-panel {
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding: 48px;
}

.login-card {
  width: min(100%, 520px);
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 34px;
}

.login-card h2 {
  margin: 0 0 8px;
  font-size: 26px;
}

.login-card > p {
  margin: 0 0 24px;
  color: var(--muted);
}

.role-tabs,
.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  background: var(--surface-soft);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.role-tabs button,
.segmented button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
}

.role-tabs button.active,
.segmented button.active {
  background: var(--surface);
  color: var(--brand-strong);
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(24, 33, 31, 0.08);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 18px;
  row-gap: 14px;
}

.field {
  grid-column: span 6;
  display: grid;
  gap: 6px;
}

.field.small {
  grid-column: span 3;
}

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

.field label {
  font-size: 12px;
  color: #303d39;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 8px 11px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.date-combo {
  width: 100%;
  min-height: 40px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.date-combo input[type="hidden"] {
  display: none;
}

.date-combo select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 7px 10px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.date-combo select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(23, 107, 92, 0.14);
}

.date-filter {
  grid-column: span 2;
  grid-template-columns: 84px minmax(0, 1fr);
  align-items: center;
  justify-self: stretch;
  gap: 10px;
  min-width: 0;
  max-width: none;
  padding: 7px 10px 7px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: visible;
  box-shadow: none;
}

.date-filter-label {
  display: flex;
  align-items: center;
  min-height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #53615d;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.date-filter-selects {
  display: grid;
  grid-template-columns: 1.15fr 0.9fr 0.9fr;
  gap: 6px;
  min-width: 0;
}

.date-filter .date-filter-selects select {
  min-height: 30px;
  border: 0;
  border-radius: 7px;
  padding: 5px 6px;
  background: transparent;
  color: #1f2a27;
  font-size: 12px;
}

.date-filter .date-filter-selects select:focus {
  background: #f7faf8;
  box-shadow: inset 0 0 0 1px rgba(31, 77, 58, 0.28);
}

.field textarea {
  min-height: 88px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(23, 107, 92, 0.14);
}

.field input[readonly] {
  color: #3d4945;
  background: #f8faf9;
}

.field input::placeholder,
.filters input::placeholder,
.toolbar input::placeholder {
  color: #98a5a0;
}

.hint {
  color: var(--muted);
  font-size: 12px;
}

.quick-logins {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: #113d36;
  color: white;
  padding: 18px 14px;
}

.sidebar .brand-lockup {
  padding: 2px 8px 20px;
}

.sidebar .brand-mark {
  width: 40px;
  height: 40px;
  box-shadow: none;
}

.sidebar .brand-lockup h2 {
  font-size: 17px;
}

.sidebar .brand-lockup p {
  font-size: 12px;
}

.nav-group {
  display: grid;
  gap: 6px;
  margin-top: 16px;
}

.nav-button {
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 7px;
  padding: 0 10px;
  text-align: left;
  color: rgba(255, 255, 255, 0.78);
  background: transparent;
}

.nav-button:hover,
.nav-button.active {
  color: white;
  background: rgba(255, 255, 255, 0.13);
}

.nav-button.active {
  font-weight: 700;
}

.nav-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: inherit;
  background: rgba(255, 255, 255, 0.1);
  font-size: 13px;
}

.side-footer {
  margin-top: 18px;
  padding: 14px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  line-height: 1.7;
}

.main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 28px;
  background: rgba(245, 247, 246, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.topbar h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 800;
}

.topbar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px 7px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 20px rgba(24, 33, 31, 0.04);
}

.user-chip strong {
  display: block;
  font-size: 15px;
  line-height: 1.15;
}

.user-chip p {
  margin: 3px 0 0;
  font-size: 12px;
}

.user-chip .btn {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 13px;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 800;
}

.content {
  width: min(100%, 2080px);
  margin: 0 auto;
  padding: 24px 32px 34px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.toolbar-left,
.toolbar-right,
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.month-picker {
  position: relative;
  display: inline-flex;
  z-index: 8;
}

.month-picker-trigger {
  min-height: 44px;
  min-width: 178px;
  display: inline-grid;
  grid-template-columns: minmax(0, 1fr) 14px;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(24, 33, 31, 0.05);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.month-picker-trigger:hover {
  border-color: rgba(31, 77, 58, 0.28);
  box-shadow: 0 12px 28px rgba(24, 33, 31, 0.08);
  transform: translateY(-1px);
}

.month-picker-trigger span {
  grid-column: 1;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
}

.month-picker-trigger strong {
  grid-column: 1;
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: 0;
}

.month-picker-trigger i {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid #33413d;
  border-bottom: 1.5px solid #33413d;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.16s ease;
}

.month-picker.open .month-picker-trigger i {
  transform: rotate(225deg) translateY(-1px);
}

.month-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 292px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 48px rgba(24, 33, 31, 0.16);
  animation: softDrop 0.18s ease both;
}

.month-popover-head {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.month-popover-head strong {
  text-align: center;
  font-size: 15px;
}

.month-popover-head button,
.month-picker-foot button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: #26342f;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.month-popover-head button:hover,
.month-picker-foot button:hover {
  border-color: rgba(31, 77, 58, 0.3);
  background: #f4f8f5;
  color: var(--brand-strong);
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.month-option {
  min-height: 54px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #f8faf8;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.month-option span,
.month-option em {
  display: block;
  font-style: normal;
  line-height: 1.1;
}

.month-option span {
  font-weight: 900;
}

.month-option em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.month-option:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 77, 58, 0.32);
  background: #fff;
}

.month-option.active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.month-option.active em {
  color: rgba(255, 255, 255, 0.78);
}

.month-picker-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.month-picker-foot button {
  padding: 0 12px;
}

@keyframes softDrop {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.list-filter-panel {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 8px 22px rgba(24, 33, 31, 0.035);
}

.filter-card {
  width: 100%;
}

.list-toolbar {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
}

.filter-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.filter-toolbar .search-input {
  flex: 1 1 360px;
}

.list-toolbar .toolbar-left {
  flex: 1 1 auto;
}

.list-search {
  width: min(360px, 100%);
}

.list-sort {
  width: 190px;
}

.filter-grid,
.list-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 0;
}

.filter-grid input,
.filter-grid select,
.filter-toolbar input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  padding: 9px 12px;
}

.filter-grid .date-filter {
  max-width: none;
}

.list-filters .date-filter {
  grid-column: span 2;
  max-width: none;
}

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

.kpi {
  min-height: 112px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px 16px;
  box-shadow: 0 8px 24px rgba(24, 33, 31, 0.04);
}

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

.kpi strong {
  display: block;
  margin-top: 10px;
  font-size: 24px;
  line-height: 1.2;
}

.kpi em {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-top: 20px;
  box-shadow: 0 10px 30px rgba(24, 33, 31, 0.045);
}

#expenseForm.panel {
  padding: 18px 20px 22px;
}

#expenseForm > .panel-header {
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 16px;
}

#expenseForm .grid-3 {
  margin-bottom: 16px;
}

#expenseForm .grid-3 .notice {
  min-height: 64px;
  padding: 12px 14px;
  background: #f8faf9;
}

#expenseForm .form-grid {
  row-gap: 13px;
}

.expense-form-panel {
  padding: 0;
  overflow: hidden;
}

.expense-form-panel > .panel-header {
  padding: 22px 24px 18px;
}

.expense-form-panel > .grid-3 {
  padding: 0 24px 20px;
}

.form-section {
  padding: 22px 24px;
  border-top: 1px solid var(--line-soft);
}

.form-section-head {
  margin-bottom: 16px;
}

.form-section-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
}

.form-section-head p {
  max-width: 760px;
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.field label b {
  color: var(--red);
  font-weight: 900;
}

.upload-zone {
  min-height: 130px;
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 24px;
  border: 1px dashed #cbd5d1;
  border-radius: 18px;
  background: #f9fafb;
  color: var(--muted);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.upload-zone:hover {
  border-color: rgba(31, 77, 58, 0.38);
  background: #f7fbf8;
}

.upload-zone input {
  display: none;
}

.upload-zone strong {
  color: var(--brand);
  font-size: 16px;
}

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

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

.panel-header h2,
.panel h2,
.modal-card h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.panel-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 16px;
}

.analytics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(420px, 0.85fr);
  gap: 16px;
}

.analytics-kpis {
  grid-template-columns: repeat(7, minmax(138px, 1fr));
}

.analysis-metrics {
  margin-bottom: 24px;
}

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

.analysis-chart-card {
  min-height: 320px;
}

.chart-note {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 14px;
  padding: 7px 10px;
  border: 1px solid #d8e3dc;
  border-radius: 999px;
  background: #f6faf7;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.month-overview-chart,
.qualified-trend-chart {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.chart-y-axis {
  height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3px 0 22px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.month-bar-plot {
  position: relative;
  min-width: 0;
  height: 230px;
  display: grid;
  grid-template-columns: repeat(3, minmax(84px, 1fr));
  align-items: end;
  gap: 20px;
  padding: 6px 12px 0;
  border-bottom: 1px solid var(--line);
}

.chart-grid-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  border-top: 1px dashed #e7ece8;
  pointer-events: none;
}

.month-overview-bar {
  position: relative;
  z-index: 1;
  height: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: center;
}

.month-overview-bar span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.month-overview-bar i {
  width: min(46px, 48%);
  min-height: 4px;
  display: block;
  border-radius: 12px 12px 0 0;
  background: var(--bar-color);
  box-shadow: 0 10px 18px rgba(31, 77, 58, 0.12);
  transition: filter 180ms ease, transform 180ms ease;
}

.month-overview-bar em {
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
}

.month-overview-bar:hover i {
  filter: brightness(0.94);
  transform: translateY(-2px);
}

.month-overview-bar::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  width: max-content;
  max-width: 180px;
  transform: translate(-50%, 4px);
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  color: var(--text);
  font-size: 12px;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.month-overview-bar:hover::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.trend-chart {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.trend-chart svg {
  width: 100%;
  height: 230px;
  overflow: visible;
}

.trend-grid line {
  stroke: #edf1ee;
  stroke-width: 0.7;
}

.trend-chart polyline {
  fill: none;
  stroke: var(--line-color);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.trend-chart circle {
  fill: #fff;
  stroke: var(--line-color);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.trend-axis,
.trend-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.trend-axis span,
.trend-legend span {
  color: var(--muted);
  font-size: 12px;
}

.trend-legend {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 12px;
}

.trend-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.trend-legend i {
  width: 18px;
  height: 3px;
  border-radius: 999px;
}

.vehicle-rank {
  display: grid;
  gap: 12px;
}

.rank-row {
  display: grid;
  grid-template-columns: 30px 92px minmax(160px, 1fr) 112px;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 6px 8px;
  background: transparent;
  text-align: left;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.rank-row:hover {
  transform: translateY(-1px);
  border-color: #cfd8d3;
  background: #fbfcfb;
}

.rank-row span {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.rank-row strong {
  color: var(--ink);
}

.rank-row i,
.warning-segments {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2ef;
}

.rank-row b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.rank-row em {
  color: var(--ink);
  text-align: right;
  font-style: normal;
  font-weight: 800;
}

.warning-distribution {
  display: grid;
  gap: 18px;
}

.warning-segments {
  display: flex;
  height: 16px;
}

.warning-segments span {
  min-width: 0;
}

.warning-segments .red {
  background: var(--red);
}

.warning-segments .yellow {
  background: var(--gold);
}

.warning-segments .slate {
  background: #667085;
}

.warning-segments .green {
  background: var(--brand);
}

.stat-panel.wide {
  grid-column: 1 / -1;
}

.stat-panel {
  min-width: 0;
}

.stat-panel .table-wrap {
  overflow-x: hidden;
}

.stat-table {
  table-layout: fixed;
}

.stat-table th,
.stat-table td {
  padding: 8px 9px;
  white-space: normal;
  line-height: 1.35;
  vertical-align: middle;
}

.stat-table th:not(:first-child),
.stat-table td:not(:first-child) {
  text-align: right;
}

.stat-panel.vehicle .stat-table th:first-child,
.stat-panel.vehicle .stat-table td:first-child {
  width: 120px;
}

.stat-panel.project .stat-table th:first-child,
.stat-panel.project .stat-table td:first-child {
  width: 380px;
}

.stat-panel.driver .stat-table th:first-child,
.stat-panel.driver .stat-table td:first-child,
.stat-panel.category .stat-table th:first-child,
.stat-panel.category .stat-table td:first-child {
  width: 120px;
}

.dashboard-lower {
  display: grid;
  grid-template-columns: minmax(320px, 0.78fr) minmax(560px, 1.22fr);
  gap: 18px;
  align-items: stretch;
}

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

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  background: #fff;
}

.compact-table,
.stat-table {
  min-width: 0;
}

.payment-table {
  min-width: 0;
  table-layout: fixed;
}

.payment-table th,
.payment-table td {
  white-space: normal;
}

th,
td {
  padding: 14px 14px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
  font-size: 12px;
}

th {
  position: sticky;
  top: 0;
  height: 46px;
  background: #f9fafb;
  color: var(--muted);
  font-weight: 800;
  user-select: none;
}

th.sortable {
  cursor: pointer;
}

td.wrap {
  min-width: 220px;
  white-space: normal;
  line-height: 1.55;
}

tr:hover td {
  background: #fbfcfb;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  flex-shrink: 0;
  white-space: nowrap;
}

.badge.red {
  color: var(--red);
  border-color: var(--red-line);
  background: var(--red-soft);
}

.badge.yellow {
  color: #b54708;
  border-color: #f59e0b;
  background: var(--gold-soft);
}

.badge.info {
  color: #667085;
  border-color: var(--line);
  background: var(--line-soft);
}

.badge.green {
  color: var(--green);
  border-color: #a7dfb7;
  background: var(--green-soft);
}

.badge.gray {
  color: #53615d;
  border-color: var(--line);
  background: #f3f5f4;
}

.badge.dark {
  color: var(--green);
  border-color: #a7dfb7;
  background: var(--green-soft);
}

.btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 16px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: var(--brand);
  color: var(--brand-strong);
}

.btn.primary {
  border-color: var(--brand);
  background: var(--brand);
  color: white;
}

.btn.primary:hover {
  background: var(--brand-strong);
  color: white;
  box-shadow: 0 8px 18px rgba(15, 77, 66, 0.16);
}

.btn:disabled,
.btn:disabled:hover {
  cursor: not-allowed;
  opacity: 0.72;
  transform: none;
  box-shadow: none;
}

.btn.danger {
  border-color: var(--red-line);
  background: var(--red-soft);
  color: var(--red);
}

.btn.warn {
  border-color: var(--gold-line);
  background: var(--gold-soft);
  color: var(--gold);
}

.btn.ghost {
  border-color: transparent;
  background: transparent;
}

.btn.small {
  min-height: 32px;
  padding: 0 11px;
  border-radius: 10px;
  font-size: 12px;
}

.filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.filters input,
.filters select,
.toolbar input,
.toolbar select,
.mini-input {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 8px 10px;
  color: var(--ink);
  outline: none;
}

.filters .date-filter .date-filter-selects select {
  min-height: 30px;
  border: 0;
  border-radius: 8px;
  padding: 5px 8px;
  background: transparent;
  font-size: 12px;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.list-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}

.list-summary-card {
  min-height: 82px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 22px rgba(24, 33, 31, 0.035);
}

.list-summary-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.list-summary-card strong {
  display: block;
  margin-top: 7px;
  font-size: 20px;
  line-height: 1.2;
}

.list-summary-card.warning strong {
  color: var(--red);
}

.list-summary-card.danger strong {
  color: var(--red);
}

.list-summary-card.yellow strong {
  color: var(--gold);
}

.list-summary-card em {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.expense-list-panel {
  padding: 14px;
}

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

.expense-card {
  display: grid;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 6px 18px rgba(24, 33, 31, 0.035);
}

.expense-card.risk-red {
  border-left-color: var(--red);
}

.expense-card.risk-yellow {
  border-left-color: var(--gold);
}

.expense-card.wait-pay,
.expense-card.wait-approve {
  background: linear-gradient(90deg, rgba(228, 243, 239, 0.55), #fff 28%);
}

.expense-card-top {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 14px;
}

.expense-title {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.expense-title strong {
  font-size: 14px;
  line-height: 1.25;
}

.expense-title span {
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expense-status,
.expense-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.expense-card-body {
  display: grid;
  grid-template-columns: minmax(160px, 0.9fr) minmax(160px, 0.9fr) minmax(260px, 1.45fr) minmax(190px, 0.9fr);
  gap: 10px;
}

.expense-cell,
.expense-amount {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: #fbfcfb;
}

.expense-cell span,
.expense-amount span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}

.expense-cell strong,
.expense-amount strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  line-height: 1.35;
}

.expense-cell em,
.expense-amount em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expense-amount strong {
  font-size: 17px;
}

.expense-warning {
  padding: 8px 10px;
  border: 1px solid #ffd2cc;
  border-radius: 7px;
  background: #fff7f5;
  color: var(--red);
  font-size: 12px;
  line-height: 1.55;
}

.warning-list-panel {
  padding: 16px;
}

.risk-filter-panel,
.export-panel {
  margin-bottom: 16px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 30px rgba(24, 33, 31, 0.04);
}

.risk-filter-panel .filters,
.export-panel .filters {
  margin-bottom: 0;
}

.ledger-panel {
  padding: 0;
  overflow: hidden;
}

.ledger-panel > .panel-header {
  align-items: center;
  margin: 0;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.ledger-panel .actions {
  flex: none;
}

.ledger-filters {
  grid-template-columns: repeat(8, minmax(120px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.ledger-table-wrap {
  border: 0;
  border-radius: 0;
}

.ledger-table {
  min-width: 1180px;
  table-layout: auto;
}

.ledger-table th,
.ledger-table td {
  white-space: nowrap;
}

.ledger-table th:nth-child(1),
.ledger-table td:nth-child(1) {
  width: 148px;
}

.ledger-table th:nth-child(5),
.ledger-table td:nth-child(5),
.ledger-table th:nth-child(6),
.ledger-table td:nth-child(6),
.ledger-table th:nth-child(7),
.ledger-table td:nth-child(7) {
  text-align: right;
}

.ledger-table th:nth-child(8),
.ledger-table td:nth-child(8),
.ledger-table th:nth-child(9),
.ledger-table td:nth-child(9),
.ledger-table th:nth-child(10),
.ledger-table td:nth-child(10) {
  width: 118px;
}

.ledger-table th:last-child,
.ledger-table td:last-child {
  width: 80px;
  text-align: right;
}

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

.warning-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(24, 33, 31, 0.045);
}

.warning-card.risk-red {
  border-left-color: var(--red);
  background: linear-gradient(90deg, rgba(255, 235, 232, 0.66), #fff 28%);
}

.warning-card.risk-yellow {
  border-left-color: var(--gold);
  background: linear-gradient(90deg, rgba(255, 248, 219, 0.72), #fff 28%);
}

.warning-card.risk-info {
  border-left-color: #98a2b3;
}

.warning-card-top {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 14px;
}

.warning-title {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.warning-title span {
  color: var(--muted);
  font-size: 12px;
}

.warning-title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  line-height: 1.25;
}

.warning-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.warning-focus {
  padding: 11px 12px;
  border: 1px solid #ffd2cc;
  border-radius: 7px;
  background: #fffaf8;
}

.warning-card.risk-yellow .warning-focus {
  border-color: #ffd782;
  background: #fffdf3;
}

.warning-card.risk-info .warning-focus {
  border-color: var(--line);
  background: var(--line-soft);
}

.warning-focus span,
.warning-cell span,
.warning-opinion span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

.warning-focus strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
}

.warning-card-body {
  display: grid;
  grid-template-columns: minmax(160px, 0.75fr) minmax(220px, 1.1fr) minmax(260px, 1.3fr) minmax(150px, 0.75fr);
  gap: 10px;
}

.warning-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 2px;
}

.warning-cell {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.72);
}

.warning-cell strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  line-height: 1.35;
}

.warning-cell.wide strong {
  white-space: normal;
}

.warning-cell em {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warning-cell.money strong {
  color: var(--ink);
  font-size: 18px;
}

.warning-opinion {
  padding: 9px 11px;
  border-radius: 7px;
  background: #f6f8f7;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.empty {
  padding: 30px;
  text-align: center;
  color: var(--muted);
}

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

.detail-item {
  min-height: 66px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fcfcfa;
}

.detail-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.detail-item strong {
  display: block;
  line-height: 1.45;
  word-break: break-word;
}

.attachment-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 220px));
  gap: 14px;
  align-items: start;
}

.attachment-card {
  width: 100%;
  min-width: 0;
  max-width: 220px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 12px;
  display: grid;
  grid-template-rows: auto auto auto auto;
  align-content: start;
  gap: 8px;
  overflow: hidden;
}

.attachment-thumb {
  width: 100%;
  height: 132px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.pdf-thumb {
  width: 100%;
  height: 132px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--red);
  font-weight: 800;
}

.attachment-card strong {
  min-width: 0;
  font-size: 14px;
  line-height: 1.45;
  word-break: break-all;
  overflow-wrap: anywhere;
}

.attachment-card span {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.attachment-card .btn {
  width: 100%;
  justify-content: center;
}

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

.timeline-item {
  border-left: 3px solid var(--brand);
  padding: 8px 0 8px 12px;
}

.timeline-item strong {
  display: block;
}

.timeline-item span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.stat-bars {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  grid-template-columns: 92px minmax(120px, 1fr) 92px;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}

.bar-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-track {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--brand);
}

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

.priority-item {
  min-height: 60px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: #fbfcfb;
}

.priority-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.priority-main strong {
  display: block;
  font-size: 13px;
  line-height: 1.25;
}

.priority-main span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.priority-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  max-width: min(440px, calc(100vw - 40px));
  padding: 12px 14px;
  border-radius: var(--radius);
  background: #17211f;
  color: #fff;
  box-shadow: var(--shadow);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(14, 20, 18, 0.42);
}

.modal-card {
  width: min(1160px, 100%);
  max-height: calc(100vh - 44px);
  overflow: auto;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.modal-body {
  padding: 18px;
}

.split-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.45fr);
  gap: 16px;
}

.approval-layout {
  grid-template-columns: minmax(360px, 0.5fr) minmax(0, 1.5fr);
  align-items: start;
}

.approval-management {
  display: grid;
  gap: 20px;
}

.approval-filter-card {
  margin-bottom: 0;
}

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

.approval-filter-grid .date-filter {
  grid-column: span 2;
}

.approval-list-panel,
.approval-detail-panel {
  min-width: 0;
}

.approval-list-panel .table-wrap {
  overflow-x: hidden;
}

.approval-queue-list {
  display: grid;
  gap: 10px;
}

.approval-queue-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 10px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.approval-queue-card:hover,
.approval-queue-card.active {
  border-color: rgba(31, 77, 58, 0.32);
  background: #f9fcfa;
  box-shadow: 0 12px 28px rgba(24, 33, 31, 0.07);
  transform: translateY(-1px);
}

.approval-queue-card span,
.approval-queue-card strong,
.approval-queue-card em {
  grid-column: 1;
  display: block;
  min-width: 0;
}

.approval-queue-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.approval-queue-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.approval-queue-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.approval-queue-card .badge {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center;
}

.approval-table {
  table-layout: fixed;
}

.approval-review-table {
  table-layout: fixed;
  min-width: 1180px;
}

.approval-review-table th,
.approval-review-table td {
  vertical-align: middle;
}

.approval-review-table th:nth-child(1),
.approval-review-table td:nth-child(1) {
  width: 154px;
}

.approval-review-table th:nth-child(2),
.approval-review-table td:nth-child(2) {
  width: 116px;
}

.approval-review-table th:nth-child(6),
.approval-review-table td:nth-child(6),
.approval-review-table th:nth-child(7),
.approval-review-table td:nth-child(7) {
  width: 118px;
}

.approval-review-table th:nth-child(8),
.approval-review-table td:nth-child(8) {
  width: 116px;
}

.approval-review-table th:nth-child(10),
.approval-review-table td:nth-child(10) {
  width: 116px;
}

.reason-cell {
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
}

.approval-table th,
.approval-table td {
  padding: 9px 11px;
  white-space: normal;
  vertical-align: middle;
}

.approval-table th:nth-child(1),
.approval-table td:nth-child(1) {
  width: 170px;
}

.approval-table th:nth-child(2),
.approval-table td:nth-child(2) {
  width: 110px;
}

.approval-table th:nth-child(3),
.approval-table td:nth-child(3) {
  width: 100px;
}

.approval-table th:nth-child(4),
.approval-table td:nth-child(4) {
  width: 120px;
}

.approval-table th:nth-child(5),
.approval-table td:nth-child(5) {
  width: 120px;
}

.approval-table th:nth-child(6),
.approval-table td:nth-child(6) {
  width: 90px;
}

.approval-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.approval-decision-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.08fr) minmax(300px, 0.6fr);
  gap: 16px;
  align-items: start;
}

.approval-info-panel {
  display: grid;
  gap: 14px;
}

.approval-section-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.approval-section-card h3 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 15px;
}

.attachment-review-panel {
  min-height: 100%;
}

.attachment-review-panel .hint {
  margin: -4px 0 12px;
  color: var(--muted);
  font-size: 12px;
}

.detail-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.approval-action-card {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}

.risk-callout {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--red-line);
  border-radius: 14px;
  background: var(--red-soft);
  color: var(--red);
}

.risk-callout strong {
  font-size: 14px;
}

.risk-callout span {
  line-height: 1.55;
}

.decision-amount {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fcfcfa;
}

.decision-amount.subtle strong {
  color: var(--ink);
  font-size: 21px;
}

.decision-amount span,
.decision-amount strong {
  display: block;
}

.decision-amount span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.decision-amount strong {
  margin-top: 8px;
  color: var(--brand);
  font-size: 24px;
  line-height: 1.1;
}

.approval-risk-box {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fcfcfa;
}

.approval-risk-box.red {
  border-color: var(--red-line);
  background: var(--red-soft);
}

.approval-risk-box.yellow {
  border-color: var(--gold-line);
  background: var(--gold-soft);
}

.approval-risk-box span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.approval-risk-box strong {
  color: var(--text);
  font-size: 12px;
  line-height: 1.55;
}

.approval-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.notice {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: #fbfcfb;
  color: var(--muted);
  line-height: 1.6;
}

.notice strong {
  color: #2f3d39;
}

.notice.red {
  color: var(--red);
  border-color: #ffb8b1;
  background: var(--red-soft);
}

.notice.yellow {
  color: var(--gold);
  border-color: #ffd782;
  background: var(--gold-soft);
}

.notice.info {
  color: #667085;
  border-color: var(--line);
  background: var(--line-soft);
}

.rule-grid {
  display: grid;
  gap: 10px;
}

.rule-card {
  display: grid;
  grid-template-columns: 120px repeat(4, minmax(110px, 1fr)) repeat(4, 86px);
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.rule-card strong {
  word-break: keep-all;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.toggle input {
  width: 16px;
  height: 16px;
}

.mobile-menu {
  display: none;
}

.saas-shell {
  min-height: 100vh;
  display: block;
}

@keyframes pageFade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-container {
  width: min(1440px, calc(100vw - 96px));
  margin: 0 auto;
}

.app-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 68px;
  display: block;
  padding: 0;
  background: rgba(250, 250, 247, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.topbar-inner {
  height: 68px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
}

.nav-brand {
  cursor: pointer;
  gap: 10px;
}

.nav-brand .brand-mark {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: none;
  color: var(--brand);
}

.nav-brand .brand-mark img {
  width: 78%;
  height: 78%;
}

.nav-brand h2 {
  margin: 0;
  font-size: 16px;
}

.nav-brand p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.app-nav .nav-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 0;
}

.nav-link {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 999px;
  padding: 0 12px;
  background: transparent;
  color: #374151;
  font-size: 13px;
  white-space: nowrap;
  transition: background 180ms ease, color 180ms ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--brand);
  background: var(--brand-soft);
}

.nav-link span {
  min-width: 18px;
  min-height: 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  color: var(--brand);
  font-size: 11px;
  border: 1px solid var(--line);
}

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

.role-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.content {
  padding: 32px 0 64px;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 32px 0 24px;
  padding: 0;
}

.page-title-block {
  min-width: 0;
}

.page-kicker,
.eyebrow,
.section-heading span,
.import-dropzone span {
  color: var(--brand);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.page-kicker {
  margin-bottom: 8px;
}

.page-title,
.hero h1,
.section-heading h2 {
  margin: 0;
  color: var(--ink);
}

.page-title {
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: 0;
}

.page-subtitle {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
}

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

.page-header-actions > .btn,
.page-header-actions .month-picker-trigger {
  min-height: 44px;
}

.btn {
  border-radius: 12px;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  background: var(--brand);
  border-color: var(--brand);
}

.btn.primary:hover {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
  color: #fff;
}

.btn.ghost {
  background: transparent;
}

.arrow-btn span {
  display: inline-block;
  transition: transform 180ms ease;
}

.arrow-btn:hover span {
  transform: translateX(3px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(440px, 0.95fr);
  gap: 28px;
  align-items: center;
  min-height: 560px;
  padding: 60px 0 42px;
}

.hero-copy h1 {
  max-width: 720px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 650px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero-note {
  max-width: 620px;
  margin-top: 22px;
  padding-left: 14px;
  border-left: 2px solid var(--line);
  color: var(--muted);
  line-height: 1.75;
}

.overview-panel,
.section-block,
.data-table-card,
.import-dropzone {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.overview-panel {
  padding: 24px;
}

.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.live-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--green);
}

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

.stat-card {
  min-height: 112px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.stat-card:hover,
.feature-card:hover,
.chart-card:hover {
  transform: translateY(-3px);
  border-color: #cbd5d1;
  box-shadow: 0 20px 44px rgba(17, 24, 39, 0.08);
}

.stat-card span,
.stat-card em {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.stat-card strong {
  display: block;
  margin: 10px 0 8px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.1;
  animation: numberRise 320ms ease both;
}

@keyframes numberRise {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stat-card.red strong,
.stat-card.risk strong {
  color: var(--red);
}

.stat-card.warn strong {
  color: var(--gold);
}

.stat-card.success strong {
  color: var(--green);
}

.stat-card.money strong {
  color: var(--brand);
}

.stat-card.gray strong {
  color: var(--ink-2);
}

.trust-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 8px 0 64px;
}

.trust-badge {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  color: #374151;
  font-weight: 700;
}

.trust-badge span,
.feature-icon {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
}

.section-block {
  margin-top: 24px;
  padding: 28px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 22px;
}

.section-heading h2 {
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
}

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

.feature-card,
.chart-card {
  min-height: 190px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.feature-card h3 {
  margin: 16px 0 8px;
  font-size: 18px;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.process-timeline {
  display: grid;
  grid-template-columns: repeat(8, minmax(130px, 1fr));
  gap: 0;
  overflow-x: auto;
  padding-bottom: 4px;
}

.process-step {
  position: relative;
  min-width: 130px;
  padding: 0 16px 0 0;
}

.process-step::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 34px;
  right: 8px;
  height: 1px;
  background: var(--line);
}

.process-step:last-child::before {
  display: none;
}

.process-step span {
  position: relative;
  z-index: 1;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--brand);
  font-weight: 900;
}

.process-step strong {
  display: block;
  margin-top: 14px;
  font-size: 14px;
}

.process-step p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

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

.chart-card {
  min-height: 240px;
}

.chart-card h3 {
  margin: 0;
  font-size: 16px;
}

.mini-chart {
  display: grid;
  gap: 13px;
  margin-top: 16px;
}

.chart-row {
  display: grid;
  grid-template-columns: 70px 1fr 34px;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.chart-row div {
  height: 8px;
  border-radius: 999px;
  background: #eef2ef;
  overflow: hidden;
}

.chart-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.chart-row strong {
  color: var(--ink);
  text-align: right;
}

.data-table-card {
  overflow: hidden;
}

.table-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.table-card-head h2 {
  margin: 0;
  font-size: 18px;
}

.table-card-head p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.table-card-head > span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f9fafb;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.table-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.table-tools input {
  flex: 1 1 320px;
}

.table-tools select {
  width: 180px;
}

.saas-table {
  min-width: 0;
  table-layout: fixed;
}

.saas-table th,
.saas-table td {
  padding: 14px 12px;
  white-space: normal;
  vertical-align: middle;
  font-size: 12px;
  line-height: 1.45;
}

.saas-table tr:hover td {
  background: #fbfcfb;
}

.row-risk td {
  background: #fff7f6;
}

.expense-saas-table th:nth-child(1),
.expense-saas-table td:nth-child(1) {
  width: 140px;
}

.expense-saas-table th:nth-child(5),
.expense-saas-table td:nth-child(5),
.expense-saas-table th:nth-child(6),
.expense-saas-table td:nth-child(6) {
  width: 96px;
  text-align: right;
}

.expense-saas-table th:nth-child(7),
.expense-saas-table td:nth-child(7),
.expense-saas-table th:nth-child(8),
.expense-saas-table td:nth-child(8),
.expense-saas-table th:nth-child(9),
.expense-saas-table td:nth-child(9) {
  width: 118px;
}

.expense-saas-table th:nth-child(10),
.expense-saas-table td:nth-child(10) {
  width: 128px;
}

.expense-saas-table th:nth-child(11),
.expense-saas-table td:nth-child(11) {
  width: 130px;
}

.expense-list-panel {
  padding: 0;
}

.expense-list-panel .pagination {
  margin: 0;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.table-actions {
  gap: 6px;
}

.import-dropzone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 24px;
  padding: 28px;
  border-style: dashed;
}

.import-dropzone h2 {
  margin: 8px 0;
  font-size: 24px;
}

.import-dropzone p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.workbench {
  padding-top: 10px;
}

.workbench-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 24px;
}

.workbench-hero-copy,
.today-overview-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.workbench-hero-copy {
  padding: 34px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(31, 77, 58, 0.14);
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.workbench-hero-copy h1 {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--ink);
  font-size: clamp(32px, 3.2vw, 46px);
  line-height: 1.1;
}

.workbench-hero-copy p {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--text);
  line-height: 1.85;
}

.role-context {
  display: grid;
  gap: 6px;
  margin-top: 24px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fcfcfa;
}

.role-context strong {
  color: var(--brand);
  font-size: 16px;
}

.role-context span {
  color: var(--muted);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.today-overview-card {
  padding: 22px;
}

.today-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.today-overview-head span,
.today-overview-head strong {
  display: block;
}

.today-overview-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.today-overview-head strong {
  margin-top: 4px;
  font-size: 18px;
}

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

.overview-metric {
  min-height: 104px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.overview-metric span,
.overview-metric em {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.overview-metric strong {
  display: block;
  margin: 10px 0 7px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.1;
}

.workbench-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.workbench-head h1 {
  margin: 8px 0 0;
  font-size: 34px;
  line-height: 1.15;
}

.workbench-head p {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.workbench-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.workbench-actions input {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: #fff;
}

.workbench-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.workbench-kpis .stat-card {
  min-height: 104px;
  border-radius: 18px;
}

.workbench-kpis .stat-card strong {
  font-size: 22px;
}

.workbench-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 16px;
}

.workbench-panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
}

.workbench-panel.wide {
  grid-column: 1 / -1;
  padding: 0;
  overflow: hidden;
}

.workbench-panel.wide .panel-header {
  padding: 18px 18px 0;
}

.queue-list,
.warning-digest,
.quick-actions {
  display: grid;
  gap: 10px;
}

.queue-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.queue-item strong,
.queue-item span {
  display: block;
}

.queue-item span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.queue-tags {
  display: flex;
  align-items: center;
  gap: 8px;
}

.warning-digest-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  text-align: left;
  transition: transform 180ms ease, border-color 180ms ease;
}

.warning-digest-item:hover {
  transform: translateY(-2px);
  border-color: #cbd5d1;
}

.warning-digest-item .badge {
  grid-row: span 2;
  align-self: start;
}

.warning-digest-item span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.empty-state {
  display: grid;
  gap: 6px;
  min-height: 116px;
  align-content: center;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  color: var(--muted);
  background: #fff;
}

.empty-state strong {
  color: var(--ink);
}

.designed-empty {
  justify-items: center;
  text-align: center;
  padding: 28px;
}

.empty-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f9fafb;
  color: var(--muted);
  font-weight: 900;
}

.designed-empty p {
  max-width: 460px;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.recent-table {
  border-top: 1px solid var(--line);
}

.quick-actions .btn {
  justify-content: center;
}

.dashboard-workbench {
  display: grid;
  gap: 24px;
}

.dashboard-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  min-height: 56px;
  padding: 0;
}

.dashboard-header > div:first-child {
  min-width: 0;
  max-width: 920px;
}

.dashboard-header h1 {
  margin: 0;
  color: var(--ink);
  font-size: 30px;
  line-height: 1.2;
}

.dashboard-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

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

.dashboard-header-actions > .btn {
  min-height: 44px;
}

.dashboard-header .month-picker-trigger {
  min-height: 44px;
  min-width: 164px;
  border-radius: 14px;
  box-shadow: none;
}

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

.metric-card {
  width: 100%;
  height: 116px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.035);
}

.metric-card strong {
  margin: 8px 0 6px;
  font-size: 28px;
}

.metric-card.brand strong,
.metric-card.money strong {
  color: var(--brand);
}

.metric-card.success strong {
  color: var(--green);
}

.metric-card.warn strong {
  color: var(--gold);
}

.metric-card.red {
  border-color: #f3c3bd;
  background: #fffdfc;
}

.metric-card.red strong {
  color: var(--red);
}

.metric-card.gray strong {
  color: var(--ink);
}

.dashboard-core-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 24px;
  align-items: stretch;
}

.dashboard-core-grid.clerk-grid {
  grid-template-columns: minmax(0, 48fr) minmax(0, 52fr);
  align-items: stretch;
}

.clerk-primary-grid .work-card {
  min-height: 326px;
}

.clerk-bottom-grid .work-card {
  min-height: 214px;
}

.dashboard-viz-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
}

.work-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.04);
}

.approval-focus,
.risk-focus {
  min-height: 388px;
}

.work-card-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.work-card-head h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

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

.approval-work-list,
.risk-work-list,
.recent-entry-list,
.simple-expense-list {
  display: grid;
  gap: 8px;
}

.approval-focus .approval-work-list {
  grid-auto-rows: minmax(72px, auto);
}

.approval-work-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 116px 112px 116px;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid transparent;
  border-radius: 14px;
  background: #fff;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.approval-work-row > div:nth-child(3) {
  justify-self: start;
}

.approval-work-row:hover,
.risk-work-row:hover,
.recent-entry-row:hover,
.simple-expense-row:hover,
.category-bar-row:hover,
.status-line:hover,
.quick-action-card:hover {
  transform: translateY(-1px);
  border-color: #cfd8d3;
  background: #fbfcfb;
}

.approval-work-row.risk-red,
.risk-work-row.risk-red {
  border-left-color: var(--red);
  background: #fffdfc;
}

.approval-work-row.risk-yellow,
.risk-work-row.risk-yellow {
  border-left-color: var(--gold);
}

.work-main {
  min-width: 0;
}

.work-main strong,
.recent-entry-row strong,
.simple-expense-row strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.work-main span,
.recent-entry-row span,
.simple-expense-row span,
.risk-meta {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-amount,
.money-cell {
  color: var(--ink);
  font-weight: 800;
  text-align: right;
}

.work-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.risk-work-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  gap: 8px 12px;
  min-height: 76px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid transparent;
  border-radius: 14px;
  background: #fff;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.risk-line {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.risk-line strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.risk-meta {
  grid-column: 1;
}

.risk-work-row > .btn {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
}

.chart-work-card {
  min-height: 310px;
}

.category-structure {
  display: grid;
  gap: 12px;
}

.category-bar-row {
  display: grid;
  grid-template-columns: 104px minmax(160px, 1fr) 112px 54px;
  align-items: center;
  gap: 12px;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 6px 8px;
  background: transparent;
  text-align: left;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.category-bar-row span {
  color: var(--ink);
  font-weight: 700;
}

.category-bar-row i,
.status-segments {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2ef;
}

.category-bar-row b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.category-bar-row strong {
  color: var(--ink);
  text-align: right;
  font-weight: 800;
}

.category-bar-row em {
  color: var(--muted);
  font-style: normal;
  text-align: right;
  font-size: 12px;
}

.status-distribution {
  display: grid;
  gap: 18px;
}

.status-segments {
  display: flex;
  height: 14px;
}

.status-segments span {
  min-width: 0;
}

.status-segments .yellow {
  background: var(--gold);
}

.status-segments .green {
  background: var(--brand);
}

.status-segments .gray {
  background: #98a2b3;
}

.status-lines {
  display: grid;
  gap: 10px;
}

.status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.status-line strong {
  color: var(--ink);
}

.dashboard-table-card {
  padding: 0;
  overflow: hidden;
}

.dashboard-table-card .work-card-head {
  margin: 0;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.dashboard-recent-table {
  min-width: 1060px;
  table-layout: auto;
}

.dashboard-recent-table th:nth-child(5),
.dashboard-recent-table td:nth-child(5) {
  text-align: right;
}

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

.quick-action-card {
  min-height: 108px;
  display: grid;
  gap: 8px;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.quick-action-card.primary {
  border-color: rgba(31, 77, 58, 0.24);
  background: var(--brand-soft);
}

.quick-action-card strong {
  font-size: 15px;
}

.quick-action-card span {
  color: var(--muted);
  line-height: 1.6;
}

.recent-entry-row,
.simple-expense-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 64px;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.recent-entry-row > div:last-child,
.simple-expense-row > div:last-child {
  display: contents;
}

.recent-entry-row .badge,
.simple-expense-row .badge {
  justify-self: end;
}

.recent-entry-row .btn.small,
.simple-expense-row .btn.small,
.approval-work-row .btn.small,
.risk-work-row .btn.small {
  width: 64px;
  min-width: 64px;
  padding: 0 10px;
}

.work-card > .empty-state {
  flex: 1;
  min-height: 144px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1180px) {
  .app-nav {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .app-nav .nav-group,
  .nav-actions {
    justify-content: flex-start;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .workbench-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .workbench-hero,
  .approval-decision-layout,
  .approval-layout {
    grid-template-columns: 1fr;
  }

  .approval-action-card {
    position: static;
  }

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

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

  .workbench-grid {
    grid-template-columns: 1fr;
  }

  .trust-row,
  .feature-grid,
  .chart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kpi-grid {
    grid-template-columns: repeat(3, minmax(170px, 1fr));
  }

  .analytics-kpis {
    grid-template-columns: repeat(3, minmax(170px, 1fr));
  }

  .analytics-grid,
  .analysis-grid,
  .approval-layout {
    grid-template-columns: 1fr;
  }

  .filters {
    grid-template-columns: repeat(3, minmax(130px, 1fr));
  }

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

  .approval-filter-grid .date-filter {
    grid-column: span 3;
  }

  .list-filters {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
  }

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

  .dashboard-lower {
    grid-template-columns: minmax(280px, 0.9fr) minmax(440px, 1.1fr);
  }

  .list-summary {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }

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

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

@media (max-width: 920px) {
  .page-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-header-actions {
    justify-content: flex-start;
  }

  .page-title {
    font-size: 28px;
  }

  .content {
    width: min(calc(100% - 32px), 1280px);
    padding: 24px 0 42px;
  }

  .hero-copy h1 {
    font-size: 42px;
  }

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

  .workbench-hero-copy,
  .today-overview-card {
    padding: 22px;
  }

  .today-overview-grid,
  .approval-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-grid,
  .trust-row,
  .feature-grid,
  .chart-grid {
    grid-template-columns: 1fr;
  }

  .process-timeline {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
  }

  .import-dropzone {
    align-items: flex-start;
    flex-direction: column;
  }

  .form-section {
    padding: 20px;
  }

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

  .login-visual {
    min-height: 360px;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 280px;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .mobile-menu {
    display: inline-flex;
  }

  .grid-2,
  .dashboard-lower,
  .split-panel {
    grid-template-columns: 1fr;
  }

  .kpi-grid,
  .grid-3 {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .list-summary {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }

  .rank-row,
  .category-bar-row {
    grid-template-columns: 1fr;
  }

  .rank-row em,
  .category-bar-row strong,
  .category-bar-row em {
    text-align: left;
  }

  .expense-card-top {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .warning-card-top {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .expense-status,
  .expense-actions,
  .warning-tags {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .page-title {
    font-size: 24px;
  }

  .page-header-actions {
    width: 100%;
  }

  .page-header-actions .month-picker,
  .page-header-actions > .btn {
    flex: 1 1 150px;
  }

  .login-panel,
  .login-visual {
    padding: 26px;
  }

  .login-card {
    padding: 22px;
  }

  .login-visual-main h2 {
    font-size: 32px;
  }

  .topbar {
    padding-left: 14px;
    padding-right: 14px;
  }

  .content {
    width: min(calc(100% - 24px), 1280px);
    padding: 18px 0 34px;
  }

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

  .kpi-grid,
  .grid-3,
  .list-summary,
  .filters,
  .approval-filter-grid,
  .today-overview-grid,
  .approval-summary-strip,
  .quick-logins {
    grid-template-columns: 1fr;
  }

  .approval-filter-grid .date-filter {
    grid-column: 1;
  }

  .workbench-hero-copy h1 {
    font-size: 32px;
  }

  .table-card-head,
  .today-overview-head,
  .panel-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .field,
  .field.small {
    grid-column: 1 / -1;
  }

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

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

  .expense-card-body {
    grid-template-columns: 1fr;
  }

  .warning-card-body {
    grid-template-columns: 1fr;
  }

  .priority-item {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .priority-tags {
    justify-content: flex-start;
  }
}

@media (max-width: 1180px) {
  .dashboard-header {
    flex-direction: column;
  }

  .dashboard-header-actions {
    justify-content: flex-start;
  }

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

  .dashboard-core-grid,
  .dashboard-core-grid.clerk-grid,
  .dashboard-viz-grid {
    grid-template-columns: 1fr;
  }

  .approval-work-row {
    grid-template-columns: minmax(0, 1fr) 112px auto;
  }

  .approval-work-row > .badge,
  .approval-work-row > div:nth-child(3) {
    justify-self: start;
  }

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

@media (max-width: 720px) {
  .dashboard-header h1 {
    font-size: 26px;
  }

  .dashboard-metrics,
  .quick-action-grid {
    grid-template-columns: 1fr;
  }

  .approval-work-row,
  .risk-work-row,
  .recent-entry-row,
  .simple-expense-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .risk-meta,
  .risk-work-row > .btn {
    grid-column: auto;
    grid-row: auto;
  }

  .work-row-actions,
  .recent-entry-row > div:last-child,
  .simple-expense-row > div:last-child {
    justify-content: flex-start;
  }

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

  .category-bar-row strong,
  .category-bar-row em,
  .work-amount {
    text-align: left;
  }

  .ledger-filters {
    grid-template-columns: 1fr;
  }

  .ledger-panel > .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 1024px) {
  .page-container,
  .content.page-container {
    width: calc(100vw - 48px);
  }

  .topbar-inner {
    height: auto;
    min-height: 68px;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px 0;
  }

  .app-nav .nav-group,
  .nav-actions {
    justify-content: flex-start;
  }

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

@media (max-width: 640px) {
  .page-container,
  .content.page-container {
    width: calc(100vw - 32px);
  }

  .dashboard-header-actions {
    width: 100%;
  }

  .dashboard-header-actions .month-picker,
  .dashboard-header-actions > .btn {
    flex: 1 1 160px;
  }
}

/* Enterprise risk-control layout */
.warning-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.warning-metric {
  min-height: 92px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.035);
}

.warning-metric span,
.warning-metric em {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.warning-metric strong {
  display: block;
  margin: 7px 0 5px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: 0;
}

.warning-metric.red strong {
  color: var(--red);
}

.warning-metric.yellow strong,
.warning-metric.orange strong {
  color: var(--gold);
}

.warning-metric.slate strong {
  color: var(--blue);
}

.warning-type-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.03);
}

.warning-type-strip strong {
  display: block;
  font-size: 15px;
}

.warning-type-strip span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.warning-type-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.warning-type-chips button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  background: #f8faf9;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.warning-type-chips button:hover,
.warning-type-chips button.active {
  transform: translateY(-1px);
  border-color: #b7d8c8;
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.warning-type-chips b {
  margin-left: 5px;
  color: inherit;
  font-weight: 800;
}

.warning-control-panel {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.032);
}

.warning-filter-top {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.warning-filter-top .search-input {
  flex: 1 1 auto;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  outline: none;
}

.warning-filter-top .search-input:focus {
  border-color: #b7d8c8;
  box-shadow: 0 0 0 3px rgba(31, 77, 58, 0.08);
}

.warning-filter-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 0;
}

.warning-filter-grid .date-filter {
  min-width: 0;
}

.compact-risk-panel {
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.04);
}

.risk-list-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.risk-list-head h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.risk-list-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.risk-list-head > span {
  flex: none;
  color: var(--muted);
  font-size: 12px;
}

.compact-risk-list {
  display: grid;
  gap: 18px;
  padding: 18px;
  background: #f8faf9;
}

.compact-risk-list .warning-card {
  position: relative;
  display: grid;
  grid-template-columns: 5px minmax(0, 1fr) 230px 300px;
  gap: 18px;
  min-height: 136px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.035);
}

.compact-risk-list .warning-card:last-child {
  border-bottom: 1px solid var(--line);
}

.compact-risk-list .warning-card.risk-red,
.compact-risk-list .warning-card.risk-yellow,
.compact-risk-list .warning-card.risk-info {
  background: #fff;
}

.risk-level-rail {
  width: 5px;
  align-self: stretch;
  border-radius: 999px;
  background: #98a2b3;
}

.warning-card.risk-red .risk-level-rail {
  background: var(--red);
}

.warning-card.risk-yellow .risk-level-rail {
  background: #d97706;
}

.warning-card-main {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 10px;
}

.compact-risk-list .warning-card-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.compact-risk-list .warning-title {
  gap: 4px;
}

.compact-risk-list .warning-title span {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.compact-risk-list .warning-title strong {
  overflow: visible;
  color: var(--ink);
  text-overflow: clip;
  white-space: normal;
  font-size: 15px;
  line-height: 1.35;
}

.compact-risk-list .warning-tags {
  justify-content: flex-end;
}

.warning-risk-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.warning-risk-tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  background: #f8faf9;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.warning-card.risk-red .warning-risk-tags span {
  border-color: #ffd7d2;
  background: #fff7f5;
}

.warning-card.risk-yellow .warning-risk-tags span {
  border-color: #fedf89;
  background: #fffbeb;
}

.compact-risk-list .warning-card-body {
  display: grid;
  grid-template-columns: 126px minmax(168px, 1fr) minmax(210px, 1.25fr) 126px;
  gap: 10px;
}

.compact-risk-list .warning-cell {
  min-width: 0;
  padding: 0 10px 0 0;
  border: 0;
  border-right: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
}

.compact-risk-list .warning-cell:last-child {
  border-right: 0;
}

.compact-risk-list .warning-cell span,
.compact-risk-list .warning-opinion span {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.compact-risk-list .warning-cell strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  line-height: 1.35;
}

.compact-risk-list .warning-cell.wide strong {
  white-space: normal;
}

.compact-risk-list .warning-cell em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.compact-risk-list .warning-cell.money strong {
  color: var(--ink);
  font-size: 17px;
}

.warning-amount-panel {
  min-width: 0;
  align-self: stretch;
  display: grid;
  align-content: center;
  gap: 8px;
  padding-left: 16px;
  border-left: 1px solid var(--line-soft);
}

.warning-amount-block span,
.warning-state-block span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

.warning-amount-block strong {
  display: block;
  color: var(--ink);
  font-size: 23px;
  line-height: 1.1;
}

.warning-amount-block em,
.warning-state-block em {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-style: normal;
}

.warning-state-block {
  display: grid;
  gap: 5px;
  justify-items: start;
}

.warning-state-inline {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.warning-state-block strong {
  color: var(--ink);
  font-size: 13px;
  white-space: nowrap;
}

.compact-risk-list .warning-card-actions {
  align-self: center;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  padding: 0;
  width: 300px;
}

.compact-risk-list .warning-card-actions .badge {
  grid-column: 1 / -1;
  justify-self: end;
  display: none;
}

.compact-risk-list .warning-card-actions .btn.small {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 0 11px;
}

.compact-risk-list .warning-card-actions .btn.ghost {
  color: var(--muted);
}

.compact-risk-list .warning-card-actions .btn.ghost:hover {
  border-color: var(--line);
  background: #f8faf9;
  color: var(--text);
}

.btn.subtle {
  border-color: #d6dde1;
  background: #fff;
  color: var(--blue);
}

.btn.subtle:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
}

.risk-focus .risk-work-list {
  gap: 10px;
}

.risk-focus .risk-work-row {
  min-height: 78px;
  padding: 11px 12px;
  border-radius: 12px;
  box-shadow: none;
}

.risk-work-row.risk-yellow,
.approval-work-row.risk-yellow {
  border-left-color: #d97706;
}

.risk-brief {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.risk-summary-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.risk-summary-head strong {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
  line-height: 1.2;
}

.risk-brief span {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
}

.risk-brief em {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-style: normal;
}

.warning-modal {
  width: min(980px, 100%);
}

.warning-summary-strip {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 4px solid #98a2b3;
  border-radius: 14px;
  background: #fff;
}

.warning-summary-strip.risk-red {
  border-left-color: var(--red);
}

.warning-summary-strip.risk-yellow {
  border-left-color: #d97706;
}

.warning-summary-strip span,
.warning-modal-cell span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

.warning-summary-strip strong {
  display: block;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.35;
}

.warning-summary-strip p {
  margin: 6px 0 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
}

.warning-summary-badges {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.warning-modal-grid {
  display: grid;
  grid-template-columns: 0.75fr 1fr 1.25fr 0.8fr;
  gap: 10px;
  margin-top: 12px;
}

.warning-modal-cell {
  min-width: 0;
  min-height: 76px;
  padding: 11px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fbfcfd;
}

.warning-modal-cell strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  line-height: 1.35;
}

.warning-modal-cell.money strong {
  font-size: 22px;
}

.warning-modal-cell em {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-style: normal;
}

.warning-modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.warning-modal-tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  background: #f8faf9;
  color: var(--muted);
  font-size: 12px;
}

.warning-modal-form {
  margin-top: 14px;
}

.warning-modal-form textarea {
  min-height: 96px;
}

.warning-modal-actions {
  justify-content: flex-end;
  margin-top: 14px;
}

@media (max-width: 1280px) {
  .warning-filter-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .compact-risk-list .warning-card {
    grid-template-columns: 5px minmax(0, 1fr) 280px;
  }

  .warning-amount-panel {
    grid-column: 2;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-left: 0;
    border-left: 0;
  }

  .compact-risk-list .warning-card-actions {
    grid-column: 3;
    grid-row: 1 / span 2;
    display: grid;
    justify-content: flex-end;
    width: 280px;
  }

  .compact-risk-list .warning-card-actions .badge {
    grid-column: 1 / -1;
  }

  .compact-risk-list .warning-card-actions .btn.small {
    width: 100%;
  }
}

@media (max-width: 920px) {
  .warning-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .warning-type-strip,
  .risk-list-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .warning-type-chips {
    justify-content: flex-start;
  }

  .compact-risk-list .warning-card-body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compact-risk-list .warning-card {
    grid-template-columns: 5px minmax(0, 1fr);
  }

  .warning-amount-panel,
  .compact-risk-list .warning-card-actions {
    grid-column: 2;
    grid-row: auto;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .warning-overview-grid,
  .warning-filter-grid,
  .compact-risk-list .warning-card-body,
  .warning-amount-panel,
  .warning-modal-grid {
    grid-template-columns: 1fr;
  }

  .warning-filter-top {
    flex-direction: column;
  }

  .compact-risk-list .warning-card {
    padding: 13px 12px;
  }

  .compact-risk-list .warning-card-top {
    grid-template-columns: 1fr;
  }

  .compact-risk-list .warning-tags,
  .compact-risk-list .warning-card-actions {
    justify-content: flex-start;
  }

  .warning-summary-strip,
  .warning-modal-actions {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Formal Wise-inspired login page */
.login-screen {
  min-height: 100vh;
  padding: 8px;
  display: grid;
  grid-template-columns: clamp(480px, 34vw, 540px) minmax(0, 1fr);
  background: #f6f7f1;
}

.login-visual {
  position: relative;
  min-height: calc(100vh - 16px);
  padding: clamp(34px, 3.6vw, 48px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  background:
    radial-gradient(circle at 18% 12%, rgba(185, 234, 122, 0.2), transparent 26%),
    radial-gradient(circle at 78% 38%, rgba(122, 167, 106, 0.18), transparent 30%),
    linear-gradient(145deg, #132409 0%, #1d3512 48%, #233f18 100%);
  color: #e5f3d6;
  border: 1px solid #e3e6dd;
  border-right: 0;
  border-radius: 10px 0 0 10px;
}

.login-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(229, 243, 214, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(229, 243, 214, 0.05) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.48), transparent 72%);
  opacity: 0.8;
  pointer-events: none;
}

.login-visual::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -210px;
  bottom: -160px;
  border-radius: 999px;
  border: 1px solid rgba(185, 234, 122, 0.18);
  box-shadow: 0 0 0 48px rgba(185, 234, 122, 0.035), 0 0 0 104px rgba(185, 234, 122, 0.025);
  pointer-events: none;
}

.login-visual-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.login-brand-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 62px;
  color: #eff9df;
}

.login-mark-logo {
  display: block;
  width: 76px;
  height: auto;
  object-fit: contain;
}

.login-system-label {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(229, 243, 214, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(229, 243, 214, 0.78);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.login-flow-visual {
  position: relative;
  z-index: 1;
  width: min(100%, 390px);
  margin-top: clamp(72px, 10vh, 96px);
  margin-left: clamp(0px, 1.3vw, 18px);
  padding: 22px;
  border: 1px solid rgba(229, 243, 214, 0.16);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.055)),
    rgba(10, 28, 8, 0.26);
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(6px);
}

.login-flow-visual::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 22px;
  border: 1px solid rgba(185, 234, 122, 0.1);
  pointer-events: none;
}

.login-flow-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  color: rgba(229, 243, 214, 0.72);
  font-size: 13px;
}

.login-flow-header strong {
  color: #b9ea7a;
  font-size: 13px;
}

.login-flow-steps {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
}

.login-flow-step {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  column-gap: 13px;
  align-items: center;
  min-height: 68px;
  padding: 13px 14px;
  border: 1px solid rgba(229, 243, 214, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.075);
}

.login-flow-step span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: rgba(185, 234, 122, 0.16);
  color: #b9ea7a;
  font-size: 13px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.login-flow-step strong {
  color: #f5ffe9;
  font-size: 15px;
  line-height: 1.2;
}

.login-flow-step small {
  margin-top: 4px;
  color: rgba(229, 243, 214, 0.66);
  font-size: 12px;
  line-height: 1.35;
}

.login-brand-copy {
  position: absolute;
  z-index: 2;
  left: clamp(44px, 4.6vw, 72px);
  right: clamp(34px, 4vw, 56px);
  bottom: clamp(76px, 9vh, 104px);
}

.login-brand-copy h1 {
  margin: 0;
  display: grid;
  gap: 2px;
  color: #b9ea7a;
  font-family: "Inter Tight", "Arial Black", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: clamp(56px, 4.8vw, 68px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.04;
}

.login-brand-copy p {
  width: min(420px, 100%);
  margin: 20px 0 0;
  color: rgba(229, 243, 214, 0.84);
  font-size: 15px;
  line-height: 1.55;
}

.login-panel {
  min-height: calc(100vh - 16px);
  display: grid;
  align-items: start;
  justify-items: center;
  padding: clamp(58px, 8vh, 92px) 48px 48px;
  background: #fcfcf8;
  border: 1px solid #e3e6dd;
  border-left: 0;
  border-radius: 0 10px 10px 0;
}

.login-card.login-form {
  width: min(100%, 532px);
  margin: 0;
  padding: clamp(118px, 14vh, 150px) 0 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.login-card.login-form h2 {
  margin: 0;
  text-align: center;
  color: #111111;
  font-size: 34px;
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.login-subtitle {
  margin: 18px 0 38px;
  text-align: center;
  color: #5b5f55;
  font-size: 15px;
}

.login-role-tabs {
  width: 100%;
  height: 48px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 28px;
  padding: 4px;
  border-radius: 999px;
  background: #f2f2ee;
}

.login-role-tabs button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #5f6258;
  font-size: 15px;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.login-role-tabs button:hover {
  color: #17280b;
}

.login-role-tabs button.active {
  color: #17280b;
  background: #b9ea7a;
}

.login-field {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
}

.login-field span {
  color: #44483f;
  font-size: 14px;
  font-weight: 600;
}

.login-field input {
  width: 100%;
  height: 54px;
  padding: 0 16px;
  color: #14170f;
  font-size: 16px;
  border: 1px solid #8c9186;
  border-radius: 12px;
  background: #ffffff;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.login-field input::placeholder {
  color: #9ba094;
}

.login-field input:focus {
  border-color: #17280b;
  box-shadow: 0 0 0 3px rgba(185, 234, 122, 0.35);
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 2px 0 24px;
}

.login-remember {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #17280b;
  font-size: 15px;
  cursor: pointer;
  user-select: none;
}

.login-remember input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.login-remember-box {
  position: relative;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border: 1px solid #31421d;
  border-radius: 5px;
  background: #ffffff;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.login-remember-box::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 5px;
  width: 8px;
  height: 5px;
  border-left: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  opacity: 0;
  transform: rotate(-45deg);
}

.login-remember input:checked + .login-remember-box {
  background: #1f2d10;
  border-color: #1f2d10;
}

.login-remember input:checked + .login-remember-box::after {
  opacity: 1;
}

.login-remember input:focus-visible + .login-remember-box {
  box-shadow: 0 0 0 3px rgba(185, 234, 122, 0.35);
}

.login-remember strong {
  font-weight: 700;
}

.login-support-link {
  color: #17280b;
  font-size: 15px;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.login-submit {
  width: 100%;
  height: 52px;
  margin-top: 0;
  border: 0;
  border-radius: 999px;
  background: #b9ea7a;
  color: #17280b;
  font-size: 16px;
  font-weight: 800;
  transition: background 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
}

.login-submit:hover:not(:disabled) {
  background: #aee46b;
}

.login-submit:active:not(:disabled) {
  transform: translateY(1px);
}

.login-system-note {
  margin: 20px 0 0;
  text-align: center;
  color: #6b6f66;
  font-size: 13px;
}

.login-support-note {
  margin: 8px 0 0;
  text-align: center;
  color: #6b6f66;
  font-size: 13px;
}

.login-support-note span {
  color: #17280b;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

@media (max-width: 900px) {
  .login-screen {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: 360px;
    border-right: 1px solid #e3e6dd;
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
  }

  .login-flow-visual {
    width: min(420px, calc(100% - 24px));
    margin-top: 42px;
  }

  .login-brand-copy {
    bottom: 44px;
  }

  .login-brand-copy h1 {
    font-size: 46px;
  }

  .login-panel {
    min-height: auto;
    padding: 48px 24px 56px;
    border-left: 1px solid #e3e6dd;
    border-radius: 0 0 10px 10px;
  }

  .login-card.login-form {
    padding-top: 0;
  }
}

@media (max-width: 640px) {
  .login-screen {
    padding: 0;
  }

  .login-visual {
    min-height: 342px;
    padding: 24px;
    border-radius: 0;
  }

  .login-visual-top {
    align-items: flex-start;
  }

  .login-system-label {
    display: none;
  }

  .login-flow-visual {
    display: none;
  }

  .login-brand-copy {
    left: 28px;
    right: 28px;
    bottom: 32px;
  }

  .login-brand-copy h1 {
    font-size: 40px;
  }

  .login-brand-copy p {
    margin-top: 12px;
    font-size: 14px;
  }

  .login-panel {
    padding: 38px 20px 48px;
    border-radius: 0;
  }

  .login-card.login-form {
    width: 100%;
  }

  .login-options {
    margin-bottom: 22px;
  }

  .login-brand-chip {
    width: 66px;
    height: 54px;
  }

  .login-mark-logo {
    width: 66px;
  }

  .login-card.login-form h2 {
    font-size: 30px;
  }
}
