:root {
  --ink: #1f2728;
  --muted: #74807b;
  --line: #d9d6cf;
  --paper: #f8f7f3;
  --panel: #ffffff;
  --accent: #587068;
  --accent-2: #9b855e;
  --mint: #8ee5c2;
  --deep-teal: #063e45;
  --gold: #c8a96a;
  --silver: #d8ddd9;
  --rose: #b8a7a0;
  --sage: #8b9b8e;
  --warn: #b07842;
  --danger: #b23b3b;
  --soft: #f0f2ed;
  --shadow: 0 22px 60px rgba(55, 58, 54, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(200, 169, 106, 0.16), transparent 28%),
    linear-gradient(135deg, #ecefeb 0%, #e3e8e6 45%, #eee9e1 100%);
  font-family: Arial, "Microsoft YaHei", sans-serif;
}

[hidden] {
  display: none !important;
}

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

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.auth-gate {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(520px, 1.15fr) minmax(420px, 0.85fr);
  align-items: stretch;
  background: #f4f7f8;
}

.auth-hero {
  min-height: 100vh;
  padding: clamp(28px, 5vw, 72px);
  color: white;
  background:
    radial-gradient(circle at 78% 68%, rgba(104, 248, 195, 0.5), transparent 26%),
    radial-gradient(circle at 74% 54%, rgba(200, 169, 106, 0.28), transparent 22%),
    linear-gradient(145deg, rgba(4, 43, 49, 0.98), rgba(5, 84, 82, 0.95) 48%, rgba(49, 189, 149, 0.88)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.07) 0, rgba(255, 255, 255, 0.07) 1px, transparent 1px, transparent 72px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05) 0, rgba(255, 255, 255, 0.05) 1px, transparent 1px, transparent 72px);
  background-size: cover;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 36px;
}

.auth-brand .brand-mark {
  background: transparent;
}

.auth-brand span {
  color: rgba(255, 255, 255, 0.72);
}

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

.auth-copy .eyebrow {
  color: #cde7dc;
  letter-spacing: 0;
  text-transform: none;
}

.auth-copy h1 {
  margin: 12px 0 18px;
  font-size: clamp(42px, 5.4vw, 82px);
  line-height: 1.06;
  max-width: 820px;
}

.auth-copy h1 strong,
.auth-copy h1 em {
  color: var(--mint);
  font-style: normal;
}

.auth-visual {
  position: relative;
  width: min(360px, 80vw);
  height: 230px;
  margin-top: 36px;
}

.glass-card {
  position: absolute;
  display: grid;
  align-content: space-between;
  width: 210px;
  height: 132px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.86);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(143, 236, 202, 0.24));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(14px);
}

.card-back {
  left: 94px;
  top: 10px;
  transform: rotate(-4deg);
}

.card-front {
  left: 36px;
  top: 82px;
  transform: rotate(-10deg);
  background: linear-gradient(135deg, rgba(33, 207, 159, 0.42), rgba(255, 255, 255, 0.16));
}

.auth-copy p:last-child {
  margin: 0;
  max-width: 650px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 18px;
  line-height: 1.75;
}

.auth-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-points span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 0 12px;
  color: rgba(255, 255, 255, 0.84);
  background: rgba(255, 255, 255, 0.08);
}

.auth-card {
  align-self: center;
  width: min(520px, calc(100% - 48px));
  margin: 32px auto;
  padding: 26px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 4px;
  background: #f2f6f7;
  border-radius: 8px;
}

.auth-tab {
  min-height: 40px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
}

.auth-tab.active {
  background: white;
  color: var(--ink);
  box-shadow: 0 1px 5px rgba(34, 48, 56, 0.12);
}

.auth-mode {
  display: none;
  margin-top: 24px;
  gap: 14px;
}

.auth-mode.active {
  display: grid;
}

.auth-mode h2 {
  margin: 0;
  font-size: 26px;
}

.auth-mode p {
  margin: -4px 0 4px;
  color: var(--muted);
  line-height: 1.55;
}

