/* =========================================================
   ALVA3 Gestión 2.0 — MAPFRE Avenida Chile
   Tema Light Profesional
   ========================================================= */

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #F0F4F8;
  color: #1E293B;
  line-height: 1.5;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }

/* ---- CSS Variables ---- */
:root {
  --color-mapfre:    #E30613;
  --color-mapfre-dk: #B8050F;
  --color-primary:   #2563EB;
  --color-primary-l: #3B82F6;
  --color-sidebar:   #0A1628;
  --color-sidebar-h: #162036;
  --color-sidebar-active: #1E3A5F;
  --color-bg:        #F0F4F8;
  --color-card:      #FFFFFF;
  --color-text:      #1E293B;
  --color-text-sec:  #475569;
  --color-muted:     #94A3B8;
  --color-border:    #E2E8F0;
  --color-success:   #059669;
  --color-warning:   #D97706;
  --color-danger:    #DC2626;
  --color-info:      #0284C7;
  --sidebar-w:       260px;
  --header-h:        60px;
  --transition:      all .2s ease;
  --radius:          12px;
  --radius-sm:       8px;
  --shadow-sm:       0 1px 3px rgba(0,0,0,.06);
  --shadow:          0 4px 12px rgba(0,0,0,.08);
  --shadow-lg:       0 12px 40px rgba(0,0,0,.12);
}

/* ============ SIDEBAR ============ */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: linear-gradient(180deg, #0B1A2E 0%, #0F2440 50%, #0A1628 100%);
  border-right: none;
  display: flex;
  flex-direction: column;
  z-index: 50;
  transition: transform .3s ease;
  overflow: hidden;
  box-shadow: 4px 0 24px rgba(0,0,0,.15);
}

/* Sidebar brand / logo area */
.sidebar-brand {
  padding: 22px 22px 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-brand-icon {
  width: 36px; height: 36px;
  background: var(--color-mapfre);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: white;
  letter-spacing: -.5px;
  flex-shrink: 0;
}
.sidebar-brand-text {
  font-size: 15px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: .5px;
}
.sidebar-brand-text span {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: rgba(255,255,255,.45);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 1px;
}

/* User Profile at top */
.sidebar-profile {
  padding: 16px 22px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-avatar {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563EB, #7C3AED);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  position: relative;
}
.sidebar-avatar .online-dot {
  position: absolute;
  bottom: -1px; right: -1px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #22C55E;
  border: 2.5px solid var(--color-sidebar);
}
.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: #FFFFFF;
  line-height: 1.2;
}
.sidebar-user-role {
  font-size: 10px;
  color: rgba(255,255,255,.5);
  text-transform: uppercase;
  letter-spacing: .5px;
  font-weight: 500;
  margin-top: 2px;
}
.sidebar-user-status {
  font-size: 11px;
  color: #22C55E;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Navigation */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 10px;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 4px; }

.nav-section-title {
  padding: 16px 12px 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 14px;
  color: rgba(255,255,255,.65);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
  position: relative;
  border-radius: 8px;
  margin-bottom: 2px;
}
.nav-link:hover {
  color: #FFFFFF;
  background: rgba(255,255,255,.08);
}
.nav-link.active {
  color: #FFFFFF;
  background: linear-gradient(135deg, rgba(37,99,235,.45), rgba(37,99,235,.2));
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(37,99,235,.15);
}
.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 3px;
  background: #60A5FA;
  border-radius: 0 3px 3px 0;
}
.nav-link svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .55; }
.nav-link.active svg { opacity: 1; }
.nav-link:hover svg { opacity: 1; }
.nav-link .badge {
  margin-left: auto;
  background: var(--color-mapfre);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  min-width: 22px;
  text-align: center;
}
.nav-link .badge-green {
  background: #22C55E;
}
.nav-link .badge-orange {
  background: #F59E0B;
}

/* Sidebar footer */
.sidebar-footer {
  padding: 14px 22px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar-footer .nav-link {
  padding: 10px 0;
  color: rgba(255,255,255,.4);
  border-radius: 0;
}
.sidebar-footer .nav-link:hover {
  color: #F87171;
  background: transparent;
}

/* ============ LAYOUT ============ */
.main-wrapper {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.header {
  height: var(--header-h);
  background: var(--color-card);
  border-bottom: 1px solid var(--color-border);
  padding: 0 32px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.header-left { display: flex; align-items: center; gap: 16px; flex:1; }
.header-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -.2px;
}
.header-sep {
  width: 3px;
  height: 24px;
  background: linear-gradient(to bottom, var(--color-mapfre), #FF4D58);
  border-radius: 2px;
}
.header-right { display: flex; align-items: center; gap: 12px; }

.btn-sidebar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-text);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
}
.btn-sidebar-toggle:hover {
  background: #F1F5F9;
}
.btn-sidebar-toggle svg {
  width: 22px;
  height: 22px;
}

.content {
  flex: 1;
  padding: 28px 32px;
}

/* ============ CARDS ============ */
.card {
  background: var(--color-card);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  overflow: hidden;
}
.card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.card-body { padding: 24px; }
.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--color-border);
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
}

