:root {
  --bg: #edf4fb;
  --panel: rgba(255, 255, 255, 0.76);
  --panel-strong: rgba(245, 249, 255, 0.92);
  --ink: #142235;
  --muted: #455d75;
  --line: rgba(181, 205, 232, 0.7);
  --line-strong: rgba(112, 157, 205, 0.38);
  --accent: #174f89;
  --accent-soft: #eff6ff;
  --accent-2: #0e7490;
  --warm: #d97706;
  --danger: #c53b3b;
  --success: #1f9d55;
  --usd: #1d6fa5;
  --gbp: #2f9e44;
  --cum: #c8553d;
  --cum-usd: #2457a3;
  --cum-gbp: #1d8a3f;
  --shadow: 0 18px 48px rgba(36, 72, 112, 0.14);
  --shadow-soft: 0 8px 24px rgba(34, 66, 104, 0.08);
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Avenir Next", "Segoe UI", "Trebuchet MS", sans-serif;
  color: var(--ink);
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 15%, rgba(255, 255, 255, 0.86) 0%, transparent 35%),
    radial-gradient(circle at 82% 18%, rgba(179, 214, 255, 0.85) 0%, transparent 30%),
    radial-gradient(circle at 75% 88%, rgba(255, 214, 178, 0.6) 0%, transparent 24%),
    var(--bg);
}

.app-shell {
  max-width: 1320px;
  margin: 0 auto;
  padding: 2.1rem 1rem 3.5rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(237, 244, 251, 0.68);
  border-bottom: 1px solid rgba(181, 205, 232, 0.58);
}

.site-header-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  color: #11263e;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.site-brand-mark {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #1f72a6, #59c3c3);
  box-shadow: 0 0 0 5px rgba(31, 114, 166, 0.12);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.site-nav a {
  color: #36526f;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.46rem 0.68rem;
  border-radius: 10px;
  transition: background 150ms ease, color 150ms ease;
}

.site-nav a:hover {
  background: rgba(255, 255, 255, 0.74);
  color: #193d64;
}

.site-footer {
  border-top: 1px solid rgba(181, 205, 232, 0.58);
  background: rgba(244, 248, 253, 0.78);
}

.site-footer-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
}

.site-footer-brand {
  margin: 0;
  color: #15314f;
  margin-left: auto;
  text-align: right;
  font-size: 0.88rem;
  font-weight: 800;
}

.hero {
  position: relative;
  margin-bottom: 1.25rem;
}

.eyebrow {
  margin: 0;
  font-size: 0.79rem;
  letter-spacing: 0.19em;
  color: #124b79;
  font-weight: 800;
}

h1 {
  margin: 0.25rem 0 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.subtitle {
  max-width: 760px;
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.62;
}

.account-bar {
  margin-top: 0.9rem;
  padding: 1rem 1.05rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.88), transparent 38%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.82), rgba(236, 245, 255, 0.88));
}

