@import url("https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700;800&display=swap");

:root {
  --ink: #1b2316;
  --muted: #54624b;
  --line: #d8e2d0;
  --surface: #ffffff;
  --surface-soft: #f4f8f0;
  --brand-1: #9ebd13;
  --brand-2: #008552;
  --brand-3: #6f9f15;
  --nav: #ffffff;
  --nav-2: #0b7a47;
  --accent: #7da313;
  --accent-red: #e31b23;
  --danger: #b42318;
  --success: #0b7a47;
  --focus: rgba(158, 189, 19, 0.35);
  --brand-gradient: linear-gradient(90deg, #9ebd13 0%, #008552 100%);
  --brand-gradient-soft: linear-gradient(120deg, rgba(158, 189, 19, 0.22), rgba(0, 133, 82, 0.18));
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  font-size: 16px;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 12%, rgba(158, 189, 19, 0.18), rgba(255, 255, 255, 0) 42%),
    linear-gradient(180deg, rgba(0, 133, 82, 0.06), rgba(244, 248, 240, 0.9) 520px),
    var(--surface-soft);
  font-family: "Sora", "Outfit", sans-serif;
}

a {
  color: var(--nav-2);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover,
a:focus {
  color: #b81d1d;
}

.app-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.no-sidebar .app-shell {
  width: min(980px, calc(100% - 32px));
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(9, 64, 38, 0.12);
  border-bottom: 1px solid rgba(13, 90, 52, 0.14);
}

.app-header::after {
  content: "";
  display: block;
  height: 3px;
  background: var(--accent-red);
}

.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}
.app-nav {
  min-height: 72px;
  padding: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark .brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.site-logo {
  height: 52px;
  width: auto;
  display: block;
}

.brand-mark:hover {
  color: var(--ink);
}

.brand-symbol {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 8px;
  background: var(--brand-gradient);
  color: #ffffff;
  font-weight: 800;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.2),
    0 0 0 2px rgba(227, 27, 35, 0.2);
}

.brand-text strong {
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.brand-mark strong,
.brand-mark small {
  display: block;
  line-height: 1.15;
}

.brand-mark small {
  color: #6d6d6d;
  font-size: 0.82rem;
}

.top-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.env-text {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5b6b50;
}

.env-pill,
.user-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.env-pill {
  background: rgba(0, 133, 82, 0.12);
  color: #0b6a3f;
  border: 1px solid rgba(0, 133, 82, 0.18);
}

.user-pill {
  background: rgba(249, 250, 245, 0.9);
  color: #1a2a18;
  border: 1px solid rgba(158, 189, 19, 0.28);
}

.app-body-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 72px);
}

.no-sidebar .app-body-layout {
  grid-template-columns: 1fr;
}

.app-sidebar {
  background: linear-gradient(180deg, #0b6a46 0%, #118548 58%, #7fa713 100%);
  color: #ffffff;
  padding: 18px 14px 24px;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.12);
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  margin-bottom: 14px;
}

.sidebar-title {
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
}

.sidebar-burger {
  font-size: 1.2rem;
  opacity: 0.9;
}

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

.sidebar-link {
  display: block;
  padding: 12px 12px;
  border-radius: 8px;
  color: #ffffff;
  background: rgba(5, 55, 34, 0.24);
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
}