/* Dashboard KPI Cards */
.kpi-card {
  background: var(--color-card);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--color-border);
  transition: var(--transition);
}
.kpi-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.kpi-card:hover::before {
  background: var(--color-primary);
}
.kpi-label {
  font-size: 13px;
  color: var(--color-text-sec);
  font-weight: 500;
  margin-bottom: 4px;
}
.kpi-value {
  font-size: 30px;
  font-weight: 800;
  color: var(--color-text);
  line-height: 1;
}
.kpi-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.kpi-icon.red    { background: #FEF2F2; color: var(--color-mapfre); }
.kpi-icon.blue   { background: #EFF6FF; color: var(--color-primary); }
.kpi-icon.green  { background: #F0FDF4; color: var(--color-success); }
.kpi-icon.purple { background: #FAF5FF; color: #7C3AED; }
.kpi-icon.orange { background: #FFFBEB; color: var(--color-warning); }

/* ============ TABLES ============ */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: var(--color-card);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table thead th {
  background: #F8FAFC;
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  color: var(--color-text-sec);
  border-bottom: 2px solid var(--color-border);
  white-space: nowrap;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.data-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid #F1F5F9;
  vertical-align: top;
  color: var(--color-text);
}
.data-table tbody tr:hover {
  background: #F8FAFC;
}
.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* Sortable headers */
.data-table th.sortable {
  cursor: pointer;
  user-select: none;
}
.data-table th.sortable:hover {
  background: #F1F5F9;
}

/* ============ BADGES ============ */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-sin_realizar  { background: #FEF3C7; color: #92400E; }
.badge-realizada     { background: #D1FAE5; color: #065F46; }
.badge-cerrada       { background: #D1FAE5; color: #065F46; }
.badge-control       { background: #DBEAFE; color: #1E40AF; }
.badge-inspeccion    { background: #FCE7F3; color: #9D174D; }
.badge-dgo           { background: #FEE2E2; color: #991B1B; }
.badge-sgo           { background: #EDE9FE; color: #5B21B6; }
.badge-cartera       { background: #FFEDD5; color: #9A3412; }
.badge-documentos_pendientes { background: #E0E7FF; color: #3730A3; }
.badge-completada    { background: #D1FAE5; color: #065F46; }
/* cerrada badge now unified with realizada above */

/* Priority */
.priority-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 28px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}
.priority-high   { background: #FEE2E2; color: #DC2626; }
.priority-medium { background: #FEF3C7; color: #D97706; }
.priority-low    { background: #D1FAE5; color: #059669; }

/* Accionable types */
.badge-llamada  { background: #DBEAFE; color: #2563EB; }
.badge-cita     { background: #E0E7FF; color: #4F46E5; }
.badge-reunion  { background: #FCE7F3; color: #BE185D; }
.badge-whatsapp { background: #D1FAE5; color: #059669; }

.badge-satisfecha     { background: #D1FAE5; color: #065F46; }
.badge-no_satisfecha  { background: #FEE2E2; color: #991B1B; }
.badge-pendiente      { background: #FEF3C7; color: #92400E; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }

.btn-primary {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}
.btn-primary:hover { background: #1D4ED8; }

.btn-mapfre {
  background: var(--color-mapfre);
  color: white;
  border-color: var(--color-mapfre);
}
.btn-mapfre:hover { background: var(--color-mapfre-dk); }

.btn-outline {
  background: white;
  color: var(--color-text-sec);
  border-color: var(--color-border);
}
.btn-outline:hover {
  background: var(--color-sidebar-h);
  border-color: #CBD5E1;
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-sec);
  border: none;
  padding: 6px 10px;
}
.btn-ghost:hover { background: var(--color-sidebar-h); }

.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-icon {
  padding: 6px;
  border: none;
  background: transparent;
  color: var(--color-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.btn-icon:hover { background: var(--color-sidebar-h); color: var(--color-text); }

/* ============ FORMS ============ */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-sec);
  margin-bottom: 6px;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  color: var(--color-text);
  background: white;
  transition: var(--transition);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.form-input::placeholder { color: var(--color-muted); }
.form-textarea { resize: vertical; min-height: 80px; }
.form-select { cursor: pointer; }

/* Search bar */
.search-bar {
  position: relative;
}
.search-bar input {
  padding-left: 36px;
}
.search-bar svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--color-muted);
}

/* ============ TOOLBAR ============ */
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.toolbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ============ MODALS ============ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.3);
  backdrop-filter: blur(2px);
  z-index: 100;
  align-items: center;
  justify-content: center;
}
.modal-overlay.show { display: flex; }
.modal {
  background: white;
  border-radius: 14px;
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: white;
  z-index: 1;
  border-radius: 14px 14px 0 0;
}
.modal-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
}
.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ============ LOGIN ============ */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F0F4F8;
  position: relative;
}
.login-wrapper::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(227,6,19,.05) 0%, transparent 70%);
  top: -150px; right: -150px;
}
.login-card {
  background: white;
  border-radius: 16px;
  padding: 44px 36px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  position: relative;
  z-index: 1;
}
.login-logo {
  text-align: center;
  margin-bottom: 28px;
}
.login-logo img { height: 38px; }
.login-title {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  color: var(--color-text);
  margin-bottom: 4px;
}
.login-subtitle {
  text-align: center;
  color: var(--color-muted);
  font-size: 13px;
  margin-bottom: 28px;
}
.login-error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #DC2626;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}
.login-error.show { display: block; }

/* ============ TOAST / ALERTS ============ */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 200;
  background: white;
  border-radius: var(--radius);
  padding: 14px 20px;
  box-shadow: 0 8px 30px rgba(0,0,0,.12);
  border-left: 4px solid var(--color-success);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  transform: translateX(120%);
  transition: transform .3s ease;
}
.toast.show { transform: translateX(0); }
.toast.error { border-left-color: var(--color-danger); }

/* ============ EMPTY STATE ============ */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--color-muted);
}
.empty-state svg {
  width: 48px; height: 48px;
  margin-bottom: 16px;
  opacity: .5;
}
.empty-state h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-sec);
  margin-bottom: 4px;
}
.empty-state p { font-size: 13px; }

/* ============ TABS ============ */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: 20px;
}
.tab-btn {
  padding: 10px 20px;
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-muted);
  cursor: pointer;
  position: relative;
  transition: var(--transition);
}
.tab-btn:hover { color: var(--color-text); }
.tab-btn.active {
  color: var(--color-primary);
}
.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0; right: 0;
  height: 2px;
  background: var(--color-primary);
}

/* ============ STAT SUMMARY ============ */
.stat-summary {
  display: flex;
  gap: 8px;
  font-size: 13px;
  color: var(--color-text-sec);
  margin-bottom: 16px;
}
.stat-summary span {
  font-weight: 700;
  color: var(--color-text);
}

/* ============ COMMENT THREAD ============ */
.comment-list { display: flex; flex-direction: column; gap: 12px; }
.comment-item {
  padding: 12px;
  background: #F8FAFC;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}
.comment-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}
.comment-user { font-size: 12px; font-weight: 600; color: var(--color-primary); }
.comment-date { font-size: 11px; color: var(--color-muted); }
.comment-text { font-size: 13px; color: var(--color-text); }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .sidebar { 
    transform: translateX(-100%); 
    transition: transform .3s ease;
  }
  .sidebar.open { 
    transform: translateX(0); 
    box-shadow: 2px 0 16px rgba(0,0,0,.3);
  }
  .main-wrapper { margin-left: 0; }
  .btn-sidebar-toggle { display: block; }
  .content { padding: 20px 16px; }
  
  /* Overlay para cerrar sidebar en móvil */
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 45;
  }
  .sidebar.open ~ .sidebar-overlay {
    display: block;
  }
}

@media (max-width: 640px) {
  .kpi-card { padding: 18px 16px; }
  .kpi-value { font-size: 24px; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar-right { margin-left: 0; }
  .modal { width: 95%; max-width: none; }
  .content { padding: 16px 12px; }
}

/* ============ UTILITIES ============ */
.text-mapfre { color: var(--color-mapfre) !important; }
.text-primary { color: var(--color-primary) !important; }
.text-success { color: var(--color-success) !important; }
.text-warning { color: var(--color-warning) !important; }
.text-danger  { color: var(--color-danger) !important; }
.text-muted   { color: var(--color-muted) !important; }
.text-sm { font-size: 12px !important; }
.text-xs { font-size: 11px !important; }
.font-bold { font-weight: 700 !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.gap-4 { gap: 16px; }

/* Animations */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn .3s ease; }

/* Page-specific: Table cell with multi-info */
.cell-info { line-height: 1.6; }
.cell-info .label { font-size: 11px; color: var(--color-muted); }
.cell-info .value { font-weight: 500; }
.cell-info a { color: var(--color-primary); font-weight: 600; }
.cell-info a:hover { text-decoration: underline; }

/* Resumen bar */
.resumen-bar {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px 28px;
  margin-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.resumen-bar .mapfre-line {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-mapfre), #FF4D58, var(--color-mapfre));
  border-radius: 0;
  margin-top: 0;
}

/* ═══════════════════════════════════════════════════════════════
   DETALLE TAREA — Vista tipo correo/ticket
   ═══════════════════════════════════════════════════════════════ */

/* Header bar */
.detalle-header-bar {
  background: linear-gradient(135deg, #0B1A2E 0%, #1a3a5c 100%);
  border-radius: var(--radius);
  padding: 20px 28px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: 0 4px 20px rgba(11, 26, 46, 0.3);
}
.detalle-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.detalle-icon-tarea {
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.12);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.detalle-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
}
.detalle-subtitle {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  margin-top: 2px;
}
.detalle-btn-back {
  background: rgba(255,255,255,0.1) !important;
  border-color: rgba(255,255,255,0.25) !important;
  color: #fff !important;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(10px);
}
.detalle-btn-back:hover {
  background: rgba(255,255,255,0.2) !important;
}

/* Sections */
.detalle-section {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  animation: fadeIn 0.3s ease;
}
.detalle-section-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1a2740;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f2f5;
}
.detalle-section-title svg {
  color: var(--color-mapfre);
  flex-shrink: 0;
}

/* Info principal */
.detalle-info-principal {
  border-left: 4px solid var(--color-mapfre);
  position: relative;
  overflow: hidden;
}
.detalle-info-principal::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(227,6,19,0.03) 0%, transparent 70%);
  pointer-events: none;
}
.detalle-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 32px;
}
.detalle-info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.detalle-info-full {
  grid-column: 1 / -1;
}
.detalle-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #8895a7;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.detalle-value {
  font-size: 0.92rem;
  font-weight: 500;
  color: #1a2740;
}
.detalle-value-name {
  color: #1a56db;
  font-weight: 700;
}
.detalle-value-titulo {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0B1A2E;
}
.badge-lg {
  font-size: 0.82rem;
  padding: 5px 14px;
  width: fit-content;
}

/* Detalles meta  */
.detalle-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 32px;
}
.detalle-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.detalle-meta-full {
  grid-column: 1 / -1;
}
.detalle-meta-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #8895a7;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.detalle-meta-value {
  font-size: 0.88rem;
  color: #334155;
  font-weight: 500;
}

/* Email body */
.detalle-email-body {
  border-left: 4px solid #3b82f6;
}
.detalle-email-content {
  background: #f8fafc;
  border: 1px solid #e8ecf1;
  border-radius: 8px;
  padding: 20px 24px;
  font-size: 0.88rem;
  line-height: 1.75;
  color: #334155;
  font-family: 'Inter', system-ui, sans-serif;
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 350px;
  overflow-y: auto;
}

/* Información adicional */
.detalle-adicional-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.detalle-adicional-item {
  background: #f8fafc;
  border: 1px solid #e8ecf1;
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.detalle-adicional-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #8895a7;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.detalle-adicional-value {
  font-size: 0.88rem;
  font-weight: 600;
  color: #1a2740;
}

/* Detail tables */
.detalle-table th {
  background: #f1f5f9;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #64748b;
}
.detalle-table td {
  vertical-align: middle;
}

/* File name display */
.detalle-file-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  color: #1a2740;
}

