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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #ffffff;
    padding: 20px;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-radius: 4px;
    border: 1px solid #e5e5e5;
}

/* Step Indicator */
.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 2px solid #e0e0e0;
}

.step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.step.active {
    opacity: 1;
}

.step::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #e0e0e0;
    z-index: -1;
}

.step:last-child::after {
    display: none;
}

.step.active::after {
    background: #834047;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: #834047;
    color: white;
}

.step-label {
    font-size: 12px;
    color: #666;
    text-align: center;
    font-weight: 500;
}

.step.active .step-label {
    color: #834047;
    font-weight: 600;
}

.page {
    display: none;
    flex-direction: column;
    gap: 0;
    min-height: 100%;
}

.page.active {
    display: flex;
}

.page .page-footer {
    margin-top: auto;
}

.header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #834047;
    text-align: center;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 12px;
}

.logo-img {
    max-width: 100px;
    height: auto;
    width: 100%;
    object-fit: contain;
    flex-shrink: 0;
}

.header-text {
    text-align: center;
}

.header h1 {
    font-size: 24px;
    margin-bottom: 6px;
    color: #2c3e50;
    font-weight: 600;
    line-height: 1.2;
}

.header h2 {
    font-size: 16px;
    margin-bottom: 4px;
    color: #34495e;
    font-weight: 500;
    line-height: 1.3;
}

.contact-info {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
    padding: 8px 12px;
    background-color: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 2px;
    display: inline-block;
    text-align: center;
    width: 100%;
}

.intro-text {
    margin-bottom: 35px;
    font-size: 14px;
    line-height: 1.7;
    padding: 18px 20px;
    background: #f8f9fa;
    border-left: 3px solid #834047;
    border-radius: 2px;
    color: #555;
}

.section-header {
    background: #834047;
    color: white;
    padding: 12px 18px;
    margin: 30px 0 20px 0;
    font-weight: 600;
    font-size: 16px;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #2c3e50;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 2px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    background-color: #fff;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus,
.form-group input[type="date"]:focus,
.form-group input[type="number"]:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #834047;
    box-shadow: 0 0 0 2px rgba(131, 64, 71, 0.1);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

.checkbox-group {
    display: flex;
    gap: 25px;
    align-items: center;
    flex-wrap: wrap;
    padding: 10px 0;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
    transition: color 0.2s ease;
}

.checkbox-group label:hover {
    color: #834047;
}

.checkbox-group input[type="checkbox"],
.checkbox-group input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #834047;
}

.education-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
    border: 2px solid #834047;
    border-radius: 0;
    overflow: hidden;
    table-layout: fixed;
}

.education-table th,
.education-table td {
    border: 1px solid #834047;
    padding: 26px 10px 8px 10px;
    text-align: left;
    vertical-align: top;
    position: relative;
}

.education-table th {
    background: #834047;
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

.education-table td {
    background-color: #fff;
}

.education-table tr:hover td {
    background-color: #fff;
}

.education-col-name {
    width: 44%;
}

.education-col-years {
    width: 14%;
}

.education-col-graduate {
    width: 18%;
}

.education-col-subject {
    width: 24%;
}

.education-level-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #2c3e50;
    position: absolute;
    top: 6px;
    left: 10px;
    margin: 0;
}

.education-name-cell input[type="text"] {
    margin-top: 0;
}

.education-table input[type="text"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    transition: border-color 0.3s ease;
    margin-top: 0;
}

.education-table input[type="text"]:focus {
    outline: none;
    border-color: #834047;
}

.education-table .checkbox-group {
    padding: 0;
    margin: 0;
}

.skills-section {
    margin-bottom: 35px;
}

.skills-category {
    margin-bottom: 25px;
    padding: 18px;
    background-color: #f8f9fa;
    border-radius: 2px;
    border-left: 3px solid #834047;
    border: 1px solid #e5e5e5;
    border-left: 3px solid #834047;
}

