/* === CSS Custom Properties - Axpo Design System === */
:root {
  /* ─── Gray Scale ─── */
  --color-gray-50: #fafafa;
  --color-gray-100: #f5f5f5;
  --color-gray-150: #f8f8f8;
  --color-gray-200: #e5e5e5;
  --color-gray-250: #ececfa;
  --color-gray-300: #d4d4d4;
  --color-gray-350: #d8d8d8;
  --color-gray-400: #a3a3a3;
  --color-gray-450: #bebebe;
  --color-gray-500: #737373;
  --color-gray-550: #8d8d8d;
  --color-gray-600: #525252;
  --color-gray-650: #3d3d3d;
  --color-gray-700: #404040;
  --color-gray-750: #1f1f1f;
  --color-gray-800: #262626;
  --color-gray-850: #1d1d57;
  --color-gray-900: #171717;
  --color-gray-950: #0a0a0a;

  /* ─── Essential Colors ─── */
  --color-white: #ffffff;
  --color-black: #000000;

  /* ─── Brand Colors ─── */
  --color-brand: #313193;
  --color-primary: #ff5d64;
  --color-secondary: #4545cf;
  --color-tertiary: #00ecd1;
  --color-success: #00a486;
  --color-danger: #b00020;
  --color-axpo-blue-400: #6a6ad9;
  --color-axpo-blue-700: #313193;

  /* ─── Text Colors ─── */
  --color-text-highlight: #1f1f1f;
  --color-text-highlight-brand: #1d1d57;
  --color-text-primary: #3d3d3d;
  --color-text-secondary: #8d8d8d;
  --color-text-link: #ff5d64;
  --color-text-brand: #313193;

  /* ─── Surface & Background Colors ─── */
  --color-surface: #f8f8f8;
  --color-surface-1: #f4f4f5;
  --color-surface-2: #f0f0f4;
  --color-background: #ffffff;
  --color-background-1: #f5f4f5;
  --color-background-2: #efeff0;
  --color-background-brand: #ececfa;

  /* ─── Disabled States ─── */
  --color-disabled: #ecdcdd;
  --color-disabled-brand: #8282df;

  /* ─── Border Colors ─── */
  --color-border: #bebebe;
  --color-border-soft: #d8d8d8;
  --color-border-highlight: #93959f;
  --color-border-brand: #313193;

  /* ─── Accent Colors ─── */
  --color-accent-primary: #ff5d64;
  --color-accent-secondary: #4545cf;
  --color-accent-tertiary: #00ecd1;
  --color-accent-surface: #313193;
  --color-accent-foreground: #ffffff;
  --color-accent-border: #3f3fbc;
  --color-accent-surface-hover: #1d1d57;
  --color-accent-surface-disabled: #ececfa;

  /* ─── Additional Themed Colors ─── */
  --color-dark-gray: #3d3d3d;
  --color-interaction-red: #f2354d;
  --color-horizon-blue: #4545cf;
  --color-aqua-green: #00ecd1;
  --color-solar-yellow: #ffed57;

  /* ─── Gradient Colors ─── */
  --color-gradient-start: #ffed57;
  --color-gradient-middle: #ff5d64;
  --color-gradient-end: #4545cf;

  /* ─── Typography ─── */
  --font-family-base: "Open Sans", ui-sans-serif, system-ui, sans-serif;
  --font-family-display: "Almarena", system-ui, sans-serif;
  --font-family-display-bold: "Almarena Bold", system-ui, sans-serif;

  /* ─── Spacing & Sizing ─── */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;

  /* ─── Shadows ─── */
  --shadow-soft: 0px 0px 30px 0px rgba(61, 61, 61, 0.1);
  --shadow-hover: 0px 0px 30px 0px rgba(61, 61, 61, 0.3);

  /* ─── Transitions ─── */
  --transition: 0.2s ease;
  --transition-smooth: 0.3s ease;
}

/* === Heading Styles === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-display-bold);
  line-height: 1.1;
  color: var(--color-text-primary);
}

h1 {
  font-size: clamp(28px, 8vw, 36px);
  font-weight: 700;
}

h2 {
  font-size: clamp(20px, 5vw, 24px);
  font-weight: 700;
}

h3 {
  font-size: 18px;
  font-weight: 700;
}

h4 {
  font-size: 16px;
  font-weight: 700;
}

/* === Link Styles === */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-brand);
}

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-family-base);
  color: var(--color-text-primary);
  background: var(--color-background);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 14px;
  line-height: 1.5;
}

