/* =========================================
   ROOT / RESET
========================================= */

:root {
    --brand:      #2547d0;
    --brand-dk:   #1a34a3;
    --accent:     #7c3aed;
    --brand-tint: #eef1fd;
    --ink:        #101a3d;
    --text:       #1f2937;
    --muted:      #6b7280;
    --line:       #e3e7ef;
    --page:       #eef1f8;
    --danger:     #d92d3a;
    --success:    #166534;

    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 10px;

    --shadow-soft: 0 10px 28px rgba(21, 33, 77, .08);
    --shadow-card: 0 18px 45px rgba(21, 33, 77, .10);
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    background:
        radial-gradient(1100px 480px at 8% -12%, #dfe6fb 0%, transparent 55%),
        radial-gradient(900px 480px at 100% 0%, #ece3fb 0%, transparent 55%),
        var(--page);
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

:focus-visible {
    outline: 3px solid #f6b73c;
    outline-offset: 2px;
}

/* =========================================
   LAYOUT  (single column, all devices)
========================================= */

.main-wrapper {
    width: 100%;
    padding: 40px 16px 56px;
}

.registration-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

@media (min-width: 1200px) {

    .registration-container {
        max-width: 840px;
    }
}

/* =========================================
   HEADER
========================================= */

.event-header {
    text-align: center;
    padding: 0 10px 26px;
}

.logo-wrapper {
    width: 150px;
    height: 120px;
    margin: 0 auto 16px;
    padding: 8px;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;
}

.prestige-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.event-header h1 {
    display: inline-block;
    margin: 0 0 10px;

    padding: 5px 14px;
    border-radius: 999px;

    background: var(--brand-tint);
    color: var(--brand);

    font-size: 12px;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
}

.event-header h2 {
    margin: 4px 0 6px;
    font-family: 'Poppins', 'Inter', sans-serif;
    font-size: clamp(24px, 6vw, 36px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.3px;
    color: var(--ink);
}

.event-header p {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--muted);
}

/* =========================================
   FORM CARD
========================================= */

.form-card {
    background: #ffffff;
    border: 1px solid var(--line);
    border-top: 4px solid var(--brand);
    border-radius: var(--radius-lg);

    padding: 36px 40px 40px;

    box-shadow: var(--shadow-card);
}

/* =========================================
   FORM ROW SPACING
========================================= */

.form-card .row {
    margin-left: -10px;
    margin-right: -10px;
}

.form-card .row > div {
    padding-left: 10px;
    padding-right: 10px;
}

.form-card .row + .row {
    margin-top: 24px;
}

/* =========================================
   SECTION TITLE
========================================= */

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;

    font-family: 'Poppins', 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);

    margin: 32px 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--brand-tint);
}

.section-title:first-of-type {
    margin-top: 0;
}

.section-title i {
    color: var(--brand);
    font-size: 19px;
}

/* =========================================
   LABEL
========================================= */

.form-label {
    display: flex;
    align-items: center;
    gap: 7px;

    font-size: 14px;
    font-weight: 600;
    color: #374151;

    margin-bottom: 8px;
}

.form-label i {
    color: var(--brand);
    font-size: 15px;
}

.required {
    color: var(--danger);
}

/* =========================================
   INPUTS
========================================= */

.form-control,
.form-select {
    width: 100%;
    min-height: 48px;

    padding: 10px 14px;

    border: 1.5px solid #d5dae6;
    border-radius: var(--radius-sm);
    background-color: #fbfcfe;

    font-size: 16px; /* prevents iOS zoom */
    font-weight: 500;
    color: var(--text);

    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.form-control:hover,
.form-select:hover {
    border-color: #c3cbe6;
}

.form-control:focus,
.form-select:focus {
    background-color: #ffffff;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(37, 71, 208, .13);
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: var(--danger) !important;
    background-image: none !important;
}

.form-select.is-invalid {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
    border-color: var(--danger) !important;
    box-shadow: 0 0 0 4px rgba(217, 45, 58, .13) !important;
}

/* =========================================
   ERRORS
========================================= */

.field-error {
    display: flex;
    align-items: flex-start;
    gap: 6px;

    color: var(--danger);
    font-size: 13px;
    font-weight: 500;

    margin-top: 7px;
    padding-left: 2px;
}

.field-error i {
    margin-top: 1px;
    flex-shrink: 0;
}

.general-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;

    padding: 14px 16px;
    border-radius: var(--radius-sm);

    margin-bottom: 20px;
    font-size: 14px;
}