.account-summary {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.account-kicker {
  margin: 0;
  color: #5a7088;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.account-meta {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.account-meta-item {
  min-width: 160px;
  padding: 0.62rem 0.78rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(176, 201, 229, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.account-meta-label {
  display: block;
  color: #667f97;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-meta-item strong {
  display: block;
  margin-top: 0.22rem;
  color: #17314b;
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.35;
  word-break: break-word;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.account-link {
  border: 1px solid var(--accent);
  background: linear-gradient(135deg, #123a66, #174f89);
  color: #fff;
  border-radius: 14px;
  padding: 0.68rem 0.92rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.account-actions button {
  border: 1px solid var(--accent);
  background: linear-gradient(135deg, #123a66, #174f89);
  color: #fff;
  border-radius: 14px;
  padding: 0.68rem 0.92rem;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: var(--shadow-soft);
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.upload-zone {
  position: relative;
  margin: 1.35rem 0 1.75rem;
  padding: 2rem 1.35rem 1.7rem;
  text-align: center;
  border: 1.5px dashed rgba(90, 139, 191, 0.7);
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.92), transparent 42%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(225, 239, 255, 0.88));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), var(--shadow-soft);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.upload-zone.is-dragging {
  border-color: #5aa7ff;
  box-shadow: 0 18px 38px rgba(90, 167, 255, 0.28);
  transform: translateY(-1px);
}

.upload-zone.demo-locked {
  border-color: rgba(120, 145, 170, 0.85);
  cursor: not-allowed;
}

.upload-zone.demo-locked .upload-title {
  font-size: 1.35rem;
}

.upload-zone.demo-locked .upload-subtitle {
  font-size: 1rem;
}

.upload-zone.demo-locked .upload-native {
  pointer-events: none;
  cursor: not-allowed;
}

.upload-visual {
  position: relative;
  width: 86px;
  height: 86px;
  margin: 0 auto 1rem;
}

.upload-visual::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(117, 176, 255, 0.18), transparent 72%);
  animation: uploadPulse 2.8s ease-in-out infinite;
}

.upload-visual-core {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: 26px;
  appearance: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(233, 244, 255, 0.9));
  border: 1px solid rgba(166, 195, 227, 0.72);
  box-shadow: 0 18px 34px rgba(28, 74, 122, 0.12);
  color: #1d5f94;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.upload-visual-core:hover,
.upload-visual-core:focus-visible,
.upload-zone.is-dragging .upload-visual-core {
  transform: translateY(-2px);
  box-shadow: 0 22px 40px rgba(28, 74, 122, 0.16);
}

.upload-visual-core:focus-visible {
  outline: 2px solid rgba(23, 79, 137, 0.28);
  outline-offset: 4px;
}

.upload-icon-svg {
  width: 36px;
  height: 36px;
}

.upload-title {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 800;
  color: #19344f;
}

.upload-subtitle {
  max-width: 620px;
  margin: 0.45rem auto 0;
  color: #46607a;
  font-size: 1rem;
  line-height: 1.6;
}

.upload-meta {
  margin: 0.9rem auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.upload-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(158, 186, 218, 0.68);
  color: #35516b;
  font-size: 0.83rem;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(28, 74, 122, 0.06);
}

.upload-meta-chip strong {
  color: #20384e;
}

.greeting-box {
  margin: -0.4rem 0 1.5rem;
  padding: 0.8rem 1rem;
}

.upload-greeting {
  margin: 0;
  color: #2a4663;
  font-weight: 700;
}

@keyframes uploadPulse {
  0%, 100% { transform: scale(0.96); opacity: 0.6; }
  50% { transform: scale(1.04); opacity: 1; }
}

.upload-native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.panel {
  background: linear-gradient(160deg, var(--panel), var(--panel-strong));
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.top-totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.total-card { padding: 0.9rem; }

.total-card h3 {
  margin: 0;
  font-size: 0.82rem;
  color: #556f87;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.total-card p {
  margin: 0.52rem 0 0;
  font-size: 1.28rem;
  font-weight: 800;
  white-space: nowrap;
  line-height: 1.18;
}

#allTimeApproved {
  color: #1f9d55;
}

#allTimeRejected {
  color: #d64545;
}

.awaiting-value {
  color: #d39a00;
  font-weight: 800;
}

.usd-value {
  color: #3b82f6;
  font-weight: 800;
}

.gbp-value {
  color: #22a06b;
  font-weight: 800;
}

.converter-panel { padding: 1rem; margin-bottom: 1rem; }

.converter-grid {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.converted-result {
  border: 1px solid rgba(121, 171, 219, 0.34);
  border-radius: 16px;
  padding: 0.8rem;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(243, 249, 255, 0.92));
}

.converted-result h3 {
  margin: 0;
  font-size: 0.84rem;
  text-transform: uppercase;
  color: #5d4f3f;
}

.converted-result p {
  margin: 0.4rem 0 0;
  font-size: 1.1rem;
  font-weight: 800;
}

.controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, max-content));
  gap: 0.85rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

label {
  display: grid;
  gap: 0.38rem;
  font-size: 0.9rem;
  color: #48627a;
  font-weight: 700;
}

input[type="file"],
input[type="number"],
input[type="text"],
select {
  width: 100%;
  border: 1px solid #c8daee;
  border-radius: 12px;
  padding: 0.72rem 0.82rem;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

input[type="number"]:focus,
input[type="text"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: rgba(23, 79, 137, 0.6);
  box-shadow: 0 0 0 3px rgba(23, 79, 137, 0.12);
}

.file-input-wrap { color: #4f3f2c; font-weight: 600; }

.toggle {
  align-self: end;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  color: #4f3f2c;
}

.auth-actions {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  align-self: end;
}

.auth-actions button {
  border: 1px solid #0f172a;
  background: #0f172a;
  color: #fff;
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
}

.auth-status {
  margin: 0.85rem 0 0;
  align-self: stretch;
  color: #44627f;
  line-height: 1.5;
  border-radius: 14px;
  padding: 0.78rem 0.9rem;
  background: rgba(227, 240, 255, 0.72);
  border: 1px solid rgba(137, 174, 216, 0.34);
}

.auth-status.status-info {
  color: #315779;
  background: rgba(227, 240, 255, 0.72);
  border-color: rgba(137, 174, 216, 0.34);
}

.auth-status.status-success {
  color: #1f6a4a;
  background: rgba(223, 248, 233, 0.86);
  border-color: rgba(97, 182, 132, 0.34);
}

.auth-status.status-error {
  color: #9b2438;
  background: rgba(255, 234, 239, 0.9);
  border-color: rgba(214, 95, 120, 0.34);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.pricing-shell {
  max-width: 1180px;
}

.pricing-header-bar {
  margin-top: 1rem;
  padding: 1.05rem 1.1rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.15rem;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.pricing-top-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pricing-account-shell {
  display: grid;
  gap: 0.75rem;
  min-width: 0;
  max-width: 780px;
}

.pricing-account-copy h2 {
  margin: 0.18rem 0 0;
  font-size: 1.06rem;
  font-weight: 760;
  letter-spacing: -0.02em;
  color: #111827;
}

.pricing-account-kicker {
  margin: 0;
  color: #7b8797;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pricing-user-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 280px));
  gap: 0.8rem;
  justify-content: start;
}

.pricing-user-card {
  min-width: 0;
  padding: 0.85rem 0.92rem;
  border-radius: 20px;
  border: 1px solid #e5edf8;
  background: linear-gradient(180deg, #ffffff, #fbfcff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.pricing-user-card span {
  display: block;
  color: #7d8796;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pricing-user-card strong {
  display: block;
  margin-top: 0.34rem;
  color: #111c2d;
  font-size: 0.94rem;
  font-weight: 740;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.pricing-top-actions {
  align-self: center;
}

.pricing-top-actions .account-link {
  min-width: 220px;
  white-space: nowrap;
  border-radius: 18px;
  padding-inline: 1.1rem;
}

.pricing-plan-status {
  margin: 0.75rem 0 0;
  color: #41566d;
  font-size: 0.92rem;
  font-weight: 700;
}

.pricing-grid {
  margin-top: 1.15rem;
  display: grid;
  grid-template-columns: minmax(0, 420px);
  justify-content: start;
  gap: 1rem;
}

.pricing-card {
  padding: 1.25rem 1.2rem;
}

.pricing-card.recommended {
  border: 1px solid rgba(52, 72, 118, 0.42);
  box-shadow: 0 28px 48px rgba(12, 18, 31, 0.2);
  background:
    radial-gradient(circle at top right, rgba(85, 113, 255, 0.22), transparent 34%),
    linear-gradient(160deg, rgba(10, 15, 25, 0.98), rgba(22, 28, 39, 0.98));
}

.plan-chip {
  margin: 0;
  display: inline-flex;
  align-items: center;
  font-size: 0.79rem;
  font-weight: 800;
  border: 1px solid rgba(128, 154, 255, 0.28);
  background: rgba(92, 112, 255, 0.16);
  color: #d7e1ff;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}

.pricing-card h2 {
  margin: 0.55rem 0 0;
  font-size: 1.2rem;
  color: #ffffff;
}

.pricing-amount {
  margin: 0.5rem 0 0;
  font-size: 2rem;
  font-weight: 800;
  color: #ffffff;
}

.pricing-amount span {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(222, 231, 244, 0.88);
}

.pricing-save {
  margin: 0.35rem 0 0;
  color: #9eb7ff;
  font-weight: 700;
}

.pricing-list {
  margin: 0.8rem 0 0;
  padding-left: 1.2rem;
  color: rgba(233, 239, 247, 0.94);
}

.pricing-list li {
  margin: 0.36rem 0;
}

.pricing-btn {
  margin-top: 0.8rem;
  border: 1px solid rgba(113, 140, 255, 0.22);
  background: linear-gradient(135deg, #4f7bff, #6ca6ff);
  color: #fff;
  border-radius: 16px;
  padding: 0.8rem 1rem;
  cursor: pointer;
  font-weight: 800;
  box-shadow: 0 16px 30px rgba(89, 122, 255, 0.28);
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.pricing-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.pricing-actions-row {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
}

.pricing-btn-danger {
  border-color: #ab2f3a;
  background: #ab2f3a;
}

.pricing-card-disabled {
  opacity: 0.78;
}

.pricing-hint {
  margin: 0.55rem 0 0;
  font-size: 0.9rem;
  color: rgba(213, 224, 244, 0.82);
}

.admin-gate-card {
  width: min(560px, 100%);
  margin-top: 1rem;
}

.admin-gate-card h2 {
  margin: 0;
  font-size: 1.18rem;
  color: #111827;
}

.checkout-card {
  width: min(620px, 94vw);
}

.premium-link {
  border-color: #0f6b7f;
  background: linear-gradient(135deg, #0f6b7f, #1989a5);
}

.auth-card {
  width: min(560px, 94vw);
  padding: 1.35rem;
}

.auth-card-rich {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(145, 188, 255, 0.28);
  background:
    radial-gradient(circle at top left, rgba(123, 201, 255, 0.16), transparent 32%),
    radial-gradient(circle at bottom right, rgba(94, 234, 212, 0.18), transparent 30%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.9), rgba(237, 246, 255, 0.86));
  box-shadow: 0 28px 70px rgba(18, 58, 102, 0.14);
  backdrop-filter: blur(20px);
}

.auth-card-compact {
  width: min(540px, 94vw);
}

.auth-card-body {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.9rem;
}

.auth-decor {
  position: absolute;
  inset: -15% auto auto -12%;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(77, 161, 255, 0.28) 0%, rgba(77, 161, 255, 0.08) 42%, transparent 72%);
  filter: blur(10px);
  pointer-events: none;
}

.auth-decor::after {
  content: "";
  position: absolute;
  right: -140px;
  bottom: -165px;
  width: 240px;
  height: 240px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.2) 0%, rgba(45, 212, 191, 0.06) 42%, transparent 70%);
}

.auth-kicker {
  margin: -0.35rem 0 0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1f72a6;
}

.auth-subtitle {
  max-width: 34rem;
  color: #435c74;
}

.auth-feature-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: -0.1rem;
}

.auth-feature-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid rgba(42, 87, 140, 0.16);
  background: rgba(255, 255, 255, 0.72);
  color: #32506d;
  border-radius: 999px;
  padding: 0.34rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.auth-label {
  display: grid;
  gap: 0.45rem;
}

.auth-label > span {
  font-size: 0.92rem;
  font-weight: 700;
  color: #203347;
}

.input-shell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(141, 172, 205, 0.52);
  background: rgba(255, 255, 255, 0.86);
  border-radius: 16px;
  padding: 0.18rem 0.22rem 0.18rem 0.8rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 10px 26px rgba(22, 53, 95, 0.06);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.input-shell:focus-within {
  border-color: rgba(26, 109, 179, 0.76);
  box-shadow: 0 0 0 4px rgba(84, 162, 255, 0.14), 0 14px 30px rgba(18, 58, 102, 0.12);
  transform: translateY(-1px);
}

.input-shell input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #10263d;
  padding: 0.82rem 0;
  font-size: 0.98rem;
  outline: none;
}

.input-shell input::placeholder {
  color: #627a92;
}

.input-reveal {
  border: 0;
  background: rgba(18, 58, 102, 0.08);
  color: #1c436b;
  border-radius: 12px;
  min-width: 62px;
  padding: 0.62rem 0.72rem;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

.input-reveal:hover {
  background: rgba(18, 58, 102, 0.14);
}

.input-reveal:active {
  transform: translateY(1px);
}

.auth-tabs {
  margin: 0.8rem 0;
  display: flex;
  gap: 0.5rem;
}

.auth-tab {
  border: 1px solid #c7d9ee;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  border-radius: 14px;
  padding: 0.7rem 0.9rem;
  cursor: pointer;
  font-weight: 700;
  flex: 1;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.auth-tab:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(18, 58, 102, 0.08);
}

.auth-tab.active {
  background: linear-gradient(135deg, #123a66, #1f72a6);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 16px 30px rgba(18, 58, 102, 0.18);
}

.auth-submit {
  margin-top: 0.35rem;
  width: 100%;
  border: 1px solid var(--accent);
  background: linear-gradient(135deg, #123a66, #1f72a6);
  color: #fff;
  border-radius: 15px;
  padding: 0.9rem 1rem;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 18px 36px rgba(18, 58, 102, 0.22);
}

.chart-panel { padding: 1rem; margin-bottom: 1rem; }

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.chart-header h2 { margin: 0; font-size: 1.05rem; }

.plan-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0.18rem 0.46rem;
}

.plan-badge.free {
  background: rgba(48, 132, 88, 0.16);
  color: #236f4a;
  border: 1px solid rgba(48, 132, 88, 0.35);
}

.plan-badge.premium {
  background: rgba(30, 72, 138, 0.16);
  color: #1a4d93;
  border: 1px solid rgba(30, 72, 138, 0.35);
}

#chartNav.chart-nav {
  position: absolute !important;
  top: 8px !important;
  left: auto !important;
  right: 10px !important;
  bottom: auto !important;
  transform: none !important;
  margin: 0 !important;
  z-index: 10 !important;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
  max-width: calc(100% - 180px);
}

.chart-nav button {
  border: 1px solid #0f172a;
  background: #0f172a;
  color: #ffffff;
  border-radius: 10px;
  width: 40px;
  height: 34px;
  cursor: pointer;
  font-weight: 800;
  font-size: 18px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.35);
}

.chart-nav > button {
  border: 1px solid #0f172a;
  background: #0f172a;
  color: #ffffff;
  border-radius: 10px;
  width: 40px;
  height: 34px;
  cursor: pointer;
  font-weight: 800;
  font-size: 18px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.35);
}

.chart-nav button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.granularity-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

#chartLeftOptions.chart-left-options {
  position: absolute;
  top: 8px;
  left: 10px;
  z-index: 10;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-width: calc(100% - 240px);
}

.chart-option {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  border: 1px solid rgba(163, 186, 214, 0.72);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 12px;
  padding: 0.42rem 0.62rem;
  font-size: 0.82rem;
  color: #243f5b;
  font-weight: 700;
  line-height: 1.25;
}

.chart-toggle-input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #0f172a;
  cursor: pointer;
}

.granularity-btn {
  width: auto !important;
  min-width: 74px;
  height: 34px;
  padding: 0 0.7rem;
  border-radius: 10px;
  border: 1px solid #c8d4e6 !important;
  background: #e5ebf4 !important;
  color: #425769 !important;
  font-size: 0.88rem !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

.granularity-btn.active {
  border-color: #0f172a !important;
  background: #0f172a !important;
  color: #ffffff !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.28) !important;
}

#chartMeta,
#convertMeta { margin: 0; color: var(--muted); font-size: 0.93rem; }

#chartMeta {
  display: none;
}

.chart-wrap {
  position: relative;
  margin-top: 0.75rem;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(237, 246, 255, 0.82));
  border: 1px solid rgba(181, 205, 232, 0.72);
  padding: 2.75rem 0.55rem 0.55rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.chart-canvas-shell {
  width: 100%;
  height: clamp(280px, 50vw, 520px);
}

#chartCanvas {
  width: 100%;
  height: 100%;
  transition: filter 200ms ease, opacity 200ms ease;
  touch-action: pan-y;
}

.chart-wrap.paywall-blur #chartCanvas {
  filter: blur(7px) saturate(0.85);
  opacity: 0.75;
}

