/* Authentication Pages Styles */

.auth-container {
    background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 50%, #F5F7FF 100%);
    padding-bottom: var(--space-12);
}

.auth-hero {
    min-height: 90vh;
    background: transparent !important; /* Override .hero-split background */
    padding: 2rem;
    display: flex;
    align-items: center;
}

.auth-container .participating-universities {
    margin-top: 0;
    border-top: none;
    padding-top: 0;
}

.auth-content {
    align-items: center;
    gap: 4rem;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.auth-form-container {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
    padding: 2.5rem;
    width: 100%;
    max-width: 480px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(10px);
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.auth-form h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 2rem;
    text-align: center;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.form-group {
    margin-bottom: 1.75rem;
    text-align: left;
}

.form-group:last-of-type {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-align: left;
    letter-spacing: -0.01em;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    min-height: 52px;
    color: #1f2937;
    line-height: 1.5;
    font-weight: 400;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: #fefefe;
    transform: translateY(-1px);
}

.form-group input:valid:not(:placeholder-shown):not([type="file"]) {
    border-color: #10b981;
    background: #f0fdf4;
}

/* Date input styling - only show green when has value */
.form-input[type="date"] {
    border-color: #e5e7eb !important;
    background: #ffffff !important;
}

.form-input[type="date"].has-value {
    border-color: #10b981 !important;
    background: #f0fdf4 !important;
}

.form-input[type="date"]:focus {
    border-color: #3b82f6 !important;
    background: #fefefe !important;
}

.form-group input:invalid:not(:focus):not(:placeholder-shown):not([type="file"]),
.form-group select:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #CBD5E1;
}

.form-hint {
    display: block;
    font-size: 0.825rem;
    font-weight: 400;
    color: #6b7280;
    margin-top: 0.375rem;
    line-height: 1.4;
    letter-spacing: 0.01em;
}

.error-message {
    display: flex;
    align-items: center;
    color: #ef4444;
    font-size: 0.825rem;
    font-weight: 500;
    margin-top: 0.375rem;
    min-height: 1.2rem;
    opacity: 0;
    transform: translateY(-4px);
    transition: all 0.2s ease;
}

.error-message:not(:empty) {
    opacity: 1;
    transform: translateY(0);
}

.error-message:empty {
    display: none;
}

.error-message::before {
    content: '\26A0'; /* Unicode warning sign */
    font-size: 1.1em;
    margin-right: 0.4em;
    display: inline-block;
}

.auth-submit-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2.25rem 0 1.5rem 0;
}

.auth-submit {
    width: 100%;
    max-width: 100%;
    padding: 1rem 2rem;
    position: relative;
    overflow: hidden;
    font-size: 1rem;
    font-weight: 600;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    color: #64748b;
    border-radius: 12px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    cursor: not-allowed;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: -0.01em;
    min-height: 52px;
}

.auth-submit:disabled {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.7;
}

.auth-submit:not(:disabled) {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: #3b82f6;
    color: white;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.auth-submit:not(:disabled):hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
}

