/* css/styles.css - Versión Ultra Moderna Premium */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --accent: #10b981;
    --bg-dark: #070b14;
    --card-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-main: #f1f5f9;
    --text-dim: #94a3b8;
    --sidebar-w: 280px;
    --radius: 20px;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(168, 85, 247, 0.1) 0px, transparent 50%);
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* SIDEBAR REINVENTADO */
.sidebar {
    width: var(--sidebar-w);
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    height: 100vh;
    position: fixed;
    z-index: 2000;
    border-right: 1px solid var(--glass-border);
    padding: 30px 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item {
    padding: 14px 18px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-dim);
    margin-bottom: 8px;
    cursor: pointer;
    font-weight: 500;
}

.nav-item:hover, .nav-item.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.4);
}

.nav-item i { font-size: 1.2rem; min-width: 24px; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 15px 30px -10px rgba(0,0,0,0.3);
}

.stat-icon {
    width: 65px;
    height: 65px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.icon-visits { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.icon-residents { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.icon-alerts { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }

/* CONTENIDO PRINCIPAL */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-w);
    width: calc(100% - var(--sidebar-w));
    padding-bottom: 50px;
}

.top-header {
    height: 80px;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(7, 11, 20, 0.5);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.menu-toggle {
    display: none;
    width: 45px;
    height: 45px;
    background: var(--card-bg);
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--glass-border);
    cursor: pointer;
}

/* CARDS MODERNAS */
.content-wrapper { padding: 40px; max-width: 1400px; margin: 0 auto; }

.section-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
}

/* INPUTS Y BOTONES */
.form-group label { font-weight: 600; color: var(--text-dim); margin-bottom: 10px; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; }

input, select, textarea {
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 12px !important;
    padding: 14px 18px !important;
    color: white !important;
    font-size: 1rem;
    width: 100%;
}

input:focus { border-color: #6366f1 !important; outline: none; box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2); }

.btn-primary {
    background: var(--primary);
    border: none;
    padding: 16px 30px;
    border-radius: 14px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.4);
}

/* RESPONSIVO MOBILE */
@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); border-radius: 0 30px 30px 0; }
    .sidebar.active { transform: translateX(0); box-shadow: 20px 0 60px rgba(0,0,0,0.8); }
    .main-content { margin-left: 0; width: 100%; }
    .menu-toggle { display: flex; }
    .content-wrapper { padding: 20px; }
    .top-header { padding: 0 20px; }
    h1 { font-size: 1.5rem; }
}

/* ESTILO DE TABLAS EN MÓVIL */
.table-container { 
    background: rgba(15, 23, 42, 0.4);
    border-radius: 16px;
    padding: 5px;
}

table { border-collapse: separate; border-spacing: 0 8px; }
tr { background: rgba(255,255,255,0.02); }
td, th { padding: 20px !important; border: none !important; }
td:first-child, th:first-child { border-radius: 15px 0 0 15px; }
td:last-child, th:last-child { border-radius: 0 15px 15px 0; }

.badge {
    background: rgba(99, 102, 241, 0.1);
    color: #818cf8;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
}
