/* Estilos personalizados para el Sistema de Registro de Lealtad - Tema Oscuro */

/* Variables de colores */
:root {
    --bg-dark: #0a0e17;
    --bg-card: #111827;
    --bg-secondary: #1f2937;
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --accent-primary: #3b82f6;
    --accent-secondary: #10b981;
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    --border-color: rgba(55, 65, 81, 0.5);
    --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --gradient-primary: linear-gradient(135deg, #4f46e5, #7c3aed);
    --gradient-secondary: linear-gradient(135deg, #3b82f6, #8b5cf6);
    --glass-bg: rgba(17, 24, 39, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
}
h1 {font-size: 2em !important}
h2 {font-size: 1.5em !important}
h3 {font-size: 1.17em !important}
h3 {font-size: 1em !important}
h5 {font-size: .83em !important}
h6 {font-size:.67em !important}

/* Estilos generales */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    background: linear-gradient(135deg, #0f172a, #1e1b4b);
    background-size: cover;
    background-attachment: fixed;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="%23111827" fill-opacity="0"/><circle cx="10" cy="10" r="1" fill="%23ffffff" fill-opacity="0.03"/><circle cx="30" cy="10" r="1" fill="%23ffffff" fill-opacity="0.03"/><circle cx="50" cy="10" r="1" fill="%23ffffff" fill-opacity="0.03"/><circle cx="70" cy="10" r="1" fill="%23ffffff" fill-opacity="0.03"/><circle cx="90" cy="10" r="1" fill="%23ffffff" fill-opacity="0.03"/><circle cx="10" cy="30" r="1" fill="%23ffffff" fill-opacity="0.03"/><circle cx="30" cy="30" r="1" fill="%23ffffff" fill-opacity="0.03"/><circle cx="50" cy="30" r="1" fill="%23ffffff" fill-opacity="0.03"/><circle cx="70" cy="30" r="1" fill="%23ffffff" fill-opacity="0.03"/><circle cx="90" cy="30" r="1" fill="%23ffffff" fill-opacity="0.03"/><circle cx="10" cy="50" r="1" fill="%23ffffff" fill-opacity="0.03"/><circle cx="30" cy="50" r="1" fill="%23ffffff" fill-opacity="0.03"/><circle cx="50" cy="50" r="1" fill="%23ffffff" fill-opacity="0.03"/><circle cx="70" cy="50" r="1" fill="%23ffffff" fill-opacity="0.03"/><circle cx="90" cy="50" r="1" fill="%23ffffff" fill-opacity="0.03"/><circle cx="10" cy="70" r="1" fill="%23ffffff" fill-opacity="0.03"/><circle cx="30" cy="70" r="1" fill="%23ffffff" fill-opacity="0.03"/><circle cx="50" cy="70" r="1" fill="%23ffffff" fill-opacity="0.03"/><circle cx="70" cy="70" r="1" fill="%23ffffff" fill-opacity="0.03"/><circle cx="90" cy="70" r="1" fill="%23ffffff" fill-opacity="0.03"/><circle cx="10" cy="90" r="1" fill="%23ffffff" fill-opacity="0.03"/><circle cx="30" cy="90" r="1" fill="%23ffffff" fill-opacity="0.03"/><circle cx="50" cy="90" r="1" fill="%23ffffff" fill-opacity="0.03"/><circle cx="70" cy="90" r="1" fill="%23ffffff" fill-opacity="0.03"/><circle cx="90" cy="90" r="1" fill="%23ffffff" fill-opacity="0.03"/></svg>');
    z-index: 0;
    pointer-events: none;
}

/* Layout principal */
.app-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.container-fluid {
    padding-left: 0;
    padding-right: 0;
}

/* Barra lateral */
.sidebar {
    width: 250px;
    background-color: var(--bg-card);
    border-right: 1px solid var(--border-color);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    overflow-y: auto;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.2);
}

.sidebar-header {
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-menu {
    padding: 1rem 0;
}

.sidebar-menu .nav-link {
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.sidebar-menu .nav-link:hover {
    background-color: var(--bg-secondary);
    color: var(--accent-primary);
}

.sidebar-menu .nav-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.sidebar-menu .nav-link.active {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--accent-primary);
    border-left: 3px solid var(--accent-primary);
}

/* Contenido principal */
.main-content {
    flex: 1;
    margin-left: 250px;
    width: calc(100% - 250px);
    transition: all 0.3s ease;
    padding: 1.5rem 0 0;
    position: relative;
    z-index: 1;
}

/* Para usuarios no autenticados o vista móvil */
.no-sidebar .main-content {
    margin-left: 0;
    width: 100%;
}

/* Encabezado */
header {
    background-color: var(--bg-card);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border-color);
}

.bg-primary {
    background-color: transparent !important;
}

.navbar-brand {
    font-weight: 700;
    color: var(--text-primary) !important;
}

.navbar-dark .navbar-nav .nav-link {
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: var(--accent-primary);
}

/* Tarjetas */
.card {
    background-color: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    margin-bottom: 24px;
    border: 1px solid var(--glass-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    z-index: 2;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}

.card-header {
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 600;
    padding: 16px 20px;
    background: rgba(31, 41, 55, 0.5);
}

.card-body {
    color: var(--text-primary);
    padding: 20px;
    z-index: 1;
    position: relative;
}

/* Botones */
.btn {
    border-radius: 12px;
    font-weight: 500;
    padding: 10px 18px;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    z-index: -1;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.btn:hover::before {
    transform: translateY(0);
}

.btn-primary {
    background-image: var(--gradient-primary);
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 15px rgba(79, 70, 229, 0.5);
}

.btn-success {
    background-color: var(--accent-secondary);
    background-image: linear-gradient(135deg, var(--accent-secondary), #059669);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    box-shadow: 0 6px 15px rgba(16, 185, 129, 0.5);
}

.btn-info {
    background-image: var(--gradient-secondary);
    color: white;
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.3);
}

.btn-info:hover {
    box-shadow: 0 6px 15px rgba(139, 92, 246, 0.5);
    color: white;
}

/* Formularios */
.form-control {
    background-color: rgba(31, 41, 55, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: 12px;
    padding: 12px;
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.form-control:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
    background-color: rgba(31, 41, 55, 0.8);
    color: var(--text-secondary);
}

.form-label {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 8px;
}

/* Tablas */
.table {
    color: var(--text-primary);
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    background-color: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--card-shadow);
}

.table th {
    background-image: var(--gradient-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    color: white;
    padding: 16px;
    border-bottom: 1px solid var(--glass-border);
}

.table td {
    padding: 16px;
    border-bottom: 1px solid var(--glass-border);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(31, 41, 55, 0.4);
}

.table-hover tbody tr:hover {
    background-color: rgba(31, 41, 55, 0.7);
    box-shadow: inset 0 0 0 1000px rgba(139, 92, 246, 0.1);
}

/* Alertas */
.alert {
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    padding: 16px 20px;
    background-color: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-primary);
}

.alert-success::before {
    background: linear-gradient(135deg, var(--accent-secondary), #059669);
}

.alert-danger::before {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
}

.alert-warning::before {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.alert-info::before {
    background: linear-gradient(135deg, var(--accent-primary), #2563eb);
}

/* Iconos */
.fas {
    margin: 0;
}

/* Pie de página */
footer {
    margin-top: 60px;
    padding: 30px 0;
    background-color: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--glass-border);
    color: var(--text-secondary);
    position: relative;
    z-index: 10;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-primary);
    opacity: 0.5;
}

/* Estilos para dispositivos móviles */
@media (max-width: 768px) {
    .card-title {
        font-size: 1.2rem;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .table {
        font-size: 0.9rem;
    }
}

/* Estilos para las tarjetas de estadísticas */
.card .display-4 {
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.form-control::placeholder {
    color: var(--text-secondary);
    opacity: 1;
}

/* Estilos para badges */
.badge {
    font-size: 0.9rem;
    padding: 6px 12px;
    border-radius: 12px;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
}

.badge-primary {
    background-image: var(--gradient-primary);
}

.badge-success {
    background-image: linear-gradient(135deg, var(--accent-secondary), #059669);
}

.badge-info {
    background-image: var(--gradient-secondary);
}

.badge-warning {
    background-image: linear-gradient(135deg, #f59e0b, #d97706);
}

/* Animaciones */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Efectos de brillo para elementos destacados */
.glow-effect {
    position: relative;
    overflow: hidden;
}

/* Nuevos estilos para paneles con efecto cristal */
.glass-panel {
    background-color: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--card-shadow);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    z-index: 2;
}

/* Gradientes para fondos de secciones */
.gradient-bg {
    background-image: var(--gradient-primary);
    border-radius: 16px;
    padding: 3px;
}

.gradient-bg-content {
    background-color: var(--glass-bg);
    border-radius: 14px;
    padding: 20px;
    height: 100%;
}

/* Efectos de brillo para bordes */
.glow-border {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    padding: 1px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.5), rgba(139, 92, 246, 0.5));
}

.glow-border-content {
    background-color: var(--glass-bg);
    border-radius: 15px;
    padding: 20px;
    height: 100%;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.glow-effect::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.glow-effect:hover::after {
    opacity: 1;
}

/* Borde con brillo para elementos pequeños */
.glow-border-mini {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    padding: 1px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.3), rgba(139, 92, 246, 0.3));
}

.glow-border-mini .glow-border-content {
    background-color: rgba(17, 24, 39, 0.5);
    border-radius: 11px;
    height: 100%;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}