:root {
    --bg: #050505;
    --bg-secondary: #090909;

    --panel: rgba(16, 16, 16, 0.88);
    --panel-border: rgba(255, 255, 255, 0.08);

    --primary: #e10600;
    --primary-light: #ff1a14;
    --primary-dark: #8f0500;

    --text: #f5f5f5;
    --text-secondary: #9b9b9b;
    --text-muted: #626262;

    --danger: #ff5757;

    --radius: 18px;

    --font-main: "Inter", sans-serif;
    --font-heading: "Space Grotesk", sans-serif;
}


/* =====================================================
   LOGIN SNACKBAR
===================================================== */

.login-message {
    display: none;
}

.login-message.show {
    display: flex;
}

.login-message.success {
    border-color: rgba(53, 208, 127, 0.30);
    background: rgba(53, 208, 127, 0.08);
    color: #35d07f;
}

.login-message.error {
    border-color: rgba(255, 87, 87, 0.30);
    background: rgba(255, 87, 87, 0.08);
    color: #ff5757;
}

.login-message.success i {
    color: #35d07f;
}

.login-message.error i {
    color: #ff5757;
}


/* =====================================================
   RESET
===================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-main);
    overflow-x: hidden;
}

button,
input {
    font-family: inherit;
}

button {
    border: none;
}

a {
    color: inherit;
    text-decoration: none;
}


/* =====================================================
   BACKGROUND
===================================================== */

.background {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;

    background:
        radial-gradient(
            circle at 12% 30%,
            rgba(225, 6, 0, 0.09),
            transparent 30%
        ),
        radial-gradient(
            circle at 85% 70%,
            rgba(225, 6, 0, 0.055),
            transparent 30%
        ),
        #050505;
}


/* =====================================================
   GRID
===================================================== */

.grid {
    position: absolute;
    inset: 0;

    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.025) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.025) 1px,
            transparent 1px
        );

    background-size: 55px 55px;

    mask-image: linear-gradient(
        to bottom,
        black,
        transparent 90%
    );
}


/* =====================================================
   GLOW
===================================================== */

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
}

.glow-one {
    width: 350px;
    height: 350px;

    background: rgba(225, 6, 0, 0.085);

    left: -150px;
    top: 15%;
}

.glow-two {
    width: 400px;
    height: 400px;

    background: rgba(225, 6, 0, 0.055);

    right: -180px;
    bottom: -100px;
}


/* =====================================================
   DECORATIVE SECURITY LINES
===================================================== */

.security-lines {
    position: absolute;
    width: 1px;
    height: 100vh;

    background: linear-gradient(
        to bottom,
        transparent,
        rgba(225, 6, 0, 0.13),
        transparent
    );
}

.line-one {
    left: 18%;
}

.line-two {
    left: 50%;
    opacity: 0.5;
}

.line-three {
    right: 18%;
}


/* =====================================================
   MAIN PAGE
===================================================== */

.login-page {
    position: relative;
    z-index: 1;

    min-height: 100vh;

    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
}


/* =====================================================
   BRAND SECTION
===================================================== */

.brand-section {
    min-height: 100vh;

    padding: 55px 8% 35px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.brand-content {
    max-width: 650px;
}


/* =====================================================
   BRAND LOGO
===================================================== */

.brand-logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-shield {
    width: 48px;
    height: 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--primary);

    font-size: 22px;

    border: 1px solid rgba(225, 6, 0, 0.40);

    background:
        linear-gradient(
            145deg,
            rgba(225, 6, 0, 0.14),
            rgba(225, 6, 0, 0.025)
        );

    clip-path: polygon(
        50% 0%,
        92% 18%,
        84% 68%,
        50% 100%,
        16% 68%,
        8% 18%
    );

    filter: drop-shadow(
        0 0 12px rgba(225, 6, 0, 0.18)
    );
}

