/* css/style.css - GuardiaWeb Theme */
:root {
    --primary: #f97316;      /* Naranja Seguridad */
    --primary-dark: #c2410c;
    --dark: #0f172a;         /* Azul Noche Profundo */
    --darker: #020617;
    --light: #f1f5f9;
    --white: #ffffff;
    --green: #22c55e;
    --red: #ef4444;
    --sidebar-width: 260px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; background-color: var(--light); color: #334155; display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
    width: var(--sidebar-width); background: var(--darker); color: #94a3b8;
    display: flex; flex-direction: column; position: fixed; height: 100vh; left: 0; top: 0; z-index: 1000;
    border-right: 1px solid #1e293b;
}
.brand { padding: 20px; font-size: 1.3rem; font-weight: 800; border-bottom: 1px solid #1e293b; color: white; display:flex; align-items:center; gap:10px; }
.brand i { color: var(--primary); }
.nav-menu { list-style: none; padding: 20px 0; flex-grow: 1; }
.nav-item a { display: flex; align-items: center; gap: 12px; padding: 12px 20px; color: #94a3b8; text-decoration: none; transition: 0.2s; border-left: 4px solid transparent; }
.nav-item a:hover, .nav-item a.active { background: #1e293b; color: var(--primary); border-left-color: var(--primary); }

/* Main */
.main-content { margin-left: var(--sidebar-width); flex-grow: 1; width: calc(100% - var(--sidebar-width)); }
.dashboard-hero {
    height: 200px;
    background-image: linear-gradient(to right, rgba(15,23,42,0.9), rgba(15,23,42,0.6)), url('../../img/hero-accesos.jpg');
    background-size: cover; background-position: center;
    color: white; padding: 40px; display: flex; flex-direction: column; justify-content: center;
    border-bottom: 4px solid var(--primary);
}
.container { max-width: 1200px; margin: -50px auto 20px auto; padding: 0 20px; position: relative; z-index: 10; }

/* Grid Principal */
.access-grid { display: grid; grid-template-columns: 350px 1fr; gap: 30px; }

/* Tarjetas */
.card { background: white; border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.card-header { background: var(--dark); color: white; padding: 15px 20px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.card-body { padding: 20px; }

/* Formulario */
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 0.9rem; }
.form-control { width: 100%; padding: 10px; border: 1px solid #cbd5e1; border-radius: 6px; }
.btn { width: 100%; padding: 12px; background: var(--primary); color: white; border: none; border-radius: 6px; font-weight: bold; cursor: pointer; text-transform: uppercase; letter-spacing: 1px; }
.btn:hover { background: var(--primary-dark); }

/* Lista de Visitas */
.visit-list { display: flex; flex-direction: column; gap: 10px; }
.visit-item { 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 15px; border: 1px solid #e2e8f0; border-radius: 8px; background: white;
    border-left: 5px solid var(--green); transition: 0.2s;
}
.visit-item:hover { transform: translateX(5px); box-shadow: var(--shadow); }

.visit-info h4 { margin: 0; font-size: 1rem; color: var(--dark); }
.visit-meta { font-size: 0.85rem; color: #64748b; margin-top: 3px; display: flex; gap: 10px; }
.visit-tag { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; font-weight: 600; font-size: 0.75rem; }

.btn-out { background: var(--dark); color: white; padding: 8px 15px; border-radius: 50px; font-size: 0.8rem; text-decoration: none; font-weight: 600; }
.btn-out:hover { background: var(--red); }

/* KPI Badges */
.kpi-badge { background: rgba(255,255,255,0.1); padding: 5px 15px; border-radius: 20px; font-size: 0.9rem; }

/* Mobile */
.menu-toggle { display: none; position: fixed; top: 15px; right: 15px; z-index: 2000; background: var(--primary); border:none; color:white; padding:10px; border-radius:5px; }
@media (max-width: 900px) {
    .access-grid { grid-template-columns: 1fr; }
    .sidebar { transform: translateX(-100%); }
    .sidebar.active { transform: translateX(0); }
    .main-content { margin-left: 0; width: 100%; }
    .menu-toggle { display: block; }
}