/* ===== VARIÁVEIS DE TEMA ===== */
:root {
    --bg: #f4f4f8;
    --surface: #ffffff;
    --text: #1a1a1a;
    --primary: #7c3aed;
    --primary-dark: #5b21b6;
    --border: #e4e4e7;
    --shadow: rgba(0, 0, 0, 0.06);
    --icon-color: #7c3aed;
}

[data-theme="dark"] {
    --bg: #080810;
    --surface: rgba(18, 18, 32, 0.75); /* efeito vidro */
    --text: #e0e0f0;
    --primary: #a78bfa; 
    --primary-dark: #7c3aed;
    --border: rgba(255, 255, 255, 0.05);
    --shadow: rgba(0, 0, 0, 0.5);
    --icon-color: #a78bfa;
}

/* ===== RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'Inter', 'Segoe UI', Tahoma, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.4s ease, color 0.4s ease;
}

/* Helper para ícones SVG */
.icon {
    width: 1.1rem;
    height: 1.1rem;
    display: inline-block;
}

/* ===== CONTAINER DE LOGIN ===== */
.login-container {
    background: var(--surface);
    backdrop-filter: blur(12px);
    padding: 2.5rem;
    border-radius: 16px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 10px 40px var(--shadow);
    border: 1px solid var(--border);
    animation: fadeIn 0.6s ease;
    text-align: center;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== LOGO ===== */
.logo {
    max-width: clamp(120px, 26vw, 200px);
    margin-bottom: 1rem;
}

h2 {
    margin-bottom: 1.5rem;
    color: var(--primary);
    font-weight: 600;
    font-size: 1.3rem;
}

/* ===== INPUTS ===== */
input[type="email"], input[type="password"] {
    width: 100%;
    padding: 0.85rem;
    margin: 0.6rem 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    font-size: 1rem;
    transition: border 0.3s ease, background 0.3s ease;
}

input:focus {
    border-color: var(--primary);
    outline: none;
    background: rgba(124, 58, 237, 0.05);
}

/* ===== BOTÕES ===== */
button {
    width: 100%;
    padding: 0.85rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.erro {
    background: rgba(255,0,0,0.1);
    color: red;
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* ===== BOTÃO TROCAR TEMA ===== */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 4px 15px var(--shadow);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--icon-color);
    font-size: 0; /* conteúdo é SVG */
    transition: background 0.3s ease, transform 0.2s ease, color 0.3s ease, box-shadow 0.2s ease;
}

.theme-toggle:hover {
    transform: scale(1.05);
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
}
