  :root{
    --ok:#16a34a; 
    --warn:#d97706; 
    --err:#dc2626; 
    --muted:#6b7280; 
    --bg:#f8fafc; 
    --card:#ffffff; 
    --line:#e5e7eb;
    /* Official app accent — login CTA, top bar, home access tiles */
    --app-accent-from:#1e3a5f;
    --app-accent-to:#2563eb;
    --app-accent-gradient:linear-gradient(135deg, var(--app-accent-from) 0%, var(--app-accent-to) 100%);
    --app-accent-shadow:0 4px 14px rgba(30, 58, 95, 0.35);
    --app-top-bar-shadow:0 2px 10px rgba(15, 23, 42, 0.18);
  }

  body{
  background: #f7f7f7;
}
   
  .card{
      background:var(--card);
      border:1px solid var(--line);
      border-radius:10px;
      margin:2px auto;
      padding:16px;
      max-width:1960px;
      box-shadow:0 1px 3px rgba(0,0,0,.04);
      font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  }

  .card-medium{
    background:var(--card);
      border:1px solid var(--line);
      border-radius:10px;
      margin:2px;
      padding:16px;
      width:66.66666%;
      box-shadow:0 1px 3px rgba(0,0,0,.04);
      font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
    
  }

  h1{
      font-size:20px;
      margin:0 0 14px;
  }

  h1 span.icon{
      font-size:22px;
  }

  form{
      margin-top:4px;
      margin-bottom:10px;
  }

  label{
      font-size:14px;
      font-weight:500;
  }

  .row{display:flex;gap:14px;align-items:center;flex-wrap:wrap}


  input[type=file]{
      padding:8px;
      border:1px dashed var(--line);
      border-radius:10px;
      background:#fff
  }

  #fileInfo{
      font-size:13px;
      color:#6b7280;
      margin-bottom:8px;
    }
 
  button[disabled]{opacity:.55;cursor:not-allowed}

  .hint{font-size:13px;color:var(--muted);margin-top:4px}

  .status{margin-top:12px;font-weight:700}
  .status.ok{color:var(--ok)} 
  .status.warn{color:var(--warn)} 
  .status.err{color:var(--err)}
  .status.muted{color:var(--muted)}

  .grid{display:grid;grid-template-columns:repeat(3,minmax(120px,1fr));gap:12px;margin-top:12px}


    .metrics{
      margin-top:12px;
      display:none;
      grid-template-columns:repeat(3,minmax(0,1fr));
      gap:8px;
      font-size:13px;
    }

  .metric{
      background:#f9fafb;
      border:1px solid var(--line);
      border-radius:10px;padding:12px
    }
  
    .metric .k{font-size:12px;color:var(--muted)} 
    .metric .v{font-size:20px;font-weight:800}
  
    .metric span.label{
      display:block;
      color:#6b7280;
      font-size:12px;
    }
    .metric span.value{
      font-weight:600;
      font-size:14px;
    }

    .sep{
      margin-top:14px;
      margin-bottom:8px;
      border-top:1px solid #e5e7eb;
    }

    #errorsBlock{
      display:none;
    }
    #errorsTable{
      width:100%;
      border-collapse:collapse;
      font-size:13px;
    }
    #errorsTable thead th{
      text-align:left;
      padding:6px 8px;
      background:#f3f4f6;
      border-bottom:1px solid #e5e7eb;
    }
    #errorsTable tbody td{
      padding:6px 8px;
      border-bottom:1px solid #f3f4f6;
      vertical-align:top;
    }

    #sampleBlock{
      display:none;
    }
    #sampleTable{
      width:100%;
      border-collapse:collapse;
      font-size:13px;
    }
    #sampleTable thead th{
      text-align:left;
      padding:6px 8px;
      background:#f3f4f6;
      border-bottom:1px solid #e5e7eb;
    }
    #sampleTable tbody td{
      padding:6px 8px;
      border-bottom:1px solid #f3f4f6;
      vertical-align:top;
    }

  table{
      width:100%;
      border-collapse:collapse;
      margin-top:10px;
      background:#fff
  }

