:root {
  --bg: #f4f7ff;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: #fff;
  --surface-muted: #eef3ff;
  --ink: #263061;
  --muted: #5f6f9e;
  --line: rgba(42, 72, 156, 0.14);
  --line-strong: rgba(42, 72, 156, 0.26);
  --brand: #5870e0;
  --brand-soft: #dfe5ff;
  --success: #1e8c65;
  --error: #bc3c5a;
  --shadow: 0 24px 80px rgba(20, 31, 89, 0.12);
  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Nunito Sans", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #fbfcff 0%, #f4f7ff 54%, #eef3ff 100%);
}

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

img {
  max-width: 100%;
  display: block;
}

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

.site-shell {
  width: min(1200px, calc(100vw - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(18px);
  background: rgba(249, 251, 255, 0.74);
  border-bottom: 1px solid rgba(79, 103, 232, 0.08);
}

.header-inner {
  width: min(1200px, calc(100vw - 32px));
  margin: 0 auto;
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-mark img {
  height: 40px;
  width: auto;
}

.brand-word {
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

.nav-link,
.inline-link {
  position: relative;
  color: #263061;
  transition: color 140ms ease, opacity 140ms ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 140ms ease;
}

.nav-link:hover,
.inline-link:hover {
  color: var(--ink);
}

.nav-link:hover::after {
  transform: scaleX(1);
}

.button,
.button-secondary,
.button-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button {
  color: #fff;
  background: var(--brand);
  box-shadow: none;
}

.button:hover,
.button-secondary:hover,
.button-ghost:hover {
  transform: translateY(-1px);
}

.button-secondary {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.84);
  border-color: var(--line);
}

.button-ghost {
  color: var(--brand);
  background: transparent;
  border-color: var(--line);
}

.account-menu {
  position: relative;
}

.account-menu summary {
  list-style: none;
}

.account-menu summary::-webkit-details-marker {
  display: none;
}

.account-menu[open] .button {
  box-shadow: 0 10px 30px rgba(20, 31, 89, 0.14);
}

.account-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
  z-index: 35;
}

.account-menu-link {
  display: block;
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--ink);
  transition: background 140ms ease, color 140ms ease;
}

.account-menu-link:hover {
  background: rgba(79, 103, 232, 0.08);
  color: var(--brand);
}

.page-section {
  padding: 42px 0;
}

.hero {
  padding: 36px 0 22px;
}

.hero-grid,
.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 28px;
}

