.ttid-shell {
    max-width: 980px;
}

.role-form-section {
    background: rgba(20, 33, 77, 0.85);
    border: 2px solid #f4c215;
    border-radius: 18px;
    padding: 24px;
}

.page-title {
    color: #f7cd1c;
    text-align: center;
    font-size: 42px;
    margin-bottom: 0;
    line-height: 1.05;
}

.role-selector {
    margin-top: 0;
    margin-bottom: 10px;
}

.role-selector label {
    display: block;
    text-align: center;
    color: #fff;
    font-weight: 700;
    margin-bottom: 8px;
}

.role-selector select {
    width: 100%;
    background: #3b4460;
    color: #f3f6ff;
    border: 1px solid #f4c215;
    border-radius: 8px;
    padding: 12px;
}

.role-form {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 18px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 14px;
}

.form-group label {
    color: #f5cf2a;
    font-size: 14px;
    font-weight: 700;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 11px;
    border-radius: 6px;
    border: 1px solid rgba(244, 194, 21, 0.55);
    background: #3a4563;
    color: #f2f6ff;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #f4c215;
    box-shadow: 0 0 0 2px rgba(244, 194, 21, 0.2);
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

.primary-btn {
    background: linear-gradient(135deg, #ffdd66, #f4c215);
    color: #0b1433;
    border: none;
    border-radius: 6px;
    min-width: 220px;
    font-weight: 700;
    box-shadow: 0 18px 34px rgba(0,0,0,0.25);
    transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
    position: relative;
    overflow: hidden;
}

.primary-btn:hover {
    filter: brightness(1.05);
    transform: translateY(-2px);
    box-shadow: 0 22px 40px rgba(0,0,0,0.32);
}

.primary-btn:active {
    transform: translateY(0) scale(0.98);
}

.primary-btn::after {
    content: "";
    position: absolute;
    inset: -20% -30%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    transform: translateX(-120%) rotate(10deg);
    transition: transform 600ms ease;
}

.primary-btn:hover::after {
    transform: translateX(120%) rotate(10deg);
}

.secondary-btn {
    border: 1px solid #f4c215;
    color: #f4c215;
    background: transparent;
    border-radius: 6px;
    padding: 10px 24px;
}

.secondary-btn:hover {
    background: #f4c215;
    color: #0c1637;
}

.secondary-btn:active {
    transform: scale(0.98);
}

.success-message,
.error-message {
    margin-top: 16px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}

.success-message { background: #1f9d57; color: #fff; }
.error-message { background: #c0392b; color: #fff; }

.success-overlay {
    position: fixed;
    inset: 0;
    z-index: 11000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    pointer-events: auto;
}

.success-overlay-backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 120% 80% at 50% 40%, rgba(102, 126, 234, 0.45), rgba(11, 20, 51, 0.92));
    backdrop-filter: blur(6px);
}

.success-modal-shell {
    position: relative;
    z-index: 1;
    width: min(520px, 100%);
    max-height: min(90vh, 900px);
    overflow-y: auto;
}

.success-modal-panel {
    margin: 0;
    border: 2px solid rgba(244, 194, 21, 0.95);
    border-radius: 20px;
    box-shadow:
        0 0 0 1px rgba(255, 221, 102, 0.35),
        0 0 40px rgba(244, 194, 21, 0.45),
        0 0 80px rgba(102, 126, 234, 0.35),
        0 24px 48px rgba(0, 0, 0, 0.45);
    animation: successGlowPulse 2.2s ease-in-out infinite;
}

@keyframes successGlowPulse {
    0%, 100% {
        box-shadow:
            0 0 0 1px rgba(255, 221, 102, 0.35),
            0 0 36px rgba(244, 194, 21, 0.4),
            0 0 72px rgba(102, 126, 234, 0.3),
            0 24px 48px rgba(0, 0, 0, 0.45);
    }
    50% {
        box-shadow:
            0 0 0 2px rgba(255, 235, 160, 0.55),
            0 0 52px rgba(244, 194, 21, 0.55),
            0 0 100px rgba(118, 75, 162, 0.4),
            0 28px 56px rgba(0, 0, 0, 0.5);
    }
}

.success-details {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(244,194,21,0.45);
    padding: 18px;
    border-radius: 10px;
    color: #f2f6ff;
}

.success-details p { margin-bottom: 8px; }

.success-heading {
    animation: popSuccess 700ms ease;
}

.success-pop {
    animation: riseSuccess 450ms ease;
}

#otpCode {
    font-size: 22px;
    letter-spacing: 4px;
    text-align: center;
}

@media (max-width: 768px) {
    .page-title {
        font-size: 34px;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .primary-btn {
        width: 100%;
        min-width: 0;
    }
    .form-actions {
        flex-direction: column;
    }
}

@keyframes popSuccess {
    0% { transform: scale(0.92); opacity: 0.6; }
    60% { transform: scale(1.03); opacity: 1; }
    100% { transform: scale(1); }
}

@keyframes riseSuccess {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
