:root {
    --bg: linear-gradient(135deg, #e7efe8 0%, #f6f0e3 45%, #d9e8e0 100%);
    --panel: #ffffff;
    --panel-border: rgba(22, 48, 43, 0.12);
    --text: #18312c;
    --text-muted: #637670;
    --pine-teal: #28473D;
    --jungle-green: #2EA46D;
    --accent: #1e8f6d;
    --accent-strong: #145a45;
    --white: #FEFEFF;

    --alert-error-bg: #fff0ef;
    --alert-error-border: #edb8b1;
    --alert-error-text: #9b3026;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    background: var(--bg);
}

.login-shell {
    width: 100%;
    max-width: 980px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 26px 60px rgba(23, 51, 44, 0.16);
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.login-aside {
    padding: 48px;
    background: linear-gradient(160deg, rgba(17, 65, 53, 0.98), rgba(24, 97, 76, 0.94));
    color: #eff8f4;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-aside::after {
    content: '';
    position: absolute;
    inset: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    pointer-events: none;
}

.aside-brand {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    text-align: center;
}

.aside-logo-wrap {
    width: min(100%, 360px);
    padding: 26px 28px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(6px);
}

.aside-logo {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.3));
}

.aside-powered {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(239, 248, 244, 0.7);
    font-size: 12px;
    letter-spacing: 0.04em;
    background: rgba(255, 255, 255, 0.06);
}

.aside-powered strong {
    color: #eff8f4;
    font-weight: 700;
}

.login-panel {
    padding: 42px 38px 34px;
    background: var(--panel);
}

.panel-header {
    margin-bottom: 24px;
}

.panel-header h2 {
    font-size: 30px;
    letter-spacing: -0.03em;
    margin-bottom: 10px;
    color: var(--text);
}

.panel-header p {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 14px;
}

.alert {
    padding: 14px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 16px;
}

.alert-error {
    background: var(--alert-error-bg);
    border: 1px solid var(--alert-error-border);
    color: var(--alert-error-text);
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.auth-input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--panel-border);
    background: #ffffff;
    color: var(--text);
    font-size: 15px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input:focus {
    outline: none;
    border-color: rgba(30, 143, 109, 0.5);
    box-shadow: 0 0 0 4px rgba(30, 143, 109, 0.12);
}

.field-errors {
    margin-top: 8px;
    font-size: 13px;
    color: var(--alert-error-text);
}

.panel-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
        'new-user forgot-password'
        'support support';
    align-items: start;
    gap: 16px;
    margin-top: 10px;
    margin-bottom: 20px;
}

.panel-links {
    display: contents;
}

.support-copy {
    grid-area: support;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    max-width: none;
}

.text-link {
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid var(--panel-border);
    background: rgba(24, 49, 44, 0.03);
    transition: all 0.2s ease;
}

.panel-links .text-link:first-child {
    grid-area: new-user;
}

.panel-links .text-link:last-child {
    grid-area: forgot-password;
}

.text-link:hover {
    background: rgba(24, 49, 44, 0.07);
    border-color: var(--jungle-green);
}

.btn-login {
    width: 100%;
    border: none;
    border-radius: 18px;
    padding: 15px 18px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #f6fffb;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 24px rgba(20, 90, 69, 0.2);
}

.panel-footer {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--panel-border);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

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

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

@media (max-width: 520px) {
    body {
        padding: 0;
    }

    .login-shell {
        min-height: 100vh;
        border-radius: 0;
    }

    .panel-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .panel-actions,
    .panel-links {
        grid-template-columns: 1fr;
    }

    .panel-actions {
        grid-template-areas:
            'new-user'
            'forgot-password'
            'support';
    }

    .aside-logo-wrap {
        width: min(100%, 280px);
        padding: 22px;
    }
}
