.seg-portal-shell {
    --seg-bg: #f3f7ff;
    --seg-surface: #ffffff;
    --seg-text: #0f172a;
    --seg-muted: #475569;
    --seg-border: #dbe4f0;
    --seg-primary: #2563eb;
    --seg-primary-dark: #1d4ed8;
    --seg-focus: rgba(37, 99, 235, 0.25);
    --seg-success: #166534;
    --seg-success-bg: #ecfdf3;
    --seg-danger: #b42318;
    --seg-danger-bg: #fff1f1;
    padding: 18px;
    background:
        radial-gradient(circle at 0 0, rgba(37, 99, 235, 0.09) 0, transparent 35%),
        linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
    border: 1px solid #dbe7fb;
    border-radius: 18px;
}

.seg-portal-wrap {
    max-width: 1120px;
    margin: 0 auto;
}

.seg-alert {
    border-radius: 12px;
    border: 1px solid transparent;
    margin: 0 0 16px;
    padding: 12px 14px;
    font-weight: 600;
}

.seg-alert-success {
    color: var(--seg-success);
    background: var(--seg-success-bg);
    border-color: #b7ebc3;
}

.seg-alert-error {
    color: var(--seg-danger);
    background: var(--seg-danger-bg);
    border-color: #f5b7b5;
}

.seg-stepper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid var(--seg-border);
    background: rgba(255, 255, 255, 0.82);
}

.seg-step-dot {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    background: #eef2ff;
    border: 1px solid #cbd5e1;
}

.seg-step-dot.is-active {
    color: #fff;
    background: linear-gradient(180deg, var(--seg-primary), var(--seg-primary-dark));
    border-color: var(--seg-primary-dark);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.32);
}

.seg-step-line {
    flex: 1;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, #bfdbfe, #93c5fd);
}

.seg-field-programme-category {
    background: var(--seg-surface);
    border: 1px solid var(--seg-border);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    padding: 18px;
    margin-bottom: 18px;
}

.seg-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(250px, 1fr);
    gap: 18px;
}

.seg-main-card,
.seg-side-card {
    background: var(--seg-surface);
    border: 1px solid var(--seg-border);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.seg-main-card {
    padding: 18px;
}

.seg-side-card {
    padding: 18px;
    align-self: start;
}

.seg-poster-wrap {
    margin: -6px -6px 14px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #d5e1f3;
    background: #eef3fb;
    max-height: 360px;
}

.seg-poster-wrap.is-hidden {
    display: none;
}

.seg-poster-image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: center;
}

.seg-side-icon {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e8f9ee;
    border: 1px solid #b9ecc9;
    color: #15803d;
    font-weight: 700;
    margin-bottom: 10px;
}

.seg-side-card h4 {
    margin: 0 0 10px;
    font-size: 24px;
    line-height: 1.25;
    color: #065f46;
}

.seg-side-card p {
    margin: 0 0 10px;
    color: var(--seg-muted);
    line-height: 1.65;
    font-size: 14px;
}

.seg-program-description {
    color: #334155;
    font-size: 13px;
    line-height: 1.75;
    max-height: 520px;
    overflow: auto;
    padding-right: 6px;
    white-space: pre-wrap;
    word-break: break-word;
}

.seg-section-title {
    margin: 0 0 14px;
    font-size: 30px;
    line-height: 1.2;
    color: var(--seg-text);
}

.seg-step {
    display: none;
}

.seg-step.is-active {
    display: block;
}

.seg-field {
    margin-bottom: 14px;
}

.seg-field label {
    display: block;
    margin-bottom: 7px;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
}

.seg-field input,
.seg-field textarea,
.seg-field select {
    width: 100%;
    border: 1px solid #c7d3e3;
    border-radius: 10px;
    padding: 11px 12px;
    font-size: 15px;
    color: var(--seg-text);
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.seg-field textarea {
    min-height: 110px;
    resize: vertical;
}

.seg-field input:focus,
.seg-field textarea:focus,
.seg-field select:focus {
    border-color: var(--seg-primary);
    box-shadow: 0 0 0 4px var(--seg-focus);
    outline: none;
}

.seg-field input.is-invalid,
.seg-field textarea.is-invalid,
.seg-field select.is-invalid {
    border-color: #dc2626;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.15);
}

.seg-field-help {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.35;
    color: #64748b;
}

.seg-inline-error {
    margin-top: 6px;
    font-size: 12px;
    color: #b42318;
    font-weight: 600;
}

.seg-review-box {
    max-height: 540px;
    overflow: auto;
    padding: 14px;
    border: 1px solid var(--seg-border);
    border-radius: 10px;
    background: #fbfdff;
    margin-bottom: 14px;
}

.seg-review-item {
    padding: 9px 0;
    border-bottom: 1px dashed #d7e1ef;
}

.seg-review-item:last-child {
    border-bottom: 0;
}

.seg-review-label {
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 3px;
}

.seg-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.seg-actions-end {
    justify-content: flex-end;
}

.seg-btn {
    border: 0;
    border-radius: 10px;
    min-height: 44px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.seg-btn-primary {
    color: #fff;
    background: linear-gradient(180deg, var(--seg-primary), var(--seg-primary-dark));
}

.seg-btn-light {
    background: #eef2f7;
    color: #0f172a;
}

@media (max-width: 980px) {
    .seg-content-grid {
        grid-template-columns: 1fr;
    }

    .seg-side-card {
        order: -1;
    }

    .seg-poster-wrap { max-height: 300px; }
}

@media (max-width: 640px) {
    .seg-portal-shell {
        padding: 12px;
        border-radius: 12px;
    }

    .seg-main-card,
    .seg-side-card {
        padding: 12px;
    }

    .seg-section-title {
        font-size: 24px;
    }

    .seg-btn {
        width: 100%;
    }
}

/* Registration Closed Notice */
.seg-registration-closed-notice {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 24px;
    gap: 12px;
}

.seg-registration-closed-icon {
    font-size: 56px;
    line-height: 1;
    margin-bottom: 8px;
}

.seg-registration-closed-title {
    font-size: 28px;
    font-weight: 700;
    color: #b42318;
    margin: 0;
}

.seg-registration-closed-programme {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}

.seg-registration-closed-message {
    font-size: 14px;
    color: #475569;
    max-width: 480px;
    line-height: 1.7;
    margin: 4px 0 16px;
}

.seg-registration-closed-back {
    text-decoration: none;
    display: inline-block;
}

/* Inline closed notice (shown when closed category selected in dropdown) */
.seg-inline-closed-notice {
    text-align: center;
    padding: 48px 24px;
    background: #fff1f1;
    border: 1px solid #fca5a5;
    border-radius: 14px;
    margin-bottom: 16px;
}

.seg-inline-closed-icon {
    font-size: 48px;
    line-height: 1;
    margin-bottom: 10px;
}

.seg-inline-closed-title {
    font-size: 22px;
    font-weight: 700;
    color: #b42318;
    margin: 0 0 8px;
}

.seg-inline-closed-msg {
    font-size: 14px;
    color: #475569;
    max-width: 420px;
    margin: 0 auto;
    line-height: 1.7;
}