.paywall-locked {
  position: relative;
}

.paywall-locked::after {
  content: none;
}

#converterPanel.paywall-locked .converter-grid,
#sessionPanel.paywall-locked .session-subtitle,
#sessionPanel.paywall-locked .session-streak,
#sessionPanel.paywall-locked .calendar-scroll,
#taxPanel.paywall-locked .table-shell,
#advancedPanel.paywall-locked .table-shell,
#advancedPanel.paywall-locked .feature-subtitle,
#advancedPanel.paywall-locked .slot-summary,
#advancedPanel.paywall-locked .heatmap-scroll {
  filter: blur(6px) saturate(0.8);
  opacity: 0.72;
  pointer-events: none;
  user-select: none;
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
  margin-top: 0;
  margin-bottom: 0;
}

.insight-card { padding: 0.9rem; }

.insights-frame {
  position: relative;
  margin-top: 1.25rem;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid rgba(110, 162, 219, 0.46);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(233, 244, 255, 0.72), rgba(247, 251, 255, 0.78));
  overflow: visible;
}

.insights-badge {
  position: absolute;
  top: -12px;
  right: 10px;
  z-index: 20;
}

.wide-card {
  grid-column: span 2;
  min-width: 0;
}

.insight-card h3 {
  margin: 0;
  font-size: 0.82rem;
  color: #556f87;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.insight-card p {
  margin: 0.45rem 0 0;
  font-size: 1.02rem;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1.35;
}

