/*
 * Cyber Garage US
 * Customer Portal Login
 */

:root {
    --cgcl-blue-950: #031522;
    --cgcl-blue-900: #061e34;
    --cgcl-blue-850: #082943;
    --cgcl-blue-800: #0a3658;
    --cgcl-blue-700: #0d5488;
    --cgcl-blue-600: #126ead;
    --cgcl-blue-500: #168cff;
    --cgcl-blue-400: #54bfff;
    --cgcl-blue-300: #89d6ff;
    --cgcl-text: #eef8ff;
    --cgcl-muted: #aec9dc;
    --cgcl-border: rgba(84, 191, 255, 0.45);
    --cgcl-field: #061a2b;
}

html {
    min-height: 100%;
    background: #020d17 !important;
}

body.cg-us-customer-login {
    min-height: 100vh;
    color: var(--cgcl-text) !important;
    background:
        radial-gradient(
            circle at 13% 4%,
            rgba(22, 140, 255, 0.18),
            transparent 31%
        ),
        radial-gradient(
            circle at 88% 87%,
            rgba(84, 191, 255, 0.09),
            transparent 29%
        ),
        linear-gradient(
            145deg,
            #061522,
            #020d17
        ) fixed !important;
}

body.cg-us-customer-login .app-content,
body.cg-us-customer-login .content-wrapper,
body.cg-us-customer-login .content-body,
body.cg-us-customer-login .auth-wrapper {
    background: transparent !important;
}

body.cg-us-customer-login .auth-wrapper {
    display: flex;
    min-height: 100vh;
    padding: 26px 16px !important;
    align-items: center;
    justify-content: center;
}

body.cg-us-customer-login .auth-inner {
    width: 100%;
    max-width: 540px;
    padding: 0 !important;
}

/* Main portal card */
body.cg-us-customer-login .auth-inner > .card {
    position: relative;
    overflow: hidden;
    color: var(--cgcl-text) !important;
    border: 1px solid rgba(84, 191, 255, 0.54) !important;
    border-radius: 20px !important;
    background:
        linear-gradient(
            150deg,
            rgba(10, 48, 77, 0.98),
            rgba(3, 20, 34, 0.99)
        ) !important;
    box-shadow:
        0 25px 65px rgba(0, 0, 0, 0.39),
        0 0 0 1px rgba(84, 191, 255, 0.05) !important;
}

body.cg-us-customer-login .auth-inner > .card::before {
    position: absolute;
    z-index: 3;
    top: 0;
    right: 0;
    left: 0;
    height: 6px;
    background:
        linear-gradient(
            90deg,
            #0d5488,
            #168cff,
            #54bfff
        );
    content: "";
}

body.cg-us-customer-login .card-body {
    padding: 34px 42px 40px !important;
    background: transparent !important;
}

/* Logo panel */
body.cg-us-customer-login .brand-logo {
    display: flex !important;
    width: calc(100% + 84px);
    min-height: 235px;
    margin: -34px -42px 0 !important;
    padding: 30px 60px 20px;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(84, 191, 255, 0.35);
    background:
        radial-gradient(
            circle at 50% 35%,
            rgba(22, 140, 255, 0.17),
            transparent 45%
        ),
        linear-gradient(
            145deg,
            #0a2d49,
            #061d30
        ) !important;
}

body.cg-us-customer-login .brand-logo img {
    display: block;
    width: 185px !important;
    height: 185px !important;
    max-width: 185px !important;
    margin: 0 !important;
    object-fit: contain;
    filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.40));
}

/* Customer Portal blue header */
body.cg-us-customer-login .card-title {
    width: calc(100% + 84px);
    min-height: 75px;
    margin: 0 -42px !important;
    padding: 21px 42px 8px;
    color: #fff !important;
    background:
        linear-gradient(
            105deg,
            #082943 0%,
            #0d619c 65%,
            #168cff 100%
        ) !important;
    font-size: 25px;
    font-weight: 750;
    text-align: left !important;
}

