:root {
  --navy-950: #102744;
  --navy-900: #17345b;
  --navy-800: #254c79;
  --sky-500: #11b5e4;
  --sky-300: #8fe8ff;
  --sand-100: #fff7e8;
  --sunset-500: #f76b2d;
  --sunset-400: #ff8d3a;
  --gold-300: #ffd164;
  --white: #ffffff;
  --text-900: #1c2b3f;
  --text-700: #506073;
  --text-500: #76859a;
  --border: rgba(16, 39, 68, 0.12);
  --shadow: 0 20px 55px rgba(17, 34, 68, 0.14);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text-900);
  background:
    radial-gradient(circle at top right, rgba(255, 209, 100, 0.25), transparent 22rem),
    radial-gradient(circle at bottom left, rgba(17, 181, 228, 0.18), transparent 28rem),
    linear-gradient(180deg, #f9fcff 0%, #eef5fb 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

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

.portal-shell .sidebar {
  position: sticky;
  top: 0;
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(247, 107, 45, 0.1) 0%, rgba(255, 255, 255, 0.04) 24%),
    linear-gradient(180deg, var(--navy-950) 0%, #132e50 100%);
  color: var(--white);
  padding: 2rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-logo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.2);
}

.brand-kicker,
.hero-kicker,
.run-card-kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--sky-500);
}

.brand-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.55rem;
  font-weight: 700;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.nav-link {
  padding: 0.9rem 1rem;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.05);
  transition: transform 160ms ease, background 160ms ease;
}

.nav-link:hover {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.11);
}

.sidebar-card {
  padding: 1rem 1.05rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-session {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.session-email {
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.82);
  word-break: break-word;
}

.sidebar-card.warm {
  background: linear-gradient(135deg, rgba(247, 107, 45, 0.22), rgba(255, 209, 100, 0.14));
}

.sidebar-card-title {
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.sidebar-card-copy {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.93rem;
  line-height: 1.55;
}

.content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.hero,
.panel,
.metric-card,
.run-card,
.charge-card {
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.hero {
  border-radius: var(--radius-xl);
  padding: 2rem;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.86)),
    linear-gradient(120deg, rgba(255, 209, 100, 0.2), rgba(17, 181, 228, 0.18));
}

.hero.compact {
  padding: 1.55rem 1.7rem;
}

.hero h1,
.panel h1,
.panel h2,
.run-card h3,
.charge-card h3 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3.6rem);
  margin-top: 0.35rem;
}

.hero p {
  margin: 0.85rem 0 0;
  max-width: 58rem;
  line-height: 1.65;
  color: var(--text-700);
}

.hero-actions,
.action-row {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}

.inline-form {
  display: inline-flex;
}

.button {
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 999px;
  padding: 0.92rem 1.2rem;
  font-weight: 800;
  font-size: 0.94rem;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

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

.button.primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--sunset-500), var(--gold-300));
  box-shadow: 0 12px 30px rgba(247, 107, 45, 0.28);
}

.button.secondary {
  color: var(--navy-900);
  background: rgba(16, 39, 68, 0.06);
}

.button.danger {
  color: var(--white);
  background: linear-gradient(135deg, #cb2a32, #ea5a54);
}

.button.small {
  padding: 0.72rem 1rem;
  font-size: 0.85rem;
}

.panel {
  border-radius: var(--radius-lg);
  padding: 1.3rem 1.35rem;
  background: rgba(255, 255, 255, 0.94);
}

.panel.narrow,
.form-panel.narrow {
  max-width: 36rem;
}

.panel-accent {
  background:
    linear-gradient(135deg, rgba(255, 209, 100, 0.14), rgba(255, 255, 255, 0.92)),
    rgba(255, 255, 255, 0.92);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.badge,
.status-pill,
.amount-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.35rem 0.72rem;
  font-size: 0.78rem;
  font-weight: 800;
}

.badge,
.status-pill {
  color: var(--navy-900);
  background: rgba(17, 181, 228, 0.12);
}

.amount-pill {
  color: var(--white);
  background: linear-gradient(135deg, var(--navy-800), var(--sky-500));
}

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

.metric-card {
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.1rem;
  background: rgba(255, 255, 255, 0.94);
}

.metric-card.emphasis {
  background: linear-gradient(135deg, rgba(247, 107, 45, 0.1), rgba(255, 209, 100, 0.18));
}

.metric-card span,
.run-metrics span,
.muted {
  color: var(--text-500);
}

.metric-card strong {
  display: block;
  margin-top: 0.5rem;
  font-size: 1.9rem;
}

.run-grid,
.charge-grid {
  display: grid;
  gap: 1rem;
}

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

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

.run-card,
.charge-card {
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  background: rgba(255, 255, 255, 0.96);
}

.run-card-top,
.charge-card-top,
.list-card {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.run-card h3,
.charge-card h3 {
  margin-top: 0.3rem;
  font-size: 1.35rem;
}

.run-metrics {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.run-metrics strong {
  display: block;
  margin-top: 0.25rem;
  font-size: 1.25rem;
}

.run-footer,
.charge-meta {
  margin-top: 0.95rem;
  font-size: 0.88rem;
  color: var(--text-500);
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
  font-weight: 700;
}

.field span {
  color: var(--navy-900);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(16, 39, 68, 0.16);
  padding: 0.9rem 1rem;
  font: inherit;
  color: var(--text-900);
  background: rgba(255, 255, 255, 0.96);
}

.field small {
  color: var(--text-500);
  font-weight: 500;
}

.note-banner {
  border-radius: 18px;
  padding: 1rem 1.05rem;
  background: rgba(17, 181, 228, 0.09);
  color: var(--navy-900);
  line-height: 1.55;
}

.error-banner {
  border-radius: 16px;
  padding: 0.9rem 1rem;
  color: #7a1420;
  background: rgba(203, 42, 50, 0.1);
  border: 1px solid rgba(203, 42, 50, 0.18);
  line-height: 1.5;
}

.instruction-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text-700);
  line-height: 1.7;
}

.empty-copy {
  color: var(--text-500);
  line-height: 1.65;
}

.list-card {
  padding: 1rem 1.05rem;
  border-radius: 18px;
  background: rgba(16, 39, 68, 0.04);
  border: 1px solid rgba(16, 39, 68, 0.08);
}

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

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.78rem 0.65rem;
  border-bottom: 1px solid rgba(16, 39, 68, 0.08);
  vertical-align: top;
}

.data-table th {
  color: var(--navy-900);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.compact-table td,
.compact-table th {
  font-size: 0.9rem;
}

.table-wrap {
  overflow-x: auto;
}

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

  .sidebar {
    position: relative;
  }

  .metric-grid,
  .two-col {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .content {
    padding: 1rem;
  }

  .hero,
  .panel,
  .metric-card,
  .run-card,
  .charge-card {
    border-radius: 20px;
  }

  .metric-grid,
  .two-col,
  .charge-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .action-row,
  .run-card-top,
  .charge-card-top,
  .list-card,
  .panel-header {
    flex-direction: column;
    align-items: stretch;
  }

  .run-metrics {
    grid-template-columns: 1fr;
  }
}