.general-error i {
    margin-right: 6px;
}

/* =========================================
   DJANGO MESSAGES
========================================= */

.alert {
    display: flex;
    align-items: center;
    gap: 8px;

    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
}

/* =========================================
   FEE
========================================= */

.fee-wrapper {
    background: #f0fdf4;
    border: 2px solid #22c55e;
    border-radius: var(--radius-md);

    padding: 16px 18px 18px;

    position: relative;
    overflow: hidden;
}

.fee-wrapper::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(21,128,61,0.05), transparent 60%);
    pointer-events: none;
}

.fee-wrapper .form-label,
.fee-wrapper .form-label i {
    color: var(--success);
}

.fee-wrapper .form-control {
    font-size: 22px !important;
    font-weight: 700;
    color: var(--success) !important;
    background: #ffffff !important;
    border-color: #86efac;
}

.fee-info {
    margin-top: 26px;

    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: var(--radius-sm);

    padding: 14px 18px;

    font-size: 13.5px;
    line-height: 1.7;
    color: #1e40af;
}

.fee-info i {
    margin-right: 6px;
}

/* =========================================
   SUBMIT
========================================= */

.submit-spacer {
    height: 32px;
}

.submit-btn {
    width: 100%;
    min-height: 54px;

    padding: 12px 20px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    border: none;
    border-radius: var(--radius-sm);

    background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 130%);
    color: #ffffff;

    font-size: 17px;
    font-weight: 700;
    letter-spacing: .2px;

    cursor: pointer;
    box-shadow: 0 10px 24px rgba(37, 71, 208, .28);

    transition: transform .15s ease, box-shadow .15s ease;
}

.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(37, 71, 208, .34);
}

.submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 6px 16px rgba(37, 71, 208, .28);
}

.secure-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    margin-top: 14px;

    font-size: 12.5px;
    color: var(--muted);
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 575px) {

    .main-wrapper {
        padding: 20px 10px 32px;
    }

    .registration-container {
        width: 100%;
    }

    .event-header {
        padding: 0 5px 20px;
    }

    .logo-wrapper {
        width: 80px;
        height: 80px;
        margin-bottom: 12px;
        padding: 6px;
    }

    .event-header h1 {
        font-size: 11px;
        padding: 4px 11px;
    }

    .event-header h2 {
        font-size: 24px;
    }

    .event-header p {
        font-size: 13px;
    }

    .form-card {
        padding: 22px 16px 26px;
        border-radius: 14px;
    }

    .form-card .row {
        margin-left: -6px;
        margin-right: -6px;
    }

    .form-card .row > div {
        padding-left: 6px;
        padding-right: 6px;
    }

    .form-card .row + .row {
        margin-top: 18px;
    }

    .section-title {
        font-size: 15.5px;
        margin: 22px 0 16px;
    }

    .section-title:first-of-type {
        margin-top: 0;
    }

    .form-label {
        font-size: 13.5px;
        margin-bottom: 6px;
    }

    .form-control,
    .form-select {
        min-height: 46px;
        padding: 9px 12px;
        font-size: 16px;
    }

    .fee-wrapper {
        padding: 14px;
    }

    .fee-wrapper .form-control {
        font-size: 19px !important;
    }

    .fee-info {
        margin-top: 18px;
        padding: 12px 13px;
        font-size: 12.5px;
    }

    .submit-spacer {
        height: 22px;
    }

    .submit-btn {
        min-height: 50px;
        font-size: 15px;
    }
}

@media (max-width: 360px) {

    .event-header h2 {
        font-size: 21px;
    }

    .form-card {
        padding: 18px 13px 22px;
    }
}