* {
  box-sizing: border-box;
}

:root {
  --bg: #f3f6fc;
  --surface: #ffffff;
  --surface-soft: #f8fbff;
  --text: #0f172a;
  --muted: #5b6b82;
  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --border: #dde6f5;
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.06);
  --shadow-card: 0 14px 34px rgba(37, 99, 235, 0.08);
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  letter-spacing: 0.1px;
}

.top-navbar {
  display: block;
  width: 100%;
  position: relative;
  z-index: 30;
  background: #1f2a44;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.top-navbar-inner {
  margin: 0 auto !important;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 18px;
  padding: 0 16px !important;
}

.top-navbar-inner a {
  color: #e7efff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.04) !important;
}

.top-navbar-inner a:hover,
.top-navbar-inner a:focus {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.24);
  color: #ffffff;
  outline: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #d9e6fb;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
}

.site-header .container {
  margin: 0 auto;
  padding: 0 16px;
}

.top-navbar .container,
.site-header .container {
  max-width: 1320px;
}

.site-header-inner {
  min-height: 86px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 4px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  line-height: 1;
  min-height: 78px;
  overflow: hidden;
  margin-right: 8px;
  flex-shrink: 0;
}

.brand-logo {
  width: 336px;
  height: 101px;
  display: block;
  object-fit: contain;
  object-position: left center;
  transform: scale(1.70);
  transform-origin: left center;
  margin: 0;
}

.brand-text {
  font-weight: 700;
  font-size: 24px;
  color: #1f2a44;
  letter-spacing: 0.2px;
}

.top-nav {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  flex: 1 1 auto;
  justify-content: center;
  min-width: 0;
}

.top-nav a {
  color: #1f2937 !important;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 4px;
  border-radius: 0;
  border: 0 !important;
  background: transparent !important;
  transition: all 0.2s ease, box-shadow 0.2s ease;
  letter-spacing: 0.1px;
  position: relative;
  white-space: nowrap;
}

.top-nav a:hover,
.top-nav a:focus {
  color: #123c87 !important;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none;
  transform: translateY(-1px);
  outline: none;
}

.top-nav a.has-caret::after {
  content: "▾";
  margin-left: 7px;
  font-size: 10px;
  color: #6b7280;
  position: relative;
  top: -0.5px;
}

.nav-dropdown {
  position: relative;
  padding-bottom: 10px;
  margin-bottom: -10px;
}

.nav-drop-toggle {
  color: #1f2937;
  background: transparent;
  border: 0;
  padding: 8px 4px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.nav-drop-toggle::after {
  content: "▾";
  margin-left: 7px;
  font-size: 10px;
  color: #6b7280;
  position: relative;
  top: -0.5px;
}

.nav-drop-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #ffffff;
  border: 1px solid #dce6f7;
  border-radius: 10px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
  padding: 6px;
  display: none;
  z-index: 50;
}

.nav-drop-menu a {
  display: block;
  padding: 10px 12px !important;
  border-radius: 8px !important;
}

.nav-drop-menu a:hover,
.nav-drop-menu a:focus {
  background: #eef4ff !important;
  color: #123c87 !important;
}

.nav-dropdown:hover .nav-drop-menu,
.nav-dropdown:focus-within .nav-drop-menu {
  display: block;
}

.header-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  background: #ffffff;
  border: 1px solid #dce6f7;
  border-radius: 12px;
  padding: 4px;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
  flex-shrink: 0;
}

.header-search input {
  width: 200px;
  padding: 9px 11px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: #f8fbff;
  font-size: 14px;
}

