/* avantilo.css — Rediseño minimalista CMMS Avantilo (Bootstrap 5 + custom) */

:root {
  --brand:        #D92D3A;
  --brand-600:    #C32430;
  --brand-700:    #A81E29;
  --brand-soft:   #FCE9EA;

  --bg:           #F6F7F9;
  --surface:      #FFFFFF;
  --border:       #ECEDF1;
  --border-2:     #E2E4E9;

  --ink:          #1B1F27;
  --ink-2:        #4A515E;
  --ink-3:        #7A8290;
  --ink-4:        #A5ACB8;

  --blue:   #2563EB;  --blue-soft:   #E8EEFD;
  --green:  #15A35A;  --green-soft:  #E4F4EB;
  --amber:  #E08A00;  --amber-soft:  #FBF0DC;
  --cyan:   #0E8FAA;  --cyan-soft:   #E0F2F6;
  --red:    #D92D3A;  --red-soft:    #FCE9EA;

  --radius:   12px;
  --radius-lg:16px;
  --shadow:   0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.03);
  --sidebar-w: 250px;
  --sidebar-collapsed: 74px;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
}

.app { display: flex; min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--brand);
  color: #fff;
  display: flex;
  flex-direction: column;
  z-index: 1045;
  transition: width .2s ease, transform .25s ease;
}

.main {
  flex: 1;
  min-width: 0;
  margin-left: var(--sidebar-w);
  transition: margin-left .2s ease;
  display: flex;
  flex-direction: column;
}

.app.is-collapsed .sidebar { width: var(--sidebar-collapsed); }
.app.is-collapsed .main { margin-left: var(--sidebar-collapsed); }