.sidebar-link:hover,
.sidebar-link:focus {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.sidebar-link.is-active {
  background: #ffffff;
  color: #0b6a46;
  box-shadow: 0 10px 22px rgba(9, 64, 38, 0.18);
}

.sidebar-logout {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.sidebar-button {
  width: 100%;
  text-align: left;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
}

.app-content {
  background: #ffffff;
}

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

.app-alert {
  border: 0;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(23, 32, 42, 0.08);
}

.auth-shell {
  display: grid;
  min-height: calc(100vh - 190px);
  align-items: center;
  justify-items: center;
}

.auth-shell-compact {
  min-height: auto;
  align-items: start;
  justify-items: center;
  padding-top: 44px;
}

.auth-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 24px;
  align-items: stretch;
  max-width: 1100px;
  width: 100%;
  animation: rise 0.6s ease both;
}

.auth-copy {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: end;
  min-height: 426px;
  padding: 44px;
  border-radius: 8px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(0, 133, 82, 0.92), rgba(158, 189, 19, 0.85)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='620' viewBox='0 0 900 620'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.18'%3E%3Cpath d='M80 470c160-120 240-120 400 0s240 120 360 20'/%3E%3Cpath d='M60 330c160-80 260-70 430 40 170 110 250 110 350 10'/%3E%3Cpath d='M100 160c150 40 240 40 380-20s230-80 320-50'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  box-shadow: 0 18px 40px rgba(0, 77, 43, 0.28);
}

.auth-shell--login .auth-copy {
  background: url("/assets/images/assetLogin.png") center/cover no-repeat;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.auth-shell--login .auth-copy::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.auth-shell--login .auth-copy > * {
  position: relative;
  z-index: 1;
}

.auth-copy h1,
.page-header h1,
.form-panel h1,
.form-panel h2 {
  margin: 0;
  letter-spacing: 0.12em;
}

.auth-copy h1 {
  max-width: 680px;
  font-size: 2.8rem;
  line-height: 1.06;
}

.auth-copy p:not(.eyebrow) {
  max-width: 640px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.05rem;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-red);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-copy .eyebrow {
  color: #ffe3e1;
}

.form-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  min-height: 426px;
  padding: 34px;
  border: 1px solid rgba(0, 133, 82, 0.18);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 48px rgba(9, 64, 38, 0.15);
  animation: rise 0.7s ease both;
  overflow: visible;
}

.form-panel-narrow {
  max-width: 560px;
}

.form-panel h1,
.form-panel h2 {
  margin-bottom: 18px;
  font-size: 1.7rem;
}

.form-hint {
  margin: -6px 0 22px;
  color: var(--muted);
}

.form-label {
  margin-bottom: 7px;
  color: #263442;
  font-weight: 700;
}

.form-control,
.form-select {
  min-height: 46px;
  border-color: #cfd8df;
  border-radius: 8px;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: var(--nav-2);
  box-shadow: 0 0 0 0.2rem var(--focus);
}

.otp-input {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0;
  text-align: center;
}

.btn {
  min-height: 44px;
  border-radius: 8px;
  font-weight: 800;
}

.btn-primary {
  border-color: #0b7a47;
  background: var(--brand-gradient);
  box-shadow: 0 10px 22px rgba(0, 77, 43, 0.25);
}

.btn-primary:hover,
.btn-primary:focus {
  border-color: #0b7a47;
  background: linear-gradient(90deg, #8caf12 0%, #007847 100%);
}

.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.55);
}

.form-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 18px;
  font-weight: 700;
}

.validation-summary ul {
  margin-bottom: 0;
  padding-left: 1rem;
}

.page-header {
  display: flex;
  gap: 24px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 30px;
  border: 1px solid rgba(0, 133, 82, 0.18);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbf4 100%);
  box-shadow: 0 12px 34px rgba(9, 64, 38, 0.1);
  border-top: 5px solid var(--accent-red);
  animation: rise 0.6s ease both;
}

.page-header h1 {
  font-size: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.page-subtitle {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--muted);
}

.supplier-badge {
  min-width: 172px;
  padding: 14px 16px;
  border: 1px solid rgba(0, 133, 82, 0.2);
  border-radius: 8px;
  background: linear-gradient(150deg, rgba(158, 189, 19, 0.18), rgba(0, 133, 82, 0.1));
}