.auth-submit:not(:disabled):active {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    border-color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.button-spinner {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.auth-submit.loading .button-text {
    opacity: 0;
}

.auth-submit.loading .button-spinner {
    display: block;
}

.button-text {
    display: block;
    width: 100%;
    text-align: center;
}

.auth-link {
    text-align: center;
    margin-top: 1.75rem;
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.5;
    display: block;
    white-space: nowrap;
    letter-spacing: -0.01em;
}

.auth-link a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.15s ease;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    margin: -0.25rem -0.5rem;
}

.auth-link a:hover {
    color: #2563eb;
    background: rgba(59, 130, 246, 0.05);
    text-decoration: none;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
    animation: slideIn 0.3s ease;
}

.notification-content {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-left: 4px solid var(--secondary-color);
}

.notification.success .notification-content {
    border-left-color: #27ae60;
}

.notification.error .notification-content {
    border-left-color: #e74c3c;
}

.notification-message {
    flex: 1;
    margin-right: 1rem;
    color: var(--text-color);
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-close:hover {
    color: #666;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-hero {
        padding: 1.5rem 1rem;
        min-height: calc(100vh - 80px); /* Account for navigation */
        align-items: center;
        margin-top: 80px; /* Push down for navigation */
    }
    
    .auth-content {
        flex-direction: column;
        gap: var(--space-8);
        align-items: center;
        text-align: center;
    }
    
    .hero-left-col {
        text-align: center;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .hero-right-col {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .auth-form-container {
        padding: 2rem;
        max-width: 100%;
        margin: 0;
        box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.08);
        border-radius: 12px;
    }
    
    .form-group {
        margin-bottom: 1.5rem;
    }
    
    .auth-submit-container {
        margin: 2rem 0 1.25rem 0;
    }
    
    .register-page .auth-hero {
        padding: 1rem;
        min-height: calc(100vh - 80px); /* Account for navigation */
        align-items: flex-start;
        margin-top: 80px; /* Push down for navigation */
    }
    
    .register-page .auth-content {
        align-items: center;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    
    .headline h1 {
        font-size: clamp(1.75rem, 6vw, 2.25rem);
        text-align: center;
        margin-bottom: var(--space-4);
    }
    
    .subheadline {
        font-size: var(--text-base);
        text-align: center;
        margin-bottom: var(--space-6);
        max-width: 100%;
    }
    
    .auth-features {
        margin-top: var(--space-6);
        display: flex;
        flex-direction: column;
        gap: var(--space-3);
        align-items: center;
    }
    
    .feature-item {
        justify-content: center;
        text-align: center;
        font-size: var(--text-sm);
    }
    
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Login page features */
.auth-features {
    margin-top: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.feature-item svg {
    color: var(--primary);
    flex-shrink: 0;
}

/* Form options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
    gap: var(--space-4);
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    position: relative;
}

.checkbox-container input[type="checkbox"] {
    width: auto;
    margin: 0;
    opacity: 0;
    position: absolute;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    position: relative;
    transition: all 0.2s ease;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-container input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-container input[type="checkbox"]:focus {
    outline: none;
    box-shadow: var(--shadow-focus);
}

.checkbox-container,
.forgot-password,
.auth-link a {
    min-height: 44px;
    display: flex;
    align-items: center;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

.form-group input,
.form-group select,
.auth-submit {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Input focus ring */
.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--shadow-focus);
}

/* Improved visual hierarchy */
.auth-features {
    margin-top: var(--space-8);
}

.feature-item {
    padding: var(--space-2) 0;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.feature-item:hover {
    background: rgba(0, 122, 255, 0.02);
    padding-left: var(--space-2);
}

/* Password strength indicator */
.password-strength {
    margin-top: 0.5rem;
    height: 4px;
    background: #e1e5e9;
    border-radius: 2px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: 2px;
}

.password-strength-bar.weak {
    background: #e74c3c;
    width: 33%;
}

.password-strength-bar.medium {
    background: #f39c12;
    width: 66%;
}

.password-strength-bar.strong {
    background: #27ae60;
    width: 100%;
}

/* ============ SUBMIT PROJECT MAIN ============ */

.submit-main {
    min-height: calc(100vh - 72px);
    background: var(--background);
    position: relative;
    margin-top: 0;
    padding-top: 0;
}

/* ============ FULL-WIDTH HEADER BACKGROUND (Dashboard Consistency) ============ */

.submit-hero {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
    padding: 4rem 0 3rem;
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
    min-height: 40vh;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-light);
    /* Full viewport width for strong horizontal contrast */
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-top: 0;
}

.submit-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(0, 122, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.submit-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, 
        rgba(0, 0, 0, 0) 0%, 
        rgba(0, 0, 0, 0.02) 100%);
    pointer-events: none;
}

.submit-hero-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 var(--space-6);
    position: relative;
    z-index: 1;
    text-align: center;
    width: 100%;
}

.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.breadcrumb-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: var(--font-medium);
    transition: color var(--transition-fast);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
}

.breadcrumb-link:hover {
    color: var(--primary);
    background: rgba(0, 122, 255, 0.06);
}

.breadcrumb span {
    color: var(--text-tertiary);
    font-weight: var(--font-normal);
}

.breadcrumb svg {
    color: var(--text-tertiary);
}

.hero-text {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

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

.hero-title {
    font-size: clamp(2.5rem, 5.5vw, 3.25rem);
    font-weight: var(--font-bold);
    line-height: var(--leading-tight);
    margin-bottom: var(--space-4);
    letter-spacing: -0.025em;
    color: var(--text-primary);
    position: relative;
}

.hero-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 2px;
    opacity: 0;
    animation: slideInFade 0.8s ease-out 0.6s both;
}

@keyframes slideInFade {
    from {
        opacity: 0;
        width: 0;
    }
    to {
        opacity: 1;
        width: 50px;
    }
}