.sb-head {
  display: flex; align-items: center; gap: 11px;
  padding: 18px 18px 16px;
}
.sb-logo {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 7px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.14);
}
.sb-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0);
  -webkit-filter: brightness(0);
}
.app.is-collapsed .sb-logo { cursor: pointer; }
.sb-brand { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; }
.sb-collapse {
  margin-left: auto;
  width: 26px; height: 26px; border-radius: 7px;
  border: none; cursor: pointer;
  background: rgba(255,255,255,.16); color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.sb-collapse:hover { background: rgba(255,255,255,.28); }

.sb-nav { padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; }
.sb-nav::-webkit-scrollbar { width: 0; }

.sb-link {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; border-radius: 9px;
  color: rgba(255,255,255,.82);
  text-decoration: none;
  font-size: 13.5px; font-weight: 500;
  white-space: nowrap;
  transition: background .14s, color .14s;
}
.sb-link i { font-size: 16px; width: 20px; text-align: center; flex: 0 0 auto; }
.sb-link:hover { background: rgba(255,255,255,.10); color: #fff; }
.sb-link.active { background: rgba(255,255,255,.18); color: #fff; font-weight: 600; }
.sb-link.active::before {
  content: ""; position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; background: #fff; border-radius: 0 3px 3px 0;
}

.sb-foot { padding: 12px; border-top: 1px solid rgba(255,255,255,.14); display: flex; flex-direction: column; gap: 8px; }
.sb-version { font-size: 10.5px; color: rgba(255,255,255,.6); padding: 0 4px 2px; letter-spacing: .02em; }
.sb-chip {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px; border-radius: 9px;
  background: rgba(255,255,255,.12);
  color: #fff; font-size: 12.5px; font-weight: 600;
  border: none; cursor: pointer; text-decoration: none;
  transition: background .15s;
}
.sb-chip:hover { background: rgba(255,255,255,.22); color: #fff; }
.sb-chip.logout { background: rgba(0,0,0,.16); }
.sb-chip.logout:hover { background: rgba(0,0,0,.28); }

.app.is-collapsed .sb-brand,
.app.is-collapsed .sb-link span,
.app.is-collapsed .sb-version,
.app.is-collapsed .sb-chip span { display: none; }
.app.is-collapsed .sb-head {
  flex-direction: column;
  justify-content: center;
  padding: 14px 0 12px;
  gap: 8px;
}
.app.is-collapsed .sb-head .sb-collapse {
  display: flex;
  margin-left: 0;
}
.app.is-collapsed .sb-link { justify-content: center; padding: 11px 0; }
.app.is-collapsed .sb-link.active::before { left: 0; }
.app.is-collapsed .sb-chip { padding: 10px 0; }

.topbar {
  display: none;
  align-items: center; gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 1030;
}
.topbar .hamb {
  width: 38px; height: 38px; border-radius: 9px;
  border: 1px solid var(--border-2); background: #fff; color: var(--ink-2);
  display: flex; align-items: center; justify-content: center; font-size: 18px; cursor: pointer;
}
.topbar .tb-brand { display: flex; align-items: center; gap: 9px; font-weight: 700; flex: 1; min-width: 0; }
.topbar .tb-logo { width: 28px; height: 28px; border-radius: 8px; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.topbar .tb-logo img { width: 100%; height: 100%; object-fit: contain; filter: brightness(0) invert(1); }
.topbar .tb-title { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sb-backdrop {
  display: none;
  position: fixed; inset: 0; background: rgba(16,24,40,.45);
  z-index: 1040; opacity: 0; transition: opacity .2s;
}

.content {
  position: relative;
  padding: 24px 28px 32px;
  max-width: 1500px;
  width: 100%;
}

/* Tab / section transitions — Avantilo CMMS */
.main > .content,
.main .content,
.tab-content-host {
  overflow: visible;
}

.tab-content-host {
  position: relative;
}

/* Contenedor que cambia al alternar pestañas (p. ej. Peticiones, Documentación) */
.content .tab-content.tab-content-host {
  min-height: 220px;
}

/* Altura mínima al cargar para centrar logo + spinner en el área visible */
.main > .content.is-tab-loading,
.tab-content-host.is-tab-loading {
  min-height: min(72vh, calc(100dvh - 96px));
}

.tab-spinner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.78);
  pointer-events: none;
}

.tab-spinner-overlay.is-visible {
  display: flex;
}

.tab-spinner-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin: auto;
  text-align: center;
}

.tab-spinner-logo {
  width: 180px;
  height: auto;
  max-height: 180px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.tab-spinner {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: 2.5px solid transparent;
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.tab-progress-track {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 50;
  pointer-events: none;
  overflow: hidden;
}

.tab-progress-bar {
  display: block;
  height: 100%;
  width: 0;
  background: var(--brand);
  box-shadow: 0 0 6px rgba(217, 45, 58, 0.45);
  opacity: 0;
}

.tab-progress-bar.is-active {
  opacity: 1;
  animation: tabProgressLoad 0.3s ease forwards;
}

.tab-progress-bar.is-fade-out {
  opacity: 0;
  transition: opacity 0.15s ease;
}

@keyframes tabProgressLoad {
  0%   { width: 0%; }
  70%  { width: 88%; }
  100% { width: 100%; }
}

.tab-enter {
  animation: tabContentEnter 0.3s ease forwards;
  will-change: opacity, transform;
}

.tab-pane.fade.tab-enter {
  transition: none !important;
}

@keyframes tabContentEnter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-title { display: flex; align-items: center; gap: 11px; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.page-title .pt-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 19px; }
.page-sub { margin: 5px 0 0 49px; color: var(--ink-3); font-size: 13px; }

.card-x {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.filter-card { padding: 16px 18px; margin-bottom: 18px; }
.filter-row { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.filter-field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 240px; min-width: 0; }
.filter-field.grow { flex: 2 1 320px; }
.fl-label { font-size: 12px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fl-label .badge-soft { background: var(--brand-soft); color: var(--brand); font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; }
.fl-hint { font-size: 11.5px; color: var(--ink-4); }
.form-control-x {
  width: 100%;
  border: 1px solid var(--border-2); border-radius: 9px;
  padding: 9px 12px; font-size: 13.5px; color: var(--ink); background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.form-control-x:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
.filter-actions { display: flex; gap: 8px; flex: 0 0 auto; }

.btn-x { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 9px; font-size: 13px; font-weight: 600; cursor: pointer; border: 1px solid transparent; transition: all .15s; white-space: nowrap; }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-600); color: #fff; }
.btn-ghost { background: #fff; border-color: var(--border-2); color: var(--ink-2); }
.btn-ghost:hover { background: var(--bg); border-color: var(--ink-4); color: var(--ink-2); }

.kpi-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 16px 16px 14px;
  display: flex; flex-direction: column; gap: 9px;
  min-width: 0;
}
.kpi-top { display: flex; align-items: center; justify-content: space-between; }
.kpi-ico { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.kpi-chip { font-size: 11px; font-weight: 600; color: var(--ink-3); background: var(--bg); border-radius: 999px; padding: 2px 8px; }
.kpi-label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.kpi-value { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; color: var(--ink); }
.kpi-value .u { font-size: 13px; font-weight: 500; color: var(--ink-3); margin-left: 3px; letter-spacing: 0; }

.i-blue  { background: var(--blue-soft);  color: var(--blue); }
.i-green { background: var(--green-soft); color: var(--green); }
.i-amber { background: var(--amber-soft); color: var(--amber); }
.i-cyan  { background: var(--cyan-soft);  color: var(--cyan); }
.i-red   { background: var(--red-soft);   color: var(--red); }

.lower-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; margin-bottom: 18px; }
.module { padding: 18px 20px; display: flex; flex-direction: column; }
.module-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.module-title { font-size: 14.5px; font-weight: 700; color: var(--ink); margin: 0; }
.module-sub { font-size: 11.5px; color: var(--ink-4); margin: 2px 0 0; }
.seg { display: flex; gap: 4px; background: var(--bg); padding: 3px; border-radius: 9px; }
.seg button { border: none; background: transparent; font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 5px 11px; border-radius: 7px; cursor: pointer; }
.seg button.on { background: #fff; color: var(--brand); box-shadow: var(--shadow); }

.chart-box { position: relative; height: 230px; }

.donut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.legend { display: flex; flex-direction: column; gap: 11px; flex: 1; min-width: 140px; }
.legend-item { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; }
.legend-item .lg-name { color: var(--ink-2); }
.legend-item .lg-val { margin-left: auto; font-weight: 700; color: var(--ink); }

.empty-note { font-size: 11.5px; color: var(--ink-4); margin-top: 12px; display: flex; align-items: center; gap: 6px; }

/* Equipos checkboxes en filtro */
.equipos-container {
  border: 1px solid var(--border-2);
  border-radius: 9px;
  padding: 12px;
  max-height: 160px;
  overflow-y: auto;
  background: var(--bg);
  transition: border-color .15s;
}
.equipos-container:hover { border-color: var(--brand); }
.equipos-container .form-check { margin-bottom: 6px; }
.equipos-container .form-check-label { cursor: pointer; font-size: 13px; }
.equipos-container .form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }

.filter-alert {
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--blue-soft);
  border-radius: 9px;
  font-size: 12.5px;
  color: var(--ink-2);
  display: none;
}
.filter-alert.visible { display: flex; align-items: center; gap: 8px; }

/* Tablas inferiores — paneles simétricos */
.tables-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.dash-panels .dash-panel {
  display: flex;
  flex-direction: column;
  min-height: 420px;
  padding: 0;
  overflow: hidden;
}

.dash-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fff 0%, var(--bg) 100%);
  flex-shrink: 0;
}

.dash-panel-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.dash-panel-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.dash-panel-title .module-title { font-size: 15px; }
.dash-panel-title .module-sub { margin-top: 3px; }

.dash-panel-badge {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-3);
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 999px;
  padding: 6px 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-sm-x { padding: 7px 12px; font-size: 12px; }

.dash-table-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0;
}

.dash-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  table-layout: fixed;
}

.dash-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #F0F2F5;
  color: var(--ink-2);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 11px 14px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--border-2);
}

