:root {
  --bg: #f7ede2;
  --surface: rgba(255, 250, 244, 0.86);
  --surface-strong: #fff8f1;
  --text: #321d13;
  --muted: #7d685a;
  --line: rgba(50, 29, 19, 0.1);
  --orange-deep: #8f3f17;
  --orange: #d7641a;
  --orange-soft: #f2a65a;
  --orange-pale: #ffd9b0;
  --danger: #b8462b;
  --success: #1d7e4f;
  --shadow-xl: 0 35px 110px rgba(143, 63, 23, 0.16);
  --shadow-md: 0 18px 46px rgba(143, 63, 23, 0.1);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --container: 1320px;
}

:root[data-theme="dark"] {
  --bg: #1c130e;
  --surface: rgba(41, 27, 19, 0.86);
  --surface-strong: #2b1c14;
  --text: #f7e7d7;
  --muted: #d1b39b;
  --line: rgba(247, 231, 215, 0.1);
  --orange-deep: #ffbf85;
  --orange: #ff9f43;
  --orange-soft: #cf7132;
  --orange-pale: #5f3218;
  --shadow-xl: 0 35px 110px rgba(0, 0, 0, 0.34);
  --shadow-md: 0 18px 46px rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: 6rem;
  font-family: "Source Sans 3", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(215, 100, 26, 0.22), transparent 24%),
    radial-gradient(circle at 82% 8%, rgba(242, 166, 90, 0.28), transparent 24%),
    linear-gradient(180deg, #fbf1e6 0%, #f3dfca 100%);
}

:root[data-theme="dark"] body {
  background:
    radial-gradient(circle at top left, rgba(255, 159, 67, 0.18), transparent 24%),
    radial-gradient(circle at 82% 8%, rgba(95, 50, 24, 0.45), transparent 24%),
    linear-gradient(180deg, #221711 0%, #140d09 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.35), transparent 35%),
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.26), transparent 30%);
  z-index: -1;
}

:root[data-theme="dark"] body::before {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.03), transparent 35%),
    radial-gradient(circle at 50% 0%, rgba(255, 159, 67, 0.06), transparent 30%);
}

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

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

.container {
  width: min(calc(100% - 2rem), var(--container));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  padding-top: 0.8rem;
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid rgba(143, 63, 23, 0.1);
  border-radius: 999px;
  background: rgba(255, 247, 239, 0.82);
  backdrop-filter: blur(20px);
  box-shadow: 0 18px 50px rgba(143, 63, 23, 0.08);
}

:root[data-theme="dark"] .nav-shell {
  border-color: rgba(255, 191, 133, 0.12);
  background: rgba(34, 22, 15, 0.86);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
}

:root[data-theme="dark"] .theme-switch {
  border-color: rgba(255, 191, 133, 0.12);
  background: rgba(255, 159, 67, 0.14);
  color: #fff1e2;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  color: white;
  font-family: "Sora", sans-serif;
  font-weight: 800;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.16), transparent),
    linear-gradient(135deg, var(--orange-deep), var(--orange));
  box-shadow: 0 16px 35px rgba(143, 63, 23, 0.24);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brand-text strong,
.hero-copy h1,
.section-head h1,
.section-head h2,
.section-head h3,
.result-metric strong {
  font-family: "Sora", sans-serif;
}

.brand-text strong {
  font-size: 1rem;
}

.brand-text small {
  color: var(--muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.9rem;
  border: 1px solid rgba(143, 63, 23, 0.1);
  border-radius: 999px;
  background: rgba(143, 63, 23, 0.05);
  color: var(--orange-deep);
  cursor: pointer;
}

.theme-switch-floating {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 80;
  width: auto;
  box-shadow: 0 16px 32px rgba(143, 63, 23, 0.16);
}

:root[data-theme="dark"] .theme-switch-floating {
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.34);
}

.theme-switch-track {
  position: relative;
  width: 50px;
  height: 28px;
  border-radius: 999px;
  background: rgba(143, 63, 23, 0.18);
  transition: background 0.2s ease;
}

.theme-switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange-deep), var(--orange));
  transition: transform 0.2s ease;
}

