:root{
  --black: #000000;
  --bs-site1: #1061ac;
  --bs-site1-rgb: 16,97,172;
  --bs-site-2: #005177;
  --bs-site-2-rgb: 0,81,119;
  --bs-site-3: #a8ce84;
  --bs-site-3-rgb: 168,206,132;
  --bs-dark: #1d2d3e;
  --bs-dark-rgb: 29,45,62;
  --sidebar-width: 280px;
  --white: #ffffff;
}

/***********************
 GENERAL
 ***********************/
body { color: #858796; }
a, button { transition: all 0.5s ease; }
a { color: var(--bs-site1); }
a:hover { color: var(--bs-dark); }

h1, h2, h3, h4, h5, h6 { color: var(--black); }
h1, h2, h3 { font-weight: bold; }
h4, h5, h6 { font-weight: normal; }
h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.2rem; }

@media (max-width: 1299px) {
  h1 { font-size: 2.6rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.8rem;}
  h4 { font-size: 1.3rem; }
  h5 { font-size: 1.1rem; }
}

@media (max-width: 999px) {
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.8rem; }
  h3 { font-size: 1.6rem; }
  h4 { font-size: 1.2rem; }
  h5 { font-size: 1rem; }
}

@media (max-width: 690px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.3rem; }
  h4 { font-size: 1.1rem; }
}

.bg-site1 { background-color: var(--bs-site1); }
.bg-site2 { background-color: var(--bs-site-2); }
.bg-site3 { background-color: var(--bs-site-3); }

.text-site1 { color: var(--bs-site1); }
.text-site2 { color: var(--bs-site-2); }
.text-site3 { color: var(--bs-site-3); }

.btn-primary {
  --bs-btn-bg: var(--bs-site1);
  --bs-btn-border-color: var(--bs-site1);
  --bs-btn-hover-bg: var(--bs-site-2);
  --bs-btn-hover-border-color: var(--bs-site-2);
}

.btn-primary:hover {
  --bs-btn-bg: var(--bs-site-2);
  --bs-btn-border-color: var(--bs-site-2);
}

.btn-site1 {
  --bs-btn-bg: var(--bs-site1);
  --bs-btn-border-color: var(--bs-site1);
  --bs-btn-hover-bg: var(--bs-site-2);
  --bs-btn-hover-border-color: var(--bs-site-2);
  color: var(--white);
}

.btn-site1:hover {
  --bs-btn-bg: var(--bs-site-2);
  --bs-btn-border-color: var(--bs-site-2);
  color: var(--white);
}

.btn-site2 {
  --bs-btn-bg: var(--bs-site-2);
  --bs-btn-border-color: var(--bs-site-2);
  --bs-btn-hover-bg: var(--bs-site-3);
  --bs-btn-hover-border-color: var(--bs-site-3);
}

.btn-site2:hover {
  --bs-btn-bg: var(--bs-site-3);
  --bs-btn-border-color: var(--bs-site-3);
}

.btn-site3 {
  --bs-btn-bg: var(--bs-site-3);
  --bs-btn-border-color: var(--bs-site-3);
  --bs-btn-hover-bg: var(--bs-site-2);
  --bs-btn-hover-border-color: var(--bs-site-2);
  color: var(--white);
}

.btn-site3:hover {
  --bs-btn-bg: var(--bs-site-2);
  --bs-btn-border-color: var(--bs-site-2);
  color: var(--white);
}

.form-group { margin-bottom: 1rem; }

