﻿/* =========================================================
   FORCE NEXA CRM
   AUTH / LOGIN PAGE
========================================================= */


/* =========================================================
   ROOT
========================================================= */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #eff6ff;
    --text-dark: #111827;
    --text: #374151;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --input-bg: #ffffff;
    --success: #16a34a;
    --danger: #dc2626;
    --white: #ffffff;
    --shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
}


/* =========================================================
   RESET
========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}


html {
    width: 100%;
    min-height: 100%;
}


body {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-dark);
    background: #f8fafc;
    overflow-x: hidden;
}


/* =========================================================
   AUTH CONTAINER
========================================================= */

.auth-container {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    padding: 0;
}


/* =========================================================
   LOGIN PAGE
========================================================= */

.login-page {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(420px, 0.95fr) minmax(500px, 1.05fr);
    overflow: hidden;
}


/* =========================================================
   LEFT BRAND PANEL
========================================================= */

.login-brand-panel {
    position: relative;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(35px, 5vw, 90px) clamp(30px, 5vw, 90px);
    color: #ffffff;
    background: radial-gradient( circle at 20% 20%, rgba(59, 130, 246, 0.32), transparent 35% ), radial-gradient( circle at 80% 80%, rgba(37, 99, 235, 0.30), transparent 40% ), linear-gradient( 145deg, #0f172a 0%, #172554 48%, #1e40af 100% );
    overflow: hidden;
}


    /* Decorative circle */

    .login-brand-panel::before {
        content: "";
        position: absolute;
        width: 420px;
        height: 420px;
        right: -180px;
        top: -180px;
        border-radius: 50%;
        border: 1px solid rgba(255,255,255,0.10);
        box-shadow: 0 0 0 80px rgba(255,255,255,0.025), 0 0 0 160px rgba(255,255,255,0.015);
    }


/* =========================================================
   BRAND CONTENT
========================================================= */

.brand-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 650px;
    margin: auto;
}


/* =========================================================
   LOGO
========================================================= */

.brand-logo-wrapper {
    width: 76px;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
    padding: 10px;
    border-radius: 20px;
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.15);
    backdrop-filter: blur(12px);
}


.brand-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}


/* =========================================================
   BRAND HEADING
========================================================= */

.brand-heading h1 {
    margin: 0 0 10px;
    font-size: clamp(30px, 3vw, 48px);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -1.5px;
}


.brand-heading h2 {
    margin: 0 0 18px;
    font-size: clamp(18px, 1.7vw, 25px);
    line-height: 1.35;
    font-weight: 600;
    color: #dbeafe;
}


.brand-heading p {
    max-width: 600px;
    margin: 0;
    font-size: clamp(14px, 1.1vw, 17px);
    line-height: 1.75;
    color: #cbd5e1;
}


/* =========================================================
   FEATURES
========================================================= */

.login-features {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 18px;
    margin-top: 38px;
}


.login-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255,255,255,0.055);
    border: 1px solid rgba(255,255,255,0.075);
    transition: background 0.2s ease, transform 0.2s ease;
}


    .login-feature:hover {
        background: rgba(255,255,255,0.09);
        transform: translateY(-2px);
    }


.feature-icon {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #ffffff;
    background: rgba(59,130,246,0.25);
}


    .feature-icon i {
        font-size: 15px;
    }


.feature-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}


    .feature-text strong {
        font-size: 13px;
        font-weight: 600;
        color: #ffffff;
    }


    .feature-text span {
        font-size: 11px;
        line-height: 1.3;
        color: #94a3b8;
    }


/* =========================================================
   BRAND FOOTER
========================================================= */

.brand-footer {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    color: #94a3b8;
    font-size: 11px;
}


    .brand-footer i {
        margin-right: 5px;
        color: #60a5fa;
    }


.brand-footer-separator {
    opacity: 0.5;
}


/* =========================================================
   RIGHT LOGIN PANEL
========================================================= */

.login-form-panel {
    min-width: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(25px, 5vw, 80px);
    background: #f8fafc;
    overflow-y: auto;
}


/* =========================================================
   LOGIN WRAPPER
========================================================= */

.login-wrapper {
    width: 100%;
    max-width: 500px;
    margin: auto;
}


/* =========================================================
   LOGIN CARD
========================================================= */

