:root {
    --primary-color: #741d2d;
    --primary-light: #a02838;
    --accent-gold: #fbbf24;
    --text-dark: #1f2937;
    --bg-light: #f8fafc;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #fef3c7 0%, #fce7f3 50%, #dbeafe 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: 0;
    margin: 0;
}

/* Hero Section (como himnario) */
.hero-login {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    padding: 80px 0 120px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(116, 29, 45, 0.2);
}

.hero-login::before {
    content: '♪';
    position: absolute;
    font-size: 300px;
    color: rgba(255, 255, 255, 0.05);
    top: -80px;
    right: 10%;
    animation: float 6s ease-in-out infinite;
}

.hero-login::after {
    content: '♫';
    position: absolute;
    font-size: 200px;
    color: rgba(255, 255, 255, 0.05);
    bottom: -50px;
    left: 5%;
    animation: float 4s ease-in-out infinite reverse;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-icon {
    font-size: 6rem;
    color: var(--accent-gold);
    margin-bottom: 25px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    animation: float 3s ease-in-out infinite;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 20px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.2);
    letter-spacing: 1px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #fef3c7;
    font-style: italic;
    max-width: 700px;
    margin: 0 auto;
}

/* Login Card Container (como search-box) */
.login-container {
    max-width: 1000px;
    /* Aumentado para diseño horizontal */
    margin: -70px auto 60px;
    position: relative;
    z-index: 10;
    padding: 0 20px;
}

.login-card {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border-radius: 30px;
    padding: 50px 60px;
    /* Aumentado para más espacio horizontal */
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    border: 4px solid var(--accent-gold);
    transition: all 0.3s ease;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 20px 60px rgba(116, 29, 45, 0.25);
}

.card-body {
    position: relative;
}

.login-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 10px;
    text-align: center;
}

.text-muted {
    color: #6b7280 !important;
    text-align: center;
    margin-bottom: 35px;
    font-size: 1rem;
}

/* Formulario */
.mb-3 {
    margin-bottom: 1.5rem;
}

.form-label {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
    font-size: 0.95rem;
}

.input-group {
    position: relative;
    display: flex;
}

.input-group-text {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border: none;
    color: white;
    padding: 14px 16px;
    border-radius: 12px 0 0 12px;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-control {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    color: var(--text-dark);
    padding: 14px 20px;
    font-size: 1.05rem;
    border-radius: 0 12px 12px 0;
    transition: all 0.3s ease;
    flex: 1;
}

.form-control:focus {
    background: white;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.1);
    outline: none;
    color: var(--text-dark) !important;
}

.form-control::placeholder {
    color: #9ca3af;
}

/* Botón de login */
.btn-login {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border: none;
    color: white;
    font-weight: 700;
    padding: 14px 20px;
    /* Reducido para layout horizontal */
    border-radius: 12px;
    /* Más compacto */
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(116, 29, 45, 0.4);
    white-space: nowrap;
    /* Evitar que el texto se rompa */
}

.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(116, 29, 45, 0.5);
}

.btn-login:active {
    transform: translateY(-1px);
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--primary-light);
    text-decoration: none;
}

/* Alerts */
.alert {
    border-radius: 15px;
    border: none;
    padding: 16px 20px;
    margin-bottom: 20px;
    animation: slideDown 0.4s ease-out;
    font-weight: 500;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #dc2626;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-left: 4px solid #fbbf24;
}

/* Botones secundarios */
.btn-secondary,
.btn-outline-secondary {
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    color: var(--text-dark);
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.btn-secondary:hover,
.btn-outline-secondary:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border: none;
    color: white;
    font-weight: 700;
    padding: 14px 28px;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(116, 29, 45, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(116, 29, 45, 0.4);
}

/* Timer y elementos especiales de verificación */
.code-input {
    font-size: 2rem;
    font-weight: bold;
    letter-spacing: 12px;
    text-align: center;
    padding: 20px;
    border-radius: 12px;
    border: 3px solid var(--accent-gold);
    background: white;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.code-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(116, 29, 45, 0.1);
}

.timer {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(116, 29, 45, 0.3);
    font-family: monospace;
    font-size: 1.1rem;
}

.security-icon {
    font-size: 4.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 8px rgba(116, 29, 45, 0.2));
}

.info-box {
    background: #fef3c7;
    border-left: 4px solid var(--accent-gold);
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    color: #92400e;
}

/* Select mejorado */
.form-select {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    color: var(--text-dark);
    padding: 14px 20px;
    font-size: 1.05rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.form-select:focus {
    background: white;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.1);
    outline: none;
}

/* Iconos */
.bi {
    vertical-align: middle;
}

/* Loading spinner */
.spinner-border {
    border-color: rgba(116, 29, 45, 0.2);
    border-top-color: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-icon {
        font-size: 4rem;
    }

    .login-card {
        padding: 40px 30px;
        border-radius: 25px;
    }

    .login-title {
        font-size: 1.8rem;
    }

    .btn-login {
        padding: 16px;
        font-size: 1rem;
    }

    .code-input {
        font-size: 1.6rem;
        letter-spacing: 8px;
    }

    .hero-login {
        padding: 60px 0 100px;
    }

    .login-container {
        margin: -60px auto 40px;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-icon {
        font-size: 3.5rem;
    }

    .login-card {
        padding: 35px 25px;
    }
}

/* Transiciones globales suaves */
* {
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

button,
input,
select,
textarea {
    transition: all 0.3s ease !important;
}