:root {
  --header-pill-height: 2.375rem;
  --header-control-bg: transparent;
  --header-control-bg-hover: rgba(49, 49, 147, 0.08);
  --header-control-border: var(--color-brand);
  --header-control-border-hover: var(--color-brand);
  --header-control-text: var(--color-brand);
}

/* === Header === */
.app-header {
  background: var(--color-white);
  color: var(--color-brand);
  box-shadow: var(--shadow-soft);
  border-bottom: 1px solid rgba(49, 49, 147, 0.14);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 0.875rem 1.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 1rem;
}

.header-center {
  display: none;
}

.header-actions {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: flex-end;
  align-self: start;
  padding-top: 0.125rem;
  flex-shrink: 0;
}

.header-collab-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  width: 100%;
}

.header-select {
  min-width: 150px;
  max-width: 210px;
  padding: 0.5rem 0.875rem;
  border: 1.25px solid var(--header-control-border);
  border-radius: 999px;
  background: var(--header-control-bg);
  font-family: var(--font-family-base);
  color: var(--header-control-text);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
}

.header-select:hover,
.header-select:focus-visible {
  border-color: var(--header-control-border-hover);
  background: var(--header-control-bg-hover);
}

.header-select option {
  color: var(--color-brand);
}

.logo-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}

.header-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  flex-wrap: nowrap;
  padding-top: 0.125rem;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  min-width: 0;
}

.logo-icon { width: 32px; height: 32px; flex-shrink: 0; }

.logo-text {
  display: flex;
  flex-direction: column;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.logo-title-main {
  font-family: "Almarena", system-ui, sans-serif;
  font-size: 1.375rem;
  line-height: 1.1;
}

.logo-title-sub {
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.2;
  opacity: 0.9;
  margin-top: 1.15rem;
}

.editor-identity {
  max-width: 100%;
  padding: 0.5rem 0.875rem;
  border: 1.5px solid var(--header-control-border);
  border-radius: 999px;
  background: var(--header-control-bg);
  font-family: var(--font-family-base);
  color: var(--header-control-text);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.editor-identity:hover {
  background: var(--header-control-bg-hover);
  border-color: var(--header-control-border-hover);
}

.editor-identity:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(49, 49, 147, 0.2);
}

/* IT Hub top bar */
.ithub-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
}

.ithub-top-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.ithub-divider {
  width: 1px;
  height: 1.25rem;
  background: var(--color-gray-300);
  flex-shrink: 0;
}

.ithub-brand {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text-highlight-brand);
  letter-spacing: -0.01em;
}

.ithub-app-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text-primary);
  letter-spacing: -0.01em;
}

.ithub-top-right {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-shrink: 0;
}

.ithub-hotline-link {
  display: inline-flex;
  align-items: center;
  padding: 0.4375rem 0.875rem;
  border: 1.25px solid var(--color-brand);
  border-radius: 999px;
  background: transparent;
  color: var(--color-brand);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
}

.ithub-hotline-link:hover {
  background: var(--color-background-brand);
  color: var(--color-accent-surface-hover);
  border-color: var(--color-accent-surface-hover);
}

.ithub-user-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--color-secondary);
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--transition);
}

.ithub-user-btn:hover {
  background: var(--color-accent-surface-hover);
}

.ithub-user-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(69, 69, 207, 0.3);
}

.header-select,
.editor-identity,
.presence-indicator,
.header-controls .btn-sm,
.header-actions .btn-sm {
  height: var(--header-pill-height);
  min-height: var(--header-pill-height);
  line-height: 1.2;
}

.header-controls .btn-sm,
.header-actions .btn-sm {
  padding-top: 0;
  padding-bottom: 0;
  padding-left: 0.875rem;
  padding-right: 0.875rem;
}

/* === Main === */
.app-main {
  flex: 1;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* === Progress Navigation === */
.progress-nav {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem 0.875rem;
}

.copy-draft-link-row {
  margin-top: 1rem;
  margin-bottom: 0;
}

.copy-draft-link-btn {
  width: 100%;
  justify-content: center;
  padding: 0.1875rem 0.75rem;
}

.progress-steps {
  display: flex;
  list-style: none;
  align-items: flex-start;
  gap: 0;
  counter-reset: step;
  overflow-x: auto;
  padding-bottom: 4px;
}

.progress-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  text-align: center;
  min-width: 80px;
  cursor: pointer;
}