th,td{
  border-bottom:1px solid var(--line);
  padding:8px 10px;
  text-align:left;
  font-size:14px
}

th{
  background:#f3f4f6;
  font-weight:700;
}

.table-wrapper{
  overflow-x:auto;
}

#pr_table{
  width:100%;
  border-collapse:collapse;
  font-size:13px;
}

#pr_table thead th{
  background:#f3f4f6;
  border-bottom:1px solid #e5e7eb;
  padding:6px 8px;
  text-align:left;
  white-space:nowrap;
}

#pr_table tbody td{
  border-bottom:1px solid #f3f4f6;
  padding:6px 8px;
  vertical-align:middle;
}

  
.tag{display:inline-block;padding:2px 8px;border-radius:999px;background:#eef2ff;color:#3730a3;font-size:12px}
.muted{color:var(--muted);font-size:13px}
.sep{
  height:1px;
  background:var(--line);
  margin:16px 0;
}
  
  .preview{
      white-space:pre-wrap;
      background:#f9fafb;
      border:1px solid var(--line);
      border-radius:10px;
      padding:10px;
      font-size:13px
    }

  .pr-filters{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    align-items:flex-end;
    margin-bottom:10px;
  }

  .pr-filters input{
    padding:4px 6px;
    border:1px solid #d1d5db;
    border-radius:6px;
    font-size:13px;
  }

    #pr_btn{
    padding:8px 14px;
    border-radius:8px;
    background:#2563eb;
    color:#fff;
    border:none;
    cursor:pointer;
    font-weight:600;
  }

  #pr_btn[disabled]{opacity:0.6;cursor:not-allowed;}

  .pr-status{
    font-size:13px;
    color:#6b7280;
    margin-bottom:6px;
  }

  .text-right{text-align:right;}

  .btn-edit{
    padding:4px 10px;
    border-radius:6px;
    border:1px solid #3b82f6;
    background:#eff6ff;
    color:#1d4ed8;
    cursor:pointer;
    font-size:12px;
  }

  .btn-history{
  padding:4px 10px;
  border-radius:6px;
  border:1px solid #6b7280;
  background:#f3f4f6;
  color:#374151;
  cursor:pointer;
  font-size:12px;
  margin-left:4px;
}

.btn-search{
  padding:8px 14px;
  border-radius:8px;
  background:#2563eb;
  color:#fff;
  border:none;
  cursor:pointer;
  font-weight:600;
}

#btnUpload{
  padding:8px 16px;
  border-radius:8px;
  border:none;
  background:#2563eb;
  color:#ffffff;
  cursor:pointer;
  font-size:14px;
  font-weight:600;
}

#btnUpload[disabled]{
  opacity:0.6;
  cursor:not-allowed;
}

/* ===========================
 Global SELECT Styling
=========================== */
select.custom-select {
  width: 100%;
  padding: 6px 8px;
  font-size: 14px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background-color: #ffffff;
  color: #1f2937;
  outline: none;
  cursor: pointer;
  appearance: none; /* Hide default arrow */
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='gray' height='12' width='12' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'><path d='M5.5 7l4.5 4.5L14.5 7'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
}

/* Hover */
select.custom-select:hover {
  border-color: #9ca3af;
}

/* Focus */
select.custom-select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}

/* Disabled */
select.custom-select:disabled {
  background-color: #f3f4f6;
  color: #9ca3af;
  border-color: #e5e7eb;
  cursor: not-allowed;
  background-image: none;
}

/* Options */
select.custom-select option {
  font-size: 14px;
  padding: 4px;
}

/* Modal */
.modal-overlay{
  position:fixed;
  inset:0;
  background:rgba(15,23,42,0.45);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:9999;
}

