/* ============================================================
   ITSM DASHBOARD
   Aligned with Stitch SC Redesign Mockups
   Fonts: Lexend (headings) + Inter (body/UI)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* ============================================================
   CSS DESIGN TOKENS
   ============================================================ */
:root {
  /* Fonts */
  --font-heading: 'Lexend', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Color Palette — Executive Prism Dark */
  --bg-app: #2a354b;
  --bg-sidebar: #060e20;
  --surface: #0a0f1a;
  --surface-dim: #0b1326;
  --surface-container-low: #131b2e;
  --surface-container: #171f33;
  --surface-container-high: #222a3d;
  --surface-container-highest: #2d3449;
  --surface-bright: #31394d;

  /* Text */
  --on-surface: #dae2fd;
  --on-surface-variant: #c4c7c9;
  --text-muted: #8e9193;
  --text-dark: #444749;

  /* Borders */
  --outline: #8e9193;
  --outline-variant: #444749;
  --border-glass: rgba(255, 255, 255, 0.07);
  --border-card-top: rgba(255, 255, 255, 0.09);

  /* Accent Colors (Functional, used sparingly) */
  --color-success: #10b981;
  /* Emerald */
  --color-warning: #f59e0b;
  /* Amber */
  --color-danger: #ef4444;
  /* Rose */
  --color-info: #3b82f6;
  /* Blue */
  --color-violet: #8b5cf6;
  /* Violet */

  /* Status chip backgrounds */
  --chip-success-bg: rgba(16, 185, 129, 0.10);
  --chip-warning-bg: rgba(245, 158, 11, 0.10);
  --chip-danger-bg: rgba(239, 68, 68, 0.10);
  --chip-info-bg: rgba(59, 130, 246, 0.10);
  --chip-violet-bg: rgba(139, 92, 246, 0.10);

  /* Layout */
  --sidebar-width: 280px;
  --header-height: 65px;
  --content-max: 100%;
  --content-padding: 2rem;

  /* Spacing (8px base unit) */
  --sp-1: 0.25rem;
  /* 4px  */
  --sp-2: 0.5rem;
  /* 8px  */
  --sp-3: 0.75rem;
  /* 12px */
  --sp-4: 1rem;
  /* 16px */
  --sp-5: 1.25rem;
  /* 20px */
  --sp-6: 1.5rem;
  /* 24px */
  --sp-8: 2rem;
  /* 32px */
  --sp-10: 2.5rem;
  /* 40px */
  --sp-12: 3rem;
  /* 48px */

  /* Border Radius */
  --radius-sm: 0.25rem;
  /* 4px  */
  --radius: 0.5rem;
  /* 8px  */
  --radius-md: 0.75rem;
  /* 12px */
  --radius-lg: 1rem;
  /* 16px */
  --radius-xl: 1.5rem;
  /* 24px */
  --radius-full: 9999px;

  /* Shadows & Depth */
  --shadow-card: 0 20px 50px rgba(0, 0, 0, 0.30);
  --shadow-sidebar: 4px 0 24px rgba(0, 0, 0, 0.3);

  /* Transitions */
  --t-fast: 0.15s ease;
  --t-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --t-spring: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  background-color: var(--bg-app);
  color: var(--on-surface);
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse at 0% 0%, rgba(139, 92, 246, 0.06) 0%, transparent 55%),
    radial-gradient(ellipse at 100% 100%, rgba(59, 130, 246, 0.04) 0%, transparent 55%);
  background-attachment: fixed;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
}

ul,
ol {
  list-style: none;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: var(--surface-container-low);
}

::-webkit-scrollbar-thumb {
  background: var(--surface-container-highest);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--outline);
}

/* ============================================================
   GLASS CARD MIXIN (shared style for all glass surfaces)
   ============================================================ */
.glass-card {
  background: rgba(23, 31, 51, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-card-top);
  border-left: 1px solid var(--border-glass);
  border-right: 1px solid var(--border-glass);
  border-bottom: 1px solid var(--border-glass);
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-xl);
  transition: transform var(--t-spring), box-shadow var(--t-normal);
}

.glass-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.38);
}

/* ============================================================
   APP LAYOUT
   ============================================================ */
#app-layout {
  display: flex;
  min-height: 100vh;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
#sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow-sidebar);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 200;
  padding: var(--sp-6);
  overflow-y: auto;
}

/* Brand */
.brand-section {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-8);
  flex-shrink: 0;
}

.brand-logo-wrap {
  width: 110px;
  height: 60px;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--on-surface);
  flex-shrink: 0;
}

