:root {
  --brand: #0f4c3a;
  --brand-light: #1a6b52;
  --gold: #c4a052;
  --bg: #f4f6f5;
  --surface: #ffffff;
  --border: #e2e8e5;
  --text: #1a2e28;
  --text-secondary: #5c6f66;
  --danger: #c0392b;
  --warn: #b8860b;
  --ok: #1a7a4a;
  --sidebar-w: 280px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.console-layout {
  display: flex;
  min-height: 100vh;
}

.console-sidebar {
  width: var(--sidebar-w);
  background: var(--brand);
  color: #fff;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.console-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.console-sidebar__brand-text {
  min-width: 0;
}

.console-sidebar__title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
}

.console-sidebar__sub {
  margin-top: 3px;
  font-size: 11px;
  letter-spacing: 0.02em;
  opacity: 0.72;
}

/* Shared brand mark — circular plate, never stretch */
.brand-mark {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255, 252, 247, 0.96);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
}

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

.brand-mark--sm { width: 42px; height: 42px; }
.brand-mark--md { width: 48px; height: 48px; }
.brand-mark--lg {
  width: 76px;
  height: 76px;
  margin: 0 auto 14px;
  box-shadow: 0 2px 10px rgba(15, 76, 58, 0.12);
}

.console-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}

.console-nav__group { margin: 0 0 12px; }
.month-cycle-hint { display:block; margin-top:6px; font-size:12px; line-height:1.5; font-weight:400; color:var(--text-secondary); max-width:300px; }
.console-nav__label {
  padding: 4px 20px 5px;
  color: rgba(255,255,255,.48);
  font-size: 11px;
  font-weight: 600;
}

.console-nav a {
  display: block;
  padding: 10px 20px;
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  font-size: 14px;
  border-left: 3px solid transparent;
}

.console-nav a:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
  text-decoration: none;
}

.console-nav a.active {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-left-color: var(--gold);
  font-weight: 600;
}

.console-sidebar__foot {
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 12px;
  opacity: 0.75;
}

.console-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.console-page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.console-page-actions:empty {
  display: none;
}

.console-content {
  padding: 16px;
  flex: 1;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
}

.stat-card__val {
  font-size: 24px;
  font-weight: 700;
  color: var(--brand);
  line-height: 1.2;
}

.stat-card__label {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-secondary);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 16px;
}

.panel__head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel__title {
  font-size: 15px;
  font-weight: 600;
}

