/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Body */
body {
    background: linear-gradient(90deg, green, #5cad6e);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;

}

/* Container */
.container {
    width: 100%;
    max-width: 900px;
    padding: 0 20px;
    margin: 40px auto;
}

/* Form Box */
.form-box {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    width: 100%;
    margin: 0 auto;
    overflow: auto;
}

/* Heading */
.form-box h1 {
    text-align: center;
    font-size: 32px;
    color: #2c5c26;
    font-weight: 600;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.form-box h1 .header-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
}

.form-box h1:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: #458b62;
}

/* Form Sections */
.form-section {

    padding: 15px;
    background: #ffffff;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.section-title {
    color: #333333;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e9ecef;
}

/* Input Box */
.input-box {

    position: relative;
}

.input-box label {
    display: block;

    font-weight: 500;
    color: #333333;
    font-size: 15px;
}

.input-box input,
.input-box select,
.input-box textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    background: #fff;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

/* Tighter spacing for consent labels */
.form-section .input-box label {
    gap: 4px;
}

.form-section .input-box label input[type="checkbox"] {
    margin-right: 6px;
}

.form-section .input-box input[type="checkbox"] {
    margin: 0;
}


.input-box input:focus,
.input-box select:focus,
.input-box textarea:focus {
    border-color: #007bff;
    background-color: #fff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
    outline: none;
}

.input-box textarea {
    min-height: 60px;
    resize: vertical;
    font-family: inherit;
}

.input-box input[type="file"] {
    padding: 8px;
    background: #f8f9fa;
    border: 1px dashed #dee2e6;
    cursor: pointer;
}

.input-box input[type="file"]:hover {
    border-color: #007bff;
    background: #f8f9fa;
}

.help-text {
    display: block;
    margin-top: 4px;
    color: #6c757d;
    font-size: 13px;
    font-style: italic;
    line-height: 1.3;
}

.error-message {
    display: none;
    margin-top: 4px;
    color: #dc3545;
    font-size: 13px;
    font-weight: 500;
}

.input-box.error .error-message {
    display: block;
}

.input-box.error input,
.input-box.error select,
.input-box.error textarea {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.input-box.valid input,
.input-box.valid select,
.input-box.valid textarea {
    border-color: #28a745;
    background-color: #f8fff8;
}

/* Age Field Styling */
.age-info {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    transition: all 0.3s ease;
    font-style: italic;
}

.age-info.success-message {
    color: #28a745;
    font-weight: 500;
    font-style: normal;
}

.age-info.error-message {
    color: #dc3545;
    font-weight: 500;
    font-style: normal;
}

input[readonly] {
    background-color: #f8f9fa;
    cursor: not-allowed;
    border-color: #dee2e6;
    color: #495057;
}

input[readonly]:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    background-color: #f8f9fa;
}

input[readonly].valid {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

/* Form Row */
.form-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;

}

.form-row .input-box {
    flex: 1;
    min-width: 180px;

}

/* Password Field Styling */
.password-input-container {
    position: relative;
}

/* ===== PASSWORD TOGGLE STYLES ===== */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    padding-right: 45px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: var(--text-light, #6c757d);
    font-size: var(--font-size-base, 1rem);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    outline: none;
}

