:root {
  --ink: #1f2933;
  --muted-ink: #5c6670;
  --navy: #173b4f;
  --header-rgb: 23, 59, 79;
  --navy-soft: #e6eef3;
  --blue-light: #c9dce8;
  --primary-hover: #0f2a38;
  --green: #2e6f4e;
  --warning: #a66a00;
  --danger: #9b2c2c;
  --rust: #9b2c2c;
  --amber: #b58a3a;
  --accent-muted: #e7d8b8;
  --paper: #f6f7f8;
  --warm: #eef1f3;
  --line: #d7dce0;
  --white: #ffffff;
  --shadow: 0 2px 8px rgba(15, 42, 56, 0.05);
  --radius: 0;
}

body.admin-page {
  --ink: #202721;
  --muted-ink: #5c6a60;
  --navy: #304738;
  --header-rgb: 48, 71, 56;
  --navy-soft: #e6efe8;
  --blue-light: #d4eadb;
  --primary-hover: #223329;
  --green: #4f6f51;
  --amber: #8c7238;
  --accent-muted: #d9d0a4;
  --paper: #f5f7f3;
  --warm: #ecf1e8;
  --line: #d4ddd2;
  --shadow: 0 2px 8px rgba(48, 71, 56, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

strong,
b {
  color: var(--navy);
  font-weight: 400;
}

h1,
h2,
h3,
h4,
h5,
h6,
th {
  font-weight: 400;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 22px;
  align-items: center;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(var(--header-rgb), 0.96);
  border-bottom: 1px solid rgba(215, 220, 224, 0.24);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  color: var(--blue-light);
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  object-fit: contain;
}

.brand-text {
  display: grid;
  gap: 0;
  font-weight: 400;
  line-height: 1.05;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.site-nav a {
  padding: 10px 12px;
  border-radius: var(--radius);
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.95rem;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--blue-light);
  background: var(--primary-hover);
}

.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid var(--green);
  border-radius: var(--radius);
  color: var(--white);
  background: var(--navy);
  font-weight: 400;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(66, 111, 85, 0.18);
}

.button:hover {
  background: var(--primary-hover);
}

.button:disabled,
button.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
}

.button.ghost {
  color: var(--ink);
  background: transparent;
  border-color: var(--line);
  box-shadow: none;
}

.button.active-filter {
  color: var(--navy);
  background: #fbf8f0;
  border-color: var(--amber);
}

.site-header .button.ghost {
  color: var(--blue-light);
  border-color: rgba(255, 255, 255, 0.34);
}

.site-header .button:not(.ghost),
.hero .button:not(.ghost),
.cta-band .button {
  border-color: var(--amber);
  background: var(--amber);
}

.site-header .button:not(.ghost):hover,
.hero .button:not(.ghost):hover,
.cta-band .button:hover {
  border-color: #9c752c;
  background: #9c752c;
}

.button.ghost.light {
  color: var(--blue-light);
  border-color: rgba(255, 255, 255, 0.46);
}

.button.small {
  min-height: 38px;
  padding: 8px 12px;
  font-size: 0.92rem;
}

.button.full {
  width: 100%;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--white);
}

.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 72vh;
  padding: clamp(82px, 12vh, 132px) clamp(22px, 7vw, 96px);
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(15, 42, 56, 0.96), rgba(15, 42, 56, 0.82) 34%, rgba(15, 42, 56, 0.22) 78%),
    url('../img/black-and-white-data-blue.jpg') center / cover no-repeat;
}

.hero-content {
  max-width: 760px;
}

.hero h1,
.page-intro h1 {
  margin: 0;
  max-width: 950px;
  font-size: clamp(2rem, 4.3vw, 3.8rem);
  line-height: 1.04;
  letter-spacing: 0;
  color: var(--navy);
  font-weight: 400;
}

.hero h1 {
  color: var(--blue-light);
}

.hero p:not(.eyebrow) {
  max-width: 690px;
  margin: 24px 0 0;
  color: rgba(201, 220, 232, 0.9);
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
}

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

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

.container.narrow {
  width: min(840px, calc(100% - 40px));
}

.section {
  padding: clamp(56px, 8vw, 92px) 0;
}

.section.muted {
  background: var(--warm);
}

.section.page-intro {
  padding-top: clamp(74px, 10vw, 118px);
  padding-bottom: clamp(44px, 7vw, 72px);
  background: var(--warm);
  border-bottom: 1px solid var(--line);
}