.brand-name {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.brand-name span {
    font-family: var(--font-heading);

    font-size: 19px;
    font-weight: 600;

    letter-spacing: 4px;
}

.brand-name strong {
    margin-top: 5px;

    color: var(--primary);

    font-size: 9px;
    font-weight: 700;

    letter-spacing: 3.5px;
}


/* =====================================================
   HERO TEXT
===================================================== */

.brand-heading {
    margin-top: 150px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    color: var(--text-secondary);

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 2.5px;
}

.status-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: var(--primary);

    box-shadow:
        0 0 0 4px rgba(225, 6, 0, 0.08),
        0 0 12px rgba(225, 6, 0, 0.55);

    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.45;
    }
}

.brand-heading h1 {
    margin-top: 25px;

    font-family: var(--font-heading);

    font-size: clamp(48px, 5vw, 78px);

    line-height: 0.98;

    font-weight: 600;

    letter-spacing: -3px;
}

.brand-heading h1 span {
    color: var(--primary);
}

.brand-heading p {
    max-width: 520px;

    margin-top: 28px;

    color: var(--text-secondary);

    font-size: 15px;
    line-height: 1.8;
}


/* =====================================================
   SECURITY INFO
===================================================== */

.security-info {
    display: flex;
    gap: 18px;

    margin-top: 55px;
}

.info-item {
    min-width: 230px;

    display: flex;
    align-items: center;
    gap: 13px;

    padding: 15px 18px;

    border: 1px solid rgba(255, 255, 255, 0.06);

    background: rgba(255, 255, 255, 0.018);

    backdrop-filter: blur(10px);
}

.info-icon {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--primary);

    border: 1px solid rgba(225, 6, 0, 0.18);

    background: rgba(225, 6, 0, 0.06);
}

.info-item strong {
    display: block;

    font-size: 11px;
    font-weight: 600;

    letter-spacing: 0.4px;
}

.info-item span {
    display: block;

    margin-top: 4px;

    color: var(--text-muted);

    font-size: 9px;
}


/* =====================================================
   BRAND FOOTER
===================================================== */

.brand-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;

    color: var(--text-muted);

    font-size: 10px;
    letter-spacing: 0.5px;
}

.system-status {
    display: flex;
    align-items: center;
    gap: 7px;

    color: #7e8a95;

    font-size: 9px;
    font-weight: 700;

    letter-spacing: 1.5px;
}

.system-status span {
    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: #35d07f;

    box-shadow:
        0 0 10px rgba(53, 208, 127, 0.5);
}


/* =====================================================
   LOGIN SECTION
===================================================== */

.login-section {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 45px;
}


/* =====================================================
   LOGIN CARD
===================================================== */

.login-card {
    width: min(100%, 460px);

    padding: 45px;

    border: 1px solid var(--panel-border);

    border-radius: var(--radius);

    background:
        linear-gradient(
            145deg,
            rgba(20, 20, 20, 0.94),
            rgba(7, 7, 7, 0.94)
        );

    box-shadow:
        0 35px 100px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);

    backdrop-filter: blur(25px);

    animation: cardAppear 0.7s ease forwards;
}

@keyframes cardAppear {

    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =====================================================
   LOGIN HEADER
===================================================== */

.login-header {
    text-align: center;
}

.mobile-logo {
    display: none;
}

.login-icon {
    width: 58px;
    height: 58px;

    margin: 0 auto 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--primary);

    font-size: 23px;

    border-radius: 15px;

    border: 1px solid rgba(225, 6, 0, 0.24);

    background: rgba(225, 6, 0, 0.07);

    box-shadow:
        0 0 30px rgba(225, 6, 0, 0.06);
}

.login-label {
    color: var(--primary);

    font-size: 9px;
    font-weight: 700;

    letter-spacing: 2.3px;
}

.login-header h2 {
    margin-top: 12px;

    font-family: var(--font-heading);

    font-size: 30px;
    font-weight: 600;
}

.login-header p {
    margin-top: 9px;

    color: var(--text-secondary);

    font-size: 12px;
    line-height: 1.6;
}


/* =====================================================
   FORM
===================================================== */

form {
    margin-top: 35px;
}

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;

    margin-bottom: 9px;

    color: #c5c5c5;

    font-size: 11px;
    font-weight: 600;
}

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.label-row label {
    margin-bottom: 9px;
}

.forgot-link {
    color: var(--primary);

    font-size: 10px;
    font-weight: 500;

    transition: 0.25s;
}

.forgot-link:hover {
    color: var(--primary-light);
}


