:root {
    --primary: #0369a1;
    --primary-light: #0ea5e9;
    --primary-dark: #0284c7;
    --primary-soft: #e0f2fe;
    --primary-soft-2: #f0f9ff;
    --white: #ffffff;
    --bg-main: #f8fcff;
    --bg-soft: #eef8fd;
    --surface: rgba(255, 255, 255, 0.92);
    --surface-low: #f3fbff;
    --surface-border: rgba(3, 105, 161, 0.10);
    --surface-border-strong: rgba(3, 105, 161, 0.22);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-soft: #94a3b8;
    --shadow-main: 0 24px 60px rgba(2, 132, 199, 0.10);
    --shadow-soft: 0 12px 30px rgba(2, 132, 199, 0.08);
    --transition: all 0.28s ease;
    --gradient-main: linear-gradient(135deg, #0ea5e9, #0284c7);
    --gradient-soft: linear-gradient(135deg, rgba(14, 165, 233, 0.10), rgba(2, 132, 199, 0.06));
}

/* =========================================
   RESET
========================================= */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Manrope', sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
    overflow-x: hidden;
}

/* =========================================
   TOP LOADER
========================================= */
.top-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--gradient-main);
    z-index: 999999;
    box-shadow: 0 0 12px rgba(14, 165, 233, 0.35);
    opacity: 0;
}

.top-loader.active {
    opacity: 1;
    animation: topLoading 1.3s ease-in-out forwards;
}

@keyframes topLoading {
    0% {
        width: 0%;
        left: 0;
    }
    50% {
        width: 72%;
        left: 0;
    }
    100% {
        width: 100%;
        left: 0;
    }
}

/* =========================================
   PAGE
========================================= */
.login-page {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top left, rgba(14, 165, 233, 0.10), transparent 28%),
        radial-gradient(circle at bottom right, rgba(2, 132, 199, 0.10), transparent 22%),
        linear-gradient(135deg, #f8fcff 0%, #eef8fd 100%);
}

.login-main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 18px;
    position: relative;
    z-index: 2;
}

.login-card-wrap {
    width: 100%;
    max-width: 470px;
    position: relative;
    z-index: 3;
}

/* =========================================
   BACKGROUND SHAPES
========================================= */
.login-bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(10px);
    pointer-events: none;
}

.login-bg-one {
    width: 320px;
    height: 320px;
    top: -120px;
    left: -110px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.14) 0%, rgba(14, 165, 233, 0.03) 70%, transparent 100%);
}

.login-bg-two {
    width: 260px;
    height: 260px;
    bottom: -80px;
    right: -70px;
    background: radial-gradient(circle, rgba(2, 132, 199, 0.14) 0%, rgba(2, 132, 199, 0.03) 70%, transparent 100%);
}

.login-bg-wave {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.18;
}

.login-bg-wave svg {
    position: absolute;
    top: 0;
    right: 0;
    width: 52%;
    height: 100%;
}

.login-bg-wave svg path {
    fill: var(--primary-light);
    opacity: 0.35;
}

/* =========================================
   CARD
========================================= */
.login-card {
    background: var(--surface);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(14, 165, 233, 0.12);
    border-radius: 18px;
    padding: 42px 34px;
    box-shadow: var(--shadow-main);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.55), rgba(255,255,255,0.18));
    pointer-events: none;
}

.login-card::after {
    content: "";
    position: absolute;
    top: -120px;
    right: -120px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.12), transparent 70%);
    pointer-events: none;
}

.brand-header,
.login-head,
.login-form,
.divider,
.google-btn,
.card-footer-links {
    position: relative;
    z-index: 2;
}

.brand-header {
    text-align: center;
    margin-bottom: 34px;
}

.brand-title {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--primary);
    margin-bottom: 10px;
}

.brand-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    color: var(--text-soft);
}

.login-head {
    text-align: left;
    margin-bottom: 26px;
}

.login-title {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-main);
    margin-bottom: 8px;
    letter-spacing: -0.03em;
}

.login-text {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-muted);
}