.section-toggle {
  margin-top: 0.55rem;
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.section-toggle:hover {
  color: #0f4175;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 0.95rem;
  margin-top: 0.4rem;
}

.feature-panel {
  padding: 1rem;
  margin-bottom: 1rem;
  max-width: 100%;
  min-width: 0;
}

.feature-panel-body {
  margin-top: 0.75rem;
  min-width: 0;
}

.section-compact-toggle {
  display: none;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(140, 173, 209, 0.58);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(236, 244, 255, 0.88)),
    radial-gradient(circle at top left, rgba(164, 210, 255, 0.24), transparent 50%);
  color: transparent;
  border-radius: 14px;
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 0;
  line-height: 0;
  font-weight: 800;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 14px 28px rgba(28, 74, 122, 0.1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transform: translateY(0);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.section-compact-toggle::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 11px;
  height: 11px;
  margin-top: -7px;
  margin-left: -5px;
  border-right: 2px solid #2b4b68;
  border-bottom: 2px solid #2b4b68;
  transform: rotate(45deg);
  transition: transform 180ms ease, border-color 180ms ease;
}

.section-compact-toggle::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 48%);
  pointer-events: none;
}

.section-compact-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(110, 154, 203, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 18px 30px rgba(28, 74, 122, 0.14);
}

.section-compact-toggle.is-collapsed {
  background:
    linear-gradient(180deg, rgba(251, 254, 255, 0.96), rgba(232, 242, 252, 0.9)),
    radial-gradient(circle at top left, rgba(164, 210, 255, 0.18), transparent 50%);
}

.section-compact-toggle.is-collapsed::before {
  transform: rotate(-45deg);
}

.section-compact-toggle:active {
  transform: translateY(0);
}

.feature-subtitle {
  margin: 0.35rem 0 0.7rem;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.session-subtitle {
  font-size: 0.92rem;
  margin-top: 0.25rem;
  color: #47627b;
}

.table-shell {
  margin-top: 0.65rem;
  overflow: auto;
  max-width: 100%;
  min-width: 0;
  -webkit-overflow-scrolling: touch;
  border-radius: 16px;
}

.mini-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 740px;
  max-width: 100%;
}

th, td {
  text-align: left;
  padding: 0.58rem;
  border-bottom: 1px solid #e9ddcb;
  font-size: 0.9rem;
}

th {
  color: #3d5672;
  font-weight: 700;
  background: rgba(237, 245, 255, 0.95);
}

.mini-table td:first-child {
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slot-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}

.slot-chip {
  border: 1px solid rgba(163, 186, 214, 0.62);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(242, 248, 255, 0.86));
  border-radius: 14px;
  padding: 0.5rem 0.65rem;
  font-size: 0.88rem;
  color: #2a3f57;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.35;
  min-height: 60px;
  display: flex;
  align-items: center;
}

.calendar-scroll {
  overflow-x: auto;
  max-width: 100%;
  min-width: 0;
  -webkit-overflow-scrolling: touch;
}

.session-streak {
  margin: 0.1rem 0 0.8rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: #1f3f66;
}

.calendar-grid {
  min-width: 820px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 12px;
  grid-template-rows: repeat(7, 12px);
  gap: 3px;
}

.calendar-grid-empty {
  min-width: 0;
  display: block;
}

.calendar-empty-message {
  padding: 0.8rem 0.2rem 0.2rem;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.calendar-cell {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 1px solid rgba(99, 137, 184, 0.2);
}

.calendar-cell.out-of-range {
  border-color: rgba(177, 196, 219, 0.18);
}

.heatmap-scroll {
  overflow-x: auto;
  max-width: 100%;
  min-width: 0;
  -webkit-overflow-scrolling: touch;
}

.heatmap-grid {
  --heat-label: 50px;
  --heat-cell: 24px;
  min-width: calc(var(--heat-label) + (24 * var(--heat-cell)));
  display: grid;
  grid-template-columns: var(--heat-label) repeat(24, minmax(var(--heat-cell), 1fr));
  gap: 4px;
  align-items: center;
  max-width: 100%;
}

.heatmap-corner {
  height: 24px;
}

.heatmap-hour {
  font-size: 0.78rem;
  color: #46607b;
  text-align: center;
}

.heatmap-hour-muted {
  color: transparent;
}

.heatmap-day {
  font-size: 0.84rem;
  color: #2d4863;
  font-weight: 700;
}

.heat-cell {
  height: var(--heat-cell);
  border-radius: 6px;
  border: 1px solid rgba(119, 160, 208, 0.22);
  color: #1b3554;
  font-size: 0.68rem;
  line-height: calc(var(--heat-cell) - 2px);
  text-align: center;
  user-select: none;
}

.muted { color: var(--muted); }

.account-link:hover,
.account-actions button:hover,
.pricing-btn:hover,
.auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(28, 74, 122, 0.18);
}