.login-card {
    width: 100%;
    padding: clamp(25px, 4vw, 48px);
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid rgba(226,232,240,0.9);
    box-shadow: 0 20px 60px rgba(15,23,42,0.08);
}


/* =========================================================
   MOBILE BRAND
========================================================= */

.mobile-brand {
    display: none;
}


/* =========================================================
   LOGIN HEADER
========================================================= */

.login-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}


.login-icon {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    color: var(--primary);
    background: var(--primary-light);
}


    .login-icon i {
        font-size: 20px;
    }


.login-header h1 {
    margin: 0 0 5px;
    font-size: clamp(24px, 2.3vw, 32px);
    line-height: 1.2;
    font-weight: 750;
    letter-spacing: -0.8px;
    color: var(--text-dark);
}


.login-header p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-muted);
}


/* =========================================================
   ALERT
========================================================= */

.login-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    padding: 12px 14px;
    border-radius: 10px;
    color: #991b1b;
    background: #fef2f2;
    border: 1px solid #fecaca;
    font-size: 13px;
}


    .login-alert i {
        margin-top: 2px;
    }


/* =========================================================
   FORM FIELD
========================================================= */

.form-field {
    margin-bottom: 20px;
}


    .form-field label {
        display: block;
        margin-bottom: 8px;
        font-size: 13px;
        font-weight: 600;
        color: #374151;
    }


/* =========================================================
   INPUT
========================================================= */

.input-wrapper {
    position: relative;
    width: 100%;
}


    .input-wrapper .input-icon {
        position: absolute;
        left: 16px;
        top: 50%;
        z-index: 2;
        transform: translateY(-50%);
        color: #9ca3af;
        font-size: 14px;
        pointer-events: none;
    }


.form-control {
    width: 100%;
    height: 52px;
    padding: 0 46px;
    border: 1px solid #dbe1ea;
    border-radius: 12px;
    outline: none;
    background: var(--input-bg);
    color: var(--text-dark);
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}


    .form-control::placeholder {
        color: #9ca3af;
    }


    .form-control:hover {
        border-color: #cbd5e1;
    }


    .form-control:focus {
        border-color: var(--primary);
        background: #ffffff;
        box-shadow: 0 0 0 4px rgba(37,99,235,0.10);
    }


/* =========================================================
   PASSWORD
========================================================= */

.password-input {
    padding-right: 50px;
}


.password-toggle {
    position: absolute;
    right: 5px;
    top: 5px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 9px;
    color: #6b7280;
    background: transparent;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}


    .password-toggle:hover {
        color: var(--primary);
        background: #f1f5f9;
    }


/* =========================================================
   VALIDATION
========================================================= */

.validation-message {
    display: block;
    margin-top: 5px;
    color: var(--danger);
    font-size: 11px;
}


.input-validation-error {
    border-color: #fca5a5 !important;
    background: #fffafa;
}


    .input-validation-error:focus {
        box-shadow: 0 0 0 4px rgba(220,38,38,0.08);
    }


/* =========================================================
   LOGIN OPTIONS
========================================================= */

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin: 4px 0 24px;
}


.remember-option {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    user-select: none;
}


    .remember-option input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }


.custom-checkbox {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    color: transparent;
    background: #ffffff;
    transition: all 0.2s ease;
}


    .custom-checkbox i {
        font-size: 10px;
    }


.remember-option input:checked + .custom-checkbox {
    border-color: var(--primary);
    background: var(--primary);
    color: #ffffff;
}


.remember-text {
    font-size: 12px;
    color: #4b5563;
}


.forgot-link {
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}


    .forgot-link:hover {
        color: var(--primary-dark);
        text-decoration: underline;
    }


/* =========================================================
   LOGIN BUTTON
========================================================= */

.login-btn {
    width: 100%;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient( 135deg, #2563eb, #1d4ed8 );
    box-shadow: 0 8px 20px rgba(37,99,235,0.20);
    font-size: 14px;
    font-weight: 650;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}


    .login-btn:hover:not(:disabled) {
        transform: translateY(-1px);
        box-shadow: 0 12px 25px rgba(37,99,235,0.27);
    }


    .login-btn:active:not(:disabled) {
        transform: translateY(0);
    }


    .login-btn:disabled {
        cursor: not-allowed;
        opacity: 0.75;
    }


.login-btn-content {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
}


/* =========================================================
   SECURITY
========================================================= */

.security-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 22px;
    color: #94a3b8;
    font-size: 10px;
    text-align: center;
}


    .security-info i {
        color: var(--success);
    }