body.cg-us-customer-login .card-title + .card-text {
    width: calc(100% + 84px);
    min-height: 56px;
    margin: 0 -42px 26px !important;
    padding: 5px 42px 18px;
    color: #d5ecfa !important;
    border-bottom: 1px solid rgba(137, 214, 255, 0.37);
    background:
        linear-gradient(
            105deg,
            #082943 0%,
            #0d619c 65%,
            #168cff 100%
        ) !important;
    font-size: 14px;
    text-align: left !important;
}

/* Login form */
body.cg-us-customer-login .auth-login-form {
    margin-top: 0 !important;
}

body.cg-us-customer-login .form-group {
    margin-bottom: 20px;
}

body.cg-us-customer-login .form-label,
body.cg-us-customer-login label {
    display: block;
    margin-bottom: 8px;
    color: #dcefff !important;
    font-size: 13px;
    font-weight: 700;
}

body.cg-us-customer-login .form-control {
    width: 100%;
    min-height: 55px;
    padding: 12px 15px;
    color: #fff !important;
    border: 1px solid rgba(84, 191, 255, 0.43) !important;
    border-radius: 10px !important;
    outline: none;
    background: var(--cgcl-field) !important;
    font-size: 15px;
}

body.cg-us-customer-login .form-control::placeholder {
    color: #728fa5 !important;
    opacity: 1;
}

body.cg-us-customer-login .form-control:hover {
    border-color: var(--cgcl-blue-400) !important;
}

body.cg-us-customer-login .form-control:focus {
    color: #fff !important;
    border-color: var(--cgcl-blue-300) !important;
    background: #041725 !important;
    box-shadow: 0 0 0 4px rgba(22, 140, 255, 0.18) !important;
}

/* Blue Sign In button */
body.cg-us-customer-login .auth-login-form .btn-primary {
    min-height: 56px;
    margin-top: 7px;
    color: #fff !important;
    border: 1px solid var(--cgcl-blue-400) !important;
    border-radius: 10px !important;
    background:
        linear-gradient(
            135deg,
            #0d619c,
            #168cff
        ) !important;
    box-shadow: 0 11px 23px rgba(10, 92, 153, 0.25) !important;
    font-size: 16px;
    font-weight: 750;
}

body.cg-us-customer-login .auth-login-form .btn-primary:hover,
body.cg-us-customer-login .auth-login-form .btn-primary:focus {
    color: #fff !important;
    border-color: var(--cgcl-blue-300) !important;
    background:
        linear-gradient(
            135deg,
            #168cff,
            #54bfff
        ) !important;
}

/* Login status messages */
body.cg-us-customer-login .alert {
    width: calc(100% - 28px);
    max-width: 540px;
    margin: 15px auto;
    color: #fff !important;
    border: 1px solid rgba(84, 191, 255, 0.52) !important;
    border-radius: 10px !important;
    background:
        linear-gradient(
            110deg,
            #0a3658,
            #126ead
        ) !important;
}

body.cg-us-customer-login .alert-danger {
    border-color: rgba(255, 116, 129, 0.65) !important;
    background:
        linear-gradient(
            110deg,
            #57253b,
            #983b55
        ) !important;
}

/* Mobile */
@media (max-width: 575.98px) {
    body.cg-us-customer-login .auth-wrapper {
        padding: 12px 8px !important;
        align-items: flex-start;
    }

    body.cg-us-customer-login .auth-inner {
        max-width: 100%;
    }

    body.cg-us-customer-login .card-body {
        padding: 27px 25px 31px !important;
    }

    body.cg-us-customer-login .brand-logo {
        width: calc(100% + 50px);
        min-height: 202px;
        margin: -27px -25px 0 !important;
        padding: 25px 45px 16px;
    }

    body.cg-us-customer-login .brand-logo img {
        width: 155px !important;
        height: 155px !important;
        max-width: 155px !important;
    }

    body.cg-us-customer-login .card-title {
        width: calc(100% + 50px);
        min-height: 68px;
        margin-right: -25px !important;
        margin-left: -25px !important;
        padding: 18px 25px 7px;
        font-size: 22px;
    }

    body.cg-us-customer-login .card-title + .card-text {
        width: calc(100% + 50px);
        min-height: 52px;
        margin-right: -25px !important;
        margin-left: -25px !important;
        padding: 4px 25px 16px;
    }

    body.cg-us-customer-login .form-control {
        min-height: 53px;
    }
}