.brand-logo {
  width: 96px;
  height: 86px;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--on-surface);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.brand-sub {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.7;
  margin-top: 1px;
}

/* Nav Menu */
.nav-menu {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  flex-grow: 1;
}

.nav-item a {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  color: var(--on-surface-variant);
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color var(--t-fast), background var(--t-fast);
}

.nav-item a i {
  font-size: 1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.nav-item a:hover {
  color: var(--on-surface);
  background: rgba(255, 255, 255, 0.04);
}

.nav-item.active a {
  background: var(--surface-container-highest);
  color: var(--on-surface);
}

/* Sidebar Footer */
.sidebar-footer-area {
  margin-top: auto;
  padding-top: var(--sp-6);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.sidebar-footer-link {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  color: var(--text-muted);
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: color var(--t-fast), background var(--t-fast);
}

.sidebar-footer-link i {
  font-size: 0.9rem;
  width: 20px;
  text-align: center;
}

.sidebar-footer-link:hover {
  color: var(--on-surface);
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-footer {
  margin-top: var(--sp-4);
  font-size: 0.7rem;
  color: var(--text-dark);
  text-align: center;
  padding-top: var(--sp-3);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
#main-content {
  margin-left: var(--sidebar-width);
  flex-grow: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   STICKY HEADER / TOPBAR
   ============================================================ */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 19, 38, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--content-padding);
  gap: var(--sp-6);
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  flex: 1;
  min-width: 0;
}

.page-title-area {
  min-width: 0;
}

.page-title-area h1 {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--on-surface);
  letter-spacing: -0.02em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-title-area p {
  font-size: 0.75rem;
  color: var(--on-surface-variant);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-shrink: 0;
}

/* Data connection status pill */
.status-indicator {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--color-success);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 8px var(--color-success);
  flex-shrink: 0;
}

/* ============================================================
   CONTENT AREA
   ============================================================ */
.content-area {
  flex: 1;
  padding: var(--sp-8) var(--content-padding);
  max-width: var(--content-max);
  width: 100%;
}

/* Page heading (below sticky header) */
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: var(--sp-10);
  gap: var(--sp-4);
}

.page-heading-text h2 {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 600;
  color: var(--on-surface);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.page-heading-text p {
  color: var(--on-surface-variant);
  font-size: 0.9375rem;
  margin-top: var(--sp-2);
}

/* ============================================================
   DASHBOARD VIEWS
   ============================================================ */
.dashboard-view {
  display: none;
  animation: fadeSlideIn 0.35s ease-out;
}

.dashboard-view.active {
  display: block;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   KPI CARDS GRID
   ============================================================ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-6);
  margin-bottom: var(--sp-8);
}

.kpi-card {
  /* inherits glass-card */
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 160px;
  position: relative;
  overflow: hidden;
}

.kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--sp-3);
}

.kpi-title {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--on-surface-variant);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.2;
  max-width: 65%;
}

.kpi-icon-wrapper {
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--on-surface-variant);
  flex-shrink: 0;
}

/* Color variants for icon wrappers */
.kpi-card.purple .kpi-icon-wrapper {
  background: var(--chip-violet-bg);
  color: var(--color-violet);
}

.kpi-card.cyan .kpi-icon-wrapper {
  background: rgba(6, 182, 212, 0.1);
  color: #06b6d4;
}

.kpi-card.green .kpi-icon-wrapper {
  background: var(--chip-success-bg);
  color: var(--color-success);
}

.kpi-card.warning .kpi-icon-wrapper {
  background: var(--chip-warning-bg);
  color: var(--color-warning);
}

.kpi-card.blue .kpi-icon-wrapper {
  background: var(--chip-info-bg);
  color: var(--color-info);
}

.kpi-card.danger .kpi-icon-wrapper {
  background: var(--chip-danger-bg);
  color: var(--color-danger);
}

