/* 
   Morganizer Premium Registration Stylesheet 
   Clean, Futuristic, Modern, White Theme with Purple and Pink Accents
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #3F3091;
    --color-primary-hover: #5645B5;
    --color-accent: #FF338A;
    --color-text-main: #1F2937;
    --color-text-muted: #6B7280;
    --color-bg-white: #FFFFFF;
    --font-sans: 'Montserrat', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --morganizer-radius-control: 8px;
    --morganizer-radius-card: 14px;
    --morganizer-radius-modal: 20px;
    --morganizer-radius-pill: 999px;
    --shadow-soft: 0 20px 50px rgba(63, 48, 145, 0.05);
    --shadow-hover: 0 30px 60px rgba(63, 48, 145, 0.12);
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg-white);
    color: var(--color-text-main);
    min-height: 100vh;
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Registration pages with hero header: remove default body padding */
body.reg-page-body {
    padding: 0;
    display: block;
    align-items: unset;
    position: static;
}


/* Background blob gradients */
body::before {
    content: '';
    position: absolute;
    top: -150px;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    max-width: 100%;
    height: 900px;
    background: radial-gradient(circle, rgba(63, 48, 145, 0.08) 0%, rgba(63, 48, 145, 0) 70%);
    filter: blur(120px);
    pointer-events: none;
    z-index: 1;
}

body::after {
    content: '';
    position: absolute;
    bottom: -200px;
    left: 20%;
    width: min(1000px, 80vw);
    height: 1000px;
    background: radial-gradient(circle, rgba(255, 51, 138, 0.04) 0%, rgba(255, 51, 138, 0) 70%);
    filter: blur(140px);
    pointer-events: none;
    z-index: 1;
}

/* Decorative Pink Blobs and Curved Shapes */
.morganizer-form-theme::before {
    content: '';
    position: absolute;
    top: 20%;
    right: 5%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 51, 138, 0.05) 0%, rgba(255, 51, 138, 0) 70%);
    filter: blur(60px);
    pointer-events: none;
    z-index: 1;
}

/* ===== BRAND LOGO ===== */
.registration-back-link {
    align-items: center;
    align-self: center;
    color: var(--color-primary);
    display: inline-flex;
    font-size: 0.9rem;
    font-weight: 600;
    gap: 8px;
    min-height: 44px;
    position: relative;
    text-decoration: none;
    width: min(100%, 850px);
    z-index: 10;
}

.registration-back-link:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.registration-back-link:focus-visible {
    border-radius: var(--morganizer-radius-control);
    outline: 3px solid rgba(255, 51, 154, 0.28);
    outline-offset: 2px;
}

.morganizer-form-brand {
    display: inline-flex;
    margin-bottom: 24px;
    position: relative;
    z-index: 10;
}

.morganizer-form-brand img {
    height: 48px;
    width: auto;
    object-fit: contain;
    filter: grayscale(1) brightness(0.2);
}

.mobile-logo {
    display: none;
}

/* ===== HEADER ===== */
.header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    z-index: 10;
}

.header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.header p {
    font-size: 1rem;
    color: var(--color-text-muted);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.event-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
    padding: 8px 22px;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    margin-top: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 4px 14px rgba(63, 48, 145, 0.15);
}

/* ===== FLASH MESSAGES ===== */
.flash-msg {
    width: 100%;
    max-width: 850px;
    padding: 16px 24px;
    border-radius: 16px;
    margin-bottom: 24px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    position: relative;
    z-index: 10;
}

.flash-msg.success {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #047857;
}

.flash-msg.error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #B91C1C;
}

/* Shared success popup used by racer and paddock registration flows. */
.swal-premium-popup {
    border-radius: 20px !important;
    box-shadow: 0 14px 32px rgba(63, 48, 145, 0.16) !important;
    font-family: var(--font-sans) !important;
}

.swal-premium-title {
    color: var(--color-primary) !important;
    font-weight: 800 !important;
}

.swal-premium-message {
    color: var(--color-text-muted) !important;
    font-weight: 600 !important;
    line-height: 1.6 !important;
}

.swal-premium-confirm {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent)) !important;
    border: 0 !important;
    border-radius: 16px !important;
    color: #fff !important;
    font-weight: 800 !important;
    padding: 12px 24px !important;
}

