* {
    box-sizing: border-box;
    font-family: "Inter", system-ui, sans-serif;
}

:root {
    --bg: linear-gradient(135deg, #f5f5f5, #eaeaea);
    --card: #ffffff;
    --text: #1f2937;
    --subtitle: #6b7280;
    --input-bg: #f9fafb;
    --border: #d1d5db;
    --primary: #dc2626;
    --primary-dark: #b91c1c;
}

body.dark {
    --bg: radial-gradient(circle at top, #111827, #020617);
    --card: linear-gradient(180deg, #0f172a, #020617);
    --text: #e5e7eb;
    --subtitle: #9ca3af;
    --input-bg: #020617;
    --border: #1e293b;
}

body {
    margin: 0;
    height: 100vh;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    transition: background 0.6s ease, color 0.3s ease;
}

.theme-toggle {
    position: fixed;
    top: 18px;
    right: 18px;
    cursor: pointer;
    font-size: 22px;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.theme-toggle:hover {
    transform: rotate(20deg) scale(1.1);
}

.card {
    width: 380px;
    background: var(--card);
    border-radius: 18px;
    padding: 2.6rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    animation: cardEnter 0.7s ease;
}

.logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1.2rem;
    animation: logoPop 0.8s ease;
}

.logo img {
    height: 140px;
    transition: transform 0.4s ease;
}

.logo img:hover {
    transform: scale(1.05);
}

h2 {
    text-align: center;
    margin-bottom: 0.4rem;
    font-size: 22px;
    color: var(--primary);
}

.subtitle {
    text-align: center;
    font-size: 14px;
    color: var(--subtitle);
    margin-bottom: 2rem;
}

label {
    font-size: 13px;
    display: block;
    margin-bottom: 6px;
}

input {
    width: 100%;
    padding: 12px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    margin-bottom: 18px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.25);
    transform: translateY(-1px);
}

button {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(220, 38, 38, 0.35);
}

.forgot {
    text-align: center;
    margin-top: 18px;
    font-size: 13px;
}

.forgot a {
    color: var(--primary);
    text-decoration: none;
    position: relative;
}

.forgot a:hover::after {
    width: 100%;
}

@keyframes cardEnter {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes logoPop {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Toast Notification Styles */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: #fff;
    border-left: 4px solid var(--primary);
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    animation: slideIn 0.4s ease forwards, fadeOut 0.5s ease 4.5s forwards;
    opacity: 0;
    transform: translateX(100%);
}

.toast.error {
    border-color: #dc2626;
    background: #fef2f2;
    color: #991b1b;
}

.toast.success {
    border-color: #16a34a;
    background: #f0fdf4;
    color: #166534;
}

.toast.info {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1e40af;
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}