.dash-table thead th.col-num,
.dash-table thead th.col-status,
.dash-table thead th.col-date { text-align: center; }

.dash-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--ink-2);
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-table tbody td.col-num,
.dash-table tbody td.col-status,
.dash-table tbody td.col-date { text-align: center; }

.dash-table tbody tr:nth-child(even):not(.row-empty) { background: rgba(246, 247, 249, .65); }
.dash-table tbody tr:hover:not(.row-empty) { background: var(--brand-soft); }
.dash-table tbody tr:last-child td { border-bottom: none; }

.dash-table .col-equipo { width: 30%; text-align: left; }
.dash-table .col-text { width: 24%; text-align: left; }
.dash-table .col-date { width: 20%; text-align: center; }
.dash-table .col-num { width: 11%; text-align: center; }
.dash-table .col-status { width: 15%; text-align: center; }

.dash-table--resumen .col-equipo { width: 28%; }
.dash-table--resumen .col-num { width: 14.4%; }

.dash-table .equipo-name {
  display: block;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-table .equipo-code {
  display: block;
  font-size: 11px;
  color: var(--ink-4);
  margin-top: 2px;
}

.dash-table .cell-metric {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--ink);
  font-size: 13px;
}

.dash-table .cell-metric .unit {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-4);
  margin-left: 2px;
}

.dash-table .cell-metric.ok { color: var(--green); }
.dash-table .cell-metric.warn { color: var(--amber); }
.dash-table .cell-metric.danger { color: var(--red); }
.dash-table .cell-metric.info { color: var(--blue); }

.dash-table .cell-date {
  font-size: 12px;
  color: var(--ink-3);
  white-space: nowrap;
}

