﻿*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: linear-gradient(160deg, #0f2e57 0%, #1a4a8a 55%, #1b6ca8 100%);
    min-height: 100vh;
    padding-bottom: 48px;
}
.app-topbar {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 13px 18px;
    display: flex;
    align-items: center;
    gap: 11px;
    position: sticky;
    top: 0;
    z-index: 200;
}

.brand-logo {
    width: 36px;
    height: 36px;
    background: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Sora', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #1a4a8a;
    flex-shrink: 0;
    letter-spacing: -0.3px;
}

.brand-name {
    font-family: 'Sora', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    line-height: 1.15;
}

.brand-sub {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.48);
    margin-top: 1px;
}

/* ============================================================
                   PAGE HERO
                ============================================================ */
.page-hero {
    padding: 24px 18px 28px;
}

    .page-hero .section-label {
        font-size: 10px;
        font-weight: 600;
        letter-spacing: 1.5px;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.42);
        margin-bottom: 7px;
    }

    .page-hero h2 {
        font-family: 'Sora', sans-serif;
        font-size: 22px;
        font-weight: 700;
        color: #fff;
        line-height: 1.22;
    }

    .page-hero p {
        font-size: 13px;
        color: rgba(255, 255, 255, 0.52);
        margin-top: 5px;
        line-height: 1.55;
    }

/* ============================================================
                   FORM CARD (register-container)
                ============================================================ */
.register-container {
    background: #fff;
    border-radius: 20px 20px 16px 16px;
    margin: 0 10px;
    overflow: hidden;
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.22);
}

/* ============================================================
                   SECTION HEADERS
                ============================================================ */
.form-section-header {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 22px 18px 0;
}

    .form-section-header .sec-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #1a4a8a;
        flex-shrink: 0;
    }

    .form-section-header span {
        font-size: 11px;
        font-weight: 600;
        letter-spacing: 1.1px;
        text-transform: uppercase;
        color: #1a4a8a;
    }

.form-section-divider {
    height: 1px;
    background: #eef1f7;
    margin: 4px 18px 0;
}

/* ============================================================
                   FORM BODY
                ============================================================ */
.form-body-inner {
    padding: 8px 18px 20px;
}

/* ============================================================
                   FORM GROUPS
                ============================================================ */
.form-group {
    margin-bottom: 14px;
}

.form-label {
    display: block;
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #6b7a8f !important;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 5px !important;
}

.form-control,
.form-select {
    width: 100%;
    height: 46px !important;
    border: 1.5px solid #e2e8f2 !important;
    border-radius: 10px !important;
    padding: 0 13px !important;
    font-size: 14px !important;
    font-family: 'DM Sans', sans-serif !important;
    color: #1a2840 !important;
    background: #f7f9fc !important;
    outline: none !important;
    box-shadow: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
    appearance: none;
    -webkit-appearance: none;
}

    .form-control:focus,
    .form-select:focus {
        border-color: #1a4a8a !important;
        background: #ffffff !important;
        box-shadow: 0 0 0 3px rgba(26, 74, 138, 0.11) !important;
    }

    .form-control::placeholder {
        color: #b0bac8 !important;
    }

    .form-control:disabled,
    .form-select:disabled {
        background: #f0f3f8 !important;
        color: #b8c4d0 !important;
        border-color: #e8ecf2 !important;
        cursor: not-allowed;
        opacity: 0.6;
    }

.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7a8f' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    padding-right: 40px !important;
    cursor: pointer;
}

.text-danger {
    font-size: 11px !important;
    color: #e53e3e !important;
    margin-top: 4px;
    display: block;
}

/* ============================================================
                   TRAINING SELECTION SECTION
                ============================================================ */
.training-section {
    padding: 0 18px 20px;
}

.training-section-header {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 18px 0 13px;
    border-top: 1px solid #eef1f7;
    margin-top: 4px;
}

    .training-section-header .sec-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #1a4a8a;
        flex-shrink: 0;
    }

    .training-section-header span {
        font-size: 11px;
        font-weight: 600;
        letter-spacing: 1.1px;
        text-transform: uppercase;
        color: #1a4a8a;
    }