.hero-subtitle {
    font-size: clamp(1.0625rem, 2.5vw, 1.1875rem);
    line-height: var(--leading-relaxed);
    color: var(--text-secondary);
    max-width: 580px;
    margin: 0 auto var(--space-5);
    font-weight: var(--font-normal);
    position: relative;
}

/* Professional progress indicator for form flow */
.hero-progress-hint {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
    animation: fadeInUp 0.8s ease-out 0.8s both;
    transition: all var(--transition-fast);
}

.hero-progress-hint:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.hero-progress-hint svg {
    color: var(--primary);
}

.hero-progress-hint span {
    color: var(--text-primary);
}

/* ============ OPTIMIZED FORM CONTAINER ============ */

.submit-container {
    max-width: 950px;
    margin: 0 auto;
    padding: var(--space-6) var(--space-6) var(--space-8);
    /* Reduced top padding for better integration */
}

/* ============ ENHANCED FORM SECTION ============ */

.form-section {
    background: white;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    overflow: hidden;
    position: relative;
    /* Create visual connection to header */
    margin-top: -1rem;
    transform: translateY(0);
    transition: all var(--transition-normal);
}

.form-section:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-2px);
}

.project-form {
    padding: var(--space-8) var(--space-8) var(--space-6);
}

/* ============ ENHANCED FORM CONTROLS ============ */

.form-label {
    display: block;
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-2);
    font-size: var(--text-sm);
}

.form-label.required::after {
    content: ' *';
    color: var(--error);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    font-size: var(--text-base);
    font-family: inherit;
    transition: all var(--transition-fast);
    background: var(--background);
    color: var(--text-primary);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--shadow-focus);
    background: white;
}

.form-input.error,
.form-textarea.error,
.form-select.error {
    border-color: var(--error);
    background: rgba(255, 59, 48, 0.05);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: var(--leading-relaxed);
}

.form-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right var(--space-3) center;
    background-size: 16px;
    padding-right: var(--space-10);
}

.character-count {
    text-align: right;
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    margin-top: var(--space-2);
    font-weight: var(--font-medium);
}

.field-error {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--error);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    margin-top: var(--space-2);
    animation: errorSlideIn 0.2s ease;
}

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

.field-error svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

/* ============ FORM PROGRESS ENHANCEMENTS ============ */

.form-progress {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-8);
    padding: var(--space-6) var(--space-4);
    background: var(--background-secondary);
    border-radius: var(--radius-xl);
    position: relative;
    max-width: 100%;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    position: relative;
    flex: 1;
    max-width: 250px;
    min-width: 160px;
}

.progress-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 65%;
    right: -35%;
    height: 2px;
    background: var(--border);
    z-index: 1;
    transition: all var(--transition-fast);
}

.progress-step.completed:not(:last-child)::after,
.progress-step.active:not(:last-child)::after {
    background: var(--primary);
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--border-light);
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-semibold);
    position: relative;
    z-index: 2;
    transition: all var(--transition-fast);
    border: 2px solid transparent;
}

.progress-step.active .step-number {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.2);
}

.progress-step.completed .step-number {
    background: var(--success);
    color: transparent;
    border-color: var(--success);
}

.progress-step.completed .step-number::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
}

.step-label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    text-align: center;
    font-weight: var(--font-medium);
    transition: all var(--transition-fast);
    line-height: 1.2;
    word-wrap: break-word;
    hyphens: auto;
    padding: 0 var(--space-1);
    max-width: 100%;
    white-space: normal;
    overflow-wrap: break-word;
}

.progress-step.active .step-label {
    color: var(--primary);
    font-weight: var(--font-semibold);
}

.progress-step.completed .step-label {
    color: var(--success);
    font-weight: var(--font-semibold);
}

/* ============ FORM STEPS ============ */

.form-step {
    display: none;
    animation: stepFadeIn 0.3s ease;
}

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

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

.step-header {
    margin-bottom: var(--space-8);
    text-align: center;
    padding-bottom: var(--space-6);
    border-bottom: 1px solid var(--border-light);
}

.step-title {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-3);
    letter-spacing: -0.025em;
}

.step-description {
    color: var(--text-secondary);
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: var(--space-6);
}

.form-hint {
    display: block;
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-top: var(--space-2);
    line-height: var(--leading-normal);
}

/* ============ ENHANCED DOMAIN SELECTION - PILLS GALLERY ============ */

.domains-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px 0;
    margin-top: var(--space-4);
}

