:root {
    --navy: #071a3a;
    --navy2: #10264d;
    --gold: #b4873c;
    --gold2: #d5a640;
    --muted: #64748b;
    --border: #d9e1ec;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--navy);
    overflow: hidden;

    background:
        linear-gradient(
            rgba(7,26,58,.18),
            rgba(7,26,58,.14)
        ),
        url("/static/images/login_bg.png");

    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;

    background:
        linear-gradient(
            135deg,
            rgba(255,255,255,.04) 0%,
            transparent 38%,
            rgba(180,135,60,.10) 55%,
            transparent 56%
        ),
        repeating-radial-gradient(
            ellipse at 15% 18%,
            rgba(255,255,255,.10) 0 1px,
            transparent 1px 14px
        ),
        repeating-radial-gradient(
            ellipse at 88% 70%,
            rgba(180,135,60,.14) 0 1px,
            transparent 1px 18px
        );

    opacity: .42;
    pointer-events: none;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 26px 20px 76px;
    position: relative;
}

.login-card {
    width: 100%;
    max-width: 590px;
    padding: 36px 54px 0;
    text-align: center;
    position: relative;
    z-index: 2;
    border-radius: 34px;
    background: rgba(255,255,255,.66);
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    border: 2px solid rgba(255,255,255,.72);
    box-shadow:
        0 34px 90px rgba(7,26,58,.35),
        inset 0 1px 0 rgba(255,255,255,.75);
}

.brand-logo-wrap {
    margin-bottom: 18px;
}

.brand-logo-img {
    width: 335px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    mix-blend-mode: multiply;
    filter: contrast(1.08);
}

h1 {
    margin: 0;
    font-size: 56px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -2px;
}

h1 span {
    color: var(--gold);
}

.tagline {
    margin: 14px 0 18px;
    color: #334155;
    font-size: 20px;
    font-weight: 700;
}

.premium-divider {
    width: 170px;
    height: 18px;
    margin: 0 auto 22px;
    position: relative;
}

.premium-divider::before,
.premium-divider::after {
    content: "";
    position: absolute;
    top: 9px;
    width: 68px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold));
}

.premium-divider::before {
    left: 0;
}

.premium-divider::after {
    right: 0;
    transform: rotate(180deg);
}

.premium-divider span {
    display: block;
    width: 11px;
    height: 11px;
    margin: 3px auto 0;
    border-radius: 50%;
    background: var(--gold);
}

form {
    text-align: left;
}

label {
    display: block;
    margin: 14px 0 8px;
    font-size: 16px;
    font-weight: 900;
}

.field-wrap {
    position: relative;
    width: 100%;
}

.field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: rgba(238,242,255,.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.user-icon::before {
    content: "♙";
    color: #1d4ed8;
    font-size: 27px;
}

.lock-icon::before {
    content: "▣";
    color: var(--gold);
    font-size: 20px;
}

input {
    width: 100%;
    height: 62px;
    padding: 0 70px 0 76px;
    border: 1px solid #cfd8e6;
    border-radius: 14px;
    font-size: 17px;
    color: var(--navy);
    outline: none;
    background: rgba(255,255,255,.92);
    box-shadow: 0 8px 20px rgba(7,26,58,.08);
}

input:focus {
    border-color: var(--gold);
    box-shadow:
        0 0 0 4px rgba(180,135,60,.16),
        0 8px 20px rgba(7,26,58,.08);
}

.password-toggle {
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    width: 46px !important;
    height: 46px !important;
    margin: 0 !important;
    border: 1px solid rgba(217,225,236,.9) !important;
    border-radius: 50% !important;
    background: rgba(255,255,255,.9) !important;
    box-shadow: none !important;
    cursor: pointer;
}

.password-toggle::before {
    content: "◉";
    color: var(--navy);
    font-size: 17px;
}

.password-toggle.active::before {
    content: "◎";
}

.login-btn {
    width: 100%;
    height: 68px;
    margin-top: 30px;
    border: 2px solid var(--gold2);
    border-radius: 16px;
    background: linear-gradient(135deg, #051738, #082b67);
    color: white;
    font-size: 24px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 18px 35px rgba(7,26,58,.30);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 34px;
}

.btn-lock {
    width: 24px;
    height: 24px;
    border: 2px solid var(--gold2);
    border-radius: 5px;
    position: relative;
}

.btn-lock::before {
    content: "";
    position: absolute;
    width: 12px;
    height: 9px;
    border: 2px solid var(--gold2);
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    left: 4px;
    top: -10px;
}

.btn-arrow {
    font-size: 34px;
    font-weight: 400;
}

.forgot-row {
    display: grid;
    grid-template-columns: 1fr 42px 1fr;
    align-items: center;
    gap: 14px;
    margin: 22px 0 18px;
    text-align: center;
}

.forgot-row span {
    height: 1px;
    background: rgba(100,116,139,.45);
}

.forgot-row b {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,.75);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy);
}

