* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    padding: 30px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

.logo-left, .logo-right {
    flex: 0 0 auto;
}

.header-logo {
    max-width: 120px;
    max-height: 80px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.header-text {
    flex: 1;
    text-align: center;
    padding: 0 20px;
}

.header-text h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header-text p {
    font-size: 1.2em;
    opacity: 0.9;
}

.form-content {
    padding: 40px;
}

.section {
    margin-bottom: 40px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 5px solid #3498db;
}

.section h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.8em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section h2::before {
    content: '';
    width: 30px;
    height: 3px;
    background: #3498db;
    border-radius: 2px;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 200px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 600;
    font-size: 1.1em;
}

.required {
    color: #e74c3c;
}

.photo-upload-container {
    position: relative;
    margin-bottom: 10px;
}

.photo-upload-container input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

.photo-preview {
    width: 150px;
    height: 200px;
    border: 2px dashed #3498db;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.photo-preview:hover {
    border-color: #2980b9;
    background: #e8f4fd;
}

.photo-placeholder {
    text-align: center;
    color: #7f8c8d;
}

.photo-placeholder span {
    font-size: 3em;
    display: block;
    margin-bottom: 10px;
}

.photo-placeholder p {
    font-size: 0.9em;
    margin: 0;
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.photo-preview.has-image .photo-placeholder {
    display: none;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: white;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    transform: translateY(-2px);
}

.error {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1) !important;
}

.error-message {
    color: #e74c3c;
    font-size: 0.9em;
    margin-top: 5px;
}

/* Validation Hints Styles */
.validation-hints {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #f39c12;
    border-radius: 10px;
    margin-bottom: 30px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.2);
}

.hints-header h3 {
    color: #d68910;
    margin-bottom: 15px;
    font-size: 1.3em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hints-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hints-content li {
    background: rgba(255, 255, 255, 0.7);
    padding: 8px 12px;
    margin-bottom: 8px;
    border-radius: 6px;
    border-left: 4px solid #f39c12;
    font-weight: 500;
    color: #2c3e50;
}

.hints-content li:last-child {
    margin-bottom: 0;
}

.hints-footer {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(243, 156, 18, 0.3);
}

.hints-footer p {
    color: #7f8c8d;
    font-size: 0.9em;
    margin: 0;
}

.hints-footer .required {
    color: #e74c3c;
    font-weight: bold;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.fee-info {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%);
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #27ae60;
    margin-bottom: 20px;
}

.fee-info h3 {
    color: #27ae60;
    margin-bottom: 10px;
}

.table-container {
    overflow-x: auto;
    margin-bottom: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

th {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    font-weight: 600;
}

.add-row-btn {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.add-row-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(39, 174, 96, 0.3);
}

.review-btn {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    display: block;
    margin: 30px auto 0;
    transition: all 0.3s ease;
}

.review-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(243, 156, 18, 0.4);
}

.submit-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    display: block;
    margin: 30px auto 0;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(231, 76, 60, 0.4);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
}

/* Declaration Section */
.declaration-content {
    background-color: #f8f9fa;
    padding: 20px;
    border-left: 4px solid #007bff;
    margin: 15px 0;
}

.declaration-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

/* Check List Section */
.checklist-content {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin: 15px 0;
}

