:root {
    --bg: #1c1c1d;
    --sidebar: #242424;
    --card: #333336;
    --primary: #6f6f70;
    --primary-hover: #8a8a8b;
    --text: #e6e2d8;
    --text-muted: #b1aca0;
    --alert: #7e7467;
    --success: #7f7f7f;
    --border: rgba(228, 224, 213, 0.12);
    --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

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

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(142, 142, 142, 0.12), transparent 28%),
        radial-gradient(circle at bottom right, rgba(120, 120, 120, 0.1), transparent 24%),
        linear-gradient(135deg, #171718 0%, var(--bg) 55%, #121213 100%);
    color: var(--text);
    font-family: "Segoe UI", "Trebuchet MS", sans-serif;
}

.login-shell {
    min-height: 100vh;
    padding: 24px;
    display: grid;
    place-items: center;
}

.login-card {
    width: min(1120px, 100%);
    border: 1px solid var(--border);
    border-radius: 28px;
    overflow: hidden;
    background: rgba(48, 48, 50, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.login-side {
    position: relative;
    min-height: 100%;
    background:
        linear-gradient(180deg, rgba(43, 43, 43, 0.2), rgba(27, 29, 26, 0.8)),
        radial-gradient(circle at top, rgba(140, 140, 140, 0.12), transparent 45%),
        var(--sidebar);
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.side-logo-wrap {
    width: 350px;
    height: 350px;
    border-radius: 32px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.side-logo-wrap img {
    width: 350px;
    height: 350px;
    object-fit: contain;
    display: block;
}

.login-panel {
    padding: 42px;
    background:
        linear-gradient(180deg, rgba(51, 51, 54, 0.98), rgba(36, 36, 36, 0.98));
}

.panel-card {
    max-width: 460px;
    margin: 0 auto;
}

.panel-title {
    color: var(--text);
    font-size: 1.85rem;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.panel-subtitle {
    color: var(--text-muted);
    margin-bottom: 28px;
}

.logo-wrap {
    width: 132px;
    height: 132px;
    border-radius: 28px;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 0;
    box-shadow: none;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.logo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.form-label {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: 8px;
}

.form-control {
    background: rgba(28, 28, 29, 0.62);
    border: 1px solid rgba(228, 224, 213, 0.14);
    color: var(--text);
    border-radius: 14px;
    padding: 14px 16px;
}

.form-control::placeholder {
    color: rgba(163, 156, 136, 0.7);
}

.form-control:focus {
    background: rgba(28, 28, 29, 0.74);
    border-color: rgba(160, 160, 160, 0.85);
    color: var(--text);
    box-shadow: 0 0 0 0.2rem rgba(142, 142, 142, 0.18);
}

.password-field {
    position: relative;
}

.password-input {
    padding-right: 64px;
}

.password-input.is-invalid {
    background-image: none;
    padding-right: 64px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    display: grid;
    place-items: center;
    line-height: 0;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
    z-index: 2;
}

.password-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

.password-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(142, 142, 142, 0.18);
}

.password-toggle-icon {
    width: 18px;
    height: 18px;
    display: block;
    color: currentColor;
}

.password-field .invalid-feedback {
    margin-top: 0.35rem;
}

.helper-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.helper-link {
    color: var(--text);
    text-decoration: none;
}

.helper-link:hover {
    color: #fff;
}

.btn-military {
    border: 0;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(173, 143, 8, 1), rgba(128, 104, 0, 1));
    color: var(--text);
    padding: 14px 18px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: none;
    transition: background 0.2s ease, filter 0.2s ease;
}

.btn-military:hover {
    background: linear-gradient(180deg, rgba(204, 171, 22, 1), rgba(128, 104, 0, 1));
    color: var(--text);
    filter: brightness(1.03);
}

.footer-note {
    margin-top: 18px;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
}

@media (max-width: 991.98px) {
    .login-shell {
        padding: 16px;
    }

    .login-side,
    .login-panel {
        padding: 28px;
    }

    .login-side {
        min-height: auto;
    }
}
