/* Login surface — mobile-first card on dark backdrop (separate from inner app UI) */
:root {
    --primary: #689f38;
    --primary-light: #8bc34a;
    --primary-dark: #558b2f;
    --primary-deep: #33691e;
    --login-green: var(--primary-light);
    --login-green-dark: var(--primary);
    --login-green-deep: var(--primary-dark);
    --login-bg: #0f1419;
    --login-bg-accent: #1a2332;
    --login-white: #ffffff;
    --login-text-muted: #9e9e9e;
    --login-radius: 28px;
    --login-input-radius: 14px;
}

* {
    box-sizing: border-box;
}

html, body.login-ui {
    margin: 0;
    padding: 0;
    height: 100%;
}

body.login-ui {
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
    background: var(--login-bg);
    color: #333;
}

body.login-ui .login-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    padding: max(1.25rem, env(safe-area-inset-top)) 1.25rem max(1.25rem, env(safe-area-inset-bottom));
    position: relative;
    overflow: hidden;
}

body.login-ui .login-page::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 12% 18%, rgba(139, 195, 74, 0.22) 0%, transparent 42%),
        radial-gradient(circle at 88% 82%, rgba(104, 159, 56, 0.14) 0%, transparent 38%),
        linear-gradient(160deg, var(--login-bg) 0%, var(--login-bg-accent) 100%);
    pointer-events: none;
}

body.login-ui .login-deco {
    position: absolute;
    pointer-events: none;
    opacity: 0.35;
}

body.login-ui .login-deco-dots {
    width: 80px;
    height: 80px;
    background-image: radial-gradient(var(--login-green) 2px, transparent 2px);
    background-size: 12px 12px;
    top: 8%;
    left: 5%;
}

body.login-ui .login-deco-ring {
    width: 60px;
    height: 60px;
    border: 3px solid var(--login-green);
    border-radius: 50%;
    bottom: 15%;
    right: 8%;
}

body.login-ui .login-deco-tri {
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-bottom: 35px solid var(--login-green);
    top: 25%;
    right: 12%;
    opacity: 0.2;
}

body.login-ui .login-device {
    width: 100%;
    max-width: 380px;
    position: relative;
    z-index: 1;
    display: flex;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
    border-radius: 32px;
    overflow: hidden;
    min-height: 580px;
}

body.login-ui .login-side-tab {
    width: 36px;
    background: var(--login-green-deep);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 1.5rem 0;
    flex-shrink: 0;
}

body.login-ui .login-side-tab span {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
}

body.login-ui .login-side-tab span.active {
    color: #fff;
    font-size: 0.8rem;
}

body.login-ui .login-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: linear-gradient(165deg, var(--login-green) 0%, var(--login-green-dark) 55%, var(--login-green-deep) 100%);
    min-width: 0;
}

body.login-ui .login-hero {
    padding: 1.75rem 1.5rem 1rem;
    color: #fff;
    position: relative;
}

body.login-ui .login-hero h1 {
    font-size: 1.65rem;
    font-weight: 800;
    margin: 0 0 0.25rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

body.login-ui .login-hero p {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.9;
    font-weight: 500;
}

body.login-ui .login-hero-visual {
    position: absolute;
    right: 1rem;
    top: 1.25rem;
    width: 88px;
    height: 88px;
}

body.login-ui .login-hero-visual svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

body.login-ui .login-form-card {
    flex: 1;
    padding: 0 1.35rem 1.75rem;
    display: flex;
    flex-direction: column;
}

body.login-ui .login-form-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 1.1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

body.login-ui .login-field {
    position: relative;
    margin-bottom: 0.85rem;
}

body.login-ui .login-field > i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #bdbdbd;
    font-size: 0.95rem;
    z-index: 1;
    pointer-events: none;
}

body.login-ui .login-field .form-control {
    width: 100%;
    border: none;
    background: var(--login-white);
    border-radius: var(--login-input-radius);
    padding: 0.95rem 1rem 0.95rem 2.85rem;
    font-size: 0.95rem;
    min-height: 52px;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s;
}

body.login-ui .login-field .form-control::placeholder {
    color: #bdbdbd;
    font-weight: 500;
}

body.login-ui .login-field .form-control:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5), 0 4px 12px rgba(0, 0, 0, 0.12);
}

