:root {
  --bg: #f4f7f6;
  --panel: #ffffff;
  --panel-soft: #f8fbfa;
  --border: #dbe7e4;
  --text: #223434;
  --muted: #5e7473;
  --brand: #497a76;
  --brand-dark: #315955;
  --accent: #e7f1ef;
  --danger: #a74f4f;
  --success: #3d7b58;
  --warning: #9a7741;
  --shadow: 0 10px 30px rgba(31, 61, 59, 0.08);
  --radius: 18px;
  --radius-sm: 12px;
  --container: 1180px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
}

body {
  min-height: 100vh;
}

a {
  color: var(--brand-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

.site-header {
  background: rgba(255,255,255,0.94);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.header-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--brand-dark);
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.main-nav > a,
.nav-dropdown-toggle {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  line-height: 1;
}

.main-nav > a.active,
.main-nav > a:hover,
.nav-dropdown-toggle:hover,
.nav-dropdown.open .nav-dropdown-toggle {
  background: var(--accent);
  color: var(--brand-dark);
  text-decoration: none;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nav-caret {
  font-size: 0.8rem;
  opacity: 0.8;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 230px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 10px;
  display: none;
  z-index: 200;
}

.nav-dropdown.open .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu a {
  display: block;
  width: 100%;
  padding: 11px 12px;
  border-radius: 10px;
  color: var(--text);
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active {
  background: var(--panel-soft);
  text-decoration: none;
}

.page-shell {
  padding: 28px 0 48px;
}

.hero {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
  align-items: stretch;
  margin-top: 18px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.card.soft {
  background: var(--panel-soft);
}

.card.featured {
  border: 2px solid var(--brand);
}

.hero-copy h1,
.page-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
}

.page-subtitle {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

.hero-copy p,
.lead {
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--muted);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.button-row.center {
  justify-content: center;
}

.button,
button,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  font-size: 0.96rem;
  cursor: pointer;
  background: var(--brand);
  color: #fff;
}

.button.secondary {
  background: var(--accent);
  color: var(--brand-dark);
}

.button.danger {
  background: var(--danger);
}

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

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

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

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

.kpi {
  padding: 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--panel-soft);
}

.kpi-label {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 10px;
}

.kpi-value {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.section-title {
  font-size: 1.35rem;
  margin: 0 0 14px;
}

.section-heading {
  margin-bottom: 14px;
}

.feature-card {
  min-height: 100%;
}

.text-link {
  display: inline-block;
  margin-top: 12px;
  font-weight: 700;
}

.mini-title {
  font-size: 1.05rem;
  margin: 0 0 8px;
}

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

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

label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="file"],
select,
textarea {
  width: 100%;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font: inherit;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.helper {
  color: var(--muted);
  font-size: 0.92rem;
}

.alert {
  padding: 14px 16px;
  border-radius: 12px;
  margin-bottom: 16px;
  font-weight: 600;
}

.alert.success {
  background: #edf8f1;
  color: var(--success);
  border: 1px solid #cde7d6;
}

.alert.error {
  background: #fff1f1;
  color: var(--danger);
  border: 1px solid #f0caca;
}

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

.list-table th,
.list-table td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 800;
  background: var(--accent);
  color: var(--brand-dark);
}

.footer-inner {
  padding: 24px 0 40px;
  color: var(--muted);
  font-size: 0.94rem;
}

.auth-wrap {
  max-width: 560px;
  margin: 30px auto 0;
}

.empty {
  padding: 24px;
  background: var(--panel-soft);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
}

.feature-list {
  margin: 0;
  padding-left: 20px;
  line-height: 1.8;
  color: var(--muted);
}

.faq-item + .faq-item {
  margin-top: 16px;
}

.price {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 8px 0 4px;
}

.price-sub {
  color: var(--muted);
  margin-bottom: 14px;
}

.table-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.link-button {
  background: none;
  border: none;
  color: var(--brand-dark);
  padding: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

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

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel-soft);
  font-weight: 700;
  color: var(--brand-dark);
}

.pill.active {
  background: var(--accent);
  border-color: var(--brand);
}

.landing-cta {
  text-align: center;
}

@media (max-width: 980px) {
  .hero,
  .grid-2,
  .grid-3,
  .form-grid.two {
    grid-template-columns: 1fr;
  }

  .header-inner {
    align-items: flex-start;
    padding: 14px 0;
    flex-direction: column;
  }

  .main-nav {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .main-nav > a,
  .nav-dropdown-toggle {
    width: 100%;
    text-align: left;
    border-radius: 12px;
    background: var(--panel-soft);
  }

  .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown-menu {
    position: static;
    display: none;
    margin-top: 8px;
    min-width: 100%;
    box-shadow: none;
    border-radius: 12px;
  }

  .nav-dropdown.open .nav-dropdown-menu {
    display: block;
  }
}