.theme-switch[aria-pressed="true"] .theme-switch-track {
  background: rgba(255, 159, 67, 0.28);
}

.theme-switch[aria-pressed="true"] .theme-switch-thumb {
  transform: translateX(22px);
}

.theme-switch-label {
  font-weight: 700;
}

.nav-links a,
.nav-button {
  padding: 0.85rem 1rem;
  border-radius: 999px;
  color: var(--orange-deep);
  border: 1px solid transparent;
  background: transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.nav-links a:hover,
.nav-button:hover,
.nav-links .is-active {
  transform: translateY(-1px);
  background: rgba(143, 63, 23, 0.08);
  border-color: rgba(143, 63, 23, 0.1);
}

:root[data-theme="dark"] .nav-links a:hover,
:root[data-theme="dark"] .nav-button:hover,
:root[data-theme="dark"] .nav-links .is-active {
  background: rgba(255, 159, 67, 0.12);
  border-color: rgba(255, 191, 133, 0.12);
}

.cta-link {
  background: linear-gradient(135deg, var(--orange-deep), var(--orange));
  color: white !important;
}

.hero-section {
  position: relative;
  padding: 3.5rem 0 2rem;
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 520px;
  background:
    radial-gradient(circle at 16% 18%, rgba(215, 100, 26, 0.22), transparent 25%),
    radial-gradient(circle at 84% 0%, rgba(242, 166, 90, 0.26), transparent 24%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: 1.4rem;
  align-items: start;
  min-width: 0;
}

.hero-copy {
  position: sticky;
  top: 6rem;
  min-width: 0;
}

.hero-copy-shell {
  display: grid;
  gap: 1rem;
  padding: 1.35rem;
  border: 1px solid rgba(143, 63, 23, 0.1);
  border-radius: 30px;
  background: rgba(255, 250, 244, 0.82);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px);
}

:root[data-theme="dark"] .hero-copy-shell {
  border-color: rgba(255, 191, 133, 0.12);
  background: rgba(41, 27, 19, 0.76);
}

:root[data-theme="dark"] .hero-head p,
:root[data-theme="dark"] .brand-text small,
:root[data-theme="dark"] .empty-state,
:root[data-theme="dark"] .footer-shell,
:root[data-theme="dark"] .status-shell p {
  color: #e6c9b1;
}

.hero-head {
  margin-bottom: 0;
}

.page-intro {
  margin: 0 0 1rem;
}

.page-intro .section-head {
  margin-bottom: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1rem;
  padding: 0.52rem 0.95rem;
  border-radius: 999px;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--orange);
  background: rgba(215, 100, 26, 0.1);
  border: 1px solid rgba(215, 100, 26, 0.1);
}

.hero-copy h1,
.section-head h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.6rem, 4vw, 4.8rem);
  line-height: 1;
  letter-spacing: -0.04em;
  max-width: 12ch;
}

.hero-head p {
  max-width: 34ch;
  margin: 0;
}

.hero-text,
.section-head p,
.form-note,
.empty-state,
.status-shell p {
  color: var(--muted);
  line-height: 1.65;
}

.hero-text {
  max-width: 46ch;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin: 1rem 0 1.15rem;
}

.hero-actions-stack {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
}

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

.summary-card {
  display: grid;
  gap: 0.4rem;
  min-width: 0;
  padding: 1rem 1.05rem;
  border-radius: 22px;
  border: 1px solid rgba(143, 63, 23, 0.1);
  background: linear-gradient(135deg, rgba(255, 247, 239, 0.94), rgba(255, 234, 211, 0.76));
  box-shadow: 0 12px 28px rgba(143, 63, 23, 0.07);
}

.summary-label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  color: var(--orange);
}