.modal{
  background:#ffffff;
  border-radius:10px;
  padding:14px 16px;
  max-width:480px;
  width:100%;
  box-shadow:0 10px 40px rgba(15,23,42,0.25);
}

.modal-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:8px;
}

.modal-close{
  background:transparent;
  border:none;
  font-size:20px;
  cursor:pointer;
  line-height:1;
}

.modal-body{
  font-size:14px;
}

  .modal-footer{
    margin-top:12px;
    display:flex;
    justify-content:flex-end;
    gap:8px;
  }

  .btn-primary{
    padding:6px 12px;
    border-radius:8px;
    border:none;
    background:#2563eb;
    color:#fff;
    cursor:pointer;
    font-size:13px;
    font-weight:600;
  }

  .btn-secondary{
    padding:6px 12px;
    border-radius:8px;
    border:1px solid #d1d5db;
    background:#f9fafb;
    cursor:pointer;
    font-size:13px;
  }


/* Status Badge */

  .status-badge{
  display:inline-block;
  padding:2px 8px;
  border-radius:999px;
  font-size:11px;
  font-weight:600;
  border:1px solid transparent;
  white-space:nowrap;
}

/* 🔴 CRITICAL */
.status-badge.badge-critical{
  background:#fee2e2;
  color:#b91c1c;
  border-color:#fecaca;
}

/* 🟡 BEHIND */
.status-badge.badge-behind{
  background:#fef3c7;
  color:#92400e;
  border-color:#fde68a;
}

/* 🟢 ON TARGET */
.status-badge.badge-on-target{
  background:#dcfce7;
  color:#166534;
  border-color:#bbf7d0;
}

/* 🔵 AHEAD */
.status-badge.badge-ahead{
  background:#eff6ff;
  color:#1d4ed8;
  border-color:#bfdbfe;
}

/* ⚪ NO PLAN (por si acaso se usa) */
.status-badge.badge-no-plan{
  background:#e5e7eb;
  color:#374151;
  border-color:#d1d5db;
}


/* info box 


      background:var(--card);
      border:1px solid var(--line);
      border-radius:10px;
      margin:2px auto;
      padding:16px;
      max-width:1960px;
      box-shadow:0 1px 3px rgba(0,0,0,.04);
      font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;

*/
.info-box {
    /* box-shadow: 0 0 1px rgba(0, 0, 0, 0.125), 0 1px 3px rgba(0, 0, 0, 0.2); */
    border:1px solid var(--line);
    box-shadow:0 1px 3px rgba(0,0,0,.24);
    border-radius: 0.25rem;
    background: #ffffff;
    display: -ms-flexbox;
    display: flex;
    margin-bottom: 1rem;
    min-height: 80px;
    padding: .5rem;
    position: relative;
    font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  } 

.info-box .info-box-icon {
    border-radius: 0.25rem;
    -ms-flex-align: center;
    align-items: center;
    display: -ms-flexbox;
    display: flex;
    font-size: 1.875rem;
    -ms-flex-pack: center;
    justify-content: center;
    text-align: center;
    width: 70px;
  }

.info-box .info-box-icon > img {
    max-width: 100%;
  }
  
.info-box .info-box-content {
    -ms-flex: 1;
    flex: 1;
    padding: 5px 10px;
  }
  
.info-box .info-box-number {
    display: block;
    font-weight: 700;
  }

