﻿/* ============================================
   ACCOUNT PAGES — CLIENT LOGIN & REGISTER
   Light Theme — Primary: rgb(0, 160, 232)
   ============================================ */

/* ============================================
   AUTH SECTION
   ============================================ */

.auth-section {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient( 160deg, #f0f7ff 0%, #e8f2fc 30%, #dfedfb 60%, #d6e8fa 100% );
    padding: 2rem 0;
    position: relative;
    overflow: hidden;
}

/* ============================================
   FLOATING BACKGROUND SHAPES
   ============================================ */

.auth-bg-shape {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.auth-bg-shape-1 {
    width: 500px;
    height: 500px;
    top: -180px;
    right: -120px;
    background: radial-gradient( circle, rgba(0, 160, 232, 0.07) 0%, transparent 70% );
    animation: floatShape1 20s ease-in-out infinite;
}

.auth-bg-shape-2 {
    width: 400px;
    height: 400px;
    bottom: -120px;
    left: -100px;
    background: radial-gradient( circle, rgba(0, 160, 232, 0.05) 0%, transparent 70% );
    animation: floatShape2 25s ease-in-out infinite;
}

.auth-bg-shape-3 {
    width: 250px;
    height: 250px;
    top: 40%;
    left: 60%;
    background: radial-gradient( circle, rgba(0, 100, 170, 0.04) 0%, transparent 70% );
    animation: floatShape3 18s ease-in-out infinite;
}

@keyframes floatShape1 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-30px, 20px) scale(1.05);
    }
}

@keyframes floatShape2 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(20px, -15px) scale(1.03);
    }
}

@keyframes floatShape3 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-15px, 25px) scale(0.97);
    }
}

/* ============================================
   AUTH CARD
   ============================================ */

.auth-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 2.75rem 2.5rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04);
    border: 1px solid #e8edf3;
    position: relative;
    z-index: 1;
    animation: authCardIn 0.5s ease both;
}

.auth-card-wide {
    padding: 2.5rem 2.75rem;
}

@keyframes authCardIn {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   AUTH HEADER
   ============================================ */

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo-link {
    display: inline-block;
    margin-bottom: 1.25rem;
    transition: opacity 0.2s ease;
}

    .auth-logo-link:hover {
        opacity: 0.8;
    }

.auth-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.auth-title {
    font-size: 1.65rem;
    font-weight: 800;
    color: #1a2b42;
    margin-bottom: 0.4rem;
    letter-spacing: -0.3px;
}

.auth-subtitle {
    font-size: 0.95rem;
    color: #6b7f96;
    margin-bottom: 0;
    line-height: 1.5;
}

/* ============================================
   AUTH ALERT
   ============================================ */

.auth-alert {
    border-radius: 14px;
    font-size: 0.88rem;
    padding: 0.85rem 1.1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    border: none;
    background-color: #fef2f2;
    color: #991b1b;
}

.auth-alert-icon {
    flex-shrink: 0;
    font-size: 1.2rem;
    margin-top: 1px;
    color: #dc2626;
}

.auth-alert-content p {
    margin: 0;
    color: #991b1b;
    font-size: 0.88rem;
    line-height: 1.5;
}

    .auth-alert-content p + p {
        margin-top: 0.25rem;
    }

/* ============================================
   STEP INDICATOR (REGISTER)
   ============================================ */

.auth-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.auth-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: default;
}

.auth-step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    background: #f0f4f8;
    color: #a8b5c5;
    border: 2px solid #e2e8f0;
    transition: all 0.35s ease;
    flex-shrink: 0;
}

.auth-step-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #a8b5c5;
    transition: color 0.35s ease;
    white-space: nowrap;
}

/* Active Step */
.auth-step.active .auth-step-number {
    background: linear-gradient(135deg, rgb(0, 160, 232), rgb(0, 130, 200));
    color: #ffffff;
    border-color: rgb(0, 160, 232);
    box-shadow: 0 3px 12px rgba(0, 160, 232, 0.3);
}

.auth-step.active .auth-step-label {
    color: #1a2b42;
}