.section.page-intro.compact {
  min-height: 34vh;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero .eyebrow,
.cta-band .eyebrow,
.site-footer .eyebrow {
  color: var(--blue-light);
}

.section h2,
.section h3 {
  margin: 0 0 14px;
  line-height: 1.14;
  letter-spacing: 0;
}

.section h2 {
  font-size: clamp(1.45rem, 2.2vw, 2.2rem);
  color: var(--navy);
  font-weight: 400;
}

.section h3 {
  font-size: 1.1rem;
}

.section p {
  color: var(--muted-ink);
}

.split,
.two-columns {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: start;
}

.split.center {
  align-items: center;
}

.lead-copy p:first-child {
  margin-top: 0;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 28px;
}

.steps-grid,
.cards-three {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

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

.offer-grid,
.offer-editor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.steps-grid article,
.info-card,
.info-panel,
.faq-list details,
.offer-editor-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.steps-grid article,
.info-card,
.info-panel,
.offer-editor-card {
  padding: 24px;
}

.offer-card.recommended,
.offer-editor-card {
  border-color: var(--accent-muted);
}

.offer-price {
  margin: 8px 0 16px;
  color: var(--navy) !important;
  font-size: 1.55rem;
  font-weight: 400;
}

.offer-card form {
  margin-top: 18px;
}

.offer-editor-card {
  display: grid;
  gap: 14px;
  margin: 0;
}

.offer-editor-card legend {
  padding: 0 8px;
  color: var(--navy);
  font-weight: 400;
}

.steps-grid span,
.timeline span {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 18px;
  border-radius: var(--radius);
  color: var(--blue-light);
  background: var(--navy);
  font-weight: 400;
}

.info-card.emphasized {
  border-color: var(--accent-muted);
  background: #fbf8f0;
}

.check-list {
  display: grid;
  gap: 10px;
  margin: 18px 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 28px;
}

.check-list li::before {
  position: absolute;
  left: 0;
  top: 0.08em;
  color: var(--green);
  content: '✓';
  font-weight: 400;
}

.info-panel.warning .check-list li::before {
  color: var(--warning);
}

.neutral-list li::before {
  color: var(--navy);
  content: '•';
}

.numbered-list {
  display: grid;
  gap: 10px;
  margin: 18px 0;
  padding-left: 24px;
}

.numbered-list li {
  padding-left: 4px;
}

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

.report-meta,
.compact-list {
  gap: 10px;
}

.preliminary-report h2 {
  margin-bottom: 8px;
}

.json-editor {
  min-height: 520px;
  font-size: 0.92rem;
}

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

.timeline article {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 22px;
  align-items: start;
  padding: 24px;
  border-left: 4px solid var(--green);
  background: var(--white);
  box-shadow: var(--shadow);
}

.timeline article h2,
.timeline article p {
  grid-column: 2;
}

.timeline span {
  grid-row: 1 / span 2;
  margin: 0;
  background: var(--green);
}

.faq-list {
  display: grid;
  gap: 14px;
}

.faq-list details {
  padding: 20px 24px;
}

.faq-list summary {
  cursor: pointer;
  color: var(--navy);
  font-weight: 400;
}

.prose {
  max-width: 840px;
}

.notice {
  padding: 20px 22px;
  border-left: 4px solid var(--rust);
  border-radius: var(--radius);
  color: var(--ink);
  background: #fff3d6;
}

.auth-section {
  min-height: 72vh;
  background: var(--paper);
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(360px, 1fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: start;
}

.auth-layout.compact {
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 0.82fr);
}

.auth-layout h1 {
  margin: 0;
  font-size: clamp(2rem, 3.8vw, 3.2rem);
  line-height: 1.05;
  color: var(--navy);
  font-weight: 400;
}

.auth-card {
  display: grid;
  gap: 18px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.auth-card label {
  display: grid;
  gap: 8px;
  font-weight: 400;
}

.auth-card label span {
  color: var(--ink);
}

.auth-card input,
.auth-card select,
.auth-card textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #cfc7b8;
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--white);
  font: inherit;
}

.auth-card input:focus,
.auth-card select:focus,
.auth-card textarea:focus {
  border-color: var(--green);
  outline: 3px solid rgba(var(--header-rgb), 0.15);
}

.auth-card textarea {
  min-height: 132px;
  resize: vertical;
}

.auth-card textarea.large {
  min-height: 210px;
}

.auth-card small {
  color: var(--muted-ink);
  font-weight: 400;
}

.form-layout {
  width: min(920px, calc(100% - 40px));
}

.request-form {
  gap: 22px;
}

.confirmation-group {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--warm);
}

