/* ══════════════════════════════════════════════════════════════════════════════
   ACCENDLY AUTHENTICATION PAGES - SHARED STYLES
   This file contains all styles for Login, Register, and ForgotPassword pages
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Root Layout ──────────────────────────────────────────────────────────── */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    background: linear-gradient(135deg, #0E0C19 0%, #1E1A2E 50%, #2A1F4A 100%);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    padding: 20px;
}

.login-wrapper {
    display: flex;
    width: 100%;
    max-width: 1200px;
    height: 100%;
    max-height: 600px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3),
                0 0 1px rgba(108, 75, 255, 0.3);
    overflow: hidden;
}

/* ── Left Side: Branding ──────────────────────────────────────────────────── */
.login-branding {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50%;
    background: linear-gradient(135deg, #6C4BFF 0%, #8B6FFF 100%);
    padding: 60px 40px;
    color: white;
}

.login-branding-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 100%;
}

.login-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.login-logo svg {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.logo-text {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.branding-title {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
    letter-spacing: -0.5px;
}

.branding-subtitle {
    font-size: 16px;
    font-weight: 400;
    opacity: 0.9;
    margin: 0;
}

.branding-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    flex-shrink: 0;
    font-size: 12px;
}

.feature-text {
    opacity: 0.95;
}

/* ── Right Side: Login Form ───────────────────────────────────────────────── */
.login-form-container {
    display: flex;
    flex-direction: column;
    width: 50%;
    padding: 60px;
    background: white;
    overflow-y: auto;
}

.login-form-content {
    display: flex;
    flex-direction: column;
    gap: 28px;
    flex: 1;
}

.form-header {
    margin-bottom: 10px;
}

.form-header h2 {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #2A2A2A;
    letter-spacing: -0.5px;
}

.form-header p {
    font-size: 14px;
    color: #6B6B8A;
    margin: 0;
}

/* ── Alerts ───────────────────────────────────────────────────────────────── */
.alert {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.alert-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    font-size: 16px;
}

.alert strong {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

.alert p {
    margin: 0;
}

.alert-error {
    background: #FEF2F2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

.alert-error .alert-icon {
    color: #DC2626;
}

.alert-success {
    background: #F0FDF4;
    color: #166534;
    border: 1px solid #BBF7D0;
}

.alert-success .alert-icon {
    color: #22C55E;
}

/* ── Form Styling ─────────────────────────────────────────────────────────── */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 14px;
    font-weight: 600;
    color: #2A2A2A;
}

.form-control {
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid #E8E8F2;
    border-radius: 8px;
    background: white;
    color: #2A2A2A;
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #6C4BFF;
    box-shadow: 0 0 0 3px rgba(108, 75, 255, 0.1);
}

.form-control:disabled {
    background: #F9F9FB;
    color: #9B9BB7;
    cursor: not-allowed;
}

.form-control::placeholder {
    color: #9B9BB7;
}

/* ── Password Input ───────────────────────────────────────────────────────── */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 16px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.password-toggle:hover {
    opacity: 0.9;
}

.password-toggle:active {
    opacity: 1;
}

/* ── Form Options (Remember Me, Forgot Password) ──────────────────────────── */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.form-check-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #6C4BFF;
}

.form-check-label {
    font-size: 13px;
    color: #6B6B8A;
    cursor: pointer;
    user-select: none;
}

.forgot-password-link {
    font-size: 13px;
    color: #6C4BFF;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-password-link:hover {
    color: #5A3BD0;
    text-decoration: underline;
}

/* ── Button ───────────────────────────────────────────────────────────────── */
.btn-login {
    padding: 11px 16px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
}

.btn-primary {
    background: #6C4BFF;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #5A3BD0;
    box-shadow: 0 4px 12px rgba(108, 75, 255, 0.3);
}

.btn-primary:active:not(:disabled) {
    background: #4A2BA0;
}

.btn-primary:disabled {
    background: #C8B8FF;
    cursor: not-allowed;
    opacity: 0.8;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Validation Errors ────────────────────────────────────────────────────── */
.validation-message {
    font-size: 12px;
    color: #DC2626;
    display: block;
    margin-top: 4px;
}

/* ── Form Footer ──────────────────────────────────────────────────────────── */
.form-footer {
    text-align: center;
    padding-top: 12px;
    border-top: 1px solid #E8E8F2;
}

.signup-text {
    font-size: 14px;
    color: #6B6B8A;
    margin: 0;
}

.signup-link {
    color: #6C4BFF;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.signup-link:hover {
    color: #5A3BD0;
    text-decoration: underline;
}

/* ── Login Footer ─────────────────────────────────────────────────────────── */
.login-footer {
    text-align: center;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid #E8E8F2;
}

.login-footer p {
    font-size: 12px;
    color: #9B9BB7;
    margin: 0;
}

/* ── Blank Layout ─────────────────────────────────────────────────────────── */
.blank-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ── Additional Form Helpers (Register Page) ────────────────────────────── */
.password-hint {
    display: block;
    font-size: 12px;
    color: #9B9BB7;
    margin-top: 4px;
}

.form-check-agreement {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background: #F9F9FB;
    border-radius: 6px;
}

.form-check-agreement .form-check-input {
    margin-top: 3px;
    flex-shrink: 0;
}

.form-check-agreement .form-check-label {
    font-size: 13px;
    color: #6B6B8A;
    margin: 0;
    padding: 0;
}

.form-check-agreement a {
    color: #6C4BFF;
    text-decoration: none;
    font-weight: 500;
}

.form-check-agreement a:hover {
    text-decoration: underline;
}

/* ── Forgot Password / Reset Pages ──────────────────────────────────────── */
.verification-info {
    font-size: 13px;
    color: #6B6B8A;
    background: #F9F9FB;
    padding: 12px 14px;
    border-radius: 6px;
    margin: -8px 0 12px 0;
}

.verification-info strong {
    color: #2A2A2A;
}

.btn-link-secondary {
    background: none;
    border: none;
    color: #6C4BFF;
    font-size: 13px;
    cursor: pointer;
    padding: 8px 0;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    width: 100%;
    text-align: center;
}

.btn-link-secondary:hover:not(:disabled) {
    color: #5A3BD0;
    text-decoration: underline;
}

.btn-link-secondary:disabled {
    color: #C8B8FF;
    cursor: not-allowed;
}

/* ══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN
   ══════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .login-wrapper {
        max-height: none;
        height: auto;
    }

    .login-branding {
        width: 100%;
        padding: 40px;
        margin-bottom: 0;
    }

    .login-form-container {
        width: 100%;
        padding: 40px;
    }

    .branding-title {
        font-size: 28px;
    }

    .branding-subtitle {
        font-size: 14px;
    }

    .branding-features {
        display: none;
    }

    .login-wrapper {
        flex-direction: column-reverse;
    }
}

@media (max-width: 768px) {
    .login-container {
        padding: 16px;
    }

    .login-wrapper {
        border-radius: 12px;
    }

    .login-branding {
        padding: 32px 24px;
    }

    .login-form-container {
        padding: 32px 24px;
    }

    .login-logo {
        margin-bottom: 16px;
    }

    .login-logo svg {
        width: 40px;
        height: 40px;
    }

    .logo-text {
        font-size: 24px;
    }

    .branding-title {
        font-size: 24px;
    }

    .form-header h2 {
        font-size: 24px;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-control {
        width: 100%;
    }

    .forgot-password-link {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 12px;
    }

    .login-wrapper {
        border-radius: 8px;
    }

    .login-branding {
        padding: 24px 16px;
    }

    .login-form-container {
        padding: 24px 16px;
    }

    .login-branding-content {
        gap: 24px;
    }

    .branding-title {
        font-size: 20px;
    }

    .branding-subtitle {
        font-size: 13px;
    }

    .form-header h2 {
        font-size: 20px;
    }

    .form-header p {
        font-size: 12px;
    }

    .form-control {
        padding: 9px 12px;
        font-size: 16px; /* Prevent zoom on iOS */
    }

    .form-label {
        font-size: 13px;
    }

    .form-check-label {
        font-size: 12px;
    }

    .btn-login {
        padding: 10px 12px;
        font-size: 13px;
        min-height: 40px;
    }

    .alert {
        padding: 10px 12px;
        font-size: 12px;
    }

    .form-footer {
        padding-top: 8px;
    }

    .signup-text {
        font-size: 12px;
    }

    .login-footer p {
        font-size: 11px;
    }
}