/* ===== FORM CONTAINER & MAIN LAYOUT ===== */
.form-container {
    width: 100%;
    max-width: 850px;
    background: var(--color-bg-white);
    border: 1px solid rgba(63, 48, 145, 0.08);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    position: relative;
    z-index: 10;
    padding: 10px 0;
    transition: box-shadow 300ms ease, transform 300ms ease;
}

.form-container:hover {
    box-shadow: var(--shadow-hover);
}

.registration-closed {
    padding: 40px 24px;
    text-align: center;
}

.registration-closed p {
    margin-top: 12px;
    font-size: 1rem;
    color: var(--color-text-muted);
}

/* Form Section Header */
.form-section-title {
    background: rgba(63, 48, 145, 0.03);
    padding: 24px 32px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(63, 48, 145, 0.06);
    border-top: 1px solid rgba(63, 48, 145, 0.06);
    display: flex;
    align-items: center;
    gap: 12px;
}

.form-section-title:first-of-type {
    border-top: 0;
}

/* ===== FORM INPUT ROWS ===== */
.form-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 20px 32px;
    border-bottom: 1px solid rgba(63, 48, 145, 0.04);
}

.form-row:last-child {
    border-bottom: 0;
}

.form-label {
    width: 200px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-main);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-right: 20px;
}

.form-input-container {
    flex: 1;
    min-width: 250px;
}

/* Inputs, Select, Textarea elements */
.form-input-container input[type="text"],
.form-input-container input[type="email"],
.form-input-container select {
    width: 100%;
    padding: 14px 20px;
    border: 1.5px solid rgba(63, 48, 145, 0.12);
    border-radius: 16px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 500;
    background-color: #FBFBFF;
    color: var(--color-text-main);
    outline: none;
    transition: all 250ms ease;
}

.form-input-container input:focus,
.form-input-container select:focus {
    background-color: #FFFFFF;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(63, 48, 145, 0.08);
}

.form-input-container input::placeholder {
    color: #9CA3AF;
}

/* File pick button styling */
.visually-hidden-file {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.file-action-button {
    background: rgba(63, 48, 145, 0.05);
    color: var(--color-primary);
    border: 1.5px dashed var(--color-primary);
    border-radius: 16px;
    padding: 12px 24px;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 250ms ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.file-action-button:hover {
    background: rgba(63, 48, 145, 0.09);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.file-action-button,
.copy-button,
.remove-file-button,
.submit-btn {
    min-height: 44px;
}

.selected-file-name {
    margin-top: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-primary);
}

.file-help {
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.photo-preview {
    margin-top: 12px;
    width: 90px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(63, 48, 145, 0.1);
    display: none;
    background: #F3F4F6;
}

.photo-preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== DYNAMIC KELAS DRAFTS & SUB-ROWS ===== */
.sub-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 16px 32px 8px;
}

.sub-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 12px 32px;
}

.sub-label {
    width: 200px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text-main);
    text-transform: uppercase;
    padding-right: 20px;
    flex-shrink: 0;
}

.dynamic-control-label {
    color: var(--color-text-main);
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    margin: 16px 0 6px;
}

.sub-input-container {
    flex: 1;
    min-width: 250px;
}

/* Ticket-limit info: hidden by default, shown by JS only when NIK has tickets */
[data-ticket-limit] {
    display: none;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-primary);
    padding: 6px 32px 4px;
    opacity: 0.85;
}

.sub-input-container input {
    width: 100%;
    padding: 12px 18px;
    border: 1.5px solid rgba(63, 48, 145, 0.12);
    border-radius: 14px;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    background-color: #FBFBFF;
    outline: none;
    transition: all 250ms ease;
}

.sub-input-container input:focus {
    background-color: #FFFFFF;
    border-color: var(--color-primary);
}

.ticket-divider {
    height: 1px;
    background: rgba(63, 48, 145, 0.08);
    margin: 16px 32px;
}

.add-kelas-hint {
    padding: 8px 32px;
    font-size: 0.8rem;
    color: var(--color-accent);
    font-weight: 600;
    letter-spacing: 0.4px;
}

/* ===== TAMBAH KELAS BUTTON ===== */
#tambah-kelas-wrapper {
    text-align: center;
}