.checklist-content .checkbox-group {
    margin: 10px 0;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.checklist-content .checkbox-group:last-child {
    border-bottom: none;
}

.checklist-content label {
    font-weight: 500;
}

/* Signature Section */
.signature-section {
    margin: 20px 0;
}

.signature-container {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    background: #f9f9f9;
}

.signature-controls {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn-secondary:hover {
    background: #5a6268;
}

#signatureCanvas {
    border: 2px solid #ccc;
    border-radius: 4px;
    background: white;
    cursor: crosshair;
    display: block;
    margin: 0 auto;
}

.signature-line {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.signature-label {
    font-weight: bold;
    margin-right: 15px;
    min-width: 120px;
}

.signature-space {
    flex: 1;
    height: 2px;
    background-color: #000;
    margin-left: 10px;
}

/* Progress Bar */
.progress-bar {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.progress-fill {
    height: 8px;
    background: linear-gradient(90deg, #e74c3c 0%, #f39c12 50%, #27ae60 100%);
    border-radius: 4px;
    transition: width 0.3s ease, background-color 0.3s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    margin-top: 10px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}



/* Enhanced Form Styling */
.form-group {
    position: relative;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    transition: color 0.3s ease;
}

.form-group input:focus + label,
.form-group select:focus + label,
.form-group textarea:focus + label {
    color: #667eea;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #fff;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

/* Enhanced Buttons */
.add-row-btn,
.review-btn,
.submit-btn,
.nav-btn,
.pdf-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.add-row-btn::before,
.review-btn::before,
.submit-btn::before,
.nav-btn::before,
.pdf-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.add-row-btn:hover::before,
.review-btn:hover::before,
.submit-btn:hover::before,
.nav-btn:hover::before,
.pdf-btn:hover::before {
    left: 100%;
}

.add-row-btn:hover,
.review-btn:hover,
.submit-btn:hover,
.nav-btn:hover,
.pdf-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Section Icons */
.section-icon {
    font-size: 20px;
    margin-right: 15px;
    opacity: 0.9;
}





.review-section {
    display: none;
}

.review-section.active {
    display: block;
}

.review-item {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.review-item h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.4em;
}

.review-field {
    display: flex;
    margin-bottom: 10px;
}

.review-field strong {
    min-width: 200px;
    color: #2c3e50;
}

.review-field span {
    color: #555;
}

.review-text {
    margin-top: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    white-space: pre-wrap;
    line-height: 1.6;
}

.review-photo {
    margin-top: 10px;
}

.review-photo img {
    display: block;
    margin-top: 5px;
}

.review-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.review-table th,
.review-table td {
    padding: 8px;
    border: 1px solid #ddd;
    text-align: left;
}

.review-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.success-message {
    display: none;
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin-top: 20px;
}

.qualification-entry,
.employment-entry,
.teaching-entry,
.workshop-entry,
.course-entry,
.article-entry,
.paper-entry,
.program-entry {
    background: white;
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    position: relative;
}

.qualification-entry h4,
.employment-entry h4,
.teaching-entry h4,
.workshop-entry h4,
.course-entry h4,
.article-entry h4,
.paper-entry h4,
.program-entry h4 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.3em;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.remove-entry-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e74c3c;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-entry-btn:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.nav-btn {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 73, 94, 0.3);
}

.pdf-btn {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.pdf-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(155, 89, 182, 0.3);
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .logo-left, .logo-right {
        order: 1;
    }
    
    .header-text {
        order: 2;
        padding: 0;
    }
    
    .header-text h1 {
        font-size: 2em;
    }
    
    .header-logo {
        max-width: 100px;
        max-height: 60px;
    }
    
    .form-content {
        padding: 20px;
    }
    
    .section {
        padding: 20px;
    }

    .photo-preview {
        width: 120px;
        height: 160px;
    }
    
    .navigation-buttons {
        flex-direction: column;
        gap: 15px;
    }
}

/* Info note styles */
.info-note {
    background-color: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.info-note p {
    margin: 0;
    color: #1976d2;
    font-size: 0.9rem;
}

/* Conditional sections for M.Phil programs */
.mphil-hidden {
    display: block;
}

/* When M.Phil program is selected, hide these sections */
.mphil-hidden.hidden {
    display: none;
}

/* Bank Account Information Styles */
.bank-account-info {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #007bff;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 6px rgba(0, 123, 255, 0.1);
}

.bank-account-info h4 {
    color: #007bff;
    margin-bottom: 15px;
    font-size: 1.2em;
    font-weight: bold;
    text-align: center;
}

.bank-details {
    background: white;
    border-radius: 6px;
    padding: 15px;
    margin: 10px 0;
    border-left: 4px solid #007bff;
}

.bank-details p {
    margin: 8px 0;
    color: #333;
    font-size: 0.95em;
}

.bank-details p strong {
    color: #007bff;
    font-weight: 600;
}

/* Bank Accounts Section for Index Page */
.bank-accounts {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bank-account {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #007bff;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.1);
}

.bank-account h5 {
    color: #007bff;
    margin-bottom: 10px;
    font-size: 1.1em;
    font-weight: bold;
    text-align: center;
}

.bank-account p {
    margin: 5px 0;
    color: #333;
    font-size: 0.9em;
}

.bank-account p strong {
    color: #007bff;
    font-weight: 600;
}