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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    min-height: 100vh;
}

/* Container & Card */
.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.form-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 840px;
}

/* Typography */
.form-title {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 0.5rem;
    text-align: center;
    font-weight: 700;
}

.form-subtitle {
    font-size: 1.1rem;
    color: #666;
    text-align: center;
    margin-bottom: 2rem;
}

/* Progress Tracker */
.progress-tracker {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.step-label {
    font-size: 0.875rem;
    color: #64748b;
    text-align: center;
    transition: all 0.3s ease;
}

.progress-line {
    flex: 1;
    height: 2px;
    background: #e2e8f0;
    margin: 0 0.5rem;
    position: relative;
    top: -16px;
    transition: all 0.3s ease;
}

.progress-step.active .step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.progress-step.active .step-label {
    color: #667eea;
    font-weight: 500;
}

.progress-step.completed .step-number {
    background: #22c55e;
    color: white;
}

.progress-line.completed {
    background: #22c55e;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-input:hover {
    border-color: #cbd5e1;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input.error {
    border-color: #ef4444;
    background-color: #fee2e2;
}

.error-message {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: none;
}

.error-message.visible {
    display: block;
}

/* Consent Text */
.consent-text {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    max-height: 300px;
    overflow-y: auto;
}

.consent-text h3 {
    margin-bottom: 1rem;
    color: #333;
}

.language-toggle {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.language-toggle .btn {
    height: 36px;
    padding: 0 1rem;
}

.language-toggle .btn.active {
    background: #667eea;
    color: white;
}

.consent-content {
    font-size: 0.95rem;
    line-height: 1.6;
}

.consent-content.hidden {
    display: none;
}

.consent-content ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.consent-content li {
    margin-bottom: 0.5rem;
}

/* Signature Pad */
.signature-container {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.signature-pad {
    width: 100%;
    height: 200px;
    border-bottom: 2px solid #e2e8f0;
    background: white;
}

.signature-actions {
    padding: 0.5rem;
    background: #f8fafc;
    display: flex;
    justify-content: flex-end;
}

/* Upload Area */
.upload-area {
    border: 2px dashed #e2e8f0;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: #667eea;
    background: #f8fafc;
}

.upload-area.dragover {
    border-color: #667eea;
    background: #f0f7ff;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
}

.upload-placeholder svg {
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

.upload-preview {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
}

.upload-preview.hidden,
.upload-placeholder.hidden {
    display: none;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 0 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

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

.btn-primary:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

/* Form Footer */
.form-footer {
    margin-top: 2rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

.loading-overlay p {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 640px) {
    .container {
        padding: 1rem;
    }

    .form-card {
        padding: 1.5rem;
    }

    .form-title {
        font-size: 2rem;
    }

    .form-subtitle {
        font-size: 1rem;
    }

    .progress-tracker {
        padding: 0;
    }

    .step-label {
        font-size: 0.75rem;
    }

    .form-footer {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .language-toggle {
        flex-wrap: wrap;
    }

    .language-toggle .btn {
        flex: 1;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Modal Base Styles */
.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: 1000;
}

/* Error Modal Styles */
#error-modal .modal-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 90%;
    text-align: center;
}

#error-modal h3 {
    color: #dc3545;
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
}

#error-modal p {
    color: #343a40;
    margin: 0 0 1.5rem 0;
    font-size: 1rem;
    line-height: 1.5;
}

.modal-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.modal-btn:hover {
    background: #c82333;
}

@media (max-width: 576px) {
    #error-modal .modal-content {
        width: 95%;
        margin: 1rem;
        padding: 1.5rem;
    }
}

/* Resume Dialog Specific Styles */
#resumeDialog {
    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: var(--z-modal);
}

#resumeDialog .modal-content {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease-out;
    margin: 0 auto; /* Center horizontally */
}

#resumeDialog h3 {
    font-size: var(--font-size-xl);
    color: var(--gray-900);
    margin-bottom: 1rem;
}

#resumeDialog p {
    color: var(--gray-700);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

#resumeDialog .btn {
    min-width: 150px;
}

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

/* Logo */
.logo-container {
    text-align: center;
    margin-bottom: 1.5rem;
}

.nyoph-logo {
    height: 100px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

/* Admin Dashboard Styles */
.admin-container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.admin-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.admin-header .logo {
    height: 40px;
    margin-right: 20px;
}

.admin-header h1 {
    margin: 0;
    color: #333;
}

.status-filter {
    margin-bottom: 20px;
}

.status-filter select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* DataTable Customization */
.dataTables_wrapper {
    margin-top: 20px;
}

/* Status Badge Styles */
.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.new {
    background-color: #e3f2fd;
    color: #1976d2;
}

.status-badge.reviewed {
    background-color: #fff3e0;
    color: #f57c00;
}

.status-badge.approved {
    background-color: #e8f5e9;
    color: #388e3c;
}

/* Action Buttons */
.btn-action {
    padding: 4px 8px;
    margin-right: 5px;
    border: none;
    border-radius: 4px;
    background-color: #1976d2;
    color: white;
    cursor: pointer;
    font-size: 12px;
}

.btn-action:hover {
    background-color: #1565c0;
}

/* Status Select in Table */
.status-select {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .admin-container {
        padding: 10px;
    }
    
    .admin-header {
        flex-direction: column;
        text-align: center;
    }
    
    .admin-header .logo {
        margin-right: 0;
        margin-bottom: 10px;
    }
}