.domain-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    background: white;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
    border: none;
    outline: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), inset 0 0 0 1px rgba(0, 0, 0, 0.1);
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Unselected hover state */
.domain-pill:not(.selected):hover {
    border-color: #007AFF;
    background: rgba(0, 122, 255, 0.05);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.15), inset 0 0 0 1px #007AFF;
}

/* Selected state */
.domain-pill.selected {
    background: #007AFF;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.domain-pill.selected:hover {
    background: #0056CC;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Disabled state (when 3 selected) */
.domain-pill:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.domain-pill:disabled:hover {
    transform: none;
    background: white;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

/* Selection status */
.selection-status {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-top: var(--space-3);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    font-weight: var(--font-medium);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
}

#selectedCount {
    color: var(--primary);
    font-weight: var(--font-semibold);
}

/* Animation for pill selection */
@keyframes pillSelect {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1) translateY(-1px);
    }
}

.domain-pill.selected {
    animation: pillSelect 0.2s ease-out;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .domains-gallery {
        gap: 6px;
        padding: 12px 0;
    }
    
    .domain-pill {
        font-size: 13px;
        padding: 6px 12px;
        min-height: 40px;
    }
}

@keyframes chipIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.remove-chip {
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all var(--transition-fast);
}

.remove-chip:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

/* ============ NO DOMAINS MESSAGE ============ */

.no-domains-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--space-8);
    color: var(--text-tertiary);
}

.no-domains-message p {
    font-size: var(--text-base);
    margin: 0;
    font-style: italic;
}

/* ============ CUSTOM UNIVERSITY INPUT ============ */

#customUniversityGroup {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        max-height: 200px;
        transform: translateY(0);
    }
}

/* ============ FORM ACTIONS ============ */

.form-actions {
    margin-top: var(--space-8);
    padding-top: var(--space-6);
    border-top: 1px solid var(--border-light);
}

.action-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-4);
}

.action-group {
    display: flex;
    gap: var(--space-3);
    align-items: center;
}
/* 44x44 */
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    border: 2px solid var(--border);
    background: white;
    color: var(--text-primary);
    border-radius: var(--radius-lg);
    font-weight: var(--font-medium);
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
    font-size: var(--text-base);
/*    width: 44px;
    height: 44px;
    overflow: hidden; */
}

.btn-secondary:hover {
    border-color: var(--text-secondary);
    background: var(--background-secondary);
    transform: translateY(-1px);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    border: 2px solid var(--primary);
    background: white;
    color: var(--primary);
    border-radius: var(--radius-lg);
    font-weight: var(--font-medium);
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
    font-size: var(--text-base);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline:disabled,
.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ============ SUCCESS MODAL ENHANCEMENTS ============ */

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: var(--space-4);
    opacity: 0;
    transition: all var(--transition-normal);
}

.modal.modal-active {
    opacity: 1;
}

.success-modal {
    background: white;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    max-width: 500px;
    width: 100%;
    text-align: center;
    transform: scale(0.9);
    transition: all var(--transition-normal);
}

.modal.modal-active .success-modal {
    transform: scale(1);
}

.success-modal .modal-header {
    padding: var(--space-8) var(--space-6) var(--space-4);
    border-bottom: none;
}

.success-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--success) 0%, #30D158 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin: 0 auto var(--space-4);
    animation: successBounce 0.6s ease;
}

@keyframes successBounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.success-modal h3 {
    color: var(--text-primary);
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    margin: 0;
    letter-spacing: -0.025em;
}

.success-modal .modal-body {
    padding: var(--space-4) var(--space-6) var(--space-8);
}

.success-modal p {
    color: var(--text-secondary);
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-6);
}

.modal-actions {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
    flex-wrap: wrap;
}

/* ============ SPINNER COMPONENT ============ */

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============ RESPONSIVE DESIGN ============ */

