/**
 * Reportes de agenda: misma estructura de cajas y tablas,
 * paleta CardioNet más limpia que el azul AdminLTE original.
 */

.reportes-module.ocp-agendas .content-wrapper {
  background: #eef3f8 !important;
}

.reportes-module.ocp-agendas .content-header.reportes-toolbar {
  margin: 16px 16px 8px;
  padding: 16px 20px 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, .06);
}

.reportes-module.ocp-agendas .content-header.reportes-toolbar h1 {
  margin: 0 0 12px;
  color: #0f172a;
  font-size: 22px;
  font-weight: 700;
}

.reportes-module.ocp-agendas .content-header.reportes-toolbar h1 small {
  color: #64748b;
  font-weight: 500;
}

.reportes-module.ocp-agendas .reportes-toolbar__form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 0;
  align-items: flex-end;
}

.reportes-module.ocp-agendas .reportes-toolbar__form label {
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.reportes-module.ocp-agendas .reportes-toolbar__form input[type="date"] {
  min-height: 38px;
  border: 1px solid #dbe4ee;
  border-radius: 10px;
  box-shadow: none;
  font-weight: 600;
  color: #0f172a;
}

.reportes-module.ocp-agendas .reportes-toolbar__form .btn-primary {
  min-height: 38px;
  padding: 0 16px;
  border: none;
  border-radius: 10px;
  background: #009ec5;
  font-weight: 700;
}

.reportes-module.ocp-agendas .reportes-toolbar__form .btn-primary:hover,
.reportes-module.ocp-agendas .reportes-toolbar__form .btn-primary:focus {
  background: #0d5377;
}

.reportes-module.ocp-agendas .btn-reportes-export {
  min-height: 38px;
  padding: 0 16px;
  border: none !important;
  border-radius: 10px !important;
  background: #083a54 !important;
  color: #fff !important;
  font-weight: 700;
}

.reportes-module.ocp-agendas .btn-reportes-export:hover {
  background: #0d5377 !important;
  color: #fff !important;
}

.reportes-module.ocp-agendas .content {
  padding-top: 8px;
}

.reportes-module.ocp-agendas .ocp-ag-box {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, .06);
  overflow: hidden;
  margin-bottom: 18px;
}

.reportes-module.ocp-agendas .ocp-ag-box > .box-header {
  text-align: center;
  padding: 13px 16px;
  background: linear-gradient(90deg, #0d5377 0%, #009ec5 100%) !important;
  color: #fff !important;
  border: 0;
}

.reportes-module.ocp-agendas .ocp-ag-box > .box-header .box-title {
  float: none;
  display: inline-block;
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .02em;
  color: #fff;
}

.reportes-module.ocp-agendas .ocp-ag-box > .box-body {
  padding: 14px 16px 16px;
  background: #fff;
}

.reportes-module.ocp-agendas table.ocp-ag-table {
  width: 100% !important;
  margin: 0;
  font-size: 13px;
}

.reportes-module.ocp-agendas table.ocp-ag-table thead th {
  text-align: center;
  vertical-align: middle;
  background: #e8f6fb !important;
  color: #083a54;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .03em;
  border: 0 !important;
  border-bottom: 1px solid #cfeaf3 !important;
  white-space: nowrap;
}

.reportes-module.ocp-agendas table.ocp-ag-table tbody td {
  text-align: center;
  vertical-align: middle;
  color: #1e293b;
  border-color: #f1f5f9 !important;
}

.reportes-module.ocp-agendas table.ocp-ag-table tbody tr:hover {
  background: #f0f9ff;
}

.reportes-module.ocp-agendas .dataTables_wrapper .row.dt-top,
.reportes-module.ocp-agendas .dataTables_wrapper .row.dt-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-left: 0;
  margin-right: 0;
}

.reportes-module.ocp-agendas .dataTables_wrapper .row.dt-top > div,
.reportes-module.ocp-agendas .dataTables_wrapper .row.dt-bottom > div {
  float: none;
}

.reportes-module.ocp-agendas .dataTables_wrapper .dataTables_length,
.reportes-module.ocp-agendas .dataTables_wrapper .dataTables_filter,
.reportes-module.ocp-agendas .dataTables_wrapper .dataTables_info {
  color: #64748b;
  font-size: 12.5px;
  font-weight: 600;
}

.reportes-module.ocp-agendas .dataTables_wrapper .dataTables_filter input,
.reportes-module.ocp-agendas .dataTables_wrapper .dataTables_length select {
  height: 32px;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  box-shadow: none;
}