.skills-category h3 {
    font-size: 16px;
    margin-bottom: 18px;
    text-decoration: none;
    color: #2c3e50;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    background-color: white;
    border: 1px solid #f0f0f0;
    border-radius: 2px;
    flex-wrap: wrap;
}

.skill-item label {
    min-width: 160px;
    flex: 1 1 auto;
    font-weight: normal;
    font-size: 14px;
    color: #2c3e50;
}

.skill-item .input-group {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
    min-width: 0;
}

.skill-item .input-group .input-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
    min-width: auto;
}

.skill-item input[type="number"] {
    width: 80px;
    min-width: 80px;
    padding: 8px 6px;
    border: 1px solid #d0d0d0;
    border-radius: 2px;
    transition: border-color 0.2s ease;
    text-align: center;
    font-size: 14px;
    box-sizing: border-box;
}

.skill-item input[type="number"]:focus {
    outline: none;
    border-color: #834047;
    box-shadow: 0 0 0 2px rgba(131, 64, 71, 0.1);
}

.employment-section {
    border: 1px solid #e0e0e0;
    padding: 20px;
    margin-bottom: 20px;
    background: #ffffff;
    border-radius: 2px;
}

.employment-section h4 {
    margin-bottom: 18px;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
    padding-bottom: 8px;
    border-bottom: 1px solid #834047;
}

.training-interests {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 20px;
    padding: 18px;
    background-color: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 2px;
}

.training-interests label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: normal;
    padding: 8px 10px;
    background-color: white;
    border: 1px solid #f0f0f0;
    border-radius: 2px;
    cursor: pointer;
}

.training-interests label:hover {
    background-color: #f5f5f5;
    border-color: #d0d0d0;
}

.training-interests input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #834047;
    cursor: pointer;
}

.highlight-box {
    background: #fff9e6;
    border-left: 3px solid #834047;
    padding: 16px 18px;
    margin: 20px 0;
    border-radius: 2px;
    border-right: 1px solid #e5e5e5;
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
}

.highlight-box p {
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.6;
}

.page-footer {
    margin-top: 50px;
    padding-top: 25px;
    border-top: 2px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
    flex-wrap: wrap;
    gap: 10px;
}

.page-number {
    font-weight: bold;
    color: #2c3e50;
}

.signature-section {
    margin-top: 30px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
    background: #ffffff;
}

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

.authorization-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 2px;
}

.authorization-checkboxes label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: normal;
    padding: 8px 10px;
    background-color: white;
    border: 1px solid #f0f0f0;
    border-radius: 2px;
    cursor: pointer;
}

.authorization-checkboxes label:hover {
    background-color: #f5f5f5;
    border-color: #d0d0d0;
}

.authorization-checkboxes input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #834047;
    cursor: pointer;
}

.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

@media (max-width: 992px) {
    .two-column {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Page break and section styles */
/* (legacy) kept for older markup */
.page-break {
    page-break-before: always;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #834047;
}

.instruction-text {
    text-align: center;
    margin-bottom: 30px;
    font-style: normal;
    font-weight: 600;
    text-transform: uppercase;
    padding: 12px 18px;
    background: #834047;
    color: white;
    border-radius: 2px;
    font-size: 13px;
    letter-spacing: 0.3px;
}

.training-label {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
    display: block;
}

.contact-label {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
    display: block;
}

.signature-text {
    margin-bottom: 15px;
    line-height: 1.7;
    color: #444;
}

.signature-text-last {
    margin-bottom: 20px;
    line-height: 1.7;
    color: #444;
}

.signature-pad-container {
    margin-top: 10px;
}

#signature-pad {
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    background-color: #fff;
    cursor: crosshair;
    touch-action: none;
    width: 100%;
    max-width: 500px;
    height: 200px;
    display: block;
}

@media (max-width: 768px) {
    #signature-pad {
        height: 150px;
    }
}

.signature-pad-controls {
    margin-top: 10px;
}