.auth-message {
  min-height: 22px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.auth-message.warn {
  color: var(--danger);
}

.auth-gate {
  grid-template-columns: minmax(620px, 55vw) minmax(440px, 45vw);
  background:
    radial-gradient(circle at 93% 93%, rgba(6, 62, 69, 0.07), transparent 14%),
    radial-gradient(circle at 92% 6%, rgba(6, 62, 69, 0.08) 1px, transparent 1px),
    #f8faf9;
  background-size: auto, 24px 24px, auto;
}

.auth-hero {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  padding: 38px 38px 30px;
  background:
    radial-gradient(circle at 78% 78%, rgba(55, 242, 184, 0.68), transparent 28%),
    radial-gradient(circle at 75% 62%, rgba(122, 255, 218, 0.34), transparent 22%),
    radial-gradient(circle at 18% 14%, rgba(7, 103, 105, 0.42), transparent 30%),
    linear-gradient(145deg, #062c38 0%, #063e45 47%, #08a889 100%);
}

.auth-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 76% 75%, rgba(168, 255, 225, 0.35), transparent 12%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: auto, 90px 90px, 90px 90px;
  pointer-events: none;
}

.auth-hero > * {
  position: relative;
  z-index: 1;
}

.auth-brand .brand-mark {
  width: 54px;
  height: 54px;
  border-radius: 14px;
}

.auth-brand strong {
  color: #fff;
  font-size: 22px;
}

.auth-brand span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 14px;
}

.auth-copy {
  max-width: 560px;
  margin-top: min(12vh, 110px);
}

.auth-copy h1 {
  margin: 0;
  color: white;
  font-size: clamp(46px, 5.1vw, 72px);
  line-height: 1.24;
  letter-spacing: 0;
  text-shadow: 0 10px 32px rgba(0, 0, 0, 0.24);
}

.auth-copy h1 em {
  color: #79f2ca;
  text-shadow: 0 0 22px rgba(121, 242, 202, 0.38);
}

.auth-accent-line {
  display: block;
  width: 38px;
  height: 4px;
  margin: 28px 0;
  border-radius: 999px;
  background: #2cf1c0;
  box-shadow: 0 0 22px rgba(44, 241, 192, 0.7);
}

.auth-copy p {
  max-width: 520px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 16px;
  line-height: 1.9;
}

.auth-visual {
  position: absolute;
  right: 32px;
  bottom: 72px;
  width: 360px;
  height: 310px;
  margin: 0;
  perspective: 900px;
}

.card-stage {
  position: absolute;
  left: 80px;
  bottom: 8px;
  width: 250px;
  height: 54px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(180, 255, 224, 0.76), rgba(37, 219, 165, 0.28) 42%, transparent 72%);
  filter: blur(3px);
}

.premium-card {
  position: absolute;
  display: grid;
  align-content: space-between;
  padding: 20px;
  border: 1px solid rgba(212, 255, 237, 0.38);
  border-radius: 15px;
  color: rgba(255, 255, 255, 0.86);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(38, 214, 161, 0.28)),
    linear-gradient(145deg, rgba(6, 62, 69, 0.8), rgba(22, 200, 152, 0.62));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(16px);
  transform-style: preserve-3d;
}

.premium-card span {
  font-weight: 800;
  letter-spacing: 0;
}

.premium-card strong {
  font-size: 15px;
  letter-spacing: 1px;
}

.card-back {
  left: 118px;
  top: 35px;
  width: 188px;
  height: 122px;
  opacity: 0.68;
  transform: rotateY(-22deg) rotateZ(1deg) translateZ(-18px);
}

.card-front {
  left: 50px;
  top: 95px;
  width: 220px;
  height: 142px;
  transform: rotateY(-20deg) rotateZ(-8deg);
}

.card-front i {
  width: 28px;
  height: 22px;
  border-radius: 6px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.78), rgba(220, 197, 145, 0.86)),
    linear-gradient(0deg, transparent 48%, rgba(6, 62, 69, 0.35) 49%, rgba(6, 62, 69, 0.35) 52%, transparent 53%);
}

.value-panel {
  position: absolute;
  right: 10px;
  bottom: 48px;
  width: 150px;
  height: 112px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 18px;
  border: 1px solid rgba(212, 255, 237, 0.4);
  border-radius: 13px;
  color: white;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(23, 205, 159, 0.28));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.value-panel span {
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
}