.progress-step:focus-visible {
  outline: none;
}

.progress-step:focus-visible .step-number {
  box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.25);
}

.progress-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 18px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--color-border-soft);
  z-index: 0;
}

.step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-gray-200);
  color: var(--color-text-primary);
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  transition: background var(--transition), color var(--transition), border var(--transition);
  border: 2px solid transparent;
}

.progress-step.active:not([data-step="6"]) .step-number {
  border-width: 2px;
}

.progress-step.active:not([data-step="6"]).status-ready .step-number {
  background: #cdeedf;
  color: #0b5e47;
  border-color: #0b5e47;
}

.progress-step.active:not([data-step="6"]).status-missing .step-number {
  background: #f8cdd1;
  color: #8a1f2b;
  border-color: #8a1f2b;
}

.progress-step:not(.active):not([data-step="6"]).status-missing .step-number {
  background: #f8cdd1;
  color: #8a1f2b;
  border-color: #f8cdd1;
}

.progress-step:not(.active):not([data-step="6"]).status-ready .step-number {
  background: #cdeedf;
  color: #0b5e47;
  border-color: #cdeedf;
}

.progress-step[data-step="6"].active .step-number {
  border-width: 2px;
  border-color: var(--color-text-brand);
}

.progress-step[data-step="6"].status-missing .step-number {
  background: #f8cdd1;
  color: #8a1f2b;
  border-color: #f8cdd1;
}

.progress-step[data-step="6"].status-confirm .step-number {
  background: #fde4b0;
  color: #7a4b00;
  border-color: #fde4b0;
}

.progress-step[data-step="6"].status-ready .step-number {
  background: #cdeedf;
  color: #0b5e47;
  border-color: #cdeedf;
}

.step-label {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--color-black);
  margin-top: 6px;
  line-height: 1.3;
  transition: color var(--transition);
}

.step-missing-count {
  display: inline-block;
  margin-top: 2px;
  color: var(--color-danger);
  font-size: 0.68rem;
  line-height: 1.3;
}

.progress-step.active .step-label {
  color: var(--color-black);
  font-weight: 400;
  font-size: 0.7rem;
}

/* === Saved Progress Banner === */
.saved-banner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  background: var(--color-background-brand);
  border: 1px solid var(--color-border-brand);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--color-text-brand);
}

.saved-banner svg { flex-shrink: 0; }

.banner-close {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  color: var(--color-primary-dark);
  line-height: 1;
  padding: 0 4px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.banner-close:hover { background: rgba(0,120,212,0.15); }

/* === Form Container === */
.form-container {
  background: var(--color-background);
  border-radius: var(--radius-2xl);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  max-width: 750px;
  margin: 0 auto;
  border: 1px solid #e8e8f0;
  padding: 2rem;
}

/* === Form Steps === */
.form-step { padding: 0; }

.step-header { 
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e8e8f0;
}

.step-title {
  font-size: 24px;
  font-weight: 700;
  font-family: var(--font-family-display-bold);
  color: var(--color-text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.1;
}

.step-description { 
  color: var(--color-text-secondary); 
  font-size: 14px; 
  line-height: 1.6;
  margin: 0;
}

/* === Form Elements === */
.form-group { margin-bottom: 1.375rem; }

.form-subsection-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0 0 0.625rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-label {
  display: block;
  font-weight: 500;
  font-size: 14px;
  color: var(--color-text-primary);
  margin-bottom: 0.375rem;
  line-height: 1.5;
}

.form-label.required::after {
  content: ' *';
  color: var(--color-error);
}

.form-control {
  width: 100%;
  padding: 0.75rem 0.875rem;
  border: 1px solid #e0dce8;
  border-radius: var(--radius-md);
  font-family: var(--font-family-base);
  font-size: 14px;
  color: var(--color-text-primary);
  background: #f5f3fa;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
  appearance: none;
  line-height: 1.5;
}

.form-control.is-required-empty {
  background: #f5f3fa;
}

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%238d8d8d'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  background-size: 1.125rem;
  padding-right: 2.5rem;
  background-color: #f5f3fa;
}

textarea.form-control { resize: vertical; min-height: 80px; }

.form-control:focus {
  outline: none;
  border-color: var(--color-secondary);
  background: var(--color-white);
  box-shadow: 0 0 0 3px rgba(69, 69, 207, 0.1);
}

.form-control.is-invalid {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 3px rgba(176, 0, 32, 0.1);
}

.field-error {
  display: block;
  color: var(--color-error);
  font-size: 0.8125rem;
  margin-top: 0.25rem;
  min-height: 1.1em;
}

.field-error.no-reserve {
  min-height: 0;
}

.field-hint {
  display: block;
  color: var(--color-text-secondary);
  font-size: 0.8125rem;
  margin-top: 0.25rem;
}

.app-name-wrapper {
  position: relative;
}

.leanix-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-white);
  border: 1px solid var(--color-border-soft);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-md);
  z-index: 200;
  max-height: 240px;
  overflow-y: auto;
}