.reportes-module.ocp-agendas .dataTables_wrapper .dataTables_paginate .pagination > li > a,
.reportes-module.ocp-agendas .dataTables_wrapper .dataTables_paginate .pagination > li > span {
  border-radius: 8px !important;
  margin: 0 2px;
  border-color: #e2e8f0;
  color: #0d5377;
}

.reportes-module.ocp-agendas .dataTables_wrapper .dataTables_paginate .pagination > .active > a,
.reportes-module.ocp-agendas .dataTables_wrapper .dataTables_paginate .pagination > .active > span {
  background: #009ec5;
  border-color: #009ec5;
  color: #fff;
}

.ocp-in-chart {
  width: 100%;
  height: 300px;
}

.ocp-in-note {
  margin: 0 16px 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #075985;
  font-size: 12.5px;
  font-weight: 600;
}

.reportes-module.ocp-agendas .reportes-toolbar__form input[type="text"],
.reportes-module.ocp-agendas .reportes-toolbar__form input[type="tel"] {
  min-height: 38px;
  width: 150px;
  border: 1px solid #dbe4ee;
  border-radius: 10px;
  box-shadow: none;
  font-weight: 600;
  color: #0f172a;
}

.ocp-grab-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 16px 8px;
}

.ocp-grab-kpi {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, .06);
  padding: 14px 16px;
}

.ocp-grab-kpi span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.ocp-grab-kpi strong {
  display: block;
  margin-top: 4px;
  color: #0f172a;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.ocp-grab-dl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #e8f6fb;
  color: #0d5377;
}

.ocp-grab-dl:hover,
.ocp-grab-dl:focus {
  background: #009ec5;
  color: #fff;
}

@media (max-width: 900px) {
  .ocp-grab-kpis {
    grid-template-columns: 1fr;
  }
}

.ocp-omni .ocp-omni-kpis {
  margin: 0 16px 14px;
}

.ocp-omni .ocp-kpi {
  cursor: default;
  text-decoration: none !important;
}

.ocp-omni-chart-caption {
  margin: 4px 0 0;
  text-align: center;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.ocp-omni-gauge {
  height: 170px;
}

.ocp-omni-pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.ocp-omni-pill--open {
  background: #dcfce7;
  color: #166534;
}

.ocp-omni-pill--closed {
  background: #e2e8f0;
  color: #475569;
}

.ocp-omni-pill--ia {
  background: #e0f2fe;
  color: #0369a1;
}

.ocp-omni-pill--req {
  background: #fee2e2;
  color: #991b1b;
}

.ocp-omni .js-omni-gestionar {
  border: 0;
  background: #009ec5;
  border-radius: 8px;
  font-weight: 700;
}

.ocp-omni .js-omni-gestionar:hover,
.ocp-omni .js-omni-gestionar:focus {
  background: #0d5377;
}

.ocp-meta-kpis {
  margin-bottom: 8px;
}

.ocp-meta-sync-label {
  font-size: 22px !important;
}

.ocp-meta-sync-btn {
  min-height: 38px;
  padding: 0 16px;
  border: none;
  border-radius: 10px;
  background: #009ec5;
  color: #fff;
  font-weight: 700;
}

.ocp-meta-sync-btn .fa {
  margin-right: 6px;
}

.ocp-meta-sync-btn:hover,
.ocp-meta-sync-btn:focus {
  background: #0d5377;
  color: #fff;
}

.ocp-meta-sync-btn[disabled] {
  opacity: .75;
  cursor: wait;
}

.ocp-meta-status {
  margin: 0 16px 14px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
}

.ocp-meta-status--ok {
  background: #e8f6fb;
  border: 1px solid #cfeaf3;
  color: #0d5377;
}

.ocp-meta-status--err {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.ocp-meta-status__at {
  font-weight: 500;
  opacity: .8;
}

.ocp-meta-empty {
  margin: 18px 0 8px;
  text-align: center;
  color: #64748b;
  font-weight: 600;
}

.ocp-tpl-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 14px;
}

.ocp-tpl-toolbar .form-control {
  flex: 1 1 240px;
  min-height: 40px;
  border: 1px solid #dbe4ee;
  border-radius: 10px;
  box-shadow: none;
  font-weight: 600;
}

.ocp-tpl-count {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.ocp-tpl-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ocp-tpl-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #009ec5;
  border-radius: 12px;
  background: #f8fbfe;
}

.ocp-tpl-item--utility {
  border-left-color: #0f766e;
}

.ocp-tpl-item--authentication {
  border-left-color: #7c3aed;
}

.ocp-tpl-item__icon {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #0d5377;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.ocp-tpl-item__body {
  flex: 1 1 auto;
  min-width: 0;
}

.ocp-tpl-item__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 8px;
}

.ocp-tpl-item__top h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
}

