/* DTF Labs themes and extracted panel/base styles. */

:root {
  --shell-primary: var(--primary);
  --shell-primary-dark: var(--primary-dark);
  --shell-primary-light: var(--primary-light);
  --shell-accent: var(--accent);
  --shell-accent-light: var(--accent-light);
  --lab-accent: var(--shell-accent);
  --lab-accent-dark: var(--shell-primary-dark);
  --lab-accent-soft: rgba(20, 83, 45, 0.16);
  --text-primary: var(--text);
  --text-secondary: var(--muted);
  --text-light: var(--muted);
}

body.lab-theme-sigmalab {
  --lab-accent: #2f8a4e;
  --lab-accent-dark: #14532d;
  --lab-accent-soft: rgba(47, 138, 78, 0.2);
}

body.lab-theme-mec {
  --lab-accent: #b45309;
  --lab-accent-dark: #7c2d12;
  --lab-accent-soft: rgba(180, 83, 9, 0.2);
}

body.lab-theme-sigmadp {
  --lab-accent: #2563eb;
  --lab-accent-dark: #1e3a8a;
  --lab-accent-soft: rgba(37, 99, 235, 0.2);
}

.dtf-lab-hero {
  margin-left: calc(-1 * var(--space-5));
  margin-right: calc(-1 * var(--space-5));
  margin-top: calc(-1 * var(--space-5));
  margin-bottom: var(--space-5);
  padding: var(--space-6) var(--space-7);
  border-radius: 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(125deg, var(--lab-accent-dark) 0%, var(--lab-accent) 56%, var(--primary-dark) 100%);
  box-shadow: 0 20px 30px rgba(11, 36, 20, 0.24);
  color: #ffffff;
}

.dtf-lab-hero__inner {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
}

.dtf-lab-hero__logo {
  width: 82px;
  height: 82px;
  border-radius: 14px;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.22);
}

.dtf-lab-hero__logo img {
  width: 68px;
  height: 68px;
  object-fit: contain;
}

.dtf-lab-hero__content {
  min-width: 0;
}

.dtf-lab-hero__title {
  margin: 0;
  font-size: 1.55rem;
  letter-spacing: 0.03em;
  font-weight: 800;
  text-transform: uppercase;
}

.dtf-lab-hero__subtitle {
  margin: 0.35rem 0 0;
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 768px) {
  .dtf-lab-hero {
    margin-left: calc(-1 * var(--space-4));
    margin-right: calc(-1 * var(--space-4));
    margin-top: calc(-1 * var(--space-4));
    padding: var(--space-4) var(--space-5);
  }

  .dtf-lab-hero__inner {
    gap: 0.8rem;
  }

  .dtf-lab-hero__logo {
    width: 66px;
    height: 66px;
    border-radius: 12px;
  }

  .dtf-lab-hero__logo img {
    width: 54px;
    height: 54px;
  }

  .dtf-lab-hero__title {
    font-size: 1.15rem;
  }

  .dtf-lab-hero__subtitle {
    font-size: 0.85rem;
  }
}

/* Source: code/mec/templates/mec/base_mec_unified.html */
.mec-vdg-card{
    background:#fff;
    border:1px solid rgba(15,23,42,.08);
    border-radius:1rem;
    box-shadow:var(--shadow);
    padding:1.1rem;
  }
  .mec-vdg-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    flex-wrap:wrap;
    gap:.85rem;
    margin-bottom:1rem;
  }
  .mec-vdg-title{
    margin:0;
    font-size:1.2rem;
    font-weight:800;
    color:var(--text-primary);
  }
  .mec-vdg-subtitle{
    margin:.35rem 0 0;
    color:var(--text-secondary);
    font-size:.9rem;
  }
  .mec-vdg-search{
    display:flex;
    gap:.55rem;
    flex-wrap:wrap;
    margin-bottom:1rem;
  }
  .mec-vdg-search .form-control{
    max-width:420px;
  }
  .mec-vdg-table-wrap{
    overflow-x:auto;
  }
  .mec-vdg-table{
    width:100%;
    border-collapse:collapse;
  }
  .mec-vdg-table th,
  .mec-vdg-table td{
    border-bottom:1px solid rgba(15,23,42,.08);
    padding:.62rem .66rem;
    vertical-align:middle;
    font-size:.9rem;
  }
  .mec-vdg-table th{
    font-size:.73rem;
    text-transform:uppercase;
    letter-spacing:.06em;
    color:var(--text-secondary);
    background:rgba(15,23,42,.03);
  }
  .mec-vdg-form-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
    gap:1rem 1.1rem;
  }
  .mec-vdg-form-field-wide{
    grid-column:1 / -1;
  }
  .mec-vdg-label{
    display:block;
    margin:0 0 .35rem 0;
    font-size:.82rem;
    font-weight:700;
    color:var(--text-primary);
  }
  .mec-vdg-error{
    color:#b91c1c;
    font-size:.8rem;
    margin-top:.25rem;
  }
  .mec-vdg-actions{
    display:flex;
    gap:.65rem;
    margin-top:1.25rem;
    flex-wrap:wrap;
  }
  .mec-vdg-card input[type="text"],
  .mec-vdg-card input[type="number"],
  .mec-vdg-card input[type="date"],
  .mec-vdg-card input[type="file"],
  .mec-vdg-card select,
  .mec-vdg-card textarea{
    width:100%;
    border:1px solid var(--border);
    border-radius:.58rem;
    padding:.5rem .62rem;
    background:#fff;
    font-size:.9rem;
  }
  .mec-vdg-card input[type="checkbox"]{
    width:1rem;
    height:1rem;
    accent-color:var(--primary);
  }
  .mec-vdg-card textarea{
    min-height:84px;
    resize:vertical;
  }
  .mec-vdg-month-grid{
    display:grid;
    grid-template-columns:repeat(12,1fr);
    gap:.45rem;
  }
  .mec-vdg-month-cell{
    text-align:center;
    padding:.45rem .3rem;
    border:1px solid var(--border);
    border-radius:.55rem;
    background:#f8fafc;
    font-size:.72rem;
    font-weight:700;
    color:var(--text-secondary);
  }
  .mec-vdg-month-cell label{
    display:block;
    margin-bottom:.22rem;
  }
  @media (max-width: 1100px){
    .mec-vdg-month-grid{
      grid-template-columns:repeat(6,1fr);
    }
  }
  @media (max-width: 640px){
    .mec-vdg-month-grid{
      grid-template-columns:repeat(4,1fr);
    }
  }
