:root {
  --navy: #071A2B;
  --navy-soft: #0D2740;
  --graphite: #28343D;
  --steel: #76838C;
  --white: #F4F7F8;
  --cyan: #00A7B5;
  --cyan-bright: #22C7D6;
  --border: rgba(244, 247, 248, 0.12);
  --font-head: 'Sora', 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --radius: 10px;
  --container: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--navy);
  color: var(--white);
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: var(--font-head);
  line-height: 1.15;
  margin: 0 0 0.5em;
}

p { margin: 0 0 1em; color: rgba(244, 247, 248, 0.82); }

a { color: var(--cyan-bright); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 26, 43, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: 0.03em;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--cyan);
  color: var(--navy);
  font-weight: 700;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.primary-nav a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  opacity: 0.85;
}

.primary-nav a:hover,
.primary-nav a.active { opacity: 1; color: var(--cyan-bright); }

.nav-cta {
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--cyan);
  color: var(--navy) !important;
  font-weight: 600 !important;
  opacity: 1 !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--white);
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 80px;
  background: radial-gradient(circle at 80% 0%, rgba(0, 167, 181, 0.18), transparent 55%);
}

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  color: var(--cyan-bright);
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  max-width: 16ch;
}

.hero-payoff {
  font-size: 1.25rem;
  color: var(--white);
  font-weight: 500;
}

.hero-lead { max-width: 60ch; }

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary { background: var(--cyan); color: var(--navy); }
.btn-primary:hover { background: var(--cyan-bright); }

.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--cyan-bright); color: var(--cyan-bright); }

/* Sections */
.section { padding: 72px 0; }
.section-alt { background: var(--navy-soft); }
.section-dark { background: #051422; }

.section-tag {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--cyan-bright);
  margin-bottom: 10px;
}

.section h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); max-width: 24ch; }

.lead { font-size: 1.08rem; max-width: 62ch; }

/* Value / domain grids */
.value-grid, .domain-grid, .benefit-grid {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.value-grid li, .benefit-grid li {
  padding: 20px;
  background: rgba(244, 247, 248, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.value-title, .benefit-title {
  display: block;
  font-family: var(--font-head);
  font-weight: 600;
  margin-bottom: 6px;
}

.value-desc, .benefit-desc { color: var(--steel); font-size: 0.92rem; }

.domain-card {
  padding: 22px;
  border-radius: var(--radius);
  background: rgba(244, 247, 248, 0.04);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent, var(--cyan));
}

.domain-code {
  font-family: var(--font-mono);
  color: var(--accent, var(--cyan-bright));
  font-size: 0.85rem;
}

.domain-card h3 { margin: 8px 0 6px; font-size: 1.05rem; }
.domain-card p { color: var(--steel); font-size: 0.92rem; margin: 0; }

/* CTA banner */
.cta-banner {
  text-align: center;
  padding: 64px 0;
}

.cta-banner h2 { margin: 0 auto 16px; }

.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Forms */
.form-card {
  max-width: 560px;
  margin-top: 28px;
  padding: 32px;
  background: rgba(244, 247, 248, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.form-row { margin-bottom: 18px; display: flex; flex-direction: column; gap: 6px; }

.form-row label { font-size: 0.88rem; font-weight: 600; color: var(--white); }

.form-row input,
.form-row select,
.form-row textarea {
  padding: 11px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(7, 26, 43, 0.6);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.form-row textarea { resize: vertical; min-height: 110px; }

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--cyan-bright);
}

.form-status {
  margin-top: 14px;
  font-size: 0.9rem;
  min-height: 1.2em;
}

.form-row-checkbox label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.86rem;
  font-weight: 400;
  color: rgba(244, 247, 248, 0.82);
  cursor: pointer;
}

.form-row-checkbox input[type="checkbox"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--cyan);
}

.form-status.ok { color: var(--cyan-bright); }
.form-status.err { color: #E8875C; }

/* Contact info list */
.contact-info {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.contact-info-item strong { display: block; color: var(--white); font-family: var(--font-head); }
.contact-info-item span { color: var(--steel); }

.contact-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

/* App shell (ERP sidebar for logged-in pages) */
.app-shell {
  display: flex;
  align-items: flex-start;
  min-height: 100vh;
}

.app-main { flex: 1; min-width: 0; }

.app-sidebar {
  width: 240px;
  flex-shrink: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  background: var(--navy-soft);
  border-left: 1px solid var(--border);
  position: sticky;
  top: 0;
}

.app-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 24px;
}

.app-sidebar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.92rem;
}

.app-sidebar-topright {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.app-lang-select {
  width: auto;
  max-width: 60px;
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(244, 247, 248, 0.04);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.app-avatar-link { text-decoration: none; }
.app-avatar-link .profile-avatar { width: 30px; height: 30px; font-size: 0.7rem; }

.app-nav { display: flex; flex-direction: column; gap: 3px; }

.app-nav-divider { height: 1px; background: var(--border); margin: 14px 8px; }

.app-nav a {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--white);
  text-decoration: none;
  font-size: 0.9rem;
  opacity: 0.82;
}

.app-nav a:hover { opacity: 1; background: rgba(244, 247, 248, 0.05); }

.app-nav a.active {
  opacity: 1;
  background: rgba(0, 167, 181, 0.14);
  color: var(--cyan-bright);
  font-weight: 600;
}

.app-sidebar-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.app-manual-link {
  display: block;
  padding: 7px 8px;
  font-size: 0.78rem;
  color: var(--steel);
  text-decoration: none;
}

.app-manual-link:hover { color: var(--cyan-bright); }

.app-logout-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 8px;
  border-radius: 8px;
  background: none;
  border: none;
  color: var(--steel);
  font-family: var(--font-body);
  font-size: 0.82rem;
  cursor: pointer;
}

.app-logout-btn:hover { color: var(--cyan-bright); background: rgba(244, 247, 248, 0.05); }

.profile-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--cyan);
  color: var(--navy);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  display: grid;
  place-items: center;
  border: none;
  cursor: pointer;
}

