/* Student Registration Page Styles */

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #36B37E;
    color: white;
    padding: 8px 16px;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #36B37E;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Header */
.header {
    background: linear-gradient(135deg, #36B37E 0%, #00875A 100%);
    padding: 16px 24px;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header .logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header .logo-icon {
    flex-shrink: 0;
}

.header .logo h1 {
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.back-btn svg {
    width: 18px;
    height: 18px;
}

/* Main Content */
.main-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 32px 24px;
}

.page-header {
    text-align: center;
    margin-bottom: 32px;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: #172B4D;
    margin-bottom: 8px;
}

.page-subtitle {
    font-size: 16px;
    color: #6B778C;
    line-height: 1.5;
}

/* Step Indicator */
.step-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    position: relative;
}

.step::after {
    content: '';
    position: absolute;
    right: -20px;
    top: 22px;
    width: 32px;
    height: 2px;
    background: #DFE1E6;
}

.step:last-child::after {
    display: none;
}

.step.completed::after {
    background: #36B37E;
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: #36B37E;
    color: white;
}

.step.completed .step-number {
    background: #36B37E;
    color: white;
}

.step.pending .step-number {
    background: #F4F5F7;
    color: #6B778C;
    border: 2px solid #DFE1E6;
}

.step span {
    font-size: 12px;
    color: #6B778C;
    font-weight: 500;
    white-space: nowrap;
}

.step.active span {
    color: #36B37E;
    font-weight: 600;
}

.step-label-mobile {
    display: none;
    text-align: center;
    font-size: 14px;
    color: #6B778C;
    margin-bottom: 24px;
    font-weight: 500;
}

/* Error Container */
.error-container {
    display: none;
    background: #FFEBE6;
    color: #DE350B;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 14px;
    border: 1px solid #FFBDAD;
}

/* Sections */
.section {
    display: none;
}

.section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Form Card */
.form-card {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: #172B4D;
    margin-bottom: 8px;
    text-align: center;
}

.section-subtitle {
    font-size: 14px;
    color: #6B778C;
    margin-bottom: 24px;
    text-align: center;
}

/* Upload Area */
.upload-area {
    border: 2px dashed #DFE1E6;
    border-radius: 12px;
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #FAFBFC;
}

.upload-area:hover {
    border-color: #36B37E;
    background: rgba(54, 179, 126, 0.05);
}

.upload-area.dragover {
    border-color: #36B37E;
    background: rgba(54, 179, 126, 0.1);
}

.upload-icon {
    margin-bottom: 16px;
}

.upload-icon svg {
    width: 48px;
    height: 48px;
    color: #36B37E;
}

.upload-text {
    font-size: 16px;
    font-weight: 500;
    color: #172B4D;
    margin-bottom: 8px;
}

.upload-subtext {
    font-size: 14px;
    color: #6B778C;
}

.file-input {
    display: none;
}

/* Preview Container */
.preview-container {
    margin-top: 24px;
    text-align: center;
}

.preview-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.file-info {
    margin-top: 12px;
    font-size: 14px;
    color: #6B778C;
}

/* Options Grid */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.option-card {
    background: #FAFBFC;
    border: 2px solid #DFE1E6;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option-card:hover {
    border-color: #36B37E;
    background: rgba(54, 179, 126, 0.05);
}

.option-card.selected {
    border-color: #36B37E;
    background: rgba(54, 179, 126, 0.1);
}

.option-icon {
    margin-bottom: 12px;
}

.option-icon svg {
    width: 40px;
    height: 40px;
    color: #36B37E;
}

.option-title {
    font-size: 16px;
    font-weight: 600;
    color: #172B4D;
    margin-bottom: 4px;
}

.option-description {
    font-size: 13px;
    color: #6B778C;
}

/* Programs Grid */
.programs-container {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 24px;
}

.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.program-card {
    background: #FAFBFC;
    border: 2px solid #DFE1E6;
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.program-card:hover {
    border-color: #36B37E;
    background: rgba(54, 179, 126, 0.05);
}

.program-card.selected {
    border-color: #36B37E;
    background: rgba(54, 179, 126, 0.1);
}

.program-title {
    font-size: 14px;
    font-weight: 500;
    color: #172B4D;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    font-size: 14px;
    font-weight: 500;
    color: #172B4D;
    margin-bottom: 8px;
}

.required-mark {
    color: #DE350B;
}

.form-input {
    padding: 12px 16px;
    border: 2px solid #DFE1E6;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
    background: #FAFBFC;
}

.form-input:focus {
    outline: none;
    border-color: #36B37E;
    background: white;
    box-shadow: 0 0 0 3px rgba(54, 179, 126, 0.1);
}

.form-input.filled {
    border-color: #36B37E;
    background: rgba(54, 179, 126, 0.05);
}

.form-input.error {
    border-color: #DE350B;
    background: #FFEBE6;
}

.field-status {
    font-size: 12px;
    color: #6B778C;
    margin-top: 4px;
}

.field-status.extracted {
    color: #36B37E;
}

.field-status.valid {
    color: #36B37E;
}

.field-status.manual {
    color: #00B8D9;
}

.field-status.required {
    color: #DE350B;
}

/* Button Group */
.button-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 140px;
}

.btn-success {
    background: linear-gradient(135deg, #36B37E 0%, #00875A 100%);
    color: white;
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(54, 179, 126, 0.3);
}

.btn-success:disabled {
    background: #A5ADBA;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: #F4F5F7;
    color: #42526E;
    border: 1px solid #DFE1E6;
}

.btn-secondary:hover {
    background: #EBECF0;
    border-color: #C1C7D0;
}

/* Status Message */
.status-message {
    display: none;
    padding: 16px;
    border-radius: 8px;
    margin-top: 24px;
    font-size: 14px;
    text-align: center;
}

.status-message.info {
    background: #DEEBFF;
    color: #0052CC;
    border: 1px solid #B3D4FF;
}

.status-message.success {
    background: #E3FCEF;
    color: #006644;
    border: 1px solid #ABF5D1;
}

.status-message.error {
    background: #FFEBE6;
    color: #DE350B;
    border: 1px solid #FFBDAD;
}

/* Progress Bar */
.progress-bar {
    display: none;
    height: 4px;
    background: #DFE1E6;
    border-radius: 2px;
    margin-top: 16px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #36B37E, #00875A);
    transition: width 0.3s ease;
    border-radius: 2px;
}

/* Magnify Modal */
.magnify-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.magnify-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

/* Success Modal */
.success-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.success-modal-content {
    background: white;
    border-radius: 16px;
    padding: 48px 32px;
    text-align: center;
    max-width: 400px;
    width: 100%;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #36B37E 0%, #00875A 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.success-icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

.success-modal h2 {
    font-size: 24px;
    font-weight: 600;
    color: #172B4D;
    margin-bottom: 12px;
}

.success-modal p {
    font-size: 16px;
    color: #6B778C;
    margin-bottom: 24px;
    line-height: 1.5;
}

.success-actions {
    display: flex;
    justify-content: center;
}

.success-actions .btn {
    min-width: 180px;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header .logo h1 {
        font-size: 14px;
    }

    .back-btn span {
        display: none;
    }

    .step-indicator {
        display: none;
    }

    .step-label-mobile {
        display: block;
    }

    .main-content {
        padding: 16px;
    }

    .page-title {
        font-size: 22px;
    }

    .page-subtitle {
        font-size: 14px;
    }

    .form-card {
        padding: 24px 16px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }

    .programs-grid {
        grid-template-columns: 1fr;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 12px 16px;
    }

    .upload-area {
        padding: 32px 16px;
    }

    .upload-icon svg {
        width: 40px;
        height: 40px;
    }

    .success-modal-content {
        padding: 32px 24px;
    }
}