.forgot-row a {
    color: #1d4ed8;
    font-weight: 700;
    font-size: 14px;
}

.error-box {
    padding: 12px 14px;
    margin-bottom: 14px;
    border-radius: 10px;
    background: #fff1f2;
    color: #be123c;
    font-weight: 700;
    text-align: center;
}

.footer-brand {
    margin: 0 -44px 0;
    padding: 18px 20px;
    border-top: 1px solid rgba(255,255,255,.7);
    background: rgba(255,255,255,.72);
    border-radius: 24px;
    color: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.footer-brand strong,
.footer-brand small {
    display: block;
}

.footer-brand strong {
    font-size: 20px;
    font-weight: 900;
}

.footer-brand small {
    margin-top: 5px;
    color: var(--muted);
    font-size: 16px;
}

.footer-shield,
.secure-icon {
    width: 32px;
    height: 36px;
    background: linear-gradient(135deg, #203b80, #071a3a);
    clip-path: polygon(50% 0, 88% 18%, 88% 62%, 50% 100%, 12% 62%, 12% 18%);
    position: relative;
    border: 2px solid var(--gold2);
}

.footer-shield::after,
.secure-icon::after {
    content: "✓";
    color: white;
    font-size: 16px;
    font-weight: 900;
    position: absolute;
    left: 9px;
    top: 8px;
}

.trust-strip {
    position: fixed;
    bottom: 26px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    gap: 9px;
    align-items: center;
    z-index: 3;
    text-shadow: 0 2px 8px rgba(0,0,0,.25);
}

.secure-icon {
    width: 28px;
    height: 31px;
    background: linear-gradient(135deg, #6fbe45, #3f8f35);
    border-color: rgba(255,255,255,.75);
    margin-right: 4px;
}

.secure-icon::after {
    font-size: 15px;
    left: 7px;
    top: 6px;
}

.gold-dot-small {
    color: var(--gold2);
    margin: 0 2px;
}

.trust-line {
    width: 1px;
    height: 26px;
    background: rgba(255,255,255,.45);
    margin: 0 16px;
}

.microsoft-logo {
    width: 22px;
    height: 22px;
    display: inline-block;
    background:
        linear-gradient(90deg, #f25022 0 50%, #7fba00 50% 100%) top / 100% 50% no-repeat,
        linear-gradient(90deg, #00a4ef 0 50%, #ffb900 50% 100%) bottom / 100% 50% no-repeat;
}

@media (max-width: 700px) {
    .login-card {
        max-width: 94vw;
        padding: 32px 26px 0;
    }

    .brand-logo-img {
        width: 270px;
    }

    h1 {
        font-size: 40px;
    }

    .tagline {
        font-size: 16px;
    }

    .footer-brand {
        margin-left: -16px;
        margin-right: -16px;
    }

    .trust-strip {
        display: none;
    }
}


/* DEV ENVIRONMENT BADGE */
.login-card {
    position: relative;
}

.dev-badge {
    position: absolute;
    top: -18px;
    right: 28px;
    background: #d4a62a;
    color: #0f172a;
    font-weight: 800;
    font-size: 20px;
    padding: 10px 22px;
    border-radius: 0 0 14px 14px;
    box-shadow: 0 8px 18px rgba(0,0,0,.18);
    letter-spacing: 1px;
    z-index: 99;
}
