/* Theme: dark (extracted from global.css) */
body[data-theme="dark"] .modal textarea,
    body[data-theme="dark"] .modal-content textarea,
    body[data-theme="dark"] textarea.form-control,
    body[data-theme="dark"] textarea.input,
    body[data-theme="dark"] textarea {
      background: var(--surface-2, #1b1b1b);
      color: var(--text-1, #f2f2f2);
      border: 1px solid var(--border-1, #3a3a3a);
    }/* Desktop toggle icon colors */
body[data-theme="dark"] .icon-btn{ color: #f1f1f1; }body[data-theme="dark"] .floating-toggle{
  color: #ffffff;
}body[data-theme="dark"] .rel-item{
  color: #f3f4f6 !important;
}body[data-theme="dark"] .general-table tbody tr:hover{
  background: rgba(255,255,255,0.06);
}body[data-theme="dark"] .sidebar{
  scrollbar-color: rgba(255,255,255,0.25) rgba(255,255,255,0.06); /* thumb track */
}body[data-theme="dark"] .sidebar::-webkit-scrollbar-track{
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
}body[data-theme="dark"] .sidebar::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,0.22);
  border-radius: 10px;
  border: 2px solid rgba(0,0,0,0); /* gives padding */
  background-clip: padding-box;
}body[data-theme="dark"] .sidebar::-webkit-scrollbar-thumb:hover{
  background: rgba(255,255,255,0.32);
  background-clip: padding-box;
}body[data-theme="dark"] .sidebar .icon-action[data-tooltip]::after{
  background: rgba(17,24,39,0.92);
  color:#f3f4f6;
  border:1px solid rgba(255,255,255,0.10);
  box-shadow: 0 12px 30px rgba(0,0,0,0.40);
}body[data-theme="dark"] .sidebar .icon-action[data-tooltip]::before{
  border-top-color: rgba(17,24,39,0.92);
}body[data-theme="dark"] .app-shell.collapsed .sidebar .nav-item[data-tooltip]::after{
  background: rgba(17,24,39,0.92);
  color:#f3f4f6;
  border:1px solid rgba(255,255,255,0.10);
  box-shadow: 0 12px 30px rgba(0,0,0,0.40);
}body[data-theme="dark"] .app-shell.collapsed .sidebar .nav-item[data-tooltip]::before{
  border-right-color: rgba(17,24,39,0.92);
}body[data-theme="dark"] .sidebar .nav-item[data-tooltip]::after{
  background: rgba(17,24,39,0.92);
  color:#f3f4f6;
  border:1px solid rgba(255,255,255,0.10);
  box-shadow: 0 12px 30px rgba(0,0,0,0.40);
}body[data-theme="dark"] .sidebar .nav-item[data-tooltip]::before{
  border-right-color: rgba(17,24,39,0.92);
}

@media (max-width: 1024px){
  .module-general .general-table thead { display: none; }             /* oculta encabezados */
  .module-general .general-table,
  .module-general .general-table tbody,
  .module-general .general-table tr,
  .module-general .general-table td { display: block; width: 100%; }

  .module-general .general-table tbody { display: flex; gap: 12px; flex-direction: column; }  /* separación entre tarjetas */

  .module-general .general-table tr.general-row{
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 14px;
    padding: 12px;
  }

  .module-general .general-table td{
    border: 0;
    padding: 8px 0;
    /* label + valor en filas */
    display: grid;
    grid-template-columns: 120px 1fr;
    align-items: center;
  }

  /* Rótulo del campo */
  .module-general .general-table td::before{
    content: attr(data-label);
    font-weight: 600;
    color: #e8e8e8;
    opacity: .95;
    padding-right: 8px;
  }

  /* v12 mobile table-card labels in light theme */
@media (max-width: 1024px){
  body[data-theme="medical"] .module-general .general-table td::before{
    color: #111827 !important;
    opacity: 1 !important;
  }
  body[data-theme="medical"] .module-general .general-table td{
    color: #111827 !important;
  }
  body[data-theme="medical"] .module-general .general-table tr{
    border-color: rgba(0,0,0,0.10) !important;
  }
}

/* Acciones como fila aparte (botones adaptables) */
  .module-general .general-table td.actions{
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
  }
  .module-general .general-table td.actions::before{ content: attr(data-label); font-weight:600; width:100%; }

  .module-general .general-table td.actions .btn{
    flex: 1 1 auto;
    justify-content: center;
  }
}

/* =========================================================
   Agendamiento – Calendar + modals (Theme: Dark)
   ========================================================= */
body[data-theme="dark"] .agendamiento-module{
  --ag-bg:#121417;
  --ag-surface:#15181c;
  --ag-surface-soft:#1b1f24;
  --ag-border: rgba(255,255,255,0.06);
  --ag-text:#f6f7f9;
  --ag-text-muted: rgba(246,247,249,0.58);
  --ag-accent:#40b4ff;
}
body[data-theme="dark"] .agendamiento-module .ag-calendar-shell{
  border-color: rgba(255,255,255,0.08);
  background: linear-gradient(180deg, #0f1114 0%, #0d1012 100%);
}
/* encabezado de columnas */
body[data-theme="dark"] .agendamiento-module .ag-header-row{
  background: rgba(20,24,30,0.92);
  border-bottom:1px solid rgba(255,255,255,0.08);
}
body[data-theme="dark"] .agendamiento-module .ag-col-header{
  color: var(--ag-text);
  border-right-color: rgba(255,255,255,0.08);
}
/* columna de horas */
body[data-theme="dark"] .agendamiento-module .ag-hours{
  background: rgba(0,0,0,0.10);
  border-right-color: rgba(255,255,255,0.08);
}
body[data-theme="dark"] .agendamiento-module .ag-hours-slot{
  color: var(--ag-text-muted);
  border-bottom-color: rgba(255,255,255,0.06);
}
/* celdas */
body[data-theme="dark"] .agendamiento-module .ag-cell{
  border-color: rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
}
body[data-theme="dark"] .agendamiento-module .ag-cell:hover{
  background: rgba(64,180,255,0.10);
}
body[data-theme="dark"] .agendamiento-module .ag-item{
  background: linear-gradient(90deg, rgba(64,180,255,0.95) 0%, rgba(29,112,150,0.45) 100%);
  border-color: rgba(186,229,255,0.32);
}
body[data-theme="dark"] .agendamiento-module .ag-item.block{
  background: linear-gradient(90deg, rgba(240,140,60,0.95) 0%, rgba(110,60,30,0.35) 100%);
  border-color: rgba(240,140,60,0.65);
}
/* modales (mantener dark) */
body[data-theme="dark"] .agendamiento-module .ag-modal{ background: rgba(5,6,8,0.55); }
body[data-theme="dark"] .agendamiento-module .ag-modal-box{ background:#15181c; border-color: rgba(255,255,255,0.08); color: var(--ag-text); }

/* =========================================================
   Agendamiento – Bloqueo tiempo_espera (gris, no naranja)
   ========================================================= */
body[data-theme="dark"] .agendamiento-module .ag-item.block--espera{
  background: linear-gradient(90deg, rgba(90,92,98,0.92) 0%, rgba(48,50,56,0.55) 100%);
  border: 1px solid rgba(200,200,210,0.22);
  color:#eef0f3;
}

/* =========================================================
   Agendamiento – Bloqueo tiempo_espera (gris, no naranja)
   ========================================================= */
body[data-theme="dark"] .agendamiento-module .ag-item.block--espera{
  background: linear-gradient(90deg, rgba(90,92,98,0.92) 0%, rgba(48,50,56,0.55) 100%);
  border: 1px solid rgba(200,200,210,0.22);
  color:#eef0f3;
}

/* =========================================================
   Agendamiento – Bloqueo tiempo_espera (gris, no naranja)
   ========================================================= */
body[data-theme="dark"] .agendamiento-module .ag-item.block--espera{
  background: linear-gradient(90deg, rgba(90,92,98,0.92) 0%, rgba(48,50,56,0.55) 100%);
  border: 1px solid rgba(200,200,210,0.22);
  color:#eef0f3;
}

/* =========================================================
   Agendamiento – Bloqueo tiempo_espera (gris, no naranja)
   ========================================================= */
body[data-theme="dark"] .agendamiento-module .ag-item.block--espera{
  background: linear-gradient(90deg, rgba(90,92,98,0.92) 0%, rgba(48,50,56,0.55) 100%);
  border: 1px solid rgba(200,200,210,0.22);
  color:#eef0f3;
}

/* =========================================================
   Agendamiento – Bloqueo tiempo_espera (gris, no naranja)
   ========================================================= */
body[data-theme="dark"] .agendamiento-module .ag-item.block--espera{
  background: linear-gradient(90deg, rgba(90,92,98,0.92) 0%, rgba(48,50,56,0.55) 100%);
  border: 1px solid rgba(200,200,210,0.22);
  color:#eef0f3;
}

/* Sidebar scrollbar */
body[data-theme="dark"]{
  --sb-scroll-track: rgba(255,255,255,.05);
  --sb-scroll-thumb: rgba(255,255,255,.24);
  --sb-scroll-thumb-hover: rgba(255,255,255,.34);
  /* Métricas */
  --metricas-card-bg: rgba(255,255,255,.06);
  --metricas-card-text: #eaeaf0;
  --metricas-card-title: #ffffff;
  --metricas-card-border: rgba(255,255,255,.10);
  --metricas-card-shadow: 0 12px 32px rgba(0,0,0,.45);

  /* Métricas: widgets (sutiles) */
  --metricas-widget-bg: rgba(255,255,255,.04);
  --metricas-widget-border: rgba(255,255,255,.10);
  --metricas-widget-shadow: 0 10px 26px rgba(0,0,0,.35);
  --metricas-widget-text: #eaeaf0;
  --metricas-widget-title: #ffffff;

--metricas-icon-color: #ffffff;
--metricas-icon-danger: #ffffff;
--metricas-icon-bg: rgba(255,255,255,.08);
--metricas-icon-bg-hover: rgba(255,255,255,.12);
--metricas-icon-border: rgba(255,255,255,.14);
--metricas-icon-border-hover: rgba(255,255,255,.22);
  /* Métricas: charts (canvas) */
  --metricas-chart-tick: #ffffff;
  --metricas-chart-grid: rgba(255,255,255,.14);
  --metricas-chart-accent: #4aa8ff;
  --metricas-header-bg: rgba(0,0,0,.12);
  --metricas-header-border: rgba(255,255,255,.10);

  /* Métricas: scrollbar (card) */
  --metricas-scroll-track: rgba(255,255,255,.06);
  --metricas-scroll-thumb: rgba(255,255,255,.22);
  --metricas-scroll-thumb-hover: rgba(255,255,255,.34);
}


