/* Ajuste: la tabla del resumen mensual es más ancha */
.widget.monthly-summary {
  width: 100%;
  max-width: 100vw;
  margin-left: 0px;
  margin-right: auto;
  box-sizing: border-box;
}

/* --- Mejoras para los selectores de mes y año en el dashboard --- */
.dashboard-controls-bar {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 0;
  margin-bottom: 18px;
  margin-top: 10px;
}

@media (max-width: 700px) {
  .dashboard-controls-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
}

.dashboard-selectors {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8fafc;
  border-radius: 8px;
  padding: 10px 18px;
  box-shadow: 0 1px 4px #e3e3e3;
  border: 1px solid #e0e0e0;
}

.dashboard-selectors label {
  font-weight: 500;
  color: #1e88e5;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.dashboard-selectors select {
  padding: 7px 14px;
  border-radius: 6px;
  border: 1.5px solid #b6d0fa;
  font-size: 1em;
  background: #fff;
  color: #333;
  transition: border 0.2s;
  margin-right: 6px;
}

.dashboard-selectors select:focus {
  border: 1.5px solid #1e88e5;
  outline: none;
}

.dashboard-selectors button.secondary-btn {
  margin-left: 8px;
  height: 36px;
  font-size: 0.98em;
}

.info-empresa-grid {
  grid-template-columns: 1fr 1fr;
  gap: 18px 32px;
}

.info-empresa-grid .form-group input[readonly] {
  background: #f3f3f3;
  color: #888;
  cursor: not-allowed;
}

/* Preferencias - configuracion.html */
.preferences-fieldset {
  margin-bottom: 24px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 18px;
  background: #fafbfc;
}

.preferences-legend {
  font-weight: bold;
  color: #1e88e5;
  font-size: 1.1rem;
  padding: 0 8px;
}

.preferences-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 32px;
  align-items: end;
}

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

.preferences-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.preferences-form label {
  font-size: 0.98em;
  color: #333;
  font-weight: 500;
}

.preferences-form input[type="number"],
.preferences-form input[readonly] {
  padding: 8px 10px;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  font-size: 1em;
  background: #fff;
  transition: border 0.2s;
}

.preferences-form input[readonly] {
  background: #f3f3f3;
  font-weight: bold;
  color: #333;
}