.summary-card strong {
  color: var(--orange-deep);
  font-family: "Sora", sans-serif;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

:root[data-theme="dark"] .summary-card {
  background: linear-gradient(135deg, rgba(255, 159, 67, 0.16), rgba(95, 50, 24, 0.6));
  border-color: rgba(255, 191, 133, 0.16);
}

:root[data-theme="dark"] .summary-label {
  color: #ffd5ad;
}

:root[data-theme="dark"] .summary-card strong {
  color: #fff1e2;
}

.hero-stage {
  position: relative;
  min-width: 0;
}

.hero-card,
.dashboard-card,
.form-shell {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(143, 63, 23, 0.1);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(18px);
}

:root[data-theme="dark"] .hero-card,
:root[data-theme="dark"] .dashboard-card,
:root[data-theme="dark"] .form-shell {
  background: var(--surface);
  border-color: rgba(255, 191, 133, 0.12);
}

.hero-card::before,
.dashboard-card::before,
.form-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), transparent 28%);
  pointer-events: none;
}

.hero-card {
  padding: 1.15rem;
}

.panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(320px, 0.84fr);
  gap: 1rem;
  min-width: 0;
}

.calculator-card,
.result-card,
.dashboard-card,
.form-shell {
  position: relative;
  z-index: 1;
  padding: 1.9rem;
  min-width: 0;
}

.calculator-card {
  border-radius: 30px;
  background: rgba(255, 251, 246, 0.98);
  border: 1px solid rgba(143, 63, 23, 0.1);
}

:root[data-theme="dark"] .calculator-card {
  background: rgba(49, 32, 22, 0.98);
  border-color: rgba(255, 191, 133, 0.12);
}

:root[data-theme="dark"] .section-head h2,
:root[data-theme="dark"] .section-head h3,
:root[data-theme="dark"] .field span {
  color: #ffe1c3;
}

.section-head {
  margin-bottom: 1.2rem;
}

.section-head h2,
.section-head h3 {
  margin: 0 0 0.45rem;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
}

.section-head.compact {
  margin-top: 1.5rem;
}

.mode-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 1rem;
  padding: 0.4rem;
  border-radius: 18px;
  background: rgba(143, 63, 23, 0.05);
  border: 1px solid rgba(143, 63, 23, 0.1);
}

.mode-button {
  min-height: 46px;
  padding: 0.7rem 1rem;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--orange-deep);
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.mode-button.is-active {
  background: linear-gradient(135deg, var(--orange-deep), var(--orange));
  color: white;
}

.mode-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.catalog-state {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  background: rgba(143, 63, 23, 0.05);
  border: 1px solid rgba(143, 63, 23, 0.08);
  color: var(--muted);
  font-size: 0.92rem;
}

.request-link {
  display: inline-flex;
  align-items: center;
  margin-bottom: 1rem;
  color: var(--orange-deep);
  font-weight: 700;
}

