/* styles.css */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');
/* Contenedor principal para centrar el contenido */
.main-container {
    width: 90%;
    max-width: 1000px;
    margin: 40px auto;
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 30px;
    color: var(--text-color);
}

/* Encabezado con botones */
.header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

/* Estilo para botones y enlaces de botón */
.button, .button:visited {
    background-color: var(--primary-color);
    color: var(--button-text-color);
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.button:hover {
    background-color: var(--primary-hover-color);
}

:root {
    --primary-bg: #0a0a0a;
    --secondary-bg: #1a1a1a;
    --container-bg: #101010;
    --border-color: #2a2a2a;
    --neon-cyan: #00ffff;
    --neon-cyan-glow: rgba(0, 255, 255, 0.4);
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --error-color: #ff4d4d;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* --- Estilos para Login (login.html) --- */
.login-container {
    background-color: var(--container-bg);
    padding: 40px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: 0 0 25px var(--neon-cyan-glow);
    width: 100%;
    max-width: 400px;
    text-align: center;
    animation: fadeIn 1s ease-in-out;
}

.login-container h2 {
    color: var(--neon-cyan);
    margin-bottom: 30px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.login-container .input-group {
    position: relative;
    margin-bottom: 25px;
}

.login-container input {
    width: 100%;
    padding: 12px 15px;
    background-color: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s ease;
}

.login-container input:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px var(--neon-cyan-glow);
}

.login-container label {
    display: block;
    text-align: left;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

.login-container input[type="submit"] {
    background: linear-gradient(90deg, var(--neon-cyan), #00b8b8);
    color: var(--primary-bg);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.login-container input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px var(--neon-cyan-glow);
}

/* --- Estilos Generales y para Admin/Index --- */
.main-container {
    width: 100%;
    max-width: 1200px;
    background: var(--container-bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    animation: fadeIn 1s ease;
}

h1, h2, h3 {
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

h1 {
    color: var(--neon-cyan);
    font-size: 2em;
}

h2 {
    font-size: 1.5em;
}

h3 {
    font-size: 1.2em;
    border-bottom: none;
}

.header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

a {
    color: var(--neon-cyan);
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

a:hover {
    color: #fff;
    text-shadow: 0 0 10px var(--neon-cyan-glow);
}

.button, button {
    padding: 10px 20px;
    border: 1px solid var(--neon-cyan);
    background-color: transparent;
    color: var(--neon-cyan);
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    transition: all 0.3s ease;
    margin: 5px;
}

.button:hover, button:hover {
    background-color: var(--neon-cyan);
    color: var(--primary-bg);
    box-shadow: 0 0 20px var(--neon-cyan-glow);
}

/* Estilos para Admin (admin.php) */
.admin-panel ul {
    list-style: none;
    padding: 20px 0;
}

.admin-panel li {
    margin-bottom: 15px;
}

.admin-panel a {
    font-size: 1.2em;
}

/* Estilos para Visor de Logs (index.php) */
#lista-carpetas {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

#resultados {
    margin-bottom: 30px;
}

#kpi-diario-content p, #resultados p {
    margin-bottom: 10px;
    color: var(--text-secondary);
}

#kpi-diario-content b, #resultados b {
    color: var(--text-primary);
    font-weight: 600;
}

#live-log-container {
    border: 1px solid var(--border-color);
    padding: 20px;
    margin-top: 20px;
    background-color: var(--secondary-bg);
    font-family: 'Courier New', Courier, monospace;
    white-space: pre-wrap;
    height: 350px;
    overflow-y: scroll;
    border-radius: 5px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}

#live-log-container h2 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

/* Scrollbar futurista */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--secondary-bg);
}
::-webkit-scrollbar-thumb {
    background: var(--neon-cyan);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #00e6e6;
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
/* Estilos para KPI Diario */

#resultados {
    background-color: #2c2c2e;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.kpi-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.kpi-section {
    flex: 1;
    min-width: 250px;
}

.kpi-section h4 {
    margin-top: 0;
    color: #0a84ff;
    border-bottom: 1px solid #444;
    padding-bottom: 5px;
}

.kpi-section ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    font-size: 0.9em;
}

.kpi-section ul li {
    padding: 4px 0;
}
#resultados {
    background-color: #2c2c2e;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.kpi-header h3 {
    margin: 0;
}

.timespan-selector button {
    background-color: #3a3a3c;
    border: 1px solid #555;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
}

.timespan-selector button.active {
    background-color: #0a84ff;
    border-color: #0a84ff;
}

.kpi-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.kpi-section {
    flex: 1;
    min-width: 300px;
}

.kpi-section h4 {
    margin-top: 0;
    color: #0a84ff;
}

.kpi-section table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.kpi-section th, .kpi-section td {
    text-align: left;
    padding: 6px;
    border-bottom: 1px solid #3a3a3c;
}

.kpi-section th {
    color: #8e8e93;
}

.heatmap {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 3px;
    padding: 5px;
    background-color: #1c1c1e;
    border-radius: 4px;
}

.heat-cell {
    background-color: #3a3a3c;
    color: #fff;
    text-align: center;
    padding: 4px 2px;
    font-size: 0.8em;
    border-radius: 2px;
}
/* En styles.css, añade esto al final */

.tab-container {
    margin-top: 20px;
}

.tab-buttons {
    border-bottom: 2px solid #3a3a3c;
    margin-bottom: 15px;
}

.tab-button {
    background-color: transparent;
    border: none;
    color: #8e8e93;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 1em;
    border-radius: 5px 5px 0 0;
}

.tab-button.active {
    background-color: #2c2c2e;
    color: white;
    border: 2px solid #3a3a3c;
    border-bottom: 2px solid #2c2c2e; /* Truco para que se una con el fondo */
    position: relative;
    top: 2px;
}

/* Por defecto, todos los paneles de contenido están ocultos */
.tab-content {
    display: none;
}

/* Solo el panel con la clase 'active' se mostrará */
.tab-content.active {
    display: block;
}
.iframe-container {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* Relación de aspecto 16:9 (9 / 16 = 0.5625) */
  height: 0;
  overflow: hidden;
}

.iframe-container {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* Ajusta esta proporción si necesitas más alto o más bajo */
  height: 0;
  overflow: hidden;
}

.iframe-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}