/* app/assets/css/app.css */

/* =========================
   Variables / Theme
========================= */
:root{
  --bg: #f6f8fb;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: rgba(15, 23, 42, .62);
  --border: rgba(15, 23, 42, .08);

  --shadow: 0 .6rem 1.4rem rgba(15, 23, 42, .06);
  --shadow-sm: 0 .35rem 1.1rem rgba(15, 23, 42, .05);

  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;

  /* Colores corporativos RK */
  --primary: #3DAA53;
  --primary-hover: #339245;
  --primary-soft: rgba(61,170,83,.15);

  --accent: #FE7C02;
  --accent-hover: #e66f00;

  --danger: #dc3545;
  --danger-hover: #bb2d3b;

  --blue: #2563EB;
  --blue-hover: #1d4ed8;

  --blue-light: #60A5FA;
  --blue-light-hover: #3B82F6;

  /* Sidebar corporativo azul */
  --sidebar-bg-top: #0f2d52;
  --sidebar-bg-bottom: #0c2442;
  --sidebar-text: rgba(255,255,255,.88);
  --sidebar-muted: rgba(255,255,255,.50);
  --sidebar-hover: rgba(255,255,255,.08);
  --sidebar-active: rgba(255,255,255,.14);
  --sidebar-accent: #4da3ff;
}

/* =========================
   Base / Tipografía
========================= */
body{
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  background: var(--bg);
  color: var(--text);
}

h1{
  font-size: 24px;
  font-weight: 800;
}

h2{
  font-size: 20px;
  font-weight: 700;
}

h3{
  font-size: 18px;
  font-weight: 700;
}

h4{
  font-size: 16px;
  font-weight: 700;
}

.text-muted{
  font-size: 13px;
  color: var(--muted) !important;
}

/* =========================
   Elementos globales UI
========================= */
.btn{
  font-size: 14px;
  font-weight: 600;
  padding: .42rem .85rem;
}

.badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.25rem;
  min-height:20px;
  padding:.30rem .58rem;
  border-radius:999px;
  font-size:11px;
  font-weight:800;
  line-height:1;
  white-space:nowrap;
  vertical-align:middle;
}

.card{
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  background: var(--panel);
}

.card.shadow-sm{
  border: 0;
}

/* =========================
   Layout base
========================= */
.layout{
  display: flex;
  min-height: 100vh;
}

.main-content{
  flex: 1;
  min-width: 0;
  padding: 18px;
  background: var(--bg);
}

/* =========================
   Sidebar
========================= */
.sidebar{
  width: 260px;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--sidebar-bg-top) 0%, var(--sidebar-bg-bottom) 100%);
  padding: 14px;
  color: var(--sidebar-text);
}

@media (min-width: 992px){
  .layout > .sidebar{
    position: sticky;
    top: var(--rk-sidebar-stick-top, 0px);
    align-self: flex-start;
    flex: 0 0 260px;
  }
}

@keyframes rk-alert-appear{
  from{ opacity: 0; transform: translateY(-8px); }
  to{ opacity: 1; transform: translateY(0); }
}
.rk-alert-enter{ animation: rk-alert-appear .25s ease-out; }
@media (prefers-reduced-motion: reduce){
  .rk-alert-enter{ animation: none; }
}

.brand{
  padding: 10px 8px 16px 8px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  margin-bottom: 12px;
}

.brand-link{
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #fff;
}

.brand-logo{
  width: 200px;
  max-width: 100%;
  height: auto;
  display: block;
}

/* Links sidebar */
.sidebar .list-group-item{
  border: none;
  border-radius: 12px;
  padding: .72rem .85rem;
  margin-bottom: 6px;
  color: var(--sidebar-text);
  background: transparent;
  display: flex;
  align-items: center;
  gap: .6rem;
  transition: .15s;
}

.sidebar .list-group-item:hover{
  background: var(--sidebar-hover);
  color: #fff;
  transform: translateX(4px);
}

.sidebar .list-group-item.active{
  background: var(--sidebar-active);
  color: #fff;
  font-weight: 900;
  position: relative;
}

.sidebar .list-group-item.active::before{
  content: "";
  position: absolute;
  left: -6px;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 999px;
  background: var(--sidebar-accent);
}

/* Botón salir */
.sidebar .list-group-item.text-danger{
  color: var(--accent) !important;
  font-weight: 800;
}

.sidebar .list-group-item.text-danger:hover{
  background: var(--accent);
  color: #fff !important;
}

/* Títulos internos sidebar */
.sidebar .text-muted{
  color: rgba(255,255,255,.65) !important;
}

.sidebar .text-uppercase{
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .08em;
  color: #6DD177 !important;
}

/* =========================
   Topbar
========================= */
.topbar{
  background: var(--primary);
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 10px 14px;
  margin-bottom: 10px;
  color: #fff;
}

.topbar-main{
  min-height: 44px;
}

.topbar-left{
  min-width: 0;
  flex: 1 1 auto;
}

.topbar-breadcrumb{
  min-width: 0;
  max-width: 100%;
}

.topbar-right{
  flex-shrink: 0;
}

.topbar .btn-topbar{
  position: relative;
  background: transparent;
  border: 1px solid rgba(255,255,255,.35);
  color: #fff;
  font-weight: 600;
}

