@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

:root {
    --primary-color: #377ce3;
    --primary-dark: #2c5fba;
    --text-dark: #333;
    --text-light: #777;
    --bg-light: #f5f7fa;
    --white: #fff;
    --border-color: #ddd;
    --shadow-color: rgba(0, 0, 0, 0.05);
    --animation-duration: 1s;
    --success-color: #28a745;
    --error-color: #e53935;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Poppins", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-dark);
    background-color: var(--bg-light);
    min-height: 100vh;
    background: linear-gradient(135deg, #f8fafc 0%, #e3f2fd 100%);
}

.homeBtn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.homeBtn a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.homeBtn a:hover {
    background-color: #0097a7;
    transform: translateX(-5px);
    color: white;
}

.homeBtn img {
    width: 20px;
    height: auto;
}

.container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
}

.right-panel {
    width: 100%;
    max-width: 1200px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 80px;
}

.brandText {
    text-align: center;
    margin-bottom: 30px;
}

.brandText a {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.brandText img.logo {
    width: 300px;
    height: auto;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.brandText img.logo:hover {
    transform: scale(1.05);
}

.brandText h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* Step indicator */
.step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    padding: 0 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.step {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #666;
    transition: all 0.3s ease;
}

.step-number {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.3s ease;
}

.step.active {
    color: var(--primary-color);
    font-weight: 600;
}

.step.active .step-number {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.step.completed {
    color: var(--success-color);
}

.step.completed .step-number {
    background: var(--success-color);
    color: white;
}

/* Multi-step layout */
.step-content {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.step-content.active {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    opacity: 1;
}

.step-title {
    margin-bottom: 25px;
    color: var(--text-dark);
    font-size: 1.5rem;
    font-weight: 600;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 10px;
    text-align: center;
    flex: 1 1 100%;
    width: 100%;
}

/* Default half width */
.step-content.active .form-group {
    flex: 1;
    min-width: calc(50% - 10px);
    margin-bottom: 1.5rem;
}

/* Full width for textareas and step 4 controls */
.step-content.active .form-group:has(textarea),
.step-content[data-step="4"].active .form-group,
.step-content.active .terms {
    flex: 1 1 100%;
    min-width: 100%;
}

.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.btn-back {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-next {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-next:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-submit {
    background: var(--success-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    background: #218838;
    transform: translateY(-2px);
}

.error-message {
    color: var(--error-color);
    font-size: 13px;
    margin-top: 5px;
    font-weight: 500;
}

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: var(--error-color);
    background-color: rgba(220, 53, 69, 0.05);
}

/* Explicit input error utility to match previous register.css */
.input-error {
    border: 2px solid var(--error-color) !important;
    background-color: rgba(220, 53, 69, 0.05);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}
.form-control:read-only {
    background-color: #f8f9fa;
    color: #6c757d;
}
textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Helper text under inputs (e.g., PRC photo note) */
.form-text {
    display: block;
    margin-top: 6px;
    color: var(--text-light);
    font-size: 0.85rem;
}

.terms {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    gap: 0.5rem;
}
.terms input {
    margin-top: 0.25rem;
    flex-shrink: 0;
}
.terms a {
    color: var(--primary-color);
    text-decoration: none;
}
.terms a:hover {
    text-decoration: underline;
}
.terms.error label,
.terms.has-error label {
    color: #e53935;
}

#alert-container {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    max-width: 400px;
    width: 90%;
    pointer-events: none;
}
.alert {
    position: relative;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    opacity: 1;
    pointer-events: auto;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: center;
    justify-content: center;
}
.alert.alert-error {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border-left: 4px solid #a71e2a;
}
.alert.alert-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border-left: 4px solid #1e7e34;
}
.alert.alert-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #212529;
    border-left: 4px solid #d39e00;
}
.alert.alert-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    border-left: 4px solid #117a8b;
}

/* Footer under form */
.form-footer {
    margin-top: 20px;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}
.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
}
.form-footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 992px) {
    .right-panel {
        max-width: 900px;
    }
    .step-content.active {
        display: block;
    }
    .step-content.active .form-group {
        flex: none;
        min-width: 100%;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    .right-panel {
        padding: 20px;
        margin-top: 60px;
        max-width: 100%;
    }
    .brandText img.logo {
        width: 250px;
    }
}

@media (max-width: 576px) {
    .brandText img.logo {
        width: 200px;
    }
    .right-panel {
        padding: 15px;
        margin-top: 50px;
    }
}
