/* ===========================
   AUTH PAGE CSS
=========================== */

/* Full-page background */
.form-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 80px 5%;
    min-height: 100vh;
    background: linear-gradient(135deg, #0a2a2f 0%, #0f3a40 50%, #1c5a63 100%);
    position: relative;
}

.form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../img/background-image.jpg') no-repeat center center;
    background-size: cover;
    opacity: 0.15;
    z-index: 0;
    will-change: transform;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.form-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}


/* Split form card */
.form-card {
    display: grid;
    grid-template-columns: 45% 55%;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================
   LEFT SIDE - BRANDING
=========================== */
.form-brand {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-light);
}

.brand-content {
    text-align: center;
    width: 100%;
    max-width: 400px;
}

.form-brand > p {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 60px;
    line-height: 1.6;
    text-align: center;
    padding: 0 20px;
}


.brand-logo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 24px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    display: block;
}

.form-brand h2 {
    font-size: 1.8rem;
    margin-bottom: 12px;
    color: var(--text-light);
    font-weight: 700;
    text-align: center;
}

.form-brand > p {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    line-height: 1.6;
    text-align: center;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: center;
    width: 100%;
}

.feature-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.95);
}

.feature-item svg {
    flex-shrink: 0;
    color: var(--accent);
}


/* ===========================
   RIGHT SIDE - FORM
=========================== */
.form-box {
    padding: 60px 50px;
    background: #ffffff;
}

.form-box h3 {
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: 8px;
    font-weight: 700;
}

.form-subtitle {
    font-size: 0.95rem;
    color: #626c73;
    margin-bottom: 32px;
}

/* ===========================
   ALERT MESSAGES
=========================== */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    animation: fadeIn 0.3s ease;
}

.alert svg {
    flex-shrink: 0;
}

.alert-success {
    background: rgba(33, 128, 141, 0.1);
    border: 1px solid rgba(33, 128, 141, 0.3);
    color: var(--primary);
}

.alert-error {
    background: rgba(192, 21, 47, 0.1);
    border: 1px solid rgba(192, 21, 47, 0.3);
    color: #c0152f;
}

/* ===========================
   FORM GROUPS
=========================== */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon svg {
    position: absolute;
    left: 14px;
    color: #626c73;
    pointer-events: none;
}

.input-with-icon input {
    width: 100%;
    padding: 14px 14px 14px 44px;
    border: 1px solid rgba(15, 58, 64, 0.2);
    border-radius: 10px;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s ease;
    background: #f8f9fa;
    color: var(--text-dark);
}

.input-with-icon input:focus {
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(15, 58, 64, 0.1);
}

.input-with-icon input::placeholder {
    color: #a0a0a0;
}

/* ===========================
   SINGLE FORM LAYOUT (Forgot Password)
=========================== */
.form-card-single {
    grid-template-columns: 1fr !important;
    max-width: 500px;
    margin: 0 auto;
}

.form-card-single .form-box {
    padding: 50px 45px;
}

.form-card-single .form-box h3 {
    text-align: center;
}

.form-card-single .form-subtitle {
    text-align: center;
    margin-bottom: 36px;
}

/* Modal info section */
.modal-info {
    text-align: center;
    padding: 16px;
    background: rgba(15, 58, 64, 0.05);
    border-radius: 10px;
    margin-bottom: 16px;
}

.modal-info p {
    margin: 0;
}

@media (max-width: 768px) {
    .form-card-single {
        max-width: 100%;
    }
    
    .form-card-single .form-box {
        padding: 40px 30px;
    }
}

@media (max-width: 480px) {
    .form-card-single .form-box {
        padding: 30px 20px;
    }
}


/* ===========================
   PASSWORD VALIDATION WRAPPER
=========================== */
.password-validation-wrapper {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Password Strength Section */
.password-strength-section {
    margin-bottom: 16px;
}

.strength-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.strength-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
}

.strength-text {
    font-size: 0.9rem;
    font-weight: 700;
    transition: color 0.3s ease;
}

.strength-bar {
    display: flex;
    gap: 6px;
    height: 8px;
    margin-bottom: 16px;
}

.strength-bar-segment {
    flex: 1;
    background: #e2e8f0;
    border-radius: 4px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: left;
}

.strength-bar-segment.active {
    transform: scaleX(1);
}

/* Requirements Grid */
.strength-requirements {
    display: none;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.requirement-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: #64748b;
    transition: all 0.3s ease;
    position: relative;
}

.requirement-item .req-icon-circle {
    flex-shrink: 0;
    stroke: #cbd5e1;
    opacity: 1;
    transition: all 0.3s ease;
}