.app-sidebar { width: var(--sidebar-width); }
.brand-gradient { background: linear-gradient(135deg, var(--bs-site1), var(--bs-dark)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.btn-outline-primary { 
  --bs-btn-color: var(--bs-site1); 
  --bs-btn-border-color: var(--bs-site1); 
  --bs-btn-hover-color: var(--white); 
  --bs-btn-hover-bg: var(--bs-site1); 
  --bs-btn-hover-border-color: var(--bs-site1); 
}

@media (min-width: 992px){
    body {
        display: grid;
        grid-template-columns: var(--sidebar-width) 1fr;
        grid-template-rows: auto 1fr auto;
        grid-template-areas:
            "sidebar header"
            "sidebar main"
            "sidebar footer";
        min-height: 100vh;
    }
    header { grid-area: header; }
    aside.app-sidebar { grid-area: sidebar; height: 100vh; overflow-y: auto; position: sticky; top: 0; }
    main { grid-area: main; }
    footer { grid-area: footer; }
}

/***********************
 LOGIN
 ***********************/
.ts-login { background: #f6f8f9; display: grid; min-height: 100dvh; place-items:center; }
.ts-login-container { width: 100%; }
.btn-teal {--bs-btn-bg: #17a2b8; --bs-btn-border-color: #17a2b8; --bs-btn-hover-bg: #138496; --bs-btn-hover-border-color: #117a8b; color: var(--white); }
.btn-teal:hover { color: var(--white); }

@media (min-width: 993px) {
  .ts-login { grid-template-columns: 0 1fr; }
}

/***********************
 FRONT PAGE
 ***********************/
.demo-form .form-group { background: var(--white); border: 1px solid #EAEAEA; border-radius: 10px; padding: 20px 10px 6px; position: relative; }
.demo-form .form-group label { color: #999999; font-size: 11px; left: 10px; line-height: 11px; position: absolute; text-transform: uppercase; top: 10px; }
.demo-form .form-group .form-control, .demo-form .form-group .form-control[disabled] { background-color: transparent; border: none; border-radius: 0; color: #000000; font-size: 13px; padding: 9px 0 3px; }
.demo-form .form-group .form-control:focus { box-shadow: none; border: none; }


/***********************
 CHECKING / CHECKOUT
 ***********************/
#ts-form-checkin-checkout { margin: 0 auto; max-width: 530px; min-height: 100vh; text-align: center; }
#ts-form-checkin-checkout form { left: 50%; max-width: 530px; padding-inline: 15px; position: absolute; top: 50%; transform: translate(-50%, -50%); width: 100%; }
#ts-form-checkin-checkout .display-input { background-color: #ffffff; border: 1px solid #EAEAEA; border-radius: 8px; box-shadow: none; font-size: 18px; padding: 15px; width: 100%; text-align: center; margin-bottom: 1.5rem; }
#ts-form-checkin-checkout .btn-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
#ts-form-checkin-checkout .btn { font-size: 1.5rem !important; padding: 1rem !important; cursor: pointer !important; border: none !important; background: #0073aa !important; color: #fff !important; border-radius: 8px !important; }
#ts-form-checkin-checkout .btn:hover { background: #005177 !important; }
#ts-form-checkin-checkout .btn-clear { background: #888 !important; }
#ts-form-checkin-checkout .btn-clear:hover { background: #555 !important; }
#ts-form-checkin-checkout .btn-submit { background: #2ea2cc !important; }
#ts-form-checkin-checkout .btn-submit:hover { background: #1e8caa !important; }
#ts-form-checkin-checkout .message { margin-top: 1rem; font-size: 1.2rem; padding: 1rem; border-radius: 5px; }
#ts-form-checkin-checkout .message.error { color: #b30000; background-color: #fdd; border: 1px solid #b30000; }
#ts-form-checkin-checkout .message.success { color: #006600; background-color: #dfd; border: 1px solid #006600; }

@media (max-width: 999px) {
    #ts-form-checkin-checkout .btn-grid { gap: 10px; }
    #ts-form-checkin-checkout .btn { font-size: 1.2rem !important; }
}


/***********************
 COMPANY DASHBOARD
 ***********************/
 .breadcrumb-enhanced { background: linear-gradient(135deg, rgba(78, 115, 223, 0.1), rgba(7, 40, 55, 0.1)); border-left: 4px solid var(--bs-site1); border-radius: 8px; margin-bottom: 1.5rem; padding: 1rem 1.5rem; }

 .page-header { align-items: center; display: flex; justify-content: between; margin-bottom: 2rem; }
.page-title { align-items: center; display: flex; gap: 1rem; }
.page-icon { align-items: center; background: linear-gradient(135deg, var(--bs-site1), var(--bs-dark)); border-radius: 12px; color: white; font-size: 1.5rem; display: flex; height: 48px; justify-content: center; width: 48px; }

.brand-gradient { background: linear-gradient(135deg, var(--bs-site1), var(--bs-dark)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.live-indicator { align-items: center; background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.2); border-radius: 20px; display: inline-flex; font-size: 0.8rem; gap: 6px; padding: 4px 12px; }
.pulse { animation: pulse 2s infinite; background: #10b981; border-radius: 50%; height: 6px; width: 6px; }
  
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.2); }
}
  
.metric-change { border-radius: 4px; font-size: 0.75rem; font-weight: 500; padding: 2px 6px; }
  
.change-positive {  background: rgba(16, 185, 129, 0.1); color: #10b981; }
.change-negative { background: rgba(220, 53, 69, 0.1); color: #dc3545; }
  
.activity-item { border-bottom: 1px solid #dee2e6; padding: 0.75rem; transition: background-color 0.2s ease; }
.activity-item:hover { background-color: rgba(14, 165, 164, 0.05); }
.activity-item:last-child { border-bottom: none; }
  
.employee-avatar { align-items: center; border-radius: 50%; color: white; display: flex; font-size: 0.75rem; font-weight: 600; height: 32px; justify-content: center; width: 32px; }
  
.status-badge { border-radius: 12px; font-size: 0.75rem; font-weight: 500; padding: 4px 8px; }
.status-active { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.status-break { background: rgba(255, 193, 7, 0.1); color: #def8d6; }
.status-offline { background: rgba(108, 117, 125, 0.1); color: #6c757d; }
  
.office-progress { background-color: #e9ecef; border-radius: 2px; height: 4px; overflow: hidden; }
.office-progress-bar { height: 100%; transition: width 0.3s ease; }
  
.refresh-animation { animation: spin 1s linear infinite; }
  
.company-header { background: linear-gradient(135deg, var(--bs-site1), var(--bs-dark)); border-radius: 0.375rem 0.375rem 0 0; color: white; padding: 1.5rem; }
.company-header h4 { color: var(--white); }
.time-display { font-family: 'Courier New', monospace;  font-size: 1.1rem; font-weight: bold; }

.config-card { border: 1px solid #e3e6f0; border-radius: 12px; overflow: hidden; transition: all 0.3s ease; }
.config-card:hover { border-color: var(--bs-site1); border-color: var(--bs-site1); transform: translateY(-2px); }
.config-card-header { background: linear-gradient(135deg, var(--bs-site1), var(--bs-dark)); border-bottom: none; color: white; padding: 1rem 1.5rem; }
.config-card-header h5 { color: var(--white); }
.config-card-body { background: var(--white); padding: 1.5rem; }

.config-item { align-items: center; border-bottom: 1px solid #f1f3f4; display: flex; justify-content: between; padding: 0.75rem 0; }
.config-item:last-child { border-bottom: none; }

.config-label { color: #5a6c7d; font-weight: 500; }
.config-value { color: var(--bs-dark); font-weight: 600; }
.config-actions { display: flex; gap: 0.5rem; }

.btn-config { border-radius: 6px; font-size: 0.8rem; padding: 0.25rem 0.75rem; }


/***********************
 ACCORDION
 ***********************/
details { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; box-shadow: 0 2px 6px rgba(0,0,0,0.05); margin: 1rem 0; padding: 0.8rem 1rem; transition: all 0.3s ease; }
details:hover { border-color: #0073aa; box-shadow: 0 4px 12px rgba(0,115,170,0.1); }

details summary { color: #005177; cursor: pointer; font-size: 1rem; font-weight: 600; list-style: none; padding-right: 1.5rem; position: relative; }
details summary::after { content: "➕"; color: #0073aa; font-size: 1rem; position: absolute; right: 0; top: 50%; transform: translateY(-50%); transition: transform 0.3s ease, content 0.3s ease; }  

details[open] { animation: openDetails 0.3s ease; }
details[open] summary { margin-bottom: 15px; }
details[open] summary::after { content: "➖"; transform: translateY(-50%) rotate(180deg); }

@keyframes openDetails { 
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}


/***********************
 TABS
 ***********************/
/* TABS MEJORADOS - Añadir al <style> de holidays.php o a tu CSS global */

.nav-tabs {
  border: none;
  background: white;
  padding: 0.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  display: inline-flex;
  gap: 0.5rem;
}

.nav-tabs .nav-item {
  margin-bottom: 0;
}

.nav-tabs .nav-link {
  border: none;
  border-radius: 8px;
  padding: 8px 20px;
  color: #6c757d;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  background: transparent;
}

.nav-tabs .nav-link:hover {
  color: var(--bs-primary);
  background: rgba(78, 115, 223, 0.05);
}

.nav-tabs .nav-link.active {
  color: white;
  background: var(--bs-dark);
  box-shadow: 0 4px 12px rgba(78, 115, 223, 0.3);
}

.nav-tabs .nav-link i {
  margin-right: 0.5rem;
  transition: transform 0.3s ease;
}

.nav-tabs .nav-link.active i {
  transform: scale(1.1);
}

/* Animación al cambiar de tab */
.tab-content > .tab-pane {
  animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
  from {
      opacity: 0;
      transform: translateY(10px);
  }
  to {
      opacity: 1;
      transform: translateY(0);
  }
}

/* Responsive - Tabs en móvil */
@media (max-width: 768px) {
  .nav-tabs {
      flex-direction: column;
      width: 100%;
  }
  
  .nav-tabs .nav-link {
      width: 100%;
      text-align: center;
  }
}

/***********************
 SCHEDULES
 ***********************/
.schedule-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid #e3e6f0;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.schedule-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--bs-primary), var(--brand-dark));
}

.schedule-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.schedule-header { align-items: start; display: flex; justify-content: space-between; margin-bottom: 1rem; }
.schedule-name { color: var(--brand-dark); font-size: 1.1rem; font-weight: 600; }

.schedule-type-badge {
  padding: 0.375rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

.type-daily { background: rgba(78, 115, 223, 0.1); color: var(--bs-primary); }
.type-slots { background: rgba(40, 167, 69, 0.1); color: #28a745; }

.schedule-info {
  margin: 1rem 0;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.info-row:last-child { margin-bottom: 0; }

.info-label {
  color: #6c757d;
  font-size: 0.875rem;
}

.info-value {
  font-weight: 600;
  color: var(--brand-dark);
}

.days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
  margin-top: 1rem;
}

.day-badge {
  text-align: center;
  padding: 0.5rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.day-active {
  background: var(--bs-primary);
  color: white;
  border-color: var(--bs-primary);
}

.day-inactive {
  background: #f1f3f4;
  color: #adb5bd;
}

.slots-container {
  margin-top: 1rem;
}

.slot-item {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  border-left: 3px solid var(--bs-primary);
}

.slot-day {
  min-width: 80px;
  font-weight: 600;
  color: var(--brand-dark);
}

.slot-time {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}

.time-badge {
  padding: 0.25rem 0.5rem;
  background: white;
  border-radius: 6px;
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
}

.slot-auto-close {
  margin-left: auto;
  font-size: 0.75rem;
  color: #6c757d;
}

.employees-count {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(78, 115, 223, 0.1);
  border-radius: 8px;
  color: var(--bs-primary);
  font-weight: 600;
}

.action-buttons {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.btn-action {
  flex: 1;
  padding: 0.5rem;
  border-radius: 8px;
  border: 1px solid #e3e6f0;
  background: white;
  transition: all 0.2s ease;
  font-size: 0.875rem;
}

.btn-action:hover {
  background: #f8f9fa;
  border-color: var(--bs-primary);
  color: var(--bs-primary);
}

.modal-header {
  background: linear-gradient(135deg, var(--bs-primary), var(--brand-dark));
  color: white;
  border-radius: 12px 12px 0 0;
}

.form-section {
  background: #f8f9fa;
  padding: 1.25rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.form-section-title {
  font-weight: 600;
  color: var(--brand-dark);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.day-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
}

.day-checkbox {
  display: none;
}

.day-checkbox-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  border: 2px solid #e3e6f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
}

.day-checkbox:checked + .day-checkbox-label {
  background: var(--bs-primary);
  color: white;
  border-color: var(--bs-primary);
}

.day-checkbox-label:hover {
  border-color: var(--bs-primary);
}

.time-slot-row {
  display: flex;
  gap: 0.75rem;
  align-items: end;
  margin-bottom: 0.75rem;
  padding: 1rem;
  background: white;
  border-radius: 8px;
}

.btn-add-slot {
  background: linear-gradient(135deg, var(--bs-primary), var(--brand-dark));
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-remove-slot {
  padding: 0.5rem 0.75rem;
  border: 1px solid #dc3545;
  background: white;
  color: #dc3545;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.btn-remove-slot:hover {
  background: #dc3545;
  color: white;
}

.filter-section {
  background: white;
  padding: 1.25rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  border: 1px solid #e3e6f0;
}

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

.stat-card {
  background: white;
  padding: 1.25rem;
  border-radius: 12px;
  border: 1px solid #e3e6f0;
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--brand-dark);
}

.stat-label {
  color: #6c757d;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.empty-state {
  text-align: center;
  padding: 3rem;
  background: white;
  border-radius: 12px;
  border: 2px dashed #e3e6f0;
}

.empty-state i[class*="calendar"], i[class*="tablet"] {
  font-size: 4rem;
  color: #e3e6f0;
  margin-bottom: 1rem;
}

/***************
 HOLIDAYS
 ***************/
 .holiday-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid #e3e6f0;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.holiday-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.holiday-date {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--bs-primary);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.holiday-day {
  font-size: 0.75rem;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.holiday-info {
  flex: 1;
  padding: 0 1rem;
}

.holiday-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--brand-dark);
  margin-bottom: 0.5rem;
}

.scope-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

.scope-global {
  background: rgba(78, 115, 223, 0.1);
  color: var(--bs-primary);
}

.scope-company {
  background: rgba(40, 167, 69, 0.1);
  color: #28a745;
}

.scope-office {
  background: rgba(255, 193, 7, 0.1);
  color: #def8d6;
}

.working-day-badge {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
}

/* CALENDARIO MEJORADO */
.calendar-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.calendar-nav-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #e3e6f0;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.25rem;
  color: #6c757d;
}

.calendar-nav-btn:hover {
  background: var(--bs-primary);
  border-color: var(--bs-primary);
  color: white;
  transform: scale(1.1);
}

.calendar-month-display h3 {
  font-weight: 700;
  color: var(--brand-dark);
  min-width: 300px;
  text-align: center;
}

.calendar-container {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.calendar-grid-large {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1rem;
}

.calendar-day {
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0.75rem;
  position: relative;
  background: #f8f9fa;
  border: 2px solid transparent;
  padding: 0.75rem;
}

.calendar-day:not(.header):not(.empty):hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 10;
}

.calendar-day.header {
  background: var(--bs-dark);
  color: white;
  font-weight: 700;
  cursor: default;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.875rem;
  aspect-ratio: auto;
  padding: 1rem;
}

.calendar-day.holiday {
  background: var(--bs-primary);
  color: white;
  border-color: var(--bs-primary);
}

.calendar-day.working-holiday {
  background: rgba(220, 53, 69, 0.2);
  color: #dc3545;
  border: 2px dashed #dc3545;
}

.calendar-day.today {
  background: #ffffff;
  color: #000;
  border-color: var(--bs-dark);
  font-weight: 700;
}

.calendar-day.today.holiday {
  background: linear-gradient(135deg, var(--bs-primary), #def8d6);
  border-color: var(--bs-primary);
}

.calendar-day.empty {
  cursor: default;
  background: transparent;
}

.calendar-day-number {
  font-size: 1rem;
  font-weight: 600;
}

.calendar-day-event {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.event-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
}

.calendar-day:not(.holiday) .event-dot {
  background: var(--bs-primary);
}

/* Leyenda */
.calendar-legend {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
  padding: 1rem;
  background: white;
  border-radius: 12px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legend-color {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: inline-block;
}

/* Mini cards de festivos */
.month-holidays-list {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.holiday-card-mini {
  padding: 1rem;
  border: 1px solid #e3e6f0;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  transition: all 0.2s ease;
}

.holiday-card-mini:hover {
  border-color: var(--bs-primary);
  box-shadow: 0 2px 8px rgba(78, 115, 223, 0.2);
}

.holiday-date-mini {
  min-width: 60px;
  text-align: center;
  margin-right: 1rem;
}

.date-number {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--bs-primary);
  line-height: 1;
}

.date-day {
  font-size: 0.75rem;
  color: #6c757d;
  text-transform: uppercase;
  margin-top: 0.25rem;
}

.holiday-info-mini {
  padding: 0 1rem;
}

.holiday-name-mini {
  font-weight: 600;
  color: var(--brand-dark);
  margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
  .calendar-grid-large {
      gap: 0.5rem;
  }
  
  .calendar-day {
      padding: 0.5rem;
      font-size: 0.875rem;
  }
  
  .calendar-day-number {
      font-size: 1rem;
  }
  
  .calendar-container {
      padding: 1rem;
  }
  
  .calendar-month-display h3 {
      font-size: 1.25rem;
      min-width: 200px;
  }
}

.year-selector {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.year-selector button {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid #e3e6f0;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.year-selector button:hover {
  background: var(--bs-primary);
  color: white;
  border-color: var(--bs-primary);
}

.year-display {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand-dark);
}

.scope-option {
  border: 2px solid #e3e6f0;
  border-radius: 12px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  background: white;
}

.scope-option:hover {
  border-color: var(--bs-primary);
  background: rgba(78, 115, 223, 0.05);
}

.scope-option input[type="radio"] {
  display: none;
}

.scope-option input[type="radio"]:checked + .scope-content {
  color: var(--bs-primary);
}

.scope-option input[type="radio"]:checked ~ * {
  border-color: var(--bs-primary);
}

.scope-option.active {
  border-color: var(--bs-primary);
  background: rgba(78, 115, 223, 0.05);
}

.scope-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.scope-title {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.scope-description {
  font-size: 0.875rem;
  color: #6c757d;
}

.selection-area {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #e3e6f0;
  border-radius: 8px;
  padding: 1rem;
}

.selectable-item {
  padding: 0.75rem;
  border: 1px solid #e3e6f0;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.selectable-item:hover {
  background: #f8f9fa;
}

.selectable-item input[type="checkbox"] {
  margin-right: 0.75rem;
}


/******************
 DEVICEs
 ******************/
 .device-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid #e3e6f0;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.device-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--bs-primary), var(--brand-dark));
}

.device-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.device-card.inactive {
  opacity: 0.6;
}

.device-card.inactive::before {
  background: #6c757d;
}

.device-header {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.device-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-right: 1rem;
  background: linear-gradient(135deg, rgba(78,115,223,0.1), rgba(7,40,55,0.1));
}

.device-info {
  flex: 1;
}

.device-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--brand-dark);
  margin-bottom: 0.25rem;
}

.device-code {
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
  color: #6c757d;
  background: #f8f9fa;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
}

.connection-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 0.5rem;
  position: relative;
}

.connection-indicator.online {
  background: #28a745;
  animation: pulse-green 2s infinite;
}

.connection-indicator.recent {
  background: #ffc107;
}

.connection-indicator.offline {
  background: #6c757d;
}

@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7); }
  50% { box-shadow: 0 0 0 6px rgba(40, 167, 69, 0); }
}

.device-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.detail-item { display: block; }
.detail-item i { color: var(--bs-primary); margin-right: 0.35rem; }

.detail-label { color: #6c757d; font-size: 0.75rem; text-transform: uppercase; }

.detail-value {
  font-weight: 600;
  color: var(--brand-dark);
}

.device-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.device-badge {
  padding: 0.375rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.badge-global {
  background: rgba(78, 115, 223, 0.1);
  color: var(--bs-primary);
}

.badge-company {
  background: rgba(40, 167, 69, 0.1);
  color: #28a745;
}

.badge-type {
  background: rgba(255, 193, 7, 0.1);
  color: #f57c00;
}

.badge-active {
  background: rgba(40, 167, 69, 0.1);
  color: #28a745;
}

.badge-inactive {
  background: rgba(108, 117, 125, 0.1);
  color: #6c757d;
}

.device-features {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e3e6f0;
}

.feature-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.feature-icon.enabled {
  background: rgba(40, 167, 69, 0.1);
  color: #28a745;
}

.feature-icon.disabled {
  background: #f8f9fa;
  color: #adb5bd;
}

.action-buttons {
  display: flex;
  gap: 0.5rem;
}

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

.stat-card {
  background: white;
  padding: 1.25rem;
  border-radius: 12px;
  border: 1px solid #e3e6f0;
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--brand-dark);
}

.stat-label {
  color: #6c757d;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}