.value-panel strong {
  font-size: 18px;
}

.value-panel b {
  width: 78px;
  height: 26px;
  border-left: 3px solid rgba(137, 255, 213, 0.75);
  border-bottom: 3px solid rgba(137, 255, 213, 0.75);
  transform: skewX(-25deg);
}

.orbit {
  position: absolute;
  border: 1px solid rgba(143, 255, 218, 0.36);
  border-radius: 50%;
  filter: drop-shadow(0 0 12px rgba(89, 255, 209, 0.35));
}

.orbit-one {
  left: 38px;
  top: 112px;
  width: 300px;
  height: 92px;
  transform: rotate(-18deg);
}

.orbit-two {
  left: 82px;
  top: 128px;
  width: 228px;
  height: 68px;
  transform: rotate(22deg);
  opacity: 0.46;
}

.auth-points {
  gap: 12px;
}

.auth-points span {
  min-height: 34px;
  padding: 0 14px;
  border-color: rgba(202, 255, 237, 0.22);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-size: 12px;
}

.auth-panel {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 24px;
  padding: 40px;
  background:
    radial-gradient(circle at 100% 100%, rgba(6, 62, 69, 0.06), transparent 18%),
    radial-gradient(circle at 88% 10%, rgba(6, 62, 69, 0.08) 1px, transparent 1px),
    #fbfcfb;
  background-size: auto, 22px 22px, auto;
}

.auth-card {
  width: min(520px, 100%);
  margin: 0;
  padding: 26px;
  border: 1px solid rgba(218, 226, 224, 0.82);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 26px 70px rgba(21, 45, 49, 0.12);
  backdrop-filter: blur(18px);
}

.auth-tabs {
  height: 48px;
  gap: 0;
  padding: 4px;
  border: 1px solid #e7eceb;
  background: #f8faf9;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.auth-tab {
  position: relative;
  border-radius: 10px;
  font-weight: 700;
}

.auth-tab.active {
  color: #063e45;
  box-shadow: 0 8px 18px rgba(6, 62, 69, 0.07);
}

.auth-tab.active::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: -4px;
  height: 2px;
  background: #5de3c0;
}

.auth-mode {
  margin-top: 28px;
  gap: 15px;
}

.auth-mode h2 {
  font-size: 26px;
}

.auth-mode p {
  color: #80908d;
}

.auth-mode label {
  display: grid;
  gap: 8px;
  color: #263333;
  font-size: 14px;
}

.auth-mode input[type="email"],
.auth-mode input[type="password"] {
  min-height: 44px;
  border: 1px solid #dbe4e2;
  border-radius: 9px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.94);
}

.auth-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-height: 32px;
}

.remember-check {
  display: inline-flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 8px !important;
  color: #6f7f7c !important;
  min-width: max-content;
  white-space: nowrap;
}

.link-button,
.auth-signup-line button {
  border: 0;
  color: #0db493;
  background: transparent;
  font-weight: 700;
}

