/* ====== GENERAL ====== */

:root {
  --bg-page: #f5f5f7;
  --bg-card: #ffffff;
  --accent: #946F41;
  --accent-soft: rgba(13, 110, 253, 0.06);
  --text-main: #151515;
  --text-muted: #6c6c70;
  --border-soft: #e1e1e4;
  --radius-lg: 18px;
  --radius-md: 10px;
  --shadow-soft: 0 14px 30px rgba(15, 23, 42, 0.08);
  --transition-fast: 0.18s ease-out;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  font-size: 16px;              
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  background-color: #f5f5f7;
    flex-direction: column;
}

/* ====== SHELL ====== */

.app-shell {
 background: #fff;
 padding: 30px;
 border-radius: 30px;
 box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

@media (min-width: 900px) {
  .app-shell {
    padding: 32px 34px 36px;
  }
}

/* ====== HEADER ====== */

.app-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 16px;
}

.badge-year {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px; 
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  width: fit-content;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
}

.title-main {
  font-family: "Funnel Display", system-ui, sans-serif;
  font-weight: 700;
  font-size: 32px;   
  letter-spacing: 0.01em;
}

.subtitle {
  font-size: 16px;   
  color: var(--text-muted);
}

/* ====== ANIMAȚII ====== */

.intro-screen,
.form-screen,
.success-screen {
  animation: fadeInUp 0.25s ease-out;
  margin-top: 30px;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ====== TIPOGRAFIE SECȚIUNI ====== */

.section-title {
  font-family: "Funnel Display", system-ui, sans-serif;
  font-size: 20px;   
  font-weight: 600;
  margin-bottom: 6px;
}

.section-subtitle {
  font-size: 16px;   
  color: var(--text-muted);
  margin-bottom: 12px;
}

.info-block {
  border-radius: var(--radius-md);
  background: #f8f9fd;
  padding: 14px 14px 12px;
  margin-bottom: 12px;
}

.info-block h4 {
  font-family: "Funnel Display", system-ui, sans-serif;
  font-size: 18px;     margin-bottom: 6px;
}

.info-list {
  padding-left: 18px;
  font-size: 16px;  
  color: var(--text-main);
}

.info-list li + li {
  margin-top: 4px;
}

.info-list li ul {
  margin-top: 4px;
  padding-left: 18px;
  color: var(--text-muted);
}

/* ====== FORM ====== */

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 800px) {
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
    margin-bottom: 10px;
}

.field label {
  font-family: "Funnel Display", system-ui, sans-serif;
  font-size: 15px;   
  letter-spacing: 0.01em;
}

.field small {
  font-size: 14px;  
  color: var(--text-muted);
}

.field input,
.field select {
  font-family: "DM Sans", system-ui, sans-serif;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  font-size: 16px;  
  background: #fbfbfc;
  transition: border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast);
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  background: #ffffff;
  box-shadow: 0 0 0 1px var(--accent-soft);
}

.field input:disabled,
.field select:disabled {
  background: #e8e8eb;
  color: #999999;
  cursor: not-allowed;
  border-color: #d1d1d6;
}

#domicileStreetInputRegular:disabled,
#birthStreetInputRegular:disabled {
  background: #e8e8eb;
  color: #999999;
  cursor: not-allowed;
  border-color: #d1d1d6;
}

.field-row-full {
  grid-column: 1 / -1;
}

.field-optional {
  font-size: 14px;   
  color: var(--text-muted);
  font-style: italic;
}

.required-badge {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  margin-left: 4px;
}

/* ====== RADIO & CHECKBOX ====== */

.radio-group,
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: #fbfbfc;
  cursor: pointer;
  font-size: 15px;   
  transition: background var(--transition-fast),
    border-color var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.pill-option input {
  accent-color: var(--accent);
}

.pill-option.selected {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.pill-option.selected input {
  filter: brightness(3);
}

.compact-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;   
  cursor: pointer;
}

.compact-checkbox input {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
}

/* ====== COPII ====== */

.children-wrapper {
  border-radius: var(--radius-md);
  background: #f9fafb;
  padding: 10px 10px 8px;
  border: 1px dashed #d3d7de;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.child-row {
  display: grid;
  grid-template-columns: 2fr 1.2fr auto;
  gap: 10px;
  align-items: flex-end;
}

@media (max-width: 640px) {
  .child-row {
    grid-template-columns: 1fr;
  }
}

.child-index {
  font-size: 14px;   
  color: var(--text-muted);
}

/* ====== BUTOANE ====== */

.btn,
.btn-ghost {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 16px;   
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    opacity var(--transition-fast);
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-soft);
  color: var(--text-main);
    margin-bottom: 20px;
}

.btn-ghost:hover {
  background: #f5f5f7;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 14px;
}

