/* Design System & Custom Properties */
:root {
    --ueu-blue: #0073C2;
    --ueu-blue-rgb: 0, 115, 194;
    --ueu-orange: #E85B24;
    --ueu-orange-rgb: 232, 91, 36;
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --bg-light: #F8FAFC;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.6);
    --shadow-premium: 0 20px 40px -15px rgba(15, 23, 42, 0.12);
    --shadow-focus: 0 0 0 4px rgba(0, 115, 194, 0.15);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-light);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Animated Mesh Background */
.bg-gradient-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: radial-gradient(circle at 0% 0%, rgba(0, 115, 194, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 100% 100%, rgba(232, 91, 36, 0.08) 0%, transparent 50%);
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: moveShapes 25s infinite alternate ease-in-out;
}

.shape-1 {
    top: -10%;
    left: 20%;
    width: 400px;
    height: 400px;
    background: rgba(0, 115, 194, 0.2);
}

.shape-2 {
    bottom: -10%;
    right: 20%;
    width: 500px;
    height: 500px;
    background: rgba(232, 91, 36, 0.15);
    animation-delay: -5s;
}

.shape-3 {
    top: 40%;
    left: 50%;
    width: 350px;
    height: 350px;
    background: rgba(0, 115, 194, 0.1);
    animation-delay: -10s;
}

@keyframes moveShapes {
    0% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(50px, -50px) scale(1.1);
    }
    100% {
        transform: translate(-30px, 40px) scale(0.95);
    }
}

/* Main Container */
.app-container {
    width: 100%;
    max-width: 650px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    animation: fadeInApp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Header */
.app-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 16px;
}

.logo-wrapper {
    background: white;
    padding: 10px;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px -5px rgba(0, 115, 194, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    transition: var(--transition-smooth);
}

.logo-wrapper:hover {
    transform: scale(1.05);
}

.ueu-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.header-text h1 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--ueu-blue);
    line-height: 1.2;
    margin-bottom: 2px;
}

.header-text .subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Glass Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium);
    padding: 40px;
    position: relative;
    overflow: hidden;
}

/* Step Indicator */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.step-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 2;
    position: relative;
    cursor: default;
}

.dot-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    border: 2px solid #E2E8F0;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.dot-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.step-line {
    flex: 1;
    height: 3px;
    background: #E2E8F0;
    margin: 0 12px;
    margin-top: -24px; /* Align with dots horizontally */
    border-radius: 2px;
    position: relative;
    z-index: 1;
}

.step-line::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: var(--ueu-blue);
    transition: var(--transition-smooth);
}

/* Active and Completed States */
.step-dot.active .dot-number {
    background: var(--ueu-blue);
    border-color: var(--ueu-blue);
    color: white;
    box-shadow: 0 0 0 4px rgba(0, 115, 194, 0.15);
}

.step-dot.active .dot-label {
    color: var(--ueu-blue);
    font-weight: 700;
}

.step-dot.completed .dot-number {
    background: #E2F2FE;
    border-color: var(--ueu-blue);
    color: var(--ueu-blue);
}

.step-dot.completed .dot-label {
    color: var(--ueu-blue);
}

.step-line.completed::after {
    width: 100%;
}

/* Form Steps */
.form-step {
    display: none;
    animation: slideInStep 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-step.step-active {
    display: block;
}

@keyframes slideInStep {
    from {
        opacity: 0;
        transform: translateX(15px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.step-header {
    margin-bottom: 28px;
}

.step-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.step-header p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Step 1: Role Selection Cards */
.role-selection-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.role-option-card {
    cursor: pointer;
    display: block;
}

.role-option-card input[type="radio"] {
    display: none;
}

.role-card-content {
    background: white;
    border: 2px solid #E2E8F0;
    border-radius: var(--radius-md);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition-smooth);
}

.role-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--bg-light);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    flex-shrink: 0;
}

.role-icon svg {
    width: 24px;
    height: 24px;
}

.role-text h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
    transition: var(--transition-smooth);
}

.role-text p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Role Option Card States */
.role-option-card:hover .role-card-content {
    border-color: rgba(0, 115, 194, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(0, 115, 194, 0.05);
}

.role-option-card input[type="radio"]:checked + .role-card-content {
    border-color: var(--ueu-blue);
    background: rgba(0, 115, 194, 0.02);
    box-shadow: 0 10px 25px -10px rgba(0, 115, 194, 0.15);
}

.role-option-card input[type="radio"]:checked + .role-card-content .role-icon {
    background: var(--ueu-blue);
    color: white;
}

.role-option-card input[type="radio"]:checked + .role-card-content .role-text h3 {
    color: var(--ueu-blue);
}

/* Floating Input Label Style */
.input-group {
    margin-bottom: 24px;
    position: relative;
}

.floating-input-wrapper {
    position: relative;
    width: 100%;
}

.floating-input-wrapper input {
    width: 100%;
    padding: 18px 16px 8px;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 500;
    border: 2px solid #E2E8F0;
    border-radius: var(--radius-md);
    background: white;
    outline: none;
    transition: var(--transition-smooth);
}

.floating-input-wrapper label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    pointer-events: none;
    transition: var(--transition-smooth);
}