.form-grid.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.checkbox-row {
  display: grid !important;
  grid-template-columns: auto 1fr;
  gap: 10px !important;
  align-items: start;
  font-weight: 400 !important;
}

.checkbox-row input {
  width: 18px;
  min-height: 18px;
  margin-top: 3px;
}

.form-note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0;
  color: var(--muted-ink);
  font-size: 0.95rem;
}

.form-note a {
  color: var(--green);
  font-weight: 400;
}

.form-errors,
.flash {
  padding: 14px 16px;
  border-radius: var(--radius);
}

.form-errors {
  border: 1px solid #e3b7b7;
  color: var(--danger);
  background: #f4dada;
}

.form-errors ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.flash-stack {
  display: grid;
  gap: 10px;
}

.flash.success {
  border: 1px solid #b7d3c4;
  color: #22543d;
  background: #ddede4;
}

.flash.warning {
  border: 1px solid #e6d09a;
  color: #7a4b00;
  background: #fff3d6;
}

.details-list {
  display: grid;
  gap: 14px;
  margin: 22px 0;
}

.details-list div {
  display: grid;
  gap: 4px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.details-list dt {
  color: var(--muted-ink);
  font-size: 0.9rem;
  font-weight: 400;
}

.details-list dd {
  margin: 0;
  color: var(--navy);
  font-weight: 400;
}

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

.page-actions-section {
  padding: 28px 0 clamp(46px, 7vw, 76px);
  background: var(--paper);
}

.section.muted + .page-actions-section {
  background: var(--warm);
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-start;
}

.muted-note {
  margin-top: 16px;
  color: var(--muted-ink);
  font-size: 0.94rem;
}

.admin-context-note,
.admin-panel-note {
  color: var(--muted-ink);
  font-size: 0.96rem;
}

.admin-context-note {
  max-width: 720px;
  margin-top: 14px;
}

.admin-guidance {
  margin: 18px 0;
  padding: 14px 16px;
  border-left: 4px solid var(--amber);
  color: var(--ink);
  background: #fbf8f0;
  font-size: 0.96rem;
}

body.admin-page .admin-guidance,
body.admin-page .admin-metric-card:hover,
body.admin-page .admin-metric-card.active,
body.admin-page .button.active-filter {
  background: #f4f1dc;
}

body.admin-page .section.page-intro {
  background: #e8efe8;
}

body.admin-page .data-table th {
  background: #e3ebe3;
}

.admin-guidance strong {
  color: var(--navy);
  font-weight: 400;
}

.admin-action-notes {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--muted-ink);
  font-size: 0.94rem;
}

.admin-action-notes strong {
  color: var(--ink);
  font-weight: 400;
}