/* ====== BUTOANE & ACȚIUNI ====== */

.actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  gap: 12px;
  flex-wrap: wrap;
}

/* ====== CONSENT ====== */

.consent-box {
  border-radius: var(--radius-md);
  background: #f9fafb;
  border: 1px solid #e2e4ec;
  padding: 12px 12px 10px;
  font-size: 16px;  
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 12px;
}

.consent-box input {
  margin-top: 3px;
  accent-color: var(--accent);
}

/* ====== SUCCES ====== */

.success-screen {
  text-align: center;
  padding: 22px 10px 4px;
}

.success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 0 auto 12px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: var(--accent);
}

.success-screen p {
  font-size: 16px;  
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
}

/* ====== TEXTE MICI ====== */

.muted-inline {
  font-size: 14px;   
  color: var(--text-muted);
}

.hidden {
  display: none !important;
}

 .logo img {
  width: 100%;
  max-width: 150px;
  margin-bottom: 30px;
}


/* ====== RESPONSIVE ====== */

/* Tabletă & telefoane mari */
@media (max-width: 900px) {
  body {
    padding: 24px 12px;
    align-items: stretch;
  }

  .app-shell {
    max-width: 100%;
    padding: 20px 18px;
  }

  .title-main {
    font-size: 28px;
  }

  .section-title {
    font-size: 18px;
  }

  .info-block {
    padding: 12px 12px 10px;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .actions .muted-inline {
    order: 2;
  }

  .actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Telefoane mici */
@media (max-width: 600px) {
  body {
    padding: 18px 10px;
  }

  .app-shell {
    padding: 18px 14px 22px;
    gap: 18px;
  }

  .app-header {
    text-align: left;
  }

  .badge-year {
    font-size: 13px;
  }

  .title-main {
    font-size: 24px;
    line-height: 1.15;
  }

  .subtitle {
    font-size: 15px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .child-row {
    grid-template-columns: 1fr;
  }

  .pill-option {
    width: 100%;
    justify-content: flex-start;
  }

  .consent-box {
    flex-direction: row;
    align-items: flex-start;
    font-size: 15px;
  }

  .btn,
  .btn-ghost {
    width: 100%;
    justify-content: center;
  }

  .info-block h4 {
    font-size: 16px;
  }

  .info-list {
    font-size: 15px;
  }

  .muted-inline {
    font-size: 13px;
  }
  header.app-header .logo img {
    width: 100%;
    max-width: 150px;
    margin-bottom: 20px;
}
.title-main {
    font-family: "Funnel Display", system-ui, sans-serif;
    font-weight: 700;
    font-size: 32px;
    letter-spacing: 0.01em;
}
.field {
	margin-bottom: 0;
}
}

/* Ecrane foarte mici (sub 360px) */
@media (max-width: 360px) {
  .title-main {
    font-size: 22px;
  }

  .badge-year {
    font-size: 12px;
  }

  .field input,
  .field select {
    font-size: 15px;
    padding: 9px 10px;
  }

  .btn,
  .btn-ghost {
    font-size: 15px;
    padding: 9px 14px;
  }
}

/* ====== AUTOCOMPLETE DROPDOWN ====== */

.autocomplete {
  position: relative;
  width: 100%;
}

.autocomplete input {
  width: 100%;
}

#domicileStreetInputRegular,
#birthStreetInputRegular {
  font-family: "DM Sans", system-ui, sans-serif;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  font-size: 16px;
  background: #fbfbfc;
  transition: border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast);
}

#domicileStreetInputRegular:focus,
#birthStreetInputRegular:focus {
  outline: none;
  border-color: var(--accent);
  background: #ffffff;
  box-shadow: 0 0 0 1px var(--accent-soft);
}

.autocomplete-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-soft);
  max-height: 300px;
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: 6px 0;
  animation: dropdownSlideIn 0.15s ease-out;
}

@keyframes dropdownSlideIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.autocomplete-item {
  padding: 10px 12px;
  cursor: pointer;
  font-size: 15px;
  color: var(--text-main);
  transition: background-color 0.1s ease, color 0.1s ease;
  user-select: none;
}

.autocomplete-item:hover,
.autocomplete-item.focused {
  background-color: var(--accent);
  color: #ffffff;
}

.autocomplete-list.hidden {
  display: none;
}

/* ====== VALIDATION & ERROR STATES ====== */

.field.error input,
.field.error select {
  border-color: #dc3545;
  background-color: #fff8f8;
}

.field.error input:focus,
.field.error select:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 1px rgba(220, 53, 69, 0.25);
}

.field.error .pill-option {
  border-color: #dc3545;
}

.error-message {
  color: #dc3545;
  font-size: 13px;
  margin-top: 4px;
  font-weight: 500;
}
section#introScreen {
    margin-top: 20px;
}