.kpi-value-area {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.kpi-value {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 600;
  color: var(--on-surface);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

/* SLA card — value is emerald */
.kpi-card.green .kpi-value {
  color: var(--color-success);
}

/* "Servicio más demandado" — smaller font for long text */
.kpi-value.text-fit {
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.kpi-footer {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.6875rem;
  color: var(--on-surface-variant);
  flex-wrap: wrap;
  margin-top: var(--sp-1);
}

/* Small pill badge (Q2 2026, etc.) */
.kpi-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: var(--surface-container-highest);
  color: var(--on-surface-variant);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* SLA value badge inside footer */
.kpi-sla-badge {
  font-weight: 700;
  color: var(--color-success);
}

/* ============================================================
   CHARTS GRID LAYOUT
   ============================================================ */
.content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--sp-6);
  margin-bottom: var(--sp-8);
}

.content-grid.equal {
  grid-template-columns: 1fr 1fr;
}

.content-grid.full-width {
  grid-template-columns: 1fr;
}

/* ============================================================
   CARDS (Charts / Tables)
   ============================================================ */
.card {
  /* inherits glass-card */
  padding: var(--sp-8);
  margin-bottom: var(--sp-6);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--sp-8);
  gap: var(--sp-4);
}

.card-header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--on-surface);
  letter-spacing: -0.01em;
}

.card-subtitle {
  font-size: 0.8125rem;
  color: var(--on-surface-variant);
  font-weight: 400;
}

/* Chart containers */
.chart-container {
  position: relative;
  width: 100%;
  height: 280px;
}

/* ============================================================
   FILTER PANEL
   ============================================================ */
.filter-panel {
  margin-bottom: var(--sp-6);
  /* also inherits glass-card */
  padding: var(--sp-6);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

.filter-panel-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-title {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-surface);
}

.filter-summary {
  font-size: 0.75rem;
  color: var(--on-surface-variant);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.report-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(129, 140, 248, 0.2), rgba(45, 212, 191, 0.16));
  color: var(--on-surface);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}

.report-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.22);
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  color: var(--on-surface-variant);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
}

.filter-chip:hover {
  background: var(--surface-container-high);
  color: var(--on-surface);
}

.filter-chip.active {
  background: var(--surface-container-highest);
  color: var(--color-info);
  border-color: rgba(255, 253, 253, 0.12);
}

/* ============================================================
   DATA TABLES
   ============================================================ */
.table-container {
  overflow-x: auto;
}