/* Upload form */
.detalle-upload-form {
  margin-top: 12px;
}
.detalle-upload-area {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
}
.detalle-upload-input {
  display: none;
}
.detalle-upload-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  padding: 6px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: white;
  transition: all 0.15s;
}
.detalle-upload-label:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

/* Tiempos grid */
.detalle-tiempos-grid {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.detalle-tiempo-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8fafc;
  border: 1px solid #e8ecf1;
  border-radius: 10px;
  padding: 14px 20px;
  flex: 1;
  min-width: 200px;
}
.detalle-tiempo-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.detalle-tiempo-creacion {
  background: #dbeafe;
  color: #2563eb;
}
.detalle-tiempo-inicio {
  background: #d1fae5;
  color: #059669;
}
.detalle-tiempo-cierre {
  background: #fce7f3;
  color: #db2777;
}
.detalle-tiempo-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #8895a7;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  display: block;
}
.detalle-tiempo-value {
  font-size: 0.88rem;
  font-weight: 600;
  color: #1a2740;
  display: block;
  margin-top: 2px;
}

/* Comentarios */
.detalle-comentarios-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 4px;
}
.detalle-comentario-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e8ecf1;
  transition: background 0.15s;
}
.detalle-comentario-item:hover {
  background: #f1f5f9;
}
.detalle-comentario-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a56db, #3b82f6);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.detalle-comentario-body {
  flex: 1;
  min-width: 0;
}
.detalle-comentario-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.detalle-comentario-user {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1a2740;
}
.detalle-comentario-date {
  font-size: 0.72rem;
  color: #8895a7;
}
.detalle-comentario-text {
  font-size: 0.84rem;
  color: #475569;
  line-height: 1.5;
}
.detalle-add-comment-form {
  margin-top: 14px;
}
.detalle-comment-input-wrap {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}
.detalle-comment-input-wrap textarea {
  flex: 1;
  min-height: 40px;
}