.topbar .btn-topbar:hover,
.topbar .btn-topbar:focus{
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.topbar-icon-btn{
  width: 38px;
  height: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.topbar-notify-badge{
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #dc3545;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.topbar-user-name{
  display: inline-block;
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

@media (max-width: 991.98px){
  .topbar{
    padding: 10px 12px;
  }

  .topbar-main{
    gap: 10px;
  }

  .topbar-user-name{
    max-width: 110px;
  }
}

/* =========================
   BREADCRUMB PROFESIONAL RK
========================= */
.rk-breadcrumb-wrap{
  display:flex;
  align-items:center;
  min-height:28px;
  min-width:0;
}

.rk-breadcrumb{
  display:flex;
  align-items:center;
  flex-wrap:nowrap;
  gap:.12rem;
  margin:0;
  padding:0;
  background:transparent;
  min-width:0;
}

.rk-breadcrumb .breadcrumb-item{
  display:flex;
  align-items:center;
  font-size:.86rem;
  line-height:1.1;
}

.rk-breadcrumb .breadcrumb-item + .breadcrumb-item::before{
  content:"›";
  margin:0 .12rem;
  opacity:.55;
  font-weight:700;
}

.rk-breadcrumb a,
.rk-breadcrumb .active span{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:.08rem .42rem;
  border-radius:999px;
  text-decoration:none;
  transition:.18s ease;
}

/* Desktop */
.topbar-breadcrumb a{
  color:#fff;
  background:rgba(255,255,255,.10);
  font-weight:600;
}

.topbar-breadcrumb a:hover{
  background:rgba(255,255,255,.18);
  color:#fff;
}

.topbar-breadcrumb .active span{
  background:rgba(255,255,255,.18);
  color:#fff;
  font-weight:700;
}

/* Mobile */
.mobile-breadcrumb-wrap{
  display:none;
  padding:.35rem .7rem 0;
  margin-bottom:.55rem;
}

.mobile-breadcrumb-wrap .rk-breadcrumb-wrap{
  background:#fff;
  border-radius:10px;
  padding:.4rem .55rem;
  border:1px solid #e6edf5;
  box-shadow:0 3px 10px rgba(0,0,0,.04);
}

.mobile-breadcrumb-wrap .rk-breadcrumb{
  flex-wrap:wrap;
  gap:.08rem;
}

.mobile-breadcrumb-wrap .breadcrumb-item{
  font-size:.78rem;
}

.mobile-breadcrumb-wrap a,
.mobile-breadcrumb-wrap .active span{
  min-height:22px;
  padding:.06rem .36rem;
  border-radius:999px;
}

.mobile-breadcrumb-wrap a{
  background:#f4f8fb;
  color:#0f2d52;
  font-weight:600;
}

.mobile-breadcrumb-wrap .active span{
  background:#e7f1ff;
  color:#0f2d52;
  font-weight:700;
}

@media (max-width: 991.98px){
  .mobile-breadcrumb-wrap{
    display:block;
  }

  .topbar-breadcrumb{
    display:none !important;
  }
}

/* =========================
   Botones corporativos RK
========================= */
.btn-primary{
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 500;
}

.btn-primary:hover{
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}

.btn-secondary{
  background:#6c757d;
  border-color:#6c757d;
  color:#fff;
  font-weight:500;
}

.btn-secondary:hover{
  background:#5c636a;
  border-color:#5c636a;
  color:#fff;
}

.btn-success{
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 500;
}

.btn-success:hover{
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #fff;
}

.btn-danger{
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
  font-weight: 500;
}

.btn-danger:hover{
  background: var(--danger-hover);
  border-color: var(--danger-hover);
  color: #fff;
}

.btn-blue{
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  font-weight: 500;
}

.btn-blue:hover{
  background: var(--blue-hover);
  border-color: var(--blue-hover);
  color: #fff;
}

.btn-blue-light{
  background: var(--blue-light);
  border-color: var(--blue-light);
  color: #fff;
  font-weight: 500;
}

.btn-blue-light:hover{
  background: var(--blue-light-hover);
  border-color: var(--blue-light-hover);
  color: #fff;
}

/* =========================
   Outline botones
========================= */
.btn-outline-primary{
  border-color: var(--accent);
  color: var(--accent);
}

.btn-outline-primary:hover{
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-outline-secondary{
  color:#6c757d;
  border-color:#6c757d;
  background:transparent;
}

.btn-outline-secondary:hover{
  color:#fff;
  background:#6c757d;
  border-color:#6c757d;
}

.btn-outline-success{
  border-color: var(--primary);
  color: var(--primary);
}

.btn-outline-success:hover{
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.btn-outline-danger{
  border-color: var(--danger);
  color: var(--danger);
  background: transparent;
}

.btn-outline-danger:hover{
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.btn-outline-blue{
  border-color: var(--blue);
  color: var(--blue);
}

.btn-outline-blue:hover{
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.btn-outline-blue-light{
  border-color: var(--blue-light);
  color: var(--blue-light);
}

.btn-outline-blue-light:hover{
  background: var(--blue-light);
  border-color: var(--blue-light);
  color: #fff;
}

/* =========================
   Tablas
========================= */
.table{
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 0;
}

.table thead th{
  background: #C7E8CE;
  color: rgba(15,23,42,.78);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 900;
  padding: .85rem .9rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  white-space: nowrap;
}

.table tbody td{
  font-size: 14px;
  padding: .78rem .9rem;
  border-top: 1px solid rgba(15,23,42,.06);
  vertical-align: middle;
}

.table-striped > tbody > tr:nth-of-type(odd) > *{
  background: rgba(15,23,42,.012);
}

.table-hover > tbody > tr:hover > *{
  background: rgba(37,99,235,.06);
}

.card .table thead th:first-child{
  border-top-left-radius: 12px;
}

.card .table thead th:last-child{
  border-top-right-radius: 12px;
}

.card .table-responsive thead th{
  position: sticky;
  top: 0;
  z-index: 2;
}

/* =========================
   Formularios
========================= */
.form-label{
  font-size: 13px;
  font-weight: 600;
  color: #667085;
  margin-bottom: 8px;
}

.form-control,
.form-select{
  font-size: 15px;
  font-weight: 400;
  color: #101828;
}

.form-control::placeholder{
  color: #98a2b3;
}

.form-control:focus,
.form-select:focus{
  border-color: rgba(61,170,83,.45);
  box-shadow: 0 0 0 .2rem rgba(61,170,83,.12);
}

/* =========================
   Pills informativas / estados
========================= */
.badge-pill-info{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.25rem;
  min-width:40px;
  min-height:20px;
  padding:.30rem .58rem;
  border-radius:999px;
  font-size:11px;
  font-weight:800;
  line-height:1;
  letter-spacing:.01em;
  white-space:nowrap;
  vertical-align:middle;
  border:1px solid transparent;
  box-shadow:inset 0 -1px 0 rgba(255,255,255,.18);
}

.badge-pill-info.sm{
  min-width:34px;
  min-height:20px;
  padding:.30rem .58rem;
  font-size:11px;
}

.badge-pill-info.obligatorio-si{
  background:rgba(37,99,235,.12);
  color:#1d4ed8;
  border-color:rgba(37,99,235,.18);
}

.badge-pill-info.obligatorio-no{
  background:rgba(108,117,125,.14);
  color:#495057;
  border-color:rgba(108,117,125,.18);
}

.badge-pill-info.evidencia-si{
  background:rgba(6,182,212,.14);
  color:#0891b2;
  border-color:rgba(6,182,212,.18);
}

.badge-pill-info.evidencia-no{
  background:rgba(108,117,125,.14);
  color:#495057;
  border-color:rgba(108,117,125,.18);
}

.badge-pill-info.estado-activo{
  background:rgba(34,197,94,.14);
  color:#15803d;
  border-color:rgba(34,197,94,.18);
}

.badge-pill-info.estado-pausado{
  background: rgba(245, 158, 11, .14);
  color: #b45309;
  border-color: rgba(245, 158, 11, .18);
}

.badge-pill-info.estado-inactivo{
  background:rgba(108,117,125,.14);
  color:#495057;
  border-color:rgba(108,117,125,.18);
}

.node-meta{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:4px;
}

/* =========================
   Chips
========================= */
.chip{
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .38rem .7rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: .85rem;
  font-weight: 800;
  border: 1px solid rgba(61,170,83,.25);
}

.chip .dot{
  width: .45rem;
  height: .45rem;
  border-radius: 50%;
  background: var(--primary);
}

/* =========================
   Login
========================= */
.login-bg{
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 20%, rgba(61,170,83,.25), transparent 40%),
    radial-gradient(circle at 80% 30%, rgba(61,170,83,.18), transparent 50%),
    linear-gradient(135deg, #0f2d52 0%, #0c2442 100%);
}

.login-card{
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 .9rem 2.2rem rgba(15,23,42,.16);
  border: 1px solid rgba(15,23,42,.08);
}

.login-card .form-control::placeholder{
  color:#98a2b3;
}

.login-head{
  padding: 18px;
  background: rgba(255,255,255,.92);
}

.login-logo{
  height: 48px;
}

.btn-login{
  background: var(--primary);
  border-color: var(--primary);
  font-weight: 800;
  color:#fff;
}

.btn-login:hover,
.btn-login:focus,
.btn-login:active{
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color:#fff;
}

.input-icon{
  display:flex;
  align-items:center;
  gap:10px;
  border:1px solid #d0d5dd;
  border-radius:10px;
  padding:0 12px;
  background:#fff;
}

.input-icon i{
  font-size:16px;
  color:#667085;
  flex-shrink:0;
}

.input-icon .form-control{
  border:none;
  box-shadow:none;
  padding:12px 0;
  font-size:15px;
  background:transparent;
}

.input-icon .form-control:focus{
  box-shadow:none;
}

.input-icon:focus-within{
  border-color:rgba(61,170,83,.45);
  box-shadow:0 0 0 .2rem rgba(61,170,83,.12);
}

/* Fix autofill navegador */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active{
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
  box-shadow: 0 0 0 1000px #ffffff inset !important;
  -webkit-text-fill-color: #101828 !important;
  transition: background-color 9999s ease-in-out 0s;
}

/* =========================
   Responsive tablas RK
========================= */
.rk-nombre{
  font-weight: 600;
  margin-bottom: 4px;
}

.rk-tipo{
  font-size: 14px;
  margin-bottom: 6px;
  color: #6c757d;
}

.rk-actions{
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* =========================
   Responsive
========================= */
@media (max-width: 992px){
  .layout{
    flex-direction: column;
  }

  .sidebar{
    width: 100%;
    min-height: auto;
    border-bottom: 1px solid rgba(255,255,255,.10);
  }

  #sidebarOffcanvas{
    width: min(88vw, 340px);
    background: var(--sidebar-bg-top);
  }

  #sidebarOffcanvas .offcanvas-header{
    color: #fff;
    background: var(--sidebar-bg-top);
    border-bottom: 1px solid rgba(255,255,255,.10);
  }

  #sidebarOffcanvas .btn-close{
    filter: invert(1) grayscale(100%) brightness(200%);
  }

  #sidebarOffcanvas .offcanvas-body{
    overflow-y: auto;
    background: var(--sidebar-bg-bottom);
  }

  #sidebarOffcanvas .sidebar{
    min-height: 100%;
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }

  .main-content{
    padding: 14px;
  }
}

@media (max-width: 768px){
  .rk-hide-mobile{
    display: none !important;
  }

  .rk-row{
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #fff;
  }

  .rk-row td{
    display: block;
    width: 100%;
    border: none;
    padding: 8px 10px;
  }

  .rk-row td:first-child{
    padding-top: 10px;
  }

  .rk-row td:last-child{
    padding-bottom: 10px;
  }

  .rk-actions{
    margin-top: 8px;
  }

  .rk-actions .btn{
    margin-bottom: 4px;
  }
}

/* =========================
   Subtítulo jerárquico banner
========================= */
.rk-subtitle-interv{
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: none;
  color: #2563eb;
  line-height: 1.2;
}

.rk-subtitle-prog{
  font-size: 0.95rem;
  font-weight: 500;
  color: #374151;
  margin-top: 2px;
  line-height: 1.3;
}

.dark .rk-subtitle-prog{
  color: #e5e7eb;
}

@media (max-width: 575.98px){
  .rk-subtitle-interv{
    font-size: 0.8rem;
  }

  .rk-subtitle-prog{
    font-size: 0.9rem;
  }
}

/* =========================
   EJECUCIÓN - CALENDARIO
========================= */

.calendar-container {
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,.05);
}

.fc .fc-daygrid-event {
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 12px;
  border: none;
}

.fc-event-pendiente { background-color: #ffc107 !important; color:#000 !important; }
.fc-event-revision { background-color: #0dcaf0 !important; color:#000 !important; }
.fc-event-aprobado { background-color: #198754 !important; color:#fff !important; }
.fc-event-rechazado { background-color: #dc3545 !important; color:#fff !important; }
.fc-event-vencido { background-color: #6c757d !important; color:#fff !important; }

/* =========================
   LISTA EJECUCIONES
========================= */

.ejec-card {
  border-radius: 12px;
  border: 1px solid #eee;
  padding: 12px;
  margin-bottom: 10px;
  transition: all .2s;
}

.ejec-card:hover {
  box-shadow: 0 4px 10px rgba(0,0,0,.08);
}

.ejec-title {
  font-weight: 600;
}

.ejec-meta {
  font-size: 12px;
  color: #777;
}

/* =========================
   BOTÓN GESTIONAR
========================= */

.btn-gestionar {
  background: #3DAA53;
  color: #fff;
  border-radius: 8px;
  padding: 5px 12px;
}

.btn-gestionar:hover {
  background: #339245;
  color: #fff;
}

/* =========================
   MODAL
========================= */

.modal-ejecucion .modal-content {
  border-radius: 12px;
}

.resumen-card {
  cursor: pointer;
  transition: all 0.2s ease;
}

.resumen-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.resumen-card.active {
  border: 2px solid #FE7C02;
}

/* =========================
   Logs
========================= */
.rk-log-stat-card{
  overflow: hidden;
}

.rk-log-stat-link .rk-log-stat-card{
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  border: 1px solid var(--border) !important;
}

.rk-log-stat-link:hover .rk-log-stat-card{
  transform: translateY(-3px);
  box-shadow: 0 .8rem 1.6rem rgba(15,23,42,.10) !important;
}

.rk-log-stat-link.is-active .rk-log-stat-card{
  border-color: rgba(254,124,2,.42) !important;
  box-shadow: 0 .75rem 1.55rem rgba(254,124,2,.12) !important;
}

.rk-log-stat-link.is-active .rk-log-stat-label{
  color: #b45309;
  font-weight: 800;
}

.rk-log-stat-card .card-body{
  position: relative;
  padding: 1rem 1rem 1rem 1rem;
}

.rk-log-stat-icon{
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  margin-bottom: .75rem;
}

.rk-log-stat-value{
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1.1;
}

.rk-log-stat-label{
  color: var(--muted);
  font-size: .88rem;
  margin-top: .2rem;
}

.rk-log-desc{
  line-height: 1.3;
}

.rk-log-pre{
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.45;
  color: #0f172a;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .8rem;
  max-height: 320px;
  overflow: auto;
}

.modal .card-header{
  border-bottom: 1px solid var(--border);
}

@media (max-width: 767.98px){
  .rk-log-stat-value{
    font-size: 1.25rem;
  }

  .rk-log-pre{
    font-size: 11px;
  }
}

/* =========================
   RK - Autocomplete
========================= */
.rk-autocomplete-wrap{
  position: relative;
}

.rk-autocomplete-results{
  position: absolute;
  left: 12px;
  right: 12px;
  top: 100%;
  z-index: 25;
  background: #fff;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(15,23,42,.12);
  max-height: 280px;
  overflow: auto;
}

.rk-autocomplete-item{
  display: block;
  width: 100%;
  border: 0;
  background: #fff;
  text-align: left;
  padding: .75rem .9rem;
}

.rk-autocomplete-item:hover{
  background: #f8fafc;
}

.rk-autocomplete-empty{
  padding: .8rem .9rem;
  color: #64748b;
}

/* =========================
   RK - Árbol de asignaciones
========================= */
.assignment-tree .assign-block{
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 14px;
  padding: .9rem 1rem;
  background: #fff;
}

.assignment-tree .interventoria-block{
  background: #fcfdfd;
}

.assignment-tree .programa-block{
  background: #f9fbfd;
}

.assign-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.assign-meta{
  margin-top: .35rem;
}

.assign-children{
  padding-left: 1rem;
  border-left: 2px dashed rgba(37,99,235,.18);
}

.assign-activities{
  display: grid;
  gap: .55rem;
}

.assign-activity-item{
  padding: .45rem .6rem;
  border: 1px solid rgba(15,23,42,.06);
  border-radius: 10px;
  background: #fff;
}

.toggle-children .bi{
  transition: transform .18s ease;
}

.toggle-children.is-open .bi{
  transform: rotate(90deg);
}

.rk-big-icon{
  font-size: 2rem;
  color: #3DAA53;
}

@media (max-width: 991.98px){
  .assign-children{
    padding-left: .75rem;
  }

  .assignment-tree .assign-block{
    padding: .75rem .85rem;
  }
}

/* =========================
   DASHBOARD
========================= */

.dashboard-card{
  transition: all .2s ease;
}
.dashboard-card:hover{
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0,0,0,.08);
}

.icon-circle{
  width:48px;
  height:48px;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1.3rem;
  flex:0 0 auto;
}

.bg-primary-soft{
  background: rgba(61,170,83,.15);
  color:#3DAA53;
}

.bg-success-soft{
  background: rgba(37,99,235,.15);
  color:#2563EB;
}

.bg-blue-soft{
  background: rgba(59,130,246,.15);
  color:#1D4ED8;
}

.bg-warning-soft{
  background: rgba(254,124,2,.15);
  color:#FE7C02;
}

.bg-info-soft{
  background: rgba(14,165,233,.15);
  color:#0EA5E9;
}

/* Cards seguimiento */
.rk-stat-card{
  border:0;
  box-shadow:0 8px 20px rgba(15,23,42,.05);
  transition:all .18s ease;
}
.rk-stat-card:hover{
  transform:translateY(-3px);
  box-shadow:0 12px 26px rgba(15,23,42,.09);
}
.rk-stat-icon{
  width:42px;
  height:42px;
  border-radius:12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-bottom:.8rem;
  font-size:1.1rem;
}
.rk-stat-value{
  font-size:1.6rem;
  font-weight:900;
  line-height:1;
  margin-bottom:.35rem;
}
.rk-stat-label{
  color:#667085;
  font-size:.88rem;
  font-weight:700;
}
.rk-stat-pending .rk-stat-icon{ background:rgba(254,124,2,.15); color:#FE7C02; }
.rk-stat-review .rk-stat-icon{ background:rgba(13,202,240,.15); color:#0dcaf0; }
.rk-stat-approved .rk-stat-icon{ background:rgba(25,135,84,.15); color:#198754; }
.rk-stat-rejected .rk-stat-icon{ background:rgba(220,53,69,.15); color:#dc3545; }
.rk-stat-exempt .rk-stat-icon{ background:rgba(108,117,125,.14); color:#495057; }
.rk-stat-overdue .rk-stat-icon{ background:rgba(220,53,69,.15); color:#dc3545; }

/* Gráfica de cumplimiento / vencimiento */
.rk-performance-card{
  border:1px solid rgba(15,23,42,.08);
  box-shadow:0 10px 28px rgba(15,23,42,.06);
}

.rk-progress-focus,
.rk-chart-panel{
  border:1px solid #e5e7eb;
  border-radius:16px;
  background:#fff;
  padding:1rem;
}

.rk-progress-focus{
  display:flex;
  flex-direction:column;
  justify-content:center;
  background:linear-gradient(180deg, rgba(61,170,83,.08) 0%, rgba(255,255,255,1) 100%);
}

.rk-progress-focus__label{
  color:#475569;
  font-size:.82rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.04em;
}

.rk-progress-focus__value{
  color:#0f172a;
  font-size:2.4rem;
  font-weight:950;
  line-height:1;
  margin-top:.45rem;
}

.rk-progress-focus__desc{
  color:#475569;
  font-size:.88rem;
  line-height:1.45;
  margin-top:.55rem;
}

.rk-progress-focus__meta{
  color:#334155;
  font-size:.86rem;
  font-weight:800;
}

.rk-progress-bar{
  height:12px;
  border-radius:999px;
  background:#e2e8f0;
  overflow:hidden;
}

.rk-progress-bar .progress-bar{
  background:linear-gradient(90deg, var(--primary) 0%, var(--blue) 100%);
  border-radius:999px;
}

.rk-chart-wrap{
  position:relative;
  min-height:300px;
}

.rk-chart-wrap canvas{
  min-height:300px !important;
  cursor:pointer;
}

.rk-chart-empty{
  min-height:300px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:.85rem;
  padding:1.2rem;
  border:1px dashed #cbd5e1;
  border-radius:14px;
  background:#f8fafc;
  color:#475569;
}

.rk-chart-empty i{
  color:var(--blue);
  font-size:1.6rem;
}

.rk-chart-empty strong,
.rk-chart-empty span{
  display:block;
}

.rk-chart-empty strong{
  color:#0f172a;
  font-weight:900;
  margin-bottom:.1rem;
}

.rk-performance-kpis{
  display:flex;
  flex-direction:column;
  gap:.8rem;
}

.rk-performance-side{
  display:flex;
  flex-direction:column;
  gap:.85rem;
}

.rk-performance-state-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:.75rem;
}

.rk-performance-state-card{
  min-height:108px;
  padding:.85rem;
  border:1px solid #e5e7eb;
  border-radius:15px;
  background:#fff;
  text-decoration:none;
  color:#0f172a;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:flex-start;
  gap:.28rem;
  transition:.18s ease;
}

.rk-performance-state-card:hover{
  transform:translateY(-2px);
  box-shadow:0 .6rem 1.2rem rgba(15,23,42,.08);
  color:#0f172a;
}

.rk-performance-state-card__icon{
  width:34px;
  height:34px;
  border-radius:11px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:.95rem;
  margin-bottom:.1rem;
}

.rk-performance-state-card__value{
  color:#0f172a;
  font-size:1.35rem;
  font-weight:950;
  line-height:1;
}

.rk-performance-state-card__label{
  color:#475569;
  font-size:.8rem;
  font-weight:800;
  line-height:1.2;
}

.rk-performance-state-card.rk-stat-pending .rk-performance-state-card__icon{
  background:rgba(254,124,2,.15);
  color:#FE7C02;
}

.rk-performance-state-card.rk-stat-review .rk-performance-state-card__icon{
  background:rgba(37,99,235,.14);
  color:#2563eb;
}

.rk-performance-state-card.rk-stat-approved .rk-performance-state-card__icon{
  background:rgba(25,135,84,.14);
  color:#198754;
}

.rk-performance-state-card.rk-stat-rejected .rk-performance-state-card__icon,
.rk-performance-state-card.rk-stat-overdue .rk-performance-state-card__icon{
  background:rgba(220,53,69,.14);
  color:#dc3545;
}

.rk-performance-state-card.rk-stat-exempt .rk-performance-state-card__icon{
  background:rgba(108,117,125,.14);
  color:#495057;
}

.rk-performance-kpi{
  display:flex;
  align-items:flex-start;
  gap:.8rem;
  padding:.9rem;
  border:1px solid #e5e7eb;
  border-radius:15px;
  background:#fff;
  min-height:90px;
}

.rk-performance-kpi__icon{
  width:40px;
  height:40px;
  border-radius:12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  font-size:1rem;
}

.rk-performance-kpi__body{
  min-width:0;
  flex:1 1 auto;
}

.rk-performance-kpi__label{
  color:#475569;
  font-size:.8rem;
  font-weight:800;
}

.rk-performance-kpi__value{
  color:#0f172a;
  font-size:1.35rem;
  font-weight:950;
  line-height:1.1;
  margin-top:.1rem;
}

.rk-performance-kpi__detail{
  color:#64748b;
  font-size:.82rem;
  line-height:1.35;
  margin-top:.18rem;
}

.rk-kpi-info .rk-performance-kpi__icon{
  color:#0ea5e9;
  background:rgba(14,165,233,.14);
}

.rk-kpi-success .rk-performance-kpi__icon{
  color:#198754;
  background:rgba(25,135,84,.14);
}

.rk-kpi-review .rk-performance-kpi__icon{
  color:#2563eb;
  background:rgba(37,99,235,.14);
}

.rk-kpi-danger .rk-performance-kpi__icon{
  color:#dc3545;
  background:rgba(220,53,69,.14);
}

/* Informes de cumplimiento */
.rk-delivery-card{
  min-height:112px;
  padding:.9rem;
  border:1px solid #e5e7eb;
  border-radius:15px;
  background:#fff;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  gap:.2rem;
}

.rk-delivery-card__icon{
  width:36px;
  height:36px;
  border-radius:11px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-bottom:.15rem;
}

.rk-delivery-card strong{
  color:#0f172a;
  font-size:1.35rem;
  font-weight:950;
  line-height:1;
}

.rk-delivery-card > span:last-child{
  color:#475569;
  font-size:.8rem;
  font-weight:800;
  line-height:1.25;
}

.rk-delivery-on-time .rk-delivery-card__icon{color:#198754;background:rgba(25,135,84,.14)}
.rk-delivery-late .rk-delivery-card__icon{color:#c26401;background:rgba(254,124,2,.15)}
.rk-delivery-pending .rk-delivery-card__icon{color:#2563eb;background:rgba(37,99,235,.14)}
.rk-delivery-overdue .rk-delivery-card__icon{color:#dc3545;background:rgba(220,53,69,.14)}

.rk-report-dimension-list{
  display:flex;
  flex-direction:column;
  gap:.7rem;
}

.rk-report-dimension{
  display:flex;
  align-items:center;
  gap:.8rem;
  padding:.8rem;
  border:1px solid #e5e7eb;
  border-radius:14px;
  background:#fff;
}

.rk-report-dimension__icon{
  width:40px;
  height:40px;
  border-radius:12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  color:#2563eb;
  background:rgba(37,99,235,.12);
}

.rk-report-dimension__body{
  min-width:0;
  flex:1 1 auto;
}

.rk-report-dimension__body strong,
.rk-report-dimension__body small{
  display:block;
}

.rk-report-dimension__body strong{color:#0f172a;font-size:.88rem;font-weight:800}
.rk-report-dimension__body small{color:#64748b;font-size:.78rem;margin-top:.1rem}
.rk-report-dimension__value{color:#0f172a;font-size:1.05rem;font-weight:900;white-space:nowrap}

.rk-review-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:.75rem;
}

.rk-review-grid > div{
  min-height:88px;
  padding:.85rem;
  border:1px solid #e5e7eb;
  border-radius:14px;
  background:#fff;
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.rk-review-grid strong{color:#0f172a;font-size:1.25rem;font-weight:950;line-height:1}
.rk-review-grid span{color:#64748b;font-size:.78rem;font-weight:700;margin-top:.3rem;line-height:1.25}

.rk-report-type-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.75rem}
.rk-report-type-option{cursor:pointer;min-width:0}
.rk-report-type-option>input{position:absolute;opacity:0;pointer-events:none}
.rk-report-type-option__content{display:flex;align-items:center;gap:.75rem;min-height:76px;padding:.85rem 1rem;border:1px solid #dbe3ed;border-radius:14px;background:#fff;color:#334155;transition:border-color .15s ease,box-shadow .15s ease,background .15s ease}
.rk-report-type-option__content>i{display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;border-radius:11px;background:#eef6ff;color:#0f6fbd;font-size:1.05rem}
.rk-report-type-option__content strong,.rk-report-type-option__content small{display:block}
.rk-report-type-option__content strong{color:#17324d}
.rk-report-type-option__content small{margin-top:.15rem;color:#64748b;line-height:1.25}
.rk-report-type-option>input:checked+.rk-report-type-option__content{border-color:#1687d9;background:#f5faff;box-shadow:0 0 0 3px rgba(22,135,217,.12)}
.rk-report-type-option>input:focus-visible+.rk-report-type-option__content{outline:3px solid rgba(22,135,217,.2);outline-offset:2px}
@media (max-width:991.98px){.rk-report-type-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:575.98px){.rk-report-type-grid{grid-template-columns:1fr}.rk-report-type-option__content{min-height:66px}}

@media (max-width:575.98px){
  .rk-delivery-card{min-height:104px;padding:.75rem}
  .rk-report-dimension{align-items:flex-start}
}

@media (max-width:991.98px){
  .rk-progress-focus__value{
    font-size:2rem;
  }

  .rk-performance-state-card{
    min-height:96px;
  }

  .rk-chart-wrap,
  .rk-chart-empty{
    min-height:270px;
  }

  .rk-chart-wrap canvas{
    min-height:270px !important;
  }
}

/* Listados */
.rk-list-simple{
  display:flex;
  flex-direction:column;
  gap:.8rem;
}
.rk-list-item{
  display:flex;
  gap:.8rem;
  align-items:flex-start;
  padding:.8rem;
  border:1px solid rgba(15,23,42,.08);
  border-radius:14px;
  background:#fff;
}
.rk-list-icon{
  width:40px;
  height:40px;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1rem;
  flex:0 0 auto;
}
.rk-list-content{
  min-width:0;
  flex:1 1 auto;
}
.rk-list-title{
  font-weight:800;
  color:#0f172a;
  line-height:1.2;
}
.rk-list-meta{
  color:#667085;
  font-size:.86rem;
  margin-top:.15rem;
}
.rk-list-date{
  color:#667085;
  font-size:.8rem;
  text-align:right;
  white-space:nowrap;
}

/* Atención inmediata del Dashboard */
.rk-attention-card{
  border:1px solid rgba(15,23,42,.08);
}
.rk-attention-list{
  display:flex;
  flex-direction:column;
  gap:.85rem;
}
.rk-attention-item{
  display:flex;
  align-items:flex-start;
  gap:.85rem;
  padding:.95rem;
  border:1px solid #e5e7eb;
  border-left:4px solid #94a3b8;
  border-radius:16px;
  background:#fff;
}
.rk-attention-item--danger{ border-left-color:#dc3545; }
.rk-attention-item--warning{ border-left-color:#f59e0b; }
.rk-attention-item--info{ border-left-color:#0ea5e9; }
.rk-attention-item--secondary{ border-left-color:#64748b; }
.rk-attention-item__icon{
  width:42px;
  height:42px;
  border-radius:13px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  font-size:1.05rem;
  background:#f8fafc;
  color:#475569;
}
.rk-attention-item--danger .rk-attention-item__icon{
  background:rgba(220,53,69,.14);
  color:#dc3545;
}
.rk-attention-item--warning .rk-attention-item__icon{
  background:rgba(245,158,11,.14);
  color:#b45309;
}
.rk-attention-item--info .rk-attention-item__icon{
  background:rgba(14,165,233,.14);
  color:#0284c7;
}
.rk-attention-item__body{
  min-width:0;
  flex:1 1 auto;
}
.rk-attention-item__tag{
  display:inline-flex;
  align-items:center;
  min-height:22px;
  padding:.25rem .58rem;
  border-radius:999px;
  background:#f8fafc;
  color:#334155;
  border:1px solid #e2e8f0;
  font-size:.74rem;
  font-weight:900;
}
.rk-attention-item__title{
  font-size:.96rem;
  font-weight:900;
  color:#0f172a;
  line-height:1.3;
}
.rk-attention-item__meta{
  display:flex;
  flex-wrap:wrap;
  gap:.35rem 1rem;
  color:#64748b;
  font-size:.84rem;
  margin-top:.28rem;
}
.rk-attention-item__actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex:0 0 auto;
}
.rk-attention-empty{
  display:flex;
  align-items:center;
  gap:.85rem;
  padding:1rem;
  border:1px dashed #cbd5e1;
  border-radius:16px;
  background:#f8fafc;
  color:#475569;
}
.rk-attention-empty i{
  color:#198754;
  font-size:1.45rem;
}
.rk-attention-empty strong,
.rk-attention-empty span{
  display:block;
}
.rk-attention-empty strong{
  color:#0f172a;
  font-weight:900;
}
@media (max-width:767.98px){
  .rk-attention-item{
    flex-wrap:wrap;
  }
  .rk-attention-item__actions{
    width:100%;
    justify-content:flex-start;
    padding-left:3.55rem;
  }
}

/* Últimas actividades */
.rk-dashboard-last-row{
  cursor:pointer;
}
.rk-dashboard-last-row:hover td{
  background: rgba(37,99,235,.06);
}

/* Calendario dashboard */
.rk-dashboard-calendar__head{
  display:grid;
  grid-template-columns:repeat(7, minmax(0, 1fr));
  gap:8px;
  margin-bottom:8px;
}
.rk-dashboard-calendar__head > div{
  background:#f8fafc;
  border:1px solid #e5e7eb;
  border-radius:10px;
  text-align:center;
  padding:.6rem .4rem;
  font-weight:800;
  font-size:.82rem;
  color:#475467;
}

.rk-dashboard-calendar__grid{
  display:grid;
  grid-template-columns:repeat(7, minmax(0, 1fr));
  gap:8px;
}

.rk-dashboard-day{
  min-height:150px;
  border:1px solid #e6edf5;
  border-radius:14px;
  background:#fff;
  padding:.6rem;
  display:flex;
  flex-direction:column;
}
.rk-dashboard-day--out{
  background:#f8fafc;
  opacity:.65;
}
.rk-dashboard-day--today{
  border-color:#3DAA53;
  box-shadow:0 0 0 2px rgba(61,170,83,.12);
}

.rk-dashboard-day__number{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  border-radius:999px;
  text-decoration:none;
  font-weight:900;
  font-size:.95rem;
  color:#0f172a;
  margin-bottom:.45rem;
}
.rk-dashboard-day__number:hover{
  background:#eef6ff;
  color:#2563EB;
}

.rk-dashboard-day__events{
  display:flex;
  flex-direction:column;
  gap:.35rem;
  min-width:0;
}

.rk-dashboard-event{
  display:flex;
  align-items:center;
  gap:.38rem;
  text-decoration:none;
  padding:.34rem .45rem;
  border-radius:10px;
  font-size:.76rem;
  line-height:1.2;
  border:1px solid transparent;
}
.rk-dashboard-event:hover{
  opacity:.92;
}
.rk-dashboard-event__text{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.rk-dashboard-event__dot{
  width:8px;
  height:8px;
  border-radius:50%;
  flex:0 0 auto;
  background:currentColor;
}

.rk-dashboard-event--pendiente{
  background:rgba(254,124,2,.12);
  color:#b45309;
  border-color:rgba(254,124,2,.18);
}
.rk-dashboard-event--en_revision{
  background:rgba(13,202,240,.12);
  color:#0f766e;
  border-color:rgba(13,202,240,.18);
}
.rk-dashboard-event--aprobado{
  background:rgba(25,135,84,.12);
  color:#166534;
  border-color:rgba(25,135,84,.18);
}
.rk-dashboard-event--rechazado{
  background:rgba(220,53,69,.12);
  color:#b91c1c;
  border-color:rgba(220,53,69,.18);
}
.rk-dashboard-event--eximida{
  background:rgba(108,117,125,.12);
  color:#495057;
  border-color:rgba(108,117,125,.18);
}

.rk-dashboard-day__more{
  border:0;
  background:transparent;
  color:#2563EB;
  font-weight:800;
  font-size:.78rem;
  text-align:left;
  padding:.15rem .1rem 0;
}
.rk-dashboard-day__more:hover{
  color:#1d4ed8;
}

.rk-dashboard-day__empty{
  color:#98a2b3;
  font-size:.8rem;
  text-decoration:none;
}

.rk-dashboard-modal-list{
  display:flex;
  flex-direction:column;
  gap:.7rem;
}
.rk-dashboard-modal-item{
  display:block;
  text-decoration:none;
  border:1px solid rgba(15,23,42,.08);
  border-radius:12px;
  padding:.8rem .9rem;
  background:#fff;
}
.rk-dashboard-modal-item:hover{
  background:#f8fbff;
  border-color:#cfe2ff;
}
.rk-dashboard-modal-item__title{
  font-weight:800;
  color:#0f172a;
}
.rk-dashboard-modal-item__meta{
  color:#667085;
  font-size:.86rem;
  margin-top:.15rem;
}

/* Dashboard colapsable móvil */
.rk-collapse-header{
  background:#fff;
  border-bottom:1px solid rgba(15,23,42,.06);
  padding:.35rem .75rem;
  border-top-left-radius:16px;
  border-top-right-radius:16px;
}

.rk-collapse-btn{
  width:100%;
  border:0;
  background:transparent;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
  text-align:left;
  padding:.45rem 0;
  color:#0f172a;
  font-weight:700;
}

.rk-collapse-btn small{
  font-weight:500;
}

.rk-collapse-btn i{
  transition:transform .18s ease;
  color:#64748b;
}

.rk-collapse-btn[aria-expanded="true"] i{
  transform:rotate(180deg);
}

@media (max-width: 1199.98px){
  .rk-dashboard-calendar{
    overflow:hidden;
  }

  .rk-dashboard-calendar__head{
    display:none;
  }

  .rk-dashboard-calendar__grid{
    grid-template-columns:1fr;
  }

  .rk-dashboard-day{
    min-height:auto;
  }

  .rk-dashboard-day__number{
    width:auto;
    height:auto;
    justify-content:flex-start;
    margin-bottom:.55rem;
    font-size:1rem;
  }
}

@media (max-width: 991.98px){
  .rk-list-item{
    flex-wrap:wrap;
  }

  .rk-list-date{
    width:100%;
    text-align:left;
    padding-left:48px;
  }
}

/* =========================
   EJECUCIONES / SEGUIMIENTO
========================= */
.resumen-card{border:1px solid rgba(15,23,42,.08);border-radius:16px;cursor:pointer;transition:.18s ease}
.resumen-card:hover{transform:translateY(-2px);box-shadow:0 .5rem 1.2rem rgba(15,23,42,.08)}
.resumen-card.active{outline:2px solid rgba(15,23,42,.12);transform:translateY(-1px)}
.resumen-label{font-weight:700;letter-spacing:.01em}
.resumen-pendiente{background:linear-gradient(180deg,#fff8e1 0%,#fff3cd 100%);border-color:#f4d47c}.resumen-pendiente .fs-4{color:#b58105}
.resumen-revision{background:linear-gradient(180deg,#e8f4fd 0%,#d8ecfb 100%);border-color:#8fc7ef}.resumen-revision .fs-4{color:#0c63a8}
.resumen-aprobado{background:linear-gradient(180deg,#e8f7ec 0%,#dff3e5 100%);border-color:#9fd0ac}.resumen-aprobado .fs-4{color:#2f8f46}
.resumen-rechazado{background:linear-gradient(180deg,#fdeaea 0%,#f9d7d7 100%);border-color:#e7aaaa}.resumen-rechazado .fs-4{color:#b42318}
.resumen-vencido{background:linear-gradient(180deg,#fff0f0 0%,#ffdede 100%);border-color:#ee9b9b}.resumen-vencido .fs-4{color:#c62828}
.resumen-eximida{background:linear-gradient(180deg,#f3f4f6 0%,#e5e7eb 100%);border-color:#cbd5e1;
}

.resumen-eximida .fs-4{
  color:#475569;
}
.resumen-total{background:linear-gradient(180deg,#f4f6f8 0%,#eceff3 100%);border-color:#cfd6df}.resumen-total .fs-4{color:#334155}

.badge-estado{display:inline-flex;align-items:center;justify-content:center;gap:.25rem;min-height:20px;padding:.30rem .58rem;border-radius:999px;font-size:11px;font-weight:800;line-height:1;letter-spacing:.01em;white-space:nowrap;vertical-align:middle;border:1px solid transparent}
.badge-pendiente{background:#fff3cd;color:#8a6d03;border-color:#f2d98d}
.badge-revision{background:#d9edf7;color:#0b5f87;border-color:#9fd0e7}
.badge-aprobado{background:#d1e7dd;color:#216e39;border-color:#a9d1bb}
.badge-rechazado{background:#f8d7da;color:#a61d2d;border-color:#e6aab1}
.badge-vencido{background:#f5c2c7;color:#842029;border-color:#e59aa3}
.badge-eximida{background:#e2e3e5;color:#495057;border-color:#cfd2d6}
.badge-repositorio{background:rgba(37,99,235,.90);color:#fff;border-color:rgba(37,99,235,.18)}
.badge-apunta,.badge-indexada{background:rgba(245,158,11,.18);color:#92400e;border-color:rgba(245,158,11,.22)}
.badge-relacion{background:#eff6ff;color:#1d4ed8;border-color:#bfdbfe}
.badge-catalogo{background:#f0fdf4;color:#166534;border-color:#bbf7d0}

.day-item-pendiente{border-left:4px solid #d4a017 !important}
.day-item-en_revision{border-left:4px solid #0ea5e9 !important}
.day-item-aprobado{border-left:4px solid #22c55e !important}
.day-item-rechazado{border-left:4px solid #ef4444 !important}
.day-item-vencido{border-left:4px solid #b91c1c !important}
.day-item-eximida{border-left:4px solid #6b7280 !important}

.exec-name{font-weight:700}
.exec-structure,.exec-meta{font-size:.85rem;color:rgba(15,23,42,.62)}

.fc .fc-toolbar-title{font-size:1.15rem;font-weight:800}
.fc .fc-daygrid-event{border-radius:8px;padding:2px 4px;font-size:.74rem;font-weight:700}
.fc .fc-daygrid-more-link{display:inline-flex;align-items:center;min-height:24px;padding:2px 8px;border:1px solid #bfdbfe;border-radius:8px;background:#eff6ff;color:var(--blue);font-size:.78rem;font-weight:700;text-decoration:none}
.fc .fc-daygrid-more-link:hover,.fc .fc-daygrid-more-link:focus-visible{background:#dbeafe;color:var(--blue-hover)}
.fc-event-pendiente{background:#facc15 !important;border-color:#eab308 !important;color:#111827 !important}
.fc-event-en_revision{background:#38bdf8 !important;border-color:#0ea5e9 !important;color:#082f49 !important}
.fc-event-aprobado{background:#4ade80 !important;border-color:#22c55e !important;color:#052e16 !important}
.fc-event-rechazado{background:#f87171 !important;border-color:#ef4444 !important;color:#450a0a !important}
.fc-event-vencido{background:#dc2626 !important;border-color:#b91c1c !important;color:#fff !important}
.fc-event-eximida{background:#9ca3af !important;border-color:#6b7280 !important;color:#111827 !important}

@media (max-width: 767.98px){
  .tabla-ejecuciones thead{
    display:none;
  }

  .tabla-ejecuciones tbody,
  .tabla-ejecuciones tr,
  .tabla-ejecuciones td{
    display:block;
    width:100%;
  }

  .tabla-ejecuciones tbody tr{
    border:1px solid rgba(15,23,42,.08);
    border-radius:14px;
    background:#fff;
    margin-bottom:12px;
    padding:10px 12px;
    box-shadow:0 .2rem .6rem rgba(15,23,42,.04);
  }

  .tabla-ejecuciones tbody td{
    border:0 !important;
    padding:7px 0 !important;
    text-align:left !important;
  }

  .tabla-ejecuciones tbody td[data-label]::before{
    content:attr(data-label);
    display:block;
    font-size:.78rem;
    font-weight:800;
    color:#64748b;
    text-transform:uppercase;
    letter-spacing:.03em;
    margin-bottom:3px;
  }

  .tabla-ejecuciones tbody td:last-child{
    padding-top:10px !important;
  }

  .tabla-ejecuciones .btn{
    width:100%;
  }
}

/* =========================
   DASHBOARD COLLAPSABLE MÓVIL
========================= */
.rk-collapse-header{
  background:#fff;
  border-bottom:1px solid rgba(15,23,42,.06);
  padding:.35rem .75rem;
  border-top-left-radius:16px;
  border-top-right-radius:16px;
}

.rk-collapse-btn{
  width:100%;
  border:0;
  background:transparent;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
  text-align:left;
  padding:.45rem 0;
  color:#0f172a;
  font-weight:700;
}

.rk-collapse-btn small{
  font-weight:500;
}

.rk-collapse-btn i{
  transition:transform .18s ease;
  color:#64748b;
}

.rk-collapse-btn[aria-expanded="true"] i{
  transform:rotate(180deg);
}

@media (max-width: 1199.98px){
  .rk-dashboard-calendar{
    overflow:hidden;
  }

  .rk-dashboard-calendar__head{
    display:none;
  }

  .rk-dashboard-calendar__grid{
    grid-template-columns:1fr;
  }

  .rk-dashboard-day{
    min-height:auto;
  }

  .rk-dashboard-day__number{
    width:auto;
    height:auto;
    justify-content:flex-start;
    margin-bottom:.55rem;
    font-size:1rem;
  }
}

/* =========================
   PERFIL - AVATAR Y CROP
========================= */

.profile-avatar-wrap{
  position:relative;
  width:120px;
  height:120px;
  margin:0 auto 14px;
}

.profile-avatar-editable{
  cursor:pointer;
}

.profile-avatar,
.profile-avatar-placeholder{
  width:120px;
  height:120px;
  border-radius:50%;
  overflow:hidden;
  border:4px solid #fff;
  box-shadow:0 8px 24px rgba(15,23,42,.12);
}

.profile-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.profile-avatar-placeholder{
  display:flex;
  align-items:center;
  justify-content:center;
  background:#e9f7ec;
  font-size:42px;
  font-weight:700;
  color:#3DAA53;
}

.profile-avatar-placeholder-empty{
  background:#eef2f7;
  color:#98a2b3;
  font-size:48px;
  font-weight:400;
}

.profile-avatar-overlay{
  position:absolute;
  inset:0;
  border-radius:50%;
  background:rgba(15,23,42,.52);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:.65rem;
  opacity:0;
  transition:opacity .18s ease;
}

.profile-avatar-editable:hover .profile-avatar-overlay,
.profile-avatar-editable:focus .profile-avatar-overlay{
  opacity:1;
}

.profile-avatar-overlay__inner{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:.2rem;
  font-size:.78rem;
  font-weight:700;
  line-height:1.2;
}

.profile-avatar-overlay__inner i{
  font-size:1rem;
}

.profile-avatar-actions{
  display:flex;
  justify-content:center;
  gap:.5rem;
  flex-wrap:wrap;
}

.profile-photo-input{
  display:none;
}

.cropper-preview-box{
  width:120px;
  height:120px;
  border-radius:50%;
  overflow:hidden;
  margin:0 auto;
  border:1px solid rgba(15,23,42,.08);
  background:#f8fafc;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.6);
}

.cropper-preview-box--modal{
  width:140px;
  height:140px;
}

.profile-help{
  font-size:12px;
  color:#6b7280;
}

.profile-crop-stage{
  width:100%;
  max-width:420px;
  height:320px;
  border:1px solid rgba(15,23,42,.08);
  border-radius:14px;
  background:#f8fafc;
  overflow:hidden;
  position:relative;
}

.profile-crop-stage--modal{
  max-width:100%;
  height:420px;
}

.profile-crop-stage img{
  max-width:100%;
  display:block;
}

.profile-crop-empty{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:1rem;
  color:#6b7280;
  font-size:.92rem;
}

@media (max-width: 767.98px){
  .profile-crop-stage{
    max-width:100%;
    height:260px;
  }

  .profile-crop-stage--modal{
    height:300px;
  }
}

/* ===== Topbar Avatar ===== */
.topbar-avatar{
  width:32px;
  height:32px;
  border-radius:50%;
  object-fit:cover;
  object-position:center;
  border:2px solid rgba(255,255,255,.85);
  display:block;
  flex:0 0 32px;
  background:#fff;
}

.topbar-avatar-placeholder{
  width:32px;
  height:32px;
  border-radius:50%;
  background:#e2e8f0;
  color:#334155;
  font-weight:800;
  font-size:13px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:2px solid rgba(255,255,255,.85);
  flex:0 0 32px;
  text-transform:uppercase;
}

.topbar-user-name--title{
  font-weight:800;
}


/* =========================
   USUARIOS - FORM PERFIL
========================= */
.profile-meta-item{
  padding:.7rem .8rem;
  border:1px solid rgba(15,23,42,.08);
  border-radius:12px;
  background:#fff;
}

.profile-meta-item .label{
  font-size:12px;
  color:#667085;
  margin-bottom:2px;
}

.profile-meta-item .value{
  font-weight:700;
  color:#0f172a;
  line-height:1.25;
}

.profile-disabled-note{
  font-size:13px;
  color:#667085;
  margin-top:8px;
}

.password-group{
  display:flex;
  align-items:stretch;
  border:1px solid #d0d5dd;
  border-radius:10px;
  background:#fff;
  overflow:hidden;
}

.password-group:focus-within{
  border-color:rgba(61,170,83,.45);
  box-shadow:0 0 0 .2rem rgba(61,170,83,.12);
}

.password-group.is-invalid{
  border-color:#dc3545;
  box-shadow:0 0 0 .2rem rgba(220,53,69,.10);
}

.password-group.is-valid{
  border-color:#198754;
  box-shadow:0 0 0 .2rem rgba(25,135,84,.10);
}

.password-group input{
  border:none !important;
  box-shadow:none !important;
  border-radius:0 !important;
  flex:1 1 auto;
  padding:12px 14px;
}

.password-group .btn{
  border:none;
  border-left:1px solid #d0d5dd;
  border-radius:0;
  min-width:50px;
  background:#fff;
  color:#667085;
}

.password-group .btn:hover{
  background:#f8fafc;
  color:#0f172a;
}

.password-help{
  font-size:13px;
  color:#667085;
  margin-top:6px;
}

.rk-password-meter{
  margin-top:10px;
}

.rk-password-meter-bar{
  width:100%;
  height:8px;
  background:#e5e7eb;
  border-radius:999px;
  overflow:hidden;
}

.rk-password-meter-fill{
  height:100%;
  width:0%;
  transition:all .25s ease;
  border-radius:999px;
}

.rk-password-meter-text{
  margin-top:6px;
  font-size:13px;
  font-weight:600;
  color:#667085;
}

.rk-password-tip{
  font-size:12px;
  color:#667085;
  margin-top:6px;
}

.rk-copy-ok{
  font-size:12px;
  color:#198754;
  margin-top:6px;
  display:none;
}

.rk-match-text{
  margin-top:8px;
  font-size:13px;
  font-weight:600;
  min-height:18px;
}

.rk-match-ok{ color:#198754; }
.rk-match-bad{ color:#dc3545; }
.rk-match-neutral{ color:#667085; }

.company-summary-list{
  display:flex;
  flex-direction:column;
  gap:.35rem;
  max-height:180px;
  overflow:auto;
}

.company-summary-item{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:.5rem;
  padding:.5rem .65rem;
  border:1px solid rgba(15,23,42,.08);
  border-radius:10px;
  background:#fff;
}

.empresa-search-list{
  max-height:300px;
  overflow:auto;
}

.empresa-option-btn{
  width:100%;
  border:0;
  background:#fff;
  padding:.72rem .85rem;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
  text-align:left;
  border-bottom:1px solid rgba(15,23,42,.06);
}

.empresa-option-btn:last-child{
  border-bottom:0;
}

.empresa-option-btn:hover{
  background:rgba(37,99,235,.05);
}

.empresa-option-btn.is-selected{
  background:rgba(61,170,83,.10);
  color:#2f7d3e;
}

.empresa-option-btn.is-hidden{
  display:none;
}

.empresa-selected-card{
  transition:.18s ease;
}

.empresa-selected-card.is-admin{
  border-color:rgba(61,170,83,.28) !important;
  box-shadow:inset 0 0 0 1px rgba(61,170,83,.08);
}

.btn:disabled,
.btn.disabled{
  opacity:.65;
  cursor:not-allowed;
  pointer-events:none;
}
/* =========================
   Usuarios - avatar listado
========================= */
.rk-user-avatar-sm{
  width:42px;
  height:42px;
  min-width:42px;
  border-radius:50%;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#e9f7ec;
  color:var(--primary);
  font-weight:800;
  font-size:.9rem;
  border:1px solid rgba(61,170,83,.18);
  box-shadow:0 4px 12px rgba(15,23,42,.06);
}

.rk-user-avatar-sm img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
/* =========================
   Usuarios - acciones desktop
========================= */
.rk-actions-col{
  width: 260px;
  white-space: nowrap;
}

.rk-actions-desktop{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.rk-actions-desktop .btn{
  white-space: nowrap;
}

@media (max-width: 767.98px){
  .rk-actions-col{
    width: auto;
    white-space: normal;
  }
}

/* =========================
   PROYECTOS / PROGRAMAS - ÁRBOL
   Agregar al final de app/assets/css/app.css
========================= */
.rk-program-tree,
.tree-list{
  list-style:none;
  margin:0;
  padding-left:0;
}

.rk-program-tree--children,
.tree-list .tree-list{
  margin-top:10px;
  margin-left:28px;
  padding-left:16px;
  border-left:2px dashed #dbe3ef;
}

.rk-program-node,
.tree-node{
  margin-bottom:10px;
}

.rk-program-card,
.node-card{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  padding:12px 14px;
  border:1px solid #dbe3ef;
  border-radius:14px;
  background:#fff;
  box-shadow:0 .25rem .8rem rgba(15,23,42,.035);
}

.rk-program-card__main,
.node-main{
  flex:1 1 auto;
  min-width:0;
}

.rk-program-card__head{
  display:flex;
  align-items:flex-start;
  gap:.65rem;
  min-width:0;
}

.rk-program-level-icon{
  width:30px;
  height:30px;
  border-radius:10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  background:rgba(37,99,235,.08);
  color:#2563eb;
}

.rk-program-card__title,
.node-title{
  font-weight:800;
  color:#0f172a;
  margin-bottom:4px;
  line-height:1.25;
}

.rk-program-card__desc,
.node-desc{
  color:rgba(15,23,42,.62);
  font-size:.88rem;
  line-height:1.35;
  margin-top:2px;
}

.rk-program-card__meta,
.node-meta{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:8px;
}

.rk-program-card__actions,
.node-actions{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  justify-content:flex-end;
  align-items:center;
  flex:0 0 auto;
}

.rk-program-empty{
  border:1px dashed #dbe3ef;
  border-radius:14px;
  background:#f8fafc;
}

@media (max-width: 767.98px){
  .rk-program-card,
  .node-card{
    flex-direction:column;
  }

  .rk-program-card__actions,
  .node-actions{
    width:100%;
    justify-content:flex-start;
  }

  .rk-program-tree--children,
  .tree-list .tree-list{
    margin-left:14px;
    padding-left:12px;
  }
}

/* =========================
   ÁREAS Y PROCESOS INTERNOS
========================= */
.rk-internal-tree > .rk-program-node:last-child,
.rk-internal-order-list > .rk-internal-order-area:last-child{
  margin-bottom:0;
}

.rk-internal-area-card,
.rk-internal-process-card{
  overflow:hidden;
}
.rk-internal-process-card .rk-program-card__actions-extra{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:6px;
}

.rk-internal-empty-process{
  margin:10px 0 14px 44px;
  padding:10px 14px;
  border:1px dashed #dbe3ef;
  border-radius:12px;
  background:#f8fafc;
}

.rk-internal-order-list{
  display:grid;
  gap:14px;
}

.rk-internal-order-area{
  border:1px solid #dbe3ef;
  border-radius:14px;
  padding:12px;
  background:#f8fafc;
}

.rk-internal-order-area__card{
  align-items:center;
  background:#fff;
}

.rk-internal-order-processes{
  display:grid;
  gap:8px;
  margin:10px 0 0 28px;
  padding-left:16px;
  border-left:2px dashed #dbe3ef;
}

.rk-internal-order-process{
  align-items:center;
  padding:10px 12px;
}

.rk-internal-drag{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#64748b;
  font-size:1.15rem;
  cursor:grab;
  touch-action:none;
}

.rk-internal-drag:active{
  cursor:grabbing;
}

.rk-internal-order-area.sortable-ghost,
.rk-internal-order-process.sortable-ghost{
  opacity:.45;
  background:#eaf2ff;
}

@media (max-width: 767.98px){
  .rk-internal-order-processes{
    margin-left:12px;
    padding-left:10px;
  }

  .rk-internal-order-process{
    flex-direction:row;
    flex-wrap:wrap;
  }

  .rk-internal-empty-process{
    margin-left:14px;
  }
}

/* =========================
   RK - Resumen reutilizable de proyecto
========================= */
.rk-project-summary{
  background:#f1fbf4;
  border-color:rgba(61,170,83,.18);
  box-shadow:0 .35rem 1.1rem rgba(61,170,83,.06);
}

.rk-project-summary .card-body{
  padding-top:1rem;
  padding-bottom:1rem;
}

.rk-project-summary__item{
  height:100%;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  gap:.24rem;
  min-width:0;
}

.rk-project-summary__label{
  font-size:.78rem;
  font-weight:800;
  color:rgba(15,23,42,.62);
  line-height:1.2;
}

.rk-project-summary__value{
  font-size:.94rem;
  font-weight:800;
  color:#0f172a;
  line-height:1.25;
  overflow-wrap:anywhere;
}

.rk-project-summary__sub{
  font-size:.82rem;
  font-weight:600;
  color:rgba(15,23,42,.58);
  line-height:1.25;
  overflow-wrap:anywhere;
}

.rk-project-summary__badge{
  margin-top:.08rem;
}

.badge-pill-info.rk-badge-programas{
  background:rgba(34,197,94,.14);
  color:#15803d;
  border-color:rgba(34,197,94,.20);
}

.badge-pill-info.rk-badge-actividades{
  background:rgba(96,165,250,.16);
  color:#1d4ed8;
  border-color:rgba(96,165,250,.22);
}

.rk-actions .btn.d-inline-flex{
  align-items:center;
  justify-content:center;
}

.sort-handle{
  cursor:grab;
}

@media (max-width: 767.98px){
  .rk-project-summary__item{
    gap:.18rem;
  }
}



/* =========================
   RK - Badges y ordenamiento de actividades
========================= */
.rk-freq-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.25rem;
  min-width:40px;
  min-height:20px;
  padding:.30rem .58rem;
  border-radius:999px;
  font-size:11px;
  font-weight:800;
  line-height:1;
  letter-spacing:.01em;
  white-space:nowrap;
  vertical-align:middle;
  border:1px solid transparent;
  box-shadow:inset 0 -1px 0 rgba(255,255,255,.18);
  background:#eef2ff;
  color:#3730a3;
  border-color:#c7d2fe;
}

.rk-freq-badge.sm{
  min-height:20px;
  padding:.30rem .58rem;
  font-size:11px;
}

.rk-freq-diaria{background:rgba(37,99,235,.12);color:#1d4ed8;border-color:rgba(37,99,235,.18);}
.rk-freq-semanal{background:rgba(6,182,212,.14);color:#0891b2;border-color:rgba(6,182,212,.18);}
.rk-freq-mensual{background:rgba(34,197,94,.14);color:#15803d;border-color:rgba(34,197,94,.18);}
.rk-freq-anual{background:rgba(245,158,11,.16);color:#b45309;border-color:rgba(245,158,11,.20);}
.rk-freq-unica{background:rgba(108,117,125,.14);color:#495057;border-color:rgba(108,117,125,.18);}
.rk-freq-eventual{background:rgba(168,85,247,.14);color:#7e22ce;border-color:rgba(168,85,247,.18);}
.rk-freq-default{background:#eef2ff;color:#3730a3;border-color:#c7d2fe;}

.badge-pill-info.estado-item{background:rgba(108,117,125,.14);color:#495057;border-color:rgba(108,117,125,.18);}
.badge-pill-info.rk-badge-recurrencia-acumular{background:rgba(37,99,235,.12);color:#1d4ed8;border-color:rgba(37,99,235,.18);}
.badge-pill-info.rk-badge-recurrencia-reemplazar{background:rgba(34,197,94,.14);color:#15803d;border-color:rgba(34,197,94,.18);}
.badge-pill-info.rk-badge-repositorio{background:rgba(37,99,235,.90);color:#fff;border-color:rgba(37,99,235,.18);}
.badge-pill-info.rk-badge-apunta{background:rgba(245,158,11,.18);color:#92400e;border-color:rgba(245,158,11,.22);}
.rk-repo-tooltip .tooltip-inner{max-width:360px;text-align:left;}


.rk-sortable-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.rk-sort-card{
  display:flex;
  gap:12px;
  align-items:flex-start;
  padding:12px 14px;
  border:1px solid #dbe3ef;
  border-radius:14px;
  background:#fff;
  box-shadow:0 .2rem .55rem rgba(15,23,42,.03);
}

.rk-sort-card.dragging{
  opacity:.55;
}

.rk-sort-card__handle{
  width:34px;
  min-width:34px;
  height:34px;
  border-radius:10px;
  border:1px solid #dbe3ef;
  background:#f8fafc;
  color:#64748b;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:grab;
}

.rk-sort-card__body{
  min-width:0;
  flex:1;
}

.rk-sort-card__title{
  font-weight:700;
  color:#0f172a;
  margin-bottom:4px;
}

.rk-sort-card__desc{
  font-size:.86rem;
  color:rgba(15,23,42,.62);
  margin-bottom:8px;
}

.rk-sort-card__meta{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:8px;
  align-items:center;
}

.rk-sort-card .badge-pill-info,
.rk-sort-card .rk-freq-badge,
.rk-sort-card .badge{
  font-size:11px;
}

@media (max-width: 768px){
  .rk-sort-card{
    align-items:flex-start;
  }

  .rk-sort-card__meta{
    gap:5px;
  }

  .rk-sort-card__handle{
    width:30px;
    min-width:30px;
    height:30px;
  }
}

/* =========================
   RK - Formularios por secciones
========================= */
.rk-form-section{
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-sm);
  background:#fff;
  overflow:hidden;
}

.rk-form-section + .rk-form-section{
  margin-top:1rem;
}

.rk-form-section__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:.75rem;
  padding:1rem 1.1rem .75rem;
  border-bottom:1px solid rgba(15,23,42,.06);
  background:#fff;
}

.rk-form-section__title{
  margin:0;
  font-size:.98rem;
  font-weight:800;
  color:#0f172a;
  line-height:1.2;
}

.rk-form-section__subtitle{
  margin-top:.15rem;
  font-size:.82rem;
  font-weight:600;
  color:rgba(15,23,42,.58);
}

.rk-form-section__body{
  padding:1rem 1.1rem 1.1rem;
}

@media (max-width: 767.98px){
  .rk-form-section__head,
  .rk-form-section__body{
    padding:.9rem;
  }
}



/* =========================
   RK - Calendario general
========================= */
.calendar-toolbar-card,
.calendar-card,
.calendar-summary-card{
  border:1px solid var(--border);
  border-radius:16px;
  box-shadow:var(--shadow-sm);
  background:#fff;
}

.calendar-toolbar-card .card-body,
.calendar-card .card-body,
.calendar-summary-card .card-body{
  padding:1rem;
}

#calendar{
  min-height:720px;
}

.fc .fc-toolbar.fc-header-toolbar{
  margin-bottom:1rem;
  gap:.75rem;
  flex-wrap:wrap;
}

.fc .fc-toolbar-title{
  font-size:1.15rem;
  font-weight:800;
  color:#0f172a;
}

.fc .fc-button{
  background:#fff;
  border:1px solid #dbe3ef;
  color:#0f172a;
  box-shadow:none !important;
  text-transform:capitalize;
  font-weight:700;
}

.fc .fc-button:hover{
  background:#f8fafc;
  border-color:#cbd5e1;
  color:#0f172a;
}

.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active{
  background:var(--blue);
  border-color:var(--blue);
  color:#fff;
}

.fc .fc-daygrid-day-number,
.fc .fc-col-header-cell-cushion,
.fc .fc-list-day-text,
.fc .fc-list-day-side-text{
  color:#0f172a;
  text-decoration:none;
  font-weight:600;
}

.fc .fc-day-today{
  background:rgba(37,99,235,.06) !important;
}

.fc .fc-event{
  border-radius:8px;
  border:none;
  padding:2px 4px;
  font-size:.78rem;
  font-weight:700;
  cursor:pointer;
}

.fc .fc-list-event:hover td{
  background:#f8fafc;
}

.calendar-legend{
  display:flex;
  flex-wrap:wrap;
  gap:.55rem;
}

.calendar-legend__item{
  display:inline-flex;
  align-items:center;
  gap:.45rem;
  padding:.4rem .65rem;
  border-radius:999px;
  background:#f8fafc;
  border:1px solid #e5e7eb;
  font-size:.82rem;
  font-weight:700;
  color:#334155;
}

.calendar-legend__dot{
  width:10px;
  height:10px;
  border-radius:50%;
  display:inline-block;
}

.calendar-legend__dot.is-pendiente{background:#f59e0b;}
.calendar-legend__dot.is-en-revision{background:#0ea5e9;}
.calendar-legend__dot.is-aprobado{background:#22c55e;}
.calendar-legend__dot.is-rechazado{background:#ef4444;}
.calendar-legend__dot.is-vencido{background:#b91c1c;}
.calendar-legend__dot.is-eximida{background:#6b7280;}

.summary-grid{
  display:grid;
  grid-template-columns:repeat(6, minmax(0, 1fr));
  gap:.75rem;
}

.summary-item{
  border:1px solid #e5e7eb;
  border-radius:14px;
  padding:.8rem;
  background:#fff;
}

.summary-item__label{
  font-size:.8rem;
  color:#64748b;
  font-weight:700;
}

.summary-item__value{
  font-size:1.2rem;
  font-weight:900;
  color:#0f172a;
  line-height:1.1;
  margin-top:.2rem;
}

.summary-item.pendiente{border-left:4px solid #f59e0b;}
.summary-item.en_revision{border-left:4px solid #0ea5e9;}
.summary-item.aprobado{border-left:4px solid #22c55e;}
.summary-item.rechazado{border-left:4px solid #ef4444;}
.summary-item.vencido{border-left:4px solid #b91c1c;}
.summary-item.eximida{border-left:4px solid #6b7280;}

.day-summary{
  display:flex;
  flex-wrap:wrap;
  gap:.5rem;
}

.day-summary .badge{
  font-size:.78rem;
  padding:.55em .75em;
  border-radius:999px;
}

.day-detail-date{
  font-weight:800;
  color:#0f172a;
}

@media (max-width: 991.98px){
  #calendar{
    min-height:620px;
  }

  .summary-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .fc .fc-toolbar-title{
    font-size:1rem;
  }
}

@media (max-width: 575.98px){
  .summary-grid{
    grid-template-columns:1fr;
  }

  .fc .fc-toolbar{
    flex-direction:column;
    align-items:stretch;
  }

  .fc .fc-toolbar-chunk{
    display:flex;
    justify-content:center;
  }
}

/* =========================
   Notificaciones / Centro de alertas
========================= */
.rk-notify-summary-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(190px, 1fr));
  gap:.85rem;
}

.rk-notify-summary-card{
  display:flex;
  align-items:center;
  gap:.8rem;
  min-height:92px;
  padding:1rem;
  border:1px solid var(--border);
  border-radius:16px;
  background:#fff;
  box-shadow:var(--shadow-sm);
  text-decoration:none;
  color:var(--text);
  transition:.18s ease;
}

.rk-notify-summary-card:hover,
.rk-notify-summary-card.active{
  transform:translateY(-2px);
  box-shadow:var(--shadow);
  border-color:rgba(37,99,235,.28);
  color:var(--text);
}

.rk-notify-summary-card__icon{
  width:46px;
  height:46px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:14px;
  font-size:1.2rem;
  flex:0 0 auto;
}

.rk-notify-summary-card__value{
  font-size:1.5rem;
  font-weight:900;
  line-height:1.1;
}

.rk-notify-summary-card__label{
  margin-top:.18rem;
  font-size:.84rem;
  font-weight:700;
  color:var(--muted);
}

.rk-notify-summary-card--total .rk-notify-summary-card__icon{
  background:rgba(37,99,235,.12);
  color:#2563eb;
}

.rk-notify-summary-card--danger .rk-notify-summary-card__icon,
.rk-notify-summary-card--danger-soft .rk-notify-summary-card__icon{
  background:rgba(220,53,69,.12);
  color:#dc3545;
}

.rk-notify-summary-card--warning .rk-notify-summary-card__icon{
  background:rgba(245,158,11,.16);
  color:#d97706;
}

.rk-notify-summary-card--info .rk-notify-summary-card__icon{
  background:rgba(14,165,233,.14);
  color:#0284c7;
}

.rk-notify-context,
.rk-notify-section{
  border-radius:16px;
}

.rk-notify-list{
  display:flex;
  flex-direction:column;
  gap:.8rem;
}

.rk-notify-item{
  display:grid;
  grid-template-columns:auto minmax(0, 1fr) auto;
  gap:.9rem;
  align-items:start;
  padding:1rem;
  border:1px solid #e5e7eb;
  border-left-width:4px;
  border-radius:15px;
  background:#fff;
}

.rk-notify-item--danger{
  border-left-color:#dc3545;
}

.rk-notify-item--warning{
  border-left-color:#f59e0b;
}

.rk-notify-item--info{
  border-left-color:#0ea5e9;
}

.rk-notify-item--secondary{
  border-left-color:#64748b;
}

.rk-notify-item__icon{
  width:42px;
  height:42px;
  border-radius:13px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#f8fafc;
  color:#0f172a;
  font-size:1.08rem;
}

.rk-notify-item--danger .rk-notify-item__icon{
  background:rgba(220,53,69,.12);
  color:#dc3545;
}

.rk-notify-item--warning .rk-notify-item__icon{
  background:rgba(245,158,11,.16);
  color:#d97706;
}

.rk-notify-item--info .rk-notify-item__icon{
  background:rgba(14,165,233,.14);
  color:#0284c7;
}

.rk-notify-item__body{
  min-width:0;
}

.rk-notify-item__kicker{
  display:inline-flex;
  align-items:center;
  min-height:22px;
  padding:.28rem .6rem;
  border-radius:999px;
  background:#f8fafc;
  border:1px solid #e5e7eb;
  color:#334155;
  font-size:.76rem;
  font-weight:800;
}

.rk-notify-item__title{
  font-size:1rem;
  font-weight:900;
  color:#0f172a;
  line-height:1.3;
}

.rk-notify-item__meta{
  display:flex;
  flex-wrap:wrap;
  gap:.35rem 1rem;
  color:#475569;
  font-size:.85rem;
}

.rk-notify-item__meta strong{
  color:#0f172a;
  font-weight:800;
}

.rk-notify-item__actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  min-width:122px;
}

.rk-notify-empty{
  display:flex;
  align-items:center;
  gap:.85rem;
  min-height:82px;
  padding:1rem;
  border:1px dashed #dbe3ef;
  border-radius:15px;
  background:#f8fafc;
}

.rk-notify-empty i{
  font-size:1.35rem;
  color:var(--primary);
}

@media (max-width:991.98px){
  .rk-notify-item{
    grid-template-columns:auto minmax(0, 1fr);
  }

  .rk-notify-item__actions{
    grid-column:1 / -1;
    justify-content:flex-start;
    min-width:0;
    padding-left:52px;
  }
}

@media (max-width:575.98px){
  .rk-notify-item{
    grid-template-columns:1fr;
  }

  .rk-notify-item__icon{
    width:40px;
    height:40px;
  }

  .rk-notify-item__actions{
    grid-column:auto;
    padding-left:0;
  }
}

/* =========================
   RK - Ejecuciones / Seguimiento ajustes de UI
========================= */
.rk-exec-filter-toggle{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
  width:100%;
  border:0;
  background:transparent;
  color:#0f172a;
  font-weight:800;
  padding:0;
  text-align:left;
}

.rk-exec-filter-toggle__right{
  display:inline-flex;
  align-items:center;
  gap:.45rem;
  color:#64748b;
  font-size:.86rem;
  font-weight:800;
}

.rk-exec-filter-toggle .bi-chevron-down{
  transition:transform .18s ease;
}

.rk-exec-filter-toggle[aria-expanded="true"] .bi-chevron-down{
  transform:rotate(180deg);
}

.rk-exec-summary-grid{
  grid-template-columns:repeat(7, minmax(0, 1fr));
}

.rk-exec-summary-grid .summary-item{
  cursor:pointer;
  transition:.18s ease;
  min-height:86px;
}

.rk-exec-summary-grid .summary-item:hover{
  transform:translateY(-2px);
  box-shadow:0 .6rem 1.2rem rgba(15,23,42,.08);
}

.rk-exec-summary-grid .summary-item.total{
  border-left:4px solid #64748b;
}

.rk-exec-summary-grid .summary-item.active{
  border-color:rgba(254,124,2,.50);
  box-shadow:0 .65rem 1.25rem rgba(254,124,2,.12);
  transform:translateY(-1px);
}

.rk-exec-summary-grid .summary-item__label{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.rk-exec-summary-grid .summary-item__value{
  font-size:1.25rem;
}

.rk-item-badge{
  min-width:26px;
  height:24px;
  padding:.22rem .45rem;
}

.rk-freq-inline-badge{
  background:rgba(37,99,235,.10);
  color:#1d4ed8;
  border-color:rgba(37,99,235,.18);
}

.rk-cell-vencimiento .rk-exec-date-stack{
  color:#0f172a;
  font-size:.85rem;
  line-height:1.35;
}

.rk-cell-vencimiento .rk-exec-date-stack strong{
  color:#0f172a;
  font-weight:800;
}

.rk-detail-alert-placeholder:empty{
  display:none;
}

.rk-detail-activity-header{
  border-bottom:1px solid rgba(15,23,42,.06) !important;
}

.rk-detail-activity-header.rk-detail-state-pendiente{
  background:#fff8e1;
}

.rk-detail-activity-header.rk-detail-state-en_revision{
  background:#e8f4fd;
}

.rk-detail-activity-header.rk-detail-state-aprobado{
  background:#e8f7ec;
}

.rk-detail-activity-header.rk-detail-state-rechazado{
  background:#fdeaea;
}

.rk-detail-activity-header.rk-detail-state-vencido{
  background:#fff0f0;
}

.rk-detail-activity-header.rk-detail-state-eximida{
  background:#f3f4f6;
}

#modalConfirmarAccionEjecucion,
#rkGlobalReviewConfirmModal{
  z-index:1070;
}

body.rk-confirming-review #modalGestion .modal-content,
body.rk-confirming-review #modalDia .modal-content,
body.rk-confirming-review #modalGestionEjecucionCalendario .modal-content,
body.rk-confirming-review #modalGestionEjecucionNotificaciones .modal-content,
body.rk-confirming-review .modal.show:not(#modalConfirmarAccionEjecucion):not(#rkGlobalReviewConfirmModal) .modal-content{
  filter:brightness(.72);
  transition:filter .12s ease;
}

@media (max-width:1199.98px){
  .rk-exec-summary-grid{
    grid-template-columns:repeat(auto-fit, minmax(112px, 1fr));
  }
}

@media (max-width:575.98px){
  .rk-exec-summary-grid{
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:.55rem;
  }

  .rk-exec-summary-grid .summary-item{
    min-height:76px;
    padding:.58rem .42rem;
  }

  .rk-exec-summary-grid .summary-item__label{
    font-size:.68rem;
  }

  .rk-exec-summary-grid .summary-item__value{
    font-size:1.05rem;
  }
}

@media (max-width:380px){
  .rk-exec-summary-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

@media (max-width:767.98px){
  .tabla-ejecuciones tbody tr{
    display:flex !important;
    flex-direction:column;
  }

  .tabla-ejecuciones tbody td.rk-cell-item,
  .tabla-ejecuciones tbody td.rk-cell-evidencias{
    display:none !important;
  }

  .tabla-ejecuciones tbody td.rk-cell-actividad{order:1;}
  .tabla-ejecuciones tbody td.rk-cell-vencimiento{order:2;}
  .tabla-ejecuciones tbody td.rk-cell-proyecto{order:3;}
  .tabla-ejecuciones tbody td.rk-cell-acciones{order:4;}

  .tabla-ejecuciones tbody td.rk-cell-actividad::before,
  .tabla-ejecuciones tbody td.rk-cell-vencimiento::before,
  .tabla-ejecuciones tbody td.rk-cell-proyecto::before,
  .tabla-ejecuciones tbody td.rk-cell-acciones::before{
    display:none !important;
    content:"" !important;
  }

  .tabla-ejecuciones tbody td.rk-cell-acciones .btn{
    margin-top:.35rem;
  }
}

/* FullCalendar dentro de Seguimiento de Actividades */
#calendar{
  min-height:720px;
}

.fc .fc-toolbar.fc-header-toolbar{
  margin-bottom:1rem;
  gap:.75rem;
  flex-wrap:wrap;
}

.fc .fc-toolbar-title{
  font-size:1.15rem;
  font-weight:800;
  color:#0f172a;
}

.fc .fc-button{
  background:#fff;
  border:1px solid #dbe3ef;
  color:#0f172a;
  box-shadow:none !important;
  text-transform:capitalize;
  font-weight:700;
}

.fc .fc-button:hover{
  background:#f8fafc;
  border-color:#cbd5e1;
  color:#0f172a;
}

.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active{
  background:var(--blue);
  border-color:var(--blue);
  color:#fff;
}

.fc .fc-daygrid-day-number,
.fc .fc-col-header-cell-cushion,
.fc .fc-list-day-text,
.fc .fc-list-day-side-text{
  color:#0f172a;
  text-decoration:none;
  font-weight:600;
}

.fc .fc-day-today{
  background:rgba(37,99,235,.06) !important;
}

.fc .fc-event{
  border-radius:8px;
  border:none;
  padding:2px 4px;
  font-size:.72rem;
  font-weight:700;
  cursor:pointer;
}

.fc .fc-list-event:hover td{
  background:#fff !important;
  color:#0f172a !important;
}

.fc .fc-list-event:hover .fc-list-event-title a,
.fc .fc-list-event:hover .fc-list-event-time,
.fc .fc-list-event:hover .fc-list-event-title{
  color:#0f172a !important;
}

@media (max-width:991.98px){
  #calendar{
    min-height:620px;
  }

  .fc .fc-toolbar-title{
    font-size:1rem;
  }
}

.rk-fc-event-title{
  font-size:11px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

/* =========================
   RK - Cargue de evidencias
========================= */
.rk-upload-wait-modal .modal-content{
  border:0;
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow);
}

.rk-upload-wait-modal__spinner{
  width:2.4rem;
  height:2.4rem;
}

.rk-upload-wait-modal__title{
  color:var(--text);
  font-weight:900;
}

.rk-upload-wait-modal__text{
  color:var(--muted);
  font-size:13px;
}

.rk-col-item{
  width:70px;
}

.rk-col-actions{
  width:180px;
}

/* =========================
   RK - Evidencias múltiples / visor en detalle
========================= */
.rk-evidence-groups{
  display:grid;
  gap:1rem;
}

.rk-evidence-group{
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  background:#fff;
  padding:.85rem;
}

.rk-evidence-group__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:.75rem;
  margin-bottom:.65rem;
}

.rk-evidence-group__version{
  font-weight:900;
  color:var(--text);
  letter-spacing:.02em;
}

.rk-evidence-group__comment{
  border-left:3px solid rgba(37,99,235,.18);
  background:rgba(37,99,235,.04);
  border-radius:10px;
  color:#334155;
  font-size:.86rem;
  margin-bottom:.75rem;
  padding:.55rem .7rem;
}

.rk-evidence-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(150px, 1fr));
  gap:.75rem;
}

.rk-evidence-card{
  border:1px solid rgba(15,23,42,.08);
  border-radius:14px;
  background:#fff;
  overflow:hidden;
  min-width:0;
}

.rk-evidence-card__preview{
  background:#f8fafc;
  border-bottom:1px solid rgba(15,23,42,.06);
  min-height:110px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.rk-evidence-thumb-btn{
  border:0;
  padding:0;
  background:transparent;
  width:100%;
  height:118px;
  cursor:pointer;
}

.rk-evidence-thumb-btn img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.rk-evidence-video-btn{
  border:0;
  padding:0;
  background:#0f172a;
  color:#fff;
  width:100%;
  min-height:118px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:.35rem;
  cursor:pointer;
}

.rk-evidence-video-btn .bi{
  font-size:2.6rem;
  line-height:1;
}

.rk-evidence-video-btn span{
  color:#e2e8f0;
  font-size:.72rem;
  font-weight:900;
}

.rk-evidence-file-icon{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:.35rem;
  color:#475569;
  min-height:118px;
}

.rk-evidence-file-icon .bi{
  font-size:2.25rem;
}

.rk-evidence-file-icon span{
  font-weight:900;
  font-size:.72rem;
  color:#64748b;
}

.rk-evidence-card__body{
  padding:.7rem;
}

.rk-evidence-card__name{
  color:var(--text);
  font-weight:800;
  font-size:.83rem;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.rk-evidence-card__meta,
.rk-evidence-card__obs{
  color:var(--muted);
  font-size:.76rem;
  margin-top:.25rem;
}

.rk-evidence-card__obs{
  color:#475569;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.rk-evidence-card__actions{
  display:flex;
  flex-wrap:wrap;
  gap:.4rem;
  margin-top:.6rem;
}

.rk-evidence-preview-panel{
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  background:#fff;
  box-shadow:var(--shadow-sm);
  margin-bottom:1rem;
  overflow:hidden;
}

.rk-evidence-preview-panel__toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
  border-bottom:1px solid rgba(15,23,42,.07);
  padding:.75rem;
}

.rk-evidence-preview-panel__title{
  flex:1;
  min-width:0;
  color:var(--text);
  font-weight:900;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.rk-evidence-preview-panel__actions{
  display:flex;
  align-items:center;
  gap:.35rem;
}

.rk-evidence-preview-panel__body{
  background:#0f172a;
  min-height:320px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:1rem;
}

.rk-evidence-preview-panel__body img,
.rk-evidence-preview-panel__body video{
  max-width:100%;
  max-height:70vh;
  object-fit:contain;
  border-radius:12px;
  background:#000;
}

.rk-evidence-preview-panel__body img{
  background:#fff;
}

@media (max-width:575.98px){
  .rk-evidence-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:.55rem;
  }

  .rk-evidence-card__preview,
  .rk-evidence-thumb-btn,
  .rk-evidence-video-btn,
  .rk-evidence-file-icon{
    min-height:96px;
    height:96px;
  }

  .rk-evidence-preview-panel__toolbar{
    flex-direction:column;
    align-items:stretch;
  }

  .rk-evidence-preview-panel__actions{
    justify-content:space-between;
  }
}

/* =========================
   RK - Ajustes UX evidencias / detalle v12
========================= */
body.rk-upload-modal-active .modal-backdrop.show{
  opacity:.78 !important;
  backdrop-filter:blur(2px);
}

.rk-upload-wait-modal{
  z-index:1090;
}

.rk-upload-wait-modal .modal-content{
  border:0;
  border-radius:20px;
  box-shadow:0 1.4rem 3rem rgba(15,23,42,.28);
  overflow:hidden;
}

.rk-upload-wait-modal .modal-body{
  min-height:190px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
}

.rk-upload-wait-modal__icon{
  min-height:58px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.rk-upload-loader{
  position:relative;
  width:70px;
  height:70px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.rk-upload-loader::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:999px;
  background:rgba(61,170,83,.12);
  animation:rk-upload-pulse 1.15s ease-in-out infinite;
}

.rk-upload-loader span{
  position:absolute;
  bottom:-12px;
  width:6px;
  height:6px;
  border-radius:999px;
  background:var(--primary);
  animation:rk-upload-dot 1.1s ease-in-out infinite;
}

.rk-upload-loader span:nth-child(2){left:23px;animation-delay:.05s;}
.rk-upload-loader span:nth-child(3){left:32px;animation-delay:.18s;}
.rk-upload-loader span:nth-child(4){left:41px;animation-delay:.31s;}

.rk-upload-wait-modal__spinner{
  position:relative;
  z-index:1;
  width:2.7rem;
  height:2.7rem;
  color:var(--primary);
}

.rk-upload-status-icon{
  width:66px;
  height:66px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:2rem;
  animation:rk-upload-pop .25s ease-out both;
}

.rk-upload-status-icon--success{
  background:rgba(34,197,94,.16);
  color:#15803d;
  border:1px solid rgba(34,197,94,.28);
}

.rk-upload-status-icon--error{
  background:rgba(220,53,69,.14);
  color:#dc3545;
  border:1px solid rgba(220,53,69,.26);
}

@keyframes rk-upload-pulse{
  0%,100%{transform:scale(.88);opacity:.58;}
  50%{transform:scale(1.08);opacity:1;}
}

@keyframes rk-upload-dot{
  0%,100%{transform:translateY(0);opacity:.4;}
  50%{transform:translateY(-5px);opacity:1;}
}

@keyframes rk-upload-pop{
  from{transform:scale(.76);opacity:.2;}
  to{transform:scale(1);opacity:1;}
}

/* Detalle: trazabilidad compacta separada de evidencias */
.rk-trace-section-title{
  display:flex;
  align-items:center;
  gap:.45rem;
  color:#334155;
  font-size:.82rem;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.04em;
  margin-bottom:.65rem;
}

.rk-trace-section-title i{
  color:var(--blue);
}

.rk-trace-list{
  display:flex;
  flex-direction:column;
  gap:.55rem;
}

.rk-trace-item{
  border:1px solid rgba(15,23,42,.08);
  border-radius:14px;
  background:#fff;
  padding:.75rem .85rem;
}

.rk-trace-item__head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:.75rem;
  flex-wrap:wrap;
}

.rk-trace-item__user{
  font-weight:800;
  color:#0f172a;
}

.rk-trace-item__date{
  color:var(--muted);
  font-size:.78rem;
  font-weight:700;
}

.rk-trace-item__badge{
  margin-top:.4rem;
}

.rk-trace-item__text{
  margin-top:.45rem;
  color:#334155;
  line-height:1.38;
}

/* Tarjetas de resumen: activo con el color propio del estado */
.rk-exec-summary-grid .summary-item.active,
.resumen-card.active{
  outline:none !important;
  border-width:1px !important;
  border-left-width:4px !important;
  transform:translateY(-1px);
}

.rk-exec-summary-grid .summary-item.pendiente.active{border-color:#f59e0b !important;box-shadow:0 .65rem 1.25rem rgba(245,158,11,.14) !important;}
.rk-exec-summary-grid .summary-item.en_revision.active{border-color:#0ea5e9 !important;box-shadow:0 .65rem 1.25rem rgba(14,165,233,.14) !important;}
.rk-exec-summary-grid .summary-item.aprobado.active{border-color:#22c55e !important;box-shadow:0 .65rem 1.25rem rgba(34,197,94,.14) !important;}
.rk-exec-summary-grid .summary-item.rechazado.active{border-color:#ef4444 !important;box-shadow:0 .65rem 1.25rem rgba(239,68,68,.14) !important;}
.rk-exec-summary-grid .summary-item.vencido.active{border-color:#b91c1c !important;box-shadow:0 .65rem 1.25rem rgba(185,28,28,.14) !important;}
.rk-exec-summary-grid .summary-item.eximida.active{border-color:#6b7280 !important;box-shadow:0 .65rem 1.25rem rgba(107,114,128,.14) !important;}
.rk-exec-summary-grid .summary-item.total.active{border-color:#64748b !important;box-shadow:0 .65rem 1.25rem rgba(100,116,139,.14) !important;}

@media (max-width:767.98px){
  .tabla-ejecuciones.table-striped > tbody > tr:nth-of-type(odd) > *,
  .tabla-ejecuciones.table-hover > tbody > tr:hover > *,
  .tabla-ejecuciones tbody tr:hover > *,
  .tabla-ejecuciones tbody tr:hover{
    background:#fff !important;
  }

  .tabla-ejecuciones tbody tr{
    background:#fff !important;
  }
}

/* =========================
   RK - Ajustes detalle/evidencias v14
========================= */
body.rk-upload-modal-active #modalGestion .modal-content,
body.rk-upload-modal-active #modalDia .modal-content,
body.rk-upload-modal-active #modalGestionEjecucionCalendario .modal-content,
body.rk-upload-modal-active #modalGestionEjecucionNotificaciones .modal-content,
body.rk-upload-modal-active .modal.show:not(.rk-upload-wait-modal) .modal-content{
  filter:brightness(.58);
  transition:filter .12s ease;
}

.rk-evidence-column-title{
  display:flex;
  align-items:center;
  gap:.45rem;
  color:#334155;
  font-size:.82rem;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.04em;
  margin-bottom:.65rem;
}

.rk-evidence-column-title i{
  color:var(--blue);
}

.rk-evidence-comment-list{
  display:flex;
  flex-direction:column;
  gap:.65rem;
}

.rk-evidence-comment-item{
  border:1px solid rgba(15,23,42,.08);
  border-radius:14px;
  background:#fff;
  padding:.75rem .85rem;
}

.rk-evidence-comment-item__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:.75rem;
  flex-wrap:wrap;
}

.rk-evidence-comment-item__head strong{
  color:#0f172a;
  font-weight:900;
}

.rk-evidence-comment-item__head span,
.rk-evidence-comment-item__user{
  color:var(--muted);
  font-size:.78rem;
  font-weight:700;
}

.rk-evidence-comment-item__user{
  margin-top:.22rem;
}

.rk-evidence-comment-item__text{
  color:#334155;
  line-height:1.38;
  margin-top:.45rem;
}

/* =========================
   RK - Evidencias con comentario asociado v15
========================= */
.rk-evidence-paired-list{
  display:flex;
  flex-direction:column;
  gap:.75rem;
}

.rk-evidence-paired-item{
  display:grid;
  grid-template-columns:minmax(230px, 36%) minmax(0, 1fr);
  gap:.85rem;
  align-items:stretch;
  border:1px solid rgba(15,23,42,.08);
  border-radius:15px;
  background:#fff;
  padding:.7rem;
}

.rk-evidence-paired-file{
  min-width:0;
}

.rk-evidence-paired-file .rk-evidence-card{
  height:100%;
  box-shadow:none;
}

.rk-evidence-paired-comment{
  border:1px solid rgba(37,99,235,.10);
  border-radius:14px;
  background:rgba(37,99,235,.035);
  padding:.8rem .9rem;
  min-width:0;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
}

.rk-evidence-paired-comment__label{
  display:flex;
  align-items:center;
  gap:.4rem;
  color:#1d4ed8;
  font-size:.78rem;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.035em;
  margin-bottom:.45rem;
}

.rk-evidence-paired-comment__text{
  color:#334155;
  font-size:.88rem;
  line-height:1.42;
  overflow-wrap:anywhere;
}

.rk-evidence-paired-comment__empty{
  color:var(--muted);
  font-size:.84rem;
  font-style:italic;
  line-height:1.4;
}

@media (max-width: 767.98px){
  .rk-evidence-paired-item{
    grid-template-columns:1fr;
    gap:.65rem;
    padding:.65rem;
  }

  .rk-evidence-paired-comment{
    padding:.7rem .75rem;
  }

  .rk-evidence-paired-comment__text,
  .rk-evidence-paired-comment__empty{
    font-size:.84rem;
  }
}

/* =========================
   RK - Evidencias agrupadas por cargue v16
========================= */
.rk-evidence-batch-layout{
  display:grid;
  grid-template-columns:minmax(0, 1fr) minmax(200px, 26%);
  gap:.85rem;
  align-items:start;
}

.rk-evidence-batch-files{
  min-width:0;
}

.rk-evidence-grid--batch{
  grid-template-columns:repeat(auto-fill, minmax(145px, 1fr));
}

.rk-evidence-batch-comment{
  border:1px solid rgba(37,99,235,.10);
  border-radius:14px;
  background:rgba(37,99,235,.035);
  padding:.75rem .8rem;
  min-width:0;
}

.rk-evidence-batch-comment__label{
  display:flex;
  align-items:center;
  gap:.4rem;
  color:#1d4ed8;
  font-size:.76rem;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.035em;
  margin-bottom:.45rem;
}

.rk-evidence-batch-comment__text{
  color:#334155;
  font-size:.86rem;
  line-height:1.42;
  overflow-wrap:anywhere;
}

.rk-evidence-batch-comment__empty{
  color:var(--muted);
  font-size:.82rem;
  font-style:italic;
  line-height:1.4;
}

@media (max-width: 767.98px){
  .rk-evidence-batch-layout{
    grid-template-columns:1fr;
    gap:.65rem;
  }

  .rk-evidence-grid--batch{
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:.55rem;
  }

  .rk-evidence-batch-comment{
    padding:.7rem .75rem;
  }

  .rk-evidence-batch-comment__text,
  .rk-evidence-batch-comment__empty{
    font-size:.84rem;
  }
}


/* =========================
   Ejecuciones: actividades únicas y eventuales
========================= */
.rk-eventual-section{
  background:linear-gradient(180deg, rgba(248,250,252,.65), rgba(255,255,255,0));
  border-radius:14px;
}

.rk-eventual-item{
  border-style:dashed !important;
  opacity:.92;
}

.rk-eventual-item:hover{
  opacity:1;
  background:#fff !important;
}

#modalActividadUnica .form-label,
#modalActivarEventual .form-label{
  font-weight:700;
  color:#334155;
}

@media (max-width: 767.98px){
  .rk-eventual-item .btn{
    width:100%;
  }
}

/* =========================
   RK - Porcentaje de cargue de evidencias
========================= */
.rk-upload-wait-modal__percent{
  margin-top:.75rem;
  color:var(--text);
  font-size:1.35rem;
  font-weight:900;
  line-height:1;
}

.rk-upload-wait-modal__progress{
  width:100%;
  height:10px;
  margin-top:.75rem;
  border-radius:999px;
  background:#e5e7eb;
  overflow:hidden;
}

.rk-upload-wait-modal__progress-bar{
  width:0;
  height:100%;
  border-radius:999px;
  background:var(--primary);
  transition:width .18s ease;
}

/* =========================
   RK - Área arrastrar y soltar en detalle de actividad
========================= */
.rk-detail-tooltip-target{
  cursor:help;
  text-decoration:underline dotted rgba(100,116,139,.7);
  text-underline-offset:3px;
}

.rk-upload-dropzone{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:.35rem;
  width:100%;
  min-height:150px;
  padding:1.1rem;
  border:2px dashed rgba(37,99,235,.32);
  border-radius:18px;
  background:linear-gradient(180deg, rgba(37,99,235,.045), rgba(248,250,252,.96));
  color:var(--text);
  text-align:center;
  cursor:pointer;
  transition:border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.rk-upload-dropzone:hover,
.rk-upload-dropzone:focus,
.rk-upload-dropzone:focus-visible,
.rk-upload-dropzone.is-dragover{
  border-color:var(--primary);
  background:rgba(37,99,235,.08);
  box-shadow:0 12px 30px rgba(37,99,235,.12);
  outline:0;
}

.rk-upload-dropzone.is-dragover{
  transform:translateY(-1px);
}

.rk-upload-dropzone__icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:48px;
  height:48px;
  border-radius:16px;
  background:#fff;
  color:var(--primary);
  box-shadow:0 10px 22px rgba(15,23,42,.08);
  font-size:1.55rem;
}

.rk-upload-dropzone__title{
  font-weight:900;
}

.rk-upload-dropzone__hint{
  color:var(--muted);
  font-size:.88rem;
}

.rk-upload-dropzone__files{
  width:100%;
  margin-top:.45rem;
  padding:.5rem .65rem;
  border-radius:12px;
  background:rgba(255,255,255,.78);
  color:#64748b;
  font-size:.82rem;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.rk-upload-dropzone.has-files .rk-upload-dropzone__files{
  color:#0f172a;
  font-weight:700;
}

.rk-upload-selection{
  margin-top:.85rem;
}

.rk-upload-selection__summary{
  margin-bottom:.55rem;
  color:#475569;
  font-size:.82rem;
  font-weight:800;
}

.rk-upload-selection__grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(118px, 1fr));
  gap:.7rem;
}

.rk-upload-file-card{
  position:relative;
  min-width:0;
  overflow:hidden;
  border:1px solid #e2e8f0;
  border-radius:14px;
  background:#fff;
  box-shadow:0 5px 16px rgba(15,23,42,.055);
}

.rk-upload-file-card__preview{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:.25rem;
  height:92px;
  overflow:hidden;
  background:#f8fafc;
  color:#64748b;
}

.rk-upload-file-card__preview img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.rk-upload-file-card__preview > i{
  font-size:2rem;
}

.rk-upload-file-card__preview > span{
  font-size:.68rem;
  font-weight:900;
  letter-spacing:.04em;
}

.rk-upload-file-card__body{
  min-width:0;
  padding:.55rem .6rem .6rem;
}

.rk-upload-file-card__name{
  overflow:hidden;
  color:#0f172a;
  font-size:.78rem;
  font-weight:800;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.rk-upload-file-card__size{
  margin-top:.12rem;
  color:#64748b;
  font-size:.7rem;
}

.rk-upload-file-card__remove{
  position:absolute;
  z-index:2;
  top:.35rem;
  right:.35rem;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:27px;
  height:27px;
  padding:0;
  border:1px solid rgba(255,255,255,.85);
  border-radius:999px;
  background:rgba(15,23,42,.78);
  color:#fff;
  box-shadow:0 4px 12px rgba(15,23,42,.18);
  font-size:.72rem;
  transition:background .16s ease, transform .16s ease;
}

.rk-upload-file-card__remove:hover,
.rk-upload-file-card__remove:focus-visible{
  background:#dc3545;
  color:#fff;
  outline:0;
  transform:scale(1.05);
}

@media (max-width:575.98px){
  .rk-upload-dropzone{
    min-height:132px;
    padding:.9rem;
  }

  .rk-upload-dropzone__files{
    white-space:normal;
  }

  .rk-upload-selection__grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}
.rk-activity-operational-icon {
  color: #596579;
  font-size: .9em;
  vertical-align: baseline;
  cursor: help;
}
.fc-event .rk-activity-operational-icon {
  color: #fff;
  opacity: .95;
}

.rk-filter-select-wrap{
  position:relative;
}
.rk-filter-select-wrap .form-select{
  padding-right:4rem;
}
.rk-filter-select-clear{
  position:absolute;
  z-index:2;
  top:50%;
  right:2rem;
  transform:translateY(-50%);
  display:flex;
  align-items:center;
  justify-content:center;
  width:1.5rem;
  height:1.5rem;
  padding:0;
  border:0;
  border-radius:50%;
  background:transparent;
  color:#6c757d;
  font-size:1.25rem;
  line-height:1;
}
.rk-filter-select-clear:hover,
.rk-filter-select-clear:focus-visible{
  background:#eef2f6;
  color:#212529;
}
