body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background-image: url('fondo-r2c.png'); /* o fondo-r2c.png */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: #333;
}

.card, .dashboard-header, .inicio-container {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px); /* opcional: efecto suave de vidrio */
    max-width: 1200px;
    width: 95%;
    margin: 40px auto;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    text-align: left;
}


input {
    width: 90%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
}

button {
    width: 95%;
    padding: 10px;
    background: #c40000;
    border: none;
    color: white;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
}

button:hover {
    background: #a00000;
}

.logo {
    width: 140px;
    margin-bottom: 20px;
}

.logo-small {
    width: 100px;
    padding: 10px;
}

/*
nav {
    background: #222;
    color: white;
    margin-top: 20px;
    border-radius: 8px;
}

nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    padding: 10px 0;
    margin: 0;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 8px 12px;
}

nav ul li a:hover {
    background-color: #444;
    border-radius: 5px;
}
*/
main {
    padding: 20px;
    text-align: left;
    width: 96%;
    max-width: 1400px;
    margin: 0 auto;
}

.error {
    color: red;
}

h1, h2 {
    color: #333;
    margin-bottom: 15px;
}

section {
    margin-bottom: 40px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

th, td {
    padding: 10px;
    border: 1px solid #ccc;
    text-align: left;
}

th {
    background-color: #f0f0f0;
}

.pdf-viewer {
    width: 100%;
    height: 900px;
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: block;
}



.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

.logo-dashboard  {
    max-width: 160px;
    height: auto;
    display: block;
}


.welcome-text h2 {
    margin: 0;
    color: #333;
}

.bienvenida {
    margin: 4px 0 0;
    color: #666;
}

.logout-link {
    margin-top: 30px;
    text-align: right;
}

.logout-link a {
    color: red;
    font-weight: bold;
    text-decoration: none;
}

.logout-link a:hover {
    text-decoration: underline;
}


.galeria-carousel {
  position: relative;
  max-width: 1000px;
  margin: 40px auto;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 10px 0;
}

.galeria-wrapper {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 10px;
}

.galeria-wrapper img {
  flex: 0 0 auto;
  width: 300px;
  height: 420px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  background: #fff;
  padding: 5px;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.galeria-wrapper img:hover {
  transform: scale(1.05);
}




    
    /* === NUEVO LAYOUT CON SIDEBAR GRUPO R2C === */

.layout {
  display: flex;
  min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
  width: 250px;
  background: rgba(20, 20, 20, 0.96);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;   /* ← antes: space-between */
  padding: 20px 0;
  box-shadow: 3px 0 10px rgba(0,0,0,0.25);
  min-height: 100vh;             /* asegura alto completo */
}

.sidebar-header {
  text-align: center;
  padding: 10px 15px;
}

.sidebar-logo {
  width: 130px;
  border-radius: 10px;
  margin-bottom: 10px;
}

.sidebar-user {
  color: #ccc;
  font-size: 13px;
}

.sidebar-user .user-name {
  font-weight: bold;
  font-size: 15px;
  color: #fff;
}

/* --- Navegación --- */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;                      /* separa los links */
  margin-top: 12px;              /* menos espacio bajo el header */
}
/* Footer pegado al fondo */
.sidebar-footer {
  margin-top: auto;              /* empuja el footer hacia abajo */
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
}


.nav-link {
  color: #ccc;
  text-decoration: none;
  padding: 12px 25px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.nav-link:hover {
  background: #c40000;
  color: #fff;
}

.nav-link.active {
  background: #a00000;
  color: #fff;
  font-weight: bold;
}

.sidebar-footer {
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 15px;
}

.logout {
  color: #ff7070;
  text-decoration: none;
  font-weight: bold;
}

.logout:hover {
  color: #fff;
}

/* --- Contenido principal --- */
.main-content {
  flex: 1;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(5px);
  padding: 30px;
  overflow-y: auto;
}

.topbar {
  border-bottom: 2px solid #c40000;
  padding-bottom: 10px;
  margin-bottom: 25px;
}

.topbar h1 {
  margin: 0;
  color: #222;
}

.subhead {
  color: #666;
  font-size: 15px;
  margin-top: 5px;
}

.content-area {
  padding: 10px;
}

/* --- Responsivo base (tablets y pantallas medianas) --- */
@media (max-width: 900px) {
  .layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
  }

  .sidebar-nav {
    flex-direction: row;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: nowrap;
    padding: 0 10px;
  }

  .main-content {
    padding: 15px;
  }
}

/* --- Ajuste extra para móvil chico (<600px) --- */
@media (max-width: 600px) {
  .inicio-container,
  .card,
  .reportes-card {
    margin: 16px 8px;
    padding: 14px;
    border-radius: 10px;
  }

  .topbar h1 {
    font-size: 18px;
  }

  .subhead {
    font-size: 12px;
  }

  /* En móvil, menú más compacto */
  .sidebar-nav .nav-link {
    padding: 8px 10px;
    font-size: 12px;
  }
}



/* Modelo de caja predecible (evita el warning de width+padding) */
*, *::before, *::after { box-sizing: border-box; }

/* ====== Reportes (Power BI) ====== */
.reportes-card{
  background: #ffffff;                 /* fallback */
  background: rgba(255,255,255,0.94);  /* translúcido */
  -webkit-backdrop-filter: blur(5px);  /* opcional, Safari/Chromium */
  backdrop-filter: blur(5px);          /* opcional; algunos linters avisan */
  max-width: 1400px;
  width: 95%;
  margin: 40px auto;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0,0,0,.1);
  text-align: center;
}

/* Contenedor 16:9 moderno */
.pbi-embed{
  width: 100%;
  aspect-ratio: 16 / 9;     /* moderno, sin trucos de padding */
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
  overflow: hidden;
}

/* Iframe fluido */
.pbi-embed iframe{
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Fallback para navegadores sin aspect-ratio */
@supports not (aspect-ratio: 1){
  .pbi-embed{
    position: relative;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 */
  }
  .pbi-embed iframe{
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;  /* ← evita 'inset' */
    width: 100%;
    height: 100%;
  }
}

/* Botón volver */
.volver{ margin-top: 18px; }
.volver a{ color:#c40000; font-weight:700; text-decoration:none; }
.volver a:hover{ text-decoration: underline; }

.msg {
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 600;
    margin-bottom: 18px;
    font-size: 14px;
}
.msg.ok {
    background: rgba(0,128,0,0.08);
    border: 1px solid #008000;
    color: #0a4a0a;
}
.msg.err {
    background: rgba(200,0,0,0.08);
    border: 1px solid #c40000;
    color: #700;
}

/* ===== Pestañas Reportes ===== */
.tabbar{
  display:flex;
  gap:10px;
  align-items:center;
  margin-top:10px;
  border-bottom:1px solid #e9e9e9;
  padding-bottom:10px;
}
.tabbar .tab-link{
  display:inline-block;
  padding:8px 14px;
  border-radius:999px;
  text-decoration:none;         /* quitar subrayado */
  font-weight:600;
  border:1px solid #ddd;
  background:#fff;
  color:#333;
  box-shadow:0 1px 3px rgba(0,0,0,.06);
  transition:.15s ease;
}
.tabbar .tab-link:hover{
  transform:translateY(-1px);
  box-shadow:0 2px 6px rgba(0,0,0,.10);
}
.tabbar .tab-link.active{
  background:#c40000;
  border-color:#c40000;
  color:#fff;
}