.request-link:hover {
  text-decoration: underline;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.field-help {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.field span {
  font-size: 0.94rem;
  font-weight: 800;
  color: var(--orange-deep);
}

.search-results {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.2rem;
  padding: 0.55rem;
  border-radius: 16px;
  background: rgba(143, 63, 23, 0.04);
  border: 1px solid rgba(143, 63, 23, 0.08);
}

.search-result-option {
  display: grid;
  gap: 0.15rem;
  padding: 0.8rem 0.9rem;
  text-align: left;
  border: 1px solid rgba(143, 63, 23, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  cursor: pointer;
}

.search-result-option strong {
  font-size: 0.95rem;
}

.search-result-option span {
  color: var(--muted);
  font-size: 0.84rem;
}

.field input {
  width: 100%;
  min-width: 0;
  padding: 1rem 1.05rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(143, 63, 23, 0.14);
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  outline: none;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.field-select,
.field textarea {
  width: 100%;
  min-width: 0;
  padding: 1rem 1.05rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(143, 63, 23, 0.14);
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  outline: none;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

:root[data-theme="dark"] .field input,
:root[data-theme="dark"] input,
:root[data-theme="dark"] .field-select,
:root[data-theme="dark"] .field textarea,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea {
  background: rgba(24, 16, 12, 0.92);
  color: var(--text);
  border-color: rgba(255, 191, 133, 0.16);
}

:root[data-theme="dark"] .mode-switch,
:root[data-theme="dark"] .catalog-state,
:root[data-theme="dark"] .search-results {
  background: rgba(255, 159, 67, 0.08);
  border-color: rgba(255, 191, 133, 0.14);
}

:root[data-theme="dark"] .mode-button {
  color: #ffe1c3;
}

:root[data-theme="dark"] .field-help {
  color: #dcbda4;
}

:root[data-theme="dark"] .search-result-option {
  background: rgba(24, 16, 12, 0.92);
  border-color: rgba(255, 191, 133, 0.14);
  color: #fff0e0;
}

:root[data-theme="dark"] .search-result-option span {
  color: #d6b79f;
}

.field input:focus {
  transform: translateY(-1px);
  border-color: rgba(215, 100, 26, 0.48);
  box-shadow: 0 0 0 5px rgba(215, 100, 26, 0.13);
}

.field-select:focus,
.field textarea:focus {
  transform: translateY(-1px);
  border-color: rgba(215, 100, 26, 0.48);
  box-shadow: 0 0 0 5px rgba(215, 100, 26, 0.13);
}

.primary-button,
.ghost-button,
.button-link,
.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 54px;
  padding: 0.9rem 1.25rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.22s ease, opacity 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--orange-deep), var(--orange));
  color: white;
  font-weight: 800;
  box-shadow: 0 16px 32px rgba(143, 63, 23, 0.22);
}

.ghost-button {
  color: var(--orange-deep);
  background: rgba(143, 63, 23, 0.08);
}

:root[data-theme="dark"] .ghost-button,
:root[data-theme="dark"] .nav-button {
  background: rgba(255, 159, 67, 0.12);
  color: #fff0e0;
  border: 1px solid rgba(255, 191, 133, 0.12);
}

.primary-button:hover,
.ghost-button:hover,
.button-link:hover,
.nav-button:hover {
  transform: translateY(-2px);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
  box-shadow: none;
}

.result-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
  background:
    radial-gradient(circle at top right, rgba(255, 217, 176, 0.3), transparent 22%),
    linear-gradient(180deg, rgba(110, 46, 16, 0.98), rgba(215, 100, 26, 0.96));
  color: white;
  border-radius: 30px;
}

.result-card::after {
  content: "";
  position: absolute;
  right: -44px;
  bottom: -54px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 233, 204, 0.18);
}

.result-card .section-head p,
.result-card .result-details dt,
.result-card .result-details dd,
.result-card [data-result-status],
.result-note {
  color: rgba(255, 255, 255, 0.8);
}

.result-badge {
  display: inline-flex;
  align-self: flex-start;
  margin-bottom: 1rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
}

.result-metric {
  display: grid;
  gap: 0.55rem;
  margin: 0.5rem 0 1.6rem;
}

.result-metric span {
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.68);
}

.result-metric strong {
  font-size: clamp(2.4rem, 4vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  overflow-wrap: anywhere;
}

.result-details {
  display: grid;
  gap: 1rem;
}

.result-details div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.result-note {
  margin-top: 1.3rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.dashboard-page,
.auth-page,
.status-page {
  padding: 0 0 3rem;
}

.dashboard-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1.35fr 0.85fr;
  align-items: start;
  min-width: 0;
}

.account-actions {
  display: grid;
  gap: 0.85rem;
  justify-items: start;
  margin-top: 1.5rem;
  padding: 1.2rem;
  border: 1px solid rgba(143, 63, 23, 0.12);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(143, 63, 23, 0.04), rgba(143, 63, 23, 0.02));
}

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

.account-actions-label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  color: var(--orange);
}

.account-actions-head strong {
  font-family: "Sora", sans-serif;
  color: var(--text);
}

.account-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  min-height: 52px;
  padding: 0.9rem 1.15rem;
  border-radius: 18px;
  font-weight: 800;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.account-action-button:hover {
  transform: translateY(-2px);
}

.account-action-logout {
  color: #8d2e21;
  background: rgba(184, 70, 43, 0.08);
  border-color: rgba(184, 70, 43, 0.18);
}

.account-action-delete {
  color: white;
  background: linear-gradient(135deg, #8d2e21, #b8462b);
  box-shadow: 0 14px 28px rgba(184, 70, 43, 0.2);
}

.history-delete-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(184, 70, 43, 0.16);
  border-radius: 12px;
  background: rgba(184, 70, 43, 0.08);
  color: #8d2e21;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.history-delete-button:hover {
  transform: translateY(-1px);
  background: rgba(184, 70, 43, 0.12);
  border-color: rgba(184, 70, 43, 0.24);
}