/* One-time generated credentials banner (accreditation admin) */
.credentials-banner {
  margin-top: 20px;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--cyan-bright);
  background: rgba(0, 167, 181, 0.08);
}

.credentials-banner p { margin-bottom: 8px; }
.credentials-banner code {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(7, 26, 43, 0.6);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--cyan-bright);
}

@media (max-width: 860px) {
  .app-shell { flex-direction: column; }
  .app-sidebar {
    width: 100%;
    min-height: auto;
    border-left: none;
    border-bottom: 1px solid var(--border);
    position: static;
  }
  .app-sidebar-header { margin-bottom: 12px; }
  .app-nav { flex-direction: row; flex-wrap: wrap; }
  .app-nav-divider { display: none; }
  .app-sidebar-footer { margin-top: 12px; padding-top: 12px; display: flex; align-items: center; gap: 14px; }
  .app-manual-link { padding: 0; }
  .module-shell { flex-direction: column; }
  .vtabs { flex-direction: row; flex-wrap: wrap; width: 100%; }
  .arch-nav.prev { left: 6px; }
  .arch-nav.next { right: 6px; }
}

/* Accreditation admin */
.app-list { display: grid; gap: 16px; margin-top: 24px; }

.app-card {
  padding: 20px;
  background: rgba(244, 247, 248, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.app-card-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 6px; }
.app-card-header strong { font-family: var(--font-head); }

.app-card-meta { color: var(--steel); font-size: 0.88rem; margin-bottom: 10px; }

.status-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.status-pending { color: #E8A33D; border-color: #E8A33D; }
.status-in_progress { color: #4FA8C9; border-color: #4FA8C9; }
.status-accredited { color: var(--cyan-bright); border-color: var(--cyan-bright); }
.status-rejected { color: #E8875C; border-color: #E8875C; }

.app-card-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.app-card-actions .btn { padding: 8px 18px; font-size: 0.88rem; }
.app-card-actions .btn-danger { background: transparent; color: #E8875C; border: 1px solid #E8875C; }
.app-card-actions .btn-danger:hover { background: rgba(232,135,92,0.1); }

/* Checklist */
.checklist-group { margin-top: 16px; }
.checklist-group-title { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--steel); margin-bottom: 8px; }
.checklist-item { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 0.88rem; }
.checklist-item input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--cyan); flex-shrink: 0; }
.checklist-item.readonly { color: var(--steel); }
.checklist-item .check-icon { width: 16px; height: 16px; flex-shrink: 0; border-radius: 4px; border: 1px solid var(--border); display: grid; place-items: center; font-size: 0.68rem; }
.checklist-item .check-icon.done { background: var(--cyan); color: var(--navy); border-color: var(--cyan); }

/* Edit form inside a card */
.app-card-edit { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.app-card-edit .form-row { margin-bottom: 12px; }
.app-card-edit .form-row input,
.app-card-edit .form-row textarea { font-size: 0.88rem; }

/* Offering editor: repeatable rows and sub-sections */
.offering-editor { margin: 16px 0 24px; padding: 20px 22px; background: rgba(244, 247, 248, 0.04); border: 1px solid var(--border); border-radius: var(--radius); }
.offering-editor .sub-section { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.offering-editor .sub-section-title { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--steel); margin-bottom: 10px; }
.repeat-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; flex-wrap: wrap; }
.repeat-row input,
.repeat-row select {
  flex: 1;
  min-width: 100px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(7, 26, 43, 0.6);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.84rem;
}
.repeat-row label { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--steel); flex-shrink: 0; }
.repeat-row .remove-row { flex-shrink: 0; padding: 6px 12px; font-size: 0.78rem; }
.capability-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.capability-checks label { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; font-size: 0.82rem; }
.offering-tag { display: inline-block; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); font-size: 0.72rem; font-family: var(--font-mono); margin: 2px 4px 2px 0; }