.table-controls-spaced {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.table-controls-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-controls-group-right {
  margin-left: auto;
}

.small-muted-text {
  font-size: 0.9rem;
  opacity: 0.8;
}

.table-controls-filter {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.form-label {
  font-weight: 600;
  margin-right: 0.5rem;
  color: var(--on-surface);
}

.th-center {
  text-align: center;
}

.table-loading-cell {
  text-align: center;
  color: var(--text-muted);
  padding: 2.5rem;
}

.loading-icon {
  margin-right: 8px;
}

.card-no-padding {
  padding: 0;
  overflow: hidden;
}

.card-header-compact {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 0;
}

.kpi-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.kpi-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.calendar-toolbar {
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.calendar-month-label {
  font-weight: 700;
  font-size: 1.05rem;
}

.calendar-summary {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.card-compact {
  padding: 0.75rem;
}

.page-title-subtitle {
  margin-top: 0.25rem;
  color: var(--on-surface-variant);
  font-size: 0.875rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.8375rem;
}

.data-table thead tr {
  background: rgba(34, 42, 61, 0.5);
}

.data-table th {
  padding: 14px 24px;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--on-surface-variant);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table td {
  padding: 16px 24px;
  color: var(--on-surface);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background var(--t-fast);
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* Pagination controls (used by tickets and inventory tables) */
.pagination {
  display: flex;
  gap: 8px;
  align-items: center;
}

.pagination-btn {
  appearance: none;
  background: rgba(255, 255, 255, 0.03);
  color: var(--on-surface);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 6px 10px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1;
  transition: background var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}

.pagination-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.pagination-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.pagination-btn.active,
.pagination-btn.active:disabled {
  background: var(--surface-container-highest);
  color: var(--on-surface);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

/* Ticket ID — bold primary */
.td-id {
  font-weight: 700;
  color: var(--on-surface);
  font-family: var(--font-heading);
}

/* Date */
.td-date {
  color: var(--on-surface-variant);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* Code badges (location, service IDs) */
.td-code {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* ============================================================
   STATUS CHIPS (Dot + Label)
   ============================================================ */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid transparent;
  white-space: nowrap;
}

.chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-chip.resolved {
  background: var(--chip-success-bg);
  color: var(--color-success);
  border-color: rgba(16, 185, 129, 0.2);
}

.status-chip.resolved .chip-dot {
  background: var(--color-success);
}

.status-chip.pending {
  background: var(--chip-warning-bg);
  color: var(--color-warning);
  border-color: rgba(245, 158, 11, 0.2);
}

.status-chip.pending .chip-dot {
  background: var(--color-warning);
}

.status-chip.progress {
  background: var(--chip-info-bg);
  color: var(--color-info);
  border-color: rgba(59, 130, 246, 0.2);
}

.status-chip.progress .chip-dot {
  background: var(--color-info);
}

/* ============================================================
   PRIORITY LABELS
   ============================================================ */
.priority {
  font-weight: 700;
  font-size: 0.8125rem;
}

.priority.critica {
  color: var(--color-danger);
}

.priority.alta {
  color: var(--color-warning);
}

.priority.media {
  color: var(--color-info);
}

.priority.baja {
  color: var(--text-muted);
}

.priority.programado {
  color: var(--color-violet);
}

/* ============================================================
   SLA ICON IN TABLE
   ============================================================ */
.sla-icon {
  font-size: 1.1rem;
}

.sla-icon.met {
  color: var(--color-success);
}

.sla-icon.missed {
  color: rgba(255, 255, 255, 0.15);
}

/* ============================================================
   QUICK LIST (Hardware top devices)
   ============================================================ */
.quick-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.quick-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-3) var(--sp-4);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  transition: background var(--t-fast);
}

.quick-list-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.item-name {
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.3;
}

.item-sub {
  font-size: 0.6875rem;
  color: var(--on-surface-variant);
}

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

.metric-val {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-warning);
  line-height: 1;
}

.metric-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ============================================================
   SLA PROGRESS BARS (Locations view)
   ============================================================ */
.sla-bar-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.sla-bar-row {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.sla-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  font-weight: 500;
}

.sla-bar-pct {
  font-weight: 700;
}

.sla-bar-pct.good {
  color: var(--color-success);
}

.sla-bar-pct.warning {
  color: var(--color-warning);
}

.sla-bar-pct.danger {
  color: var(--color-danger);
}

.sla-bar-track {
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--surface-container-highest);
  overflow: hidden;
}

.sla-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s ease;
}

.sla-bar-fill.good {
  background: var(--color-success);
}

.sla-bar-fill.warning {
  background: var(--color-warning);
}

.sla-bar-fill.danger {
  background: var(--color-danger);
}

/* ============================================================
   TICKET COUNT BUBBLE (Inventory)
   ============================================================ */
.ticket-bubble {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--surface-container-highest);
  color: var(--on-surface);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0 var(--sp-2);
}

.ticket-bubble.hot {
  background: rgba(239, 68, 68, 0.15);
  color: var(--color-danger);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.text-success {
  color: var(--color-success) !important;
}

.text-warning {
  color: var(--color-warning) !important;
}

.text-danger {
  color: var(--color-danger) !important;
}

.text-info {
  color: var(--color-info) !important;
}

.text-violet {
  color: var(--color-violet) !important;
}

.text-muted {
  color: var(--text-muted) !important;
}

.fw-bold {
  font-weight: 700;
}

.fw-medium {
  font-weight: 500;
}

/* Calendar badges: 80x80 white badges with 10px font */
.calendar-grid .calendar-cell {
  align-items: flex-start;
}

.calendar-grid .calendar-cell .cal-event-badge {
  width: 80px;
  height: 80px;
  min-height: 80px;
  background: #ffffff;
  color: var(--text-dark);
  font-size: 10px;
  font-weight: 400;
  font-family: var(--font-body);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  line-height: 1.1;
}

.calendar-grid .calendar-cell {
  min-height: 110px;
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */
@media (max-width: 1280px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1100px) {

  .content-grid,
  .content-grid.equal {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  :root {
    --sidebar-width: 80px;
    --content-padding: 1.25rem;
  }

  .brand-text,
  .nav-item a span,
  .sidebar-footer-link span,
  .sidebar-footer {
    display: none;
  }

  .brand-section {
    justify-content: center;
    margin-bottom: var(--sp-6);
  }

  .brand-logo-wrap {
    margin: 0 auto;
  }

  .nav-item a {
    justify-content: center;
    padding: var(--sp-3);
  }

  .nav-item a i {
    width: auto;
    font-size: 1.15rem;
  }

  .sidebar-footer-link {
    justify-content: center;
    padding: var(--sp-3);
  }

  .sidebar-footer-link i {
    width: auto;
  }
}

@media (max-width: 640px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .page-heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-heading-text h2 {
    font-size: 1.5rem;
  }

  header {
    flex-wrap: wrap;
    height: auto;
    padding: var(--sp-3) var(--sp-4);
    gap: var(--sp-2);
  }

  .filter-panel {
    flex-direction: column;
    align-items: flex-start;
  }
}