/* Source: code/sigmalab/templates/sigmalab/panel_usuario.html */
.panel-section-card {
    margin-bottom: 1rem;
  }
  .panel-section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    flex-wrap: wrap;
  }
  .panel-section-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
  }
  .panel-section-body[hidden] {
    display: none !important;
  }
  .panel-collapse-toggle {
    min-width: 116px;
    justify-content: center;
    gap: 0.35rem;
  }
  .panel-section-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
  }
  .panel-section-subtitle {
    margin: 0.2rem 0 0;
    color: var(--text-secondary);
    font-size: 0.86rem;
  }
  .slab-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0.9rem;
  }
  .slab-result-card {
    border: 1px solid rgba(131, 197, 163, 0.45);
    border-radius: 0.9rem;
    padding: 0.85rem;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(11, 36, 20, 0.08);
  }
  .slab-result-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.55rem;
  }
  .slab-result-code {
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary-dark);
  }
  .slab-result-meta {
    margin: 0.2rem 0;
    color: var(--muted);
    font-size: 0.84rem;
  }
  .slab-result-actions {
    margin-top: 0.7rem;
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
  }
  .slab-status-columns {
    margin-top: 0.85rem;
  }

/* Source: code/sigmalab/templates/sigmalab/panel_tecnico.html */
.slab-tech-shell{
    max-width:1400px;
    margin:0 auto;
    display:flex;
    flex-direction:column;
    gap:1rem;
  }

  .slab-tech-card{
    background:var(--bg-card);
    border:1px solid rgba(15,23,42,.08);
    border-radius:1.2rem;
    padding:1.2rem;
    box-shadow:var(--shadow);
  }

  .slab-tech-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:.8rem;
    flex-wrap:wrap;
    margin-bottom:1rem;
  }

  .slab-tech-title{
    margin:0;
    font-size:1.5rem;
    font-weight:800;
    color:var(--text-primary);
  }

  .slab-tech-subtitle{
    margin:.2rem 0 0;
    color:var(--text-secondary);
    font-size:.9rem;
  }

  .slab-tech-tags{
    display:flex;
    gap:.45rem;
    flex-wrap:wrap;
  }

  .slab-tech-tag{
    display:inline-flex;
    align-items:center;
    padding:.28rem .62rem;
    border-radius:999px;
    font-size:.7rem;
    font-weight:700;
    letter-spacing:.08em;
    text-transform:uppercase;
    border:1px solid var(--border);
    background:rgba(30,74,50,.08);
    color:var(--primary-dark);
  }

  .slab-kpis-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(155px,1fr));
    gap:.75rem;
  }

  .slab-kpi-card{
    text-decoration:none;
    color:inherit;
    background:#fff;
    border:1px solid rgba(15,23,42,.08);
    border-radius:.95rem;
    padding:.85rem .75rem;
    text-align:center;
    box-shadow:0 6px 14px rgba(15,23,42,.08);
    transition:transform .18s ease, box-shadow .18s ease;
    position:relative;
    overflow:hidden;
  }

  .slab-kpi-card::before{
    content:"";
    position:absolute;
    left:0;
    right:0;
    top:0;
    height:3px;
    background:linear-gradient(90deg,var(--primary),var(--accent));
  }

  .slab-kpi-card:hover{
    transform:translateY(-2px);
    box-shadow:0 11px 19px rgba(15,23,42,.12);
  }

  .slab-kpi-num{
    font-size:1.7rem;
    font-weight:800;
    color:var(--primary-dark);
    line-height:1;
  }

  .slab-kpi-label{
    margin-top:.25rem;
    font-size:.7rem;
    font-weight:700;
    letter-spacing:.08em;
    text-transform:uppercase;
    color:var(--text-secondary);
  }

  .slab-section-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:.7rem;
    margin-bottom:.85rem;
    flex-wrap:wrap;
  }

  .slab-section-title{
    margin:0;
    font-size:1.06rem;
    font-weight:800;
    color:var(--text-primary);
    display:flex;
    gap:.45rem;
    align-items:center;
  }

  .slab-alert-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:.75rem;
  }

  .slab-alert-card{
    border:1px solid rgba(15,23,42,.08);
    border-radius:.9rem;
    padding:.8rem;
    background:#fff;
  }

  .slab-alert-top{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:.5rem;
    margin-bottom:.35rem;
  }

  .slab-alert-label{
    font-size:.82rem;
    font-weight:700;
    color:var(--text-primary);
  }

  .slab-alert-badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:30px;
    height:24px;
    border-radius:999px;
    padding:0 .45rem;
    font-size:.76rem;
    font-weight:800;
  }

  .slab-alert-badge.warn{ background:rgba(245,158,11,.18); color:#92400e; }
  .slab-alert-badge.info{ background:rgba(59,130,246,.15); color:#1e40af; }
  .slab-alert-badge.ok{ background:rgba(34,197,94,.16); color:#166534; }

  .slab-alert-note{
    margin:0;
    font-size:.8rem;
    color:var(--text-secondary);
  }

  .slab-alert-link{
    margin-top:.45rem;
    display:inline-flex;
    font-size:.8rem;
    font-weight:700;
    text-decoration:none;
  }

  .slab-figures-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
    gap:.75rem;
  }

  .slab-figure-card{
    border:1px solid rgba(15,23,42,.08);
    border-radius:.9rem;
    padding:.85rem;
    background:#fff;
  }

  .slab-figure-card h4{
    margin:0 0 .75rem;
    font-size:.95rem;
    font-weight:800;
    color:var(--text-primary);
  }

  .slab-bars-list{
    display:flex;
    flex-direction:column;
    gap:.35rem;
  }

  .slab-bar-row{
    display:grid;
    grid-template-columns:34px 1fr 34px;
    gap:.45rem;
    align-items:center;
  }

  .slab-bar-label{
    font-size:.75rem;
    color:var(--text-secondary);
    font-weight:700;
  }

  .slab-bar-track{
    height:9px;
    border-radius:999px;
    background:rgba(15,23,42,.08);
    overflow:hidden;
  }

  .slab-bar-fill{
    display:block;
    height:100%;
    background:linear-gradient(90deg,var(--primary-light),var(--primary-dark));
  }

  .slab-bar-value{
    text-align:right;
    font-size:.75rem;
    color:var(--text-primary);
    font-weight:700;
  }

  .slab-dist-list{
    display:flex;
    flex-direction:column;
    gap:.4rem;
  }

  .slab-dist-item{
    display:flex;
    justify-content:space-between;
    align-items:center;
    border:1px solid rgba(15,23,42,.08);
    border-radius:.6rem;
    padding:.45rem .55rem;
    background:rgba(15,46,29,.03);
    font-size:.84rem;
  }

  .slab-dist-item strong{
    font-weight:800;
    color:var(--text-primary);
  }

  .slab-weather-card{
    border:1px solid rgba(15,23,42,.08);
    border-radius:.75rem;
    padding:.7rem .8rem;
    background:linear-gradient(140deg, rgba(30,74,50,.09), rgba(34,197,94,.06));
  }

  .slab-weather-main{
    display:flex;
    align-items:flex-end;
    gap:.6rem;
    margin-bottom:.45rem;
  }

  #slab-weather-temp{
    font-size:1.45rem;
    font-weight:800;
    color:var(--text-primary);
    line-height:1;
  }

  #slab-weather-desc{
    font-size:.84rem;
    color:var(--text-secondary);
    font-weight:700;
  }

  .slab-weather-meta{
    display:flex;
    flex-direction:column;
    gap:.25rem;
    font-size:.78rem;
    color:var(--text-secondary);
  }

  .slab-figure-note{
    margin:.65rem 0 0;
    font-size:.78rem;
    color:var(--text-secondary);
  }

  .slab-lists-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
    gap:.75rem;
  }

  .slab-list-card{
    border:1px solid rgba(15,23,42,.08);
    border-radius:.9rem;
    padding:.8rem;
    background:#fff;
  }

  .slab-list-card h4{
    margin:0 0 .6rem;
    font-size:.92rem;
    font-weight:800;
    color:var(--text-primary);
  }

  .slab-list{
    list-style:none;
    margin:0;
    padding:0;
    display:flex;
    flex-direction:column;
    gap:.45rem;
  }

  .slab-list li{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:.6rem;
    padding:.5rem .55rem;
    border:1px solid rgba(15,23,42,.08);
    border-radius:.7rem;
    background:rgba(15,46,29,.03);
  }

  .slab-list-meta{
    margin-top:.1rem;
    font-size:.75rem;
    color:var(--text-secondary);
  }

  .slab-empty{
    margin:0;
    font-size:.84rem;
    color:var(--text-secondary);
  }

  .slab-personnel-kpis{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
    gap:.6rem;
    margin-bottom:.85rem;
  }

  .slab-mini-kpi{
    border:1px solid rgba(15,23,42,.08);
    border-radius:.85rem;
    background:#fff;
    padding:.65rem .7rem;
  }

  .slab-mini-kpi-value{
    font-size:1.2rem;
    font-weight:800;
    color:var(--primary-dark);
    line-height:1;
  }

  .slab-mini-kpi-label{
    margin-top:.25rem;
    font-size:.72rem;
    color:var(--text-secondary);
    text-transform:uppercase;
    letter-spacing:.06em;
    font-weight:700;
  }

  .slab-personnel-table-wrap{
    width:100%;
    overflow:auto;
    border:1px solid rgba(15,23,42,.08);
    border-radius:.9rem;
    background:#fff;
  }

  .slab-personnel-table{
    width:100%;
    border-collapse:collapse;
    font-size:.84rem;
    min-width:980px;
  }

  .slab-personnel-table th,
  .slab-personnel-table td{
    padding:.58rem .65rem;
    border-bottom:1px solid rgba(15,23,42,.08);
    vertical-align:top;
  }

  .slab-personnel-table thead th{
    background:rgba(15,46,29,.05);
    color:var(--text-primary);
    font-size:.72rem;
    text-transform:uppercase;
    letter-spacing:.07em;
    font-weight:800;
  }

  .slab-access-badges{
    display:flex;
    flex-wrap:wrap;
    gap:.3rem;
  }

  .slab-access-badge{
    display:inline-flex;
    align-items:center;
    border-radius:999px;
    border:1px solid transparent;
    padding:.16rem .45rem;
    font-size:.67rem;
    font-weight:700;
    letter-spacing:.03em;
  }

  .slab-access-badge.success{ background:rgba(34,197,94,.14); border-color:rgba(34,197,94,.28); color:#166534; }
  .slab-access-badge.warn{ background:rgba(245,158,11,.15); border-color:rgba(245,158,11,.33); color:#92400e; }
  .slab-access-badge.danger{ background:rgba(220,53,69,.13); border-color:rgba(220,53,69,.32); color:#8a1c1c; }
  .slab-access-badge.info{ background:rgba(59,130,246,.12); border-color:rgba(59,130,246,.3); color:#1e40af; }
  .slab-access-badge.muted{ background:rgba(15,23,42,.06); border-color:rgba(15,23,42,.14); color:#46515f; }

  .slab-personnel-actions{
    display:flex;
    flex-wrap:wrap;
    gap:.35rem;
  }

  .slab-personnel-actions form{
    margin:0;
  }

/* Source: code/mec/templates/mec/panel_usuario.html */
.panel-section-card{
    margin-bottom:1rem;
  }

  .panel-section-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:.75rem;
    margin-bottom:.9rem;
    flex-wrap:wrap;
  }

  .panel-section-meta{
    display:flex;
    align-items:center;
    gap:.5rem;
    flex-wrap:wrap;
  }

  .panel-section-body[hidden]{
    display:none !important;
  }

  .panel-collapse-toggle{
    min-width:116px;
    justify-content:center;
    gap:.35rem;
  }

  .panel-section-title{
    margin:0;
    font-size:1.15rem;
    font-weight:800;
    color:var(--text-primary);
  }

  .panel-section-subtitle{
    margin:.2rem 0 0;
    color:var(--text-secondary);
    font-size:.86rem;
  }

  .panel-inner-card{
    margin-bottom:1rem;
  }

  .flow-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
    gap:.75rem;
    margin-bottom:.75rem;
  }

  .flow-step{
    display:flex;
    gap:.6rem;
    align-items:flex-start;
    padding:.65rem .75rem;
    border-radius:.75rem;
    background:rgba(30,74,50,.06);
    border:1px solid rgba(169,201,181,.45);
  }

  .flow-index{
    width:26px;
    height:26px;
    border-radius:999px;
    background:var(--primary);
    color:#fff;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-size:.75rem;
    font-weight:700;
  }

  .status-columns{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:.9rem;
  }

  .status-list{
    padding:.85rem;
  }

  .status-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:.75rem;
    padding:.5rem .6rem;
    border-radius:.65rem;
    background:rgba(15,46,29,.04);
    border:1px solid rgba(169,201,181,.35);
    margin-bottom:.6rem;
  }

  .status-row:last-child{
    margin-bottom:0;
  }

  .status-row-title{
    font-weight:700;
    color:var(--text-primary);
  }

  .status-empty{
    margin:0;
    color:var(--text-secondary);
    font-size:.88rem;
  }

  .results-list{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
    gap:.9rem;
  }

  .result-card{
    border:1px solid rgba(169,201,181,.5);
    border-radius:.9rem;
    padding:.9rem;
    background:#fff;
    box-shadow:0 5px 14px rgba(15,46,29,.08);
  }

  .result-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:.6rem;
    margin-bottom:.6rem;
  }

  .result-title{
    font-size:1rem;
    font-weight:800;
    color:var(--text-primary);
  }

  .result-meta-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:.55rem;
    margin-bottom:.65rem;
  }

  .result-meta-label{
    display:block;
    font-size:.7rem;
    letter-spacing:.06em;
    text-transform:uppercase;
    color:var(--text-secondary);
    font-weight:700;
  }

  .result-meta-value{
    display:block;
    font-size:.82rem;
    color:var(--text-primary);
    font-weight:700;
    margin-top:.15rem;
  }

  .result-chart-card{
    border:1px solid rgba(15,23,42,.08);
    border-radius:.75rem;
    padding:.6rem .7rem;
    margin-bottom:.65rem;
    background:linear-gradient(180deg, rgba(248,250,252,.96), rgba(241,245,249,.72));
  }

  .result-chart-title{
    font-size:.76rem;
    letter-spacing:.03em;
    text-transform:uppercase;
    color:#475569;
    font-weight:700;
    margin-bottom:.35rem;
  }

  .result-chart-list{
    display:flex;
    flex-direction:column;
    gap:.32rem;
  }

  .result-chart-row{
    display:grid;
    grid-template-columns:minmax(80px, 1.1fr) minmax(120px, 2fr) auto;
    align-items:center;
    gap:.45rem;
  }

  .result-chart-label{
    font-size:.8rem;
    color:#0f172a;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }

  .result-chart-track{
    height:8px;
    border-radius:999px;
    background:rgba(148,163,184,.24);
    overflow:hidden;
  }

  .result-chart-fill{
    display:block;
    height:100%;
    border-radius:999px;
    background:linear-gradient(90deg, #1e4a32, #2d7a52);
  }

  .result-chart-value{
    font-size:.78rem;
    color:#14532d;
    font-weight:700;
    white-space:nowrap;
  }

  .result-files{
    display:flex;
    gap:.4rem;
    flex-wrap:wrap;
    margin-bottom:.65rem;
  }

  .result-file-label{
    font-size:.78rem;
    color:var(--text-secondary);
  }

  .result-actions{
    display:flex;
    gap:.45rem;
    flex-wrap:wrap;
  }

  @media (max-width:1024px){
    .flow-grid{
      grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
      gap:.6rem;
    }
    .status-columns{
      grid-template-columns:1fr;
      gap:.75rem;
    }
    .results-list{
      grid-template-columns:1fr;
      gap:.75rem;
    }
    .status-list{
      padding:.65rem;
    }
  }

  @media (max-width:768px){
    .status-row{
      flex-direction:column;
      align-items:flex-start;
    }
    .status-row .text-end{
      text-align:left;
      width:100%;
    }
    .result-meta-grid{
      grid-template-columns:1fr;
    }
    .result-chart-row{
      grid-template-columns:1fr;
      gap:.2rem;
    }
  }
  @media (max-width:640px){
    .result-card{
      padding:.75rem;
    }
    .status-list{
      padding:.55rem;
    }
  }

/* Source: code/mec/templates/mec/panel_tecnico.html */
.mec-tech-shell{
    max-width:1400px;
    margin:0 auto;
    display:flex;
    flex-direction:column;
    gap:1rem;
  }

  .mec-tech-card{
    background:var(--bg-card);
    border:1px solid rgba(15,23,42,.08);
    border-radius:1.2rem;
    padding:1.2rem;
    box-shadow:var(--shadow);
  }

  .mec-tech-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:.8rem;
    flex-wrap:wrap;
    margin-bottom:1rem;
  }

  .mec-tech-title{
    margin:0;
    font-size:1.5rem;
    font-weight:800;
    color:var(--text-primary);
  }

  .mec-tech-subtitle{
    margin:.2rem 0 0;
    color:var(--text-secondary);
    font-size:.9rem;
  }

  .mec-tech-tags{
    display:flex;
    gap:.45rem;
    flex-wrap:wrap;
  }

  .mec-tech-tag{
    display:inline-flex;
    align-items:center;
    padding:.28rem .62rem;
    border-radius:999px;
    font-size:.7rem;
    font-weight:700;
    letter-spacing:.08em;
    text-transform:uppercase;
    border:1px solid var(--border);
    background:rgba(30,74,50,.08);
    color:var(--primary-dark);
  }

  .mec-kpis-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(155px,1fr));
    gap:.75rem;
  }

  .mec-kpi-card{
    text-decoration:none;
    color:inherit;
    background:#fff;
    border:1px solid rgba(15,23,42,.08);
    border-radius:.95rem;
    padding:.85rem .75rem;
    text-align:center;
    box-shadow:0 6px 14px rgba(15,23,42,.08);
    transition:transform .18s ease, box-shadow .18s ease;
    position:relative;
    overflow:hidden;
  }

  .mec-kpi-card::before{
    content:"";
    position:absolute;
    left:0;
    right:0;
    top:0;
    height:3px;
    background:linear-gradient(90deg,var(--primary),var(--accent));
  }

  .mec-kpi-card:hover{
    transform:translateY(-2px);
    box-shadow:0 11px 19px rgba(15,23,42,.12);
  }

  .mec-kpi-num{
    font-size:1.7rem;
    font-weight:800;
    color:var(--primary-dark);
    line-height:1;
  }

  .mec-kpi-label{
    margin-top:.25rem;
    font-size:.7rem;
    font-weight:700;
    letter-spacing:.08em;
    text-transform:uppercase;
    color:var(--text-secondary);
  }

  .mec-section-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:.7rem;
    margin-bottom:.85rem;
    flex-wrap:wrap;
  }

  .mec-section-title{
    margin:0;
    font-size:1.06rem;
    font-weight:800;
    color:var(--text-primary);
    display:flex;
    gap:.45rem;
    align-items:center;
  }

  .mec-alert-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:.75rem;
  }

  .mec-alert-card{
    border:1px solid rgba(15,23,42,.08);
    border-radius:.9rem;
    padding:.8rem;
    background:#fff;
  }

  .mec-alert-top{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:.5rem;
    margin-bottom:.35rem;
  }

  .mec-alert-label{
    font-size:.82rem;
    font-weight:700;
    color:var(--text-primary);
  }

  .mec-alert-badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:30px;
    height:24px;
    border-radius:999px;
    padding:0 .45rem;
    font-size:.76rem;
    font-weight:800;
  }

  .mec-alert-badge.warn{ background:rgba(245,158,11,.18); color:#92400e; }
  .mec-alert-badge.info{ background:rgba(59,130,246,.15); color:#1e40af; }
  .mec-alert-badge.ok{ background:rgba(34,197,94,.16); color:#166534; }

  .mec-alert-note{
    margin:0;
    font-size:.8rem;
    color:var(--text-secondary);
  }

  .mec-alert-link{
    margin-top:.45rem;
    display:inline-flex;
    font-size:.8rem;
    font-weight:700;
    text-decoration:none;
  }

  .mec-figures-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
    gap:.75rem;
  }

  .mec-figure-card{
    border:1px solid rgba(15,23,42,.08);
    border-radius:.9rem;
    padding:.85rem;
    background:#fff;
  }

  .mec-figure-card h4{
    margin:0 0 .75rem;
    font-size:.95rem;
    font-weight:800;
    color:var(--text-primary);
  }

  .mec-bars-list{
    display:flex;
    flex-direction:column;
    gap:.35rem;
  }

  .mec-bar-row{
    display:grid;
    grid-template-columns:34px 1fr 34px;
    gap:.45rem;
    align-items:center;
  }

  .mec-bar-label{
    font-size:.75rem;
    color:var(--text-secondary);
    font-weight:700;
  }

  .mec-bar-track{
    height:9px;
    border-radius:999px;
    background:rgba(15,23,42,.08);
    overflow:hidden;
  }

  .mec-bar-fill{
    display:block;
    height:100%;
    background:linear-gradient(90deg,var(--primary-light),var(--primary-dark));
  }

  .mec-bar-value{
    text-align:right;
    font-size:.75rem;
    color:var(--text-primary);
    font-weight:700;
  }

  .mec-dist-list{
    display:flex;
    flex-direction:column;
    gap:.4rem;
  }

  .mec-dist-item{
    display:flex;
    justify-content:space-between;
    align-items:center;
    border:1px solid rgba(15,23,42,.08);
    border-radius:.6rem;
    padding:.45rem .55rem;
    background:rgba(15,46,29,.03);
    font-size:.84rem;
  }

  .mec-dist-item strong{
    font-weight:800;
    color:var(--text-primary);
  }

  .mec-weather-card{
    border:1px solid rgba(15,23,42,.08);
    border-radius:.75rem;
    padding:.7rem .8rem;
    background:linear-gradient(140deg, rgba(30,74,50,.09), rgba(34,197,94,.06));
  }

  .mec-weather-main{
    display:flex;
    align-items:flex-end;
    gap:.6rem;
    margin-bottom:.45rem;
  }

  #mec-weather-temp{
    font-size:1.45rem;
    font-weight:800;
    color:var(--text-primary);
    line-height:1;
  }

  #mec-weather-desc{
    font-size:.84rem;
    color:var(--text-secondary);
    font-weight:700;
  }

  .mec-weather-meta{
    display:flex;
    flex-direction:column;
    gap:.25rem;
    font-size:.78rem;
    color:var(--text-secondary);
  }

  .mec-figure-note{
    margin:.65rem 0 0;
    font-size:.78rem;
    color:var(--text-secondary);
  }

  .mec-lists-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
    gap:.75rem;
  }

  .mec-list-card{
    border:1px solid rgba(15,23,42,.08);
    border-radius:.9rem;
    padding:.8rem;
    background:#fff;
  }

  .mec-list-card h4{
    margin:0 0 .6rem;
    font-size:.92rem;
    font-weight:800;
    color:var(--text-primary);
  }

  .mec-list{
    list-style:none;
    margin:0;
    padding:0;
    display:flex;
    flex-direction:column;
    gap:.45rem;
  }

  .mec-list li{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:.6rem;
    padding:.5rem .55rem;
    border:1px solid rgba(15,23,42,.08);
    border-radius:.7rem;
    background:rgba(15,46,29,.03);
  }

  .mec-list-meta{
    margin-top:.1rem;
    font-size:.75rem;
    color:var(--text-secondary);
  }

  .mec-empty{
    margin:0;
    font-size:.84rem;
    color:var(--text-secondary);
  }

