/* ---------- Base ---------- */
        
        

        .section-bg {
            background:
                radial-gradient(ellipse 60% 40% at 15% 20%, rgba(20, 35, 102, 0.5) 0%, transparent 60%),
                radial-gradient(ellipse 55% 45% at 85% 80%, rgba(30, 58, 138, 0.4) 0%, transparent 60%),
                linear-gradient(165deg, #050B26 0%, #0A1647 55%, #0B1B5C 100%);
        }

        /* ---------- Title ---------- */
        .title-display {
            font-family: var(--font-display);
            letter-spacing: -0.005em;
            line-height: 1;
        }
        .title-underline {
            display: inline-block;
            height: 3px;
            background: linear-gradient(90deg,
                rgba(127, 200, 248, 0) 0%,
                rgba(255, 255, 255, 0.95) 50%,
                rgba(127, 200, 248, 0) 100%);
            border-radius: 2px;
            box-shadow: 0 0 18px rgba(127, 200, 248, 0.55);
        }

        /* ---------- Form card (the outer container) ---------- */
        .form-card {
            background: linear-gradient(180deg,
                rgba(11, 22, 64, 0.6) 0%,
                rgba(8, 16, 50, 0.6) 100%);
            border: 1px solid rgba(127, 200, 248, 0.18);
            border-radius: 24px;
            backdrop-filter: blur(6px);
            box-shadow:
                0 30px 80px rgba(0, 0, 0, 0.45),
                0 0 0 1px rgba(255, 255, 255, 0.03) inset,
                0 0 60px rgba(127, 200, 248, 0.06) inset;
        }

        /* ---------- Form fields (glass-dark style) ---------- */
        .field-label {
            font-family: var(--font-body);
            font-weight: 600;
            color: rgba(255, 255, 255, 0.92);
            font-size: 0.875rem;
            letter-spacing: 0.01em;
            margin-bottom: 0.5rem;
            display: flex;
            align-items: center;
            gap: 0.4rem;
        }
        .field-required {
            color: var(--c-accent);
            font-size: 0.85rem;
        }
        .field-hint {
            color: rgba(255, 255, 255, 0.5);
            font-size: 0.78rem;
            margin-top: 0.4rem;
        }
        .field-error {
            color: var(--c-error);
            font-size: 0.78rem;
            margin-top: 0.4rem;
            display: flex;
            align-items: center;
            gap: 0.35rem;
        }

        .input-base {
            width: 100%;
            background: rgba(10, 22, 71, 0.55);
            border: 1.2px solid rgba(127, 200, 248, 0.22);
            border-radius: 12px;
            color: #fff;
            font-family: var(--font-body);
            font-weight: 500;
            font-size: 0.95rem;
            padding: 0.85rem 1.1rem;
            transition: all 0.25s cubic-bezier(.2,.7,.2,1);
            outline: none;
            box-shadow: 0 0 0 0 rgba(127, 200, 248, 0);
        }
        .input-base::placeholder {
            color: rgba(255, 255, 255, 0.35);
            font-weight: 400;
        }
        .input-base:hover {
            border-color: rgba(127, 200, 248, 0.4);
            background: rgba(10, 22, 71, 0.7);
        }
        .input-base:focus {
            border-color: var(--c-accent);
            background: rgba(10, 22, 71, 0.8);
            box-shadow:
                0 0 0 4px rgba(127, 200, 248, 0.12),
                0 0 24px rgba(127, 200, 248, 0.18);
        }
        .input-base.has-error {
            border-color: var(--c-error);
            box-shadow: 0 0 0 4px rgba(252, 165, 165, 0.1);
        }
        textarea.input-base {
            resize: vertical;
            min-height: 100px;
            line-height: 1.55;
        }

        /* Select wrapper */
        .select-wrap {
            position: relative;
        }
        .select-wrap select {
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
            padding-right: 2.75rem;
            cursor: pointer;
        }
        .select-wrap select option {
            background: #0A1647;
            color: #fff;
        }
        .select-wrap::after {
            content: "";
            position: absolute;
            right: 1.1rem;
            top: 50%;
            width: 9px;
            height: 9px;
            border-right: 2px solid var(--c-accent);
            border-bottom: 2px solid var(--c-accent);
            transform: translateY(-70%) rotate(45deg);
            pointer-events: none;
            transition: transform 0.25s ease;
        }

        /* Radio + checkbox cards */
        .choice-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
            gap: 0.6rem;
        }
        .choice-grid-center {
            max-width: 460px;
            margin-left: auto;
            margin-right: auto;
            grid-template-columns: 1fr 1fr;
        }
        .choice-card {
            position: relative;
            display: flex;
            align-items: center;
            gap: 0.7rem;
            padding: 0.75rem 1rem;
            border-radius: 12px;
            background: rgba(10, 22, 71, 0.45);
            border: 1.2px solid rgba(127, 200, 248, 0.18);
            cursor: pointer;
            transition: all 0.25s ease;
            color: rgba(255, 255, 255, 0.85);
            font-size: 0.9rem;
            font-weight: 500;
        }
        .choice-card:hover {
            border-color: rgba(127, 200, 248, 0.45);
            background: rgba(10, 22, 71, 0.7);
        }
        .choice-card input {
            position: absolute;
            opacity: 0;
            pointer-events: none;
        }
        .choice-marker {
            width: 18px;
            height: 18px;
            border-radius: 9999px;
            border: 1.8px solid rgba(127, 200, 248, 0.45);
            background: rgba(10, 22, 71, 0.7);
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }
        .choice-card[data-type="checkbox"] .choice-marker {
            border-radius: 5px;
        }
        .choice-card input:checked + .choice-marker {
            border-color: var(--c-accent);
            background: var(--c-accent);
            box-shadow: 0 0 14px rgba(127, 200, 248, 0.5);
        }
        .choice-card input:checked + .choice-marker::after {
            content: "";
            width: 8px;
            height: 8px;
            border-radius: 9999px;
            background: #0A1647;
        }
        .choice-card[data-type="checkbox"] input:checked + .choice-marker::after {
            border-radius: 1px;
            width: 10px;
            height: 5px;
            background: transparent;
            border-left: 2px solid #0A1647;
            border-bottom: 2px solid #0A1647;
            transform: rotate(-45deg) translate(1px, -1px);
        }
        .choice-card.is-checked {
            border-color: var(--c-accent);
            background: rgba(127, 200, 248, 0.12);
            color: #fff;
        }

        /* File upload */
        .file-drop {
            position: relative;
            border: 1.5px dashed rgba(127, 200, 248, 0.35);
            border-radius: 14px;
            padding: 1.4rem 1.2rem;
            background: rgba(10, 22, 71, 0.35);
            cursor: pointer;
            transition: all 0.25s ease;
            display: flex;
            align-items: center;
            gap: 0.9rem;
        }
        .file-drop:hover, .file-drop.is-dragover {
            border-color: var(--c-accent);
            background: rgba(127, 200, 248, 0.08);
        }
        .file-drop input[type="file"] {
            position: absolute; inset: 0; opacity: 0; cursor: pointer;
        }
        .file-icon {
            width: 44px; height: 44px;
            border-radius: 12px;
            background: rgba(127, 200, 248, 0.15);
            color: var(--c-accent);
            display: flex; align-items: center; justify-content: center;
            flex-shrink: 0;
        }
        .file-meta { flex: 1; min-width: 0; }
        .file-name {
            color: #fff;
            font-weight: 600;
            font-size: 0.9rem;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .file-hint {
            color: rgba(255, 255, 255, 0.55);
            font-size: 0.78rem;
            margin-top: 0.15rem;
        }
        .file-clear {
            margin-left: auto;
            color: rgba(252, 165, 165, 0.85);
            font-size: 0.78rem;
            font-weight: 700;
            padding: 0.35rem 0.7rem;
            border-radius: 8px;
            background: rgba(252, 165, 165, 0.08);
            border: 1px solid rgba(252, 165, 165, 0.2);
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .file-clear:hover {
            background: rgba(252, 165, 165, 0.18);
        }

        /* ---------- Buttons ---------- */
        .btn-primary, .btn-secondary {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.55rem;
            padding: 0.9rem 1.8rem;
            border-radius: 9999px;
            font-family: var(--font-body);
            font-weight: 800;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            font-size: 0.78rem;
            transition: all 0.3s cubic-bezier(.2,.7,.2,1);
            cursor: pointer;
            border: 1px solid transparent;
        }
        .btn-primary {
            background: var(--c-pill-light-bg);
            color: var(--c-pill-light-text);
            border-color: rgba(127, 200, 248, 0.6);
            box-shadow:
                0 10px 28px rgba(127, 200, 248, 0.22),
                0 0 0 1px rgba(255, 255, 255, 0.04) inset;
        }
        .btn-primary:hover {
            transform: translateY(-2px);
            background: #CFE7FC;
            box-shadow:
                0 14px 34px rgba(127, 200, 248, 0.35),
                0 0 0 1px rgba(255, 255, 255, 0.08) inset;
        }
        .btn-primary:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none;
        }
        .btn-secondary {
            background: transparent;
            color: var(--c-accent-soft);
            border-color: rgba(127, 200, 248, 0.5);
        }
        .btn-secondary:hover {
            background: rgba(127, 200, 248, 0.08);
            border-color: var(--c-accent);
            color: #fff;
            transform: translateY(-1px);
        }

        /* ---------- Field reveal animation ---------- */
        .field-wrap {
            transition: opacity 0.4s ease, transform 0.4s cubic-bezier(.2,.7,.2,1), max-height 0.5s ease, margin 0.4s ease;
            overflow: hidden;
        }
        .field-wrap.is-hidden {
            opacity: 0;
            transform: translateY(-8px);
            max-height: 0 !important;
            margin: 0 !important;
            pointer-events: none;
        }

        /* ---------- Section info banner (for conditional groups) ---------- */
        .info-banner {
            background: rgba(127, 200, 248, 0.06);
            border: 1px dashed rgba(127, 200, 248, 0.4);
            border-radius: 12px;
            padding: 0.85rem 1.1rem;
            color: rgba(184, 220, 251, 0.95);
            font-size: 0.85rem;
            display: flex;
            align-items: flex-start;
            gap: 0.65rem;
        }

        /* ---------- Toast ---------- */
        .toast {
            position: fixed;
            top: 1.5rem;
            right: 1.5rem;
            z-index: 100;
            background: rgba(10, 22, 71, 0.95);
            border: 1.5px solid rgba(110, 231, 183, 0.5);
            border-radius: 12px;
            padding: 0.9rem 1.2rem;
            color: #fff;
            box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 0.6rem;
            backdrop-filter: blur(8px);
            animation: toastIn 0.35s cubic-bezier(.2,.7,.2,1);
            max-width: calc(100vw - 3rem);
        }
        @keyframes toastIn {
            from { opacity: 0; transform: translateX(20px); }
            to   { opacity: 1; transform: translateX(0); }
        }
        @keyframes toastOut {
            to { opacity: 0; transform: translateX(20px); }
        }

        /* ---------- Animations ---------- */
        @keyframes riseIn {
            from { opacity: 0; transform: translateY(16px); }
            to   { opacity: 1; transform: translateY(0); }
        }
        @keyframes drawLine { from { transform: scaleX(0); } to { transform: scaleX(1); } }
        .anim-rise { opacity: 0; animation: riseIn 0.85s cubic-bezier(.2,.7,.2,1) forwards; }
        .anim-line { transform-origin: center; transform: scaleX(0); animation: drawLine 0.9s cubic-bezier(.2,.7,.2,1) 0.35s forwards; }

        /* ---------- Title size ---------- */
        .title-size { font-size: clamp(1.6rem, 4vw, 3.25rem); }

        /* ---------- Sample document buttons (3 × 25% width) ---------- */
        .sample-docs-row {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            margin: 8px 0 4px;
        }
        .sample-doc-btn {
            flex: 1 1 22%;
            min-width: 140px;
            text-align: center;
            padding: 12px 14px;
            border: 1px solid rgba(127, 200, 248, 0.4);
            border-radius: 12px;
            color: var(--c-accent);
            font-weight: 700;
            font-size: 13px;
            text-decoration: none;
            background: rgba(255, 255, 255, 0.05);
            transition: background 0.2s ease, transform 0.2s ease;
        }
        .sample-doc-btn:hover {
            background: rgba(127, 200, 248, 0.15);
            transform: translateY(-1px);
        }

        /* Language-scoped labels: show only the active language. */
        .i18n-az, .i18n-en, .i18n-ru { display: none; }
        html:lang(az) .i18n-az,
        html:lang(en) .i18n-en,
        html:lang(ru) .i18n-ru { display: inline; }

        /* ---------- Validation error states ---------- */
        .field-error-msg {
            color: #fca5a5;
            font-size: 0.8rem;
            margin-top: 0.35rem;
            font-weight: 600;
        }
        .has-error,
        .field-input.has-error,
        select.has-error,
        textarea.has-error {
            border-color: #f87171 !important;
            box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.4) !important;
        }
        [x-cloak] { display: none !important; }