/* ── Dark Mode Support ────────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
    .login-wrapper {
        background: #1E1A2E;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                    0 0 1px rgba(108, 75, 255, 0.5);
    }

    .form-header h2 {
        color: #F0EEFF;
    }

    .form-header p {
        color: #9B96C4;
    }

    .form-label {
        color: #F0EEFF;
    }

    .form-control {
        background: #0E0C19;
        color: #F0EEFF;
        border-color: #2A2547;
    }

    .form-control::placeholder {
        color: #6B6B8A;
    }

    .form-control:focus {
        border-color: #8B6FFF;
        box-shadow: 0 0 0 3px rgba(139, 111, 255, 0.2);
    }

    .form-control:disabled {
        background: #2A2547;
        color: #6B6B8A;
    }

    .form-check-label {
        color: #9B96C4;
    }

    .form-footer {
        border-color: #2A2547;
    }

    .login-footer {
        border-color: #2A2547;
    }

    .form-options {
        border-color: #2A2547;
    }

    .signup-text {
        color: #9B96C4;
    }

    .login-footer p {
        color: #6B6B8A;
    }

    .form-check-agreement {
        background: #2A2547;
    }

    .form-check-agreement .form-check-label {
        color: #9B96C4;
    }

    .password-hint {
        color: #6B6B8A;
    }

    .verification-info {
        background: #2A2547;
        color: #9B96C4;
    }

    .verification-info strong {
        color: #F0EEFF;
    }
}

/* ── Print Styles ─────────────────────────────────────────────────────────── */
@media print {
    .login-container {
        background: white;
    }

    .login-branding {
        display: none;
    }

    .login-wrapper {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
