* {
    box-sizing: border-box;
}

:root {
    --navy: #0b1220;
    --navy-2: #111827;
    --navy-3: #172033;
    --slate: #1e293b;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --blue-soft: rgba(37, 99, 235, 0.12);
    --cyan-soft: rgba(14, 165, 233, 0.12);
    --purple-soft: rgba(99, 102, 241, 0.14);
    --white: #ffffff;
    --page-bg: #f3f6fb;
    --card-bg: rgba(255, 255, 255, 0.86);
    --text: #111827;
    --muted: #667085;
    --muted-light: #94a3b8;
    --border: rgba(226, 232, 240, 0.9);
    --input-bg: #f8fafc;
    --input-border: #d9e1ec;
    --danger-bg: #fff1f2;
    --danger-text: #9f1239;
    --danger-border: #fecdd3;
    --shadow-card: 0 28px 80px rgba(15, 23, 42, 0.13);
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.08);
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    background: var(--page-bg);
    color: var(--text);
}

body {
    min-height: 100vh;
    overflow-x: hidden;
}

/* MAIN PAGE BACKGROUND */

.page {
    min-height: 100vh;
    padding: 24px;
    position: relative;
    background:
        radial-gradient(circle at 12% 10%, rgba(37, 99, 235, 0.10), transparent 26%),
        radial-gradient(circle at 88% 16%, rgba(14, 165, 233, 0.10), transparent 24%),
        radial-gradient(circle at 72% 88%, rgba(99, 102, 241, 0.10), transparent 28%),
        linear-gradient(180deg, #f8fafc 0%, #eef3f9 100%);
}

.page::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.55), transparent 75%);
}

/* MAIN LOGIN SHELL */

.login-layout {
    position: relative;
    z-index: 2;
    min-height: calc(100vh - 48px);
    display: grid;
    grid-template-columns: 1.03fr 0.97fr;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 32px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(20px);
}

/* LEFT BRAND SECTION */

.brand-section {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(11, 18, 32, 0.98), rgba(17, 24, 39, 0.97)),
        linear-gradient(45deg, rgba(37, 99, 235, 0.15), transparent);
    color: var(--white);
    padding: 44px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* abstract blurred shapes */
.brand-section::before {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    left: -190px;
    top: -130px;
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(37, 99, 235, 0.26), transparent 62%);
    filter: blur(8px);
}

.brand-section::after {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    right: -210px;
    bottom: -190px;
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(14, 165, 233, 0.20), transparent 64%);
    filter: blur(10px);
}

.brand-inner {
    position: relative;
    z-index: 3;
}

.brand-inner::before {
    content: "";
    position: absolute;
    right: 3%;
    top: 13%;
    width: 260px;
    height: 260px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 38px;
    transform: rotate(18deg);
}

.brand-inner::after {
    content: "";
    position: absolute;
    right: 14%;
    top: 21%;
    width: 120px;
    height: 120px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    transform: rotate(18deg);
}

.brand-logo {
    width: 420px;
    max-width: 100%;
    position: relative;
    z-index: 4;
}

.brand-logo img {
    width: 100%;
    max-height: 120px;
    object-fit: contain;
    object-position: left center;
    display: block;
    filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.22));
}

.brand-text {
    position: relative;
    z-index: 4;
    margin-top: 105px;
    max-width: 590px;
}

.brand-text p {
    margin: 0 0 15px;
    color: #a7b4c7;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.brand-text h1 {
    margin: 0;
    max-width: 640px;
    font-size: clamp(46px, 5vw, 72px);
    line-height: 0.96;
    letter-spacing: -0.065em;
    font-weight: 850;
    color: #ffffff;
}

.brand-text span {
    display: block;
    margin-top: 26px;
    max-width: 480px;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.75;
}

/* elegant line detail */
.brand-text span::after {
    content: "";
    display: block;
    width: 86px;
    height: 3px;
    margin-top: 30px;
    border-radius: 999px;
    background: linear-gradient(90deg, #60a5fa, rgba(96, 165, 250, 0));
}

.brand-bottom {
    position: relative;
    z-index: 4;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    color: #94a3b8;
    font-size: 13px;
}

/* RIGHT LOGIN AREA */

.login-section {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 44px;
    background:
        radial-gradient(circle at 22% 18%, rgba(37, 99, 235, 0.08), transparent 26%),
        radial-gradient(circle at 82% 82%, rgba(14, 165, 233, 0.08), transparent 28%),
        linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
}

.login-section::before {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    right: -190px;
    top: -170px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.09);
    filter: blur(3px);
}

.login-section::after {
    content: "";
    position: absolute;
    width: 310px;
    height: 310px;
    left: -130px;
    bottom: -130px;
    border-radius: 50%;
    background: rgba(14, 165, 233, 0.08);
    filter: blur(4px);
}

