@charset "utf-8";
header{
	position:fixed;
	top:0;
	width: 100%;
    z-index: 999;
}
.logo{
	max-height:35px;
    margin:5px;
}
.lateral{
    position: sticky;
    top: 50px;
    max-height: calc(100vh - 50px);
    overflow-y: auto;
	background: rgba(204,204,204,1);
    background: -moz-linear-gradient(top, rgba(204,204,204,1) 0%, rgba(255,255,255,0) 100%);
    background: -webkit-gradient(left top, left bottom, color-stop(0%, rgba(204,204,204,1)), color-stop(100%, rgba(255,255,255,0)));
    background: -webkit-linear-gradient(top, rgba(204,204,204,1) 0%, rgba(255,255,255,0) 100%);
    background: -o-linear-gradient(top, rgba(204,204,204,1) 0%, rgba(255,255,255,0) 100%);
    background: -ms-linear-gradient(top, rgba(204,204,204,1) 0%, rgba(255,255,255,0) 100%);
    background: linear-gradient(to bottom, rgba(204,204,204,1) 0%, rgba(255,255,255,0) 100%);
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#cccccc', endColorstr='#ffffff', GradientType=0 );
}
.audio{
    display: none
}
.menu{
	background: #DDD;
}
#login_lay{
    position:absolute;
    background:#333;
    width:320px;
    min-height:400px;
    height:auto;
    top:50%;
    left:50%;
    padding:20px 15px 20px 15px;
    margin-top:-200px;
    margin-left:-160px;
    color:#FFF;
    font-size:14px;
    -webkit-box-shadow:0px 0px 10px 1px rgba(0,0,0,0.75);
    -moz-box-shadow:0px 0px 10px 1px rgba(0,0,0,0.75);
    box-shadow:0px 0px 10px 1px rgba(0,0,0,0.75);
    z-index: 100;
}
#login_lay img{
	max-height:70px;
	margin-right:auto;
	margin-left:auto;
}
#login_lay input{
	color:#333;
}
#login_lay .bt_login{
	background:#000;
	color:#FFF;
	border:0;
}
#login_lay .bt_login:hover{
	cursor:pointer;
	-webkit-box-shadow:0px 0px 5px 0px rgba(0,0,0,0.75);
	-moz-box-shadow:0px 0px 5px 0px rgba(0,0,0,0.75);
	box-shadow:0px 0px 5px 0px rgba(0,0,0,0.75);
}
.menu_lat,
#menu_not{
	list-style-type:none;
	padding:0;
	margin:0;
	padding-left: 0.5rem;
}
#menu_not{
    margin-right:-10px;
}
.menu_lat li,
#menu_not li{
	padding:5px;
	margin:0;
}
.menu_lat li.master{
	border-bottom:2px solid #afafaf;
}
.menu_lat li,
#menu_not li{
	list-style-type:none;
	border-bottom:1px solid #afafaf;
}
.menu_lat li:last-child{
	border-bottom:0;
}
.menu_lat li a.active{
	font-weight:bold;
	color:#9c0000;
}
.valid-status{
	color:#28a745;
	padding:7px;
}
.invalid-status{
	color:red;
	padding:7px 0px;
}
.error-login,
.error-user,
.error-proyecto,
.error-cat,
.error-incidente,
.error-pendiente,
.error-informe{
	color:red;
	padding:7px 0px;
}
.delete_field{
	cursor:pointer;
}
.name_cuadros_tipo{
    writing-mode: vertical-lr;
    /*transform: rotate(-90deg);*/
}
.erase_tipo,
.erase_eplantilla,
.erase_camara{
    cursor:pointer;
}
.erase_tipo:hover,
.erase_eplantilla:hover,
.erase_camara:hover{
    color:red;
}
.ct li{
    border: 1px solid #CCC;
    padding: 3px 10px;
    margin-bottom:5px;
}
.cuadros{
    width:100px;
    height:100px;
    background:gray;
    padding:25px;
}
.cuadros_ptz{
    width:auto;
    height:auto;
    background:gray;
    padding:25px;
}
.line-protocolo{
    color: white;
    background: #303030;
    padding: 10px;
    position: relative;
    margin-top: -259px;
    margin-left: 443px;
    height: 130px;
    font-size: x-large;
    text-align: center;
}
.line-protocolo h2{
    color:white;
}
li.nota{
    padding: 20px 10px !important;
    background-color: #f7f78d;
}
li.nota a:hover{
    color:black;
}
#reporte_download img {
    max-height: 150px;
}
.content .columns:not(.lateral) {
    position: sticky;
    top: 50px;
}
.content .columns:not(.lateral) ~ .columns:not(.lateral) {
    position: static;
}
.btn-sticky {
    position: fixed;
    bottom: 15px;
    right: 15px;
}
#filtros {
    & input, select {
        margin-bottom: 0.5rem;
    }
    
    & hr.dotted {
        margin: 0.3rem;
    }
}
footer{
	width:100%;
	height:auto;
	padding:15px;
	background:rgba(181,181,181,1);
	background:-moz-linear-gradient(top,rgba(181,181,181,1) 0%,rgba(148,12,0,0) 100%);
	background:-webkit-gradient(left top,left bottom,color-stop(0%,rgba(181,181,181,1)), color-stop(100%, rgba(148,12,0,0)));
	background:-webkit-linear-gradient(top,rgba(181,181,181,1) 0%,rgba(148,12,0,0) 100%);
	background:-o-linear-gradient(top,rgba(181,181,181,1) 0%,rgba(148,12,0,0) 100%);
	background:-ms-linear-gradient(top,rgba(181,181,181,1) 0%,rgba(148,12,0,0) 100%);
	background:linear-gradient(to bottom,rgba(181,181,181,1) 0%,rgba(148,12,0,0) 100%);
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#b5b5b5',endColorstr='#940c00',GradientType=0);
}
@media all{
   .saltoDePagina{
      display: none;
   }
}
@media print{
  .saltoDePagina{
    display:block;
    page-break-before:always;
  }
}
#loading{
    display:none;
    position:fixed;
    width:100vw;
    height:100vh;
    top:0;
    left:0;
    background: rgba(0,0,0,0.5);
    z-index:9999;
}
.spinner {
  margin: 100px auto;
  width: 40px;
  height: 40px;
  position: relative;
}