/* Completed Step */
.auth-step.completed .auth-step-number {
    background: #10b981;
    color: #ffffff;
    border-color: #10b981;
}

.auth-step.completed .auth-step-label {
    color: #5a6e84;
}

/* Connector */
.auth-step-connector {
    flex: 1;
    height: 2px;
    background: #e2e8f0;
    margin: 0 0.75rem;
    border-radius: 1px;
    transition: background 0.35s ease;
    min-width: 20px;
}

    .auth-step-connector.completed {
        background: #10b981;
    }

/* ============================================
   STEP PANELS
   ============================================ */

.auth-step-panel {
    display: none;
    animation: stepFadeIn 0.35s ease;
}

    .auth-step-panel.active {
        display: block;
    }

@keyframes stepFadeIn {
    from {
        opacity: 0;
        transform: translateX(15px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.auth-step-panel-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(0, 160, 232, 0.1);
}

    .auth-step-panel-header i {
        font-size: 1.4rem;
        color: rgb(0, 160, 232);
    }

    .auth-step-panel-header h3 {
        font-size: 1.15rem;
        font-weight: 700;
        color: #1a2b42;
        margin: 0;
    }

/* Step Navigation */
.auth-step-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid #f0f3f7;
}

/* ============================================
   FORM FIELDS
   ============================================ */

.auth-field {
    margin-bottom: 1.25rem;
}

.auth-label {
    display: block;
    font-weight: 600;
    font-size: 0.88rem;
    color: #1a2b42;
    margin-bottom: 0.45rem;
}

    .auth-label .text-danger {
        font-size: 0.75rem;
    }

/* Input Wrapper */
.auth-input-wrapper {
    position: relative;
}

/* Left Icon */
.auth-input-icon-left {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #a8b5c5;
    font-size: 1rem;
    pointer-events: none;
    z-index: 2;
    transition: color 0.2s ease;
}

.auth-input:focus ~ .auth-input-icon-left,
.auth-input:focus + .auth-input-icon-left {
    color: rgb(0, 160, 232);
}

/* Ensure the icon changes color when input with icon-left is focused */
.auth-input-wrapper:focus-within .auth-input-icon-left {
    color: rgb(0, 160, 232);
}

/* Auth Input */
.auth-input {
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    color: #1a2b42;
    background-color: #fafbfd;
    transition: all 0.25s ease;
    width: 100%;
}

    .auth-input.has-icon-left {
        padding-left: 2.75rem;
    }

    .auth-input:focus {
        border-color: rgb(0, 160, 232);
        box-shadow: 0 0 0 4px rgba(0, 160, 232, 0.1);
        background-color: #ffffff;
        outline: none;
    }

    .auth-input::placeholder {
        color: #a8b5c5;
    }

/* Select override */
select.auth-input {
    appearance: auto;
    cursor: pointer;
}

/* Validation Error */
.auth-input.input-validation-error {
    border-color: #ef4444;
}

    .auth-input.input-validation-error:focus {
        box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
    }

.auth-field-validation {
    display: block;
    font-size: 0.8rem;
    color: #ef4444;
    margin-top: 0.35rem;
    min-height: 0;
}

    .auth-field-validation:not(:empty) {
        min-height: 1.1em;
    }

/* ============================================
   TOGGLE PASSWORD
   ============================================ */

.auth-toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #a8b5c5;
    font-size: 1.05rem;
    cursor: pointer;
    padding: 0.25rem 0.4rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    line-height: 1;
    z-index: 2;
}

    .auth-toggle-password:hover {
        color: rgb(0, 160, 232);
        background: rgba(0, 160, 232, 0.06);
    }

/* ============================================
   PASSWORD STRENGTH
   ============================================ */

.password-strength {
    display: none;
}

    .password-strength.visible {
        display: block;
        animation: fadeIn 0.3s ease;
    }

.password-strength-bar {
    height: 4px;
    background: #e8edf3;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.35rem;
}