.table-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.info-stack {
  display: grid;
  gap: 0.8rem;
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  margin-left: 0.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange-deep), var(--orange));
  color: white;
  font-size: 0.78rem;
  font-weight: 800;
}

.notifications-toolbar {
  margin-bottom: 1rem;
}

.notifications-list {
  display: grid;
  gap: 0.9rem;
}

.notifications-list.compact {
  margin-bottom: 1rem;
}

.notification-item {
  display: grid;
  gap: 0.75rem;
  padding: 1.1rem;
  border-radius: 22px;
  border: 1px solid rgba(143, 63, 23, 0.12);
  background: rgba(255, 251, 246, 0.88);
}

.notification-item.is-unread {
  box-shadow: 0 14px 30px rgba(143, 63, 23, 0.08);
}

.notification-item.is-read {
  opacity: 0.86;
}

.notification-item h2,
.notification-item h3 {
  margin: 0;
  font-size: 1.2rem;
}

.notification-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.notification-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.notification-meta span {
  display: inline-flex;
  align-items: center;
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
  background: rgba(143, 63, 23, 0.06);
  color: var(--orange-deep);
  font-size: 0.8rem;
  font-weight: 700;
}

:root[data-theme="dark"] .account-actions {
  border-color: rgba(255, 191, 133, 0.14);
  background: linear-gradient(180deg, rgba(255, 159, 67, 0.08), rgba(255, 159, 67, 0.03));
}

:root[data-theme="dark"] .account-actions-head strong {
  color: #fff0e0;
}

:root[data-theme="dark"] .account-action-logout {
  color: #ffd8d0;
  background: rgba(201, 77, 49, 0.14);
  border-color: rgba(255, 180, 165, 0.2);
}

:root[data-theme="dark"] .account-action-delete {
  background: linear-gradient(135deg, #9f3927, #c94d31);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.24);
}

:root[data-theme="dark"] .history-delete-button {
  color: #ffd8d0;
  background: rgba(201, 77, 49, 0.12);
  border-color: rgba(255, 180, 165, 0.18);
}

:root[data-theme="dark"] .history-delete-button:hover {
  background: rgba(201, 77, 49, 0.18);
  border-color: rgba(255, 180, 165, 0.24);
}

:root[data-theme="dark"] .request-link {
  color: #ffd8b4;
}

:root[data-theme="dark"] .notification-item {
  border-color: rgba(255, 191, 133, 0.14);
  background: rgba(34, 22, 15, 0.9);
}

:root[data-theme="dark"] .notification-item p {
  color: #e1c1a6;
}

:root[data-theme="dark"] .notification-meta span {
  background: rgba(255, 159, 67, 0.12);
  color: #ffe0c2;
}

.form-page {
  display: grid;
  place-items: center;
}

.form-shell {
  width: min(100%, 640px);
  padding: 1.6rem;
}

.stack-form {
  display: grid;
  gap: 0.2rem;
}

.flash {
  position: relative;
  z-index: 2;
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  border: 1px solid transparent;
}

.flash p {
  margin: 0;
}

.flash-success {
  color: #0d4e32;
  background: rgba(29, 127, 78, 0.12);
  border-color: rgba(29, 127, 78, 0.22);
}

.flash-error {
  color: #7c1f12;
  background: rgba(183, 71, 42, 0.12);
  border-color: rgba(183, 71, 42, 0.2);
}

:root[data-theme="dark"] .flash-success {
  color: #dff9ea;
  background: rgba(29, 127, 78, 0.22);
  border-color: rgba(129, 240, 177, 0.2);
}

:root[data-theme="dark"] .flash-error {
  color: #ffe4de;
  background: rgba(183, 71, 42, 0.24);
  border-color: rgba(255, 180, 165, 0.2);
}

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

:root[data-theme="dark"] .table-wrap {
  scrollbar-color: rgba(255, 159, 67, 0.6) transparent;
}

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

.data-table th,
.data-table td {
  padding: 0.9rem 0.95rem;
  text-align: left;
  border-bottom: 1px solid rgba(143, 63, 23, 0.08);
  vertical-align: top;
}

.data-table th {
  font-family: "Sora", sans-serif;
  font-size: 0.82rem;
  color: var(--orange-deep);
}

:root[data-theme="dark"] .data-table th,
:root[data-theme="dark"] .data-table td {
  border-bottom-color: rgba(255, 191, 133, 0.12);
}

:root[data-theme="dark"] .data-table th {
  color: #ffd8b4;
}

.data-table tbody tr:hover {
  background: rgba(143, 63, 23, 0.04);
}

:root[data-theme="dark"] .data-table tbody tr:hover {
  background: rgba(255, 159, 67, 0.08);
}

.button-link {
  text-decoration: none;
}

a.ghost-button.button-link,
a.ghost-button.button-link:visited,
a.ghost-button.button-link:active {
  color: var(--orange-deep) !important;
}

:root[data-theme="dark"] a.ghost-button.button-link,
:root[data-theme="dark"] a.ghost-button.button-link:visited,
:root[data-theme="dark"] a.ghost-button.button-link:active {
  color: #fff0e0 !important;
}

.form-note {
  margin: 1rem 0 0;
}

.status-shell {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 220px);
}