.cube1, .cube2 {
  background-color: white;
  width: 15px;
  height: 15px;
  position: absolute;
  top: 0;
  left: 0;
  
  -webkit-animation: sk-cubemove 1.8s infinite ease-in-out;
  animation: sk-cubemove 1.8s infinite ease-in-out;
}

.cube2 {
  -webkit-animation-delay: -0.9s;
  animation-delay: -0.9s;
}

.maps_container {
    width: 100%;
    height: 300px;
    overflow: auto;
}

.list_images {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

.list_images img {
    max-width: 300px;
    max-height: 300px;
    width: auto;
    height: auto;
}

.pen_titulo {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    max-width: 186px;
}

/* Estilos base para el dashboard - gestión */
.dashboard-tabs {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: space-around;
    
    & li {
        position: relative;
        text-align: center;
        width: 100%;
        
        & a, a:active {
            display: block;
            width: 100%;
            padding: 0.3rem 1rem;
            padding: 1rem;
            text-decoration: none;
            
            &:hover {
               background: #f8f8f8; 
            }
        }
        
        &.active {
            background: #f8f9fa;
        }
    }
}
#loadingTab {
    padding: 1rem;
    position: absolute;
}
.dashboard-container {
    padding: 20px;
    background-color: #f8f9fa;
    min-height: 100vh;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: white;
    padding: 25px;
    border-left: 4px solid #007bff;
}