.account-link:active,
.account-actions button:active,
.pricing-btn:active,
.auth-submit:active {
  transform: translateY(0);
}

.auth-inline-link {
  margin: 0.35rem 0 0.1rem;
  text-align: right;
  font-size: 0.88rem;
}

.auth-inline-link a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

.auth-inline-link a:hover {
  text-decoration: underline;
}

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

  .mini-table {
    min-width: 100%;
  }

  .mini-table td:first-child {
    max-width: none;
    white-space: normal;
  }

  .heatmap-grid {
    --heat-label: 34px;
    --heat-cell: 12px;
    gap: 2px;
    min-width: 100%;
  }

  .calendar-grid {
    min-width: 100%;
    grid-auto-columns: 10px;
    grid-template-rows: repeat(7, 10px);
    gap: 2px;
  }
}

@media (max-width: 720px) {
  html,
  body {
    max-width: 100%;
    overflow-x: clip;
  }

  .site-header-inner {
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
  }

  .site-nav {
    width: auto;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .site-nav a {
    flex: 0 0 auto;
    text-align: center;
    padding: 0.48rem 0.72rem;
  }

  .site-footer-inner {
    justify-content: flex-end;
    padding: 0.9rem 0.8rem;
  }

  .site-footer-brand {
    width: auto;
    margin-left: auto;
    text-align: right;
  }

  .app-shell {
    padding: 1.1rem 0.8rem 2rem;
  }

  .auth-shell {
    padding: 1rem 0.8rem;
  }

  .auth-card,
  .auth-card-compact {
    width: min(100%, 100%);
    padding: 1.05rem;
  }

  .auth-card-body {
    gap: 0.8rem;
  }

  .auth-feature-row {
    gap: 0.45rem;
  }

  .auth-feature-chip {
    font-size: 0.74rem;
    padding: 0.32rem 0.58rem;
  }

  .auth-tabs {
    gap: 0.4rem;
  }

  .auth-tab {
    padding: 0.68rem 0.72rem;
    font-size: 0.92rem;
  }

  .input-shell {
    border-radius: 14px;
    padding-left: 0.72rem;
  }

  .input-shell input {
    padding: 0.8rem 0;
    font-size: 0.96rem;
  }

  .hero {
    margin-bottom: 1.25rem;
  }

  .subtitle {
    font-size: 0.99rem;
    line-height: 1.55;
  }

  .account-bar,
  .pricing-header-bar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .account-summary {
    gap: 0.55rem;
  }

  .account-meta {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .account-meta-item {
    min-width: 0;
  }

  .account-actions,
  .pricing-top-actions {
    width: 100%;
    justify-content: stretch;
  }

  .pricing-user-grid {
    grid-template-columns: 1fr;
  }

  .account-link,
  .account-actions button,
  .pricing-top-actions .account-link {
    flex: 1 1 auto;
    text-align: center;
  }

  .upload-zone {
    margin: 1rem 0 1.35rem;
    padding: 1.4rem 1rem;
  }

  .upload-meta {
    justify-content: flex-start;
  }

  .upload-meta-chip {
    max-width: 100%;
    justify-content: flex-start;
    white-space: normal;
    text-align: left;
  }

  .top-totals,
  .insights-grid,
  .feature-grid,
  .converter-grid,
  .slot-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-shell > *,
  .top-totals > *,
  .insights-grid > *,
  .feature-grid > *,
  .converter-grid > *,
  .slot-summary > *,
  .panel,
  .feature-panel,
  .feature-panel-body,
  .table-shell,
  .calendar-scroll,
  .heatmap-scroll,
  .chart-panel,
  .chart-wrap,
  .insights-frame,
  .account-bar,
  .upload-zone {
    min-width: 0;
    max-width: 100%;
  }

  .wide-card {
    grid-column: auto;
  }

  .chart-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
  }

  #sessionPanel > .chart-header,
  #advancedPanel .feature-panel > .chart-header,
  #taxPanel > .chart-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0.5rem;
  }

  #sessionPanel > .chart-header h2,
  #advancedPanel .feature-panel > .chart-header h2,
  #taxPanel > .chart-header h2 {
    min-width: 0;
  }

  .section-compact-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  .chart-panel,
  .feature-panel,
  .converter-panel,
  .insights-frame,
  .total-card {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }

  .chart-wrap {
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
  }

  #chartLeftOptions.chart-left-options {
    position: static;
    margin: 0;
    max-width: none;
    width: 100%;
    order: 1;
  }

  #chartNav.chart-nav {
    position: static !important;
    right: auto !important;
    top: auto !important;
    max-width: none;
    width: 100%;
    order: 2;
    justify-content: space-between;
  }

  .granularity-switch {
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .granularity-btn {
    width: 100% !important;
    min-width: 0;
    font-size: 0.85rem !important;
    padding: 0 0.45rem;
  }

  .chart-nav > button {
    flex: 0 0 42px;
  }

  #chartCanvas {
    order: 3;
  }

  .chart-canvas-shell {
    order: 3;
    height: clamp(240px, 62vw, 360px);
  }

  .chart-option {
    width: 100%;
    min-height: 46px;
    font-size: 0.82rem;
  }

  .feature-panel.compact-collapsed {
    padding-bottom: 0.9rem;
  }

  .feature-panel.compact-collapsed .feature-panel-body {
    display: none;
  }

  .insights-badge {
    right: 12px;
  }

  .insight-card p,
  .total-card p {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .session-streak,
  .pricing-amount {
    font-size: 1.4rem;
  }

  .table-shell {
    margin-left: 0;
    margin-right: 0;
  }

  .mini-table {
    min-width: 0;
    font-size: 0.85rem;
    table-layout: auto;
  }

  .mini-table thead {
    display: none;
  }

  .mini-table,
  .mini-table tbody,
  .mini-table tr,
  .mini-table td {
    display: block;
    width: 100%;
  }

  .mini-table tr {
    margin-bottom: 0.7rem;
    padding: 0.78rem 0.84rem;
    border: 1px solid rgba(192, 211, 232, 0.78);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(243, 249, 255, 0.9));
    box-shadow: 0 8px 24px rgba(28, 74, 122, 0.08);
  }

  .mini-table td {
    border: 0;
    padding: 0.28rem 0;
    white-space: normal;
    word-break: break-word;
  }

  .mini-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.16rem;
    color: #536c84;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .mini-table td[colspan]::before {
    content: none;
  }

  .mini-table td:first-child {
    max-width: none;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  .calendar-grid {
    min-width: 100%;
    grid-auto-columns: 8px;
    grid-template-rows: repeat(7, 8px);
    gap: 2px;
  }

  .calendar-grid-empty {
    padding: 0.1rem 0 0.2rem;
  }

  .heatmap-grid {
    --heat-label: 28px;
    --heat-cell: 10px;
    gap: 2px;
    min-width: 100%;
  }

  .heatmap-hour,
  .heatmap-day {
    font-size: 0.66rem;
  }
}