/* Source: code/sigmadp/templates/sigmadp/panel_usuario.html */
.panel-section-card{
    margin-bottom:1rem;
  }

  .panel-section-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:.75rem;
    margin-bottom:.9rem;
    flex-wrap:wrap;
  }

  .panel-section-title{
    margin:0;
    font-size:1.15rem;
    font-weight:800;
    color:var(--text-primary);
  }

  .panel-section-subtitle{
    margin:.2rem 0 0;
    color:var(--text-secondary);
    font-size:.86rem;
  }

  .panel-inner-card{
    margin-bottom:1rem;
  }

  .flow-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
    gap:.75rem;
    margin-bottom:.75rem;
  }

  .flow-step{
    display:flex;
    gap:.6rem;
    align-items:flex-start;
    padding:.65rem .75rem;
    border-radius:.75rem;
    background:rgba(30,74,50,.06);
    border:1px solid rgba(169,201,181,.45);
  }

  .flow-index{
    width:26px;
    height:26px;
    border-radius:999px;
    background:var(--primary);
    color:#fff;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-size:.75rem;
    font-weight:700;
  }

  .status-card .card-body{
    padding:.85rem;
  }

  .status-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:.75rem;
    padding:.5rem .6rem;
    border-radius:.65rem;
    background:rgba(15,46,29,.04);
    border:1px solid rgba(169,201,181,.35);
    margin-bottom:.6rem;
  }

  .status-row:last-child{
    margin-bottom:0;
  }

  .result-block{
    height:100%;
  }

  .result-block-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:.5rem;
    margin-bottom:.75rem;
  }

  .result-block-head h4{
    margin:0;
    font-size:.98rem;
    font-weight:800;
  }

  .result-row{
    border:1px solid rgba(169,201,181,.4);
    border-radius:.75rem;
    padding:.7rem;
    margin-bottom:.6rem;
    background:#fff;
  }

  .result-row:last-child{
    margin-bottom:0;
  }

  .result-row-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:.5rem;
    margin-bottom:.35rem;
  }

  .result-links{
    display:flex;
    gap:.4rem;
    flex-wrap:wrap;
    margin-top:.5rem;
  }

  @media (max-width:1024px){
    .flow-grid{
      grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
      gap:.6rem;
    }
    .grid.grid-2{
      grid-template-columns:1fr;
      gap:.75rem;
    }
    .status-card .card-body{
      padding:.65rem;
    }
  }

  @media (max-width:768px){
    .status-row{flex-direction:column;align-items:flex-start}
    .status-row .text-end{text-align:left;width:100%}
    .result-row-head{flex-direction:column;align-items:flex-start}
  }
  @media (max-width:640px){
    .result-row{
      padding:.6rem;
    }
    .status-card .card-body{
      padding:.55rem;
    }
  }