/* Floating Effects */
.floating-input-wrapper input:focus,
.floating-input-wrapper input:not(:placeholder-shown) {
    border-color: var(--ueu-blue);
    padding-top: 22px;
    padding-bottom: 4px;
}

.floating-input-wrapper input:focus + label,
.floating-input-wrapper input:not(:placeholder-shown) + label {
    top: 10px;
    transform: translateY(0);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--ueu-blue);
}

/* Input Helpers and Errors */
.input-helper {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 6px;
    padding-left: 4px;
}

.error-msg {
    color: #DC2626;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 6px;
    display: none;
    padding-left: 4px;
    animation: fadeInError 0.2s ease;
}

@keyframes fadeInError {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.input-group.has-error input {
    border-color: #DC2626 !important;
}

.input-group.has-error .error-msg {
    display: block;
}

.input-group.has-error label {
    color: #DC2626 !important;
}

/* Buttons and Navigation actions */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 32px;
}

.btn {
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition-smooth);
}

.btn-primary {
    background: var(--ueu-blue);
    color: white;
    box-shadow: 0 10px 20px -5px rgba(0, 115, 194, 0.2);
}

.btn-primary:hover:not(:disabled) {
    background: #005F9E;
    box-shadow: 0 10px 25px -5px rgba(0, 115, 194, 0.35);
    transform: translateY(-1px);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-secondary {
    background: white;
    border: 2px solid #E2E8F0;
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--bg-light);
    border-color: #CBD5E1;
}

.btn-success-action {
    background: var(--ueu-orange);
    color: white;
    box-shadow: 0 10px 20px -5px rgba(232, 91, 36, 0.25);
}

.btn-success-action:hover {
    background: #D14510;
    box-shadow: 0 10px 25px -5px rgba(232, 91, 36, 0.4);
    transform: translateY(-1px);
}

/* Icons */
.icon-left, .icon-right {
    width: 18px;
    height: 18px;
}

/* STEP 4: Success View */
.success-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 32px;
}

.success-checkmark {
    width: 64px;
    height: 64px;
    background: #D1FAE5;
    color: #059669;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

.success-checkmark svg {
    width: 32px;
    height: 32px;
}

/* Registration Proof Card */
.proof-card-wrapper {
    margin-bottom: 32px;
}

.proof-card {
    background: white;
    border: 2px solid #E2E8F0;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.05);
}

.proof-card-header {
    background: linear-gradient(135deg, var(--ueu-blue) 0%, #005F9E 100%);
    color: white;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.proof-logo {
    width: 50px;
    height: 50px;
    background: white;
    padding: 6px;
    border-radius: 10px;
    object-fit: contain;
}

.proof-header-title h4 {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.proof-header-title p {
    font-size: 0.75rem;
    opacity: 0.9;
}

.proof-card-body {
    padding: 24px;
}

.proof-code-box {
    background: var(--bg-light);
    border: 1.5px dashed #CBD5E1;
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
    margin-bottom: 24px;
}

.proof-code-box .label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 4px;
}

.proof-code-box h3 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--ueu-orange);
    letter-spacing: 2px;
}

.proof-details {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
    border-bottom: 1px solid #F1F5F9;
    padding-bottom: 20px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.detail-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-value {
    color: var(--text-primary);
    font-weight: 700;
    text-align: right;
}

.proof-footer {
    text-align: center;
}

.badge-status {
    display: inline-block;
    background: #DEF7EC;
    color: #03543F;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 6px 16px;
    border-radius: 100px;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.proof-footer .disclaimer {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.success-actions {
    justify-content: space-between;
}

.success-actions .btn {
    flex: 1;
}

/* Footer style */
.app-footer {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 10px;
}

/* RESPONSIVE DESIGN */
@media (max-width: 640px) {
    .glass-card {
        padding: 24px 20px;
        border-radius: var(--radius-md);
    }
    
    .step-indicator {
        margin-bottom: 30px;
    }
    
    .dot-label {
        display: none; /* Hide labels on mobile to save space */
    }
    
    .step-line {
        margin-top: -18px;
    }
    
    .role-card-content {
        padding: 16px;
        gap: 14px;
    }
    
    .success-actions {
        flex-direction: column-reverse;
        gap: 12px;
    }
    
    .success-actions .btn {
        width: 100%;
    }
}

/* PRINT MEDIA STYLING */
@media print {
    body * {
        visibility: hidden;
    }
    
    #proofCard, #proofCard * {
        visibility: visible;
    }
    
    #proofCard {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        max-width: 500px;
        border: none;
        box-shadow: none;
    }
    
    .proof-card-header {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        background: var(--ueu-blue) !important;
        color: white !important;
    }
    
    .badge-status {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        background: #DEF7EC !important;
        color: #03543F !important;
    }
}