@media (max-width: 768px) {
    .submit-hero {
        padding: 3.5rem 0 2.5rem;
        min-height: 35vh;
    }

    .submit-hero-content {
        padding: 0 var(--space-4);
        max-width: 100%;
    }

    .hero-title {
        font-size: clamp(2rem, 6vw, 2.5rem);
        margin-bottom: var(--space-3);
    }

    .hero-title::after {
        width: 40px;
        height: 2px;
        bottom: -6px;
    }

    .hero-subtitle {
        font-size: clamp(0.9375rem, 3.5vw, 1.0625rem);
        margin-bottom: var(--space-4);
        max-width: 90%;
    }

    .breadcrumb {
        margin-bottom: var(--space-4);
    }

    .hero-progress-hint {
        font-size: var(--text-xs);
        padding: var(--space-1) var(--space-3);
    }

    .submit-container {
        padding: var(--space-4) var(--space-4) var(--space-6);
        max-width: 95%;
    }

    .form-section {
        margin-top: -0.5rem;
        border-radius: var(--radius-xl);
    }

    .domains-gallery {
        justify-content: center;
    }

    .breadcrumb {
        font-size: 0.8rem;
    }

    .form-progress {
        flex-direction: column;
        gap: var(--space-4);
        padding: var(--space-4);
    }

    .progress-step {
        flex-direction: row;
        max-width: none;
        justify-content: flex-start;
        gap: var(--space-3);
        align-items: center;
    }

    .progress-step:not(:last-child)::after {
        display: none;
    }

    .progress-step .step-label {
        text-align: left;
        flex: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
    }

    .progress-step .step-number {
        flex-shrink: 0;
    }

    .action-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .action-group {
        justify-content: center;
        flex-wrap: wrap;
    }

    .feature-text {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .submit-hero {
        padding: 3rem 0 2rem;
        min-height: 30vh;
    }

    .submit-hero-content {
        padding: 0 var(--space-3);
    }

    .hero-title {
        font-size: clamp(1.75rem, 7vw, 2rem);
        margin-bottom: var(--space-2);
    }

    .hero-title::after {
        width: 30px;
        height: 2px;
        bottom: -4px;
    }

    .hero-subtitle {
        font-size: clamp(0.875rem, 4vw, 0.9375rem);
        margin-bottom: var(--space-3);
        max-width: 95%;
    }

    .breadcrumb {
        flex-direction: column;
        gap: var(--space-1);
        text-align: center;
        margin-bottom: var(--space-3);
    }

    .breadcrumb svg {
        display: none;
    }

    .hero-progress-hint {
        font-size: 11px;
        padding: 6px var(--space-2);
        gap: 4px;
    }

    .hero-progress-hint svg {
        width: 12px;
        height: 12px;
    }

    .submit-container {
        padding: var(--space-3) var(--space-3) var(--space-5);
        max-width: 100%;
    }

    .form-section {
        margin-top: -0.25rem;
        border-radius: var(--radius-lg);
    }

    .project-form {
        padding: var(--space-5) var(--space-4) var(--space-4);
    }

    .action-group {
        flex-direction: column;
    }

    .progress-step .step-label {
        font-size: var(--text-xs);
        max-width: 120px;
    }
}

/* Feature text styles for both login and register pages */
.feature-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.feature-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.15em;
    color: var(--text-primary);
}

.feature-desc {
    font-weight: 400;
    font-size: 0.97rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.auth-form.was-validated .form-group input:invalid:not(:focus):not([type="file"]),
.auth-form.was-validated .form-group select:invalid:not(:focus) {
    border-color: #ef4444;
}

/* Login page optimizations */
#loginForm .form-group {
    margin-bottom: 1.5rem;
}

#loginForm .auth-submit-container {
    margin: 1.75rem 0 1.25rem 0;
}

#loginForm .auth-link:first-of-type {
    margin-top: 1.5rem;
}

/* Register page optimizations */
#registerForm .form-group {
    margin-bottom: 1.5rem;
}

#registerForm .form-group:last-of-type {
    margin-bottom: 1.25rem;
}

#registerForm .auth-submit-container {
    margin: 2rem 0 1.25rem 0;
}

#registerForm .auth-link {
    margin-top: 1.5rem;
}

/* Adjust register form container for better proportions */
#registerForm .auth-form-container {
    max-width: 460px;
}

/* Tighter spacing for form hint in register */
#registerForm .form-hint {
    margin-top: 0.25rem;
}

/* Registration page specific adjustments for longer forms */
.register-page .auth-hero {
    min-height: calc(100vh - 80px); /* Account for navigation */
    padding: 1.5rem 2rem;
    margin-top: 80px; /* Push down for navigation */
}

/* Better content distribution for register */
.register-page .auth-content {
    align-items: flex-start;
    min-height: calc(100vh - 80px - 3rem); /* Account for navigation and padding */
    justify-content: center;
}

@media (min-height: 800px) {
    .register-page .auth-content {
        align-items: center;
    }
}

@media (max-width: 768px) {
  .feature-item {
    text-align: left;
  }
}