.metric-card.danger { border-left-color: #dc3545; }
.metric-card.success { border-left-color: #28a745; }
.metric-card.warning { border-left-color: #ffc107; }
.metric-card.info { border-left-color: #17a2b8; }

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.metric-title {
    font-size: 14px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
}

.metric-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
}

.metric-value {
    font-size: 32px;
    font-weight: 700;
    color: #343a40;
    margin-bottom: 5px;
}

.metric-subtitle {
    font-size: 12px;
    color: #6c757d;
}

.charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-card {
    background: white;
    padding: 25px;
}

.chart-title {
    font-size: 18px;
    font-weight: 600;
    color: #343a40;
    margin-bottom: 20px;
    text-align: center;
}

.chart-container {
    position: relative;
    height: 300px;
}

.chart-container.large {
    height: 400px;
}

.filters-section {
    background: white;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-label {
    font-weight: 600;
    color: #343a40;
    margin-bottom: 5px;
    font-size: 14px;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    background: white;
}

.comparison-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comparison-table {
    background: white;
    padding: 25px;
}

.table-title {
    font-size: 18px;
    font-weight: 600;
    color: #343a40;
    margin-bottom: 15px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.data-table tr:hover {
    background: #f8f9fa;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-abierto { background: #fff3cd; color: #856404; }
.status-cerrado { background: #d4edda; color: #155724; }
.status-derivado { background: #d1ecf1; color: #0c5460; }
.status-vencido { background: #f8d7da; color: #721c24; }

@media (max-width: 768px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .charts-section {
        grid-template-columns: 1fr;
    }
    
    .comparison-section {
        grid-template-columns: 1fr;
    }
}

/* Estilos base para el dashboard - alertas */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(255, 255, 255);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.2);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.stat-card.alerts .stat-number { color: #e74c3c; }
.stat-card.threshold .stat-number { color: #f39c12; }
.stat-card.variation .stat-number { color: #9b59b6; }
.stat-card.trend .stat-number { color: #27ae60; }

.stat-label {
    font-size: 0.9rem;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.charts-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.chart-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    height: auto;
    width: 100%;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
}

.chart-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #2c3e50;
    text-align: center;
}

.alerts-table-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    margin-top: 30px;
}

.table-container {
    overflow-x: auto;
    margin-top: 20px;
}

.alert-high { color: #e74c3c; font-weight: 600; }
.alert-medium { color: #f39c12; font-weight: 600; }
.alert-low { color: #27ae60; font-weight: 600; }

.loading {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 1400px) {
    .charts-section {
        grid-template-columns: 1fr;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .header h1 {
        font-size: 2rem;
    }
}

/* Dashboard de pendientes */

.total-box {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 0px 10px rgba(0,0,0,0.3);
}

.total-box h2 {
    color: #667eea;
    font-size: 1.5em;
    margin-bottom: 10px;
}

.total-box .total-number {
    font-size: 4em;
    font-weight: bold;
    color: #764ba2;
}

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

.chart-card-p {
    background: white;
    padding: 25px;
    border-radius: 15px;
    transition: transform 0.3s ease;
}

.chart-card-p h3 {
    text-align: center;
    margin-bottom: 15px;
    color: #333;
    font-size: 1.3em;
}

.chart-value {
    text-align: center;
    margin-top: 15px;
    font-size: 1.5em;
    font-weight: bold;
}

@media (max-width: 768px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .header h1 {
        font-size: 2em;
    }
}

.comparison-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
}

.peak-hours-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.peak-hour-card {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(238, 90, 36, 0.3);
}

.peak-rank {
    font-size: 14px;
    font-weight: bold;
    opacity: 0.9;
}

.peak-time {
    font-size: 16px;
    font-weight: bold;
    margin: 5px 0;
}

.peak-count {
    font-size: 14px;
    opacity: 0.9;
}

.threshold-control-section {
    margin-top: 30px;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.threshold-container {
    margin-top: 15px;
}

.threshold-exceeded {
    background-color: #ffebee !important;
    border-left: 4px solid #f44336;
}

.threshold-ok {
    background-color: #e8f5e8 !important;
    border-left: 4px solid #4caf50;
}

.threshold-exceeded .status {
    color: #d32f2f;
    font-weight: bold;
}

.threshold-ok .status {
    color: #388e3c;
    font-weight: bold;
}

.hours-detail {
    font-size: 12px;
}

.hour-detail {
    display: inline-block;
    margin: 2px;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
}

.hour-exceeded {
    background-color: #ffcdd2;
    color: #d32f2f;
    font-weight: bold;
}

.hour-normal {
    background-color: #c8e6c9;
    color: #388e3c;
}

.no-data {
    color: #999;
    font-style: italic;
}

@-webkit-keyframes sk-cubemove {
  25% { -webkit-transform: translateX(42px) rotate(-90deg) scale(0.5) }
  50% { -webkit-transform: translateX(42px) translateY(42px) rotate(-180deg) }
  75% { -webkit-transform: translateX(0px) translateY(42px) rotate(-270deg) scale(0.5) }
  100% { -webkit-transform: rotate(-360deg) }
}

@keyframes sk-cubemove {
  25% { 
    transform: translateX(42px) rotate(-90deg) scale(0.5);
    -webkit-transform: translateX(42px) rotate(-90deg) scale(0.5);
  } 50% { 
    transform: translateX(42px) translateY(42px) rotate(-179deg);
    -webkit-transform: translateX(42px) translateY(42px) rotate(-179deg);
  } 50.1% { 
    transform: translateX(42px) translateY(42px) rotate(-180deg);
    -webkit-transform: translateX(42px) translateY(42px) rotate(-180deg);
  } 75% { 
    transform: translateX(0px) translateY(42px) rotate(-270deg) scale(0.5);
    -webkit-transform: translateX(0px) translateY(42px) rotate(-270deg) scale(0.5);
  } 100% { 
    transform: rotate(-360deg);
    -webkit-transform: rotate(-360deg);
  }
}