.ocp-tpl-item__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.ocp-meta-lang {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.ocp-meta-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
  background: #e2e8f0;
  color: #334155;
}

.ocp-meta-badge--approved {
  background: #dcfce7;
  color: #166534;
}

.ocp-meta-badge--rejected,
.ocp-meta-badge--disabled {
  background: #fee2e2;
  color: #991b1b;
}

.ocp-meta-badge--pending,
.ocp-meta-badge--inreview {
  background: #fef3c7;
  color: #92400e;
}

.ocp-meta-badge--cat-marketing {
  background: #e8f6fb;
  color: #0d5377;
}

.ocp-meta-badge--cat-utility {
  background: #ccfbf1;
  color: #0f766e;
}

.ocp-meta-badge--cat-authentication {
  background: #ede9fe;
  color: #6d28d9;
}

.ocp-tpl-item__preview {
  margin: 0 0 8px;
  color: #334155;
  font-size: 13.5px;
  line-height: 1.5;
  font-weight: 500;
}

.ocp-tpl-item__code {
  margin: 0;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
}

.ocp-tpl-none {
  margin: 8px 0 0;
  text-align: center;
  color: #64748b;
  font-weight: 600;
}

@media (max-width: 767px) {
  .ocp-tpl-item {
    padding: 12px;
  }
  .ocp-tpl-item__icon {
    display: none;
  }
}

.ocp-chat-modal .modal-dialog {
  width: 92%;
  max-width: 740px;
  margin: 28px auto;
}

.ocp-chat-shell {
  border: 0;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .28);
}

.ocp-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(120deg, #083a54 0%, #0d5377 55%, #009ec5 100%);
  color: #fff;
}

.ocp-chat-head__who {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.ocp-chat-head__avatar {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255,255,255,.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ocp-chat-head__avatar > i {
  font-size: 18px;
}

.ocp-chat-head__avatar img {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  padding: 1px;
}

.ocp-chat-head h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
}

.ocp-chat-head p {
  margin: 3px 0 0;
  font-size: 12px;
  opacity: .88;
  font-weight: 600;
}

.ocp-chat-close {
  border: 0;
  background: rgba(255,255,255,.14);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}

.ocp-chat-body {
  height: 58vh;
  max-height: 560px;
  overflow-y: auto;
  padding: 16px 14px 20px;
  background: #efeae2;
}

.ocp-chat-empty {
  margin: 48px 16px;
  text-align: center;
  color: #64748b;
  font-weight: 700;
  background: rgba(255,255,255,.8);
  border-radius: 14px;
  padding: 18px;
}

.ocp-chat-sep {
  text-align: center;
  margin: 12px 0 16px;
}

.ocp-chat-sep span {
  display: inline-block;
  background: rgba(255,255,255,.92);
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
}

.ocp-chat-msg {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 8px;
  max-width: 100%;
}

.ocp-chat-in {
  justify-content: flex-start;
  padding-right: 12%;
}

.ocp-chat-out {
  justify-content: flex-end;
  padding-left: 12%;
  flex-direction: row-reverse;
}

.ocp-chat-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  flex-shrink: 0;
}

