:root {
    color-scheme: light;
    --bg: #fff4fb;
    --panel: rgba(255,255,255,0.98);
    --text: #3f2d56;
    --muted: #7c6c91;
    --accent: #ac54d9;
    --accent-soft: #ff8dc2;
    --border: rgba(172,84,217,0.16);
    --shadow: 0 28px 70px rgba(172,84,217,0.12);
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Inter, system-ui, sans-serif;
    color: var(--text);
    background: radial-gradient(circle at top left, rgba(172,84,217,0.14), transparent 26%),
                radial-gradient(circle at bottom right, rgba(255,112,194,0.18), transparent 32%),
                linear-gradient(180deg, #fff4fb 0%, #ffedf8 100%);
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
}
.login-container {
    width: 100%;
    max-width: 420px;
}
.login-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 40px;
    box-shadow: var(--shadow);
}
.header {
    text-align: center;
    margin-bottom: 32px;
}
.brand-circle {
    width: min(260px, 86%);
    height: 118px;
    border-radius: 24px;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: white;
    margin: 0 auto 20px;
    padding: 14px 22px;
    box-shadow: 0 14px 34px rgba(172,84,217,0.1);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.brand-circle:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 40px rgba(172,84,217,0.16);
}
.brand-logo-small {
    width: 100%;
    max-height: 90px;
    height: auto;
    object-fit: contain;
    display: block;
}
.header h1 {
    margin: 0 0 8px;
    font-size: 1.8rem;
    font-weight: 800;
}
.header p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}
.error-card, .success-card {
    padding: 14px 16px;
    border-radius: 16px;
    font-size: 0.93rem;
    margin-bottom: 20px;
    border: 1px solid transparent;
}
.error-card {
    background: rgba(255,100,120,0.12);
    border-color: rgba(255,100,120,0.25);
    color: #c64050;
}
.error-card ul, .success-card ul {
    margin: 6px 0 0;
    padding-left: 20px;
}
.error-card li {
    margin: 6px 0;
}
.success-card {
    background: rgba(76,190,140,0.12);
    border-color: rgba(76,190,140,0.25);
    color: #2d8b6f;
}
.form-group {
    margin-bottom: 18px;
}
label {
    display: block;
    font-size: 0.9rem;
    font-weight: 800;
    color: #352247;
    margin-bottom: 8px;
}
input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid rgba(122,45,169,0.72);
    border-radius: 14px;
    background: #fff;
    color: #2e1d3c;
    font-size: 1rem;
    font-weight: 700;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input:focus {
    border-color: #6f249f;
    box-shadow: 0 0 0 6px rgba(172,84,217,0.14);
}
input::placeholder {
    color: #8f719f;
    font-weight: 700;
}
.password-field {
    position: relative;
    display: block;
}
.password-field input {
    padding-right: 54px;
}
.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: #3f2d56;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
}
.password-toggle svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.password-toggle .eye-closed {
    display: none;
}
.password-toggle[aria-pressed="true"] .eye-open {
    display: none;
}
.password-toggle[aria-pressed="true"] .eye-closed {
    display: block;
}
.password-toggle:hover {
    background: rgba(172,84,217,0.12);
    color: var(--accent);
}
.login-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), var(--accent-soft));
    color: white;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(172,84,217,0.16);
}
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    color: var(--muted);
    font-size: 0.9rem;
}
.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}
.signup-prompt {
    text-align: center;
    color: var(--muted);
    font-size: 0.93rem;
}
.signup-prompt a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
}
.signup-prompt a:hover {
    text-decoration: underline;
}
.forgot-password {
    text-align: center;
    margin-top: 16px;
}
.forgot-password a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
}
.forgot-password a:hover {
    text-decoration: underline;
}
@media (max-width: 480px) {
    .login-card {
        padding: 28px 20px;
    }
    .brand-circle {
        width: min(220px, 88%);
        height: 104px;
    }
    .header h1 {
        font-size: 1.5rem;
    }
}
