/* Baq-Baq ishga qabul anketasi — yashil-oq dizayn.
   Roboto: veb uchun woff2 (v2.137), Android'da tizimdagi nusxa ishlatiladi.
   PDF alohida: fonts/roboto.ttf (ReportLab faqat TTF o'qiydi). */

@font-face {
  font-family: "Roboto";
  src: local("Roboto"), local("Roboto-Regular"), url("../fonts/roboto-400-latin.d91919a3ffb2.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0100-017F, U+02B9-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2116, U+2122, U+2190-2193, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Roboto";
  src: local("Roboto"), local("Roboto-Regular"), url("../fonts/roboto-400-cyrillic.dac169e07332.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0400-052F;
}
/* Klassik Roboto'da 600 yo'q: Medium 500–600 oralig'ini qoplaydi. */
@font-face {
  font-family: "Roboto";
  src: local("Roboto Medium"), local("Roboto-Medium"), url("../fonts/roboto-500-latin.0ca295047474.woff2") format("woff2");
  font-weight: 500 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0100-017F, U+02B9-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2116, U+2122, U+2190-2193, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Roboto";
  src: local("Roboto Medium"), local("Roboto-Medium"), url("../fonts/roboto-500-cyrillic.b6c52c9aa153.woff2") format("woff2");
  font-weight: 500 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0400-052F;
}
@font-face {
  font-family: "Roboto";
  src: local("Roboto Bold"), local("Roboto-Bold"), url("../fonts/roboto-700-latin.e4c704a56d13.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0100-017F, U+02B9-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2116, U+2122, U+2190-2193, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Roboto";
  src: local("Roboto Bold"), local("Roboto-Bold"), url("../fonts/roboto-700-cyrillic.4b8724f22e62.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0400-052F;
}

:root {
  color-scheme: light;
  --brand: #173f2b;
  --brand-pressed: #0b2418;
  --brand-mid: #3f8a60;
  --ink: #10261a;
  --text-soft: #46594e;
  --muted: #56675d;
  --placeholder: #5f6f66;
  --line: #d9e3dc;
  --line-soft: #e4ebe6;
  --tint: #eef4f0;
  --field-bg: #f2f6f3;
  --track: #dbe6df;
  --focus: #3a9a66;
  --focus-ring: #cfe5d7;
  --error: #a4302a;
  --error-bg: #fdf4f3;
  --error-ring: #f6d9d6;
  --error-notice-bg: #fcefee;
  --error-notice-ink: #7f231e;
  --warning-bg: #f4f4dc;
  --warning-ink: #4a4a08;
  --white: #ffffff;
  --radius-field: 12px;
  --radius-button: 14px;
  --field-height: 54px;
  --button-height: 56px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

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

img,
svg {
  display: block;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -80px;
  left: 12px;
  z-index: 10;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--brand);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
  color: var(--white);
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* ---------- Sarlavha ---------- */

.page-header {
  padding: 32px 20px 36px;
  background: var(--tint);
}

.page-header__inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 600px;
  margin: 0 auto;
}

.brand-tile {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  overflow: hidden;
  border-radius: 16px;
  background: var(--white);
}

.brand-tile img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-tile--small {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--tint);
}

.page-title {
  margin: 0;
  color: var(--brand);
  font-size: clamp(27px, 7vw, 38px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.page-lead {
  margin: 0;
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.5;
  text-wrap: pretty;
}

/* ---------- Asosiy qism va stepper ---------- */

.page-main {
  max-width: 600px;
  margin: 0 auto;
  padding: 28px 20px 0;
}

.page-main:focus {
  outline: none;
}

.stepper {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
}

html:not(.js) .stepper {
  display: none;
}

.stepper__labels {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.stepper__current {
  color: var(--brand);
  font-weight: 600;
}

.stepper__next {
  color: var(--muted);
}

.stepper__bar {
  display: flex;
  gap: 6px;
}

.stepper__segment {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--track);
  transition: background-color 0.3s;
}

.stepper__segment.is-done {
  background: var(--brand);
}

.stepper__segment.is-current {
  background: var(--brand-mid);
}

/* ---------- Ogohlantirish bloklari ---------- */

.notice {
  display: flex;
  gap: 14px;
  margin-bottom: 28px;
  padding: 18px;
  border-radius: 16px;
}

.notice:focus {
  outline: none;
}

.notice--error {
  background: var(--error-notice-bg);
  color: var(--error-notice-ink);
}

.notice--warning {
  background: var(--warning-bg);
  color: var(--warning-ink);
}

.notice__icon {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.notice__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 15px;
  line-height: 1.45;
}

.notice__title {
  font-size: 16px;
}

.error-summary__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
}

.error-summary__list a {
  color: var(--error-notice-ink);
  font-weight: 600;
}

/* ---------- Bosqichlar ---------- */

.form-step {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-bottom: 40px;
}

.js .form-step:not(.is-current) {
  display: none;
}

.form-step__heading {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-step__title {
  margin: 0;
  color: var(--ink);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.form-step__title:focus {
  outline: none;
}

.form-step__subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.fields-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 16px;
}

/* ---------- Maydonlar ---------- */

.form-field {
  display: flex;
  flex: 1 1 100%;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.form-field--half {
  flex: 1 1 220px;
}

.field-label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.field-label__optional {
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
}

.field-hint {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.field-control input,
.field-control select,
.field-control textarea,
.custom-select__button {
  width: 100%;
  border: 1.5px solid transparent;
  border-radius: var(--radius-field);
  background-color: var(--field-bg);
  color: var(--ink);
  font-size: 17px;
  outline: none;
  transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}

.field-control input,
.field-control select,
.custom-select__button {
  height: var(--field-height);
  padding: 0 16px;
}

.field-control textarea {
  display: block;
  min-height: 80px;
  padding: 14px 16px;
  line-height: 1.45;
  resize: none;
  overflow: hidden;
}

.field-control input::placeholder,
.field-control textarea::placeholder {
  color: var(--placeholder);
  opacity: 1;
}

/* To'ldirilgan maydon oq fonga o'tadi */
.field-control input:not(:placeholder-shown),
.field-control textarea:not(:placeholder-shown) {
  border-color: var(--line);
  background-color: var(--white);
}

.field-control input:focus,
.field-control select:focus,
.field-control textarea:focus,
.custom-select__button:focus-visible,
.custom-select.is-open .custom-select__button {
  border-color: var(--brand);
  background-color: var(--white);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

/* JS bo'lmaganda oddiy select ham dizaynga mos ko'rinadi */
.field-control select {
  padding-right: 44px;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23173f2b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 14px center;
  background-repeat: no-repeat;
  background-size: 20px 20px;
  cursor: pointer;
}

.has-error .field-control input,
.has-error .field-control select,
.has-error .field-control textarea,
.has-error .custom-select__button {
  border-color: var(--error);
  background-color: var(--error-bg);
}

.has-error .field-control input:focus,
.has-error .field-control textarea:focus,
.has-error .custom-select__button:focus-visible {
  box-shadow: 0 0 0 4px var(--error-ring);
}

/* ---------- Talaba: dars va ish vaqti ---------- */

.schedule {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 18px;
  border-radius: 16px;
  background: var(--tint);
}

.js .schedule.is-collapsed {
  display: none;
}

.schedule__intro {
  margin: 0;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.45;
}

.schedule__nojs {
  display: none;
}

html:not(.js) .schedule__nojs {
  display: inline;
}

.schedule__group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.schedule__legend {
  display: block;
  margin: 0 0 10px;
  padding: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.schedule__pair {
  display: flex;
  gap: 12px;
}

.form-field--time {
  flex: 1 1 0;
  gap: 6px;
}

.schedule__label {
  color: var(--muted);
  font-size: 14px;
}

.schedule .field-control input {
  border-color: var(--line);
  background-color: var(--white);
  font-variant-numeric: tabular-nums;
}

/* Yuqoridagi oq fon qoidasi fokus va xato holatlarini bosib ketmasin. */
.schedule .field-control input:focus {
  border-color: var(--brand);
}

.schedule .has-error .field-control input {
  border-color: var(--error);
  background-color: var(--error-bg);
}

/* ---------- Maxsus select ---------- */

.custom-select {
  position: relative;
  display: flex;
  flex-direction: column;
}

.custom-select__native {
  display: none;
}

.custom-select__button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-right: 14px;
  text-align: left;
  cursor: pointer;
}

.custom-select__button.has-value {
  border-color: var(--line);
  background-color: var(--white);
}

.custom-select__value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select__value.is-placeholder {
  color: var(--placeholder);
}

.custom-select__chevron {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--brand);
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s;
}

.custom-select.is-open .custom-select__chevron {
  transform: rotate(180deg);
}

/* Menyu maydon ustiga ochiladi; pastda joy yetmasa JS uni tepaga
   aylantiradi (.opens-up) va balandligini bo'sh joyga moslaydi. */
.custom-select__menu {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  z-index: 20;
  max-height: 300px;
  margin: 6px 0 0;
  padding: 6px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 16px 32px -16px rgba(16, 38, 26, 0.22);
}

.custom-select.opens-up .custom-select__menu {
  top: auto;
  bottom: 100%;
  margin: 0 0 6px;
  box-shadow: 0 -16px 32px -16px rgba(16, 38, 26, 0.22);
}

.custom-select__menu[hidden] {
  display: none;
}

.custom-select__menu:focus {
  outline: none;
}

.custom-select__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 10px;
  color: var(--ink);
  font-size: 16px;
  cursor: pointer;
}

.custom-select__option:focus {
  outline: none;
}

.custom-select__option.is-active {
  background: var(--tint);
}

.custom-select__option.is-selected {
  font-weight: 600;
}

.custom-select__option.is-selected::after {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23173f2b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.custom-select__option.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---------- Xato matni ---------- */

.field-errors {
  margin: 0;
  padding: 0;
  list-style: none;
}

.field-errors li {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: var(--error);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.field-errors li::before {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='%23a4302a'/%3E%3Cpath d='M12 7v6M12 16.5v.5' stroke='%23fff' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- Rasm yuklash zonasi ---------- */

.file-drop {
  position: relative;
  border: 1.5px dashed #b7cbbd;
  border-radius: 16px;
  background: #f7faf8;
  transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}

.file-drop input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.file-drop:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.file-drop.is-dragging {
  border-color: var(--brand);
  background: #e5eee8;
}

.file-drop.has-file {
  border-style: solid;
  border-color: var(--line);
  background: var(--field-bg);
}

.has-error .file-drop {
  border-color: var(--error);
}

.file-drop__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 28px 20px;
  text-align: center;
}

.file-drop__icon {
  width: 28px;
  height: 28px;
  color: var(--brand);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.file-drop__text {
  color: var(--text-soft);
  font-size: 15px;
}

.file-drop__button {
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: 0 22px;
  border-radius: 12px;
  background: var(--brand);
  color: var(--white);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.file-drop__button:active {
  background: var(--brand-pressed);
}

.file-drop__meta {
  color: var(--muted);
  font-size: 13px;
}

.file-drop__chosen {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
}

.file-drop__chosen[hidden],
.file-drop__empty[hidden] {
  display: none;
}

.file-drop__thumb {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: #e5eee8 center / cover no-repeat;
}

.file-drop__info {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.file-drop__name {
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-drop__size {
  color: var(--muted);
  font-size: 13px;
}

.file-drop__remove {
  flex: none;
  height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: var(--white);
  color: var(--brand);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.file-drop__remove:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* ---------- Pastki tugmalar paneli ---------- */

.form-actions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  display: flex;
  gap: 10px;
  margin: 0 -20px;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.97);
}

html:not(.js) [data-step-back],
html:not(.js) [data-step-forward],
.js .is-concealed {
  display: none;
}

.action-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--button-height);
  padding: 0 20px;
  border: 0;
  border-radius: var(--radius-button);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.08s, background-color 0.15s;
}

.action-button svg {
  flex: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.action-button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.action-button--back {
  gap: 6px;
  padding: 0 18px;
  background: var(--tint);
  color: var(--brand);
  font-size: 16px;
}

.action-button--back:active {
  background: #dce9e0;
}

.action-button--primary {
  flex: 1;
  background: var(--brand);
  color: var(--white);
  font-size: 17px;
}

.action-button--primary:active {
  background: var(--brand-pressed);
  transform: scale(0.98);
}

.submit-button__spinner {
  display: none;
  flex: none;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.submit-button.is-loading {
  background: #4d6b5a;
  cursor: not-allowed;
  transform: none;
}

.submit-button.is-loading .submit-button__spinner {
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Rahmat sahifasi ---------- */

.success-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 16px;
  background: var(--tint);
}

.success-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 440px;
  padding: 36px 24px 28px;
  border-radius: 28px;
  background: var(--white);
  text-align: center;
}

.success-mark {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  margin: 44px 0 32px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 12px #e1ede5, 0 0 0 24px #f1f7f3;
}

.success-mark svg {
  width: 44px;
  height: 44px;
  fill: none;
  stroke: var(--white);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.success-card__thanks {
  margin: 0 0 8px;
  color: #2e6b4a;
  font-size: 16px;
  font-weight: 600;
}

.success-card__title {
  margin: 0;
  color: var(--brand);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.success-card__lead {
  margin: 14px 0 0;
  color: var(--text-soft);
  font-size: 17px;
  line-height: 1.5;
  text-wrap: pretty;
}

.success-card__position {
  margin: 24px 0 0;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--brand);
  font-size: 14px;
}

.success-card__position span {
  color: var(--muted);
}

.success-card__position strong {
  font-weight: 600;
}

.secondary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: var(--button-height);
  margin-top: 36px;
  border: 1.5px solid #cfdcd3;
  border-radius: var(--radius-button);
  background: var(--white);
  color: var(--brand);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}

.secondary-button:hover {
  background: var(--field-bg);
  color: var(--brand);
}

.secondary-button:active {
  background: #e5eee8;
}

.secondary-button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.secondary-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Harakatni kamaytirish ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