/* Action buttons */
.detalle-action-buttons {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #f0f2f5;
}
.btn-accent {
  background: linear-gradient(135deg, #7c3aed, #8b5cf6);
  color: #fff;
  border: none;
  font-weight: 600;
}
.btn-accent:hover {
  background: linear-gradient(135deg, #6d28d9, #7c3aed);
  box-shadow: 0 4px 12px rgba(124,58,237,0.35);
}
.btn-danger {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: #fff;
  border: none;
  font-weight: 600;
}
.btn-danger:hover {
  background: linear-gradient(135deg, #b91c1c, #dc2626);
  box-shadow: 0 4px 12px rgba(220,38,38,0.35);
}
.btn-lg {
  padding: 10px 28px;
  font-size: 0.92rem;
}
.btn-sm {
  padding: 5px 14px;
  font-size: 0.78rem;
}

/* Expandable panels */
.detalle-panel {
  margin-top: 16px;
  padding: 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  animation: fadeIn 0.2s ease;
}
.detalle-panel-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1a2740;
  margin-bottom: 14px;
}
.detalle-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.detalle-form-full {
  grid-column: 1 / -1;
}
.detalle-panel-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

/* Acciones timeline */
.detalle-acciones-timeline {
  position: relative;
  padding-left: 24px;
}
.detalle-acciones-timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e2e8f0;
}
.detalle-accion-item {
  position: relative;
  padding-bottom: 16px;
}
.detalle-accion-item:last-child {
  padding-bottom: 0;
}
.detalle-accion-dot {
  position: absolute;
  left: -22px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #7c3aed;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px #e2e8f0;
}
.detalle-accion-content {
  background: #faf5ff;
  border: 1px solid #e9d5ff;
  border-radius: 8px;
  padding: 12px 16px;
}
.detalle-accion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.detalle-accion-user {
  font-size: 0.8rem;
  font-weight: 700;
  color: #581c87;
}
.detalle-accion-date {
  font-size: 0.72rem;
  color: #8895a7;
}
.detalle-accion-desc {
  font-size: 0.84rem;
  color: #475569;
  line-height: 1.5;
}

/* Terminar section */
.detalle-terminar {
  border-left: 4px solid var(--color-mapfre);
  background: linear-gradient(135deg, #fff 0%, #fff5f5 100%);
}
.detalle-terminar-title {
  color: var(--color-mapfre);
}
.detalle-terminar-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.detalle-terminar-full {
  grid-column: 1 / -1;
}
.detalle-terminar-actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
}

/* ─── Days elapsed cards ─── */
.detalle-dias-grid {
  display: flex;
  gap: 14px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #f0f2f5;
}
.detalle-dia-card {
  flex: 1;
  text-align: center;
  padding: 16px 12px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 110px;
}
.detalle-dia-creacion {
  background: linear-gradient(135deg, #dbeafe, #eff6ff);
  border: 1px solid #bfdbfe;
}
.detalle-dia-inicio {
  background: linear-gradient(135deg, #d1fae5, #ecfdf5);
  border: 1px solid #a7f3d0;
}
.detalle-dia-cierre {
  background: linear-gradient(135deg, #fce7f3, #fdf2f8);
  border: 1px solid #fbcfe8;
}
.detalle-dia-abierta {
  background: linear-gradient(135deg, #fef3c7, #fffbeb);
  border: 1px solid #fde68a;
}
.detalle-dia-numero {
  font-size: 1.8rem;
  font-weight: 800;
  color: #0B1A2E;
  line-height: 1;
}
.detalle-dia-creacion .detalle-dia-numero { color: #1d4ed8; }
.detalle-dia-inicio .detalle-dia-numero { color: #059669; }
.detalle-dia-cierre .detalle-dia-numero { color: #db2777; }
.detalle-dia-abierta .detalle-dia-numero { font-size: 1.5rem; }
.detalle-dia-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #64748b;
}

/* ─── Emails Anexos Link Bar ─── */
.detalle-emails-link-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.detalle-emails-info {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #3b82f6;
}
.detalle-emails-info svg {
  flex-shrink: 0;
}
.detalle-emails-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1a2740;
  display: block;
}
.detalle-emails-count {
  font-size: 0.78rem;
  color: #64748b;
}

/* ─── Smart Clave Search ─── */
.clave-search-wrap {
  position: relative;
}
.clave-search-results {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.12);
  max-height: 260px;
  overflow-y: auto;
  z-index: 100;
  margin-top: 4px;
}
.clave-result-item {
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.12s;
}
.clave-result-item:last-child { border-bottom: none; }
.clave-result-item:hover {
  background: #f0f7ff;
}
.clave-result-num {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1a56db;
  background: #eff6ff;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.clave-result-name {
  font-size: 0.82rem;
  color: #334155;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.clave-no-results {
  padding: 14px;
  text-align: center;
  color: #94a3b8;
  font-size: 0.82rem;
}

/* ─── Email card (emails-tarea page) ─── */
.email-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e8ecf1;
}
.email-card-icon {
  width: 38px;
  height: 38px;
  background: #dbeafe;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
  flex-shrink: 0;
}
.email-card-meta {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.email-card-subject {
  font-size: 0.92rem;
  font-weight: 700;
  color: #1a2740;
}
.email-card-date {
  font-size: 0.75rem;
  color: #8895a7;
  white-space: nowrap;
}

/* Responsive */
@media (max-width: 768px) {
  .detalle-header-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .detalle-info-grid,
  .detalle-meta-grid,
  .detalle-form-grid,
  .detalle-terminar-grid {
    grid-template-columns: 1fr;
  }
  .detalle-dias-grid {
    flex-direction: column;
  }
  .detalle-action-buttons {
    flex-direction: column;
  }
  .detalle-comment-input-wrap {
    flex-direction: column;
    align-items: stretch;
  }
  .detalle-emails-link-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .email-card-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   ACCIONABLES COMERCIALES — Main page
   ═══════════════════════════════════════════════════════════════ */

/* Page header */
.acc-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.acc-page-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}
.acc-page-subtitle {
  font-size: 0.85rem;
  color: #64748b;
  margin-top: 4px;
}
.acc-header-right {
  flex-shrink: 0;
}
.acc-filters-form {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.acc-month-input {
  width: 160px !important;
  font-size: 0.85rem;
}
.acc-director-select {
  width: 200px !important;
  font-size: 0.85rem;
}
.acc-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.acc-search-wrap svg {
  position: absolute;
  left: 10px;
  color: #94a3b8;
}
.acc-search-input {
  padding-left: 32px !important;
  width: 200px !important;
  font-size: 0.85rem;
}

/* KPIs */
.acc-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.acc-kpi-card {
  background: white;
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid #e8ecf1;
}
.acc-kpi-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.acc-kpi-info {
  display: flex;
  flex-direction: column;
}
.acc-kpi-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}
.acc-kpi-label {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Legend */
.acc-legend {
  background: white;
  border: 1px solid #e8ecf1;
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  font-size: 0.8rem;
}
.acc-legend-label {
  font-weight: 700;
  color: #334155;
  white-space: nowrap;
}
.acc-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 500;
  font-size: 0.75rem;
}
.acc-legend-item small {
  color: inherit;
  opacity: 0.7;
}
.acc-tipo-llamada, .acc-legend-item.acc-tipo-llamada {
  background: #eff6ff;
  color: #2563eb;
}
.acc-tipo-visita, .acc-legend-item.acc-tipo-visita {
  background: #f0fdf4;
  color: #16a34a;
}
.acc-tipo-whatsapp, .acc-legend-item.acc-tipo-whatsapp {
  background: #ecfdf5;
  color: #059669;
}

/* Empty state */
.acc-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #94a3b8;
}
.acc-empty-state p {
  margin-top: 12px;
  font-size: 0.9rem;
}

/* Cards grid */
.acc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 18px;
}
.acc-card {
  background: white;
  border-radius: 14px;
  border: 1px solid #e8ecf1;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  transition: box-shadow 0.2s, transform 0.15s;
}
.acc-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  transform: translateY(-1px);
}

/* Card header */
.acc-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 20px 12px;
  gap: 12px;
}
.acc-card-info {
  flex: 1;
  min-width: 0;
}
.acc-card-clave {
  display: inline-block;
  background: #0f2440;
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.acc-card-nombre {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
  margin: 2px 0 4px;
  line-height: 1.3;
}
.acc-card-meta {
  display: flex;
  gap: 12px;
  font-size: 0.72rem;
  color: #64748b;
}
.acc-card-meta span {
  white-space: nowrap;
}

/* Progress ring */
.acc-card-progress-ring {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 4px solid #e2e8f0;
  transition: border-color 0.3s;
}
.acc-card-progress-ring.none     { border-color: #fecaca; }
.acc-card-progress-ring.partial  { border-color: #fde68a; }
.acc-card-progress-ring.good     { border-color: #86efac; }
.acc-card-progress-ring.complete { border-color: #10b981; background: #ecfdf5; }
.acc-ring-number {
  font-size: 0.85rem;
  font-weight: 800;
  color: #334155;
}

/* Progress bar */
.acc-progress-bar {
  height: 4px;
  background: #f1f5f9;
  margin: 0 20px;
  border-radius: 2px;
  overflow: hidden;
}
.acc-progress-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.5s ease;
}
.acc-progress-fill.none     { background: #ef4444; }
.acc-progress-fill.partial  { background: #f59e0b; }
.acc-progress-fill.good     { background: #10b981; }
.acc-progress-fill.complete { background: #10b981; }

/* Actions list */
.acc-card-actions {
  padding: 12px 20px 8px;
}
.acc-action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid #f1f5f9;
}
.acc-action-row:last-child {
  border-bottom: none;
}
.acc-action-status {
  width: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.acc-action-circle {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
}
.acc-action-row.done .acc-action-circle {
  background: #10b981;
  border-color: #10b981;
}
.acc-action-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.acc-action-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.acc-action-row.done .acc-action-name {
  color: #10b981;
  text-decoration: line-through;
  text-decoration-color: rgba(16,185,129,0.3);
}
.acc-action-tipo {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  white-space: nowrap;
}
.acc-tipo-badge-llamada  { background: #eff6ff; color: #2563eb; }
.acc-tipo-badge-visita   { background: #f0fdf4; color: #16a34a; }
.acc-tipo-badge-whatsapp { background: #ecfdf5; color: #059669; }
.acc-action-right {
  flex-shrink: 0;
  font-size: 0.72rem;
  color: #94a3b8;
}
.acc-action-date { color: #10b981; font-weight: 600; }
.acc-action-sem  { color: #94a3b8; }

/* Card footer (unused) */
.acc-card-footer {
  padding: 10px 20px 14px;
  border-top: 1px solid #f1f5f9;
}

/* ═══════════════════════════════════════════════════════════════
   MODAL POPUP — Accionable detail modal
   ═══════════════════════════════════════════════════════════════ */
.acc-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}
.acc-modal-overlay.show {
  opacity: 1;
  visibility: visible;
}
.acc-modal {
  width: 90%;
  max-width: 920px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.35);
  transform: translateY(30px) scale(0.97);
  transition: transform 0.3s cubic-bezier(.16,1,.3,1);
  overflow: hidden;
}
.acc-modal-overlay.show .acc-modal {
  transform: translateY(0) scale(1);
}

/* Modal header */
.acc-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  background: linear-gradient(135deg, #0B1A2E, #1e3a5f);
  color: #fff;
}
.acc-modal-header-left {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}
.acc-modal-badge {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.acc-modal-badge.done    { background: #10b981; }
.acc-modal-badge.pending { background: #f59e0b; }
.acc-modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 5px;
  line-height: 1.25;
}
.acc-modal-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.7);
}
.acc-modal-inter {
  font-weight: 600;
  color: rgba(255,255,255,0.9);
}
.acc-modal-close {
  flex-shrink: 0;
  background: rgba(255,255,255,0.12);
  border: none;
  color: white;
  border-radius: 10px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}
.acc-modal-close:hover {
  background: rgba(255,255,255,0.25);
}

/* Modal body */
.acc-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.acc-modal-table-wrap {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}
.acc-modal-body .accd-desc-table {
  margin: 0;
  border-radius: 10px;
}

/* Registros section in modal */
.acc-modal-registros h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: #334155;
  margin: 0 0 10px;
}

/* Register form in modal */
.acc-modal-register h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 12px;
}
.acc-modal-register .form-group { margin-bottom: 14px; }
.acc-modal-register .form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
}
.acc-modal-register .form-textarea {
  width: 100%;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.85rem;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.acc-modal-register .form-textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
  outline: none;
}
.acc-modal-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.acc-modal-form-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}
.acc-modal-form-actions .btn-outline {
  background: #f1f5f9;
  color: #475569;
}
.acc-modal-form-actions .btn-outline:hover {
  background: #e2e8f0;
}
.acc-modal-form-actions .btn-primary {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
}
.acc-modal-form-actions .btn-primary:hover {
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 4px 14px rgba(16,185,129,0.35);
}

/* Done badge in modal */
.acc-modal-done-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #065f46;
}

/* ─── Observation card (done state in modal) ─── */
.acc-obs-card {
  display: flex;
  gap: 14px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 16px;
  margin-top: 4px;
}
.acc-obs-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #10b981;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.acc-obs-content { flex: 1; min-width: 0; }
.acc-obs-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #059669;
  margin-bottom: 6px;
}
.acc-obs-text {
  font-size: 0.875rem;
  color: #1e293b;
  line-height: 1.55;
  margin: 0 0 8px;
  word-break: break-word;
}
.acc-obs-meta { font-size: 0.7rem; color: #64748b; }

/* ─── Register button on action row ─── */
.acc-reg-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.63rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1.5px solid #f97316;
  color: #f97316;
  background: #fff7ed;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  margin-left: 6px;
}
.acc-reg-btn:hover { background: #f97316; color: white; }
.acc-reg-btn.is-done { border-color: #10b981; color: #10b981; background: #ecfdf5; }
.acc-reg-btn.is-done:hover { background: #10b981; color: white; }

/* ─── Detail link on card header ─── */
.acc-detail-link {
  display: inline-flex;
  align-items: center;
  color: #cbd5e1;
  transition: color 0.15s;
  text-decoration: none;
}
.acc-detail-link:hover { color: #3b82f6; }

/* Agendar reunión button */
.acc-modal-agendar {
  margin: 0;
}
.acc-agendar-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}
.acc-agendar-btn:hover {
  box-shadow: 0 4px 14px rgba(99,102,241,0.4);
  transform: translateY(-1px);
}
.acc-agendar-btn svg {
  flex-shrink: 0;
}

/* Mobile responsive */
@media (max-width: 640px) {
  .acc-modal { width: 96%; max-height: 92vh; border-radius: 12px; }
  .acc-modal-header { padding: 14px 16px; }
  .acc-modal-body { padding: 14px 16px 18px; }
  .acc-modal-sub { font-size: 0.72rem; }
  .acc-modal-form-actions { flex-direction: column; }
  .acc-modal-form-actions .btn { justify-content: center; width: 100%; }
}

/* ═══════════════════════════════════════════════════════════════
   DETALLE ACCIONABLE — Detail page
   ═══════════════════════════════════════════════════════════════ */

/* Header bar */
.accd-header-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, #0B1A2E, #1e3a5f);
  color: white;
  padding: 18px 24px;
  border-radius: 14px;
  margin-bottom: 20px;
}
.accd-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  transition: background 0.2s;
  white-space: nowrap;
}
.accd-back-btn:hover { background: rgba(255,255,255,0.2); }
.accd-header-info {
  flex: 1;
}
.accd-header-clave {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.accd-header-nombre {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 2px 0;
}
.accd-header-mes {
  font-size: 0.82rem;
  opacity: 0.7;
}
.accd-header-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.accd-progress-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
}
.accd-progress-circle.complete {
  border-color: #10b981;
  background: rgba(16,185,129,0.15);
}
.accd-progress-label {
  font-size: 0.7rem;
  opacity: 0.7;
}

/* Info card */
.accd-info-card {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: #e8ecf1;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
}
.accd-info-item {
  background: white;
  padding: 14px 18px;
}
.accd-info-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.accd-info-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: #0f172a;
}

/* Accionable sections */
.accd-accionable {
  background: white;
  border: 1px solid #e8ecf1;
  border-radius: 12px;
  margin-bottom: 14px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.accd-accionable:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.accd-accionable.done {
  border-left: 4px solid #10b981;
}
.accd-accionable.pending {
  border-left: 4px solid #f59e0b;
}

/* Accionable header */
.accd-acc-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  cursor: pointer;
  user-select: none;
}
.accd-acc-header:hover {
  background: #fafbfc;
}
.accd-status-badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 800;
  font-size: 0.85rem;
}
.accd-status-badge.done {
  background: #10b981;
  color: white;
}
.accd-status-badge.pending {
  background: #fef3c7;
  color: #d97706;
  border: 2px solid #fbbf24;
}
.accd-acc-title-wrap {
  flex: 1;
  min-width: 0;
}
.accd-acc-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 4px;
}
.accd-acc-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: #64748b;
  flex-wrap: wrap;
}
.accd-meta-sep {
  color: #cbd5e1;
}
.accd-done-label {
  color: #10b981;
  font-weight: 600;
}
.accd-tipo-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.72rem;
}
.accd-tipo-llamada  { background: #eff6ff; color: #2563eb; }
.accd-tipo-visita   { background: #f0fdf4; color: #16a34a; }
.accd-tipo-whatsapp { background: #ecfdf5; color: #059669; }
.accd-acc-toggle {
  flex-shrink: 0;
  color: #94a3b8;
  transition: transform 0.2s;
}
.accd-acc-toggle svg {
  transition: transform 0.2s;
}

/* Accionable body */
.accd-acc-body {
  padding: 0 20px 20px;
  border-top: 1px solid #f1f5f9;
}

/* Description table */
.accd-desc-table-wrap {
  overflow-x: auto;
  margin-top: 16px;
}
.accd-desc-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #e8ecf1;
  border-radius: 10px;
  overflow: hidden;
  font-size: 0.82rem;
}
.accd-desc-table thead th {
  background: linear-gradient(135deg, #c0392b, #e74c3c);
  color: white;
  padding: 12px 14px;
  text-align: center;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.3px;
  border: none;
}
.accd-desc-table tbody td {
  padding: 14px;
  border-bottom: 1px solid #f1f5f9;
  border-right: 1px solid #f1f5f9;
  vertical-align: top;
  color: #334155;
  line-height: 1.6;
}
.accd-desc-table tbody td:last-child {
  border-right: none;
}
.accd-desc-table tbody tr:last-child td {
  border-bottom: none;
}
.accd-td-accionable {
  font-weight: 700;
  color: #0f172a;
  min-width: 180px;
}

/* Observación */
.accd-observacion {
  margin-top: 14px;
  background: #fef9c3;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.82rem;
  color: #713f12;
  text-align: center;
  line-height: 1.5;
}
.accd-observacion strong {
  color: #92400e;
}

/* Registros de acción */
.accd-registros {
  margin-top: 18px;
}
.accd-registros-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.accd-registros-header h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: #334155;
  margin: 0;
}
.accd-reg-form {
  background: #f8fafc;
  border: 1px solid #e8ecf1;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
}
.accd-reg-form-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 10px;
}
.accd-reg-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.accd-reg-table th {
  background: #f8fafc;
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 0.72rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #e8ecf1;
}
.accd-reg-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
}
.accd-no-registros {
  font-size: 0.8rem;
  color: #94a3b8;
  font-style: italic;
  padding: 10px 0;
}
.badge-satisfecho {
  background: #dcfce7;
  color: #15803d;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
}

/* ═══ Responsive ═══ */
@media (max-width: 768px) {
  .acc-page-header {
    flex-direction: column;
  }
  .acc-filters-form {
    flex-direction: column;
    width: 100%;
  }
  .acc-month-input, .acc-director-select, .acc-search-input {
    width: 100% !important;
  }
  .acc-kpis {
    grid-template-columns: repeat(2, 1fr);
  }
  .acc-grid {
    grid-template-columns: 1fr;
  }
  .acc-legend {
    flex-direction: column;
    align-items: flex-start;
  }
  .accd-header-bar {
    flex-direction: column;
    text-align: center;
  }
  .accd-info-card {
    grid-template-columns: repeat(2, 1fr);
  }
  .accd-acc-header {
    flex-wrap: wrap;
  }
  .accd-desc-table {
    font-size: 0.75rem;
  }
  .accd-desc-table thead th {
    font-size: 0.7rem;
    padding: 8px;
  }
  .accd-desc-table tbody td {
    padding: 10px;
    font-size: 0.75rem;
  }
}
}

/* ═══════════════════════════════════════════════════════════════
   CALENDARIO — Monthly calendar view
   ═══════════════════════════════════════════════════════════════ */

/* Header */
.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
}
.cal-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cal-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cal-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #475569;
  text-decoration: none;
  transition: all 0.2s;
}
.cal-nav-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
}
.cal-month-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  min-width: 180px;
  text-align: center;
}
.cal-today-btn {
  padding: 6px 16px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}
