:root {
    --brand:       #01b685;
    --brand-dark:  #019970;
    --brand-light: #e6faf4;
    --black:       #000000;
    --white:       #ffffff;
    --grey:        #f4f4f4;
    --grey2:       #e8e8e8;
    --grey3:       #9a9a9a;
    --grey4:       #555555;
    --text:        #111111;
}

/* ======================================================
   СЕКЦИЯ И ОБЁРТКА
   ====================================================== */
.prize-reg-section {
    min-height: 100vh;
    background: linear-gradient(145deg, #01b685 0%, #018f69 45%, #015e46 100%);
    padding: 2.5rem 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.preg-wrapper {
    max-width: 860px;
    margin: 0 auto;
}

/* ======================================================
   ШАПКА
   ====================================================== */
.preg-header {
    text-align: center;
    margin-bottom: 2rem;
    color: #fff;
}

.logo-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    margin-bottom: 1.1rem;
}

.logo-img {
    width: 44px;
    height: 44px;
    border-radius: 11px;
}

.logo-txt {
    font-size: 1.4rem;
    font-weight: 800;
    color: #000;
    letter-spacing: -.02em;
}

.preg-badge {
    display: inline-block;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 100px;
    padding: .3rem 1rem;
    font-size: .76rem;
    letter-spacing: .04em;
    margin-bottom: .75rem;
    color: rgba(255, 255, 255, .9);
}

.preg-header h1 {
    font-size: clamp(1.55rem, 4vw, 2.2rem);
    font-weight: 800;
    margin: 0 0 .35rem;
}

.preg-header p {
    opacity: .85;
    margin: 0;
    font-size: .92rem;
}

/* ======================================================
   АЛЕРТЫ
   ====================================================== */
.preg-alert {
    border-radius: 14px;
    padding: .9rem 1.1rem;
    margin-bottom: 1.25rem;
    font-size: .88rem;
}

.preg-alert--success { background: #d1fae5; border-left: 4px solid #10b981; color: #065f46; }
.preg-alert--info    { background: #dbeafe; border-left: 4px solid #3b82f6; color: #1e3a8a; }
.preg-alert--danger  { background: #fee2e2; border-left: 4px solid #ef4444; color: #7f1d1d; }

/* ======================================================
   ФОРМА — ОБЁРТКА И ПРОГРЕСС
   ====================================================== */
.preg-form-wrap {
    background: var(--white);
    border-radius: 24px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .2);
    overflow: hidden;
}

.preg-progress {
    display: flex;
    align-items: flex-start;
    gap: 0;
    padding: 1.25rem 1.75rem 0;
    background: var(--grey);
    border-bottom: 1px solid var(--grey2);
    overflow-x: auto;
}

.preg-step-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 48px;
    position: relative;
}

.preg-step-dot:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 14px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--grey2);
    z-index: 0;
}

.preg-step-dot.done:not(:last-child)::after,
.preg-step-dot.active:not(:last-child)::after {
    background: var(--black);
}

.preg-step-dot__circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--grey2);
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
    font-weight: 700;
    color: var(--grey3);
    position: relative;
    z-index: 1;
    transition: all .2s;
}

.preg-step-dot.active .preg-step-dot__circle { background: var(--black); border-color: var(--black); color: var(--white); }
.preg-step-dot.done   .preg-step-dot__circle { background: var(--brand); border-color: var(--brand); color: var(--white); }

.preg-step-dot__label {
    font-size: .6rem;
    color: var(--grey3);
    margin-top: .35rem;
    text-align: center;
    line-height: 1.2;
    padding-bottom: .7rem;
}

.preg-step-dot.active .preg-step-dot__label { color: var(--black); font-weight: 700; }
.preg-step-dot.done   .preg-step-dot__label { color: var(--brand); }

/* ======================================================
   ШАГИ
   ====================================================== */
.preg-step    { padding: 2rem; }
.preg-step h2 { font-size: 1.15rem; font-weight: 800; color: var(--text); margin: 0 0 1.4rem; }

.preg-hint       { font-size: .82rem; color: var(--grey3); margin: -.75rem 0 1.1rem; }
.preg-hint-small { font-size: .72rem; color: var(--grey3); display: block; margin-top: .22rem; }

.preg-hint-info {
    font-size: .8rem;
    color: #1e40af;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: .65rem .9rem;
    margin-bottom: 1.1rem;
    line-height: 1.5;
}

/* ======================================================
   ПОЛЯ
   ====================================================== */
.preg-field { margin-bottom: 1.1rem; }

.preg-field label {
    display: block;
    font-size: .75rem;
    font-weight: 700;
    color: var(--grey4);
    margin-bottom: .3rem;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.req { color: #ef4444; }

.preg-field input[type="text"],
.preg-field input[type="tel"],
.preg-field input[type="email"],
.preg-field input[type="date"] {
    width: 100%;
    padding: .65rem .95rem;
    border: 1.5px solid var(--grey2);
    border-radius: 10px;
    font-size: .88rem;
    color: var(--text);
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
}

.preg-field input:focus {
    outline: none;
    border-color: var(--black);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, .08);
}

.preg-field input.error { border-color: #ef4444; }

.preg-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: .9rem;
}

/* ======================================================
   ЧЕКБОКС
   ====================================================== */
.preg-checkbox label {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    font-size: .83rem;
    color: var(--grey4);
    font-weight: normal;
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
}

.preg-checkbox input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--black);
}

