:root {
    color-scheme: light;
    --surface: rgba(255, 255, 255, 0.95);
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --accent: #14b8a6;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --error: #ef4444;
    --radius-lg: 20px;
    --shadow-lg: 0 25px 70px rgba(15, 23, 42, 0.25);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
    background: radial-gradient(circle at top right, rgba(79, 70, 229, 0.55), transparent 55%),
        radial-gradient(circle at bottom left, rgba(20, 184, 166, 0.45), transparent 50%),
        #0f172a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.login-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 32px;
    width: min(1100px, 100%);
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.12), rgba(148, 163, 184, 0.05));
    border-radius: calc(var(--radius-lg) + 6px);
    padding: 48px;
    backdrop-filter: blur(22px);
    box-shadow: var(--shadow-lg);
}

.login-hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 24px;
    padding-inline: 12px;
    color: rgba(255, 255, 255, 0.92);
}

.hero-badge {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: rgba(20, 184, 166, 0.25);
    display: grid;
    place-items: center;
    font-size: 28px;
    color: #0f172a;
}

.login-hero h1 {
    margin: 0;
    font-size: clamp(28px, 3vw, 36px);
    font-weight: 700;
}

.login-hero p {
    margin: 0;
    line-height: 1.8;
    font-size: 16px;
}

.hero-highlights {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
}

.hero-highlights li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
}

.hero-highlights i {
    color: var(--accent);
}

.login-panel {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 40px;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-weight: 700;
    font-size: 20px;
}

.panel-brand h2 {
    margin: 0;
    font-size: 24px;
}

.panel-brand p {
    margin: 6px 0 0;
    color: var(--text-muted);
    font-size: 15px;
}

.login-form {
    display: grid;
    gap: 20px;
}

.input-field {
    display: grid;
    gap: 8px;
    font-size: 15px;
}

.input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, #ffffff 0%, rgba(79, 70, 229, 0.12) 100%);
    border: 1px solid rgba(79, 70, 229, 0.35);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.input-wrapper i {
    color: var(--primary);
    font-size: 18px;
}

.input-wrapper input {
    border: none;
    background: none;
    outline: none;
    font-size: 15px;
    flex: 1;
    color: var(--text-main);
}

.input-wrapper input::placeholder {
    color: rgba(15, 23, 42, 0.4);
}

.password-toggle {
    border: none;
    background: rgba(79, 70, 229, 0.12);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s ease, color 0.2s ease;
}

.password-toggle:hover {
    background: rgba(79, 70, 229, 0.22);
}

.form-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
    color: var(--text-muted);
}

.remember {
    display: flex;
    align-items: center;
    gap: 8px;
}

.link-muted {
    color: var(--primary);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.link-muted:hover {
    opacity: 0.8;
}

.btn-primary {
    border: none;
    outline: none;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(79, 70, 229, 0.45);
}

.form-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: var(--error);
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
}

.panel-footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

@media (max-width: 1024px) {
    .login-layout {
        padding: 32px;
    }
}

@media (max-width: 920px) {
    body {
        padding: 24px 16px;
    }

    .login-layout {
        grid-template-columns: 1fr;
        padding: 32px 24px;
    }

    .login-hero {
        order: 2;
        text-align: center;
        align-items: center;
    }

    .hero-highlights {
        justify-items: center;
    }

    .login-panel {
        order: 1;
    }
}

@media (max-width: 520px) {
    .login-layout {
        padding: 24px 18px;
    }

    .login-panel {
        padding: 30px 24px;
    }

    .form-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-primary {
        font-size: 15px;
    }
}
