/* ============================================================
   VARIABLES INSTITUCIONALES
   ============================================================ */
:root {
  --accent-color: #242C4F;
  --accent-color-f-w: #0077cc;
  --modo-dia-bg: #f5f7fa;
  --modo-noche-bg: #1e1e1e;
  --modo-noche-text: #eee;
}

/* ============================================================
   BASE GENERAL
   ============================================================ */
body {
  font-family: Arial, sans-serif;
  font-size: 12px;
  line-height: 1.4;
  color: #111;
  margin: 0;
  padding: 0;
  transition: background-color 0.4s ease, color 0.4s ease;
}

table, th, td, input, select {
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}

body p {
  text-align: center;
}

/* ============================================================
   MODO DÍA / MODO NOCHE
   ============================================================ */
body.modo-dia {
  background-color: var(--modo-dia-bg);
  color: #111;
}

body.modo-noche {
  background-color: var(--modo-noche-bg);
  color: var(--modo-noche-text);
}

body.modo-noche *,
body.modo-noche a {
  color: var(--modo-noche-text) !important;
}

body.modo-noche a:hover {
  color: #66c2ff !important;
}

/* ============================================================
   MENÚ PRINCIPAL Y SUBMENÚ
   ============================================================ */
#sddm {
  display: flex;
  justify-content: left;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 0;
  background: transparent;
  font-family: 'Segoe UI', 'Roboto', sans-serif;
}

#sddm li {
  list-style: none;
}

#sddm li a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  padding: 4px 0;
  line-height: 1.4;
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
}

#sddm div {
  position: absolute;
  visibility: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 10px 0;
  min-width: 220px;
  z-index: 100;
  transition: opacity 0.3s ease;
}

#sddm div a {
  display: block;
  padding: 10px;
  font-size: 14px;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.3s ease;
}

body.modo-dia #sddm div a {
  background: transparent;
  color: #111;
  border: none;
  box-shadow: none;
}

/* Estilos por modo */
body.modo-dia #sddm li a {
  background: linear-gradient(135deg, #2875DE, #A9CAF1);
  color: white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

body.modo-dia #sddm li a:hover {
  background: linear-gradient(135deg, #A9CAF1, #2875DE);
  transform: translateY(-2px);
  box-shadow: 0 0 12px rgba(40, 117, 222, 0.6);
}

body.modo-noche #sddm li a {
  background: linear-gradient(135deg, #0085B2, #004C66);
  color: #E0ECFF;
  box-shadow: 0 2px 6px rgba(0, 123, 255, 0.2);
}

body.modo-noche #sddm li a:hover {
  background: linear-gradient(135deg, #004C66, #0085B2);
  transform: translateY(-2px);
  box-shadow: 0 0 12px rgba(180, 220, 255, 0.4);
  animation: resplandor 1.2s ease-in-out infinite;
}

/* ============================================================
   TOGGLE MODO DÍA/NOCHE
   ============================================================ */
.toggle-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
}

.toggle-label {
  margin-right: 10px;
  font-size: 12px;
}

.toggle-switch {
  position: relative;
  width: 45px;
  height: 22px;
  background: #ccc;
  border-radius: 11px;
  cursor: pointer;
  transition: background 0.1s ease;
}

.toggle-switch::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  transition: transform 0.1s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

body.modo-noche .toggle-switch {
  background: #2875DE;
}

body.modo-noche .toggle-switch::before {
  transform: translateX(22px);
}

/* ============================================================
   IDENTIDAD DE USUARIO
   ============================================================ */
.usuario-info,
.usuario-rol {
  font-weight: bold;
  color: #fff;
  background: #444;
  padding: 6px 12px;
  border-radius: 8px;
  margin-left: 10px;
  font-size: 13px;
  display: inline-block;
}

/* ============================================================
   COLORES INSTITUCIONALES - <span class="Col010"> </span>
   ============================================================ */