.site-footer {
  padding: 0 0 2rem;
}

.footer-shell {
  min-height: 12px;
  padding: 1.2rem 0 0;
  color: var(--muted);
}

code {
  padding: 0.2rem 0.45rem;
  border-radius: 8px;
  background: rgba(143, 63, 23, 0.08);
  overflow-wrap: anywhere;
}

:root[data-theme="dark"] code {
  background: rgba(255, 159, 67, 0.14);
  color: #ffe2c4;
}

@media (max-width: 1024px) {
  .hero-grid,
  .panel-grid,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy h1,
  .section-head h1 {
    max-width: 100%;
  }

  .hero-copy {
    position: static;
    order: 1;
  }

  .hero-stage {
    order: 2;
  }

}

@media (max-width: 720px) {
  .site-header {
    padding-top: 0.6rem;
  }

  .nav-shell {
    flex-direction: column;
    align-items: stretch;
    border-radius: 28px;
  }

  .nav-links {
    justify-content: flex-start;
    width: 100%;
  }

  .theme-switch {
    width: 100%;
    justify-content: center;
  }

  .theme-switch-floating {
    right: 0.75rem;
    bottom: 0.75rem;
    width: auto;
  }

  .hero-section {
    padding-top: 2.2rem;
  }

  .hero-copy h1,
  .section-head h1 {
    font-size: 2.3rem;
  }

  .field-split {
    grid-template-columns: 1fr;
  }

  .result-details div {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-actions a,
  .hero-actions button {
    width: 100%;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .account-actions,
  .account-actions form,
  .account-action-button {
    width: 100%;
  }

  .notifications-toolbar .ghost-button,
  .notification-item form,
  .notification-item .history-delete-button {
    width: 100%;
  }

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

  .summary-card {
    width: 100%;
  }

  .hero-copy-shell {
    padding: 1rem;
  }

  .result-badge {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .calculator-card,
  .result-card,
  .dashboard-card,
  .form-shell {
    padding: 1.25rem;
  }

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

@media (max-width: 560px) {
  .container {
    width: min(calc(100% - 1rem), var(--container));
  }

  .site-header {
    padding-top: 0.4rem;
  }

  .nav-shell {
    padding: 0.8rem;
  }

  .brand {
    min-width: 0;
  }

  .brand-text {
    min-width: 0;
  }

  .brand-text small,
  .brand-text strong {
    overflow-wrap: anywhere;
  }

  .hero-copy h1,
  .section-head h1 {
    font-size: 2rem;
  }

  .eyebrow {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .nav-links a,
  .nav-button,
  .primary-button,
  .ghost-button,
  .button-link {
    min-height: 50px;
    padding-inline: 1rem;
  }

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

  .notification-meta {
    flex-direction: column;
    align-items: flex-start;
  }
}
