/* =========================================================
   AYKAR BUSINESS MANAGEMENT
   LOGIN SCREEN
========================================================= */


/* =========================
   GLOBAL
========================= */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    width: 100%;
    min-height: 100%;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    color: #071a2f;
    background: #04101f;
}


/* =========================
   MAIN LAYOUT
========================= */

.login-page {
    position: relative;

    width: 100%;
    min-height: 100vh;

    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
    align-items: stretch;

    gap: 28px;

    padding: 0 64px 0 0;

    overflow: hidden;

    background:
        radial-gradient(
            ellipse 70% 55% at 12% 18%,
            rgba(56, 189, 248, 0.28),
            transparent 58%
        ),
        radial-gradient(
            ellipse 55% 45% at 78% 8%,
            rgba(45, 212, 191, 0.16),
            transparent 52%
        ),
        radial-gradient(
            ellipse 60% 65% at 88% 82%,
            rgba(139, 92, 246, 0.24),
            transparent 56%
        ),
        radial-gradient(
            ellipse 45% 40% at 28% 88%,
            rgba(37, 99, 235, 0.22),
            transparent 50%
        ),
        linear-gradient(
            155deg,
            #03101f 0%,
            #06284a 46%,
            #07152c 100%
        );
}

.login-page::before,
.login-page::after {
    content: "";

    position: absolute;

    z-index: 0;

    border-radius: 50%;

    pointer-events: none;

    filter: blur(28px);
}

.login-page::before {
    width: min(520px, 46vw);
    height: min(520px, 46vw);

    top: -12%;
    left: -8%;

    background: radial-gradient(
        circle,
        rgba(125, 211, 252, 0.42),
        rgba(45, 212, 191, 0.12) 42%,
        transparent 70%
    );

    animation: auroraDrift 18s ease-in-out infinite alternate;
}

.login-page::after {
    width: min(460px, 40vw);
    height: min(460px, 40vw);

    right: -8%;
    bottom: -14%;

    background: radial-gradient(
        circle,
        rgba(167, 139, 250, 0.38),
        rgba(56, 189, 248, 0.1) 46%,
        transparent 72%
    );

    animation: auroraDrift 22s ease-in-out infinite alternate-reverse;
}

@keyframes auroraDrift {
    from {
        transform: translate3d(0, 0, 0) scale(1);
    }

    to {
        transform: translate3d(3%, 4%, 0) scale(1.06);
    }
}


/* =========================================================
   LEFT BRAND PANEL
========================================================= */

.brand-panel {
    position: relative;
    z-index: 1;

    min-height: 100%;

    display: flex;
    flex-direction: column;
    justify-content: center;

    padding: 0;

    overflow: visible;

    background: transparent;
}


/* DECORATIVE CIRCLES */

.brand-panel::before,
.brand-panel::after {
    content: none;
}


/* =========================
   LOGO
========================= */

.brand-top {
    position: absolute;
    z-index: 2;

    top: 48px;
    left: 48px;

    width: auto;
    height: auto;

    margin: 0;
}

.brand-logo {
    display: block;

    width: 180px;
    max-width: 100%;
    height: auto;

    object-fit: contain;
    object-position: left center;
}


/* =========================
   LEFT CONTENT
========================= */

.brand-content {
    position: relative;
    z-index: 2;

    max-width: 560px;

    margin: 0;
    padding-left: 48px;
    padding-right: 24px;
}

.brand-content h1 {
    margin: 0;

    color: #ffffff;

    font-size: clamp(46px, 4vw, 64px);
    line-height: 1.04;

    letter-spacing: -2px;

    font-weight: 700;
}

.brand-line {
    width: 72px;
    height: 4px;

    margin: 34px 0 28px;

    border-radius: 10px;

    background: linear-gradient(
        90deg,
        #0077ff,
        #17d8ff
    );
}

.brand-content p {
    max-width: 500px;

    margin: 0;

    color: #c7d8e9;

    font-size: 17px;
    line-height: 1.8;
}


/* =========================
   LEFT FOOTER
========================= */

.brand-footer {
    position: absolute;
    z-index: 2;

    left: 48px;
    bottom: 40px;

    color: #8199b4;

    font-size: 13px;

    letter-spacing: 0.4px;
}


/* =========================================================
   RIGHT LOGIN PANEL
========================================================= */

.login-panel {
    position: relative;
    z-index: 1;

    min-height: 0;
    align-self: stretch;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 28px 8px;

    background: transparent;
}


/* =========================
   LANGUAGE
========================= */

.language-wrapper {
    position: absolute;

    top: 28px;
    right: 8px;

    z-index: 3;
}