/* =====================================================
   INPUT
===================================================== */

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;

    left: 16px;
    top: 50%;

    transform: translateY(-50%);

    color: var(--text-muted);

    font-size: 13px;

    pointer-events: none;

    transition: 0.25s;
}

.input-wrapper input {
    width: 100%;
    height: 54px;

    padding: 0 48px;

    color: var(--text);

    font-size: 12px;

    outline: none;

    border: 1px solid rgba(255, 255, 255, 0.08);

    border-radius: 11px;

    background: rgba(0, 0, 0, 0.30);

    transition:
        border-color 0.25s,
        background 0.25s,
        box-shadow 0.25s;
}

.input-wrapper input::placeholder {
    color: #515151;
}

.input-wrapper input:focus {
    border-color: rgba(225, 6, 0, 0.55);

    background: rgba(225, 6, 0, 0.025);

    box-shadow:
        0 0 0 3px rgba(225, 6, 0, 0.065);
}

.input-wrapper:focus-within .input-icon {
    color: var(--primary);
}


/* =====================================================
   PASSWORD TOGGLE
===================================================== */

.password-toggle {
    position: absolute;

    right: 5px;
    top: 5px;

    width: 44px;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--text-muted);

    background: transparent;

    border-radius: 8px;

    cursor: pointer;

    transition: 0.25s;
}

.password-toggle:hover {
    color: var(--primary);

    background: rgba(225, 6, 0, 0.06);
}


/* =====================================================
   FIELD ERROR
===================================================== */

.field-error {
    display: block;

    min-height: 0;

    margin-top: 6px;

    color: var(--danger);

    font-size: 9px;
}


/* =====================================================
   REMEMBER
===================================================== */

.form-options {
    margin-top: -2px;
}

.remember {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    color: var(--text-secondary);

    font-size: 10px;

    cursor: pointer;
}

.remember input {
    display: none;
}

.custom-checkbox {
    width: 16px;
    height: 16px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(255, 255, 255, 0.15);

    border-radius: 4px;

    transition: 0.2s;
}

.custom-checkbox i {
    display: none;

    color: #ffffff;

    font-size: 9px;
}

.remember input:checked + .custom-checkbox {
    background: var(--primary);

    border-color: var(--primary);

    box-shadow:
        0 0 12px rgba(225, 6, 0, 0.18);
}

.remember input:checked + .custom-checkbox i {
    display: block;
}


/* =====================================================
   MESSAGE
===================================================== */

.login-message {
    display: none;

    align-items: center;
    gap: 9px;

    margin-top: 18px;

    color: #ff9292;

    font-size: 10px;

    border: 1px solid rgba(255, 92, 92, 0.15);

    border-radius: 8px;

    background: rgba(255, 92, 92, 0.05);
}

.login-message.show {
    display: flex;
}


/* =====================================================
   LOGIN BUTTON
===================================================== */

.login-button {
    position: relative;

    width: 100%;
    height: 55px;

    margin-top: 25px;

    overflow: hidden;

    color: #ffffff;

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 0.6px;

    border-radius: 11px;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--primary-dark)
        );

    cursor: pointer;

    transition:
        transform 0.25s,
        box-shadow 0.25s,
        background 0.25s;
}

.login-button::before {
    content: "";

    position: absolute;

    top: 0;
    left: -100%;

    width: 100%;
    height: 100%;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.20),
            transparent
        );

    transition: 0.6s;
}

.login-button:hover::before {
    left: 100%;
}

.login-button:hover {
    background:
        linear-gradient(
            135deg,
            var(--primary-light),
            var(--primary)
        );

    box-shadow:
        0 12px 35px rgba(225, 6, 0, 0.22);

    transform: translateY(-1px);
}

.login-button:active {
    transform: translateY(1px);
}

.button-content {
    position: relative;
    z-index: 1;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 13px;
}

.button-content i {
    font-size: 10px;

    transition: transform 0.25s;
}

.login-button:hover .button-content i {
    transform: translateX(4px);
}

.button-loader {
    display: none;
}

.login-button.loading .button-content {
    display: none;
}

.login-button.loading .button-loader {
    position: relative;
    z-index: 1;

    display: block;
}