.training-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* ── Individual Training Card ── */
.training-card {
    border: 1.5px solid #e2e8f2;
    border-radius: 12px;
    padding: 13px 12px;
    cursor: pointer;
    background: #f7f9fc;
    position: relative;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

    .training-card:hover {
        border-color: #93b3dc;
        background: #eef4fc;
    }

    .training-card:active {
        transform: scale(0.97);
    }

    .training-card.border-primary,
    .training-card.bg-primary-subtle {
        border-color: #1a4a8a !important;
        background: #eef4fc !important;
    }

    .training-card .fw-bold.training-name {
        font-size: 13px;
        font-weight: 600 !important;
        color: #1a2840;
        display: block;
        padding-right: 22px;
        line-height: 1.35;
        margin-bottom: 9px;
    }

    .training-card .small {
        font-size: 11px !important;
        color: #6b7a8f;
        line-height: 1.7;
    }

        .training-card .small .text-success {
            color: #1a6ca8 !important;
            font-weight: 600;
        }

        .training-card .small .text-danger {
            color: #e53e3e !important;
            font-weight: 600;
            font-size: 11px !important;
            margin-top: 0;
            display: inline;
        }

/* Radio dot */
.radio-dot {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 15px;
    height: 15px;
    border-radius: 50% !important;
    border: 1.5px solid #c8d4e3 !important;
    background: transparent;
    transition: background 0.2s, border-color 0.2s;
    flex-shrink: 0;
}

.training-card.border-primary .radio-dot {
    background: #1a4a8a !important;
    border-color: #1a4a8a !important;
}

/* Hidden training id */
#Trainingid {
    display: none;
}

/* ============================================================
                   SUBMIT BUTTON
                ============================================================ */
.submit-wrap {
    padding: 6px 18px 24px;
}

.btn-submit {
    display: block;
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, #1a4a8a 0%, #1b6ca8 100%);
    border: none !important;
    border-radius: 12px !important;
    font-family: 'Sora', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #fff !important;
    letter-spacing: 0.3px;
    cursor: pointer;
    box-shadow: 0 6px 22px rgba(26, 74, 138, 0.36);
    transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
    -webkit-tap-highlight-color: transparent;
}

    .btn-submit:hover {
        opacity: 0.91;
        transform: translateY(-1px);
        box-shadow: 0 9px 28px rgba(26, 74, 138, 0.38);
    }

    .btn-submit:active {
        transform: scale(0.98);
        box-shadow: 0 3px 12px rgba(26, 74, 138, 0.25);
    }

#loadingOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.62);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

    #loadingOverlay .spinner-border {
        width: 56px !important;
        height: 56px !important;
        border-width: 4px;
        margin: 0 !important;
    }

@media (min-width: 576px) {
    .page-hero {
        padding: 28px 22px 30px;
    }

        .page-hero h2 {
            font-size: 24px;
        }

    .register-container {
        margin: 0 16px;
        border-radius: 22px;
    }

    .form-section-header {
        padding: 24px 22px 0;
    }

    .form-section-divider {
        margin: 4px 22px 0;
    }

    .form-body-inner {
        padding: 10px 22px 22px;
    }

    .training-section {
        padding: 0 22px 22px;
    }

    .submit-wrap {
        padding: 6px 22px 26px;
    }
}

@media (min-width: 768px) {
    body {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .app-topbar {
        width: 100%;
        max-width: 100%;
        padding: 14px 32px;
    }

    .page-hero {
        width: 100%;
        max-width: 740px;
        padding: 32px 24px 28px;
    }

        .page-hero h2 {
            font-size: 26px;
        }

    .register-container {
        width: 100%;
        max-width: 740px;
        margin: 0 20px;
        border-radius: 24px;
    }

    .form-section-header {
        padding: 26px 28px 0;
    }

    .form-section-divider {
        margin: 5px 28px 0;
    }

    .form-body-inner {
        padding: 10px 28px 24px;
    }

    .training-section {
        padding: 0 28px 24px;
    }

    .submit-wrap {
        padding: 6px 28px 28px;
    }

    .form-control,
    .form-select {
        height: 48px !important;
        font-size: 14.5px !important;
    }

    .btn-submit {
        height: 52px;
        font-size: 16px;
    }

    .training-card {
        padding: 15px 14px;
    }

        .training-card .fw-bold.training-name {
            font-size: 13.5px;
        }
}

@media (min-width: 1024px) {
    .page-hero {
        max-width: 800px;
    }

    .register-container {
        max-width: 800px;
    }

    .training-grid {
        gap: 12px;
    }

    .training-card {
        padding: 16px 15px;
    }
}