.auth-submit {
  width: 100%;
  min-height: 48px;
  margin-top: 4px;
  background: linear-gradient(90deg, #063e45, #02af8c);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #95a19f;
  font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #e6ecea;
}

.auth-secure {
  text-align: center;
  font-size: 13px !important;
}

.auth-signup-line {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #6f7f7c;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px;
  background:
    linear-gradient(165deg, rgba(47, 58, 57, 0.98), rgba(73, 88, 82, 0.98)),
    linear-gradient(45deg, rgba(200, 169, 106, 0.16), transparent);
  color: white;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: block;
  object-fit: cover;
  background: transparent;
  color: transparent;
  border: 0;
  border-radius: 12px;
  box-shadow: none;
}

.logo-image {
  padding: 0;
}

.brand span,
.today-box span,
.eyebrow,
.metric span,
.item-meta,
.mini-label {
  color: var(--muted);
  font-size: 13px;
}

.sidebar .brand span,
.sidebar .today-box span,
.sidebar-account span {
  color: #a9bdc4;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  border: 0;
  border-radius: 8px;
  color: #dce7eb;
  background: transparent;
  text-align: left;
  padding: 12px 14px;
}

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

.today-box {
  margin-top: auto;
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
}

.sidebar-account {
  margin-top: auto;
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(216, 221, 217, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-account strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.sidebar-button {
  min-height: 38px;
  border: 1px solid rgba(200, 169, 106, 0.45);
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, rgba(200, 169, 106, 0.22), rgba(216, 221, 217, 0.08));
}

.today-box {
  margin-top: 0;
}

.main {
  padding: 28px;
  display: grid;
  gap: 24px;
}

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

.topbar h1 {
  margin: 4px 0 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.06;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-weight: 700;
}

.top-actions,
.form-actions,
.row-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

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

.top-actions .ghost-button {
  display: none;
}

.language-select {
  min-width: 132px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
}

.sync-status {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  background: var(--soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.sync-status.warn {
  color: var(--warn);
  background: #fff2e5;
}

.primary-button,
.secondary-button,
.ghost-button,
.text-button,
.small-button {
  border-radius: 8px;
  min-height: 40px;
  border: 1px solid var(--line);
  padding: 0 14px;
  background: white;
  color: var(--ink);
  white-space: nowrap;
}

.primary-button {
  color: white;
  border-color: rgba(88, 112, 104, 0.9);
  background: linear-gradient(135deg, #536c64, #6e8075 58%, #b79a5e);
  box-shadow: 0 10px 24px rgba(73, 88, 82, 0.18);
}

.secondary-button {
  background: #f4f3ef;
}

.ghost-button {
  background: transparent;
}

.text-button {
  border: 0;
  color: var(--accent-2);
  background: transparent;
}

.small-button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 13px;
}

.view {
  display: none;
}

.view.active {
  display: grid;
  gap: 22px;
}

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

.metric,
.panel,
.credit-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric {
  padding: 18px;
  display: grid;
  gap: 8px;
}

.metric strong {
  font-size: 28px;
}

.content-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 16px;
}

.wide {
  min-width: 0;
}

.panel {
  padding: 20px;
}

.panel-header,
.section-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.panel h2,
.panel h3,
.section-title h2 {
  margin: 0;
}

.section-title {
  align-items: end;
}

.title-line {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.section-title p {
  margin: 0;
  max-width: 680px;
  color: var(--muted);
}

.two-column {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) 1.1fr;
  gap: 16px;
  align-items: start;
}

.cards-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.benefits-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.cards-workspace.drawer-open,
.benefits-workspace.drawer-open {
  grid-template-columns: minmax(620px, 1fr) minmax(420px, 0.48fr);
}

.cards-list-panel,
.benefits-list-panel {
  min-width: 0;
}

.card-drawer,
.benefit-drawer {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 20px;
  border: 1px solid rgba(200, 169, 106, 0.34);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 247, 243, 0.98)),
    linear-gradient(135deg, rgba(200, 169, 106, 0.14), rgba(216, 221, 217, 0.12));
  box-shadow: var(--shadow);
}

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

.drawer-header h3 {
  margin: 0;
}

.card-list-item {
  background: rgba(255, 255, 255, 0.78);
}

.card-collapse-button {
  width: 100%;
  min-height: 62px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.card-list-side {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: end;
}

.chevron {
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.card-expanded-body {
  display: grid;
  gap: 10px;
  padding-top: 4px;
}

.form-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: #3a454c;
  font-size: 13px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 10px 11px;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

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

.stack-list {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.filter-strip {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(240px, auto) minmax(220px, 1fr);
  gap: 12px;
  align-items: end;
}

.segmented-control {
  min-height: 42px;
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  background: #f2f6f7;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.segment {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
  white-space: nowrap;
}

.segment.active {
  background: white;
  color: var(--ink);
  box-shadow: 0 1px 5px rgba(34, 48, 56, 0.1);
}

.compact-field {
  min-width: 0;
}

.list-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--paper);
  display: grid;
  gap: 10px;
}

.reward-card-group,
.card-report {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.72);
  display: grid;
  gap: 12px;
}

.compact-stack {
  margin-top: 0;
  gap: 8px;
}

.reward-entry {
  background: #fbfaf7;
}

.reward-summary,
.report-total-strip {
  margin-top: 12px;
}

.mini-report-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fbfaf7;
}