.empty-state {
  padding: clamp(24px, 5vw, 42px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.table-shell {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: var(--shadow);
}

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

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

.data-table th {
  color: var(--ink);
  background: var(--warm);
  font-size: 0.9rem;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 400;
  white-space: nowrap;
}

.status-trimisa {
  color: #1f2933;
  background: #eef1f3;
  border-color: #d7dce0;
}

.status-in-evaluare {
  color: #173b4f;
  background: #e6eef3;
  border-color: #cbdbe4;
}

.status-necesita-reformulare,
.status-asteapta-plata {
  color: #7a4b00;
  background: #fff3d6;
  border-color: #e6d09a;
}

.status-oferta-emisa {
  color: #6b4a12;
  background: #f3e8cf;
  border-color: #ddc78f;
}

.status-plata-confirmata,
.status-raport-disponibil {
  color: #22543d;
  background: #ddede4;
  border-color: #b7d3c4;
}

.status-respinsa {
  color: #7a1f1f;
  background: #f4dada;
  border-color: #e3b7b7;
}

.request-detail-stack {
  display: grid;
  gap: 18px;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.admin-metric-card {
  display: grid;
  padding: 22px;
  border: 1px solid var(--line);
  color: inherit;
  background: var(--white);
  box-shadow: var(--shadow);
  text-decoration: none;
}

.admin-metric-card:hover,
.admin-metric-card.active {
  border-color: var(--amber);
  background: #fbf8f0;
}

.admin-metrics span {
  display: block;
  color: var(--navy);
  font-size: 2.1rem;
  font-weight: 400;
  line-height: 1;
}

.admin-metrics p {
  margin: 8px 0 0;
  color: var(--muted-ink);
  font-weight: 400;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

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

.admin-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

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

.inline-admin-form {
  margin: 0 0 18px;
}

.admin-form label {
  display: grid;
  gap: 8px;
  font-weight: 400;
}

.admin-form select,
.admin-form input,
.admin-form textarea,
.copy-box {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #cfc7b8;
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--white);
  font: inherit;
}

.admin-form input[type='checkbox'] {
  width: 18px;
  min-height: 18px;
  padding: 0;
}

.admin-form textarea {
  min-height: 130px;
  resize: vertical;
}

.copy-box {
  min-height: 320px;
  font-family: inherit;
  white-space: pre-wrap;
}

.note-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.note-list article {
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.note-list small {
  display: block;
  margin-top: 4px;
  color: var(--muted-ink);
}

.cta-band {
  color: var(--white);
  background: var(--navy);
}

.cta-band p,
.cta-band .eyebrow {
  color: rgba(201, 220, 232, 0.84);
}

.cta-band h2 {
  color: var(--blue-light);
}

.site-footer {
  color: rgba(201, 220, 232, 0.84);
  background: var(--navy);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding: 48px 0;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--blue-light);
  font-size: 1rem;
  font-weight: 400;
}

.site-footer a {
  display: block;
  margin: 8px 0;
  color: rgba(201, 220, 232, 0.84);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--blue-light);
}

.footer-brand {
  color: var(--blue-light);
}

.footer-note {
  font-size: 0.92rem;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 16px clamp(20px, 4vw, 56px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.92rem;
}

.beta-notice-modal[hidden],
.cookie-notice[hidden] {
  display: none;
}

.beta-notice-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 42, 56, 0.64);
}

.beta-notice-dialog {
  width: min(620px, 100%);
  padding: clamp(24px, 4vw, 34px);
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 18px 60px rgba(15, 42, 56, 0.26);
}

.beta-notice-dialog h2,
.cookie-notice h2 {
  margin: 0 0 12px;
  color: var(--navy);
  line-height: 1.16;
}

.beta-notice-dialog p,
.cookie-notice p {
  margin: 0 0 12px;
  color: var(--muted-ink);
}

.notice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
}

.cookie-notice {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 55;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  width: min(760px, calc(100% - 36px));
  padding: 18px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--white);
  box-shadow: 0 14px 44px rgba(15, 42, 56, 0.18);
}

.cookie-notice h2 {
  margin-bottom: 6px;
  font-size: 1rem;
}

.cookie-notice p {
  margin-bottom: 0;
  font-size: 0.94rem;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: auto auto;
  }

  .nav-toggle {
    display: block;
    justify-self: end;
  }

  .site-nav {
    display: none;
    grid-column: 1 / -1;
    justify-content: start;
    flex-wrap: wrap;
  }

  .site-nav.open {
    display: flex;
  }

  .header-actions {
    grid-column: 1 / -1;
  }

  .split,
  .two-columns,
  .footer-grid,
  .auth-layout,
  .auth-layout.compact,
  .report-meta,
  .admin-detail-grid {
    grid-template-columns: 1fr;
  }

  .steps-grid,
  .cards-three,
  .offer-grid,
  .offer-editor-grid,
  .admin-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 12px 16px;
  }

  .brand-text {
    display: none;
  }

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

  .hero {
    min-height: 78vh;
    padding: 72px 20px;
    background-position: 66% center;
  }

  .hero h1,
  .page-intro h1 {
    font-size: 2rem;
  }

  .steps-grid,
  .cards-three,
  .offer-grid,
  .offer-editor-grid,
  .admin-metrics {
    grid-template-columns: 1fr;
  }

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

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

  .timeline article h2,
  .timeline article p {
    grid-column: 1;
  }

  .timeline span {
    margin-bottom: 14px;
  }

  .footer-bottom {
    flex-direction: column;
  }

  .cookie-notice {
    left: 12px;
    right: 12px;
    bottom: 12px;
    grid-template-columns: 1fr;
    width: auto;
  }

  .cookie-notice .notice-actions,
  .beta-notice-dialog .notice-actions {
    align-items: stretch;
    flex-direction: column;
  }
}