.language-wrapper select {
    min-width: 130px;

    padding: 11px 38px 11px 15px;

    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 10px;

    outline: none;

    background: rgba(255, 255, 255, 0.94);

    color: #071a2f;

    font-size: 14px;

    cursor: pointer;

    box-shadow: 0 10px 28px rgba(2, 12, 32, 0.16);

    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.language-wrapper select:hover,
.language-wrapper select:focus {
    border-color: #009de0;

    box-shadow:
        0 0 0 3px rgba(0, 157, 224, 0.08);
}


/* =========================
   LOGIN CONTAINER
========================= */

.login-container {
    width: 100%;
    max-width: 440px;

    padding: 42px 36px 32px;

    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 28px;

    background: rgba(255, 255, 255, 0.96);

    box-shadow:
        0 30px 80px rgba(2, 12, 32, 0.32);
}

.mobile-logo {
    display: none;
}

.welcome-label {
    margin: 0 0 17px;

    color: #008ed6;

    font-size: 13px;
    font-weight: 800;

    letter-spacing: 3px;
}

.login-container h2 {
    margin: 0 0 12px;

    color: #071a2f;

    font-size: 36px;
    line-height: 1.15;

    letter-spacing: -1px;
}

.login-description {
    margin: 0 0 42px;

    color: #748399;

    font-size: 16px;
    line-height: 1.6;
}


/* =========================================================
   FLOATING LABEL INPUTS
========================================================= */

.floating-field {
    position: relative;

    width: 100%;

    height: 78px;

    margin-bottom: 20px;
}

.floating-field input {
    position: absolute;

    left: 0;
    bottom: 0;

    width: 100%;
    height: 60px;

    padding:
        24px
        70px
        4px
        0;

    border: none;
    border-bottom: 1px solid #ccd7e3;
    border-radius: 0;

    outline: none;

    background: transparent;

    color: #071a2f;

    font-size: 16px;

    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}


/* DEFAULT LABEL POSITION */

.floating-field label {
    position: absolute;

    left: 0;
    bottom: 10px;

    color: #69798c;

    font-size: 15px;
    font-weight: 400;

    pointer-events: none;

    transform-origin: left center;

    transition:
        bottom 0.22s ease,
        font-size 0.22s ease,
        color 0.22s ease,
        font-weight 0.22s ease;
}


/* LABEL MOVES UP WHEN ACTIVE */

.floating-field input:focus + label,
.floating-field input:not(:placeholder-shown) + label {
    bottom: 48px;

    color: #008ed6;

    font-size: 12px;
    font-weight: 700;
}


/* ACTIVE UNDERLINE */

.floating-field input:focus {
    border-bottom: 2px solid #00a8e8;

    box-shadow:
        0 3px 0 -2px rgba(0, 168, 232, 0.15);
}


/* BROWSER AUTOFILL */

.floating-field input:-webkit-autofill + label {
    bottom: 48px;

    color: #008ed6;

    font-size: 12px;
    font-weight: 700;
}


/* =========================================================
   PASSWORD BUTTON
========================================================= */

.password-field input {
    padding-right: 80px;
}

.show-password {
    position: absolute;

    right: 0;
    bottom: 10px;

    z-index: 3;

    padding: 4px 0;

    border: none;

    background: transparent;

    color: #008ed6;

    font-size: 13px;
    font-weight: 700;

    cursor: pointer;
}

.show-password:hover {
    color: #005da8;
}


/* =========================================================
   LOGIN OPTIONS
========================================================= */

.login-options {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 20px;

    margin-top: 12px;
    margin-bottom: 32px;
}


/* =========================
   REMEMBER ME
========================= */

.remember-wrapper {
    position: relative;

    display: flex;

    align-items: center;

    gap: 10px;

    color: #536273;

    font-size: 14px;

    cursor: pointer;

    user-select: none;
}

.remember-wrapper input {
    position: absolute;

    opacity: 0;

    pointer-events: none;
}

.custom-checkbox {
    width: 19px;
    height: 19px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border: 1px solid #cbd6e2;
    border-radius: 5px;

    background: #ffffff;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.remember-wrapper:hover .custom-checkbox {
    border-color: #00a8e8;
}

.remember-wrapper input:checked + .custom-checkbox {
    border-color: #008ed6;

    background: linear-gradient(
        135deg,
        #006eff,
        #00c8f5
    );

    box-shadow:
        0 3px 10px rgba(0, 150, 220, 0.20);
}

.remember-wrapper input:checked + .custom-checkbox::after {
    content: "✓";

    color: #ffffff;

    font-size: 12px;
    font-weight: 800;
}


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

.forgot-password {
    color: #008ed6;

    font-size: 14px;
    font-weight: 700;

    text-decoration: none;

    transition: color 0.2s ease;
}

.forgot-password:hover {
    color: #005da8;
}


/* =========================================================
   SIGN IN BUTTON
========================================================= */

.login-button {
    width: 100%;
    min-height: 58px;

    display: flex;

    align-items: center;
    justify-content: space-between;

    padding: 8px 13px 8px 22px;

    border: none;
    border-radius: 10px;

    background: linear-gradient(
        100deg,
        #03182f,
        #063c73
    );

    color: #ffffff;

    font-size: 15px;
    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 12px 30px rgba(4, 36, 70, 0.14);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.login-button:hover {
    transform: translateY(-2px);

    box-shadow:
        0 16px 34px rgba(4, 36, 70, 0.22);
}

.login-button:active {
    transform: translateY(0);
}

.button-arrow {
    width: 34px;
    height: 34px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 8px;

    background: linear-gradient(
        135deg,
        #0078ff,
        #00d4ff
    );

    color: #ffffff;

    font-size: 20px;

    transition: transform 0.25s ease;
}

.login-button:hover .button-arrow {
    transform: translateX(3px);
}


/* =========================================================
   SECURE ACCESS
========================================================= */

.secure-access {
    display: flex;

    align-items: center;
    justify-content: center;

    gap: 7px;

    margin-top: 35px;

    color: #9aa7b7;

    font-size: 12px;
}

.secure-dot {
    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: #00aeea;

    box-shadow:
        0 0 0 4px rgba(0, 174, 234, 0.10);
}


/* =========================================================
   TABLET
========================================================= */

@media screen and (max-width: 1000px) {

    .login-page {
        grid-template-columns: minmax(0, 0.9fr) minmax(300px, 1.1fr);

        gap: 20px;

        padding: 0 32px 0 0;
    }

    .brand-logo {
        width: min(180px, 100%);
    }

    .brand-content h1 {
        font-size: 40px;
    }

    .login-container {
        padding: 36px 28px 28px;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media screen and (max-width: 760px) {

    .login-page {
        display: flex;
        flex-direction: column;
        justify-content: center;

        gap: 22px;

        min-height: 100vh;

        padding: 76px 20px 36px;
    }

    .brand-panel {
        display: flex;
        min-height: 0;
        justify-content: flex-start;

        padding: 0;
    }

    .brand-top {
        position: static;

        margin-bottom: 22px;
    }

    .brand-logo {
        width: min(180px, 100%);
    }

    .brand-content {
        margin: 0;
        padding: 0;
    }

    .brand-footer {
        position: static;

        margin-top: 18px;
    }

    .brand-content h1 {
        font-size: 34px;

        letter-spacing: -1px;
    }

    .brand-line {
        margin: 18px 0 14px;
    }

    .brand-content p {
        font-size: 15px;
    }

    .brand-footer {
        display: none;
    }

    .login-panel {
        position: static;
        align-self: stretch;

        padding: 0;
    }

    .language-wrapper {
        top: 20px;
        right: 20px;
    }

    .language-wrapper select {
        min-width: 115px;

        padding-top: 9px;
        padding-bottom: 9px;
    }

    .login-container {
        max-width: 480px;

        padding: 32px 22px 26px;
    }

    .mobile-logo {
        display: none;
    }

    .login-container h2 {
        font-size: 32px;
    }

    .login-description {
        margin-bottom: 35px;
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media screen and (max-width: 420px) {

    .login-panel {
        padding: 0;
    }

    .language-wrapper {
        top: 20px;
        right: 20px;
    }

    .mobile-logo {
        margin-bottom: 34px;
    }

    .mobile-logo img {
        width: 195px;
    }

    .welcome-label {
        font-size: 12px;

        letter-spacing: 2.5px;
    }

    .login-container h2 {
        font-size: 29px;
    }

    .login-description {
        font-size: 15px;
    }

    .login-options {
        gap: 14px;
    }

    .remember-wrapper,
    .forgot-password {
        font-size: 13px;
    }

}
/* =========================================================
   SIGN IN ARROW CLICK ANIMATION
========================================================= */

.login-button {
    position: relative;
    overflow: hidden;
}

/* Arrow normal state */
.login-button .button-arrow {
    position: relative;
    z-index: 3;
}

/* Animation starts when button receives this class */
.login-button.is-signing-in .button-arrow {
  animation: aykarArrowTravel 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Subtle light sweep across button */
.login-button.is-signing-in::after {
    content: "";
    position: absolute;

    top: 0;
    left: -45%;

    width: 35%;
    height: 100%;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.18),
        transparent
    );

    transform: skewX(-20deg);

    animation: aykarButtonLight 1.5s ease;
}

/* Arrow travels from left to right */
@keyframes aykarArrowTravel {

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

    18% {
        transform: translateX(-390px);
        opacity: 0;
    }

    19% {
        transform: translateX(-390px);
        opacity: 1;
    }

    82% {
        transform: translateX(0);
        opacity: 1;
    }

    92% {
        transform: translateX(5px);
    }

    100% {
        transform: translateX(0);
    }
}

/* Light travelling through button */
@keyframes aykarButtonLight {

    0% {
        left: -45%;
    }

    100% {
        left: 120%;
    }
}

/* Prevent hover animation from interfering during click */
.login-button.is-signing-in:hover .button-arrow {
    transform: none;
}

/* ==========================================
   WELCOME MODAL — SUCCESSFUL LOGIN
========================================== */

.welcome-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(7, 18, 42, 0.65);
    backdrop-filter: blur(7px);
    animation: welcomeFadeIn 0.3s ease-out;
}

.welcome-card {
    width: 100%;
    max-width: 420px;
    padding: 48px 32px 36px;
    border-radius: 24px;
    background: #ffffff;
    text-align: center;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
    animation: welcomeCardIn 0.45s ease-out;
}

.welcome-check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    margin: 0 auto 26px;
    border: 3px solid #2478ff;
    border-radius: 50%;
    color: #2478ff;
    font-size: 38px;
    font-weight: 700;
    animation: welcomeCheckIn 0.6s ease-out;
}

.welcome-card h2 {
    margin: 0 0 12px;
    color: #101b38;
    font-size: 27px;
    font-weight: 700;
}

.welcome-card p {
    margin: 0;
    color: #66728a;
    font-size: 15px;
}

.welcome-progress {
    height: 4px;
    margin-top: 32px;
    overflow: hidden;
    border-radius: 10px;
    background: #e8eef9;
}

.welcome-progress::after {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #1769ff, #28c7ff);
    transform-origin: left;
    animation: welcomeProgress 1.8s linear forwards;
}

@keyframes welcomeFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes welcomeCardIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes welcomeCheckIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes welcomeProgress {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
    .login-page::before,
    .login-page::after,
    .welcome-overlay,
    .welcome-card,
    .welcome-check,
    .welcome-progress::after,
    .login-button.is-signing-in .button-arrow,
    .login-button.is-signing-in::after {
        animation: none;
    }

    .login-button:hover,
    .login-button:hover .button-arrow {
        transform: none;
    }
}

.login-container.is-signup {
    max-width: 520px;
    max-height: min(780px, calc(100vh - 48px));
    overflow: auto;
    padding: 28px 28px 22px;
    background: #ffffff;
    color: #071a2f;
}

.login-container.is-signup > .welcome-label,
.login-container.is-signup > h2,
.login-container.is-signup > .login-description,
.login-container.is-signup > .signup-link {
    display: none;
}

.signup-card h2 {
    margin: 0 0 8px;
    color: #071a2f;
    font-size: 32px;
    line-height: 1.15;
    letter-spacing: -0.6px;
}

.signup-kicker {
    margin: 0 0 8px;
    color: #008ed6;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.signup-lead,
.signup-switch {
    margin: 0 0 18px;
    color: #66788c;
    font-size: 14px;
    line-height: 1.5;
}

.signup-switch {
    margin: 14px 0 0;
}

.signup-switch a,
.signup-card a {
    color: #008ed6;
    font-weight: 700;
    text-decoration: none;
}

.signup-section {
    margin: 0 0 8px;
    padding: 0;
    border: 0;
}

.signup-section legend {
    margin-bottom: 8px;
    color: #008ed6;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.signup-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.signup-field label {
    color: #536273;
    font-size: 12px;
    font-weight: 700;
}

.signup-optional {
    color: #8aa0b8;
    font-weight: 600;
}

.signup-field input {
    width: 100%;
    padding: 8px 0;
    border: 0;
    border-bottom: 1px solid #d5e0ec;
    border-radius: 0;
    outline: none;
    background: transparent;
    color: #071a2f;
    font: inherit;
    font-size: 15px;
}

.signup-field input:focus {
    border-bottom: 2px solid #00a8e8;
}

.signup-card .login-button {
    width: 100%;
    margin-top: 6px;
}

#signupMessage {
    min-height: 1.2em;
    margin: 12px 0 0;
    color: #0f766e;
    font-size: 13px;
    line-height: 1.45;
}

html[data-theme="dark"] .login-container.is-signup,
html[data-theme="dark"] .signup-card {
    background: #ffffff;
    color: #071a2f;
}

html[data-theme="dark"] .signup-card h2,
html[data-theme="dark"] .login-container.is-signup h2,
html[data-theme="dark"] .signup-field label,
html[data-theme="dark"] .signup-lead,
html[data-theme="dark"] .signup-switch {
    color: #071a2f;
}

html[data-theme="dark"] .signup-lead,
html[data-theme="dark"] .signup-switch,
html[data-theme="dark"] .signup-field label {
    color: #536273;
}

html[data-theme="dark"] .signup-card input {
    background: transparent;
    color: #071a2f;
    border-color: #d5e0ec;
}