:root {
    --meld-primary: #1a6fbf;
    --meld-primary-dark: #145a9c;
    --meld-primary-soft: #e8f2fb;
    --meld-ink: #1f2933;
    --meld-muted: #6b7280;
    --meld-bg: #f4f5f7;
    --meld-border: #e5e7eb;
    --meld-sidebar: #1b1e24;
    --meld-sidebar-2: #111318;
    --meld-danger: #c0392b;
    --meld-radius: 12px;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body.login-page {
    margin: 0;
    min-height: 100vh;
    font-family: "Inter", "Segoe UI", sans-serif;
    background: var(--meld-bg);
    color: var(--meld-ink);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(280px, 42%) minmax(0, 1fr);
}

.auth-brand {
    background:
        radial-gradient(circle at top left, rgba(26, 111, 191, 0.28), transparent 42%),
        linear-gradient(180deg, var(--meld-sidebar) 0%, var(--meld-sidebar-2) 100%);
    color: #fff;
    padding: 2.5rem 2.75rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.auth-brand-logo {
    display: block;
    width: min(280px, 100%);
    height: auto;
    max-height: 64px;
    object-fit: contain;
    object-position: left center;
}

.auth-brand h1 {
    margin: 2.5rem 0 0.6rem;
    font-size: 1.85rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.auth-brand > p {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 1rem;
    max-width: 28rem;
}

.auth-features {
    list-style: none;
    margin: 2.5rem 0 0;
    padding: 0;
}

.auth-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 1.1rem;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.95rem;
    line-height: 1.4;
}

.auth-features i {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: #7eb6e8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.auth-features strong {
    display: block;
    font-size: 0.95rem;
}

.auth-features span {
    display: block;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.82rem;
    font-weight: 400;
}

.auth-brand-foot {
    color: rgba(255, 255, 255, 0.42);
    font-size: 0.8rem;
}

.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
}

.auth-card h2 {
    margin: 0;
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.auth-card .auth-lead {
    margin: 0.4rem 0 1.75rem;
    color: var(--meld-muted);
    font-size: 0.95rem;
}

.auth-alert {
    border: 0;
    border-radius: 10px;
    padding: 0.8rem 1rem;
    font-size: 0.88rem;
    margin-bottom: 1.1rem;
}

.auth-alert-danger {
    background: #fdecea;
    color: var(--meld-danger);
}

.auth-alert-info,
.auth-alert-success {
    background: var(--meld-primary-soft);
    color: #145a9c;
}

.auth-field {
    margin-bottom: 1.05rem;
}

.auth-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--meld-ink);
    margin-bottom: 0.4rem;
}

.auth-input {
    position: relative;
}

.auth-input > i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9aa5b1;
    font-size: 0.9rem;
    pointer-events: none;
}

.auth-input .form-control {
    height: 46px;
    padding: 0.6rem 2.6rem 0.6rem 2.5rem;
    border: 1px solid var(--meld-border);
    border-radius: 10px;
    font-size: 0.95rem;
    background: #fff;
    color: var(--meld-ink);
}

.auth-input .form-control:focus {
    border-color: var(--meld-primary);
    box-shadow: 0 0 0 0.18rem rgba(26, 111, 191, 0.18);
    outline: 0;
}

.auth-input .form-control.is-invalid {
    border-color: var(--meld-danger);
}

.auth-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #8aa0a6;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
}

.auth-toggle:hover,
.auth-toggle:focus {
    color: var(--meld-primary);
    background: var(--meld-primary-soft);
    outline: 0;
}

.invalid-feedback {
    display: block;
    font-size: 0.8rem;
    margin-top: 0.3rem;
}

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0.2rem 0 1.25rem;
    font-size: 0.88rem;
}

.auth-row .form-check-label {
    color: var(--meld-muted);
    cursor: pointer;
    margin: 0;
}

.auth-row a {
    color: var(--meld-primary);
    font-weight: 600;
}

.auth-row a:hover {
    color: var(--meld-primary-dark);
    text-decoration: none;
}

.auth-submit {
    width: 100%;
    height: 46px;
    border: 0;
    border-radius: 10px;
    background: var(--meld-primary);
    color: #fff;
    font-weight: 600;
    font-size: 0.98rem;
}

.auth-submit:hover,
.auth-submit:focus {
    background: var(--meld-primary-dark);
    color: #fff;
}

.auth-foot {
    margin-top: 1.5rem;
    color: var(--meld-muted);
    font-size: 0.8rem;
    text-align: center;
}

@media (max-width: 900px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-brand {
        padding: 1.4rem 1.4rem 1.2rem;
        min-height: auto;
    }

    .auth-brand h1 {
        margin-top: 1.1rem;
        font-size: 1.35rem;
    }

    .auth-features {
        display: none;
    }

    .auth-brand-foot {
        display: none;
    }

    .auth-panel {
        padding: 1.5rem 1.15rem 2rem;
        align-items: flex-start;
    }
}