.order-layout {
  width: min(980px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 24px;
}

.order-main {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
}

.order-side {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  background: rgba(79, 103, 232, 0.1);
  color: var(--brand);
  font-size: 0.9rem;
  font-weight: 400;
}

.hero-copy h1,
.section-title {
  margin: 0;
  font-size: clamp(2.4rem, 4vw, 4.3rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.hero-copy p,
.section-copy,
.muted-copy {
  color: #263061;
  line-height: 1.7;
  font-size: 1.02rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero-panel,
.card,
.data-table-wrap,
.form-panel,
.banner-panel {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.hero-panel {
  min-height: 460px;
  padding: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(239, 244, 255, 0.98) 100%);
}

.art-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  height: 100%;
}

.art-card {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(79, 103, 232, 0.14);
  padding: 18px;
  display: grid;
  align-content: space-between;
  min-height: 180px;
}

.art-card.primary {
  grid-column: span 2;
  min-height: 210px;
  background: var(--brand);
  color: #fff;
}

.art-chip,
.stat-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 10px;
  background: rgba(79, 103, 232, 0.09);
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 400;
}

.art-card.primary .art-chip {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.stat-grid,
.resource-grid,
.summary-grid,
.dashboard-grid,
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.card {
  padding: 24px;
}

.card h3,
.card h2,
.panel-title {
  margin: 0 0 10px;
  letter-spacing: -0.03em;
}

.resource-card {
  min-height: 220px;
}

.resource-card {
  transition: transform 160ms ease;
}

.resource-card:hover {
  transform: translateY(-2px);
}

.card-accent {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 400;
  margin-bottom: 18px;
}

.dashboard-shell {
  display: grid;
  gap: 20px;
}

.dashboard-banner {
  padding: 26px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
}

.company-lockup {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.company-lockup img {
  width: 86px;
  height: 86px;
  object-fit: contain;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 12px;
}

.company-lockup h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.company-lockup-copy {
  flex: 1 1 260px;
}

.mdf-pill,
.company-asset-card,
.company-summary,
.company-summary-lockup {
  display: flex;
  align-items: center;
}

.mdf-pill {
  min-width: 180px;
  max-width: 220px;
  margin-left: auto;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  box-shadow: none;
}

.mdf-pill-label {
  margin: 0;
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mdf-pill-body {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.mdf-pill-value {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  line-height: 1;
  letter-spacing: -0.04em;
  text-shadow: none;
}

.meta-list,
.resource-list,
.split-list {
  display: grid;
  gap: 12px;
}

.meta-item,
.resource-item,
.split-item {
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--line);
}

.resource-item {
  transition: transform 160ms ease;
}

.resource-item:hover {
  transform: translateY(-2px) scale(1.01);
}

.user-name-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 2px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 10px;
}

.status-dot.active {
  background: var(--brand);
}

.status-dot.inactive {
  background: #a9b2cc;
}

.scroll-list {
  max-height: min(72vh, 780px);
  overflow-y: auto;
  padding-right: 6px;
}

.company-asset-card,
.company-summary {
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.company-asset-copy,
.company-summary-copy,
.company-summary-meta {
  display: grid;
}

.company-asset-copy,
.company-summary-copy {
  gap: 10px;
}

.company-summary-meta {
  gap: 8px;
}

.company-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.company-summary-lockup,
.company-asset-card {
  gap: 16px;
}

.company-logo-tile {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 10px;
}

.mdf-figure {
  display: inline-grid;
  gap: 2px;
  min-width: 140px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
}

.mdf-figure-label {
  color: var(--brand);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mdf-figure-value {
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
}

.data-table-wrap {
  padding: 16px;
}

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

.data-table th,
.data-table td {
  padding: 14px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(42, 72, 156, 0.08);
  vertical-align: top;
}

.data-table th {
  color: #263061;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.empty-state {
  padding: 24px;
  color: #263061;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.form-panel {
  padding: 24px;
}

.field,
.field-wide {
  display: grid;
  gap: 8px;
  align-content: start;
}

.field-wide {
  grid-column: 1 / -1;
}

.label {
  font-size: 0.9rem;
  font-weight: 400;
}

.field-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.94rem;
  max-width: 60ch;
}

.assigned-admin-field[hidden] {
  display: none;
}

.input,
.textarea,
.select {
  min-height: 50px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.95);
  padding: 12px 16px;
  color: var(--ink);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

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

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: rgba(79, 103, 232, 0.42);
  box-shadow: 0 0 0 4px rgba(79, 103, 232, 0.12);
}

.checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.check-pill {
  position: relative;
}

.check-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.check-pill span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: #263061;
  font-weight: 400;
  transition: all 140ms ease;
}

.check-pill:hover span {
  transform: translateY(-1px) scale(1.02);
}

.check-pill input:checked + span {
  background: var(--brand);
  color: #fff;
  border-color: transparent;
  box-shadow: none;
}

.flash-stack {
  display: grid;
  gap: 10px;
  margin: 20px auto 0;
  width: min(1200px, calc(100vw - 32px));
}

.flash {
  border-radius: 10px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
}

.flash.success {
  border-color: rgba(30, 140, 101, 0.2);
  color: var(--success);
}

.flash.error {
  border-color: rgba(188, 60, 90, 0.22);
  color: var(--error);
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  background: rgba(79, 103, 232, 0.08);
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 400;
}

strong {
  font-weight: 400;
}

.tag.error {
  background: rgba(188, 60, 90, 0.1);
  color: var(--error);
}

.tag.success {
  background: rgba(30, 140, 101, 0.1);
  color: var(--success);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(12, 18, 46, 0.48);
  z-index: 50;
}

.modal-backdrop.is-open {
  display: flex;
}

.modal-card {
  width: min(680px, 100%);
  padding: 24px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.auth-wrap {
  min-height: calc(100vh - 84px);
  display: grid;
  place-items: center;
  padding: 32px 0 60px;
}

.auth-card {
  width: min(540px, 100%);
  padding: 30px;
}

.footer {
  margin-top: auto;
  padding: 24px 0 56px;
  color: #263061;
}

@media (max-width: 920px) {
  .hero-grid,
  .two-column,
  .dashboard-banner {
    grid-template-columns: 1fr;
  }

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

  .company-lockup {
    align-items: flex-start;
    flex-direction: column;
  }

  .mdf-pill {
    margin-left: 0;
    max-width: none;
    width: 100%;
  }

  .header-inner {
    padding: 12px 0;
  }
}

@media (max-width: 680px) {
  .site-shell,
  .header-inner,
  .flash-stack {
    width: min(100vw - 20px, 1200px);
  }

  .main-nav {
    display: none;
  }

  .hero-copy h1,
  .section-title {
    font-size: 2.35rem;
  }

  .card,
  .form-panel,
  .hero-panel,
  .dashboard-banner,
  .modal-card {
    padding: 20px;
    border-radius: 14px;
  }

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