.password-strength-fill {
    height: 100%;
    width: 0;
    border-radius: 4px;
    transition: width 0.35s ease, background-color 0.35s ease;
}

    .password-strength-fill.strength-weak {
        width: 25%;
        background-color: #ef4444;
    }

    .password-strength-fill.strength-fair {
        width: 50%;
        background-color: #f59e0b;
    }

    .password-strength-fill.strength-good {
        width: 75%;
        background-color: #10b981;
    }

    .password-strength-fill.strength-strong {
        width: 100%;
        background-color: #059669;
    }

.password-strength-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7f96;
}

    .password-strength-text.text-weak {
        color: #ef4444;
    }

    .password-strength-text.text-fair {
        color: #f59e0b;
    }

    .password-strength-text.text-good {
        color: #10b981;
    }

    .password-strength-text.text-strong {
        color: #059669;
    }

/* ============================================
   PASSWORD MATCH INDICATOR
   ============================================ */

.password-match-indicator {
    display: none;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
}

    .password-match-indicator.visible {
        display: flex;
        animation: fadeIn 0.2s ease;
    }

    .password-match-indicator.match {
        color: #10b981;
    }

    .password-match-indicator.no-match {
        color: #ef4444;
    }

/* ============================================
   PASSWORD REQUIREMENTS CHECKLIST
   ============================================ */

.password-requirements {
    background: #f8fafc;
    border: 1px solid #e8edf3;
    border-radius: 14px;
    padding: 1rem 1.25rem;
}

.password-req-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #5a6e84;
    margin-bottom: 0.65rem;
}

.password-req-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem 1rem;
}

.password-req-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: #a8b5c5;
    transition: color 0.25s ease;
}

    .password-req-item i {
        font-size: 0.65rem;
        transition: all 0.25s ease;
    }

    .password-req-item.met {
        color: #10b981;
    }

        .password-req-item.met i {
            font-size: 0.78rem;
        }

/* ============================================
   CHECKBOX
   ============================================ */

.auth-checkbox-field {
    margin-bottom: 1.5rem;
}

.auth-checkbox {
    border: 1.5px solid #d0dae6;
    border-radius: 5px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .auth-checkbox:checked {
        background-color: rgb(0, 160, 232);
        border-color: rgb(0, 160, 232);
    }

    .auth-checkbox:focus {
        box-shadow: 0 0 0 3px rgba(0, 160, 232, 0.15);
        border-color: rgb(0, 160, 232);
    }

.auth-checkbox-label {
    font-size: 0.88rem;
    color: #5a6e84;
    cursor: pointer;
    user-select: none;
}

/* ============================================
   FORGOT PASSWORD LINK
   ============================================ */

.auth-forgot-link {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgb(0, 160, 232);
    text-decoration: none;
    transition: color 0.2s ease;
}

    .auth-forgot-link:hover {
        color: rgb(0, 130, 200);
        text-decoration: underline;
    }

/* ============================================
   BUTTONS
   ============================================ */

.auth-btn-primary {
    background: linear-gradient(135deg, rgb(0, 160, 232), rgb(0, 130, 200));
    color: #ffffff;
    border: none;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.8rem 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.2px;
}

    .auth-btn-primary:hover {
        background: linear-gradient(135deg, rgb(0, 130, 200), rgb(0, 100, 170));
        color: #ffffff;
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 160, 232, 0.3);
    }

    .auth-btn-primary:active {
        transform: translateY(0);
        box-shadow: none;
    }

/* Outline Button (Back) */
.auth-btn-outline {
    background: transparent;
    color: #5a6e84;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 1.4rem;
    transition: all 0.25s ease;
}

    .auth-btn-outline:hover {
        background: #f5f8fc;
        border-color: #d0dae6;
        color: #1a2b42;
    }

/* Loading State */
.auth-btn-primary.is-loading .btn-text {
    display: none;
}

.auth-btn-primary.is-loading .btn-loading {
    display: inline-flex !important;
    align-items: center;
}