.cal-today-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
}
.cal-export-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 10px;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}
.cal-export-btn:hover {
  border-color: #3b82f6;
  color: #3b82f6;
  background: #eff6ff;
}
.cal-new-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 10px;
  background: linear-gradient(135deg, #E30613, #c00510);
  color: white;
  font-size: 0.84rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}
.cal-new-btn:hover {
  box-shadow: 0 4px 14px rgba(227,6,19,0.35);
  transform: translateY(-1px);
}

/* KPIs */
.cal-kpis {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.cal-kpi {
  background: #fff;
  border-radius: 12px;
  padding: 14px 18px;
  border: 1px solid #f1f5f9;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.cal-kpi-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1e293b;
}
.cal-kpi-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
  margin-top: 2px;
}
.cal-kpi-green .cal-kpi-value  { color: #10b981; }
.cal-kpi-amber .cal-kpi-value  { color: #f59e0b; }
.cal-kpi-blue .cal-kpi-value   { color: #3b82f6; }
.cal-kpi-purple .cal-kpi-value { color: #8b5cf6; }

/* Calendar Grid */
.cal-grid-wrap {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e8ecf1;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  margin-bottom: 16px;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.cal-dow {
  padding: 10px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #f8fafc;
  border-bottom: 1px solid #e8ecf1;
}
.cal-cell {
  min-height: 110px;
  border-right: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
  padding: 6px;
  cursor: default;
  transition: background 0.15s;
  position: relative;
}
.cal-cell:nth-child(7n) {
  border-right: none;
}
.cal-cell:hover {
  background: #fafbfd;
}
.cal-cell-empty {
  background: #fafbfc;
  min-height: 110px;
}
.cal-cell-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.cal-day-num {
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.cal-day-today {
  background: #E30613;
  color: #fff !important;
  font-weight: 700;
}
.cal-today {
  background: #fff5f5;
}
.cal-day-count {
  font-size: 0.65rem;
  font-weight: 700;
  background: #6366f1;
  color: #fff;
  border-radius: 10px;
  padding: 1px 7px;
  line-height: 1.4;
}
.cal-cell-events {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* Eventos en celda */
.cal-evt {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  border-radius: 6px;
  font-size: 0.68rem;
  cursor: pointer;
  transition: all 0.15s;
  overflow: hidden;
  white-space: nowrap;
}
.cal-evt:hover {
  transform: scale(1.02);
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
.cal-evt-presencial {
  background: #dbeafe;
  color: #1e40af;
  border-left: 3px solid #3b82f6;
}
.cal-evt-virtual {
  background: #ede9fe;
  color: #5b21b6;
  border-left: 3px solid #8b5cf6;
}
.cal-evt-confirmed {
  opacity: 1;
}
.cal-evt-time {
  font-weight: 700;
  flex-shrink: 0;
}
.cal-evt-label {
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-evt-more {
  text-align: center;
  font-size: 0.65rem;
  font-weight: 600;
  color: #6366f1;
  padding: 2px;
  cursor: pointer;
}

/* Legend */
.cal-legend {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 0;
  margin-bottom: 20px;
}
.cal-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  color: #64748b;
}
.cal-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 4px;
}
.cal-dot-presencial { background: #3b82f6; }
.cal-dot-virtual    { background: #8b5cf6; }
.cal-dot-confirmed  { background: #10b981; }
.cal-dot-pending    { background: #f59e0b; }

/* ═══════════ LISTA EVENTOS ═══════════ */
.cal-list {
  margin-top: 10px;
}
.cal-list-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 14px;
}
.cal-list-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cal-list-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border: 1px solid #f1f5f9;
  border-radius: 14px;
  padding: 14px 18px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.cal-list-card:hover {
  border-color: #c7d2fe;
  box-shadow: 0 4px 14px rgba(99,102,241,0.1);
  transform: translateY(-1px);
}
.cal-list-past {
  opacity: 0.6;
}
.cal-list-card-date {
  text-align: center;
  min-width: 48px;
}
.cal-list-day {
  font-size: 1.3rem;
  font-weight: 800;
  color: #1e293b;
  line-height: 1;
}
.cal-list-weekday {
  font-size: 0.7rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
}
.cal-list-card-body {
  flex: 1;
  min-width: 0;
}
.cal-list-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.cal-list-modalidad {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
}
.cal-mod-presencial {
  background: #dbeafe;
  color: #1e40af;
}
.cal-mod-virtual {
  background: #ede9fe;
  color: #5b21b6;
}
.cal-list-estado {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}
.cal-est-confirmada {
  background: #d1fae5;
  color: #065f46;
}
.cal-est-pendiente {
  background: #fef3c7;
  color: #92400e;
}
.cal-est-realizada {
  background: #e0e7ff;
  color: #3730a3;
}
.cal-list-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-list-card-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.76rem;
  color: #64748b;
}
.cal-list-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.cal-list-card-actions {
  flex-shrink: 0;
}
.cal-ics-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #475569;
  text-decoration: none;
  transition: all 0.2s;
}
.cal-ics-btn:hover {
  background: #dbeafe;
  color: #2563eb;
}

/* ═══════════ MODAL DETALLE / CREAR ═══════════ */
.cal-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}
.cal-modal-overlay.show {
  opacity: 1;
  visibility: visible;
}
.cal-modal {
  width: 90%;
  max-width: 680px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.3);
  transform: translateY(30px) scale(0.97);
  transition: transform 0.3s cubic-bezier(.16,1,.3,1);
  overflow: hidden;
}
.cal-modal-form {
  max-width: 750px;
}
.cal-modal-overlay.show .cal-modal {
  transform: translateY(0) scale(1);
}
.cal-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 24px;
  color: #fff;
}
.cal-mh-presencial { background: linear-gradient(135deg, #1e40af, #3b82f6); }
.cal-mh-virtual    { background: linear-gradient(135deg, #5b21b6, #8b5cf6); }
.cal-mh-new        { background: linear-gradient(135deg, #0B1A2E, #1e3a5f); }
.cal-modal-header-left {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}
.cal-modal-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cal-modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 4px;
  line-height: 1.3;
}
.cal-modal-sub {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.75);
  display: flex;
  align-items: center;
  gap: 6px;
}
.cal-modal-estado-confirmada { color: #86efac; font-weight: 600; }
.cal-modal-estado-pendiente  { color: #fde68a; font-weight: 600; }
.cal-modal-estado-realizada  { color: #c7d2fe; font-weight: 600; }
.cal-modal-close {
  flex-shrink: 0;
  background: rgba(255,255,255,0.12);
  border: none;
  color: white;
  border-radius: 10px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}
.cal-modal-close:hover {
  background: rgba(255,255,255,0.25);
}
.cal-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 24px;
}

/* Info grid in modal */
.cal-modal-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}
.cal-modal-info-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.cal-modal-info-item svg {
  flex-shrink: 0;
  margin-top: 2px;
}
.cal-modal-info-item strong {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 2px;
}
.cal-modal-info-item span,
.cal-modal-info-item a {
  font-size: 0.85rem;
  color: #1e293b;
}
.cal-info-full {
  grid-column: 1 / -1;
}
.cal-link {
  color: #3b82f6 !important;
  text-decoration: none;
  word-break: break-all;
}
.cal-link:hover {
  text-decoration: underline;
}

/* Desc / obs */
.cal-modal-desc,
.cal-modal-obs {
  padding: 14px 16px;
  border-radius: 10px;
  margin-bottom: 14px;
}
.cal-modal-desc {
  background: #f8fafc;
  border: 1px solid #e8ecf1;
}
.cal-modal-obs {
  background: #fffbeb;
  border: 1px solid #fde68a;
}
.cal-modal-desc strong,
.cal-modal-obs strong {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.cal-modal-desc p,
.cal-modal-obs p {
  font-size: 0.85rem;
  color: #334155;
  margin: 0;
  line-height: 1.5;
}

/* Action buttons in modal */
.cal-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
}
.cal-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}
.cal-action-outlook {
  background: #eff6ff;
  color: #2563eb;
}
.cal-action-outlook:hover {
  background: #dbeafe;
}
.cal-action-confirm {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
}
.cal-action-confirm:hover {
  box-shadow: 0 4px 12px rgba(16,185,129,0.35);
}
.cal-action-done {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
}
.cal-action-done:hover {
  box-shadow: 0 4px 12px rgba(99,102,241,0.35);
}
.cal-action-delete {
  background: #fef2f2;
  color: #dc2626;
}
.cal-action-delete:hover {
  background: #fee2e2;
}
.cal-action-cancel {
  background: #f1f5f9;
  color: #475569;
}
.cal-action-cancel:hover {
  background: #e2e8f0;
}
.cal-action-save {
  background: linear-gradient(135deg, #E30613, #c00510);
  color: #fff;
}
.cal-action-save:hover {
  box-shadow: 0 4px 14px rgba(227,6,19,0.35);
}

/* ═══════════ FORM INSIDE MODAL ═══════════ */
.cal-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}
.cal-form-full {
  grid-column: 1 / -1;
}
.cal-form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 5px;
}
.cal-form-group input[type="text"],
.cal-form-group input[type="url"],
.cal-form-group input[type="date"],
.cal-form-group input[type="time"],
.cal-form-group select,
.cal-form-group textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  font-size: 0.84rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fff;
}
.cal-form-group input:focus,
.cal-form-group select:focus,
.cal-form-group textarea:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
  outline: none;
}
.cal-form-group textarea {
  resize: vertical;
}
.cal-form-hours {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.cal-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
}

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 900px) {
  .cal-kpis { grid-template-columns: repeat(3, 1fr); }
  .cal-cell { min-height: 80px; }
  .cal-evt-label { display: none; }
}
@media (max-width: 640px) {
  .cal-header { flex-direction: column; align-items: flex-start; }
  .cal-kpis { grid-template-columns: repeat(2, 1fr); }
  .cal-grid-wrap { overflow-x: auto; }
  .cal-grid { min-width: 600px; }
  .cal-cell { min-height: 70px; padding: 4px; }
  .cal-day-num { font-size: 0.72rem; width: 24px; height: 24px; }
  .cal-modal { width: 96%; max-height: 92vh; }
  .cal-modal-info { grid-template-columns: 1fr; }
  .cal-form-grid { grid-template-columns: 1fr; }
  .cal-form-hours { grid-template-columns: 1fr 1fr; }
  .cal-list-card { flex-direction: column; align-items: flex-start; }
  .cal-list-card-date { flex-direction: row; gap: 6px; }
}

/* ── Tareas-Usuario: Detail header + Search + Date range ── */
.tu-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  gap: 12px;
  flex-wrap: wrap;
}
.tu-count {
  font-weight: 400;
  color: #6b7280;
  font-size: 0.8rem;
}
.tu-search-wrap {
  position: relative;
  width: 300px;
  max-width: 100%;
}
.tu-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
}
.tu-search-input {
  width: 100%;
  padding: 7px 12px 7px 32px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.82rem;
  background: #fff;
  color: #1f2937;
  transition: border-color .2s, box-shadow .2s;
}
.tu-search-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.tu-search-input::placeholder {
  color: #9ca3af;
}

/* Date range filter */
.tu-date-range {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}
.tu-date-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #6b7280;
  white-space: nowrap;
}
.tu-date-input {
  width: 150px;
  padding: 6px 10px !important;
  font-size: 0.82rem !important;
  border-radius: 8px !important;
}
.tu-date-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fee2e2;
  color: #dc2626;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  transition: background .15s;
  flex-shrink: 0;
}
.tu-date-clear:hover {
  background: #fca5a5;
}

/* Clickable detail rows */
.tu-row:hover {
  background: #eff6ff;
  transition: background .15s;
}

@media (max-width: 640px) {
  .tu-detail-header { flex-direction: column; align-items: flex-start; }
  .tu-search-wrap { width: 100%; }
  .tu-date-range { flex-wrap: wrap; }
  .tu-date-input { width: 130px; }
}

/* ══════════════════════════════════════════════════
   Contactos — Redesign
   ══════════════════════════════════════════════════ */
.cnt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 1.25rem;
}
.cnt-header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cnt-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border: none;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, box-shadow .15s, transform .1s;
}
.cnt-btn:hover {
  transform: translateY(-1px);
}
.cnt-btn-new {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 2px 8px rgba(37,99,235,.18);
}
.cnt-btn-new:hover {
  background: #1d4ed8;
}
.cnt-btn-upload {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}
.cnt-btn-upload:hover {
  background: #dcfce7;
}
.cnt-btn-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #eff6ff;
  color: #2563eb;
  border: none;
  cursor: pointer;
  transition: background .15s;
}
.cnt-btn-edit:hover {
  background: #dbeafe;
}