/* Source: code/sigmadp/templates/sigmadp/panel_tecnico.html */
.dp-summary-shell{
    max-width:1400px;
    margin:0 auto;
    display:flex;
    flex-direction:column;
    gap:1rem;
  }

  .dp-summary-card{
    background:var(--bg-card);
    border:1px solid rgba(15,23,42,.08);
    border-radius:1.2rem;
    padding:1.2rem;
    box-shadow:var(--shadow);
  }

  .dp-summary-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:.8rem;
    flex-wrap:wrap;
    margin-bottom:1rem;
  }

  .dp-summary-title{
    margin:0;
    font-size:1.5rem;
    font-weight:800;
    color:var(--text-primary);
  }

  .dp-summary-subtitle{
    margin:.2rem 0 0;
    color:var(--text-secondary);
    font-size:.9rem;
  }

  .dp-summary-tags{
    display:flex;
    gap:.45rem;
    flex-wrap:wrap;
  }

  .dp-summary-tag{
    display:inline-flex;
    align-items:center;
    padding:.28rem .62rem;
    border-radius:999px;
    font-size:.7rem;
    font-weight:700;
    letter-spacing:.08em;
    text-transform:uppercase;
    border:1px solid var(--border);
    background:rgba(30,74,50,.08);
    color:var(--primary-dark);
  }

  .dp-kpis-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(155px,1fr));
    gap:.75rem;
  }

  .dp-kpi-card{
    text-decoration:none;
    color:inherit;
    background:#fff;
    border:1px solid rgba(15,23,42,.08);
    border-radius:.95rem;
    padding:.85rem .75rem;
    text-align:center;
    box-shadow:0 6px 14px rgba(15,23,42,.08);
    transition:transform .18s ease, box-shadow .18s ease;
    position:relative;
    overflow:hidden;
  }

  .dp-kpi-card::before{
    content:"";
    position:absolute;
    left:0;
    right:0;
    top:0;
    height:3px;
    background:linear-gradient(90deg,var(--primary),var(--accent));
  }

  .dp-kpi-card:hover{
    transform:translateY(-2px);
    box-shadow:0 11px 19px rgba(15,23,42,.12);
  }

  .dp-kpi-num{
    font-size:1.7rem;
    font-weight:800;
    color:var(--primary-dark);
    line-height:1;
  }

  .dp-kpi-label{
    margin-top:.25rem;
    font-size:.7rem;
    font-weight:700;
    letter-spacing:.08em;
    text-transform:uppercase;
    color:var(--text-secondary);
  }

  .dp-section-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:.7rem;
    margin-bottom:.85rem;
    flex-wrap:wrap;
  }

  .dp-section-title{
    margin:0;
    font-size:1.06rem;
    font-weight:800;
    color:var(--text-primary);
    display:flex;
    gap:.45rem;
    align-items:center;
  }

  .dp-alert-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:.75rem;
  }

  .dp-alert-card{
    border:1px solid rgba(15,23,42,.08);
    border-radius:.9rem;
    padding:.8rem;
    background:#fff;
  }

  .dp-alert-top{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:.5rem;
    margin-bottom:.35rem;
  }

  .dp-alert-label{
    font-size:.82rem;
    font-weight:700;
    color:var(--text-primary);
  }

  .dp-alert-badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:30px;
    height:24px;
    border-radius:999px;
    padding:0 .45rem;
    font-size:.76rem;
    font-weight:800;
  }

  .dp-alert-badge.warn{ background:rgba(245,158,11,.18); color:#92400e; }
  .dp-alert-badge.info{ background:rgba(59,130,246,.15); color:#1e40af; }
  .dp-alert-badge.ok{ background:rgba(34,197,94,.16); color:#166534; }

  .dp-alert-note{
    margin:0;
    font-size:.8rem;
    color:var(--text-secondary);
  }

  .dp-alert-link{
    margin-top:.45rem;
    display:inline-flex;
    font-size:.8rem;
    font-weight:700;
    text-decoration:none;
  }

  .dp-plan-mini-list{
    list-style:none;
    margin:.45rem 0 0;
    padding:0;
    display:flex;
    flex-direction:column;
    gap:.25rem;
  }

  .dp-plan-mini-list li{
    display:grid;
    grid-template-columns:34px 1fr auto;
    align-items:center;
    gap:.4rem;
    font-size:.72rem;
    color:var(--text-secondary);
    border:1px dashed rgba(15,23,42,.12);
    border-radius:.5rem;
    padding:.3rem .4rem;
  }

  .dp-plan-mini-list li strong{
    color:var(--text-primary);
    font-size:.75rem;
  }

  .dp-figures-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
    gap:.75rem;
  }

  .dp-figure-card{
    border:1px solid rgba(15,23,42,.08);
    border-radius:.9rem;
    padding:.85rem;
    background:#fff;
  }

  .dp-figure-card h4{
    margin:0 0 .75rem;
    font-size:.95rem;
    font-weight:800;
    color:var(--text-primary);
  }

  .dp-bars-list{
    display:flex;
    flex-direction:column;
    gap:.35rem;
  }

  .dp-bar-row{
    display:grid;
    grid-template-columns:34px 1fr 34px;
    gap:.45rem;
    align-items:center;
  }

  .dp-bar-label{
    font-size:.75rem;
    color:var(--text-secondary);
    font-weight:700;
  }

  .dp-bar-track{
    height:9px;
    border-radius:999px;
    background:rgba(15,23,42,.08);
    overflow:hidden;
  }

  .dp-bar-fill{
    display:block;
    height:100%;
    background:linear-gradient(90deg,var(--primary-light),var(--primary-dark));
  }

  .dp-bar-value{
    text-align:right;
    font-size:.75rem;
    color:var(--text-primary);
    font-weight:700;
  }

  .dp-dist-list{
    display:flex;
    flex-direction:column;
    gap:.4rem;
  }

  .dp-dist-item{
    display:flex;
    justify-content:space-between;
    align-items:center;
    border:1px solid rgba(15,23,42,.08);
    border-radius:.6rem;
    padding:.45rem .55rem;
    background:rgba(15,46,29,.03);
    font-size:.84rem;
  }

  .dp-dist-item strong{
    font-weight:800;
    color:var(--text-primary);
  }

  .dp-figure-note{
    margin:.65rem 0 0;
    font-size:.78rem;
    color:var(--text-secondary);
  }

  .dp-weather-card{
    border:1px solid rgba(15,23,42,.08);
    border-radius:.75rem;
    padding:.7rem .8rem;
    background:linear-gradient(140deg, rgba(30,74,50,.09), rgba(34,197,94,.06));
  }

  .dp-weather-main{
    display:flex;
    align-items:flex-end;
    gap:.6rem;
    margin-bottom:.45rem;
  }

  #dp-weather-temp{
    font-size:1.45rem;
    font-weight:800;
    color:var(--text-primary);
    line-height:1;
  }

  #dp-weather-desc{
    font-size:.84rem;
    color:var(--text-secondary);
    font-weight:700;
  }

  .dp-weather-meta{
    display:flex;
    flex-direction:column;
    gap:.25rem;
    font-size:.78rem;
    color:var(--text-secondary);
  }

  .dp-lists-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
    gap:.75rem;
  }

  .dp-list-card{
    border:1px solid rgba(15,23,42,.08);
    border-radius:.9rem;
    padding:.8rem;
    background:#fff;
  }

  .dp-list-card h4{
    margin:0 0 .6rem;
    font-size:.92rem;
    font-weight:800;
    color:var(--text-primary);
  }

  .dp-list{
    list-style:none;
    margin:0;
    padding:0;
    display:flex;
    flex-direction:column;
    gap:.45rem;
  }

  .dp-list li{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:.6rem;
    padding:.5rem .55rem;
    border:1px solid rgba(15,23,42,.08);
    border-radius:.7rem;
    background:rgba(15,46,29,.03);
  }

  .dp-list-meta{
    margin-top:.1rem;
    font-size:.75rem;
    color:var(--text-secondary);
  }

  .dp-empty{
    margin:0;
    font-size:.84rem;
    color:var(--text-secondary);
  }