.tambah-kelas-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border: 0;
    border-radius: 14px;
    background: #3f3091;
    color: #ffffff;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 200ms ease;
    letter-spacing: 0.3px;
}

.tambah-kelas-btn:hover {
    background: #3f3091;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(63, 48, 145, 0.2);
}

.tambah-kelas-btn svg {
    flex-shrink: 0;
}

/* ===== UPLOAD AREA BUKTI TRANSFER ===== */
.upload-section {
    padding: 24px 32px;
}

.upload-area {
    border: 2px dashed rgba(63, 48, 145, 0.18);
    border-radius: 20px;
    padding: 32px;
    text-align: center;
    background: #FBFBFF;
    cursor: pointer;
    min-height: 44px;
    transition: all 250ms ease;
    position: relative;
}

.upload-area:hover {
    border-color: var(--color-primary);
    background: rgba(63, 48, 145, 0.02);
}

.upload-area:focus-visible {
    outline: 3px solid rgba(63, 48, 145, 0.28);
    outline-offset: 2px;
}

.upload-area.drag-over {
    border-color: var(--color-primary);
    background: rgba(63, 48, 145, 0.05);
}

.upload-icon {
    font-size: 1.8rem;
    margin-bottom: 12px;
    color: var(--color-primary);
}

.upload-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text-main);
    margin-bottom: 6px;
}

.upload-help {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.transfer-preview-image {
    max-width: 280px;
    max-height: 180px;
    border-radius: 12px;
    object-fit: contain;
    margin: 0 auto 12px;
    display: block;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

.remove-file-button {
    background: rgba(239, 68, 68, 0.08);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    padding: 8px 18px;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
    transition: all 200ms ease;
}

.remove-file-button:hover {
    background: #EF4444;
    color: #FFFFFF;
}

.hidden-section {
    display: none !important;
}

/* ===== COST SUMMARY SECTION ===== */
.price-summary {
    background: rgba(63, 48, 145, 0.03);
    border-top: 1px solid rgba(63, 48, 145, 0.06);
    border-bottom: 1px solid rgba(63, 48, 145, 0.06);
    padding: 32px;
}

.price-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

.price-breakdown {
    display: grid;
    gap: 12px;
    margin-bottom: 24px;
}

.price-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-main);
}

.price-empty {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

.price-total {
    border-top: 1.5px solid rgba(63, 48, 145, 0.12);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-label {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--color-text-main);
    text-transform: uppercase;
}

.total-amount {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--color-primary);
}

/* ===== REKENING & PAYMENT DETAIL ===== */
.payment-info {
    margin-top: 28px;
    background: #FFFFFF;
    border: 1px solid rgba(63, 48, 145, 0.08);
    border-radius: 20px;
    padding: 24px;
}

.payment-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    margin-bottom: 16px;
}

.payment-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
}

.bank-logo-card {
    height: 40px;
    display: flex;
    align-items: center;
    background: #F9FAFB;
    padding: 4px 12px;
    border-radius: 8px;
    border: 1px solid #E5E7EB;
}

.bank-logo {
    height: 100%;
    width: auto;
    object-fit: contain;
}

.bank-account {
    flex: 1;
}

.account-number {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--color-primary);
    letter-spacing: 0.5px;
}

.account-owner {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 2px;
}

.copy-button {
    background: #FFFFFF;
    border: 1.5px solid var(--color-primary);
    color: var(--color-primary);
    font-family: var(--font-sans);
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 250ms ease;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.copy-button:hover {
    background: var(--color-primary);
    color: #FFFFFF;
}

.payment-note {
    margin-top: 14px;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    line-height: 1.4;
}

/* ===== TERMS AND SUBMIT ===== */
.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 24px 32px;
}

.checkbox-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary);
    cursor: pointer;
    margin-top: 2px;
}

.checkbox-row label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-main);
    line-height: 1.4;
    cursor: pointer;
}

.consent-row {
    min-height: 44px;
    padding-top: 0;
}

.consent-row > div {
    min-width: 0;
}

.consent-error {
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.45;
    margin-top: 6px;
}

.consent-error {
    color: #b91c1c;
}

.submit-container {
    padding: 0 32px 32px;
    text-align: center;
}

#error-msg {
    color: #EF4444;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
    min-height: 20px;
}