.panel__body {
  padding: 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table th {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  background: #f8faf9;
}

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

.table-scroll { overflow-x: auto; }
.table-scroll .data-table { min-width: 780px; }
.member-applications-table .member-status { min-width: 88px; white-space: nowrap; }
.member-applications-table .member-status .badge { white-space: nowrap; }
.enterprise-list-table { min-width: 1400px; table-layout: fixed; }
.enterprise-list-table__name { width: 245px; }
.enterprise-list-table__contact { width: 125px; }
.enterprise-list-table__team { width: 86px; }
.enterprise-list-table__status { width: 90px; }
.enterprise-list-table__recommender { width: 72px; }
.enterprise-list-table__donation { width: 70px; }
.enterprise-list-table__submitter { width: 72px; }
.enterprise-list-table__actions { width: 185px; }
.enterprise-list-table th:nth-child(n+4),
.enterprise-list-table td:nth-child(n+4),
.enterprise-list-table td:nth-child(9) .btn { white-space: nowrap; }
.enterprise-list-table td:nth-child(3) { overflow-wrap: anywhere; }
.enterprise-list-table td:nth-child(4),
.enterprise-list-table td:nth-child(6),
.enterprise-list-table td:nth-child(7),
.enterprise-list-table td:nth-child(8) { overflow: hidden; text-overflow: ellipsis; }
.enterprise-list-table td:nth-child(5) .badge { white-space: nowrap; }
.enterprise-list-table th:nth-child(9) { text-align: center; }
.enterprise-list-table td:nth-child(9) { text-align: right; }

.console-workspace-tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 16px;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.console-workspace-tabs button {
  flex: 0 0 auto;
  padding: 8px 14px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.console-workspace-tabs button.is-active {
  background: var(--brand);
  color: #fff;
  font-weight: 600;
}

.console-drawer[hidden] { display: none; }
.console-drawer {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  justify-content: flex-end;
  background: rgba(13, 35, 29, .36);
  opacity: 0;
  transition: opacity .18s ease;
}
.console-drawer.is-open { opacity: 1; }
.console-drawer__panel {
  display: flex;
  width: min(620px, 100vw);
  height: 100%;
  flex-direction: column;
  background: var(--surface);
  box-shadow: -12px 0 30px rgba(15, 45, 35, .16);
  transform: translateX(100%);
  transition: transform .18s ease;
}
.console-drawer.is-open .console-drawer__panel { transform: translateX(0); }
.console-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.console-drawer__title { font-size: 16px; font-weight: 700; }
.console-drawer__close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.console-drawer__close:hover { background: #eef2f0; }
.console-drawer__body { min-height: 0; flex: 1; overflow-y: auto; padding: 20px; }
.console-no-scroll { overflow: hidden; }

.order-review { width: 100%; margin: 0; }
.order-review__header { margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.order-review__back { display: inline-block; margin-bottom: 16px; font-size: 13px; }
.order-review__title-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.order-review__title-row > div { min-width: 0; }
.order-review__identity { margin-top: 6px; color: var(--text-secondary); font-size: 12px; overflow-wrap: anywhere; }
.order-review__project { margin: 0; font-size: 21px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.order-review__status { flex-shrink: 0; padding: 6px 12px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.order-review__decision { margin-bottom: 28px; padding: 18px 20px 20px; border-top: 2px solid var(--brand); border-bottom: 1px solid var(--border); background: #f0f5f2; }
.order-review__decision-head, .order-review__overview-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.order-review__decision-head h2, .order-review__overview-head h2 { margin: 0; font-size: 16px; line-height: 1.4; }
.order-review__warning { margin: 10px 0 0; color: var(--warn); font-size: 13px; }
.order-review__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 16px; }
.order-review__actions .btn { min-height: 38px; white-space: nowrap; }
.order-review__actions .btn--primary { font-weight: 600; }
.order-review__reject { display: flex; flex: 1 1 350px; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; padding-left: 20px; border-left: 1px solid var(--border); }
.order-review__reject label { flex: 0 0 auto; color: var(--text-secondary); font-size: 13px; }
.order-review__reject .form-control { flex: 1 1 180px; width: auto; min-width: 0; max-width: 320px; background: var(--surface); }
.order-review__overview { margin-bottom: 24px; border: 1px solid var(--border); background: var(--surface); }
.order-review__overview-head { padding: 13px 18px; border-bottom: 1px solid var(--border); background: #f8faf9; }
.order-review__summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 14px 0; }
.order-review__summary-item { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 3px 18px; font-size: 13px; color: var(--text-secondary); }
.order-review__summary-item + .order-review__summary-item { border-left: 1px solid var(--border); }
.order-review__summary-item .badge { margin-left: auto; white-space: nowrap; }
.order-review__columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.order-review__section { min-width: 0; padding: 0 0 20px; border-bottom: 1px solid var(--border); }
.order-review__section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 54px; margin-bottom: 14px; padding: 10px 14px; border-left: 3px solid var(--brand); background: #eaf1ed; }
.order-review__section-head h3 { margin: 0; font-size: 15px; line-height: 1.4; }
.order-review__section-head .btn { flex-shrink: 0; white-space: nowrap; }
.order-review__facts { margin: 0; }
.order-review__facts > div { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 12px; padding: 8px 0; font-size: 13px; }
.order-review__facts dt { color: var(--text-secondary); }
.order-review__facts dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.order-review__proofs { display: flex; flex-wrap: wrap; gap: 12px; }
.order-review__proofs a { display: block; width: 144px; height: 108px; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; background: var(--surface); }
.order-review__proofs img { display: block; width: 100%; height: 100%; object-fit: contain; }
.order-review__empty { margin: 0; color: var(--text-secondary); font-size: 13px; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.badge--ok { background: #e8f5ee; color: var(--ok); }
.badge--warn { background: #fff8e6; color: var(--warn); }
.badge--danger { background: #fdecea; color: var(--danger); }
.badge--muted { background: #eef2f0; color: var(--text-secondary); }

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
}

.tabs a {
  padding: 8px 14px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
}

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

.btn {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover { background: #f0f4f2; text-decoration: none; }

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

.btn--primary:hover { background: var(--brand-light); }

.btn--danger {
  background: #fff;
  border-color: var(--danger);
  color: var(--danger);
}

.btn-sm { padding: 4px 10px; font-size: 12px; }

.inline-form { display: inline; }

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

/* Login page */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f4c3a 0%, #1a3d32 50%, #0a2e24 100%);
}

.login-card {
  width: 400px;
  background: var(--surface);
  border-radius: 12px;
  padding: 36px 32px 28px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.login-card__brand {
  text-align: center;
  margin-bottom: 8px;
}

.login-card h1 {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 700;
  color: var(--brand);
  line-height: 1.35;
}

.login-card__desc {
  margin: 0 0 22px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.login-card p {
  margin: 0 0 24px;
  color: var(--text-secondary);
  font-size: 13px;
}

.form-group { margin-bottom: 16px; }

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
}

.form-group input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(15,76,58,0.12);
}

.login-card .btn--primary {
  width: 100%;
  padding: 11px;
  font-size: 15px;
  margin-top: 8px;
}

.login-hint {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
}

.errorlist {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  color: var(--danger);
  font-size: 13px;
}

/* Rules page */
.rule-version {
  font-size: 13px;
  color: var(--text-secondary);
}

.rule-panel {
  padding: 8px 18px 18px;
}

.rule-section {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.rule-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.rule-section__head {
  margin-bottom: 12px;
}

.rule-section__title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--brand);
}

.rule-section__summary {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.rule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

.rule-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: #f8faf9;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.rule-item__label {
  font-size: 13px;
  color: var(--text);
  line-height: 1.4;
}

.rule-item__value {
  flex-shrink: 0;
}

.profile-panel {
  padding: 18px;
}

.profile-card__name {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
}

.profile-card__short {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.profile-card__slogan {
  margin: 0 0 8px;
  color: var(--brand);
  font-weight: 500;
}

.profile-card__intro {
  margin: 0 0 14px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.profile-meta {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.profile-meta__row {
  padding: 10px 12px;
  background: #f8faf9;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.profile-meta dt {
  margin: 0 0 4px;
  font-size: 12px;
  color: var(--text-secondary);
}

.profile-meta dd {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

/* Dashboard enhanced */
.dash-section { margin-bottom: 24px; }
.dash-section__title { margin: 0 0 12px; font-size: 15px; font-weight: 700; color: var(--brand); }
.reports-workspace { width: 100%; margin: 0; }
.report-summary { padding: 24px; border: 1px solid var(--border); border-top: 3px solid var(--brand); border-radius: 8px; background: var(--surface); }
.report-summary__heading, .report-summary__total { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.report-summary__heading h2 { margin: 0; font-size: 16px; }
.report-summary__heading > span { font-size: 13px; color: var(--text-secondary); }
.report-summary__total { margin: 22px 0; }
.report-summary__total > div:first-child > strong { display: block; font-size: 40px; line-height: 1.25; font-variant-numeric: tabular-nums; color: var(--brand); overflow-wrap: anywhere; }
.report-summary__total > div:first-child > span { display: block; margin-top: 8px; font-size: 13px; color: var(--text-secondary); }
.report-summary__count { text-align: right; font-size: 15px; }
.report-summary__count > strong { font-size: 24px; }
.report-summary a { color: var(--brand); font-size: 13px; }
.report-summary__count > a { display: block; margin-top: 10px; }
.report-summary__composition-title { font-size: 13px; font-weight: 500; color: var(--text-secondary); margin: 0 0 12px; }
.report-summary__composition { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.report-summary__composition > div { padding: 18px 20px; background: #f4f7f6; border: 1px solid #e8eeeb; border-radius: 6px; min-width: 0; }
.report-summary__composition h3 { margin: 0; font-size: 14px; }
.report-summary__composition p { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; margin: 10px 0; }
.report-summary__composition p > strong { font-size: 24px; color: var(--brand); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.report-summary__composition p > span, .report-summary__composition small { font-size: 13px; color: var(--text-secondary); }
.report-summary__composition small, .report-summary__composition a { display: block; }
.report-summary__composition a { margin-top: 12px; }
.report-rules { margin: 14px 0 24px; font-size: 13px; color: var(--text-secondary); line-height: 1.7; }
.report-rules > summary { cursor: pointer; width: max-content; color: var(--brand); }
.report-rules p { margin: 8px 0; }
.reports-section__period { margin-left: 8px; font-size: 12px; font-weight: 400; color: var(--text-secondary); }
.reports-section__summary { margin-top: 14px; padding: 10px 12px; background: #f4f7f6; font-size: 14px; }
.reports-section__summary > strong { margin-left: 10px; color: var(--brand); }
@media (max-width: 640px) {
  .report-summary { padding: 18px 16px; }
  .report-summary__total > div:first-child > strong { font-size: 32px; }
  .report-summary__count { text-align: left; }
  .report-summary__composition { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .report-summary__composition > div { padding: 14px 16px; }
  .reports-section__summary > strong { display: block; margin: 5px 0 0; }
}
.reports-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px; margin-bottom: 20px; }
.reports-toolbar__filter, .reports-toolbar__links { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.reports-toolbar__filter label { color: var(--text-secondary); font-size: 13px; }
.reports-toolbar__filter input { width: 110px; }
.reports-toolbar__filter select { width: 130px; }
.reports-toolbar__filter input[type="date"] { width: 145px; }
.reports-overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 20px; border-top: 2px solid var(--brand); border-bottom: 1px solid var(--border); background: var(--surface); }
.reports-overview > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px; min-width: 0; padding: 18px 22px; }
.reports-overview > div + div { border-left: 1px solid var(--border); }
.reports-overview span { flex-basis: 100%; color: var(--text-secondary); font-size: 13px; }
.reports-overview strong { font-size: 26px; line-height: 1.25; }
.reports-overview small { color: var(--text-secondary); font-size: 12px; }
.statistic-note { margin: 12px 0 20px; color: var(--text-secondary); font-size: 13px; line-height: 1.7; }
.table-scroll .broadcast-table { min-width: 1280px; }
.broadcast-table td:nth-child(2), .broadcast-table td:nth-child(6) { white-space: nowrap; }
.broadcast-table td:nth-child(3), .broadcast-table td:nth-child(4) { min-width: 140px; max-width: 220px; overflow-wrap: anywhere; }
.reports-index { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.reports-sort { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.reports-section { min-width: 0; margin-bottom: 20px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); scroll-margin-top: 16px; }
.reports-section__permission { padding: 0 20px; color: var(--text-secondary); }
.reports-section[hidden] { display: none; }
.reports-section__header { padding: 18px 20px; border-bottom: 1px solid var(--border); }
.reports-section__header h2 { margin: 0; font-size: 16px; line-height: 1.4; }
.reports-section__header p { margin: 6px 0 0; color: var(--text-secondary); font-size: 12px; line-height: 1.5; }
.table-scroll .reports-table { min-width: 740px; }
.table-scroll .reports-table--teams { min-width: 1020px; }
.reports-table th { white-space: nowrap; }
.reports-table td { overflow-wrap: anywhere; }
.reports-table td:first-child { width: 74px; }
.reports-table td:nth-child(2) { min-width: 140px; }
.reports-table__number, .reports-table__amount { font-variant-numeric: tabular-nums; white-space: nowrap; }
.reports-table__number { font-weight: 700; }
.reports-table__amount { font-weight: 600; color: var(--brand); }
.reports-rank { display: inline-grid; width: 28px; height: 28px; place-items: center; border-radius: 4px; background: #eef2f0; font-size: 13px; font-weight: 700; }
.reports-rank--first { background: #f9efcf; color: #77560b; }
.reports-details summary { width: max-content; max-width: 100%; color: var(--brand); font-size: 13px; cursor: pointer; }
.reports-details ul { margin: 10px 0 0; padding: 0; list-style: none; }
.reports-details li { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 8px 0; border-top: 1px solid var(--border); font-size: 12px; }
.reports-details li span { color: var(--text-secondary); }
.dash-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.stat-card--link { text-decoration: none; color: inherit; transition: box-shadow .15s, transform .15s; }
.stat-card--link:hover { box-shadow: 0 6px 20px rgba(15,76,58,.1); transform: translateY(-1px); }

.amount-bars { padding: 20px 22px; display: flex; flex-direction: column; gap: 16px; }
.amount-bar-row { display: grid; grid-template-columns: 140px 1fr 120px; align-items: center; gap: 14px; }
.amount-bar-row__label { font-size: 13px; font-weight: 600; color: var(--text); }
.amount-bar-row__val { font-size: 14px; font-weight: 700; color: var(--gold); text-align: right; }
.amount-bar-track { height: 10px; border-radius: 999px; background: #e8f0ec; overflow: hidden; }
.amount-bar-fill { height: 100%; border-radius: 999px; min-width: 8px; }
.amount-bar-fill--verified { background: linear-gradient(90deg, var(--brand), var(--brand-light)); }
.amount-bar-fill--referrer { background: linear-gradient(90deg, #1a6b52, #3d8a6d); }
.amount-bar-fill--receiver { background: linear-gradient(90deg, #2d7a5e, #5aa080); }
.amount-bar-fill--supplement { background: linear-gradient(90deg, var(--gold), #e8d4a8); }

.panel--bars { margin-bottom: 0; }
.panel__body--padded { padding: 16px 18px; }
.todo-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.todo-row:last-child { border-bottom: none; }
.data-table--compact th, .data-table--compact td { padding: 8px 12px; font-size: 12px; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-bottom: 16px;
}
.toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}
.filter-form .form-control {
  width: auto;
  min-width: 140px;
  max-width: 260px;
}
.filter-form input[type="search"].form-control {
  min-width: 200px;
  flex: 1 1 200px;
  max-width: 280px;
}
.filter-form select.form-control {
  min-width: 132px;
  max-width: 180px;
  flex: 0 0 auto;
}
.action-cell { white-space: nowrap; }
.action-cell .btn { margin-right: 4px; }

.form-control, .edit-form input[type="text"], .edit-form input[type="password"], .edit-form input[type="date"], .edit-form input[type="email"], .edit-form input[type="number"], .edit-form select, .edit-form textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; font-family: inherit;
}
.edit-form input[type="checkbox"] { width: auto; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.staff-account-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.enterprise-classification-grid { align-items: start; margin-bottom: 8px; }
.enterprise-form-column { min-width: 0; }
.enterprise-form-column select[multiple] { min-height: 150px; }
.enterprise-edit { width: 100%; margin: 0; }
.enterprise-edit__header { padding: 4px 0 22px; border-bottom: 1px solid var(--border); }
.enterprise-edit__header > a:first-child { font-size: 13px; }
.enterprise-edit__heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 15px; }
.enterprise-edit__heading h2 { margin: 0; font-size: 21px; line-height: 1.4; overflow-wrap: anywhere; }
.enterprise-edit__heading p { margin: 5px 0 0; color: var(--text-secondary); font-size: 13px; }
.enterprise-edit__heading .badge { flex-shrink: 0; }
.enterprise-edit__template { display: inline-block; margin-top: 12px; font-size: 13px; }
.enterprise-edit > .flash { margin-top: 16px; }
.enterprise-edit__layout { display: grid; grid-template-columns: 166px minmax(0, 1fr); gap: 28px; margin-top: 20px; }
.enterprise-edit__nav { position: sticky; top: 20px; display: flex; height: max-content; flex-direction: column; gap: 2px; border-left: 1px solid var(--border); }
.enterprise-edit__nav a { display: block; padding: 10px 14px; border-left: 2px solid transparent; color: var(--text-secondary); font-size: 13px; text-decoration: none; }
.enterprise-edit__nav a:hover, .enterprise-edit__nav a:focus-visible { border-left-color: var(--brand); background: #eef4f0; color: var(--brand); }
.enterprise-edit__main { min-width: 0; }
.enterprise-edit__section { margin-bottom: 28px; scroll-margin-top: 20px; }
.enterprise-edit__section-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding: 12px 14px; border-left: 3px solid var(--brand); background: #eaf1ed; }
.enterprise-edit__section-heading span { color: var(--text-secondary); font-size: 12px; font-weight: 700; }
.enterprise-edit__section-heading h3 { margin: 0; font-size: 15px; line-height: 1.4; }
.enterprise-edit__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; padding: 0 4px 25px; border-bottom: 1px solid var(--border); }
.enterprise-edit__fields .form-group { min-width: 0; margin: 0; }
.enterprise-edit__fields .form-group label { display: block; margin-bottom: 7px; }
.enterprise-edit__fields .form-group select, .enterprise-edit__fields .form-group textarea { width: 100%; max-width: 100%; }
.enterprise-edit__fields .errorlist { margin: 6px 0 0; padding-left: 18px; color: var(--danger); font-size: 12px; }
.enterprise-edit__required { color: var(--danger); }
.enterprise-edit__check { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.enterprise-edit__check label { margin: 0 !important; }
.enterprise-edit__check input { margin: 0; }
.enterprise-edit .store-photo-section { margin: 0; padding: 0 4px 24px; border: 0; border-bottom: 1px solid var(--border); background: none; }
.enterprise-edit .store-photo-section__head { align-items: center; }
.enterprise-edit .store-photo-section__head p { margin: 0; font-size: 13px; }
.enterprise-edit__actions { position: sticky; z-index: 3; bottom: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; padding: 14px 0; border-top: 1px solid var(--border); background: var(--surface); }
.enterprise-edit__actions .btn { white-space: nowrap; }
.enterprise-edit__actions .btn:disabled { opacity: .5; cursor: not-allowed; }
.form-group--full { grid-column: 1 / -1; }
.form-actions { margin-top: 20px; display: flex; gap: 10px; }
.form-hint { margin: 0 0 16px; font-size: 13px; color: var(--text-secondary); }
.voucher-previews { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.voucher-preview img { display: block; width: 72px; height: 72px; object-fit: cover; border: 1px solid var(--border); border-radius: 4px; }
.voucher-group { margin-bottom: 22px; }
.voucher-group h3 { font-size: 14px; margin: 0 0 12px; }
.voucher-group > input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.voucher-preview { position: relative; }
.voucher-preview--existing span { display: block; font-size: 12px; margin-top: 4px; }
.voucher-preview__remove { position: absolute; top: 2px; right: 2px; border: 0; border-radius: 3px; background: #fff; color: var(--danger); cursor: pointer; }

.console-form-section {
  margin: 0 0 16px;
  padding: 0 16px 16px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fbfcfb;
}
.console-form-section summary {
  padding: 13px 0;
  color: var(--brand);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.console-form-section .form-grid { padding-top: 4px; }
.console-form-section .store-photo-section { margin-bottom: 0; }

.flash-messages { margin-bottom: 16px; }
.flash { padding: 10px 14px; border-radius: 6px; font-size: 13px; margin-bottom: 8px; }
.flash--success { background: #e8f5ee; color: var(--ok); border: 1px solid #c8e6d4; }
.flash--error { background: #fdecea; color: var(--danger); border: 1px solid #f5c6c2; }
.flash--info { background: #eef4f8; color: #0c2d43; border: 1px solid #c5d6e0; }
.flash--warning { background: #fff6e5; color: var(--warn); border: 1px solid #f0d9a8; }

@media (max-width: 1100px) {
  .enterprise-edit__layout { grid-template-columns: 1fr; gap: 14px; }
  .enterprise-edit__nav { position: static; flex-direction: row; overflow-x: auto; border-left: 0; border-bottom: 1px solid var(--border); }
  .enterprise-edit__nav a { flex: 0 0 auto; border-left: 0; border-bottom: 2px solid transparent; }
  .enterprise-edit__nav a:hover, .enterprise-edit__nav a:focus-visible { border-left-color: transparent; border-bottom-color: var(--brand); }
  .dash-grid-2 { grid-template-columns: 1fr; }
  .order-review__columns { grid-template-columns: 1fr; gap: 20px; }
  .amount-bar-row { grid-template-columns: 110px 1fr 90px; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .reports-overview > div { padding: 14px 10px; }
  .reports-overview strong { font-size: 21px; }
  .reports-toolbar__filter, .reports-toolbar__links { width: 100%; }
  .enterprise-edit__fields { grid-template-columns: 1fr; }
  .enterprise-edit__heading { align-items: flex-start; flex-wrap: wrap; }
  .enterprise-edit__actions .btn { white-space: normal; }
  .order-review__section-head { flex-wrap: wrap; }
  .order-review__section-head .btn { margin-left: auto; }
  .staff-account-columns { grid-template-columns: 1fr; }
  .order-review__title-row { align-items: flex-start; flex-wrap: wrap; gap: 10px; }
  .order-review__decision { padding: 16px; }
  .order-review__reject { flex-basis: 100%; padding: 14px 0 0; border-left: 0; border-top: 1px solid var(--border); }
  .order-review__reject .form-control { max-width: none; }
  .order-review__summary { grid-template-columns: 1fr; }
  .order-review__summary { padding: 4px 18px; }
  .order-review__summary-item { padding: 10px 0; border-left: 0; }
  .order-review__summary-item + .order-review__summary-item { border-left: 0; border-top: 1px solid var(--border); }
  .order-review__facts > div { grid-template-columns: 72px minmax(0, 1fr); gap: 8px; }
}