/* Customer Portal — force precise logo centering */
body.cg-us-customer-login .card-body .brand-logo {
    position: relative !important;
    right: auto !important;
    left: auto !important;
    display: flex !important;
    box-sizing: border-box !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    transform: none !important;
}

body.cg-us-customer-login .card-body .brand-logo::before,
body.cg-us-customer-login .card-body .brand-logo::after {
    display: none !important;
}

body.cg-us-customer-login .card-body .brand-logo img {
    position: static !important;
    right: auto !important;
    left: auto !important;
    display: block !important;
    flex: 0 0 auto !important;
    margin: 0 auto !important;
    transform: none !important;
}

/* Customer Portal — exact full-width logo alignment */
body.cg-us-customer-login .auth-inner .card-body > .brand-logo {
    position: relative !important;
    display: flex !important;
    width: calc(100% + 84px) !important;
    max-width: none !important;
    margin-top: -34px !important;
    margin-right: -42px !important;
    margin-bottom: 0 !important;
    margin-left: -42px !important;
    padding-right: 42px !important;
    padding-left: 42px !important;
    box-sizing: border-box !important;
    align-items: center !important;
    justify-content: center !important;
}

body.cg-us-customer-login .auth-inner .card-body > .brand-logo > img {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    display: block !important;
    margin: 0 auto !important;
}

/* Exact mobile card-width calculation */
@media (max-width: 575.98px) {
    body.cg-us-customer-login .auth-inner .card-body > .brand-logo {
        width: calc(100% + 50px) !important;
        margin-top: -27px !important;
        margin-right: -25px !important;
        margin-left: -25px !important;
        padding-right: 25px !important;
        padding-left: 25px !important;
    }
}

/* CUSTOMER LOGIN EXIT TAB */
body.cg-us-customer-login .auth-inner > .card,
body.cg-us-customer-login .auth-inner .card-body {
    position: relative;
}

body.cg-us-customer-login .cg-customer-login-exit {
    position: absolute;
    z-index: 10;
    top: 18px;
    right: 18px;
    display: inline-flex;
    min-width: 64px;
    min-height: 40px;
    padding: 8px 15px;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    border: 1px solid rgba(137, 214, 255, 0.85);
    border-radius: 9px;
    background:
        linear-gradient(
            135deg,
            #0d5488,
            #168cff
        );
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.24),
        inset 0 1px rgba(255, 255, 255, 0.14);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none !important;
    transition:
        transform 160ms ease,
        background 160ms ease,
        box-shadow 160ms ease;
}

body.cg-us-customer-login .cg-customer-login-exit:hover,
body.cg-us-customer-login .cg-customer-login-exit:focus {
    color: #ffffff !important;
    border-color: #ffffff;
    outline: none;
    background:
        linear-gradient(
            135deg,
            #126ead,
            #29a1ff
        );
    box-shadow:
        0 11px 25px rgba(0, 0, 0, 0.3),
        0 0 0 3px rgba(84, 191, 255, 0.2);
    transform: translateY(-1px);
}

body.cg-us-customer-login .cg-customer-login-exit:active {
    transform: translateY(0);
}

@media (max-width: 575.98px) {
    body.cg-us-customer-login .cg-customer-login-exit {
        top: 14px;
        right: 14px;
        min-width: 60px;
        min-height: 38px;
        padding: 7px 13px;
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.cg-us-customer-login .cg-customer-login-exit {
        transition: none;
    }
}