/* =========================================================
   COPYRIGHT
========================================================= */

.login-copyright {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #f1f5f9;
    color: #9ca3af;
    font-size: 10px;
    text-align: center;
}


/* =========================================================
   LARGE DESKTOP
========================================================= */

@media (min-width: 1600px) {

    .login-page {
        grid-template-columns: minmax(550px, 0.9fr) minmax(600px, 1.1fr);
    }


    .login-brand-panel {
        padding: 70px clamp(70px, 7vw, 140px);
    }


    .login-form-panel {
        padding: 70px clamp(70px, 8vw, 150px);
    }


    .login-card {
        max-width: 540px;
    }
}


/* =========================================================
   LAPTOP / NORMAL DESKTOP
========================================================= */

@media (max-width: 1200px) {

    .login-page {
        grid-template-columns: minmax(380px, 0.9fr) minmax(460px, 1.1fr);
    }


    .login-brand-panel {
        padding: 45px;
    }


    .login-form-panel {
        padding: 40px;
    }


    .login-features {
        gap: 10px;
    }
}


/* =========================================================
   SMALL LAPTOP / TABLET LANDSCAPE
========================================================= */

@media (max-width: 992px) {

    .login-page {
        grid-template-columns: 42% 58%;
    }


    .login-brand-panel {
        padding: 30px;
    }


    .brand-logo-wrapper {
        width: 62px;
        height: 62px;
        margin-bottom: 20px;
    }


    .brand-heading h1 {
        font-size: 30px;
    }


    .brand-heading h2 {
        font-size: 18px;
    }


    .brand-heading p {
        font-size: 13px;
        line-height: 1.6;
    }


    .login-features {
        grid-template-columns: 1fr;
        margin-top: 25px;
    }


    .login-feature {
        padding: 9px;
    }


    .feature-text span {
        display: none;
    }


    .login-form-panel {
        padding: 25px;
    }


    .login-card {
        padding: 30px 25px;
    }
}


/* =========================================================
   TABLET PORTRAIT
========================================================= */