.supplier-badge span,
.action-kicker {
  display: block;
  color: #9a141c;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.supplier-badge strong {
  display: block;
  margin-top: 4px;
  font-size: 1.3rem;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.action-tile {
  display: flex;
  min-height: 180px;
  flex-direction: column;
  justify-content: end;
  gap: 8px;
  padding: 24px;
  border: 1px solid rgba(0, 133, 82, 0.16);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f6faf2 100%);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 12px 32px rgba(9, 64, 38, 0.1);
  border-top: 4px solid var(--accent-red);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  animation: rise 0.7s ease both;
}

.action-tile:hover,
.action-tile:focus {
  color: var(--ink);
  border-color: var(--nav-2);
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(9, 64, 38, 0.16);
}

.action-tile strong {
  font-size: 1.35rem;
}

.action-tile span:last-child {
  color: var(--muted);
}

.dashboard-page {
  max-width: 1180px;
  margin: 0 auto;
}

.dashboard-hero {
  display: block;
  margin-bottom: 18px;
  padding: 34px 36px;
  border: 1px solid rgba(0, 133, 82, 0.16);
  border-top: 4px solid var(--accent-red);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(247, 251, 244, 0.96) 100%),
    var(--brand-gradient-soft);
  box-shadow: 0 14px 34px rgba(9, 64, 38, 0.1);
  animation: rise 0.6s ease both;
}

.dashboard-hero-copy {
  display: flex;
  min-height: 132px;
  flex-direction: column;
  justify-content: center;
}

.dashboard-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.05;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-hero p:not(.eyebrow) {
  max-width: 720px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.dashboard-supplier-panel,
.dashboard-status-item,
.dashboard-panel,
.dashboard-action {
  border: 1px solid rgba(0, 133, 82, 0.16);
  border-radius: 8px;
  background: #ffffff;
}

.dashboard-supplier-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(150deg, rgba(158, 189, 19, 0.18), rgba(0, 133, 82, 0.08));
}

.dashboard-supplier-panel span,
.dashboard-status-item span {
  color: #9a141c;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.dashboard-supplier-panel strong {
  margin-top: 10px;
  font-size: 1.6rem;
  line-height: 1.1;
}

.dashboard-supplier-panel small,
.dashboard-status-item small {
  margin-top: 8px;
  color: var(--muted);
  font-weight: 600;
}

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

.dashboard-status-item {
  display: flex;
  min-height: 118px;
  flex-direction: column;
  justify-content: center;
  padding: 18px;
  box-shadow: 0 10px 24px rgba(9, 64, 38, 0.07);
}

.dashboard-status-item strong {
  margin-top: 8px;
  font-size: 1.1rem;
}

.dashboard-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 18px;
  align-items: stretch;
}

.dashboard-main-grid-single {
  grid-template-columns: minmax(0, 1fr);
}

.dashboard-action {
  display: flex;
  min-height: 220px;
  flex-direction: column;
  justify-content: space-between;
  padding: 26px;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(9, 64, 38, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.dashboard-action-primary {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(244, 248, 240, 0.92)),
    var(--brand-gradient-soft);
}

.dashboard-action:hover,
.dashboard-action:focus {
  color: var(--ink);
  border-color: var(--nav-2);
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(9, 64, 38, 0.15);
}

.dashboard-action strong {
  margin-top: 16px;
  font-size: 1.75rem;
}

.dashboard-action span:not(.action-kicker) {
  max-width: 620px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.dashboard-action em {
  width: fit-content;
  margin-top: 22px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--brand-gradient);
  color: #ffffff;
  font-style: normal;
  font-weight: 800;
}

.dashboard-panel {
  min-height: 240px;
  padding: 26px;
  box-shadow: 0 12px 30px rgba(9, 64, 38, 0.08);
}

.dashboard-panel h2 {
  margin: 14px 0 18px;
  font-size: 1.35rem;
}

.dashboard-rule-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dashboard-rule-list li {
  position: relative;
  padding-left: 18px;
  color: var(--muted);
  font-weight: 600;
}

.dashboard-rule-list li::before {
  content: "";
  position: absolute;
  top: 0.65em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent-red);
}