.ocp-chat-avatar--pac {
  background: linear-gradient(145deg, #14b8a6, #0f766e);
}

.ocp-chat-avatar--age {
  background: linear-gradient(145deg, #0ea5e9, #0369a1);
}

.ocp-chat-bubble {
  max-width: min(560px, 86%);
  padding: 10px 12px 8px;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
}

.ocp-chat-in .ocp-chat-bubble {
  background: #fff;
  border: 1px solid #d8e2ec;
  border-radius: 4px 16px 16px 16px;
}

.ocp-chat-out .ocp-chat-bubble {
  background: linear-gradient(135deg, #e0f2fe, #dbeafe);
  border: 1px solid #bfdbfe;
  border-radius: 16px 16px 4px 16px;
}

.ocp-chat-req .ocp-chat-bubble {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #7f1d1d;
}

.ocp-chat-text {
  font-size: 14px;
  line-height: 1.45;
  color: #1e293b;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.ocp-chat-quote {
  border-left: 3px solid #009ec5;
  background: #f8fafc;
  border-radius: 8px;
  padding: 6px 8px;
  margin-bottom: 6px;
  font-size: 12px;
  color: #64748b;
}

.ocp-chat-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
}

.ocp-chat-role {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
}

.ocp-chat-time {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}

.ocp-chat-img,
.ocp-chat-video {
  max-width: 260px;
  max-height: 260px;
  border-radius: 10px;
  display: block;
}

.ocp-chat-audio {
  width: 240px;
}

.ocp-chat-doc {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #0d5377;
}

.ocp-chat-footbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: #fff;
  border-top: 1px solid #e2e8f0;
}

.ocp-chat-asesor {
  margin-right: auto;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
}

.ocp-chat-btn {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
  font-size: 12.5px;
  color: #fff;
}

.ocp-chat-btn--xfer {
  background: linear-gradient(135deg, #f6a821, #e8890b);
}

.ocp-chat-btn--close {
  background: linear-gradient(135deg, #ef5350, #d83b38);
}

/* Configuración agenda: banners OCP, columnas a la misma altura, iframe visible */
.reportes-module.ocp-agendas .ocp-ag-box > .box-header .fa {
  margin-right: 8px;
}

.reportes-module.ocp-agendas .ocp-disp-note {
  margin: 0 0 12px;
  color: #64748b;
  font-size: 13px;
}

.reportes-module.ocp-agendas .ocp-disp-empty td {
  color: #64748b;
  font-weight: 600;
}

.reportes-module.ocp-agendas #tabla-disponibilidad td:first-child {
  text-align: left;
  font-weight: 600;
}

.reportes-module.ocp-agendas .agenda-edit-actions .btn-primary {
  border: none;
  border-radius: 10px;
  background: #009ec5;
  font-weight: 700;
}

.reportes-module.ocp-agendas .agenda-edit-actions .btn-primary:hover,
.reportes-module.ocp-agendas .agenda-edit-actions .btn-primary:focus {
  background: #0d5377;
}

@media (min-width: 992px) {
  .agenda-config-page .agenda-config-row {
    display: flex;
    align-items: stretch;
  }
  .agenda-config-page .agenda-config-row > [class*="col-"] {
    display: flex;
    flex-direction: column;
  }
  .agenda-config-page .agenda-config-row .ocp-ag-box {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    margin-bottom: 18px;
    height: 100%;
  }
  .agenda-config-page .agenda-config-row .ocp-ag-box > .box-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
  }
}

.agenda-config-page .agenda-filter-form {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 16px;
}

.agenda-config-page .agenda-filter-lead {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

.agenda-config-page .agenda-filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 16px;
  flex: 1 1 auto;
  align-content: start;
}

.agenda-config-page .agenda-filter-item label {
  display: block;
  color: #0d5377;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}

.agenda-config-page .agenda-filter-item .form-control,
.agenda-config-page .agenda-form-horario .agenda-input {
  min-height: 42px;
  height: 42px;
  border: 1px solid #dbe4ee;
  border-radius: 10px;
  box-shadow: none;
  font-weight: 600;
  color: #0f172a;
}

.agenda-config-page .agenda-filter-item .form-control:focus,
.agenda-config-page .agenda-form-horario .agenda-input:focus {
  border-color: #009ec5;
  box-shadow: 0 0 0 3px rgba(0, 158, 197, 0.15);
}

.agenda-config-page .agenda-filter-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.agenda-config-page .ocp-ag-box .agenda-slot-hint {
  background: #e8f6fb;
  border: 1px solid #cfeaf3;
  border-radius: 10px;
}

.agenda-config-page .ocp-ag-box .agenda-slot-hint__icon {
  color: #009ec5;
}

.agenda-config-page .ocp-ag-box .agenda-slot-hint__text strong {
  color: #0d5377;
}

.agenda-config-page .ocp-ag-box .agenda-form-horario {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.agenda-config-page .ocp-ag-box .agenda-submit-wrap {
  margin-top: auto;
}

.agenda-config-page .ocp-ag-box .agenda-btn-crear {
  border: none;
  border-radius: 10px;
  background: #009ec5;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 158, 197, 0.35);
}

.agenda-config-page .ocp-ag-box .agenda-btn-crear:hover,
.agenda-config-page .ocp-ag-box .agenda-btn-crear:focus {
  background: #0d5377;
}

.agenda-config-page .agenda-mini-cal__day.is-today {
  border-color: #009ec5;
}

.agenda-config-page .agenda-mini-cal__day.is-selected {
  background: #009ec5;
  border-color: #0d5377;
}

.agenda-config-page .agenda-mini-cal__navbtn {
  color: #009ec5;
}

.reportes-module.ocp-agendas #calendario-frame,
.reportes-module.ocp-agendas .agenda-calendar-frame iframe {
  width: 100% !important;
  height: 860px !important;
  min-height: 720px !important;
  max-width: none;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  border: 0 !important;
  background: #fff;
}

.reportes-module.ocp-agendas .agenda-calendar-frame {
  overflow: visible;
  min-height: 720px;
  background: #fff;
}

@media (max-width: 767px) {
  .agenda-config-page .agenda-filter-grid {
    grid-template-columns: 1fr;
  }
}