/* Email tags */
.cnt-email-tag {
  display: inline-block;
  padding: 2px 8px;
  margin: 1px 2px;
  background: #f0f9ff;
  color: #0369a1;
  border: 1px solid #bae6fd;
  border-radius: 6px;
  font-size: 0.75rem;
  line-height: 1.5;
  word-break: break-all;
}

/* CSV Modal overlay (reuse modal-overlay from layout) */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(4px);
  padding: 16px;
}
.modal-overlay.show {
  display: flex;
}
.modal-overlay > .modal {
  width: 100%;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 48px rgba(0,0,0,.18);
  animation: modalSlideIn .25s ease-out;
  overflow: hidden;
}
@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* CSV Tabs */
.cnt-csv-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #e5e7eb;
  margin-bottom: 16px;
}
.cnt-csv-tab {
  padding: 10px 24px;
  border: none;
  background: none;
  font-size: 0.85rem;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .15s, border-color .15s;
}
.cnt-csv-tab:hover {
  color: #1f2937;
}
.cnt-csv-tab.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
}

/* CSV info block */
.cnt-csv-info {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.cnt-csv-columns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.cnt-col-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  background: #eff6ff;
  color: #1e40af;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 6px;
  font-family: 'SFMono-Regular', 'Consolas', monospace;
  letter-spacing: .02em;
}
.cnt-col-opt {
  background: #fefce8;
  color: #a16207;
}