.info-box .info-box-text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

    .info-box .info-box .bg-primary,
  .info-box .info-box .bg-gradient-primary {
    color: #ffffff;
  }

   .info-box .info-box .bg-secondary,
  .info-box .info-box .bg-gradient-secondary {
    color: #ffffff;
  }
  
   
  .info-box .info-box .bg-success,
  .info-box .info-box .bg-gradient-success {
    color: #ffffff;
  }
    
  .info-box .info-box .bg-info,
  .info-box .info-box .bg-gradient-info {
    color: #ffffff;
  }

  .info-box .info-box .bg-warning,
  .info-box .info-box .bg-gradient-warning {
    color: #1F2D3D;
  }

  .info-box .info-box .bg-danger,
  .info-box .info-box .bg-gradient-danger {
    color: #ffffff;
  }

  .info-box .info-box .bg-light,
  .info-box .info-box .bg-gradient-light {
    color: #1F2D3D;
  }

  .info-box .info-box .bg-dark,
  .info-box .info-box .bg-gradient-dark {
    color: #ffffff;
  }

  .info-box .info-box-more {
    display: block;
  }

  .info-box .progress-description {
    margin: 0;
  }
  


  /* Padding */
  .p-2 {
    padding: 0.5rem !important;
  }
  
  .pt-2,
  .py-2 {
    padding-top: 0.5rem !important;
  }
  
  .pr-2,
  .px-2 {
    padding-right: 0.5rem !important;
  }
  
  .pb-2,
  .py-2 {
    padding-bottom: 0.5rem !important;
  }
  
  .pl-2,
  .px-2 {
    padding-left: 0.5rem !important;
  }
  
  
.p-3 {
  padding: 1rem !important;
}

.pt-3,
.py-3 {
  padding-top: 1rem !important;
}

.pr-3,
.px-3 {
  padding-right: 1rem !important;
}

.pb-3,
.py-3 {
  padding-bottom: 1rem !important;
}

.pl-3,
.px-3 {
  padding-left: 1rem !important;
}

.p-4 {
  padding: 1.5rem !important;
}

.pt-4,
.py-4 {
  padding-top: 1.5rem !important;
}

.pr-4,
.px-4 {
  padding-right: 1.5rem !important;
}

.pb-4,
.py-4 {
  padding-bottom: 1.5rem !important;
}

.pl-4,
.px-4 {
  padding-left: 1.5rem !important;
}

.p-5 {
  padding: 3rem !important;
}

.pt-5,
.py-5 {
  padding-top: 3rem !important;
}

.pr-5,
.px-5 {
  padding-right: 3rem !important;
}

.pb-5,
.py-5 {
  padding-bottom: 3rem !important;
}

.pl-5,
.px-5 {
  padding-left: 3rem !important;
}

/* margin */
.mb-1,
.my-1 {
  margin-bottom: 0.25rem !important;
}

.ml-1,
.mx-1 {
  margin-left: 0.25rem !important;
}

.m-2 {
  margin: 0.5rem !important;
}

.mt-2,
.my-2 {
  margin-top: 0.5rem !important;
}

.mr-2,
.mx-2 {
  margin-right: 0.5rem !important;
}

.mb-2,
.my-2 {
  margin-bottom: 0.5rem !important;
}

.ml-2,
.mx-2 {
  margin-left: 0.5rem !important;
}

.m-3 {
  margin: 1rem !important;
}

.mt-3,
.my-3 {
  margin-top: 1rem !important;
}

.mr-3,
.mx-3 {
  margin-right: 1rem !important;
}

.mb-3,
.my-3 {
  margin-bottom: 1rem !important;
}

.ml-3,
.mx-3 {
  margin-left: 1rem !important;
}

.m-4 {
  margin: 1.5rem !important;
}

.mt-4,
.my-4 {
  margin-top: 1.5rem !important;
}

.mr-4,
.mx-4 {
  margin-right: 1.5rem !important;
}

.mb-4,
.my-4 {
  margin-bottom: 1.5rem !important;
}

.ml-4,
.mx-4 {
  margin-left: 1.5rem !important;
}

.m-5 {
  margin: 3rem !important;
}

.mt-5,
.my-5 {
  margin-top: 3rem !important;
}

.mr-5,
.mx-5 {
  margin-right: 3rem !important;
}

.mb-5,
.my-5 {
  margin-bottom: 3rem !important;
}

.ml-5,
.mx-5 {
  margin-left: 3rem !important;
}