.leanix-suggestion-item {
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-size: 0.9375rem;
  color: var(--color-text-primary);
  border-bottom: 1px solid var(--color-border-soft);
}

.leanix-suggestion-item:last-child {
  border-bottom: none;
}

.leanix-suggestion-item:hover,
.leanix-suggestion-item.active {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
}

.app-name-status[data-state="success"] { color: var(--color-success); }
.app-name-status[data-state="warning"] { color: #9a6700; }
.app-name-status[data-state="error"]   { color: var(--color-error); }

.char-counter { text-align: left; }

.tag-input {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  min-height: 2.5rem;
  padding: 0.375rem 0.5rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #eaf2ff;
  color: #1f3a66;
  border: 1px solid #c8dafc;
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  font-size: 0.8125rem;
}

.tag-chip-remove {
  border: none;
  background: transparent;
  color: #1f3a66;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0;
}

.tag-input-field {
  border: none;
  outline: none;
  flex: 1;
  min-width: 12rem;
  font-family: var(--font-family-base);
  font-size: 0.9375rem;
  color: var(--color-text-primary);
  background: transparent;
  padding: 0.2rem 0.25rem;
}

.tag-input:focus-within {
  border-color: var(--color-border-focus);
  box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.15);
}

.tag-input.is-invalid {
  border-color: var(--color-error);
  box-shadow: 0 0 0 3px rgba(209, 52, 56, 0.12);
}

/* === Checkboxes & Radios === */
.checkbox-group, .radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.375rem;
}

.checkbox-label, .radio-label {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  cursor: pointer;
  font-size: 0.9375rem;
  line-height: 1.4;
}

.form-checkbox, .form-radio {
  width: 1rem;
  height: 1rem;
  margin-top: 2px;
  cursor: pointer;
  accent-color: #0b5e47;
  flex-shrink: 0;
}

.radio-badge {
  display: inline-block;
  font-weight: 600;
  font-size: 0.8125rem;
  padding: 2px 8px;
  border-radius: 999px;
}