.Col01 { color: #FFF; }
.Col02 { color: #000; }
.Col03 { color: #999; }
.Col04 { color: #0C3; }
.Col05 { color: #0F0; }
.Col06 { color: #F00; }
.Col07 { color: #36C; }
.Col08 { color: #00F; }
.Col09 { color: #0FF; }
.Col10 { color: #3FC; }

.Bold { font-weight: bold; }

/* ============================================================
   EFECTOS VISUALES
   ============================================================ */
@keyframes resplandor {
  0% { box-shadow: 0 0 12px rgba(180, 220, 255, 0.4); }
  50% { box-shadow: 0 0 16px rgba(180, 220, 255, 0.6); }
  100% { box-shadow: 0 0 12px rgba(180, 220, 255, 0.4); }
}

body.modo-dia #sddm li div {
  background: transparent;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

body.modo-dia #sddm li div a {
  background: #fff;
  color: #111;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  padding: 6px 14px;
  margin: 4px 0;
  text-align: center;
  font-size: 13px;
  transition: all 0.3s ease;
}

body.modo-dia #sddm li div a:hover {
  background: #E6F0FF;
  color: #004C66;
  box-shadow: 0 4px 12px rgba(40, 117, 222, 0.3);
  transform: translateY(-1px);
}

body.modo-noche #sddm li div {
  background: transparent;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

body.modo-noche #sddm li div a {
  background: #2a2a2a;
  color: #eee;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  padding: 6px 14px;
  margin: 4px 0;
  text-align: center;
  font-size: 13px;
  transition: all 0.3s ease;
}

body.modo-noche #sddm li div a:hover {
  background: #444;
  color: #66c2ff;
  box-shadow: 0 4px 12px rgba(100, 180, 255, 0.3);
  transform: translateY(-1px);
}

.usuario-info {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: bold;
  color: #fff;
  background: #242C4F;
  padding: 6px 16px;
  border-radius: 8px;
  margin-left: 10px;
  font-size: 13px;
  white-space: nowrap;
}

.indicadores {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: normal;
  font-size: 12px;
  color: #ccc;
}

.indicadores strong {
  color: #fff;
}

/* === Formularios institucionales === */
.form-inline {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 20px 0;
  flex-wrap: wrap;
}

input, select {
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 14px;
  background: var(--input-bg);
  color: var(--text-color);
}

input[type="submit"] {
  background: var(--button-bg);
  color: var(--button-text);
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

input[type="submit"]:hover {
  background: var(--button-hover);
}

/* === Botones en tablas === */
td form input[type="submit"] {
  padding: 6px 12px;
  border-radius: 6px;
  border: none;
  background: var(--button-bg);
  color: var(--button-text);
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

td form input[type="submit"]:hover {
  background: var(--button-hover);
  transform: translateY(-2px);
}

#tablaAccesos th:first-child {
  border-top-left-radius: 10px;
}

#tablaAccesos th:last-child {
  border-top-right-radius: 10px;
}

table tr:first-child th:first-child {
  border-top-left-radius: 10px;
}

table tr:first-child th:last-child {
  border-top-right-radius: 10px;
}

body {
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--background-color);
  color: var(--text-color);
  margin: 20px;
}

h2 {
  text-align: center;
  color: var(--accent-color);
  margin-bottom: 20px;
}

.tabla-perfil {
  width: 80%;
  margin: 0 auto;
  border-collapse: collapse;
  background: var(--table-bg);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
}

.tabla-perfil th {
  background: var(--accent-color);
  color: #fff;
  text-align: left;
  padding: 10px;
  width: 30%;
  font-weight: bold;
  text-transform: uppercase;
}

.tabla-perfil td {
  background: var(--row-alt-bg);
  padding: 10px;
  font-size: 14px;
}

.tabla-perfil tr:first-child th {
  border-top-left-radius: 10px;
}
.tabla-perfil tr:first-child td {
  border-top-right-radius: 10px;
}

input[type="password"] {
  padding: 6px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--input-bg);
  color: var(--text-color);
  width: 60%;
}

input[type="submit"] {
  padding: 6px 12px;
  border-radius: 6px;
  border: none;
  background: var(--button-bg);
  color: var(--button-text);
  cursor: pointer;
  font-weight: bold;
  margin-left: 10px;
}

input[type="submit"]:hover {
  background: var(--button-hover);
}