/* CSV dropzone */
.cnt-csv-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  background: #fafafa;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  text-align: center;
}
.cnt-csv-dropzone:hover,
.cnt-dropzone-active {
  border-color: #2563eb;
  background: #eff6ff;
}

/* CSV form */
.cnt-csv-form {
  margin-top: 4px;
}

@media (max-width: 640px) {
  .cnt-header { flex-direction: column; align-items: flex-start; }
  .cnt-header-actions { width: 100%; }
  .cnt-btn { flex: 1; justify-content: center; }
  .cnt-csv-tab { padding: 8px 14px; font-size: 0.8rem; }
}

/* ══════════════════════════════════════════════════
   Usuarios — Redesign
   ══════════════════════════════════════════════════ */

/* Avatar circle */
.usr-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: .04em;
  flex-shrink: 0;
}
.usr-avatar-adm { background: linear-gradient(135deg, #dc2626, #b91c1c); }
.usr-avatar-dir { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.usr-avatar-ges { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.usr-avatar-int { background: linear-gradient(135deg, #6b7280, #4b5563); }

/* Role badges */
.usr-role-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.usr-role-administrador      { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.usr-role-director_comercial { background: #f5f3ff; color: #7c3aed; border: 1px solid #ddd6fe; }
.usr-role-gestor_comercial   { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.usr-role-intermediario      { background: #f9fafb; color: #6b7280; border: 1px solid #e5e7eb; }

/* Status button */
.usr-status-btn {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: opacity .15s;
}
.usr-status-btn:hover { opacity: .85; }
.usr-status-active   { background: #dcfce7; color: #16a34a; }
.usr-status-inactive { background: #fef2f2; color: #dc2626; }

/* Row hover */
.usr-row:hover { background: #f8fafc; transition: background .15s; }

/* Info note banner */
.usr-info-note {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  margin-bottom: 12px;
  font-size: 0.82rem;
  color: #92400e;
}
.usr-info-link {
  color: #2563eb;
  text-decoration: underline;
  font-weight: 600;
}
.usr-info-link:hover {
  color: #1d4ed8;
}

/* ══════════════════════════════════════════════════
   Accionables — Generate Button & Modal extras
   ══════════════════════════════════════════════════ */
.acc-gen-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border: none;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  box-shadow: 0 2px 8px rgba(245,158,11,.25);
  transition: background .15s, box-shadow .15s, transform .1s;
  white-space: nowrap;
  margin-left: 4px;
}
.acc-gen-btn:hover {
  background: linear-gradient(135deg, #d97706, #b45309);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245,158,11,.35);
}
.acc-gen-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: #fff;
  color: #d97706;
  font-size: 0.72rem;
  font-weight: 700;
  margin-left: 4px;
}
.acc-gen-info-note {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  font-size: 0.82rem;
  color: #92400e;
}
.acc-gen-info-ok {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  font-size: 0.82rem;
  color: #166534;
}

/* ═══════════ Page Hero (header global para todas las páginas) ═══════════ */
.page-hero {
  background: linear-gradient(135deg, #0B1A2E 0%, #1E3A5F 100%);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: -50%; right: -10%;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(37,99,235,.2) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero-content {
  position: relative;
  z-index: 1;
}
.page-hero-title {
  font-size: 20px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.page-hero-title svg {
  width: 24px;
  height: 24px;
  opacity: 0.7;
  flex-shrink: 0;
}
.page-hero-desc {
  font-size: 13px;
  color: rgba(255,255,255,.55);
}
.page-hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.page-hero-actions .btn {
  background: rgba(255,255,255,.15);
  color: white;
  border: 1px solid rgba(255,255,255,.2);
  backdrop-filter: blur(4px);
  font-size: 0.8rem;
  padding: 8px 16px;
}
.page-hero-actions .btn:hover {
  background: rgba(255,255,255,.25);
}
.page-hero-actions .rpt-btn-export {
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.85);
  border-color: rgba(255,255,255,.2);
}
.page-hero-actions .rpt-btn-export:hover {
  background: rgba(255,255,255,.22);
  color: white;
}

/* ═══════ Accionable Rápido ═══════ */
.acc-rapido-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.acc-rapido-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 14px;
}
.acc-rapido-header svg { color: #f59e0b; }
.acc-rapido-form {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.acc-rapido-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
}
.acc-rapido-field .form-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: .3px;
}
.acc-rapido-obs {
  flex: 1;
  min-width: 200px;
}
.acc-rapido-btn {
  white-space: nowrap;
  height: 38px;
  padding: 0 18px;
  font-size: 13px;
}
.acc-rapido-inter-name {
  font-size: 11px;
  min-height: 16px;
  line-height: 16px;
  transition: color .15s;
}
.acc-rapido-inter-name.found { color: #10b981; font-weight: 600; }
.acc-rapido-inter-name.not-found { color: #ef4444; font-weight: 500; }
@media (max-width: 768px) {
  .acc-rapido-form { flex-direction: column; align-items: stretch; }
  .acc-rapido-field { min-width: 100%; }
}

/* Rapidos section inside card */
.acc-rapidos-section {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px dashed var(--color-border);
}
.acc-rapidos-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #f59e0b;
  margin-bottom: 4px;
}
