:root {
    --bg: #f8fafc;
    --bg-soft: #eef2ff;
    --card: rgba(255, 255, 255, 0.96);
    --card-border: rgba(148, 163, 184, 0.28);
    --text: #0f172a;
    --text-muted: #64748b;
    --primary: #0284c7;
    --primary-strong: #0369a1;
    --input: #ffffff;
    --danger: #f87171;
    --success: #16a34a;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 20%, rgba(14, 165, 233, 0.14), transparent 35%),
        radial-gradient(circle at 80% 0%, rgba(99, 102, 241, 0.12), transparent 35%),
        linear-gradient(160deg, var(--bg), var(--bg-soft));
}

.page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-shell {
    width: min(980px, 100%);
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.12);
}

.brand-panel {
    padding: 44px;
    background: linear-gradient(170deg, rgba(2, 132, 199, 0.09), rgba(99, 102, 241, 0.08));
    border-right: 1px solid rgba(148, 163, 184, 0.16);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.2px;
    margin-bottom: 20px;
}

.brand-panel h1 {
    margin: 0 0 5px 0;
    font-size: 24px;
}

.brand-panel p {
    margin: 0 0 18px;
    color: var(--text-muted);
    font-size: 14px;
}

.form-panel {
    padding: 42px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.panel-header .dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--primary);
    box-shadow: 0 0 0 6px rgba(14, 165, 233, 0.18);
}

.panel-header h2 {
    margin: 0;
    font-size: 24px;
}

.login-form {
    display: grid;
    gap: 12px;
}

.login-form label {
    font-size: 14px;
    color: #334155;
}

.login-form input[type="email"],
.login-form input[type="password"] {
    width: 100%;
    background: var(--input);
    border: 1px solid rgba(148, 163, 184, 0.45);
    color: var(--text);
    border-radius: 12px;
    padding: 13px 14px;
    font-size: 14px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.login-form input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}

.password-wrap {
    position: relative;
}

.password-wrap .ghost-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #0369a1;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 8px;
}

.password-wrap .ghost-btn:hover {
    background: rgba(14, 165, 233, 0.1);
}

.form-row {
    margin-top: 2px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.check-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-muted);
}

.check-wrap input {
    accent-color: var(--primary);
}

.link-muted {
    color: #0369a1;
    text-decoration: none;
    font-size: 14px;
}

.link-muted:hover {
    text-decoration: underline;
}

.submit-btn {
    margin-top: 8px;
    border: none;
    border-radius: 12px;
    padding: 13px 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: #f8fafc;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s ease, filter .2s ease;
}

.submit-btn:hover {
    filter: brightness(1.05);
}

.submit-btn:active {
    transform: translateY(1px);
}

.form-message {
    min-height: 18px;
    margin: 2px 0 0;
    font-size: 13px;
    color: var(--text-muted);
}

.form-message.error {
    color: var(--danger);
}

.form-message.success {
    color: var(--success);
}

@media (max-width: 900px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

    .brand-panel {
        border-right: none;
        border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    }

    .brand-panel h1 {
        font-size: 28px;
    }
}

@media (max-width: 560px) {
    .page {
        padding: 14px;
    }

    .brand-panel,
    .form-panel {
        padding: 22px;
    }

    .form-row {
        flex-direction: column;
        align-items: flex-start;
    }
}
