:root {
  --primary-color: #123859;
  --primary-light: #1a5080;
  --secondary-color: #f8f9fc;
  --text-color: #333;
  --light-gray: #e6e6e6;
  --accent-purple: #7a76ff;
  --accent-green: #3dd598;
  --accent-orange: #ff9f29;
  --accent-pink: #ff6d6d;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f5f5;
  color: var(--text-color);
  min-height: 100vh;
}

/* Estilos para el login */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-light) 100%
  );
  padding: 20px;
}

.login-card {
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-light) 100%
  );
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.8rem;
}

.login-demo {
  margin-top: 1.5rem;
  padding: 1rem;
  background-color: #f5f5f5;
  border-radius: 8px;
  font-size: 0.9rem;
}

/* Estilos del dashboard */
.dashboard {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  /* width: 280px; */
  background: linear-gradient(
    to bottom,
    var(--primary-color),
    var(--primary-light)
  );
  color: white;
  padding: 2rem 1.5rem;
  transition: transform 0.3s ease;
  z-index: 1000;
}

.main-content {
  flex: 1;
  padding: 2rem;
  background-color: var(--secondary-color);
  overflow-y: auto;
  transition: margin-left 0.3s ease;
}

.user-info {
  text-align: center;
  margin-bottom: 2rem;
}

.user-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: white;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 2rem;
  font-weight: bold;
}

/* .menu-item {
    padding: 0.8rem 1rem;
    margin: 0.5rem 0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.menu-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.menu-item.active {
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: bold;
}

.menu-item i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Estilos para el submenú 
.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    margin-left: 1.5rem;
}

.submenu.open {
    max-height: 500px;
}

.submenu-item {
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    border-radius: 6px;
    margin: 0.3rem 0;
    cursor: pointer;
}

.submenu-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.submenu-item input[type="checkbox"] {
    margin-right: 10px;
    cursor: pointer;
}

.submenu-item label {
    cursor: pointer;
    flex-grow: 1;
}

.menu-item.has-submenu::after {
    content: '\f105';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 1rem;
    transition: transform 0.3s;
}

.menu-item.has-submenu.open::after {
    transform: rotate(90deg);
} */

.menu-item {
  /* padding: 0 15px; */
}

.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 15px;
  cursor: pointer;
  border-radius: 5px;
  margin: 5px 0;
  transition: all 0.3s;
}

.menu-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.menu-toggle.active {
  background-color: rgba(255, 255, 255, 0.2);
  font-weight: bold;
}

.menu-toggle i {
  transition: transform 0.3s;
}

.menu-toggle.active i {
  transform: rotate(90deg);
}

.submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  padding-left: 25px;
}

.submenu.active {
  max-height: 1000px;
  transition: max-height 0.5s ease-in;
}

.checkbox-container {
  display: flex;
  align-items: center;
  padding: 8px 15px;
  border-radius: 5px;
  margin: 3px 0;
  transition: background-color 0.3s;
}

.checkbox-container:hover {
  background-color: #34495e;
}

input[type="checkbox"] {
  margin-right: 12px;
  cursor: pointer;
  width: 18px;
  height: 18px;
  accent-color: #3498db;
}

label {
  cursor: pointer;
  flex: 1;
  font-size: 0.95rem;
}

.counter {
  background-color: #3498db;
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.8rem;
  margin-left: 10px;
}

.selected-count {
  margin-top: 20px;
  padding: 15px;
  background-color: #34495e;
  border-radius: 5px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background-color: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
  color: white;
}

.gaming {
  background-color: var(--accent-purple);
}
.share {
  background-color: var(--accent-green);
}
.user {
  background-color: var(--accent-orange);
}
.rating {
  background-color: var(--accent-pink);
}

.stat-value {
  font-size: 1.8rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.stat-label {
  color: #888;
  font-size: 0.9rem;
}

.reading-section {
  background-color: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.reading-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--light-gray);
}

.reading-title {
  font-size: 1.2rem;
  font-weight: bold;
}

.reading-list {
  max-height: 400px;
  overflow-y: auto;
}

.reading-item {
  padding: 0.8rem;
  border-bottom: 1px solid var(--light-gray);
  display: flex;
  align-items: center;
}

.reading-item:last-child {
  border-bottom: none;
}

.reading-item i {
  margin-right: 10px;
  color: var(--primary-color);
}

/* Toggle checkbox para controlar el menú en móviles */
#menu-toggle {
  display: none;
}

.menu-icon {
  display: none;
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1100;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  align-items: center;
  justify-content: center;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 900;
}

/* Estilos para mensajes flash */
.flash-messages {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  max-width: 400px;
}

/* Estilos responsive */
@media (max-width: 1023px) {
  .menu-icon {
    display: flex;
  }

  .sidebar {
    position: fixed;
    height: 100vh;
    transform: translateX(-100%);
  }

  .sidebar-overlay {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  #menu-toggle:checked ~ .sidebar-overlay {
    display: block;
    opacity: 1;
    pointer-events: all;
  }

  #menu-toggle:checked ~ .dashboard .sidebar {
    transform: translateX(0);
  }
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .main-content {
    padding: 1rem;
  }

  .login-card {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* Mejoras de accesibilidad para el checkbox */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.box-title {
  font-size: 1.5rem;
  font-weight: bold;
  text-align: center;
}
.dark-box {
  /* background-color: #2c3e50; */
  background: linear-gradient(
    to bottom,
    var(--primary-color),
    var(--primary-light)
  );
  color: white;
}
.data-value {
  font-size: 2.5rem;
  font-weight: bold;
}
.table-container {
  overflow-x: auto;
}
.title-with-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.button.is-primary-custom {
  /* Estilos por defecto */
  background-color: var(--primary-color);
  border-color: transparent;
  color: #fff;
}

.button.is-primary-custom:hover {
  /* Estilos al pasar el ratón por encima */
  background-color: var(--primary-light);
}

.fade-in {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s ease-in-out;
}

.fade-out {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease-in-out;
}

.dt-length {
  float: left;
}

.dt-search {
  float: right;
}

.header-totals {
  font-weight: bold;
  /* background-color: #f5f5f5; */
}

.filter-label {
  font-size: 0.8rem;
  margin-top: 0.25rem;
  text-align: center;
}

.input:focus,
.input:focus-within,
.is-focused.input,
.is-focused.textarea,
.select select.is-focused,
.select select:focus,
.select select:focus-within,
.textarea:focus,
.textarea:focus-within {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 0.125em var(--primary-light);
}

.control.has-icons-left .input:focus ~ .icon,
.control.has-icons-left .select:focus ~ .icon,
.control.has-icons-right .input:focus ~ .icon,
.control.has-icons-right .select:focus ~ .icon {
  color: var(--primary-color);
}

.navbar-link:not(.is-arrowless):after,
.select:not(.is-multiple):not(.is-loading):after {
  border-color: #123859;
}