/* =====================================================
   SECURITY NOTICE
===================================================== */

.security-notice {
    display: flex;
    align-items: center;
    gap: 12px;

    margin-top: 27px;
    padding-top: 23px;

    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.security-notice > i {
    color: var(--primary);

    font-size: 16px;
}

.security-notice strong {
    display: block;

    color: #c8c8c8;

    font-size: 10px;
}

.security-notice span {
    display: block;

    margin-top: 3px;

    color: var(--text-muted);

    font-size: 9px;
}


/* =====================================================
   LOGIN FOOTER
===================================================== */

.login-footer {
    display: flex;
    justify-content: center;
    align-items: center;

    gap: 7px;

    margin-top: 28px;

    color: #4e4e4e;

    font-size: 8px;

    letter-spacing: 0.4px;
}

.separator {
    color: #303030;
}


/* =====================================================
   DEVELOPER CREDIT
===================================================== */

.developer-credit {
    position: fixed;

    right: 28px;
    bottom: 22px;

    z-index: 20;

    display: flex;
    align-items: center;
    gap: 7px;

    color: #555;

    font-size: 8px;
    font-weight: 500;

    letter-spacing: 0.4px;

    user-select: none;
}

.developer-credit-label {
    color: #555;
}

.developer-credit a {
    position: relative;

    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding-bottom: 4px;

    color: #999;

    font-size: 9px;
    font-weight: 700;

    text-decoration: none;

    transition:
        color 0.3s ease,
        transform 0.3s ease;
}

.developer-credit a::after {
    content: "";

    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    height: 1px;

    background: var(--primary);

    transform: scaleX(0);
    transform-origin: left;

    transition: transform 0.35s ease;
}

.developer-credit a:hover {
    color: #ffffff;

    transform: translateY(-1px);
}

.developer-credit a:hover::after {
    transform: scaleX(1);
}

.developer-linkedin {
    width: 16px;
    height: 16px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: var(--primary);

    border: 1px solid rgba(225, 6, 0, 0.35);

    font-family: Arial, sans-serif;

    font-size: 8px;
    font-weight: 800;

    line-height: 1;

    transition:
        color 0.3s ease,
        background 0.3s ease,
        border-color 0.3s ease;
}

.developer-credit a:hover .developer-linkedin {
    color: #ffffff;

    background: var(--primary);

    border-color: var(--primary);
}

.developer-arrow {
    color: var(--primary);

    font-size: 10px;

    transition:
        transform 0.3s ease;
}

.developer-credit a:hover .developer-arrow {
    transform: translate(2px, -2px);
}


/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 1050px) {

    .login-page {
        grid-template-columns: 1fr;
    }

    .brand-section {
        display: none;
    }

    .login-section {
        min-height: 100vh;

        padding: 30px;
    }

    .mobile-logo {
        display: flex;

        justify-content: center;
        align-items: center;

        gap: 12px;

        margin-bottom: 35px;
    }

    .mobile-logo .logo-shield {
        width: 40px;
        height: 44px;

        font-size: 17px;
    }

    .mobile-logo .brand-name span {
        font-size: 16px;
    }

    .mobile-logo .brand-name strong {
        font-size: 7px;
    }

    .developer-credit {
        right: 20px;
        bottom: 15px;
    }
}


@media (max-width: 520px) {

    .login-section {
        padding: 18px;
    }

    .login-card {
        padding: 30px 23px;

        border-radius: 15px;
    }

    .login-header h2 {
        font-size: 26px;
    }

    .login-header p {
        font-size: 11px;
    }

    .login-button {
        height: 53px;
    }

    .developer-credit {
        position: relative;

        right: auto;
        bottom: auto;

        justify-content: center;

        margin-top: 18px;

        font-size: 7px;
    }
}


@media (max-width: 360px) {

    .login-card {
        padding: 25px 18px;
    }

    .login-header h2 {
        font-size: 23px;
    }

    .forgot-link {
        font-size: 9px;
    }

    .developer-credit {
        flex-wrap: wrap;

        gap: 5px;

        text-align: center;
    }
}


/* =====================================================
   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;
    }
}

.logo-image {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-image img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    display: block;
}