.header-search button {
  padding: 9px 13px;
  border-radius: 9px;
  border: 1px solid #2d67dd;
  background: linear-gradient(135deg, #2f75f0 0%, #1d4ed8 100%);
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.header-search button:hover,
.header-search button:focus {
  background: linear-gradient(135deg, #3a82ff 0%, #245ae0 100%);
  border-color: #1f59da;
  transform: translateY(-1px);
  outline: none;
}

.container {
  max-width: 980px;
  margin: 12px auto;
  padding: 0 16px 24px;
}

.page-header {
  margin: 18px 0 16px;
  background: linear-gradient(125deg, #eef3ff 0%, #f9fbff 100%);
  border: 1px solid #dbe5ff;
  border-radius: 12px;
  padding: 18px;
}

.page-header h1 {
  margin: 0 0 8px;
}

.admin-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #c8d9f7;
  background: linear-gradient(180deg, #ffffff 0%, #f2f7ff 100%);
  color: #16428d;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1px;
  transition: all 0.18s ease;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.12);
}

.admin-menu {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-link:hover,
.admin-link:focus {
  color: #0d3a7e;
  border-color: #90b0ea;
  background: linear-gradient(180deg, #ffffff 0%, #eaf2ff 100%);
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
  outline: none;
}

.admin-link.danger {
  border-color: #f1c3c3;
  color: #b42318;
  background: #fff6f6;
}

.admin-link.danger:hover,
.admin-link.danger:focus {
  border-color: #e9a3a3;
  color: #9f1f17;
  background: #ffeaea;
  box-shadow: 0 8px 18px rgba(180, 35, 24, 0.14);
}

.card {
  background: var(--surface);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
  padding: 18px;
  margin-bottom: 16px;
}

.alert {
  border-left: 4px solid #b3261e;
}

.success {
  border-left: 4px solid #137333;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  align-items: start;
}

label {
  display: grid;
  gap: 6px;
  font-size: 14px;
}

input,
select,
button {
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid #cfdbef;
  font-size: 14px;
}

textarea {
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid #cfdbef;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}

.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  cursor: pointer;
}

.readonly-box {
  background: #f1f6ff;
  border: 1px solid #d8e5fb;
  border-radius: 10px;
  padding: 11px 12px;
  min-height: 44px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

.readonly-field {
  display: grid;
  gap: 6px;
  font-size: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 14px;
}

th,
td {
  padding: 10px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
}

tfoot td {
  font-weight: bold;
}

.pos {
  color: #137333;
}

.neg {
  color: #b3261e;
}

.note {
  margin-top: 12px;
  font-size: 14px;
}

.admin-form {
  display: grid;
  gap: 16px;
}

fieldset {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 10px;
  display: grid;
  gap: 8px;
}

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

.cell-input {
  min-width: 92px;
  padding: 8px;
}

.delete-list {
  display: grid;
  gap: 8px;
}

.inline-form {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fafafa;
}

@media (max-width: 1024px) {
  .container {
    padding: 0 14px 20px;
  }

  .site-header-inner {
    min-height: 80px;
  }

  .brand {
    min-height: 72px;
  }

  .brand-text {
    font-size: 21px;
  }
}

@media (max-width: 640px) {
  .top-navbar-inner {
    justify-content: flex-start;
    gap: 12px;
    min-height: 34px;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
  }

  .site-header-inner {
    min-height: 72px;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .brand {
    min-height: 64px;
    gap: 8px;
    max-width: calc(100% - 90px);
  }

  .brand-logo {
    width: 252px;
    height: 79px;
    transform: scale(1.46);
    transform-origin: left center;
  }

  .brand-text {
    font-size: 18px;
  }

  .top-nav {
    gap: 12px;
    justify-content: flex-start;
    flex-wrap: wrap;
    order: 2;
  }

  .top-nav a {
    font-size: 14px;
  }

  .nav-drop-toggle {
    font-size: 14px;
    padding: 8px 4px;
  }

  .nav-drop-menu {
    left: 0;
    right: auto;
    min-width: 200px;
  }

  .header-search {
    width: 100%;
    margin-left: 0;
    order: 3;
  }

  .header-search input {
    width: 100%;
  }

  .container {
    margin: 8px auto;
    padding: 0 10px 16px;
  }

  .page-header {
    margin: 10px 0 12px;
    padding: 14px;
  }

  .page-header h1 {
    font-size: 30px;
    line-height: 1.25;
  }

  .page-header p {
    font-size: 13px;
    line-height: 1.5;
  }

  .admin-menu {
    gap: 6px;
  }

  .admin-link {
    width: 100%;
    justify-content: flex-start;
  }

  .card {
    padding: 12px;
    margin-bottom: 12px;
  }

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

  input,
  select,
  button {
    font-size: 16px;
  }

  th,
  td {
    padding: 8px;
  }

  .cell-input {
    min-width: 84px;
  }

  .inline-form {
    flex-direction: column;
    align-items: flex-start;
  }
}

.landing-hero {
  padding: 28px;
  background: linear-gradient(125deg, #f2f7ff 0%, #ffffff 70%);
}

.landing-hero-v2 {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
  padding: 30px;
  border: 1px solid #dbe7fb;
  border-radius: 18px;
  background: radial-gradient(circle at 15% 10%, #edf4ff 0%, #ffffff 58%);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
  margin-bottom: 16px;
}

.landing-hero-v2 h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.4px;
}

.landing-hero-v2 .lead {
  margin: 0;
  color: #4a5b75;
  max-width: 720px;
  line-height: 1.65;
}

.hero-badges {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-badges span {
  border: 1px solid #d4e3fd;
  background: #f3f8ff;
  color: #284877;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.hero-right {
  position: relative;
}

.hero-mock-card {
  border: 1px solid #dde8fa;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.08);
  padding: 14px;
}

.hero-mock-card img {
  width: 100%;
  display: block;
}

.floating-kpi {
  position: absolute;
  right: -8px;
  bottom: -14px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.25);
}

.floating-kpi strong {
  display: block;
  font-size: 20px;
  line-height: 1.1;
}

.floating-kpi span {
  font-size: 12px;
  opacity: 0.92;
}

.modern-stats .stat-item {
  border-radius: 12px;
  border: 1px solid #dce6f8;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.feature-grid-v2 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.feature-grid-v2 article {
  border: 1px solid #dce6f8;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  padding: 16px;
}

.feature-grid-v2 h2 {
  margin: 0 0 8px;
  font-size: 19px;
}

.feature-grid-v2 p {
  margin: 0;
  color: #536176;
  line-height: 1.55;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  align-items: center;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.hero-visual img {
  width: 100%;
  max-width: 420px;
  height: auto;
  display: block;
}

.landing-hero .kicker {
  margin: 0 0 10px;
  color: #0b57d0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.landing-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.15;
}

.landing-hero .lead {
  margin: 0;
  color: #3a4658;
  max-width: 760px;
  line-height: 1.65;
}

.landing-actions {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cta-button {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #0b57d0;
  color: #0b57d0;
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  background: #fff;
}

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

.feature-grid article {
  border: 1px solid #e6ebf5;
  border-radius: 10px;
  padding: 14px;
  background: #fff;
}

.feature-grid h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.feature-grid p {
  margin: 0;
  color: #536176;
  line-height: 1.55;
  font-size: 14px;
}

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

.stat-item {
  border: 1px solid #e6ebf5;
  border-radius: 10px;
  padding: 14px;
  background: #fff;
}

.stat-item strong {
  display: block;
  font-size: 24px;
  color: #1f2a44;
  margin-bottom: 6px;
}

.stat-item span {
  color: #5e6d85;
  font-size: 14px;
}

.steps h2 {
  margin-top: 0;
}

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

.step-grid article {
  border: 1px solid #e6ebf5;
  border-radius: 10px;
  padding: 14px;
  background: #fff;
}

.step-grid span {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #0b57d0;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}

.step-grid h3 {
  margin: 10px 0 8px;
  font-size: 16px;
}

.step-grid p {
  margin: 0;
  color: #536176;
  font-size: 14px;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .landing-hero-v2 {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .floating-kpi {
    position: static;
    margin-top: 10px;
    display: inline-block;
  }

  .feature-grid-v2 {
    grid-template-columns: 1fr;
  }

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

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

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

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

  .hero-visual {
    order: -1;
  }

  .landing-hero {
    padding: 20px;
  }
}

.site-footer {
  margin-top: 18px;
  background: #111a2f;
  color: #d8e3fb;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-inner {
  margin: 0 auto !important;
  padding-top: 24px !important;
  padding-bottom: 14px !important;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: start;
}

.footer-brand strong {
  display: block;
  margin-bottom: 6px;
}

.footer-brand p {
  margin: 0;
  color: #a8b8d8;
  font-size: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 14px;
}

.footer-links a {
  color: #eaf1ff;
  text-decoration: none;
  font-size: 14px;
}

.footer-bottom {
  margin: 0 auto !important;
  padding-top: 0 !important;
  padding-bottom: 16px !important;
  color: #9db0d3;
  font-size: 13px;
}

.cookie-consent {
  position: fixed;
  right: 16px;
  bottom: 16px;
  max-width: 360px;
  background: #0f172a;
  color: #e6edff;
  border: 1px solid #293a62;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.28);
  padding: 12px;
  z-index: 2000;
}

.cookie-consent p {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.5;
}

.cookie-consent button {
  border: 1px solid #2f5fd8;
  background: #2563eb;
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}

.cookie-consent button:hover {
  background: #1d4ed8;
}

.account-dashboard-wrap {
  max-width: 1200px;
  padding-top: 28px;
  padding-bottom: 32px;
}

.account-dashboard {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 16px;
}

.account-sidebar {
  background: #fff;
  border: 1px solid #e0e7f3;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  height: fit-content;
}

.account-sidebar h2 {
  margin: 0 0 10px;
  font-size: 16px;
}

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

.account-nav a {
  display: block;
  text-decoration: none;
  padding: 10px 11px;
  border-radius: 10px;
  border: 1px solid #d8e3f6;
  background: #f8fbff;
  color: #123f8a;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.18s ease;
}

.account-nav a.active {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}

.account-nav a.danger {
  color: #b42318;
  border-color: #f0c9c9;
  background: #fff7f7;
}

.account-nav a:hover,
.account-nav a:focus {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.14);
  outline: none;
}

.account-content .card {
  margin-bottom: 14px;
}

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

.legal-page h1 {
  margin-top: 0;
}

.legal-page h2 {
  margin: 18px 0 8px;
  font-size: 20px;
}

.legal-page p {
  margin: 0;
  line-height: 1.65;
  color: #36455b;
}

.chart-card {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fbfdff;
}

.chart-card h3 {
  margin: 0 0 12px;
}

.chart-wrap {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 14px;
  align-items: center;
}

.pie-chart {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 0 auto;
}

.pie-chart svg {
  width: 220px;
  height: 220px;
  display: block;
}

.pie-segment {
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
  transform-box: fill-box;
  transform-origin: center;
  will-change: transform;
}

.pie-segment:hover,
.pie-segment:focus {
  transform: scale(1.1);
  filter: brightness(1.12) drop-shadow(0 2px 4px rgba(15, 23, 42, 0.25));
  outline: none;
}

.pie-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #dbe4f4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
  z-index: 1;
}

.pie-center span {
  font-size: 11px;
  color: #64748b;
}

.pie-center strong {
  font-size: 13px;
  color: #0f172a;
}

.center-percent {
  margin-top: 2px;
  font-size: 11px;
  color: #334155;
  font-weight: 600;
  min-height: 14px;
}

.pie-legend {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.pie-legend li {
  display: grid;
  grid-template-columns: 14px 1fr auto auto;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.pie-legend .name {
  color: #26354a;
}

.pie-legend .pct {
  color: #334155;
  font-weight: 600;
}

.pie-legend .val {
  color: #334155;
}

@media (max-width: 700px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .chart-wrap {
    grid-template-columns: 1fr;
  }

  .pie-chart {
    width: 180px;
    height: 180px;
    margin: 0 auto;
  }

  .pie-center {
    width: 92px;
    height: 92px;
  }
}

/* Calculator Page Modern UI */
.calc-page {
  background: radial-gradient(circle at 0% 0%, #edf4ff 0, #f4f7fd 42%, #f3f6fc 100%);
}

.calc-page .page-header {
  background: linear-gradient(145deg, #edf4ff 0%, #ffffff 65%);
  border-color: #d7e5fb;
  box-shadow: var(--shadow-card);
  border-radius: 16px;
}

.calc-pill-row {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.calc-pill {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e9f2ff;
  color: #1f3f78;
  border: 1px solid #cde0ff;
  font-weight: 600;
}

.calc-form-card,
.calc-result-card {
  border: 1px solid #dfe8f6;
  box-shadow: var(--shadow-card);
}

.section-head {
  margin-bottom: 12px;
}

.section-head h2 {
  margin: 0 0 4px;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.calc-page input,
.calc-page select {
  background: #fbfdff;
  border: 1px solid #cfdbef;
}

.calc-page input:focus,
.calc-page select:focus {
  outline: none;
  border-color: #4f86ff;
  box-shadow: 0 0 0 3px rgba(79, 134, 255, 0.16);
}

.calc-page .primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
  border: 0;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.kpi-grid article {
  border: 1px solid #d8e5fb;
  border-radius: 12px;
  padding: 12px;
  background: var(--surface-soft);
}

.kpi-grid span {
  display: block;
  font-size: 12px;
  color: #607089;
  margin-bottom: 4px;
}

.kpi-grid strong {
  font-size: 22px;
  color: #0b1429;
}

.result-table-wrap {
  border: 1px solid #dde7f6;
  border-radius: 12px;
  overflow: auto;
  background: var(--surface);
}

.result-table {
  margin-top: 0;
}

.result-table th {
  background: #eef4ff;
  color: #1b2f53;
  font-weight: 700;
}

.result-table tbody tr:hover {
  background: #f8fbff;
}

.calc-page .note {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid #d6e3f8;
  border-radius: 10px;
  background: #f5f9ff;
  line-height: 1.65;
  color: #31445f;
}

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

/* Landing page (clean premium) */
.lp-hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  background: linear-gradient(140deg, #0f172a 0%, #1d2a48 100%);
  border-radius: 20px;
  padding: 34px;
  margin-bottom: 18px;
  color: #f8fbff;
}

.lp-kicker {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9cb4e8;
  font-weight: 700;
}

.lp-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 4.3vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.lp-hero p {
  margin: 0;
  color: #d5e1ff;
  line-height: 1.68;
  max-width: 62ch;
}

.lp-actions {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.lp-pill-row {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lp-pill-row span {
  border: 1px solid rgba(154, 182, 236, 0.35);
  background: rgba(255, 255, 255, 0.05);
  color: #d7e4ff;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.lp-hero-visual {
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  align-self: center;
}

.lp-hero-visual img {
  width: 100%;
  display: block;
}

.lp-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.lp-metrics article {
  background: #fff;
  border: 1px solid #e2e8f5;
  border-radius: 14px;
  padding: 14px;
}

.lp-metrics strong {
  display: block;
  color: #0f172a;
  font-size: 20px;
  margin-bottom: 4px;
}

.lp-metrics span {
  color: #54657f;
}

.lp-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.lp-features article {
  background: #fff;
  border: 1px solid #e2e8f5;
  border-radius: 14px;
  padding: 16px;
}

.lp-features h2 {
  margin: 0 0 8px;
  font-size: 20px;
  color: #0f172a;
}

.lp-features p {
  margin: 0;
  color: #52637d;
  line-height: 1.6;
}

.lp-cta {
  background: #ffffff;
  border: 1px solid #d9e3f5;
  border-radius: 18px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
  padding: 24px;
  text-align: center;
  margin-bottom: 18px;
}

.lp-cta h2 {
  margin: 0 0 8px;
  color: #0f172a;
}

.lp-cta p {
  margin: 0 0 14px;
  color: #556780;
}

@media (max-width: 980px) {
  .lp-hero {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .lp-metrics,
  .lp-features {
    grid-template-columns: 1fr;
  }
}

/* Home page visual refinement */
body.home-page {
  background: #f5f7fb;
  color: #101828;
  font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
}

body.home-page .container {
  max-width: 1180px;
}

body.home-page .top-navbar {
  background: #0f172a;
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.home-page .top-navbar-inner a {
  background: transparent !important;
  color: #dbe6ff;
  font-weight: 500;
}

body.home-page .top-navbar-inner a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08) !important;
}

body.home-page .site-header {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid #e6ebf5;
  box-shadow: 0 8px 22px rgba(2, 6, 23, 0.06);
}

body.home-page .site-header-inner {
  min-height: 72px;
  gap: 16px;
}

body.home-page .brand {
  min-height: auto;
}

body.home-page .brand-logo {
  width: 220px;
  height: 64px;
  transform: none;
}

body.home-page .top-nav a,
body.home-page .nav-drop-toggle {
  color: #0f172a !important;
  font-weight: 600;
}

body.home-page .header-search {
  border-color: #e3e9f5;
  box-shadow: none;
}

body.home-page .header-search input {
  background: #f7f9fd;
}

body.home-page .header-search button {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

body.home-page .lp-hero {
  border-radius: 24px;
  background: linear-gradient(135deg, #0b1220 0%, #17294f 58%, #1e3a8a 100%);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
  margin-top: 14px;
  margin-bottom: 20px;
  padding: 42px;
}

body.home-page .lp-kicker {
  color: #b9cdff;
  font-size: 11px;
  letter-spacing: 0.11em;
}

body.home-page .lp-hero h1 {
  font-family: "Manrope", "Inter", sans-serif;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.03;
  margin-bottom: 14px;
}

body.home-page .lp-hero p {
  font-size: 17px;
  line-height: 1.75;
  color: #d7e3ff;
}

body.home-page .lp-pill-row span {
  border-color: rgba(166, 188, 238, 0.4);
  color: #e2ebff;
  background: rgba(255, 255, 255, 0.08);
}

body.home-page .lp-hero-visual {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
}

body.home-page .lp-metrics article,
body.home-page .lp-features article,
body.home-page .lp-cta {
  border: 1px solid #e5eaf3;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

body.home-page .lp-metrics strong {
  font-family: "Manrope", "Inter", sans-serif;
  font-size: 22px;
}

body.home-page .lp-features h2,
body.home-page .lp-cta h2 {
  font-family: "Manrope", "Inter", sans-serif;
  letter-spacing: -0.02em;
}

body.home-page .lp-features p,
body.home-page .lp-metrics span,
body.home-page .lp-cta p {
  color: #475467;
}

body.home-page .cta-button.primary,
body.home-page a.primary.cta-button {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border: 1px solid #1d4ed8;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
}

body.home-page .ghost-button {
  border: 1px solid #d0dcf3;
  color: #1e3a8a;
  background: #ffffff;
}

body.home-page .ghost-button:hover {
  background: #f8faff;
}

@media (max-width: 980px) {
  body.home-page .site-header-inner {
    min-height: 64px;
  }

  body.home-page .brand-logo {
    width: 180px;
    height: 52px;
  }

  body.home-page .lp-hero {
    padding: 28px 22px;
  }

  body.home-page .lp-hero h1 {
    font-size: clamp(30px, 8vw, 44px);
  }

  body.home-page .lp-hero p {
    font-size: 15px;
  }
}
