:root {
  --ink: #10231f;
  --muted: #65736f;
  --paper: #f7faf8;
  --card: #ffffff;
  --green: #16a57a;
  --green2: #0d7f61;
  --mint: #dff6ed;
  --dark: #0d2420;
  --line: #dfe9e5;
  --amber: #f5b84b;
  --red: #df6b61;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "DM Sans", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

h1, h2, h3, h4, h5, .brand {
  font-family: "Space Grotesk", sans-serif;
}

.navbar {
  background: rgba(247, 250, 248, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(223, 233, 229, 0.8);
}

.brand {
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--green);
  display: inline-grid;
  place-items: center;
  color: white;
  font-weight: 700;
}

.nav-link {
  font-weight: 600;
  color: #465651 !important;
}

.btn-main {
  background: var(--green);
  border: 0;
  color: #fff;
  border-radius: 12px;
  padding: 0.8rem 1.15rem;
  font-weight: 700;
}

.btn-main:hover {
  background: var(--green2);
  color: #fff;
}

.btn-soft {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem 1.15rem;
  font-weight: 700;
  color: var(--ink);
}

.hero {
  padding: 130px 0 80px;
  background:
    radial-gradient(circle at 80% 15%, rgba(22, 165, 122, 0.15), transparent 28%),
    radial-gradient(circle at 10% 40%, rgba(245, 184, 75, 0.12), transparent 25%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid #cfe8de;
  background: #effaf5;
  color: var(--green2);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

.hero h1 {
  font-size: clamp(3rem, 6vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
  max-width: 850px;
}

.hero h1 span {
  color: var(--green);
}

.hero p {
  font-size: 1.18rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 680px;
}

.hero-panel {
  background: var(--dark);
  border-radius: 24px;
  padding: 22px;
  color: #fff;
  box-shadow: 0 25px 70px rgba(13, 36, 32, 0.18);
}

.mini-card {
  background: #17332d;
  border: 1px solid #2a4b43;
  border-radius: 16px;
  padding: 15px;
}

.mini-number {
  font-family: "Space Grotesk";
  font-size: 1.7rem;
  font-weight: 700;
}

.spark {
  height: 80px;
  display: flex;
  align-items: end;
  gap: 6px;
}

.spark i {
  display: block;
  flex: 1;
  background: #43c99d;
  border-radius: 5px 5px 0 0;
  opacity: 0.85;
}

.section {
  padding: 95px 0;
}

.section-title {
  font-size: clamp(2.1rem, 4vw, 3.6rem);
  letter-spacing: -0.05em;
  line-height: 1.05;
}

.section-sub {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.feature-card {
  height: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px;
  transition: 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 40px rgba(16, 35, 31, 0.08);
}

.icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--mint);
  color: var(--green2);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.1rem;
}

.feature-card p {
  color: var(--muted);
  line-height: 1.65;
}

.tag {
  font-size: 0.73rem;
  padding: 5px 8px;
  border-radius: 8px;
  background: #f1f5f3;
  color: #52625d;
  font-weight: 700;
}

.workflow {
  background: var(--dark);
  color: #fff;
}

.workflow .section-sub {
  color: #a9bbb5;
}

.step {
  position: relative;
  padding: 22px;
  border: 1px solid #2d4942;
  border-radius: 18px;
  background: #122c27;
  height: 100%;
}

.step-num {
  font-family: "Space Grotesk";
  font-size: 2.2rem;
  color: #5fe0b2;
}

.timeline {
  border-left: 1px solid #35564d;
  margin-left: 17px;
  padding-left: 25px;
}

.timeline-item {
  position: relative;
  margin-bottom: 25px;
}

.timeline-item:before {
  content: "";
  position: absolute;
  left: -32px;
  top: 7px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #48c99d;
  border: 3px solid var(--dark);
}

.dashboard {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(16, 35, 31, 0.08);
  overflow: hidden;
}

.dash-top {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.dash-body {
  padding: 20px;
}

.kpi {
  background: #f8fbfa;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 16px;
}

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

.kpi strong {
  display: block;
  font: 700 1.55rem "Space Grotesk";
}

.bar {
  height: 9px;
  background: #e7efec;
  border-radius: 99px;
  overflow: hidden;
}

.bar span {
  height: 100%;
  display: block;
  background: var(--green);
  border-radius: 99px;
}

.table-like .row {
  border-bottom: 1px solid #edf2f0;
  padding: 12px 0;
  align-items: center;
}

.badge-status {
  font-size: 0.72rem;
  border-radius: 99px;
  padding: 5px 9px;
  font-weight: 700;
}

.success {
  background: #e4f7ef;
  color: #117858;
}

.warn {
  background: #fff4d8;
  color: #916914;
}

.danger {
  background: #fde9e7;
  color: #a64d45;
}

.module {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 18px;
  padding: 20px;
  height: 100%;
}

.module h5 {
  margin-top: 14px;
}

.module ul {
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}

.compliance {
  background: #edf7f3;
  border: 1px solid #d4ebe2;
  border-radius: 24px;
  padding: 35px;
}

.theme-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
}

.theme-btn {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}

.theme-btn.active {
  background: var(--ink);
  color: #fff;
}

.cta {
  padding: 80px 0;
  background: linear-gradient(135deg, #dff6ed, #f6fbf9);
}

footer {
  padding: 35px 0;
  background: #0b211d;
  color: #aabcb6;
}

footer a {
  color: #dce8e4;
  text-decoration: none;
}

.accordion-item {
  border: 1px solid var(--line) !important;
  border-radius: 14px !important;
  overflow: hidden;
  margin-bottom: 10px;
}

.accordion-button {
  font-weight: 700;
  background: #fff;
}

.accordion-button:not(.collapsed) {
  background: #effaf5;
  color: var(--green2);
  box-shadow: none;
}

/* Theme variants: switch by setting data-theme on <body>. */
body[data-theme="indigo"] {
  --ink: #17203b;
  --muted: #697089;
  --paper: #f7f8fc;
  --card: #fff;
  --green: #5b5bd6;
  --green2: #4444ae;
  --mint: #e9e9ff;
  --dark: #171a35;
  --line: #e2e4f0;
  --amber: #f0ad4e;
  --red: #d85c67;
}

body[data-theme="navy"] {
  --ink: #10253f;
  --muted: #66788b;
  --paper: #f5f8fb;
  --card: #fff;
  --green: #087ea4;
  --green2: #05627f;
  --mint: #e0f3f8;
  --dark: #0b2438;
  --line: #dce6ec;
  --amber: #e7aa3d;
  --red: #d96361;
}

@media (max-width: 991px) {
  .hero {
    padding-top: 105px;
  }

  .hero-panel {
    margin-top: 35px;
  }
}

/* Map Django's error message tag to Bootstrap danger alert styling */
.alert-error {
    --bs-alert-color: var(--bs-danger-text-emphasis);
    --bs-alert-bg: var(--bs-danger-bg-subtle);
    --bs-alert-border-color: var(--bs-danger-border-subtle);
    --bs-alert-link-color: var(--bs-danger-text-emphasis);
}

/* Form rendering helpers (render_form.html) */
.required {
  color: var(--red);
}

.help-inline.error, .error, ul.errorlist {
  color: var(--red);
}

.help {
  cursor: help;
  color: var(--muted);
  margin-left: 4px;
}