.password-toggle:hover {
    color: var(--primary-green, #5cad6e);
}

.password-toggle:focus {
    color: var(--primary-green, #5cad6e);
    outline: 2px solid var(--primary-green, #5cad6e);
    outline-offset: 2px;
    border-radius: 4px;
}

.password-toggle i {
    pointer-events: none;
}

.password-input-container input:focus {
    padding-right: 45px;
}

.password-input-container input[type="password"],
.password-input-container input[type="text"] {
    padding-right: 45px;
}

.password-requirements {
    margin-top: 6px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.requirement {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    font-size: 13px;
    color: #6c757d;
    transition: color 0.3s ease;
}

.requirement.valid {
    color: #28a745;
}

.requirement.valid .requirement-icon {
    color: #28a745;
}

.requirement .requirement-icon {
    color: #dc3545;
    transition: color 0.3s ease;
    margin-right: 8px;
}

.password-strength-bar {
    height: 3px;
    background: #e9ecef;
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
}

.strength-indicator {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-indicator.weak {
    width: 25%;
    background: #dc3545;
}

.strength-indicator.fair {
    width: 50%;
    background: #ffc107;
}

.strength-indicator.good {
    width: 75%;
    background: #17a2b8;
}

.strength-indicator.strong {
    width: 100%;
    background: #28a745;
}

/* Button */
.btn {
    width: 100%;
    padding: 12px;
    background: #458b62;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 20px 0 15px 0;
    box-shadow: 0 1px 4px rgba(0, 123, 255, 0.2);
}



.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

/* Message Styles */
.message {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 8px;
    font-size: 16px;
    text-align: center;
    font-weight: 500;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Link Text */
.form-box p {
    text-align: center;
    margin-top: 20px;
    font-size: 16px;
    color: #555;
}

.form-box a {
    color: #458b62;
    text-decoration: none;
    font-weight: 600;
}

.form-box a:hover {
    text-decoration: underline;
}

/* Error messages */
.input-box .error-message {
    color: #ff3333;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

/* ID Validation Messages */
.field-message {
    font-size: 14px;
    margin-top: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.field-message.success {
    color: #28a745;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}

.field-message.error {
    color: #dc3545;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}

.input-box.error input,
.input-box.error select,
.input-box.error textarea {
    border-color: #ff3333;
    background-color: #fff9f9;
}

.input-box.error .error-message {
    display: block;
}

/* Valid state */
.input-box.valid input,
.input-box.valid select,
.input-box.valid textarea {
    border-color: #28a745;
    background-color: #f6fff8;
}

/* Disabled submit button */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    filter: grayscale(20%);
}

/* Password requirements */
.password-requirements {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
    line-height: 1.4;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }

    .form-box {
        padding: 20px 15px;
    }

    .form-section {
        padding: 12px;
        margin-bottom: 15px;
    }

    .section-title {
        font-size: 17px;
        margin-bottom: 12px;
    }

    .form-row {
        flex-direction: column;
        gap: 10px;
    }

    .form-row .input-box {
        min-width: 100%;
        margin-bottom: 8px;
    }

    .input-box {
        margin-bottom: 12px;
    }

    .input-box label {
        font-size: 14px;

    }

    .input-box input,
    .input-box select,
    .input-box textarea {
        padding: 8px 10px;
        font-size: 15px;
    }

    .btn {
        padding: 10px;
        font-size: 15px;
        margin: 15px 0 10px 0;
    }

    .form-box h1 {
        font-size: 28px;
    }

    .form-box h1 .header-logo {
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 480px) {
    .form-box {
        padding: 15px 10px;
    }

    .form-section {
        padding: 10px;
        margin-bottom: 12px;
    }

    .section-title {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .input-box {
        margin-bottom: 10px;
    }

    .input-box input,
    .input-box select,
    .input-box textarea {
        padding: 7px 8px;
        font-size: 14px;
    }

    .form-box h1 {
        font-size: 26px;
    }

    .form-box h1 .header-logo {
        width: 32px;
        height: 32px;
    }
}

/* Scrollbar styling */
.form-box::-webkit-scrollbar {
    width: 8px;
}

.form-box::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.form-box::-webkit-scrollbar-thumb {
    background: #458b62;
    border-radius: 10px;
}

.form-box::-webkit-scrollbar-thumb:hover {
    background: #265224;
}

/* Consent checkbox styling - dedicated class */
.consent-checkbox {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 8px;
    margin-bottom: 15px;
}

.consent-checkbox input[type="checkbox"] {
    order: 0;
    margin: 0;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.consent-checkbox label {
    order: 1;
    margin: 0;
    flex: 1;
    line-height: 1.4;
    font-size: 15px;
}

/* File upload container styling */
.file-upload-container {
    position: relative;
    width: 100%;
}

.file-upload-container input[type="file"] {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

.upload-options {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.upload-btn {
    padding: 8px 16px;
    border: 2px solid #458b62;
    background: #fff;
    color: #458b62;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    flex: 1;
}

.upload-btn:hover {
    background: #458b62;
    color: #fff;
}

.camera-btn {
    background: #458b62;
    color: #fff;
}

.camera-btn:hover {
    background: #3a7a52;
}

.file-preview {
    margin-top: 10px;
    text-align: center;
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 15px;
    background: #f9f9f9;
}

.file-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.remove-btn {
    margin-top: 10px;
    padding: 6px 12px;
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.remove-btn:hover {
    background: #c82333;
}

/* --- Professional UI polish --- */
/* Headings */
.form-section .section-title {
    font-size: 20px;
    font-weight: 700;
    color: #234b2a;

}

/* Input containers */
.form-section .input-box {

    position: relative;
}

/* Inputs & selects */
.form-section input[type="text"],
.form-section input[type="email"],
.form-section input[type="password"],
.form-section input[type="date"],
.form-section input[type="tel"],
.form-section input[type="number"],
.form-section textarea,
.form-section select {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #cfd8d3;
    border-radius: 6px;
    outline: none;
    background: #ffffff;
    font-size: 16px;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.form-section textarea {
    resize: vertical;
}

/* Focus style */
.form-section input:focus,
.form-section textarea:focus,
.form-section select:focus {
    border-color: #458b62;
    box-shadow: 0 0 0 3px rgba(69, 139, 98, 0.15);
    background: #fff;
}

/* Valid/Invalid states */
.form-section .input-box.valid>input,
.form-section .input-box.valid>textarea,
.form-section .input-box.valid>select,
.form-section .input-box.valid input,
.form-section .input-box.valid textarea,
.form-section .input-box.valid select {
    border-color: #28a745;
}

.form-section .input-box.error>input,
.form-section .input-box.error>textarea,
.form-section .input-box.error>select,
.form-section .input-box.error input,
.form-section .input-box.error textarea,
.form-section .input-box.error select {
    border-color: #dc3545;
}

.form-section .input-box .error-message {
    color: #dc3545;
    font-size: 14px;
    margin-top: 6px;
}

.form-section .input-box .help-text {
    color: #667;
    font-size: 14px;
    margin-top: 4px;
}

/* Buttons */
.btn {
    background: #458b62;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: background .2s ease, transform .05s ease;
}

.btn:hover {
    background: #3a7a52;
}

.btn:active {
    transform: translateY(1px);
}

.btn[aria-disabled="true"],
.btn:disabled {
    opacity: .7;
    cursor: not-allowed;
}

/* Messages */
.message {
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Form progress bar */
.form-progress {
    width: 100%;
    background: #eef3f0;
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    margin: 8px 0 16px 0;
}

.form-progress .bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #5aa97a, #458b62);
    transition: width .25s ease;
}

/* ===================== Responsive Layout ===================== */
/* Desktop and larger screens (wider than 768px) */
@media (min-width: 769px) {
    .container {
        max-width: 1100px;
    }

    .form-box.register {
        max-width: 1100px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Tablets and down */
@media (max-width: 992px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    .form-box.register {
        margin-left: auto;
        margin-right: auto;
        max-width: 760px;
        width: 100%;
    }
}

/* Mobile landscape and small tablets */
@media (max-width: 768px) {
    .form-row {
        display: block;
    }

    .form-section .input-box {
        width: 100% !important;
    }

    .upload-options {
        gap: 8px;
    }

    .consent-checkbox {
        gap: 6px;
    }

    .form-box.register h1 {
        font-size: 28px;
    }

    .form-box.register h1 .header-logo {
        width: 35px;
        height: 35px;
    }

    .btn {
        width: 100%;
    }
}

/* Small mobile phones */
@media (max-width: 480px) {
    .form-box.register h1 {
        font-size: 26px;
        margin: 6px 0 6px 0;
    }

    .form-box.register h1 .header-logo {
        width: 32px;
        height: 32px;
    }

    .form-section .section-title {
        font-size: 18px;
    }

    .upload-options {
        flex-direction: column;
    }

    .upload-btn {
        width: 100%;
    }

    .file-preview img {
        max-height: 160px;
    }

    .form-progress {
        height: 6px;
        margin: 6px 0 12px 0;
    }

    .consent-checkbox input[type="checkbox"] {
        width: 18px;
        height: 18px;
    }
}