@media (max-width: 460px) {
  h1 {
    font-size: 1.65rem;
  }

  .chart-wrap {
    padding: 0.75rem;
  }

  .chart-canvas-shell {
    height: clamp(220px, 68vw, 320px);
  }

  .granularity-switch {
    grid-template-columns: 1fr 1fr;
  }

  .plan-badge {
    font-size: 0.68rem;
  }

  .slot-chip,
  .chart-option,
  .account-meta,
  .subtitle,
  #chartMeta,
  #convertMeta {
    font-size: 0.86rem;
  }

  .section-toggle {
    font-size: 0.8rem;
  }

  .calendar-grid {
    grid-auto-columns: 7px;
    grid-template-rows: repeat(7, 7px);
    gap: 2px;
  }

  .heatmap-grid {
    --heat-label: 24px;
    --heat-cell: 8px;
  }

  .heat-cell {
    border-radius: 4px;
    font-size: 0.58rem;
  }

  .mini-table tr {
    padding: 0.72rem 0.72rem;
  }
}

/* ProliStats dashboard refresh */
:root {
  --bg: #f4f7fb;
  --panel: rgba(255, 255, 255, 0.97);
  --panel-strong: rgba(249, 251, 255, 0.99);
  --ink: #162033;
  --muted: #637387;
  --line: #e4ebf5;
  --line-strong: rgba(58, 107, 255, 0.18);
  --accent: #3567ff;
  --accent-soft: #eef3ff;
  --accent-2: #77a7ff;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
  --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.05);
}

body {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.9) 0%, transparent 26%),
    radial-gradient(circle at 88% 8%, rgba(161, 196, 255, 0.28) 0%, transparent 24%),
    linear-gradient(180deg, #f7f9fc 0%, #f2f5fb 100%);
}

.app-shell {
  max-width: 1400px;
  padding: 1.35rem 1.1rem 3rem;
}

.site-header {
  padding: 0.85rem 1rem 0;
  border-bottom: 0;
  background: rgba(244, 247, 251, 0.82);
}

.site-header-inner {
  max-width: 1400px;
  padding: 0.8rem 1rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
}

.site-brand {
  gap: 0.8rem;
  color: #121a29;
  font-size: 1.02rem;
}