.radio-badge.critical { background: #fee2e2; color: #991b1b; }
.radio-badge.important { background: #fef3c7; color: #92400e; }
.radio-badge.standard { background: #dcfce7; color: #166534; }

.radio-hint { font-size: 0.8125rem; color: var(--color-text-secondary); display: block; margin-top: 2px; }

.gdpr-radio-group {
  flex-direction: row;
  align-items: center;
  gap: 1rem;
}

.technology-domain-radio-group {
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.owner-inline-radio-group {
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

fieldset { border: none; }
legend.form-label { font-weight: 500; font-size: 0.9rem; color: var(--color-text-primary); margin-bottom: 0.375rem; }

/* === Conditional Groups === */
.conditional-group {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.375rem;
}

.conditional-group .form-group { margin-bottom: 1rem; }
.conditional-group .form-group:last-child { margin-bottom: 0; }

.desktop-packaging-group {
  margin-top: 1rem;
}

.conditional-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e2e8f0;
}

.warning-header { color: #92400e !important; }

.azure-icon { color: var(--color-primary); }

/* === Consent Group === */
.consent-group {
  margin-top: 1rem;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.consent-label {
  align-items: center;
  justify-content: flex-end;
  text-align: right;
  font-size: 0.9375rem;
  width: 100%;
}

#confirmAccuracyError {
  width: 100%;
  text-align: right;
}

/* === Review Summary === */
.review-summary {
  background: #efefef;
  border: 1px solid #d1d5db;
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1.5rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  color: #000000;
}

.review-actions {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 1rem;
}

.review-section { margin-bottom: 1.25rem; }
.review-section:last-child { margin-bottom: 0; }

.review-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #000000;
  margin-bottom: 0.625rem;
  padding-bottom: 0.375rem;
  border-bottom: 1px solid #d1d5db;
}

.review-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1.5rem;
}

.review-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: #000000;
  margin-bottom: 2px;
}

.review-value {
  font-size: 0.9rem;
  color: #000000;
  font-weight: 500;
}

.review-value.empty { color: #000000; font-style: italic; font-weight: 400; }

.attributes-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.62rem;
  table-layout: fixed;
}

.attributes-table-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.col-attribute-name { width: 44%; }
.col-attribute-value { width: 56%; }

.attributes-table th,
.attributes-table td {
  text-align: left;
  padding: 0.38rem 0.5rem;
  border-bottom: 1px solid #d1d5db;
  vertical-align: top;
}

.attributes-table th {
  font-size: 0.6rem;
  color: #000000;
  background: #e5e7eb;
  font-weight: 600;
}

.attributes-table td {
  color: #000000;
}

.mandatory-flag {
  color: #fca5a5;
  font-weight: 700;
}

.mandatory-flag.is-missing {
  color: #ef4444;
  animation: mandatoryBlink 1s steps(2, start) infinite;
}

.mandatory-flag.is-provided {
  color: #22c55e;
}

@keyframes mandatoryBlink {
  50% { opacity: 0.15; }
}

/* === Navigation === */
.form-navigation {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 1.25rem 2rem;
  border-top: 1px solid #f3f4f6;
  background: #fafafa;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  background: #f5f3fa;
  border-radius: var(--radius-md);
  font-family: var(--font-family-base);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition), color var(--transition);
  line-height: 1.4;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: #d9d5f0;
  color: var(--color-text-brand);
  border-color: #d9d5f0;
  font-weight: 500;
}

#nextBtn,
#submitBtn {
  margin-left: auto;
}

#prevBtn {
  grid-column: 1;
  justify-self: start;
}

#nextBtn,
#submitBtn {
  grid-column: 3;
  justify-self: end;
  margin-left: 0;
}

#prevBtn,
#nextBtn,
#downloadCsvBtn {
  min-height: var(--header-pill-height);
  padding: 0.5rem 0.875rem;
  border-radius: 999px;
  border-width: 1.5px;
  line-height: 1.2;
}

#submitBtn {
  min-height: var(--header-pill-height);
  padding: 0.5rem 0.875rem;
  border-radius: 999px;
  border-width: 1.5px;
  line-height: 1.2;
  color: var(--color-white);
  opacity: 1;
}

#submitBtn:disabled {
  opacity: 1;
}

#submitBtn.btn-success,
#submitBtn.btn-success:hover:not(:disabled),
#submitBtn.btn-success:disabled {
  background: #cdeedf;
  border-color: #cdeedf;
  color: #0b5e47;
}

#submitBtn.btn-warning,
#submitBtn.btn-warning:hover:not(:disabled),
#submitBtn.btn-warning:disabled {
  background: #fde4b0;
  border-color: #fde4b0;
  color: #7a4b00;
}

#submitBtn.btn-danger,
#submitBtn.btn-danger:hover:not(:disabled),
#submitBtn.btn-danger:disabled {
  background: #f8cdd1;
  border-color: #f8cdd1;
  color: #8a1f2b;
}

#prevBtn.btn-secondary,
#nextBtn.btn-primary {
  background: #d7d2f7;
  color: var(--color-text-brand);
  border-color: #d7d2f7;
}

#prevBtn.btn-secondary:hover:not(:disabled),
#nextBtn.btn-primary:hover:not(:disabled) {
  background: #c9c2f3;
  color: var(--color-text-brand);
  border-color: #c9c2f3;
}

.btn-primary:hover:not(:disabled) { 
  background: #cfc8e8; 
  border-color: #cfc8e8; 
}