@media (max-width: 768px) {

    .login-page {
        display: block;
        min-height: 100vh;
        min-height: 100dvh;
        overflow: visible;
    }


    /* Hide large brand panel */

    .login-brand-panel {
        display: none;
    }


    /* Full login */

    .login-form-panel {
        width: 100%;
        min-height: 100vh;
        min-height: 100dvh;
        padding: 25px 18px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient( 145deg, #f8fafc, #eef4ff );
        overflow: visible;
    }


    .login-wrapper {
        max-width: 520px;
    }


    .login-card {
        padding: 32px;
        border-radius: 20px;
    }


    .mobile-brand {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        margin-bottom: 28px;
        text-align: left;
    }


        .mobile-brand img {
            width: 48px;
            height: 48px;
            object-fit: contain;
        }


        .mobile-brand div {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }


        .mobile-brand strong {
            font-size: 17px;
            color: var(--text-dark);
        }


        .mobile-brand span {
            font-size: 10px;
            color: var(--text-muted);
        }


    .login-header {
        margin-bottom: 25px;
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 576px) {

    .login-form-panel {
        min-height: 100vh;
        min-height: 100dvh;
        padding: 18px 14px;
    }


    .login-wrapper {
        width: 100%;
    }


    .login-card {
        padding: 25px 20px;
        border-radius: 18px;
        box-shadow: 0 12px 35px rgba(15,23,42,0.07);
    }


    .mobile-brand {
        margin-bottom: 25px;
    }


        .mobile-brand img {
            width: 43px;
            height: 43px;
        }


        .mobile-brand strong {
            font-size: 16px;
        }


    .login-header {
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 23px;
    }


    .login-icon {
        flex-basis: 45px;
        width: 45px;
        height: 45px;
        border-radius: 12px;
    }


        .login-icon i {
            font-size: 17px;
        }


    .login-header h1 {
        font-size: 23px;
        letter-spacing: -0.5px;
    }


    .login-header p {
        font-size: 12px;
    }


    .form-field {
        margin-bottom: 18px;
    }


    .form-control {
        height: 50px;
        font-size: 13px;
    }


    .login-options {
        margin-bottom: 20px;
    }


    .login-btn {
        height: 50px;
    }
}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 400px) {

    .login-form-panel {
        padding: 12px 10px;
    }


    .login-card {
        padding: 22px 16px;
        border-radius: 16px;
    }


    .mobile-brand {
        margin-bottom: 22px;
    }


        .mobile-brand img {
            width: 40px;
            height: 40px;
        }


        .mobile-brand strong {
            font-size: 15px;
        }


        .mobile-brand span {
            font-size: 9px;
        }


    .login-header {
        gap: 10px;
    }


    .login-icon {
        flex-basis: 42px;
        width: 42px;
        height: 42px;
    }


    .login-header h1 {
        font-size: 21px;
    }


    .login-header p {
        font-size: 11px;
    }


    .form-field label {
        font-size: 12px;
    }


    .form-control {
        height: 48px;
        padding-left: 43px;
        font-size: 12px;
    }


    .login-options {
        flex-wrap: wrap;
        gap: 10px;
    }


    .remember-text,
    .forgot-link {
        font-size: 11px;
    }


    .login-btn {
        height: 48px;
        font-size: 13px;
    }


    .security-info {
        font-size: 9px;
    }


    .login-copyright {
        font-size: 9px;
    }
}


/* =========================================================
   VERY SMALL MOBILE
   320px / 360px
========================================================= */

@media (max-width: 340px) {

    .login-form-panel {
        padding: 8px;
    }


    .login-card {
        padding: 20px 13px;
    }


    .login-header h1 {
        font-size: 19px;
    }


    .login-header p {
        font-size: 10px;
    }


    .form-control {
        height: 46px;
    }


    .login-btn {
        height: 46px;
    }
}


/* =========================================================
   SHORT SCREEN
   Laptop with low vertical height
========================================================= */

@media (max-height: 700px) and (min-width: 769px) {

    .login-brand-panel {
        padding-top: 25px;
        padding-bottom: 25px;
    }


    .brand-logo-wrapper {
        width: 58px;
        height: 58px;
        margin-bottom: 15px;
    }


    .brand-heading h1 {
        font-size: 28px;
    }


    .brand-heading h2 {
        margin-bottom: 10px;
        font-size: 17px;
    }


    .brand-heading p {
        line-height: 1.45;
    }


    .login-features {
        margin-top: 20px;
    }


    .login-feature {
        padding: 7px;
    }


    .login-card {
        padding-top: 25px;
        padding-bottom: 25px;
    }


    .login-header {
        margin-bottom: 20px;
    }


    .form-field {
        margin-bottom: 14px;
    }
}


/* =========================================================
   TOUCH DEVICES
========================================================= */

@media (hover: none) and (pointer: coarse) {

    .login-feature:hover {
        transform: none;
    }


    .login-btn:hover:not(:disabled) {
        transform: none;
    }
}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
/* =========================================================
   FORGOT PASSWORD
========================================================= */

.forgot-password-page .login-header {
    align-items: flex-start;
}


.forgot-password-page .login-icon {
    color: #7c3aed;
    background: #f5f3ff;
}


/* =========================================================
   SUCCESS ALERT
========================================================= */

.login-success {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    padding: 12px 14px;
    border-radius: 10px;
    color: #166534;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    font-size: 13px;
}


    .login-success i {
        margin-top: 2px;
    }


/* =========================================================
   FORGOT INFO
========================================================= */

.forgot-info {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: -4px;
    margin-bottom: 22px;
    padding: 13px 14px;
    border-radius: 11px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}


.forgot-info-icon {
    flex: 0 0 20px;
    color: #2563eb;
    font-size: 14px;
}


.forgot-info p {
    margin: 0;
    color: #64748b;
    font-size: 11px;
    line-height: 1.6;
}


/* =========================================================
   BACK TO LOGIN
========================================================= */

.back-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}


    .back-login:hover {
        color: #2563eb;
    }


    .back-login i {
        font-size: 11px;
    }


/* =========================================================
   FORGOT PASSWORD MOBILE
========================================================= */

@media (max-width: 576px) {

    .forgot-info {
        padding: 11px 12px;
    }


        .forgot-info p {
            font-size: 10px;
        }


    .back-login {
        margin-top: 16px;
    }
}


@media (max-width: 400px) {

    .forgot-info {
        gap: 8px;
        padding: 10px;
    }


        .forgot-info p {
            font-size: 9px;
        }
}