:root {
  --bg: #f3f6fb;
  --bg-accent: #eaf0f8;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --surface-strong: #eef3f8;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --text: #0f172a;
  --text-soft: #334155;
  --muted: #64748b;
  --accent: #ff5b1f;
  --accent-strong: #e34c15;
  --accent-soft: #fff1eb;
  --green: #12b76a;
  --blue: #2e90fa;
  --yellow: #f5b301;
  --orange: #ff7a1f;
  --danger: #d64545;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 12px 30px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 91, 31, 0.06), transparent 28%),
    linear-gradient(180deg, #f7f9fc 0%, var(--bg) 100%);
}

a {
  color: inherit;
}

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

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100vh;
  padding: 24px 20px;
  background: rgba(248, 250, 252, 0.92);
  border-right: 1px solid rgba(203, 213, 225, 0.75);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.9));
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.brand-logo {
  display: block;
  width: 100%;
  max-width: 108px;
  height: auto;
  object-fit: contain;
}

.nav-title {
  margin-top: 4px;
  padding: 0 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  color: var(--text-soft);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(226, 232, 240, 0.95);
  transform: translateX(1px);
}

.nav-item.active {
  color: var(--accent-strong);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 241, 235, 0.98));
  border-color: rgba(255, 91, 31, 0.22);
  box-shadow: 0 10px 24px rgba(255, 91, 31, 0.08);
}

.nav-item.disabled {
  color: #94a3b8;
  background: rgba(248, 250, 252, 0.78);
  border-color: rgba(226, 232, 240, 0.82);
  cursor: not-allowed;
}

.nav-item em {
  flex: 0 0 auto;
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8b95a7;
  background: #eef2f7;
  border-radius: 999px;
  padding: 4px 8px;
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px 4px 0;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.8;
}

.logout-form {
  margin-top: 14px;
}

.mobile-logout-form {
  margin-top: 0;
  margin-left: auto;
}