/* Module vertical tabs */
.module-shell { display: flex; gap: 32px; align-items: flex-start; }
.vtabs { display: flex; flex-direction: column; gap: 4px; width: 190px; flex-shrink: 0; }
.vtab {
  text-align: left;
  padding: 10px 14px;
  border-radius: 8px;
  background: none;
  border: none;
  color: var(--white);
  opacity: 0.75;
  font-size: 0.92rem;
  font-family: var(--font-body);
  cursor: pointer;
}
.vtab:hover { opacity: 1; background: rgba(244, 247, 248, 0.05); }
.vtab.active { opacity: 1; background: rgba(0, 167, 181, 0.14); color: var(--cyan-bright); font-weight: 600; }
.module-panels { flex: 1; min-width: 0; }
.module-panel[hidden] { display: none; }

/* Reference architecture slider */
.arch-slider { position: relative; margin-top: 24px; }
.arch-slides { display: flex; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--border); background: rgba(244, 247, 248, 0.02); }
.arch-slides-track { display: flex; transition: transform 0.35s ease; width: 100%; }
.arch-slide { min-width: 100%; box-sizing: border-box; padding: 32px 40px; min-height: 420px; }
.arch-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(7, 26, 43, 0.85);
  color: var(--white);
  font-size: 1.2rem;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.arch-nav:hover { background: var(--cyan); color: var(--navy); }
.arch-nav.prev { left: -20px; }
.arch-nav.next { right: -20px; }
.arch-dots { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.arch-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); border: none; cursor: pointer; padding: 0; }
.arch-dot.active { background: var(--cyan); }

/* Accredited partners showcase (homepage) */
.partners-list {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.partners-list li {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(244, 247, 248, 0.04);
  font-size: 0.88rem;
}

/* Footer */
.site-footer { padding: 40px 0; border-top: 1px solid var(--border); }

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-brand { display: flex; gap: 12px; align-items: flex-start; }
.footer-brand strong { font-family: var(--font-head); }
.footer-brand p { margin: 2px 0 0; color: var(--steel); font-size: 0.88rem; }

.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { color: var(--steel); text-decoration: none; font-size: 0.88rem; }
.footer-links a:hover { color: var(--cyan-bright); }

/* Branding module (behind login) */
.swatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin: 24px 0 36px;
}

.swatch { height: 90px; border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; justify-content: flex-end; border: 1px solid var(--border); }
.swatch-light { color: var(--navy); }
.swatch-name { font-weight: 600; font-size: 0.85rem; }
.swatch-hex { font-family: var(--font-mono); font-size: 0.78rem; opacity: 0.85; }

.sub-heading { margin-top: 36px; font-size: 1.1rem; }

.type-specimen { padding: 24px; background: rgba(244,247,248,0.04); border: 1px solid var(--border); border-radius: var(--radius); }
.type-label { display: block; font-family: var(--font-mono); font-size: 0.75rem; color: var(--steel); margin: 4px 0 20px; }
.type-heading { font-family: var(--font-head); font-size: 1.5rem; }
.type-mono { font-family: var(--font-mono); }

.chip-list { list-style: none; padding: 0; display: flex; gap: 10px; flex-wrap: wrap; }
.chip-list li { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); font-size: 0.85rem; }

.login-shell {
  min-height: calc(100vh - 200px);
  display: grid;
  place-items: center;
  padding: 60px 24px;
}

/* Language selector */
.lang-selector {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(244, 247, 248, 0.04);
}

.lang-option {
  border: none;
  background: transparent;
  color: var(--steel);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.lang-option:hover { color: var(--white); }

.lang-option.active {
  background: var(--cyan);
  color: var(--navy);
  font-weight: 600;
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 24px 24px;
    gap: 16px;
    display: none;
  }
  .primary-nav.open { display: flex; }
  .contact-columns { grid-template-columns: 1fr; }
}

/* Toast notifications */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
}

.toast {
  padding: 13px 16px;
  border-radius: 8px;
  background: var(--navy-soft);
  border: 1px solid var(--border);
  border-left: 3px solid var(--cyan);
  color: var(--white);
  font-size: 0.88rem;
  line-height: 1.4;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  animation: toast-in 0.2s ease-out;
}

.toast.err { border-left-color: #E8875C; }
.toast.ok { border-left-color: var(--cyan-bright); }

.toast.leaving { animation: toast-out 0.2s ease-in forwards; }

@keyframes toast-in {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toast-out {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(16px); }
}

/* Confirm dialog */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 26, 43, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 210;
  padding: 24px;
}

.confirm-dialog {
  width: 100%;
  max-width: 380px;
  background: var(--navy-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.confirm-dialog p { color: var(--white); font-size: 0.94rem; margin-bottom: 20px; }
.confirm-dialog .app-card-actions { margin-top: 0; }