.login-card {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 440px;
    padding: 38px;
    border-radius: 28px;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(22px);
}

.login-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 28px;
    padding: 1px;
    background: linear-gradient(
        145deg,
        rgba(37, 99, 235, 0.32),
        rgba(255, 255, 255, 0.05),
        rgba(14, 165, 233, 0.22)
    );
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.mobile-brand {
    display: none;
    background:
        linear-gradient(145deg, var(--navy), var(--navy-3));
    border-radius: 20px;
    padding: 18px;
    margin-bottom: 26px;
}

.mobile-brand img {
    width: 100%;
    max-height: 92px;
    object-fit: contain;
}

.login-header {
    margin-bottom: 28px;
}

.login-header h2 {
    margin: 0 0 10px;
    font-size: 40px;
    line-height: 1;
    letter-spacing: -0.05em;
    font-weight: 850;
    color: #101828;
}

.login-header p {
    margin: 0;
    max-width: 360px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.7;
}

/* ERROR */

.error-message {
    margin-bottom: 18px;
    padding: 13px 14px;
    border-radius: 14px;
    background: var(--danger-bg);
    border: 1px solid var(--danger-border);
    color: var(--danger-text);
    font-size: 14px;
    font-weight: 700;
}

/* FORM */

.login-form {
    margin: 0;
}

.field {
    margin-bottom: 18px;
}

.field label {
    display: block;
    margin-bottom: 9px;
    color: #1f2937;
    font-size: 14px;
    font-weight: 750;
}

.field-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.field-row button {
    border: 0;
    background: transparent;
    padding: 0;
    color: #2563eb;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.field-row button:hover {
    color: var(--blue-dark);
}

.field input {
    width: 100%;
    height: 56px;
    border: 1px solid var(--input-border);
    border-radius: 15px;
    background: rgba(248, 250, 252, 0.95);
    padding: 0 16px;
    outline: none;
    color: var(--text);
    font-size: 15px;
    font-weight: 550;
    transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.field input::placeholder {
    color: #9aa4b2;
}

.field input:focus {
    border-color: #60a5fa;
    background: #ffffff;
    box-shadow:
        0 0 0 4px rgba(37, 99, 235, 0.11),
        0 10px 22px rgba(15, 23, 42, 0.05);
}

.submit-btn {
    width: 100%;
    height: 56px;
    margin-top: 4px;
    border: none;
    border-radius: 15px;
    background:
        linear-gradient(135deg, #111827, #1f2937);
    color: #ffffff;
    font-size: 15px;
    font-weight: 850;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(17, 24, 39, 0.20);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 36px rgba(17, 24, 39, 0.26);
    background:
        linear-gradient(135deg, #0f172a, #111827);
}

.submit-btn:active {
    transform: translateY(0);
}

/* NOTE */

.login-note {
    margin-top: 22px;
    padding: 14px 16px;
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(248, 250, 252, 0.94), rgba(241, 245, 249, 0.92));
    border: 1px solid rgba(226, 232, 240, 0.95);
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

/* FOOTER */

.page-footer {
    position: absolute;
    z-index: 3;
    bottom: 24px;
    color: #98a2b3;
    font-size: 12px;
}

/* RESPONSIVE */

@media (max-width: 1180px) {
    .login-layout {
        grid-template-columns: 0.95fr 1.05fr;
    }

    .brand-section {
        padding: 38px;
    }

    .brand-text {
        margin-top: 82px;
    }

    .brand-text h1 {
        font-size: 54px;
    }
}

@media (max-width: 980px) {
    .page {
        padding: 16px;
    }

    .login-layout {
        min-height: calc(100vh - 32px);
        grid-template-columns: 1fr;
        border-radius: 26px;
    }

    .brand-section {
        display: none;
    }

    .login-section {
        min-height: calc(100vh - 32px);
        padding: 28px;
    }

    .login-card {
        max-width: 470px;
        padding: 30px;
    }

    .mobile-brand {
        display: block;
    }

    .page-footer {
        position: static;
        margin-top: 22px;
        text-align: center;
    }
}

@media (max-width: 520px) {
    .page {
        padding: 10px;
    }

    .login-layout {
        min-height: calc(100vh - 20px);
        border-radius: 22px;
    }

    .login-section {
        padding: 18px;
    }

    .login-card {
        padding: 24px;
        border-radius: 22px;
    }

    .login-card::before {
        border-radius: 22px;
    }

    .login-header h2 {
        font-size: 34px;
    }

    .login-header p {
        font-size: 14px;
    }

    .field input,
    .submit-btn {
        height: 52px;
    }

    .brand-bottom {
        flex-direction: column;
    }
}