.logout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(203, 213, 225, 0.95);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.logout-btn:hover {
  border-color: rgba(148, 163, 184, 0.98);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.content {
  min-width: 0;
  padding: 28px clamp(20px, 3vw, 40px) 40px;
}

.mobile-topbar,
.mobile-nav {
  display: none;
}

.mobile-topbar {
  align-items: center;
  margin-bottom: 16px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.mobile-brand-logo {
  display: block;
  width: 88px;
  height: auto;
}

.mobile-nav {
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-nav-item {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.98);
  border-radius: 999px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.mobile-nav-item.active {
  color: #ffffff;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  border-color: rgba(227, 76, 21, 0.7);
  box-shadow: 0 12px 24px rgba(255, 91, 31, 0.2);
}

.mobile-nav-item.disabled {
  color: #94a3b8;
  background: rgba(248, 250, 252, 0.85);
  pointer-events: none;
}

.content-header {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 24px;
  min-height: 160px;
  margin-bottom: 24px;
  padding: 24px 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.92)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.8));
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

.page-heading {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
  max-width: 760px;
}

h1 {
  margin: 0;
  font-size: clamp(30px, 3vw, 38px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.subtitle {
  max-width: 62ch;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.header-meta {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  min-width: 250px;
  max-width: 320px;
  align-self: stretch;
}

.meta-pill,
.snapshot-pill {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  min-width: 0;
  padding: 14px 16px;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.meta-pill.subtle {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(226, 232, 240, 0.96);
}

.snapshot-pill {
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  border: 1px solid rgba(227, 76, 21, 0.8);
}

.meta-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.meta-pill .meta-label {
  color: #94a3b8;
}

.snapshot-pill .meta-label,
.snapshot-pill .meta-value {
  color: #ffffff;
}

.meta-value {
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.page-stack {
  display: grid;
  gap: 20px;
}

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

.stat-card,
.summary-card,
.panel {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

.stat-card,
.summary-card {
  overflow: hidden;
  padding: 20px 22px;
}

.stat-card::after,
.summary-card::after {
  content: "";
  position: absolute;
  inset: auto -30px -30px auto;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.stat-card-highlight,
.summary-card-highlight {
  background: linear-gradient(180deg, rgba(255, 241, 235, 0.98), rgba(255, 255, 255, 0.98));
  border-color: rgba(255, 91, 31, 0.16);
}

.label {
  margin-bottom: 10px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.value {
  font-size: clamp(28px, 2.4vw, 34px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.value-accent,
.accent-text {
  color: var(--accent-strong);
}

.positive {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-top: 12px;
  padding: 0 10px;
  color: #0e9f5b;
  background: rgba(18, 183, 106, 0.1);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.muted {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.panel-grid {
  display: grid;
  gap: 18px;
}

.panel-grid.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.panel-grid.one-col,
.panel-stack {
  grid-template-columns: minmax(0, 1fr);
}

.analytics-grid,
.panel-stack {
  display: grid;
  gap: 18px;
}

.panel {
  --panel-accent: var(--accent);
  overflow: hidden;
}

.panel::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--panel-accent), rgba(255, 255, 255, 0));
}

.accent-green {
  --panel-accent: var(--green);
}

.accent-orange {
  --panel-accent: var(--orange);
}

.accent-blue {
  --panel-accent: var(--blue);
}

.accent-yellow {
  --panel-accent: var(--yellow);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 16px;
}

.panel-heading h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.panel-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.panel-body {
  padding: 0 22px 22px;
}

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

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

.table-wrap {
  overflow: auto;
  border-top: 1px solid rgba(226, 232, 240, 0.95);
  -webkit-overflow-scrolling: touch;
}

.clean-table,
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.clean-table-wide {
  min-width: 620px;
}

.data-table {
  min-width: 720px;
}

.clean-table th,
.clean-table td,
.data-table th,
.data-table td {
  border-top: 1px solid rgba(226, 232, 240, 0.95);
  padding: 15px 18px;
  font-size: 14px;
  vertical-align: middle;
}

.clean-table thead th,
.data-table thead th {
  position: relative;
  border-top: none;
  color: #94a3b8;
  background: rgba(248, 250, 252, 0.96);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
}

.clean-table tbody tr:first-child td,
.data-table tbody tr:first-child td {
  border-top: 1px solid rgba(226, 232, 240, 0.95);
}

.clean-table tbody tr:hover td,
.data-table tbody tr:hover td {
  background: rgba(248, 250, 252, 0.9);
}

.clean-table td:first-child,
.data-table td:first-child {
  color: var(--text-soft);
  font-weight: 600;
}

.metric-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.metric-link:hover {
  color: var(--accent-strong);
  border-color: rgba(255, 91, 31, 0.3);
}

.clean-table .num,
.data-table .num,
.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

.clean-table .pct,
.pct {
  text-align: right;
  color: var(--muted);
  white-space: nowrap;
}

.clean-table-wide th:first-child,
.clean-table-wide td:first-child {
  width: 44%;
}

.clean-table-wide th:nth-child(2),
.clean-table-wide td:nth-child(2) {
  width: 22%;
}

.clean-table-wide th:nth-child(3),
.clean-table-wide td:nth-child(3),
.clean-table-wide th:nth-child(4),
.clean-table-wide td:nth-child(4),
.clean-table-wide th:nth-child(5),
.clean-table-wide td:nth-child(5) {
  width: 11%;
}

.clean-table tr.is-total td {
  color: var(--text);
  font-weight: 800;
}

.clean-table tr.is-total .pct {
  color: var(--text-soft);
}

.data-table tfoot td {
  font-weight: 800;
  color: var(--text-soft);
  background: rgba(248, 250, 252, 0.96);
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px 22px;
  border-top: 1px solid rgba(226, 232, 240, 0.95);
}

.table-summary {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(203, 213, 225, 0.95);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.secondary-btn:hover {
  border-color: rgba(148, 163, 184, 0.98);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.revealable-row.is-hidden {
  display: none;
}

.sortable-table th.sortable {
  cursor: pointer;
  user-select: none;
  padding-right: 32px;
}

.sortable-table th.sortable::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid #94a3b8;
  border-bottom: 1.5px solid #94a3b8;
  transform: translateY(-65%) rotate(45deg);
  opacity: 0.9;
}

.sortable-table th.sorted-asc::after {
  border-color: var(--accent-strong);
  transform: translateY(-30%) rotate(-135deg);
}

.sortable-table th.sorted-desc::after {
  border-color: var(--accent-strong);
  transform: translateY(-70%) rotate(45deg);
}

.wallet-label {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 700;
}

.wallet-help {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.wallet-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.wallet-input {
  width: 100%;
  min-width: 0;
  height: 52px;
  padding: 0 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  font-size: 14px;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.02);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.wallet-input::placeholder {
  color: #94a3b8;
}

.wallet-input:focus {
  outline: none;
  border-color: rgba(255, 91, 31, 0.58);
  box-shadow: 0 0 0 4px rgba(255, 91, 31, 0.1);
  background: #ffffff;
}

.wallet-btn {
  min-width: 152px;
  height: 52px;
  padding: 0 20px;
  color: #ffffff;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  border: 1px solid rgba(227, 76, 21, 0.9);
  border-radius: 14px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(255, 91, 31, 0.16);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.wallet-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(255, 91, 31, 0.2);
}

.wallet-btn:disabled {
  opacity: 0.76;
  cursor: not-allowed;
  box-shadow: none;
}

.wallet-message {
  min-height: 22px;
  margin-top: 14px;
  font-size: 14px;
  font-weight: 700;
}

.wallet-message.success {
  color: var(--green);
}

.wallet-message.error {
  color: var(--danger);
}

.tooltip-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  color: #64748b;
  background: #eef2f7;
  font-size: 11px;
  font-weight: 800;
  cursor: default;
}

.tooltip-text {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  visibility: hidden;
  opacity: 0;
  padding: 8px 10px;
  color: #ffffff;
  background: #0f172a;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  transition: opacity 0.15s ease;
  z-index: 10;
}

.tooltip-wrap:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.wallet-results-table .num.mono {
  text-align: left;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.status-pill.ok {
  color: #18794e;
  background: rgba(18, 183, 106, 0.14);
}

.status-pill.warn {
  color: #a85d12;
  background: rgba(245, 179, 1, 0.18);
}

.metric-page-subtitle {
  display: grid;
  gap: 12px;
}

.metric-back-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: var(--text-soft);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.metric-back-link:hover {
  color: var(--accent-strong);
  border-color: rgba(255, 91, 31, 0.28);
}

.metric-detail-page {
  gap: 22px;
}

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

.metric-summary-card {
  min-height: 176px;
}

.metric-summary-primary {
  background: linear-gradient(180deg, rgba(255, 241, 235, 0.98), rgba(255, 255, 255, 0.98));
}

.metric-detail-value {
  font-size: clamp(32px, 3vw, 42px);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.02;
}

.metric-detail-value-small {
  font-size: clamp(30px, 2.7vw, 38px);
}

.metric-delta {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: fit-content;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
}

.metric-delta-up {
  color: #18794e;
  background: rgba(18, 183, 106, 0.14);
}

.metric-delta-down {
  color: #b42318;
  background: rgba(214, 69, 69, 0.12);
}

.metric-delta-neutral {
  color: var(--text-soft);
  background: rgba(226, 232, 240, 0.7);
}

.metric-chart-panel,
.metric-related-panel {
  overflow: hidden;
}

.metric-chart-header {
  align-items: center;
}

.metric-range-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  background: rgba(248, 250, 252, 0.96);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 999px;
}

.metric-range-btn {
  min-height: 34px;
  padding: 0 12px;
  color: var(--text-soft);
  background: transparent;
  border: none;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.metric-range-btn.active {
  color: #ffffff;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
}

.metric-chart-body {
  padding-top: 0;
}

.metric-chart-wrap {
  position: relative;
  min-height: 360px;
}

.metric-empty-state {
  padding: 36px 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.metric-related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.metric-related-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  color: var(--text-soft);
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 999px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  transition: border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.metric-related-link:hover {
  color: var(--accent-strong);
  border-color: rgba(255, 91, 31, 0.24);
  transform: translateY(-1px);
}

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-shell {
  width: min(100%, 520px);
}

.login-card {
  display: grid;
  gap: 24px;
  padding: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
}

.login-brand {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
}

.login-logo {
  display: block;
  width: 120px;
  height: auto;
}

.login-copy {
  display: grid;
  gap: 10px;
}

.login-title {
  margin: 0;
  font-size: clamp(30px, 5vw, 40px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.login-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

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

.login-label {
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 700;
}

.login-input {
  width: 100%;
  min-width: 0;
  height: 54px;
  padding: 0 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  font-size: 15px;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.02);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.login-input:focus {
  outline: none;
  border-color: rgba(255, 91, 31, 0.58);
  box-shadow: 0 0 0 4px rgba(255, 91, 31, 0.1);
  background: #ffffff;
}

.login-error {
  margin: 0;
  color: var(--danger);
  font-size: 14px;
  font-weight: 700;
}

.login-submit {
  min-height: 52px;
  padding: 0 18px;
  color: #ffffff;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  border: 1px solid rgba(227, 76, 21, 0.9);
  border-radius: 14px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(255, 91, 31, 0.16);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.login-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(255, 91, 31, 0.2);
}

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

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

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

  .panel-grid.two-col {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    display: none;
  }

  .mobile-topbar,
  .mobile-nav {
    display: flex;
  }

  .content {
    padding-top: 20px;
  }

  .content-header {
    flex-direction: column;
    min-height: 0;
    padding: 22px;
  }

  .header-meta {
    width: 100%;
    min-width: 0;
    max-width: none;
    align-self: auto;
  }
}

@media (max-width: 820px) {
  .content {
    padding: 18px 18px 28px;
  }

  .metric-summary-grid,
  .stats-grid,
  .summary-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .metric-chart-header {
    align-items: flex-start;
  }

  .metric-range-group {
    flex-wrap: wrap;
  }

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

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

  .wallet-btn {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .content-header,
  .stat-card,
  .summary-card,
  .panel-body,
  .panel-heading {
    padding-left: 18px;
    padding-right: 18px;
  }

  .content-header {
    padding-top: 20px;
    padding-bottom: 20px;
  }

  h1 {
    font-size: 28px;
  }

  .subtitle {
    font-size: 14px;
  }

  .clean-table-wide,
  .data-table {
    min-width: 560px;
  }

  .metric-chart-wrap {
    min-height: 300px;
  }

  .mobile-nav {
    margin-right: -4px;
  }
}

@media (max-width: 480px) {
  .content {
    padding: 14px 14px 24px;
  }

  .login-page {
    padding: 14px;
  }

  .login-card {
    padding: 22px 18px;
  }

  .brand-logo,
  .mobile-brand-logo {
    max-width: 74px;
  }

  .stat-card,
  .summary-card {
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .meta-pill,
  .snapshot-pill {
    padding: 12px 14px;
  }

  .clean-table th,
  .clean-table td,
  .data-table th,
  .data-table td {
    padding: 13px 14px;
  }
}
