:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: rgb(79 70 229 / 0.18);
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #dc2626;
    --light-color: #f8fafc;
    --dark-color: #0f172a;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: #f4f6fb;
    min-height: 100vh;
    color: var(--dark-color);
    -webkit-font-smoothing: antialiased;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(380px, 46%) 1fr;
}

/* Brand panel */
.login-aside {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.5rem 3rem;
    color: #cbd5e1;
    background:
        radial-gradient(60rem 30rem at -10% -10%, rgb(99 102 241 / 0.45), transparent 60%),
        radial-gradient(40rem 30rem at 110% 110%, rgb(139 92 246 / 0.35), transparent 60%),
        linear-gradient(160deg, #0f172a 0%, #111c35 100%);
}
.login-aside::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgb(148 163 184 / 0.07) 1px, transparent 1px), linear-gradient(90deg, rgb(148 163 184 / 0.07) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
    pointer-events: none;
}
.login-aside > * { position: relative; z-index: 1; }

.aside-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.125rem;
    color: #fff;
}
.aside-mark, .logo-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    box-shadow: 0 6px 18px -4px rgb(99 102 241 / 0.6);
    color: #fff;
}
.aside-mark svg { width: 22px; height: 22px; }

.aside-copy { max-width: 30rem; }
.aside-copy h2 {
    color: #fff;
    font-size: 2.125rem;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
}
.aside-copy p { font-size: 1rem; line-height: 1.65; color: #94a3b8; margin-bottom: 1.75rem; }
.aside-points { list-style: none; display: grid; gap: 0.85rem; }
.aside-points li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
    color: #e2e8f0;
}
.aside-points li::before {
    content: "";
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgb(129 140 248 / 0.2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a5b4fc' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.aside-foot { font-size: 0.75rem; color: #64748b; }

/* Form side */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    width: 100%;
}
.login-container > .login-card { width: 100%; max-width: 400px; }

.login-card {
    background: transparent;
}

.login-header {
    padding: 0 0 1.75rem;
    color: var(--dark-color);
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    margin-bottom: 0.5rem;
}

.logo-icon {
    width: 22px;
    height: 22px;
}

.logo h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.login-subtitle {
    font-size: 0.9375rem;
    color: var(--secondary-color);
    font-weight: 400;
}

.login-body {
    padding: 0;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--secondary-color);
    pointer-events: none;
    transition: var(--transition);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--dark-color);
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: 0 1px 2px 0 rgb(15 23 42 / 0.04);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-control:focus + .input-icon {
    color: var(--primary-color);
}

.form-control::placeholder {
    color: #94a3b8;
}

.toggle-password {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.toggle-password:hover {
    color: var(--dark-color);
}

.toggle-password .eye-icon,
.toggle-password .eye-off-icon {
    width: 20px;
    height: 20px;
}

.toggle-password .eye-off-icon {
    display: none;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check-input {
    width: 1.125rem;
    height: 1.125rem;
    margin-top: 0;
    border-color: var(--border-color);
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-check-label {
    font-size: 0.875rem;
    color: var(--dark-color);
    cursor: pointer;
}

.btn-login {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: white;
    background-color: var(--primary-color);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
    margin-top: 0.5rem;
}

.btn-login {
    box-shadow: 0 6px 16px -6px rgb(79 70 229 / 0.6), inset 0 1px 0 rgb(255 255 255 / 0.15);
}

.btn-login:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 10px 20px -8px rgb(79 70 229 / 0.7);
}

.btn-login:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-light);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login .btn-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.validation-summary.validation-summary-valid {
    display: none;
}

.validation-summary ul { list-style: none; }

.validation-summary {
    color: var(--danger-color);
    font-size: 0.8125rem;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius);
}

.text-danger {
    display: block;
    font-size: 0.75rem;
    color: var(--danger-color);
    margin-top: 0.375rem;
}

.login-footer {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    margin-top: 0.5rem;
}

.version {
    font-size: 0.75rem;
    color: var(--secondary-color);
    text-align: center;
}

@media (max-width: 900px) {
    .login-shell { grid-template-columns: 1fr; }
    .login-aside { display: none; }
}

@media (min-width: 901px) {
    .login-footer { display: none; }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card {
    animation: fadeInUp 0.4s ease-out;
}