.submit-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
    color: #FFFFFF;
    font-family: var(--font-sans);
    font-size: 1.05rem;
    font-weight: 800;
    padding: 16px;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 14px rgba(63, 48, 145, 0.2);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(63, 48, 145, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ===== FOOTER ===== */
.footer {
    margin-top: 40px;
    text-align: center;
    position: relative;
    z-index: 10;
}

.wa-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #25D366;
    color: #FFFFFF;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 10px 20px;
    border-radius: 12px;
    transition: all 250ms ease;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

.wa-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.35);
}

.wa-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.footer p {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

/* ===== RESPONSIVE MEDIA QUERIES ===== */
@media (max-width: 768px) {
    body {
        padding: 24px 16px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .form-row {
        padding: 16px 20px;
    }
    
    .form-label {
        width: 100%;
        margin-bottom: 8px;
        padding-right: 0;
    }

    .form-input-container,
    .sub-input-container {
        flex: 0 0 100%;
        width: 100%;
        min-width: 0;
    }

    .file-field .file-action-button {
        justify-content: center;
        max-width: 100%;
        width: 100%;
    }
    
    .sub-row {
        padding: 12px 20px;
    }
    
    .sub-label {
        width: 100%;
        margin-bottom: 6px;
    }
    
    .ticket-divider {
        margin: 12px 20px;
    }
    
    .add-kelas-hint {
        padding: 12px 20px;
    }
    
    .price-summary {
        padding: 20px;
    }
    
    .upload-section {
        padding: 20px;
    }
    
    .payment-main {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .copy-button {
        width: 100%;
    }
    
    .checkbox-row {
        padding: 20px;
    }
    
    .submit-container {
        padding: 0 20px 20px;
    }
}

/* Morganizer shared visual language: keep the brand gradient, reduce decoration. */
:root {
    --color-primary: #3f3091;
    --color-primary-hover: #2d2268;
    --color-accent: #ff339a;
    --color-text-main: #171528;
    --color-text-muted: #6d6878;
    --color-bg-white: #fffdf7;
    --color-form-surface: #fffdf7;
    --color-field-surface: #fffefa;
    --shadow-soft: 0 8px 24px rgba(45, 34, 104, 0.08);
    --shadow-hover: 0 18px 48px rgba(45, 34, 104, 0.12);
    --brand-gradient: linear-gradient(120deg, #3f3091 0%, #6350b4 48%, #ff339a 100%);
}

.morganizer-form-theme {
    background: var(--color-bg-white);
    color: var(--color-text-main);
}

.morganizer-form-theme::before,
.morganizer-form-theme::after {
    opacity: 0.28;
}

.morganizer-form-theme .header {
    margin-bottom: 28px;
}

.morganizer-form-theme .header h1 {
    color: var(--color-text-main);
    letter-spacing: -0.04em;
    text-transform: none;
}

.morganizer-form-theme .header p,
.morganizer-form-theme .form-label,
.morganizer-form-theme .file-help,
.morganizer-form-theme .footer p {
    color: var(--color-text-muted);
}

.morganizer-form-theme .form-container,
.morganizer-form-theme .manager-single-panel,
.morganizer-form-theme .manager-choice-panel {
    background: var(--color-form-surface);
    border-color: #e9e6ee;
    border-radius: var(--morganizer-radius-card);
    box-shadow: var(--shadow-soft);
}

.morganizer-form-theme .form-input-container input,
.morganizer-form-theme .form-input-container select,
.morganizer-form-theme textarea,
.morganizer-form-theme .upload-area,
.morganizer-form-theme .payment-info {
    background-color: var(--color-field-surface);
}

.morganizer-form-theme .form-container:hover {
    box-shadow: var(--shadow-soft);
    transform: none;
}

.morganizer-form-theme .form-section-title {
    color: var(--color-primary);
    letter-spacing: 0.08em;
}

.morganizer-form-theme input:focus,
.morganizer-form-theme select:focus,
.morganizer-form-theme textarea:focus,
.morganizer-form-theme button:focus-visible,
.morganizer-form-theme a:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 51, 154, 0.28);
}

.morganizer-form-theme .submit-btn,
.morganizer-form-theme .manager-add-button {
    background: var(--brand-gradient);
    border-radius: var(--morganizer-radius-control);
    box-shadow: 0 10px 22px rgba(63, 48, 145, 0.18);
}

/* One radius language for every user-facing registration control. */
.morganizer-form-theme button,
.morganizer-form-theme input,
.morganizer-form-theme select,
.morganizer-form-theme textarea,
.morganizer-form-theme .file-action-button,
.morganizer-form-theme .copy-button,
.morganizer-form-theme .wa-btn {
    border-radius: var(--morganizer-radius-control) !important;
}

.morganizer-form-theme .event-badge,
.morganizer-form-theme .status-badge,
.morganizer-form-theme .badge {
    border-radius: var(--morganizer-radius-pill);
}

.morganizer-form-theme .submit-btn:hover,
.morganizer-form-theme .manager-add-button:hover {
    box-shadow: 0 14px 28px rgba(63, 48, 145, 0.24);
    transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
    .morganizer-form-theme *,
    .morganizer-form-theme *::before,
    .morganizer-form-theme *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* =====================================================================
   REGISTRATION PAGE — GRADIENT HERO HEADER & PREMIUM FOOTER
   Matching the beranda/landing page design system
   ===================================================================== */

/* === Sticky Navbar Bar === */
.reg-navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.80);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(63, 48, 145, 0.08);
    width: 100%;
}

.reg-navbar-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.reg-navbar-logo img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.reg-navbar-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-primary);
    text-decoration: none;
    padding: 8px 16px;
    border: 1.5px solid rgba(63, 48, 145, 0.18);
    border-radius: 99px;
    transition: all 220ms ease;
}