/* ============================================
   DIVIDER
   ============================================ */

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.75rem 0;
}

    .auth-divider::before,
    .auth-divider::after {
        content: '';
        flex: 1;
        height: 1px;
        background: #e8edf3;
    }

    .auth-divider span {
        font-size: 0.82rem;
        font-weight: 600;
        color: #a8b5c5;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

/* ============================================
   SOCIAL LOGIN
   ============================================ */

.auth-social {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.auth-btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.7rem 1rem;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.92rem;
    transition: all 0.25s ease;
    border: 1.5px solid #e2e8f0;
    background: #fafbfd;
    color: #1a2b42;
}

    .auth-btn-social:hover {
        background: #f0f4f8;
        border-color: #d0dae6;
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        color: #1a2b42;
    }

.auth-social-icon {
    flex-shrink: 0;
}

/* ============================================
   AUTH FOOTER
   ============================================ */

.auth-footer {
    text-align: center;
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid #f0f3f7;
}

    .auth-footer p {
        font-size: 0.9rem;
        color: #6b7f96;
        margin: 0;
    }

.auth-link {
    font-weight: 700;
    color: rgb(0, 160, 232);
    text-decoration: none;
    transition: color 0.2s ease;
}

    .auth-link:hover {
        color: rgb(0, 130, 200);
        text-decoration: underline;
    }

/* ============================================
   MODALS
   ============================================ */

.auth-modal-content {
    border: none;
    border-radius: 20px;
    overflow: hidden;
}

.auth-modal-header {
    background: linear-gradient(135deg, rgb(0, 160, 232), rgb(0, 130, 200));
    color: #ffffff;
    border-bottom: none;
    padding: 1.15rem 1.5rem;
}

    .auth-modal-header .modal-title {
        font-weight: 700;
        font-size: 1.05rem;
    }

.auth-modal-body {
    padding: 1.5rem;
    color: #5a6e84;
    font-size: 0.92rem;
    line-height: 1.75;
    max-height: 60vh;
}

.auth-modal-footer {
    border-top: 1px solid #f0f3f7;
    padding: 0.85rem 1.5rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 991.98px) {
    .auth-step-label {
        display: none;
    }

    .auth-step-connector {
        min-width: 30px;
    }
}

@media (max-width: 767.98px) {
    .auth-card {
        padding: 2rem 1.5rem;
        border-radius: 20px;
        margin: 0 0.5rem;
    }

    .auth-card-wide {
        padding: 2rem 1.5rem;
    }

    .auth-title {
        font-size: 1.45rem;
    }

    .auth-logo {
        height: 40px;
    }

    .password-req-grid {
        grid-template-columns: 1fr;
    }

    .auth-step-nav {
        gap: 0.75rem;
    }

    .auth-btn-primary,
    .auth-btn-outline {
        padding: 0.7rem 1.2rem;
        font-size: 0.92rem;
    }
}

@media (max-width: 575.98px) {
    .auth-section {
        padding: 1rem 0;
        align-items: flex-start;
        padding-top: 1.5rem;
    }

    .auth-card {
        padding: 1.75rem 1.25rem;
        border-radius: 18px;
        box-shadow: 0 2px 16px rgba(0, 0, 0, 0.05);
    }

    .auth-title {
        font-size: 1.35rem;
    }

    .auth-subtitle {
        font-size: 0.88rem;
    }

    .auth-input {
        padding: 0.7rem 0.9rem;
        font-size: 0.9rem;
    }

        .auth-input.has-icon-left {
            padding-left: 2.5rem;
        }

    .auth-steps {
        padding: 0;
    }

    .auth-step-number {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .auth-step-connector {
        min-width: 20px;
        margin: 0 0.4rem;
    }
}

/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    .auth-card,
    .auth-step-panel {
        animation: none;
    }

    .auth-bg-shape {
        animation: none;
    }

    .auth-input,
    .auth-btn-primary,
    .auth-btn-outline,
    .auth-btn-social,
    .auth-toggle-password,
    .auth-step-number,
    .auth-step-label,
    .auth-step-connector,
    .password-strength-fill,
    .password-req-item {
        transition: none;
    }
}

/* ============================================
   FADE-IN UTILITY
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}