/* BTN GROUP */  
.multi-button {
  display: inline-flex;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  border: 1px solid #e5e7eb;
}

.multi-button > button,
.multi-button > a {
  height: 40px;
  min-width: 54px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-right: 1px solid #e5e7eb;
  background-color: #fff;
  color: #4338ca;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s;
}

.multi-button > button:last-child,
.multi-button > a:last-child {
  border-right: none;
}

.multi-button > button:hover,
.multi-button > a:hover {
  background-color: #f1f5f9;
}

.multi-button > button:first-child,
.multi-button > a:first-child {
  border-radius: 9px 0 0 9px;
}

.multi-button > button:last-child,
.multi-button > a:last-child {
  border-radius: 0 9px 9px 0;
}

.multi-button > button:first-child:last-child,
.multi-button > a:first-child:last-child {
  border-radius: 9px;
}

.multi-button-actions{
  padding: 2px;
}

.Hideme{
  display: none;
}

 /* Elevation Class */
  .elevation-0 {
    box-shadow: none !important;
  }
  
  .elevation-1 {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24) !important;
  }
  
  .elevation-2 {
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23) !important;
  }
  
  .elevation-3 {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23) !important;
  }
  
  .elevation-4 {
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22) !important;
  }
  
  .elevation-5 {
    box-shadow: 0 19px 38px rgba(0, 0, 0, 0.3), 0 15px 12px rgba(0, 0, 0, 0.22) !important;
  }

  /* ----------------------------------
     App top bar (matches --app-accent-gradient)
  ---------------------------------- */
  .app-top-bar {
    color: #fff !important;
    background: var(--app-accent-gradient) !important;
    box-shadow: var(--app-top-bar-shadow);
  }

  .app-top-bar .w3-bar-item,
  .app-top-bar .w3-button {
    color: #fff !important;
  }

  .app-top-bar .w3-button:hover {
    background-color: rgba(255, 255, 255, 0.14) !important;
  }

  /* ----------------------------------
     App Tile (access cards - Settings style)
     Use: .app-tile, .tile-icon, .tile-label, .tile-icon.accent-*
  ---------------------------------- */
  .app-tile {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    padding: 1rem 1.25rem;
    background: #fff;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 10px;
    text-decoration: none;
    color: #374151;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  }

  .app-tile:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #bfdbfe;
  }

  .app-tile.disabled {
    cursor: not-allowed;
    opacity: 0.6;
    background: #f9fafb;
  }

  .app-tile.disabled:hover {
    transform: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  }

  .app-tile .tile-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    font-size: 1.25rem;
    color: #fff;
    flex-shrink: 0;
  }

  .app-tile .tile-icon.accent-indigo,
  .app-tile .tile-icon.accent-app {
    background: var(--app-accent-gradient);
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.28);
  }

  .app-tile .tile-icon.accent-teal {
    background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);
  }

  .app-tile .tile-icon.accent-amber {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  }

  .app-tile .tile-icon.accent-sky {
    background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
  }

  .app-tile .tile-icon.accent-slate {
    background: linear-gradient(135deg, #475569 0%, #64748b 100%);
  }

  .app-tile .tile-label {
    flex: 1;
    min-width: 0;
  }

  .app-tiles-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .app-tiles-grid .app-tile {
    min-width: 0;
  }

  @media (max-width: 992px) {
    .app-tiles-grid {
      grid-template-columns: repeat(2, 1fr);
    }
  }

  @media (max-width: 576px) {
    .app-tiles-grid {
      grid-template-columns: 1fr;
    }
  }

  /**
   * Status filters (Active / Inactive / Archived, etc.): shared compact width app-wide.
   * Use on the <select>. Pair with .app-status-filter-col on the toolbar column to align right.
   */
  .app-status-filter-select {
    width: 100%;
    max-width: 200px;
    box-sizing: border-box;
  }

  .app-status-filter-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
  }
  
  /* ----------------------------------  */

