:root {
    --shadow-grey: #272A2F;
    --shadow-grey-2: #26292E;
    --pine-teal: #28473D;
    --jungle-green: #2EA46D;
    --white: #FEFEFF;
    --text-muted: #a0a6b1;

    --alert-error-bg: rgba(239, 68, 68, 0.15);
    --alert-error-border: rgba(239, 68, 68, 0.3);
    --alert-error-text: #ef4444;
}

* {
    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(--white);
    background-color: var(--shadow-grey);
}

.login-shell {
    width: 100%;
    max-width: 980px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    background: var(--shadow-grey-2);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.login-aside {
    padding: 48px;
    background: var(--pine-teal);
    color: var(--white);
    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.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    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.1);
    color: var(--text-muted);
    font-size: 12px;
    letter-spacing: 0.04em;
    background: rgba(255, 255, 255, 0.04);
}

.aside-powered strong {
    color: var(--white);
    font-weight: 700;
}

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

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

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

.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-muted);
}

.auth-input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--shadow-grey);
    color: var(--white);
    font-size: 15px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input:focus {
    outline: none;
    border-color: var(--jungle-green);
    box-shadow: 0 0 0 4px rgba(46, 164, 109, 0.15);
}

.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(--white);
    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 rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    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(255, 255, 255, 0.1);
    border-color: var(--jungle-green);
}

.btn-login {
    width: 100%;
    border: none;
    border-radius: 18px;
    padding: 15px 18px;
    background: var(--jungle-green);
    color: var(--white);
    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 10px 20px rgba(46, 164, 109, 0.3);
    filter: brightness(1.1);
}

.panel-footer {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    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;
    }
}