.clear-signature-btn {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    background-color: #834047;
    color: white;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.clear-signature-btn:hover {
    background-color: #6a3237;
}

.clear-signature-btn:active {
    background-color: #5a2a2e;
}

.document-upload-section {
    margin-top: 30px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
    background: #ffffff;
}

.upload-instruction {
    margin-bottom: 20px;
    color: #444;
    line-height: 1.6;
}

.document-upload-item {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 2px;
}

.document-upload-item:last-of-type {
    margin-bottom: 15px;
}

.document-type-select {
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 2px;
    background-color: white;
    color: #333;
    cursor: pointer;
}

.document-type-select:focus {
    outline: none;
    border-color: #834047;
    box-shadow: 0 0 0 2px rgba(131, 64, 71, 0.1);
}

.document-file-input {
    width: 100%;
    padding: 8px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 2px;
    background-color: white;
    cursor: pointer;
}

.document-file-input:focus {
    outline: none;
    border-color: #834047;
    box-shadow: 0 0 0 2px rgba(131, 64, 71, 0.1);
}

.file-help-text {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.add-document-btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    background-color: #834047;
    color: white;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-top: 10px;
}

.add-document-btn:hover {
    background-color: #6a3237;
}

.add-document-btn:active {
    background-color: #5a2a2e;
}

.remove-document-btn {
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.remove-document-btn:hover {
    background-color: #c82333;
}

.remove-document-btn:active {
    background-color: #bd2130;
}

.mt-10 {
    margin-top: 10px;
}

.mt-15 {
    margin-top: 15px;
}

.mt-20 {
    margin-top: 20px;
}

.mt-30 {
    margin-top: 30px;
}

.mt-40 {
    margin-top: 40px;
}

.full-width {
    width: 100%;
}

/* Page Navigation */
.page-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
    gap: 15px;
}

.nav-button {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.prev-button {
    background: #ffffff;
    color: #834047;
    border: 1px solid #834047;
}

.prev-button:hover {
    background: #834047;
    color: white;
}

.next-button {
    background: #834047;
    color: white;
    margin-left: auto;
}

.next-button:hover {
    background: #6a3338;
}

.nav-button.submit-button {
    background: #834047;
    color: white;
    padding: 10px 32px;
    margin-left: auto;
}

.nav-button.submit-button:hover {
    background: #6a3338;
}

.nav-button:active {
    opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: 30px;
    }

    .header h1 {
        font-size: 22px;
    }

    .header h2 {
        font-size: 15px;
    }

    .logo-img {
        max-width: 90px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 20px;
        border-radius: 8px;
    }

    .step-indicator {
        padding: 15px 0;
        margin-bottom: 20px;
    }

    .step-number {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .step-label {
        font-size: 10px;
    }

    .page-navigation {
        flex-direction: column;
        gap: 10px;
    }

    .nav-button {
        width: 100%;
        padding: 14px 20px;
    }

    .next-button,
    .nav-button.submit-button {
        margin-left: 0;
    }

    .header {
        margin-bottom: 20px;
        padding-bottom: 12px;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .logo-img {
        max-width: 80px;
    }

    .header h1 {
        font-size: 20px;
    }

    .header h2 {
        font-size: 14px;
    }

    .contact-info {
        font-size: 12px;
        padding: 8px;
        display: block;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .two-column {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .skill-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
        gap: 12px;
    }

    .skill-item label {
        min-width: 100%;
        margin-bottom: 8px;
        font-weight: 600;
        font-size: 14px;
    }

    .skill-item .input-group {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        align-items: center;
    }

    .skill-item input[type="number"] {
        width: 100%;
        padding: 12px;
        font-size: 16px;
        appearance: textfield;
        -webkit-appearance: none;
        -moz-appearance: textfield;
    }

    .skill-item input[type="number"]::-webkit-inner-spin-button,
    .skill-item input[type="number"]::-webkit-outer-spin-button {
        appearance: none;
        -webkit-appearance: none;
        margin: 0;
    }

    .training-interests {
        grid-template-columns: 1fr;
        padding: 15px;
    }

    .authorization-checkboxes {
        grid-template-columns: 1fr;
        padding: 10px;
    }

    .education-table {
        font-size: 12px;
        display: block;
        overflow-x: auto;
    }

    .education-table th,
    .education-table td {
        padding: 8px;
        min-width: 120px;
    }

    .section-header {
        font-size: 16px;
        padding: 12px 15px;
    }

    .instruction-text {
        font-size: 12px;
        padding: 12px;
    }

    .skills-category {
        padding: 15px;
    }

    .skills-category h3 {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .skill-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px;
        gap: 10px;
    }

    .skill-item label {
        min-width: 100%;
        margin-bottom: 8px;
        font-weight: 600;
        font-size: 13px;
    }

    .skill-item .input-group {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        align-items: center;
    }

    .skill-item input[type="number"] {
        width: 100%;
        padding: 12px;
        font-size: 16px;
        appearance: textfield;
        -webkit-appearance: none;
        -moz-appearance: textfield;
    }

    .skill-item input[type="number"]::-webkit-inner-spin-button,
    .skill-item input[type="number"]::-webkit-outer-spin-button {
        appearance: none;
        -webkit-appearance: none;
        margin: 0;
    }

    .employment-section {
        padding: 20px;
    }

    .page-footer {
        flex-direction: column;
        text-align: center;
    }

    .submit-button {
        padding: 15px 40px;
        font-size: 16px;
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 5px;
    }

    .container {
        padding: 15px;
    }

    .step-indicator {
        padding: 10px 0;
        margin-bottom: 15px;
    }

    .step-number {
        width: 30px;
        height: 30px;
        font-size: 14px;
        margin-bottom: 5px;
    }

    .step-label {
        font-size: 9px;
    }

    .page-navigation {
        padding-top: 15px;
    }

    .nav-button {
        font-size: 14px;
        padding: 12px 15px;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .logo-img {
        max-width: 70px;
    }

    .header h1 {
        font-size: 20px;
    }

    .header h2 {
        font-size: 14px;
    }

    .intro-text {
        padding: 15px;
        font-size: 13px;
    }

    .section-header {
        font-size: 14px;
        padding: 10px 12px;
    }

    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="tel"],
    .form-group input[type="date"],
    .form-group input[type="number"],
    .form-group textarea {
        padding: 10px;
        font-size: 14px;
    }

    .checkbox-group {
        gap: 15px;
    }

    .education-table {
        font-size: 11px;
    }

    .education-table th,
    .education-table td {
        padding: 6px;
    }
}

@media print {
    body {
        background: white;
        padding: 0;
    }

    .container {
        box-shadow: none;
        padding: 20px;
        border-radius: 0;
    }

    .logo-img {
        max-width: 80px;
    }

    .submit-section {
        display: none;
    }

    .page {
        page-break-after: always;
        break-after: page;
    }

    .page + .page {
        border-top: none;
        margin-top: 0;
        padding-top: 0;
    }

    .page-footer {
        break-inside: avoid;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 0;
    border: 1px solid #888;
    border-radius: 4px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-header {
    padding: 20px;
    background-color: #834047;
    color: white;
    border-radius: 4px 4px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover,
.modal-close:focus {
    color: #f0f0f0;
    text-decoration: none;
}

.modal-body {
    padding: 30px 20px;
    text-align: center;
}

.modal-body p {
    margin-bottom: 20px;
    color: #444;
    font-size: 16px;
    line-height: 1.6;
}

.download-pdf-btn {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    background-color: #834047;
    color: white;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-transform: uppercase;
}

.download-pdf-btn:hover {
    background-color: #6a3237;
}

.download-pdf-btn:active {
    background-color: #5a2a2e;
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 20% auto;
    }
    
    .modal-header h2 {
        font-size: 18px;
    }
    
    .modal-body {
        padding: 20px 15px;
    }
}