.mini-report-row span {
  color: var(--muted);
  text-align: right;
}

.list-item strong {
  font-size: 16px;
}

.rule-summary {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid #dbe7e1;
  border-radius: 8px;
  background: #f5faf7;
}

.rule-summary a {
  color: var(--accent-2);
  text-decoration: none;
}

.statement-result {
  display: grid;
  gap: 12px;
}

.summary-strip,
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.summary-strip span,
.mini-pill {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding: 6px 10px;
  background: var(--soft);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.statement-rows {
  display: grid;
  gap: 8px;
}

.statement-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.statement-row__amount {
  text-align: right;
  white-space: nowrap;
}

.empty-note {
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 12px;
}

.item-top,
.item-bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.card-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
}

.credit-card {
  padding: 18px;
  color: white;
  background: linear-gradient(135deg, #123139, #176b57);
  display: grid;
  gap: 16px;
  min-height: 180px;
}

.credit-card:nth-child(2n) {
  background: linear-gradient(135deg, #24364d, #2e7ba8);
}

.credit-card:nth-child(3n) {
  background: linear-gradient(135deg, #3c2b4b, #8a5a86);
}

.credit-card .item-meta {
  color: rgba(255, 255, 255, 0.72);
}

.card-title {
  display: grid;
  gap: 5px;
}

.progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(16, 37, 43, 0.12);
}

.credit-card .progress {
  background: rgba(255, 255, 255, 0.22);
}

.progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: inherit;
}

.credit-card .progress span {
  background: #d7efe6;
}

.status-pill,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  background: var(--soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.tag.warn {
  color: var(--warn);
  background: #fff2e5;
}

.tag.danger {
  color: var(--danger);
  background: #ffeaea;
}

.tag.blue {
  color: var(--accent-2);
  background: #e7f2f8;
}

.report-block {
  margin-top: 16px;
  display: grid;
  gap: 14px;
}

.report-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.empty {
  padding: 16px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--paper);
}

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

.modal {
  width: min(420px, 100%);
  display: grid;
  gap: 16px;
  padding: 20px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.modal h3 {
  margin: 0;
}

@media (max-width: 980px) {
  .auth-gate {
    grid-template-columns: 1fr;
  }

  .auth-hero {
    min-height: auto;
    padding: 28px;
  }

  .auth-copy {
    margin-top: 48px;
  }

  .auth-copy h1 {
    font-size: clamp(32px, 9vw, 54px);
  }

  .auth-visual {
    position: relative;
    right: auto;
    bottom: auto;
    width: min(360px, 100%);
    margin: 32px auto 4px;
  }

  .auth-panel {
    min-height: auto;
    padding: 28px 18px 36px;
  }

  .auth-card {
    width: min(560px, calc(100% - 36px));
    margin: 20px auto 28px;
  }

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

  .sidebar {
    position: static;
    height: auto;
  }

  .nav {
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  }

  .metrics-grid,
  .content-grid,
  .two-column,
  .cards-workspace,
  .benefits-workspace,
  .filter-strip {
    grid-template-columns: 1fr;
  }

  .card-drawer,
  .benefit-drawer {
    position: static;
    max-height: none;
  }
}

@media (max-width: 620px) {
  .main,
  .sidebar {
    padding: 18px;
  }

  .topbar,
  .panel-header,
  .section-title,
  .item-top,
  .item-bottom {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions,
  .form-actions,
  .row-actions,
  .nav {
    flex-wrap: wrap;
    display: flex;
  }

  .nav-item {
    flex: 1 1 42%;
    min-height: 44px;
  }

  .auth-tabs {
    grid-template-columns: 1fr;
  }

  .auth-tab,
  .primary-button,
  .secondary-button,
  .ghost-button,
  .text-button,
  .small-button,
  .segment {
    min-height: 44px;
  }

  .auth-card {
    padding: 18px;
  }

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

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

  .card-collapse-button {
    grid-template-columns: 1fr;
  }

  .card-list-side {
    justify-content: start;
  }

  .statement-row__amount {
    text-align: left;
  }
}