.dash-table .row-empty td {
  text-align: center;
  color: var(--ink-4);
  padding: 56px 24px;
  font-size: 13px;
  line-height: 1.5;
}

.table-module { padding: 0; overflow: hidden; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table thead th {
  position: sticky; top: 0;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .03em;
  padding: 10px 14px;
  text-align: left;
  white-space: nowrap;
}
.data-table tbody td { padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--ink-2); }
.data-table tbody tr:hover { background: var(--bg); }
.data-table tbody tr:last-child td { border-bottom: none; }

.badge-pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.badge-pill.warn { background: var(--amber-soft); color: var(--amber); }
.badge-pill.ok { background: var(--green-soft); color: var(--green); }
.badge-pill.info { background: var(--blue-soft); color: var(--blue); }
.badge-pill.danger { background: var(--red-soft); color: var(--red); }

.demo-toast {
  position: fixed; top: 20px; right: 20px; z-index: 9999;
  min-width: 300px; max-width: 420px;
  padding: 14px 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(16,24,40,.12);
  font-size: 13px; color: var(--ink-2);
}

@media (max-width: 1200px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .lower-grid, .tables-grid { grid-template-columns: 1fr; }
  .dash-panels .dash-panel { min-height: 360px; }
}
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); width: var(--sidebar-w); }
  .app.nav-open .sidebar { transform: translateX(0); box-shadow: 0 0 40px rgba(0,0,0,.25); }
  .app.nav-open .sb-backdrop { display: block; opacity: 1; }
  .main { margin-left: 0; }
  .topbar { display: flex; }
  .content { padding: 18px 16px 28px; }
  .app.is-collapsed .sidebar { width: var(--sidebar-w); }
  .app.is-collapsed .sb-brand, .app.is-collapsed .sb-link span,
  .app.is-collapsed .sb-version, .app.is-collapsed .sb-chip span { display: inline; }
}
@media (max-width: 680px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpi-value { font-size: 26px; }
  .page-sub { margin-left: 0; }
  .filter-actions { width: 100%; }
  .filter-actions .btn-x { flex: 1; justify-content: center; }
}
@media (max-width: 360px) {
  .kpi-grid { grid-template-columns: 1fr; }
}

/* ============ Notificaciones ============ */
.notif-wrap {
  position: relative;
  flex-shrink: 0;
  margin-left: auto;
}

.notif-wrap--desktop {
  position: fixed;
  top: 16px;
  right: 20px;
  z-index: 1036;
}

.notif-bell {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border-2);
  background: var(--surface);
  color: var(--ink-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.notif-bell:hover,
.notif-wrap.is-open .notif-bell {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand);
}

.notif-bell.has-unread {
  border-color: var(--brand);
  color: var(--brand);
}

.notif-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(217, 45, 58, 0.35);
}

.notif-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, 0.35);
  z-index: 1048;
}

.notif-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(380px, calc(100vw - 24px));
  max-height: min(70vh, 520px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(16, 24, 40, 0.16);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.notif-wrap--desktop .notif-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
}

.notif-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fff 0%, var(--bg) 100%);
  flex-shrink: 0;
}

.notif-panel-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.notif-panel-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notif-panel-close:hover { background: var(--bg); color: var(--ink); }

.notif-panel-body {
  overflow-y: auto;
  flex: 1;
  padding: 8px;
}

.notif-empty {
  padding: 32px 20px;
  text-align: center;
  color: var(--ink-4);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.notif-empty i { font-size: 28px; color: var(--green); }

.notif-item {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s;
}

.notif-item:hover {
  background: var(--bg);
  border-color: var(--border);
}

.notif-item.is-unread {
  background: var(--brand-soft);
  border-color: rgba(217, 45, 58, 0.15);
}

.notif-item-ico {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.notif-type-req { background: var(--blue-soft); color: var(--blue); }
.notif-type-ord { background: var(--amber-soft); color: var(--amber); }

.notif-item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.notif-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.notif-item-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-item-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-4);
  flex-shrink: 0;
}

.notif-item-desc {
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notif-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 11.5px;
  color: var(--ink-3);
}

.notif-item-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.notif-item-equipo {
  font-size: 11.5px;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 4px;
}

.notif-item-arrow {
  color: var(--ink-4);
  font-size: 14px;
  margin-top: 10px;
  flex-shrink: 0;
}

@media (min-width: 992px) {
  .topbar { display: none; }
  .topbar .notif-wrap { display: none; }
}

@media (max-width: 991.98px) {
  .notif-panel {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 78vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    animation: notifSlideUp 0.22s ease;
  }
}

@keyframes notifSlideUp {
  from { transform: translateY(100%); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}