.tool-surface {
  padding: 28px;
  border: 1px solid rgba(0, 133, 82, 0.16);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 34px rgba(9, 64, 38, 0.1);
  animation: rise 0.6s ease both;
}

.download-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.download-form .form-wide {
  grid-column: 1 / -1;
  max-width: 680px;
}

.download-form fieldset {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0;
  border: 0;
}

.download-form legend {
  margin-bottom: 10px;
  font-size: 1rem;
  font-weight: 800;
}

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

.segmented-control label {
  margin: 0;
}

.segmented-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-control span {
  display: block;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #cfd8df;
  border-radius: 8px;
  background: #f9fbfc;
  text-align: center;
  font-weight: 800;
}

.segmented-control input:checked + span {
  border-color: var(--nav-2);
  background: rgba(0, 133, 82, 0.12);
  color: #0b6a3f;
}

.download-form .btn {
  width: fit-content;
  min-width: 180px;
}

.download-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.download-submit-loading {
  display: none;
  align-items: center;
  gap: 8px;
}

.download-submit.is-loading .download-submit-label {
  display: none;
}

.download-submit.is-loading .download-submit-loading {
  display: inline-flex;
}

.empty-state,
.dev-link {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 8px;
  background: rgba(158, 189, 19, 0.16);
  color: #42531a;
  font-weight: 700;
}

.dev-link span,
.dev-link a {
  display: block;
}

.app-footer {
  padding: 26px 0;
  color: var(--muted);
  border-top: 1px solid rgba(13, 90, 52, 0.12);
  background: #fbfdf9;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-panel,
  .form-panel,
  .page-header,
  .action-tile,
  .dashboard-hero,
  .dashboard-action,
  .tool-surface {
    animation: none;
  }

  .action-tile,
  .dashboard-action {
    transition: none;
  }
}

.app-topbar-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
}

.app-shell.app-topbar {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1.4rem;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
  border-radius: 6px;
}

.sidebar-toggle:hover,
.sidebar-toggle:focus {
  background: rgba(0, 133, 82, 0.12);
  color: #0b7a47;
  outline: 2px solid rgba(0, 133, 82, 0.16);
  outline-offset: -2px;
}

.sidebar-toggle.active {
  background: rgba(227, 27, 35, 0.12);
  color: #b42318;
}

.app-body-layout {
  transition: grid-template-columns 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-sidebar {
  transition: 
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: left;
  opacity: 1;
}

.app-sidebar.collapsed {
  transform: translateX(-100%);
  position: absolute;
  left: -240px;
  opacity: 0;
  pointer-events: none;
}

.app-body-layout.sidebar-collapsed {
  grid-template-columns: 1fr;
}

.app-footer .app-shell {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

@media (max-width: 900px) {
  .auth-panel,
  .download-form {
    grid-template-columns: 1fr;
  }

  .dashboard-hero,
  .dashboard-main-grid,
  .dashboard-status-grid {
    grid-template-columns: 1fr;
  }

  .auth-copy {
    min-height: 320px;
  }

  .form-panel {
    min-height: auto;
  }

  .page-header {
    align-items: stretch;
    flex-direction: column;
  }

  .app-body-layout {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: sticky;
    top: 72px;
    z-index: 5;
    padding: 12px 14px;
  }

  .sidebar-nav {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
}

@media (max-width: 640px) {
  .app-shell {
    width: min(100% - 20px, 1160px);
  }

  .auth-copy,
  .form-panel,
  .page-header,
  .dashboard-hero,
  .dashboard-panel,
  .dashboard-action,
  .tool-surface {
    padding: 22px;
  }

  .auth-copy h1 {
    font-size: 2rem;
  }

  .dashboard-hero h1 {
    font-size: 2rem;
  }

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

  .app-footer .app-shell {
    flex-direction: column;
  }

  .app-topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
  }
}