/* =========================================
   FORM
========================================= */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.floating-field {
    position: relative;
    min-height: 66px;
    background: linear-gradient(180deg, #fafdff 0%, #f2fbff 100%);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    transition: var(--transition);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.85);
    overflow: hidden;
}

.floating-field:hover {
    border-color: rgba(14, 165, 233, 0.22);
    background: linear-gradient(180deg, #ffffff 0%, #f2fbff 100%);
}

.floating-field:focus-within {
    border-color: rgba(2, 132, 199, 0.35);
    box-shadow:
        0 0 0 5px rgba(14, 165, 233, 0.10),
        0 14px 28px rgba(2, 132, 199, 0.10);
    background: #ffffff;
    transform: translateY(-1px);
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #7c96a7;
    font-size: 18px;
    z-index: 2;
    transition: var(--transition);
}

.floating-field:focus-within .input-icon {
    color: var(--primary);
}

.floating-field input {
    width: 100%;
    height: 66px;
    border: none;
    outline: none;
    background: transparent;
    padding: 26px 16px 10px 50px;
    font-size: 15px;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    position: relative;
    z-index: 1;
}

.floating-field label {
    position: absolute;
    left: 50px;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #8aa0af;
    pointer-events: none;
    transition: all 0.22s ease;
    z-index: 2;
}

.floating-field input:focus + label,
.floating-field input:not(:placeholder-shown) + label {
    top: 14px;
    transform: none;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary);
}

.password-wrap input {
    padding-right: 54px;
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #80909a;
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
    z-index: 3;
}

.toggle-password:hover {
    color: var(--primary);
    background: rgba(14, 165, 233, 0.08);
}

.input-focus-line {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0%;
    height: 2px;
    background: var(--gradient-main);
    transition: width 0.28s ease;
    z-index: 2;
}

.floating-field:focus-within .input-focus-line {
    width: 100%;
}

/* =========================================
   OPTIONS
========================================= */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: -2px;
}

.remember-box {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.remember-box input {
    width: 15px;
    height: 15px;
    accent-color: var(--primary);
}

.remember-box span {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: var(--text-muted);
}

.forgot-link {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

.forgot-link:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* =========================================
   BUTTONS
========================================= */
.login-btn {
    width: 100%;
    height: 58px;
    border: none;
    border-radius: 14px;
    background: var(--gradient-main);
    color: var(--white);
    font-size: 16px;
    font-weight: 700;
    font-family: 'Manrope', sans-serif;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 16px 28px rgba(2, 132, 199, 0.18);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 32px rgba(2, 132, 199, 0.22);
}

.login-btn i {
    font-size: 20px;
    transition: transform 0.25s ease;
}

.login-btn:hover i {
    transform: translateX(3px);
}

.divider {
    position: relative;
    text-align: center;
    margin: 30px 0 24px;
}

.divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    border-top: 1px solid rgba(2, 132, 199, 0.14);
}

.divider span {
    position: relative;
    z-index: 2;
    display: inline-block;
    background: var(--surface);
    padding: 0 14px;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-soft);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.google-btn {
    width: 100%;
    min-height: 58px;
    border-radius: 14px;
    background: var(--surface-low);
    border: 1px solid rgba(14, 165, 233, 0.10);
    color: var(--text-main);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: var(--transition);
}

.google-btn:hover {
    background: #ecfaff;
    color: var(--text-main);
    border-color: rgba(2, 132, 199, 0.16);
}

.google-btn img {
    width: 20px;
    height: 20px;
}

/* =========================================
   FOOT LINKS
========================================= */
.card-footer-links {
    margin-top: 34px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.create-account-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.create-account-row span {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: var(--text-muted);
}

.create-account-row a,
.guest-link {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

.create-account-row a:hover,
.guest-link:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.login-note {
    text-align: center;
    margin-top: 22px;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 600;
    color: rgba(100, 116, 139, 0.78);
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

/* =========================================
   RESPONSIVE
========================================= */
@media (max-width: 768px) {
    .login-main {
        padding: 28px 14px;
    }

    .login-card {
        padding: 30px 20px;
        border-radius: 16px;
    }

    .brand-title {
        font-size: 26px;
    }

    .login-title {
        font-size: 26px;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
    }

    .floating-field {
        min-height: 62px;
        border-radius: 14px;
    }

    .floating-field input {
        height: 62px;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 24px 16px;
    }

    .brand-title {
        font-size: 24px;
    }

    .brand-subtitle {
        font-size: 11px;
        letter-spacing: 0.16em;
    }

    .login-title {
        font-size: 24px;
    }

    .login-text,
    .remember-box span,
    .forgot-link,
    .create-account-row span,
    .create-account-row a,
    .guest-link {
        font-size: 13px;
    }

    .floating-field input,
    .login-btn,
    .google-btn {
        font-size: 14px;
    }
}