.site-brand-mark {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, #3567ff, #63b3ff);
  box-shadow: 0 0 0 6px rgba(53, 103, 255, 0.12);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.site-nav a,
.site-nav .site-logout-btn {
  padding: 0.56rem 0.84rem;
  border-radius: 14px;
  border: 0;
  background: transparent;
  color: #64748b;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.site-nav a:hover,
.site-nav .site-logout-btn:hover {
  background: #f4f7fd;
  color: #1f2c41;
}

.site-nav a.is-active {
  background: linear-gradient(180deg, #eef3ff, #e6edff);
  color: #355bdb;
  box-shadow: inset 0 0 0 1px rgba(53, 91, 219, 0.08);
}

.site-nav .site-logout-btn {
  color: #44556c;
}

.site-footer {
  border-top: 0;
  background: transparent;
}

.site-footer-inner {
  max-width: 1400px;
  padding: 0.45rem 1rem 1.2rem;
}

.site-footer-brand {
  color: #7a8798;
  font-weight: 700;
}

.dashboard-shell {
  display: grid;
  grid-template-columns: minmax(260px, 290px) minmax(0, 1fr);
  grid-template-areas:
    "hero hero"
    "sidebar main";
  gap: 1.2rem;
  align-items: start;
}

.dashboard-hero {
  grid-area: hero;
  margin-bottom: 0;
  padding: 1.35rem 1.45rem;
  overflow: hidden;
}

.dashboard-sidebar {
  grid-area: sidebar;
  display: grid;
  gap: 1.2rem;
  align-self: start;
  position: sticky;
  top: 98px;
  min-width: 0;
}

.dashboard-main {
  grid-area: main;
  min-width: 0;
}

.dashboard-main > * {
  min-width: 0;
}

.hero {
  margin-bottom: 0;
}

.dashboard-hero-copy {
  max-width: 760px;
}

.eyebrow {
  color: #4f67ff;
  font-size: 0.74rem;
  letter-spacing: 0.18em;
}

h1 {
  font-family: "Avenir Next", "Segoe UI", "Trebuchet MS", sans-serif;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  letter-spacing: -0.045em;
  color: #101827;
}

.subtitle {
  max-width: 60ch;
  color: #6a778a;
  font-size: 1rem;
  line-height: 1.72;
}

.hero-chip-row {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.46rem 0.72rem;
  border-radius: 999px;
  border: 1px solid #dce6fb;
  background: #f6f9ff;
  color: #52647d;
  font-size: 0.8rem;
  font-weight: 700;
}

.panel {
  background: linear-gradient(180deg, var(--panel), var(--panel-strong));
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.account-bar {
  margin-top: 0;
  padding: 1.1rem;
  display: grid;
  gap: 1rem;
  align-items: stretch;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.account-summary {
  gap: 0.72rem;
}

.account-kicker {
  color: #6a7789;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
}

.account-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.72rem;
}

.account-meta-item {
  min-width: 0;
  padding: 0.9rem 0.95rem;
  border-radius: 18px;
  border: 1px solid #e6edf8;
  background: #f7faff;
  box-shadow: none;
}

.account-meta-label {
  color: #7c8799;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
}

.account-meta-item strong {
  margin-top: 0.28rem;
  color: #111c2d;
  font-size: 1rem;
}

.account-cta-group {
  display: grid;
  gap: 0.68rem;
}

.account-actions {
  display: grid;
  gap: 0.68rem;
}

.account-link,
.account-actions button,
.pricing-btn,
.auth-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.8rem 1rem;
  border-radius: 16px;
  font-size: 0.88rem;
  font-weight: 800;
  box-shadow: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.account-link:hover,
.account-actions button:hover,
.pricing-btn:hover,
.auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(53, 103, 255, 0.18);
}

.account-link {
  border-color: #dce6fb;
  background: linear-gradient(180deg, #ffffff, #f6f9ff);
  color: #254261;
}

.account-link-primary,
.pricing-btn,
.auth-submit {
  border-color: rgba(53, 103, 255, 0.22);
  background: linear-gradient(135deg, #3567ff, #5f8dff);
  color: #ffffff;
}

.premium-link {
  border-color: rgba(16, 185, 129, 0.18);
  background: linear-gradient(135deg, #10b981, #1aa0b7);
}

#authLogoutBtn {
  border: 1px solid #dce6fb;
  background: linear-gradient(180deg, #ffffff, #f6f9ff);
  color: #254261;
}

.upload-zone {
  margin: 0;
  padding: 1.15rem;
  display: grid;
  gap: 0.92rem;
  text-align: left;
  border: 1px solid #e5ecf7;
  background: linear-gradient(180deg, #ffffff, #f9fbff);
  box-shadow: var(--shadow);
}

.upload-copy {
  min-width: 0;
}

.upload-title {
  font-size: 1.02rem;
  line-height: 1.25;
  color: #111c2d;
}

.upload-subtitle {
  max-width: none;
  margin: 0.25rem 0 0;
  color: #687587;
  font-size: 0.9rem;
  line-height: 1.55;
}

.upload-stage {
  display: grid;
  justify-items: center;
  gap: 0.45rem;
  padding: 1.15rem 1rem 1.05rem;
  border: 2px dashed rgba(103, 91, 255, 0.72);
  border-radius: 24px;
  background:
    radial-gradient(circle at top, rgba(118, 109, 255, 0.08), transparent 50%),
    linear-gradient(180deg, rgba(250, 249, 255, 0.95), rgba(245, 247, 255, 0.98));
  text-align: center;
  cursor: pointer;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.upload-zone.is-dragging .upload-stage {
  border-color: #4f66ff;
  box-shadow: 0 18px 32px rgba(87, 93, 255, 0.14);
  transform: translateY(-1px);
}

.upload-zone.demo-locked .upload-stage {
  border-color: rgba(142, 151, 182, 0.72);
  background: linear-gradient(180deg, rgba(250, 251, 255, 0.95), rgba(246, 248, 255, 0.98));
  cursor: not-allowed;
}

.upload-zone.demo-locked .upload-title {
  font-size: 1.02rem;
}

.upload-zone.demo-locked .upload-subtitle {
  font-size: 0.9rem;
}

.upload-visual {
  width: 56px;
  height: 56px;
  margin: 0;
}

.upload-visual::before {
  inset: 5px;
  background: radial-gradient(circle, rgba(103, 91, 255, 0.16), transparent 72%);
}

.upload-visual-core {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 18px;
  border: 1px solid #e0defa;
  background: linear-gradient(180deg, #ffffff, #f1efff);
  color: #5c4cff;
  box-shadow: 0 10px 22px rgba(92, 76, 255, 0.12);
}

.upload-icon-svg {
  width: 28px;
  height: 28px;
}

.upload-stage-title {
  margin: 0.05rem 0 0;
  color: #131b2c;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.25;
}

.upload-stage-hint {
  margin: 0;
  color: #818da0;
  font-size: 0.82rem;
  line-height: 1.4;
}

.upload-select-btn {
  min-width: 134px;
  min-height: 44px;
  padding: 0.72rem 1rem;
  border: 0;
  border-radius: 15px;
  background: linear-gradient(135deg, #5a46ff, #4f7fff);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(88, 89, 255, 0.24);
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.upload-select-btn:hover,
.upload-select-btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 18px 32px rgba(88, 89, 255, 0.28);
}

.upload-select-btn:focus-visible {
  outline: 2px solid rgba(90, 70, 255, 0.22);
  outline-offset: 3px;
}

.upload-stage:focus-visible {
  outline: 2px solid rgba(90, 70, 255, 0.22);
  outline-offset: 4px;
}

.upload-zone.demo-locked .upload-select-btn {
  opacity: 0.96;
}

.upload-meta {
  display: grid;
  gap: 0.52rem;
  margin-top: 0.02rem;
  justify-content: stretch;
}

.upload-meta-chip {
  width: 100%;
  padding: 0.64rem 0.8rem;
  border-radius: 18px;
  background: #f6f9ff;
  border-color: #e1e9f6;
  color: #53657b;
  box-shadow: none;
}

.upload-meta-chip strong {
  color: #758397;
  font-size: 0.68rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.upload-meta-chip-file {
  display: grid;
  gap: 0.28rem;
  align-items: start;
}

.upload-meta-name {
  color: #31455e;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.upload-meta-chip-time {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.upload-meta-value {
  color: #55667a;
  font-size: 0.84rem;
  font-weight: 700;
}

.greeting-box {
  margin: 0;
  padding: 0.92rem 1rem;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.upload-greeting {
  color: #30455f;
  font-size: 0.95rem;
  line-height: 1.52;
}

.free-upsell-card {
  margin: 0;
  padding: 1.05rem 1rem;
  background:
    radial-gradient(circle at top right, rgba(89, 113, 255, 0.24), transparent 44%),
    linear-gradient(160deg, rgba(12, 17, 28, 0.98), rgba(27, 33, 46, 0.96));
  border: 1px solid rgba(72, 92, 135, 0.55);
  box-shadow: 0 20px 44px rgba(10, 15, 24, 0.24);
  color: #f7faff;
}

.free-upsell-kicker {
  margin: 0;
  color: rgba(156, 182, 255, 0.92);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.free-upsell-card h2 {
  margin: 0.48rem 0 0;
  color: #ffffff;
  font-size: 1.18rem;
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.free-upsell-copy {
  margin: 0.7rem 0 0;
  color: rgba(225, 233, 247, 0.88);
  font-size: 0.91rem;
  line-height: 1.55;
}

.free-upsell-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 0.9rem;
  padding: 0.78rem 0.95rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #4f7bff, #72c7ff);
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 14px 26px rgba(73, 121, 255, 0.26);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.free-upsell-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 30px rgba(73, 121, 255, 0.3);
}

.top-totals {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.total-card {
  position: relative;
  overflow: hidden;
  min-height: 116px;
  height: 100%;
  padding: 1.05rem 1.05rem 0.98rem;
}

.total-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #5f8dff, #76d3ff);
}

.total-card h3 {
  font-size: 0.68rem;
  color: #8893a4;
  font-weight: 700;
  letter-spacing: 0.09em;
  line-height: 1.35;
}

.total-card p {
  margin-top: 0.62rem;
  color: #101827;
  font-size: 1.5rem;
  font-weight: 780;
  letter-spacing: -0.03em;
  white-space: normal;
}

#allTimeUsd {
  color: #3567ff;
}

#allTimeGbp {
  color: #14925b;
}

.dashboard-focus-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.82fr);
  gap: 1.15rem;
  align-items: start;
  margin-bottom: 1.15rem;
}

.chart-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.9rem;
  margin-bottom: 1rem;
}

.chart-panel,
.converter-panel,
.feature-panel,
.insights-frame {
  margin-bottom: 1.15rem;
  padding: 1.15rem;
}

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

.chart-header h2 {
  color: #111827;
  font-size: 1.02rem;
}

.plan-badge {
  padding: 0.2rem 0.58rem;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.plan-badge.free {
  background: #eef8f2;
  color: #157347;
  border-color: #d2ecd9;
}

.plan-badge.premium {
  background: #eef3ff;
  color: #355bdb;
  border-color: #dbe4ff;
}

#chartMeta,
#convertMeta {
  color: #7a8798;
  font-size: 0.88rem;
}

.chart-wrap {
  margin-top: 0;
  padding: 1rem 1rem 0.95rem;
  border-radius: 22px;
  border: 1px solid #e3ebf7;
  background: linear-gradient(180deg, #f9fbff, #f4f8ff);
}

#chartLeftOptions.chart-left-options {
  position: static;
  top: auto;
  left: auto;
  z-index: auto;
  flex: 1 1 320px;
  max-width: none;
}

#chartNav.chart-nav {
  position: static !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  z-index: auto !important;
  max-width: none;
  flex: 1 1 380px;
  justify-content: flex-end;
}

.chart-option {
  border: 1px solid #dce6f8;
  background: #ffffff;
  border-radius: 14px;
  color: #4f6076;
  font-size: 0.79rem;
}

.chart-nav button {
  width: 42px;
  height: 36px;
  border-radius: 12px;
  border-color: #dce6f8;
  background: #ffffff;
  color: #23344a;
  box-shadow: none;
}

.granularity-btn {
  min-width: 78px;
  height: 36px;
  border-radius: 12px;
  border-color: #dce6f8 !important;
  background: #ffffff !important;
  color: #64748b !important;
  font-size: 0.84rem !important;
}

.granularity-btn.active {
  border-color: transparent !important;
  background: linear-gradient(135deg, #3567ff, #5f8dff) !important;
  color: #ffffff !important;
  box-shadow: 0 10px 24px rgba(53, 103, 255, 0.24) !important;
}

.chart-canvas-shell {
  height: clamp(380px, 50vw, 600px);
}

.converter-panel {
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.converter-grid {
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

.converter-grid label {
  gap: 0.42rem;
}

.converter-grid label span,
.converted-result h3 {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7a8798;
}

input[type="number"],
input[type="text"],
select {
  border-radius: 16px;
  border-color: #dfe7f6;
  padding: 0.82rem 0.92rem;
  background: #ffffff;
  box-shadow: none;
}

.converted-result {
  border: 1px solid #e2e9f7;
  border-radius: 20px;
  padding: 1rem;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
}

.converted-result p {
  margin-top: 0.5rem;
  color: #101827;
  font-size: 1.45rem;
}

.insights-frame {
  margin-top: 0;
  padding: 1.05rem;
  border-color: #e3ebf7;
  background: linear-gradient(180deg, #ffffff, #fbfcff);
}

.insights-badge {
  top: 14px;
  right: 14px;
}

.insights-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.insight-card {
  padding: 1rem;
}

.insight-card h3 {
  font-size: 0.72rem;
  color: #7b8798;
  letter-spacing: 0.12em;
}

.insight-card p {
  margin-top: 0.58rem;
  color: #182536;
  font-size: 1.06rem;
  font-weight: 800;
  white-space: normal;
}

.feature-grid {
  gap: 1.15rem;
}

.feature-panel {
  background: linear-gradient(180deg, #ffffff, #fbfcff);
}

.feature-subtitle,
.session-subtitle {
  color: #7a8798;
  font-size: 0.9rem;
}

.session-streak {
  color: #111827;
  font-size: 1.72rem;
}

.slot-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.slot-chip {
  min-height: 0;
  padding: 0.74rem 0.82rem;
  border-radius: 18px;
  border-color: #e3ebf7;
  background: #f7faff;
}

.table-shell {
  border: 1px solid #e5edf8;
  background: #fbfcff;
}

th {
  background: #f5f8fd;
  color: #6d7c91;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

td {
  color: #1f2d3d;
}

.calendar-scroll,
.heatmap-scroll {
  padding-bottom: 0.15rem;
}

@media (max-width: 1180px) {
  .dashboard-shell {
    grid-template-columns: 1fr;
    grid-template-areas:
      "hero"
      "sidebar"
      "main";
  }

  .dashboard-sidebar {
    position: static;
  }

  .dashboard-focus-grid {
    grid-template-columns: 1fr;
  }

  .converter-panel {
    order: -1;
  }

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

  .pricing-user-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .site-header {
    padding: 0.7rem 0.8rem 0;
  }

  .site-header-inner {
    padding: 0.72rem 0.82rem;
    border-radius: 20px;
  }

  .site-nav {
    max-width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.08rem;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .dashboard-hero {
    padding: 1.15rem 1rem;
  }

  .hero-chip-row {
    margin-top: 0.85rem;
  }

  .hero-chip {
    font-size: 0.76rem;
    padding: 0.4rem 0.65rem;
  }

  .dashboard-sidebar {
    gap: 0.85rem;
  }

  .pricing-header-bar {
    padding: 0.95rem;
  }

  .pricing-card {
    padding: 1.05rem 1rem;
  }

  .upload-zone {
    padding: 1rem;
  }

  .upload-stage {
    padding: 1rem 0.8rem 0.95rem;
  }

  .upload-title {
    font-size: 0.98rem;
  }

  .upload-subtitle {
    font-size: 0.88rem;
  }

  .upload-stage-title {
    font-size: 0.93rem;
  }

  .chart-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  #chartLeftOptions.chart-left-options {
    width: 100%;
    flex: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #chartNav.chart-nav {
    width: 100%;
    flex: none;
    justify-content: space-between;
  }

  .chart-option {
    width: 100%;
    min-height: 44px;
  }

  .account-bar,
  .upload-zone,
  .greeting-box,
  .chart-panel,
  .converter-panel,
  .insights-frame,
  .feature-panel {
    padding: 0.95rem;
  }

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

  .total-card p {
    font-size: 1.24rem;
  }

  .slot-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .app-shell {
    padding: 1rem 0.82rem 2.4rem;
  }

  .site-header {
    padding: 0.6rem 0.72rem 0;
  }

  .site-header-inner {
    gap: 0.65rem;
  }

  .site-brand {
    font-size: 0.96rem;
  }

  .site-nav a {
    padding: 0.5rem 0.7rem;
    font-size: 0.86rem;
  }

  .top-totals {
    grid-template-columns: 1fr;
  }

  .wide-card {
    grid-column: auto;
  }
}
