* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: radial-gradient(circle at top, #f5f5f5 0%, #dadada 40%, #b5b5b5 100%);
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 15px;
}

.login-wrapper {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
}

.login-container {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 22px;
    box-shadow: 0 18px 40px -14px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    transform: scale(1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-container:hover {
    transform: scale(1.005);
    box-shadow: 0 22px 48px -16px rgba(0, 0, 0, 0.4);
}

/* ===== BRAND ===== */
.brand-section {
    background: linear-gradient(135deg, #111 0%, #333 100%);
    padding: 45px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.brand-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path fill="%23ffffff" opacity="0.05" d="M0,0 L100,0 L100,100 Z"/></svg>');
    background-size: cover;
}

.brand-icon {
    font-size: 3.3rem;
    color: white;
    margin-bottom: 18px;
    filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.3));
    position: relative;
    z-index: 2;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.brand-name {
    font-size: 2.4rem;
    font-weight: 800;
    color: white;
    margin: 0;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    letter-spacing: 1.2px;
    font-family: 'Montserrat', sans-serif;
}

.brand-subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 10px;
    position: relative;
    z-index: 2;
    font-weight: 300;
    letter-spacing: 0.8px;
}

/* ===== FORM ===== */
.login-section {
    padding: 35px 30px;
    background: white;
}

.login-title {
    color: #222;
    text-align: center;
    margin-bottom: 30px;
    font-weight: 600;
    font-size: 1.4rem;
    position: relative;
    padding-bottom: 14px;
}

.login-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #000, #555);
    border-radius: 2px;
}

.form-group {
    margin-bottom: 22px;
}

.input-label {
    display: block;
    color: #444;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
    padding-left: 3px;
}

.input-container {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #111;
    font-size: 1rem;
}

.form-input {
    width: 100%;
    padding: 14px 18px 14px 48px;
    font-size: 0.98rem;
    border: 1.7px solid #dedede;
    border-radius: 11px;
    background: #f7f7f7;
    color: #222;
    transition: all 0.25s ease;
    outline: none;
    font-weight: 500;
}

.form-input:focus {
    border-color: #111;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.form-input::placeholder {
    color: #aaa;
    font-weight: 400;
}

.login-button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #111 0%, #444 100%);
    border: none;
    border-radius: 13px;
    color: white;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-top: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    letter-spacing: 0.9px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
    background: linear-gradient(135deg, #000 0%, #333 100%);
}

.login-footer {
    text-align: center;
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid #f0f0f0;
    color: #666;
    font-size: 0.82rem;
}

.copyright {
    color: #999;
    margin-top: 12px;
    font-size: 0.8rem;
}

/* ===== DECOR ===== */
.floating-element {
    position: absolute;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    animation: floatAround 20s linear infinite;
    z-index: 1;
}

.floating-element:nth-child(1) {
    width: 75px;
    height: 75px;
    top: 10%;
    left: 5%;
}

.floating-element:nth-child(2) {
    width: 110px;
    height: 110px;
    bottom: 12%;
    right: 10%;
}

@keyframes floatAround {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(15px, 15px) rotate(90deg); }
    50% { transform: translate(0, 30px) rotate(180deg); }
    75% { transform: translate(-15px, 15px) rotate(270deg); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .brand-section { padding: 38px 24px; }
    .login-section { padding: 28px 22px; }
    .brand-name { font-size: 2.1rem; }
    .brand-icon { font-size: 3rem; }
}

@media (max-width: 576px) {
    body { padding: 18px 12px; }
    .brand-name { font-size: 1.9rem; }
    .brand-icon { font-size: 2.7rem; }
}

/* ===== DARK MODE ===== */
@media (prefers-color-scheme: dark) {
    body {
        background: radial-gradient(circle at top, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    }

    .login-container {
        background: rgba(30, 41, 59, 0.98);
        border-color: rgba(255,255,255,.08);
        box-shadow: 0 18px 40px -14px rgba(0, 0, 0, 0.7);
    }

    .brand-section {
        background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    }

    .login-section {
        background: #1e293b;
    }

    .login-title {
        color: #f1f5f9;
    }

    .login-title::after {
        background: linear-gradient(90deg, #60a5fa, #818cf8);
    }

    .input-label {
        color: #94a3b8;
    }

    .input-icon {
        color: #60a5fa;
    }

    .form-input {
        background: #0f172a;
        border-color: #334155;
        color: #f1f5f9;
    }

    .form-input:focus {
        border-color: #60a5fa;
        background: #0f172a;
        box-shadow: 0 4px 16px rgba(96,165,250,.2);
    }

    .form-input::placeholder {
        color: #475569;
    }

    .login-button {
        background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
        box-shadow: 0 6px 20px rgba(59,130,246,.35);
    }

    .login-button:hover {
        background: linear-gradient(135deg, #1d4ed8 0%, #60a5fa 100%);
        box-shadow: 0 10px 24px rgba(59,130,246,.5);
    }

    .login-footer {
        border-top-color: #334155;
        color: #94a3b8;
    }

    .copyright {
        color: #475569;
    }

    /* Select de roles si existe */
    select.form-input,
    select.form-select {
        background-color: #0f172a;
        border-color: #334155;
        color: #f1f5f9;
    }
}