.reg-navbar-back:hover {
    background: rgba(63, 48, 145, 0.06);
    border-color: rgba(63, 48, 145, 0.35);
}

/* === Gradient Hero Header === */
.reg-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #3F3091 0%, #5645B5 55%, #FF338A 100%);
    padding: 56px 24px 72px;
    text-align: center;
    width: 100%;
}

/* Fluid blobs inside hero */
.reg-hero .fluid-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    animation: blobFloat 8s ease-in-out infinite alternate;
}

.reg-hero .blob-h1 {
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    top: -60px;
    left: -80px;
    animation-duration: 9s;
}

.reg-hero .blob-h2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 51, 138, 0.25) 0%, transparent 70%);
    bottom: -40px;
    right: -60px;
    animation-duration: 11s;
    animation-delay: -3s;
}

.reg-hero .blob-h3 {
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    top: 30%;
    right: 20%;
    animation-duration: 13s;
    animation-delay: -6s;
}

/* Glass squares in hero */
.reg-hero .glass-sq {
    position: absolute;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    pointer-events: none;
}

/* Hero content */
.reg-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.30);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 6px 18px;
    border-radius: 99px;
    backdrop-filter: blur(8px);
    margin-bottom: 20px;
}

.reg-hero-content {
    position: relative;
    z-index: 10;
    max-width: 700px;
    margin: 0 auto;
}

.reg-hero-title {
    font-size: 2.2rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -0.02em;
    line-height: 1.1;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.18);
    margin-bottom: 12px;
    text-transform: uppercase;
}

.reg-hero-sub {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.80);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.reg-hero-date {
    display: inline-block;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 8px 22px;
    border-radius: 99px;
    backdrop-filter: blur(8px);
}

/* Wave at bottom of hero */
.reg-hero-wave {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 5;
}

.reg-hero-wave svg {
    display: block;
    width: calc(100% + 1px);
    height: 50px;
}

/* === Body wrapper for page (no default padding top since we have navbar+hero) === */
.reg-page-body {
    background: #fffdf7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.reg-page-body::before,
.reg-page-body::after {
    display: none !important;
}

.reg-page-body .morganizer-form-theme::before {
    display: none !important;
}

/* Main content area (form wrapper) */
.reg-page-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 24px 0;
    position: relative;
    z-index: 10;
}

/* === Premium Gradient Footer === */
.reg-footer {
    position: relative;
    background: linear-gradient(135deg, #3F3091 0%, #5645B5 55%, #FF338A 100%);
    overflow: hidden;
    margin-top: 64px;
    padding: 72px 24px 48px;
    text-align: center;
    width: 100%;
}

/* Wave at top of footer */
.reg-footer-wave {
    position: absolute;
    top: -2px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 5;
}

.reg-footer-wave svg {
    display: block;
    width: calc(100% + 1px);
    height: 60px;
}

/* Footer blobs */
.reg-footer .fluid-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    animation: blobFloat 10s ease-in-out infinite alternate;
}

