:root {
    --bg-glass: rgba(255, 255, 255, 0.9);
    --border-glass: 1px solid rgba(255, 255, 255, 0.5);
    --card-bg: rgba(255, 255, 255, 0.75);
    --text-main: #2c3e50;
    --text-sec: #7f8c8d;
    --input-bg: #f8f9fa;
    --accent: #2980b9;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    --logo-filter: drop-shadow(0 0 5px rgba(41, 128, 185, 0.3));
}

[data-theme="dark"] {
    --bg-glass: rgba(13, 17, 23, 0.85);
    --border-glass: 1px solid rgba(255, 255, 255, 0.08);
    --card-bg: rgba(22, 27, 34, 0.7);
    --text-main: #ffffff;
    --text-sec: #8b949e;
    --input-bg: #21262d;
    --accent: #388bfd;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    --logo-filter: brightness(1.1) drop-shadow(0 0 10px rgba(0, 255, 255, 0.6));
}

* {
    box-sizing: border-box;
    transition: 0.3s;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background-image: url('../img/fondo_claro.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-main);
}

[data-theme="dark"] body {
    background-image: url('../img/fondo_oscuro.png');
}

.main-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 10;
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.logo-img {
    width: 140px;
    height: auto;
    display: block;
    margin: 0 auto 15px auto;
    filter: var(--logo-filter);
}

h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
}

.login-card {
    background: var(--card-bg);
    border: var(--border-glass);
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    width: 100%;
    backdrop-filter: blur(10px);
}

.input-group {
    margin-bottom: 20px;
}

.input-group input {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: var(--input-bg);
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
}

.input-group input:focus {
    border-color: var(--accent);
}

button#btn-login {
    width: 100%;
    padding: 14px;
    margin-top: 10px;
    background: linear-gradient(90deg, #2980b9, #3498db);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
}

button#btn-login:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

#error {
    background: rgba(231, 76, 60, 0.15);
    color: #ff6b6b;
    font-size: 0.9rem;
    margin-top: 20px;
    padding: 12px;
    border-radius: 8px;
    display: none;
    text-align: center;
}

.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--card-bg);
    border: var(--border-glass);
    color: var(--text-main);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
}