.requirement-item .req-icon-check {
    flex-shrink: 0;
    stroke: #10b981;
    position: absolute;
    left: 0;
    opacity: 0;
    transform: scale(0.3) rotate(-90deg);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.requirement-item.met {
    color: #10b981;
    font-weight: 600;
}

.requirement-item.met .req-icon-circle {
    opacity: 0;
    transform: scale(0.3) rotate(90deg);
}

.requirement-item.met .req-icon-check {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

/* Password Match Section */
.password-match-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.match-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.match-indicator:empty {
    display: none;
    padding: 0;
}

.match-indicator svg {
    flex-shrink: 0;
}

.match-success {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    color: #10b981;
    border: 1.5px solid #6ee7b7;
}

.match-success svg {
    stroke: #10b981;
}

.match-error {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #ef4444;
    border: 1.5px solid #fca5a5;
}

.match-error svg {
    stroke: #ef4444;
}

.match-error.shake {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-6px); }
    20%, 40%, 60%, 80% { transform: translateX(6px); }
}




/* ===========================
   FORM FOOTER
=========================== */
.form-footer {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 24px;
}

.forgot-link {
    font-size: 0.9rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* ===========================
   PRIMARY BUTTON
=========================== */
.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--text-light);
    border: none;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 58, 64, 0.3);
}

.btn-primary svg {
    transition: transform 0.3s ease;
}

.btn-primary:hover svg {
    transform: translateX(4px);
}

/* ===========================
   ERROR MESSAGE
=========================== */
.error-message {
    color: #ef4444;
    font-size: 0.9rem;
    text-align: center;
    margin-top: 16px;
    display: none;
}

.error-message.show {
    display: block;
}

/* ===========================
   FORM DIVIDER
=========================== */
.form-divider {
    position: relative;
    text-align: center;
    margin: 32px 0 24px;
}

.form-divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: rgba(15, 58, 64, 0.15);
}

.form-divider span {
    position: relative;
    background: #ffffff;
    padding: 0 16px;
    font-size: 0.85rem;
    color: #626c73;
}

/* ===========================
   SIGNUP PROMPT
=========================== */
.signup-prompt {
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.signup-prompt a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.signup-prompt a:hover {
    text-decoration: underline;
}

/* ===========================
   CHECKBOX STYLING
=========================== */
.checkbox-group {
    margin: 24px 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    position: relative;
    font-size: 0.9rem;
    color: var(--text-dark);
    line-height: 1.6;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: relative;
    height: 20px;
    width: 20px;
    background-color: #f8f9fa;
    border: 2px solid rgba(15, 58, 64, 0.2);
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.checkbox-label:hover .checkmark {
    border-color: var(--primary);
}

.checkbox-label input:checked ~ .checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
}

.checkmark::after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label input:checked ~ .checkmark::after {
    display: block;
}

.checkbox-text {
    flex: 1;
}

.checkbox-text a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.checkbox-text a:hover {
    text-decoration: underline;
}

/* ===========================
   ANIMATIONS
=========================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================
   RESPONSIVE DESIGN
=========================== */

@media (max-width: 1024px) {
    .form-card {
        grid-template-columns: 1fr;
    }

    .form-brand {
        padding: 40px 30px;
    }

    .brand-logo {
        width: 80px;
        height: 80px;
    }

    .form-brand h2 {
        font-size: 1.5rem;
    }

    .form-box {
        padding: 50px 40px;
    }
}

@media (max-width: 768px) {
    .form-section {
        padding: 40px 20px;
    }

    .form-container {
        max-width: 100%;
    }

    .form-box {
        padding: 40px 30px;
    }

    .form-box h3 {
        font-size: 1.75rem;
    }

    .form-brand {
        display: none;
    }

    .input-with-icon input {
        padding: 12px 12px 12px 40px;
    }

    .btn-primary {
        padding: 12px;
    }
    
    .strength-requirements {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .form-section {
        padding: 30px 16px;
    }

    .form-box {
        padding: 30px 20px;
    }

    .form-box h3 {
        font-size: 1.5rem;
    }

    .form-subtitle {
        font-size: 0.9rem;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .input-with-icon input {
        font-size: 0.9rem;
        padding: 11px 11px 11px 38px;
    }

    .btn-primary {
        font-size: 1rem;
        padding: 11px;
    }

    .checkbox-label {
        font-size: 0.85rem;
    }
    
    .password-validation-wrapper {
        padding: 16px;
    }
    
    .requirement-item {
        font-size: 0.78rem;
    }
    
    .match-indicator {
        font-size: 0.82rem;
        padding: 10px 12px;
    }
}

@media (max-width: 360px) {
    .form-box {
        padding: 24px 16px;
    }

    .form-box h3 {
        font-size: 1.35rem;
    }
}