.reg-footer .blob-f1 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
    bottom: -80px;
    left: -60px;
    animation-duration: 10s;
}

.reg-footer .blob-f2 {
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(255, 51, 138, 0.2) 0%, transparent 70%);
    top: 20px;
    right: -50px;
    animation-duration: 13s;
    animation-delay: -4s;
}

/* Footer glass squares */
.reg-footer .glass-sq {
    position: absolute;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    pointer-events: none;
}

/* Footer content */
.reg-footer-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.reg-footer-logo {
    height: 52px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1) drop-shadow(0 2px 8px rgba(255, 255, 255, 0.15));
    opacity: 0.95;
}

.reg-footer-wa {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.18);
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 12px 28px;
    border-radius: 99px;
    text-decoration: none;
    backdrop-filter: blur(8px);
    transition: all 260ms ease;
}

.reg-footer-wa:hover {
    background: rgba(255, 255, 255, 0.30);
    border-color: rgba(255, 255, 255, 0.55);
    transform: translateY(-2px);
    color: #fff;
}

.reg-footer-wa svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex-shrink: 0;
}

.reg-footer-socials {
    display: flex;
    gap: 14px;
    align-items: center;
}

.reg-footer-social-link {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transition: all 280ms ease;
    text-decoration: none;
}

.reg-footer-social-link:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.45);
    transform: translateY(-3px);
}

.reg-footer-social-link svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Official social assets used by public footer and WhatsApp actions. */
a[aria-label*="Instagram"] svg,
a[aria-label*="YouTube"] svg,
.reg-footer-wa svg,
a[href^="https://wa.me/"] svg {
    display: none;
}

a[aria-label*="Instagram"]::before,
a[aria-label*="YouTube"]::before,
.reg-footer-wa::before,
a[href^="https://wa.me/"]::before {
    content: "";
    display: block;
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    background: center / contain no-repeat;
}

a[aria-label*="Instagram"]::before {
    background-image: url("/assets/morganizer/social/instagram_logo.png");
}

a[aria-label*="YouTube"]::before {
    background-image: url("/assets/morganizer/social/youtube_logo.png");
}

.reg-footer-wa::before,
a[href^="https://wa.me/"]::before {
    background-image: url("/assets/morganizer/social/whatsapp_logo.png");
}

.reg-footer-wa::before {
    width: 22px;
    height: 22px;
    flex-basis: 22px;
}

.participant-group-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.participant-group-link::before {
    content: "";
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    background: center / contain no-repeat url("/assets/morganizer/social/whatsapp_logo.png");
}

.reg-footer-copy {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 0.04em;
}

@keyframes blobFloat {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(20px, -20px) scale(1.05); }
}

/* Flash messages adapt to new layout */
.reg-page-main .flash-msg {
    width: 100%;
    max-width: 850px;
}

/* Responsive tweaks */
@media (max-width: 640px) {
    .reg-hero {
        padding: 40px 20px 56px;
    }
    .reg-hero-title {
        font-size: 1.6rem;
    }
    .reg-hero .glass-sq {
        display: none;
    }
    .reg-footer .glass-sq {
        display: none;
    }
    .reg-footer {
        margin-top: 40px;
        padding: 56px 20px 36px;
    }
    .reg-navbar-inner {
        padding: 12px 16px;
    }
    .reg-navbar-logo img {
        height: 32px;
    }
}

/* =====================================================================
   EMBEDDED MODE — Halaman dalam iframe (tab "1 Peserta" di flow manager)
   Sembunyikan navbar, hero, dan footer agar iframe fit ke form saja
   ===================================================================== */
html.is-embedded .reg-navbar,
html.is-embedded .reg-hero,
html.is-embedded .reg-footer {
    display: none !important;
}

html.is-embedded .reg-page-body {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    min-height: unset !important;
    display: block !important;
}

html.is-embedded .reg-page-main {
    padding: 0 !important;
    margin: 0 !important;
    flex: none !important;
    background: transparent !important;
}

html.is-embedded .form-container {
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    max-width: 100% !important;
}