/* ======================================================
   КНОПКИ НАВИГАЦИИ
   ====================================================== */
.preg-actions {
    display: flex;
    justify-content: space-between;
    gap: .8rem;
    margin-top: 1.6rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--grey2);
}

.preg-actions--right { justify-content: flex-end; }

button.btn-next,
button.btn-prev,
button.btn-submit {
    padding: .7rem 1.6rem;
    border-radius: 10px;
    font-size: .85rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: background .18s, transform .1s;
    letter-spacing: .01em;
}

button.btn-next                      { background: var(--black); color: var(--white); }
button.btn-next:hover:not(:disabled) { background: #222; }
button.btn-next:disabled             { opacity: .35; cursor: not-allowed; }

button.btn-prev                      { background: var(--grey); color: var(--grey4); border: 1px solid var(--grey2); }
button.btn-prev:hover                { background: var(--grey2); }

button.btn-submit      { background: var(--brand); color: var(--white); }
button.btn-submit:hover { background: var(--brand-dark); }

button:active { transform: scale(.97); }

/* ======================================================
   КАРТОЧКИ ПРИЗОВ
   ====================================================== */
.prizes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: .9rem;
    margin-bottom: .9rem;
}

.prize-card {
    border: 2px solid var(--grey2);
    border-radius: 16px;
    padding: 1.15rem;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: border-color .18s, transform .18s;
}

.prize-card:hover    { border-color: var(--black); transform: translateY(-2px); }
.prize-card.selected { border-color: var(--black); background: var(--grey); }

.prize-card img {
    width: 76px;
    height: 76px;
    object-fit: contain;
    margin-bottom: .7rem;
}

.prize-card__name {
    font-size: .875rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: .3rem;
}

.btn-select-prize {
    background: var(--black);
    color: var(--white);
    border: none;
    border-radius: 8px;
    padding: .38rem .85rem;
    font-size: .73rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .18s;
}

.btn-select-prize:hover { background: #222; }

.prize-card__check {
    position: absolute;
    top: .65rem;
    right: .65rem;
    width: 20px;
    height: 20px;
    background: var(--brand);
    color: var(--white);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: .6rem;
    font-weight: 800;
}

.prize-card.selected .prize-card__check { display: flex; }

.preg-selected-prize {
    background: var(--brand-light);
    border: 1px solid rgba(1, 182, 133, .35);
    border-radius: 12px;
    padding: .7rem 1rem;
    font-size: .875rem;
    color: #065f46;
    display: flex;
    align-items: center;
    gap: .7rem;
    margin-bottom: .9rem;
}

.preg-selected-prize button {
    margin-left: auto;
    background: var(--white);
    border: 1px solid rgba(1, 182, 133, .4);
    border-radius: 8px;
    padding: .22rem .65rem;
    font-size: .72rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--brand-dark);
}

/* ======================================================
   КАРТОЧКИ ДОКУМЕНТОВ
   ====================================================== */
.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: .9rem;
    margin-bottom: 1.3rem;
}

.doc-card {
    background: var(--grey);
    border: 1.5px solid var(--grey2);
    border-radius: 14px;
    padding: 1.15rem;
    text-align: center;
    transition: border-color .18s;
}

.doc-card.has-file { border-color: var(--brand); background: var(--brand-light); }

.doc-card__title {
    font-size: .78rem;
    font-weight: 700;
    color: var(--grey4);
    margin-bottom: .85rem;
    line-height: 1.4;
}

.doc-card__upload {
    display: inline-block;
    padding: .42rem .95rem;
    background: var(--white);
    border: 1.5px solid var(--grey2);
    border-radius: 8px;
    font-size: .76rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .18s, color .18s;
}

.doc-card__upload:hover { border-color: var(--black); color: var(--black); }

.doc-card__upload input[type="file"] { display: none; }

.doc-card__preview {
    margin-top: .65rem;
    font-size: .72rem;
    color: var(--brand-dark);
    word-break: break-all;
}

/* ======================================================
   УВЕДОМЛЕНИЕ
   ====================================================== */
#preg-notification {
    position: fixed;
    top: 1.2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    min-width: 280px;
    max-width: 88vw;
    border-radius: 12px;
    padding: .85rem 1.1rem;
    font-size: .85rem;
    font-weight: 600;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .18);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateX(-50%) translateY(-14px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ======================================================
   СОСТОЯНИЯ КНОПКИ ОТПРАВКИ
   ====================================================== */
.btn-submit.loading {
    opacity: .65;
    cursor: not-allowed;
    pointer-events: none;
}

/* ======================================================
   АДАПТИВ
   ====================================================== */
@media (max-width: 560px) {
    .preg-step     { padding: 1.2rem; }
    .preg-progress { padding: .9rem .9rem 0; }
    .preg-actions  { flex-direction: column; }
    .preg-actions button { width: 100%; text-align: center; }
}