body.login-ui .login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.35rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.92);
    gap: 0.5rem;
}

body.login-ui .login-remember-wrap {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    user-select: none;
    margin: 0;
}

body.login-ui .login-remember-wrap input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--login-green-dark);
    margin: 0;
    cursor: pointer;
}

body.login-ui .login-forgot {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0.95;
}

body.login-ui .login-forgot:hover {
    color: #fff;
    text-decoration: underline;
    opacity: 1;
}

body.login-ui .login-success {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    border-radius: 12px;
    padding: 0.65rem 0.85rem;
    margin-bottom: 1rem;
    font-size: 0.88rem;
}

body.login-ui .login-help-text {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.78rem;
    line-height: 1.45;
    margin: 0.75rem 0 1rem;
}

body.login-ui .login-back-link {
    margin: 1rem 0 0;
    text-align: center;
}

body.login-ui .login-back-link a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
}

body.login-ui .login-back-link a:hover {
    text-decoration: underline;
}

body.login-ui .login-hero-compact h1 {
    font-size: 1.35rem;
}

body.login-ui .login-hero-compact p {
    font-size: 0.85rem;
    margin-bottom: 0;
}

body.login-ui .login-btn-signin {
    width: 100%;
    min-height: 54px;
    border: none;
    border-radius: 50px;
    background: var(--login-white);
    color: var(--login-green-dark);
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

body.login-ui .login-btn-signin:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
    color: var(--login-green-deep);
}

body.login-ui .login-btn-signin:active {
    transform: scale(0.98);
}

body.login-ui .login-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.35rem 0 1rem;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
}

body.login-ui .login-divider::before,
body.login-ui .login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.35);
}

body.login-ui .login-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

body.login-ui .login-social-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #fff;
    cursor: default;
    opacity: 0.85;
}

body.login-ui .login-social-btn.app {
    background: var(--login-green-dark);
}

body.login-ui .login-alert {
    background: #ffebee;
    color: #c62828;
    border-radius: 12px;
    padding: 0.65rem 0.85rem;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    border: 1px solid #ffcdd2;
}

body.login-ui .login-footer-brand {
    text-align: center;
    margin-top: auto;
    padding-top: 1rem;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.65);
}

@media (min-width: 480px) {
    body.login-ui .login-device {
        max-width: 400px;
        min-height: 620px;
    }
}

@media (min-width: 992px) {
    body.login-ui .login-page {
        padding: 2rem 3rem;
        justify-content: center;
        gap: 2.5rem;
    }

    body.login-ui .login-desktop-brand {
        display: flex;
        flex: 1 1 320px;
        max-width: 420px;
        align-items: center;
        z-index: 1;
    }

    body.login-ui .login-desktop-brand-inner {
        color: #fff;
    }

    body.login-ui .login-desktop-logo {
        width: 64px;
        height: 64px;
        border-radius: 16px;
        background: linear-gradient(135deg, var(--login-green) 0%, var(--login-green-dark) 100%);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.75rem;
        margin-bottom: 1.25rem;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    }

    body.login-ui .login-desktop-brand h2 {
        font-size: 1.85rem;
        font-weight: 800;
        margin: 0 0 0.5rem;
        letter-spacing: -0.02em;
    }

    body.login-ui .login-desktop-brand p {
        color: rgba(255, 255, 255, 0.78);
        font-size: 0.95rem;
        line-height: 1.5;
        margin: 0 0 1.25rem;
    }

    body.login-ui .login-desktop-features {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    body.login-ui .login-desktop-features li {
        display: flex;
        align-items: center;
        gap: 0.65rem;
        padding: 0.45rem 0;
        color: rgba(255, 255, 255, 0.88);
        font-size: 0.9rem;
    }

    body.login-ui .login-desktop-features i {
        width: 28px;
        color: var(--login-green);
    }

    body.login-ui .login-device {
        max-width: 400px;
        flex-shrink: 0;
    }
}

body.login-ui .login-desktop-brand {
    display: none;
}

@media (max-width: 360px) {
    body.login-ui .login-side-tab {
        width: 28px;
    }

    body.login-ui .login-hero h1 {
        font-size: 1.4rem;
    }

    body.login-ui .login-hero-visual {
        width: 72px;
        height: 72px;
    }
}