.btn-secondary {
  background: #f5f5f5;
  color: var(--color-text-primary);
  border-color: #e8e8f0;
}
.btn-secondary:hover:not(:disabled) { background: #ebebeb; }

.btn-success {
  background: var(--color-success);
  color: white;
  border-color: var(--color-success);
}
.btn-success:hover:not(:disabled) { background: #0b5e0b; }

.btn-danger {
  background: var(--color-error);
  color: white;
  border-color: var(--color-error);
}
.btn-danger:hover:not(:disabled) { background: #a7282b; border-color: #a7282b; }

.btn-danger:disabled {
  opacity: 1;
  background: var(--color-error);
  color: var(--color-white);
  border-color: var(--color-error);
}

.btn-warning {
  background: #f59e0b;
  color: var(--color-white);
  border-color: #f59e0b;
}
.btn-warning:hover:not(:disabled) { background: #d97706; border-color: #d97706; }

.btn-warning:disabled {
  opacity: 1;
  background: #f59e0b;
  color: var(--color-white);
  border-color: #f59e0b;
}

.btn-ghost {
  background: var(--header-control-bg);
  color: var(--header-control-text);
  border-color: var(--header-control-border);
  border-radius: 999px;
  border-width: 1.25px;
  font-weight: 600;
}
.btn-ghost:hover:not(:disabled) { background: var(--header-control-bg-hover); color: var(--header-control-text); border-color: var(--header-control-border-hover); }

.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }

.header-actions .btn-sm { font-weight: 500; }

.btn.copy-draft-link-btn {
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.4;
}

.icon-sm { width: 16px; height: 16px; flex-shrink: 0; }

/* === Success Screen === */
.success-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
}

.success-card {
  background: var(--color-background);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 3rem 2.5rem;
  text-align: center;
  max-width: 480px;
  width: 100%;
}

.success-icon {
  width: 72px;
  height: 72px;
  background: var(--color-success-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.success-icon svg {
  width: 40px;
  height: 40px;
  stroke: var(--color-success);
}

.success-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 0.75rem;
}

.success-message {
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.submission-ref {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin-bottom: 1.5rem;
  font-family: monospace;
}

/* === Footer === */
.app-footer {
  background: var(--color-white);
  border-top: 1px solid #e5e7eb;
  padding: 1rem 1.5rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-link { color: var(--color-primary); text-decoration: none; }
.footer-link:hover { text-decoration: underline; }

.draft-id-display {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  font-weight: 500;
  min-height: 1.2em;
}

.autosave-indicator {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  min-height: 1em;
}

/* === Utility === */
.hidden { display: none !important; }
[hidden] { display: none !important; }

/* === Presence Indicator === */
.presence-indicator {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  background: var(--header-control-bg);
  border: 1.25px solid var(--header-control-border);
  border-radius: 999px;
  color: var(--header-control-text);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}

.presence-indicator:hover {
  background: var(--header-control-bg-hover);
  border-color: var(--header-control-border-hover);
}

.presence-count {
  font-size: 0.8125rem;
  font-weight: 600;
  min-width: 1.2em;
  text-align: center;
}

.presence-label {
  font-size: 0.8125rem;
  font-weight: 600;
}

.presence-list {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--color-white);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  margin-top: 0.5rem;
  min-width: 250px;
  max-width: 300px;
  z-index: 1000;
  overflow-y: auto;
  max-height: 400px;
}

.presence-list.hidden {
  display: none;
}

.presence-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-bottom: 1px solid var(--color-border-soft);
  transition: background var(--transition);
}

.presence-item:last-child {
  border-bottom: none;
}

.presence-item:hover {
  background: var(--color-background);
}

.presence-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid white;
  box-shadow: 0 0 0 1px var(--color-border-soft);
}

.presence-info {
  flex: 1;
  min-width: 0;
}

.presence-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.presence-time {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
}

/* === Responsive === */
@media (max-width: 640px) {
  .app-main { padding: 1rem; }
  .form-step { padding: 1.25rem; }
  .form-navigation { padding: 1rem 1.25rem; }
  .form-row { grid-template-columns: 1fr; }
  .review-grid { grid-template-columns: 1fr; }
  .logo-text { font-size: 0.9rem; }
  .header-content {
    grid-template-columns: 1fr;
    gap: 0.625rem;
    justify-items: start;
  }
  .header-controls {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .header-center,
  .header-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .header-actions {
    padding-top: 0;
  }
  .editor-identity {
    max-width: 100%;
  }
  .progress-step .step-label { font-size: 0.7rem; }
}

@media (max-width: 768px) {
  .attributes-table-columns {
    grid-template-columns: 1fr;
  }
}