.secondary-btn {
  background: #e3eafc;
  color: #1e88e5;
  border: 1px solid #b6d0fa;
  border-radius: 4px;
  padding: 7px 16px;
  font-size: 0.98em;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.secondary-btn:hover {
  background: #d0e2fd;
  color: #1565c0;
}

.preferences-form input[type="number"]:focus,
.preferences-form input[readonly]:focus {
  border: 1.5px solid #1e88e5;
  outline: none;
}

.preferences-form .link-group {
  align-self: flex-end;
  margin-top: 8px;
}

.preferences-form .link-group a {
  color: #1e88e5;
  text-decoration: underline;
  font-size: 0.98em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.preferences-save-btn {
  margin-top: 18px;
  padding: 12px 28px;
  font-size: 1.08em;
  border-radius: 6px;
  font-weight: 600;
  background: linear-gradient(90deg, #1e88e5 60%, #1976d2 100%);
  border: none;
  color: #fff;
  box-shadow: 0 2px 8px rgba(30, 136, 229, 0.08);
  transition: background 0.2s, box-shadow 0.2s;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}

.preferences-save-btn:active {
  background: #1976d2;
}

.preferences-save-btn i {
  font-size: 1.1em;
}

/* Dashboard Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
  --primary-color: #1e88e5;
  --primary-dark: #1976d2;
  --secondary-color: #f5f5f5;
  --text-color: #333;
  --text-light: #666;
  --border-color: #e0e0e0;
  --success-color: #4caf50;
  --warning-color: #ff9800;
  --danger-color: #f44336;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

body {
  background-color: #f5f5f5;
  color: var(--text-color);
}

.dashboard-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
  width: 250px;
  background-color: #fff;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100%;
}

.logo {
  padding: -50px;
  margin-top: -50px;
  margin-bottom: -50px;
  text-align: center;
}

.logo img {
  max-width: 200px;
  height: auto;
}

.main-nav ul {
  list-style: none;
  padding: 0;
}

.nav-item {
  margin-bottom: 5px;
}

.nav-item a {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.3s;
}

.nav-item a i {
  margin-right: 10px;
  font-size: 18px;
}

.nav-item:hover a {
  background-color: rgba(0, 0, 0, 0.05);
}

.nav-item.active a {
  color: var(--primary-color);
  border-left: 3px solid var(--primary-color);
  background-color: rgba(30, 136, 229, 0.1);
}

.user-section {
  margin-top: auto;
  padding: 20px;
  border-top: 1px solid var(--border-color);
}

.user-info {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}


.user-details {
  flex: 1;
}

.user-name {
  font-weight: bold;
  margin-bottom: 2px;
}

.user-email {
  font-size: 0.8rem;
  color: var(--text-light);
}

.logout-btn {
  width: 100%;
  padding: 10px;
  background-color: transparent;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.logout-btn i {
  margin-right: 8px;
}

.logout-btn:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

/* Main Content Styles */
.main-content {
  flex: 1;
  padding: 20px;
  margin-left: 250px;
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.main-menu-btn {
  display: inline-flex;
  align-items: center;
  background-color: var(--primary-color);
  color: #fff !important;
  border: none;
  border-radius: 25px;
  padding: 10px 22px;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none !important;
  box-shadow: 0 2px 8px rgba(30, 136, 229, 0.08);
  transition: background 0.2s, box-shadow 0.2s;
  cursor: pointer;
  gap: 10px;
  vertical-align: middle;
  white-space: nowrap;
  min-width: 220px;
  justify-content: center;
  line-height: 1.2;
}

.main-menu-btn i {
  margin-right: 10px;
  font-size: 1.2em;
  min-width: 20px;
  text-align: center;
}

.main-menu-btn:hover {

  /* Forzar select año visible y habilitado */
  #year-select {
    opacity: 1 !important;
    pointer-events: auto !important;
    background: #fff !important;
    color: var(--text-color) !important;
    border: 1px solid var(--border-color) !important;
    min-width: 80px;
    cursor: pointer;
    z-index: 2;
  }

  #year-select:disabled {
    opacity: 0.7 !important;
    background: #eee !important;
    color: #aaa !important;
    cursor: not-allowed;
  }

  background-color: var(--primary-dark);
  box-shadow: 0 4px 16px rgba(30, 136, 229, 0.15);
  color: #fff !important;
}

.date-display {
  font-size: 1rem;
  color: var(--text-light);
}

/* Dashboard Summary */
.dashboard-summary {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.summary-card {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 20px;
  display: flex;
  align-items: center;
}

.card-icon {
  font-size: 2rem;
  color: var(--primary-color);
  background-color: rgba(30, 136, 229, 0.1);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
}

.card-content h3 {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 5px;
}

.card-value {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 5px;
}

.card-period {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* Dashboard Widgets */
.dashboard-widgets {
  display: block;
  width: 100%;
  max-width: 100vw;
}

.widget {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.widget h2 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

/* Recent Activities Widget */
.activity-list {
  list-style: none;
}

.activity-item {
  display: flex;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.activity-time {
  min-width: 50px;
  font-weight: bold;
}

.activity-details {
  flex: 1;
  margin: 0 15px;
}

.activity-name {
  font-weight: bold;
  margin-bottom: 5px;
}

.activity-project {
  font-size: 0.8rem;
  color: var(--text-light);
}

.activity-duration {
  font-weight: bold;
  color: var(--primary-color);
}

/* Weekly Summary Widget */
.chart-container {
  height: 300px;
  width: 100%;
}

.chart-placeholder {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--secondary-color);
  color: var(--text-light);
  border-radius: 4px;
  text-align: center;
  padding: 20px;
}

/* Modal Styles */
.modal {
  display: none;
  /* Hidden by default */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  /* Black background with opacity */
  overflow: auto;
}

.modal-content {
  background-color: #fff;
  margin: 10% auto;
  width: 500px;
  max-width: 90%;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  animation: modalOpen 0.3s ease-out;
}

@keyframes modalOpen {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--primary-color);
  display: flex;
  align-items: center;
}

.modal-header h2 i {
  margin-right: 10px;
}

.close-modal {
  font-size: 1.5rem;
  color: var(--text-light);
  cursor: pointer;
  transition: color 0.2s;
}

.close-modal:hover {
  color: var(--danger-color);
}

.modal-body {
  padding: 20px;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
  .dashboard-widgets {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    width: 70px;
    overflow: hidden;
  }

  .nav-item a {
    padding: 12px;
    justify-content: center;
  }

  .nav-item a i {
    margin-right: 0;
    font-size: 20px;
  }

  .nav-item span {
    display: none;
  }

  .user-section {
    display: none;
  }

  .main-content {
    margin-left: 70px;
  }
}

@media (max-width: 576px) {
  .dashboard-summary {
    grid-template-columns: 1fr;
  }
}