/* ── Brand Tokens (Stacki) ───────────────────── */
:root {
  /* Brand colors */
  --stacki-navy:    #0A1E3D;
  --stacki-primary: #1E5FBF;
  --stacki-accent:  #3BA9FF;
  --stacki-light:   #6DC9FF;
  --stacki-white:   #FFFFFF;

  /* Neutrals */
  --stacki-gray-50:  #F8FAFC;
  --stacki-gray-100: #F1F5F9;
  --stacki-gray-300: #CBD5E1;
  --stacki-gray-500: #64748B;
  --stacki-gray-700: #334155;

  /* Semantic */
  --stacki-success: #10B981;
  --stacki-warning: #F59E0B;
  --stacki-danger:  #EF4444;
  --stacki-info:    #3BA9FF;

  /* Typography */
  --stacki-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --stacki-font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;

  /* Radius */
  --stacki-radius-sm: 4px;
  --stacki-radius-md: 8px;
  --stacki-radius-lg: 12px;
  --stacki-radius-xl: 16px;

  /* Shadows */
  --stacki-shadow-sm: 0 1px 2px rgba(10,30,61,0.05);
  --stacki-shadow-md: 0 4px 12px rgba(10,30,61,0.08);
  --stacki-shadow-lg: 0 10px 30px rgba(10,30,61,0.15);

  /* Aliases convenientes */
  --primary:       var(--stacki-primary);
  --primary-dark:  var(--stacki-navy);
  --primary-light: var(--stacki-gray-100);
  --bg:      var(--stacki-gray-50);
  --surface: var(--stacki-white);
  --border:  var(--stacki-gray-300);
  --text:    var(--stacki-gray-700);
  --muted:   var(--stacki-gray-500);
  --red:     var(--stacki-danger);
  --green:   var(--stacki-success);
  --blue:    var(--stacki-accent);
  --sidebar-w: 234px;
  --radius:    var(--stacki-radius-lg);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--stacki-font-sans);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* ── Login Page ──────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--stacki-navy) 0%, #0d2d5e 55%, var(--stacki-primary) 100%);
}

.login-container {
  width: 100%;
  max-width: 420px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.login-brand {
  text-align: center;
}

.login-brand .brand-logo {
  display: block;
  height: 52px;
  width: auto;
  margin: 0 auto 10px;
}

.brand-tagline {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.65);
  margin-top: 4px;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.login-card {
  width: 100%;
  background: var(--surface);
  border-radius: var(--stacki-radius-xl);
  padding: 36px 32px;
  box-shadow: var(--stacki-shadow-lg);
}

.login-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--stacki-navy);
  letter-spacing: -0.02em;
}

.login-subtitle {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.alert {
  border-radius: var(--stacki-radius-md);
  padding: 12px 14px;
  font-size: 0.875rem;
  margin-bottom: 20px;
}

.alert-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--stacki-navy);
}

.form-group input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--stacki-gray-300);
  border-radius: var(--stacki-radius-md);
  font-size: 0.95rem;
  font-family: var(--stacki-font-sans);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  background: #fafafa;
  color: var(--stacki-gray-700);
}

.form-group input:focus {
  border-color: var(--stacki-primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(30,95,191,0.12);
}

.btn-primary {
  background: var(--stacki-primary);
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: var(--stacki-radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--stacki-font-sans);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s;
}

.btn-primary:hover  { background: var(--stacki-navy); }
.btn-primary:active { transform: scale(0.98); }

.btn-full { width: 100%; }

.login-hint {
  text-align: center;
  margin-top: 20px;
  font-size: 0.82rem;
  color: var(--muted);
}

.login-hint code {
  background: var(--stacki-gray-100);
  padding: 2px 6px;
  border-radius: var(--stacki-radius-sm);
  font-family: var(--stacki-font-mono);
}

.login-footer {
  color: rgba(255,255,255,0.45);
  font-size: 0.8rem;
}

/* ── App Layout ──────────────────────────────── */
.app-page {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  background: var(--stacki-navy);
  color: rgba(255,255,255,0.65);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  padding: 0 4px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 20px;
}

.sidebar-brand .brand-logo {
  height: 34px;
  width: auto;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--stacki-radius-md);
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  position: relative;
}

.nav-item:hover  { background: rgba(255,255,255,0.07); color: #fff; }
.nav-item.active { background: var(--stacki-primary); color: #fff; }

.nav-icon { font-size: 1rem; width: 20px; text-align: center; }

.badge {
  margin-left: auto;
  background: var(--stacki-danger);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
}

.sidebar-footer {
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.btn-logout {
  display: block;
  text-align: center;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 0.875rem;
  padding: 10px;
  border-radius: var(--stacki-radius-md);
  transition: background 0.15s, color 0.15s;
}

.btn-logout:hover { background: rgba(255,255,255,0.07); color: #fff; }

/* Main content */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-date {
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: capitalize;
}

.topbar-greeting {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2px;
  color: var(--stacki-navy);
  letter-spacing: -0.015em;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--stacki-primary), var(--stacki-accent));
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
}

.topbar-user-info {
  display: flex;
  flex-direction: column;
}

.topbar-name { font-weight: 600; font-size: 0.9rem; }
.topbar-role { font-size: 0.78rem; color: var(--muted); }

/* User info card */
.user-card {
  background: linear-gradient(135deg, var(--stacki-navy) 0%, var(--stacki-primary) 100%);
  border-radius: var(--radius);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  color: #fff;
}

.user-card-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 1.6rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  flex-shrink: 0;
  border: 3px solid rgba(255,255,255,0.3);
}

.user-card-info h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 4px; letter-spacing: -0.01em; }
.user-card-info p  { font-size: 0.88rem; color: rgba(255,255,255,0.7); margin-bottom: 12px; }

.user-tags { display: flex; gap: 8px; margin-bottom: 10px; }

.tag {
  padding: 3px 12px;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 600;
}

.tag-role { background: rgba(255,255,255,0.18); color: #fff; }
.tag-plan { background: var(--stacki-warning); color: #78350f; }

.user-meta { font-size: 0.82rem; color: rgba(255,255,255,0.6); }

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--stacki-shadow-sm);
  border: 1px solid var(--stacki-gray-100);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.stat-blue   { background: rgba(59,169,255,0.12); color: var(--stacki-accent); }
.stat-purple { background: rgba(30,95,191,0.10);  color: var(--stacki-primary); }
.stat-red    { background: rgba(239,68,68,0.10);  color: var(--stacki-danger); }
.stat-green  { background: rgba(16,185,129,0.10); color: var(--stacki-success); }

.stat-label { font-size: 0.78rem; color: var(--muted); font-weight: 500; }
.stat-value { font-size: 1.6rem; font-weight: 800; margin-top: 2px; color: var(--stacki-navy); letter-spacing: -0.02em; }

/* Sections */
.section-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--stacki-navy);
  letter-spacing: -0.01em;
}

/* Quick actions */
.quick-section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px 24px;
  border: 1px solid var(--stacki-gray-100);
  box-shadow: var(--stacki-shadow-sm);
}

.quick-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.quick-btn {
  padding: 10px 18px;
  border: 1.5px solid var(--stacki-gray-300);
  border-radius: var(--stacki-radius-md);
  background: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--stacki-font-sans);
  cursor: pointer;
  color: var(--stacki-gray-700);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.quick-btn:hover {
  border-color: var(--stacki-primary);
  background: var(--stacki-gray-100);
  color: var(--stacki-primary);
}

/* Activity feed */
.activity-section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px 24px;
  border: 1px solid var(--stacki-gray-100);
  box-shadow: var(--stacki-shadow-sm);
}

.activity-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--stacki-gray-100);
  font-size: 0.875rem;
  color: var(--stacki-gray-700);
}

.activity-item:last-child { border-bottom: none; }

.activity-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-blue   { background: var(--stacki-accent); }
.dot-purple { background: var(--stacki-primary); }
.dot-green  { background: var(--stacki-success); }
.dot-red    { background: var(--stacki-danger); }

.activity-time {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .sidebar { display: none; }
  .main-content { margin-left: 0; padding: 16px; }
  .user-card { flex-direction: column; text-align: center; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ══════════════════════════════════════════════
   DEVICES PAGE
   ══════════════════════════════════════════════ */

/* Page header */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.page-header h1 {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--stacki-navy);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.page-header p {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 3px;
}

.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

.btn-outline {
  background: white;
  border: 1.5px solid var(--stacki-gray-300);
  color: var(--stacki-gray-700);
  padding: 9px 16px;
  border-radius: var(--stacki-radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--stacki-font-sans);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-outline:hover {
  border-color: var(--stacki-primary);
  color: var(--stacki-primary);
}

/* Quick stats mini row */
.devices-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.mini-stat {
  background: white;
  border: 1px solid var(--stacki-gray-100);
  border-radius: var(--stacki-radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--stacki-shadow-sm);
}

.mini-stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.mini-stat-label {
  font-size: 0.73rem;
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.mini-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--stacki-navy);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-top: 1px;
}

/* Filters card */
.filters-card {
  background: white;
  border: 1px solid var(--stacki-gray-100);
  border-radius: var(--stacki-radius-lg);
  padding: 14px 18px;
  box-shadow: var(--stacki-shadow-sm);
}

.filters-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 10px;
}

.filters-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.filter-input,
.filter-select {
  height: 36px;
  padding: 0 11px;
  border: 1.5px solid var(--stacki-gray-300);
  border-radius: var(--stacki-radius-md);
  font-size: 0.845rem;
  font-family: var(--stacki-font-sans);
  color: var(--stacki-gray-700);
  background: white;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.filter-input:focus,
.filter-select:focus {
  border-color: var(--stacki-primary);
  box-shadow: 0 0 0 3px rgba(30,95,191,0.1);
}

.filter-search { width: 210px; }
.filter-select { min-width: 138px; cursor: pointer; }
.filter-date   { width: 148px; }

.btn-clear {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.8rem;
  font-family: var(--stacki-font-sans);
  cursor: pointer;
  padding: 0 6px;
  transition: color 0.15s;
  white-space: nowrap;
}
.btn-clear:hover { color: var(--stacki-danger); }

/* Table card */
.table-card {
  background: white;
  border: 1px solid var(--stacki-gray-100);
  border-radius: var(--stacki-radius-lg);
  box-shadow: var(--stacki-shadow-sm);
  overflow: hidden;
}

.table-toolbar {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--stacki-gray-100);
  gap: 12px;
}

.table-toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--stacki-navy);
}

.table-count {
  font-size: 0.78rem;
  color: var(--muted);
  background: var(--stacki-gray-100);
  padding: 2px 8px;
  border-radius: 99px;
  font-weight: 600;
}

.devices-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.845rem;
}

.devices-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 0.71rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--stacki-gray-50);
  border-bottom: 1px solid var(--stacki-gray-100);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: color 0.15s;
}

.devices-table th:hover { color: var(--stacki-navy); }

.sort-icon {
  display: inline-block;
  margin-left: 3px;
  opacity: 0.35;
  font-size: 0.65rem;
  transition: opacity 0.15s;
}

.sort-icon.active { opacity: 1; color: var(--stacki-primary); }

.devices-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--stacki-gray-100);
  color: var(--stacki-gray-700);
  vertical-align: middle;
}

.devices-table tr:last-child td { border-bottom: none; }

.device-row {
  cursor: pointer;
  transition: background 0.1s;
}

.device-row:hover { background: var(--stacki-gray-50); }

.device-row.risk-row-alto td:first-child {
  border-left: 3px solid var(--stacki-danger);
}

.device-name-cell {
  font-weight: 600;
  color: var(--stacki-navy);
  font-size: 0.875rem;
}

.device-serial {
  font-size: 0.72rem;
  color: var(--muted);
  font-family: var(--stacki-font-mono);
  margin-top: 1px;
}

/* Type badge */
.type-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--stacki-gray-700);
  white-space: nowrap;
}

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}

.s-activo         { background: #D1FAE5; color: #065F46; }
.s-mantenimiento  { background: #FEF3C7; color: #92400E; }
.s-retirado       { background: #F3F4F6; color: #6B7280; }
.s-en-reparacion  { background: #FEE2E2; color: #991B1B; }

/* Risk */
.risk-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 600;
}

.risk-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.r-bajo  { color: #065F46; }  .r-bajo  .risk-dot { background: #10B981; }
.r-medio { color: #92400E; }  .r-medio .risk-dot { background: #F59E0B; }
.r-alto  { color: #991B1B; }  .r-alto  .risk-dot { background: #EF4444; }

/* Ticket count chip */
.tkt-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 22px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0 7px;
}

.tkt-low  { background: #D1FAE5; color: #065F46; }
.tkt-mid  { background: #FEF3C7; color: #92400E; }
.tkt-high { background: #FEE2E2; color: #991B1B; }

/* Pagination */
.table-footer {
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--stacki-gray-100);
  background: var(--stacki-gray-50);
  flex-wrap: wrap;
  gap: 10px;
}

.pagination-info {
  font-size: 0.78rem;
  color: var(--muted);
}

.pagination-buttons {
  display: flex;
  gap: 3px;
}

.pg-btn {
  min-width: 30px;
  height: 30px;
  border-radius: var(--stacki-radius-sm);
  border: 1px solid var(--stacki-gray-300);
  background: white;
  font-size: 0.8rem;
  font-family: var(--stacki-font-sans);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  color: var(--stacki-gray-700);
  padding: 0 6px;
}

.pg-btn:hover:not(:disabled) {
  border-color: var(--stacki-primary);
  color: var(--stacki-primary);
}

.pg-btn.active {
  background: var(--stacki-primary);
  border-color: var(--stacki-primary);
  color: white;
}

.pg-btn:disabled { opacity: 0.38; cursor: default; }

/* Empty state */
.empty-state {
  padding: 56px 20px;
  text-align: center;
  color: var(--muted);
}

.empty-icon { font-size: 2.4rem; margin-bottom: 10px; }
.empty-state p { font-size: 0.875rem; }

/* ── Detail Side Panel ────────────────────── */
.detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,30,61,0.28);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s;
}
.detail-overlay.open { opacity: 1; pointer-events: all; }

.detail-panel {
  position: fixed;
  top: 0; right: 0;
  height: 100vh;
  width: 430px;
  max-width: 95vw;
  background: white;
  z-index: 201;
  box-shadow: -8px 0 40px rgba(10,30,61,0.12);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
  display: flex;
  flex-direction: column;
}
.detail-panel.open { transform: translateX(0); }

.dp-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--stacki-gray-100);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
}

.dp-device-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--stacki-navy);
  letter-spacing: -0.01em;
}

.dp-device-serial {
  font-size: 0.75rem;
  color: var(--muted);
  font-family: var(--stacki-font-mono);
  margin-top: 2px;
}

.dp-close {
  background: none;
  border: none;
  font-size: 1.15rem;
  cursor: pointer;
  color: var(--muted);
  padding: 4px 6px;
  border-radius: 6px;
  line-height: 1;
  transition: background 0.13s, color 0.13s;
  flex-shrink: 0;
}
.dp-close:hover { background: var(--stacki-gray-100); color: var(--stacki-navy); }

.dp-body {
  flex: 1;
  overflow-y: auto;
}

.dp-section {
  padding: 16px 20px;
  border-bottom: 1px solid var(--stacki-gray-100);
}
.dp-section:last-child { border-bottom: none; }

.dp-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.dp-grid .span2 { grid-column: 1 / -1; }

.dp-field label {
  display: block;
  font-size: 0.69rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}

.dp-field span {
  font-size: 0.845rem;
  color: var(--stacki-gray-700);
  font-weight: 500;
}

.warranty-ok  { color: var(--stacki-success) !important; font-weight: 600 !important; }
.warranty-exp { color: var(--stacki-danger)  !important; font-weight: 600 !important; }

.ticket-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.ticket-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: var(--stacki-gray-50);
  border-radius: var(--stacki-radius-md);
  font-size: 0.8rem;
}

.ticket-item .t-date { color: var(--muted); font-size: 0.73rem; white-space: nowrap; }
.ticket-item .t-type { flex: 1; color: var(--stacki-gray-700); font-weight: 500; }

.no-tickets {
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
  padding: 10px 0;
}

.metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.metric-box {
  background: var(--stacki-gray-50);
  border-radius: var(--stacki-radius-md);
  padding: 12px 14px;
}

.metric-box label {
  display: block;
  font-size: 0.69rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 4px;
}

.metric-box span {
  font-size: 1rem;
  font-weight: 700;
  color: var(--stacki-navy);
}

.metric-box.span2 { grid-column: 1 / -1; }

.dp-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--stacki-gray-100);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
  background: white;
}

/* Small buttons for panel footer */
.btn-sm {
  padding: 8px 14px;
  font-size: 0.82rem;
  border-radius: var(--stacki-radius-md);
  font-weight: 600;
  font-family: var(--stacki-font-sans);
  cursor: pointer;
  transition: background 0.13s, color 0.13s, border-color 0.13s;
  border: 1.5px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-sm-primary {
  background: var(--stacki-primary);
  color: white;
  border-color: var(--stacki-primary);
}
.btn-sm-primary:hover { background: var(--stacki-navy); border-color: var(--stacki-navy); }

.btn-sm-outline {
  background: white;
  color: var(--stacki-gray-700);
  border-color: var(--stacki-gray-300);
}
.btn-sm-outline:hover { border-color: var(--stacki-primary); color: var(--stacki-primary); }

.btn-sm-danger {
  background: white;
  color: var(--stacki-danger);
  border-color: #fecaca;
}
.btn-sm-danger:hover { background: #fef2f2; }

/* ── Modal ──────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,30,61,0.32);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal-card {
  background: white;
  border-radius: var(--stacki-radius-xl);
  padding: 26px 26px 22px;
  width: 100%;
  max-width: 540px;
  box-shadow: var(--stacki-shadow-lg);
  max-height: 92vh;
  overflow-y: auto;
  transform: translateY(12px) scale(0.97);
  transition: transform 0.2s;
}
.modal-overlay.open .modal-card { transform: translateY(0) scale(1); }

.modal-sm { max-width: 380px; }

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--stacki-navy);
  letter-spacing: -0.01em;
}

.modal-subtitle {
  font-size: 0.845rem;
  color: var(--muted);
  margin: 3px 0 20px;
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
  margin-bottom: 20px;
}
.modal-grid .span2 { grid-column: 1 / -1; }

.mf-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--stacki-navy);
  margin-bottom: 5px;
}

.mf-field input,
.mf-field select {
  width: 100%;
  height: 36px;
  padding: 0 11px;
  border: 1.5px solid var(--stacki-gray-300);
  border-radius: var(--stacki-radius-md);
  font-size: 0.845rem;
  font-family: var(--stacki-font-sans);
  color: var(--stacki-gray-700);
  outline: none;
  background: white;
  transition: border-color 0.18s;
}

.mf-field input:focus,
.mf-field select:focus {
  border-color: var(--stacki-primary);
  box-shadow: 0 0 0 3px rgba(30,95,191,0.1);
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 4px;
}

/* ── Toast ──────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 18px;
  border-radius: var(--stacki-radius-md);
  font-size: 0.845rem;
  font-weight: 600;
  font-family: var(--stacki-font-sans);
  color: white;
  z-index: 500;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.22s, transform 0.22s;
  pointer-events: none;
  box-shadow: var(--stacki-shadow-md);
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-success { background: var(--stacki-success); }
.toast-danger  { background: var(--stacki-danger); }
.toast-info    { background: var(--stacki-primary); }

/* ── Devices Responsive ─────────────────────── */
@media (max-width: 1024px) {
  .devices-stats-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .filters-row { gap: 6px; }
  .filter-search { width: 100%; }
  .detail-panel { width: 100%; }
  .modal-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════
   THROBBER  (Stacki Throbber - Standalone)
   ══════════════════════════════════════════════ */
.stacki-throbber {
  --size: min(100vmin, 240px);
  --c-bottom: #1E6BD6;
  --c-middle: #6FB8F5;
  --c-top:    #A8D4F7;
  --c-arrow:  #1E88E5;
  --cycle: 1.8s;
  position: relative;
  width: var(--size);
  height: var(--size);
}

.stacki-throbber .bar {
  position: absolute;
  left: 50%;
  height: 12%;
  border-radius: 999px;
  transform: translateX(-50%) translateY(0);
  opacity: 0;
  animation: stacki-bar-in var(--cycle) cubic-bezier(.2,.8,.2,1.05) infinite;
  will-change: transform, opacity;
}

.stacki-throbber .bar-bottom { width: 70%; top: 66%; background: var(--c-bottom); animation-delay: 0s; }
.stacki-throbber .bar-middle { width: 56%; top: 48%; background: var(--c-middle); animation-delay: calc(var(--cycle) * 0.11); }
.stacki-throbber .bar-top    { width: 42%; top: 30%; background: var(--c-top);    animation-delay: calc(var(--cycle) * 0.22); }

@keyframes stacki-bar-in {
  0%   { transform: translateX(-50%) translateY(-90%); opacity: 0; }
  18%  { transform: translateX(-50%) translateY(0);    opacity: 1; }
  22%  { transform: translateX(-50%) translateY(-6%);  opacity: 1; }
  28%  { transform: translateX(-50%) translateY(0);    opacity: 1; }
  78%  { transform: translateX(-50%) translateY(0);    opacity: 1; }
  92%  { transform: translateX(-50%) translateY(0);    opacity: 0; }
  100% { transform: translateX(-50%) translateY(-90%); opacity: 0; }
}

.stacki-throbber .arrow {
  position: absolute;
  left: 50%;
  top: 4%;
  width: 18%;
  height: 26%;
  transform: translateX(-50%) translateY(30%);
  opacity: 0;
  animation: stacki-arrow var(--cycle) cubic-bezier(.2,.8,.2,1) infinite;
  animation-delay: calc(var(--cycle) * 0.30);
  will-change: transform, opacity;
}

.stacki-throbber .arrow svg { width: 100%; height: 100%; display: block; overflow: visible; }

@keyframes stacki-arrow {
  0%   { transform: translateX(-50%) translateY(40%);  opacity: 0; }
  22%  { transform: translateX(-50%) translateY(0);    opacity: 1; }
  45%  { transform: translateX(-50%) translateY(-10%); opacity: 1; }
  68%  { transform: translateX(-50%) translateY(0);    opacity: 1; }
  80%  { transform: translateX(-50%) translateY(0);    opacity: 0; }
  100% { transform: translateX(-50%) translateY(40%);  opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .stacki-throbber .bar,
  .stacki-throbber .arrow { animation-duration: 3.2s; animation-timing-function: ease-in-out; }
}

/* Page-transition overlay (uses throbber) */
.page-transition-overlay {
  position: fixed;
  inset: 0;
  background: rgba(248,250,252,0.94);
  backdrop-filter: blur(3px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
.page-transition-overlay.show { opacity: 1; pointer-events: all; }

/* ══════════════════════════════════════════════
   LOGIN ANIMATION SPLASH
   ══════════════════════════════════════════════ */
.login-splash {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--stacki-navy) 0%, #0d2d5e 55%, var(--stacki-primary) 100%);
  z-index: 200;
  transition: opacity 0.65s ease;
}
.login-splash.ocultar { opacity: 0; pointer-events: none; }

.login-anim-iframe {
  width: 320px;
  height: 320px;
  border: none;
  border-radius: 20px;
  overflow: hidden;
  display: block;
}

/* Login container transition */
.login-inicio {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.login-inicio.visible { opacity: 1; transform: translateY(0); }

/* ══════════════════════════════════════════════
   TOPBAR USER (clickable)
   ══════════════════════════════════════════════ */
.topbar-user {
  cursor: pointer;
  padding: 6px 8px;
  border-radius: var(--stacki-radius-md);
  transition: background 0.15s;
}
.topbar-user:hover { background: var(--stacki-gray-100); }

/* ══════════════════════════════════════════════
   USER PROFILE PANEL
   ══════════════════════════════════════════════ */
.user-panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,30,61,0.28);
  z-index: 400;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s;
}
.user-panel-overlay.open { opacity: 1; pointer-events: all; }

.user-panel {
  position: fixed;
  top: 0; right: 0;
  height: 100vh;
  width: 340px;
  max-width: 95vw;
  background: white;
  z-index: 401;
  box-shadow: -8px 0 40px rgba(10,30,61,0.14);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
  display: flex;
  flex-direction: column;
}
.user-panel.open { transform: translateX(0); }

.up-header {
  background: linear-gradient(145deg, var(--stacki-navy), var(--stacki-primary));
  padding: 28px 22px 22px;
  color: white;
  position: relative;
  flex-shrink: 0;
}

.up-close {
  position: absolute;
  top: 14px; right: 14px;
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  width: 30px; height: 30px;
  border-radius: 50%;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
  line-height: 1;
}
.up-close:hover { background: rgba(255,255,255,0.28); }

.up-avatar {
  width: 62px; height: 62px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  border: 2.5px solid rgba(255,255,255,0.35);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 800;
  color: white; text-transform: uppercase;
  margin-bottom: 14px;
}

.up-name  { font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; }
.up-email { font-size: 0.78rem; color: rgba(255,255,255,0.65); margin-top: 3px; }

.up-plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--stacki-warning);
  color: #78350f;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 700;
  margin-top: 12px;
}

.up-body { flex: 1; overflow-y: auto; }

.up-section {
  padding: 16px 22px;
  border-bottom: 1px solid var(--stacki-gray-100);
}
.up-section:last-child { border-bottom: none; }

.up-section-title {
  font-size: 0.69rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 12px;
}

.up-info-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 9px;
}
.up-info-label { font-size: 0.78rem; color: var(--muted); }
.up-info-value { font-size: 0.845rem; color: var(--stacki-gray-700); font-weight: 500; }

.up-pwd-field { margin-bottom: 12px; }
.up-pwd-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--stacki-navy);
  margin-bottom: 5px;
}
.up-pwd-field input {
  width: 100%;
  height: 36px;
  padding: 0 11px;
  border: 1.5px solid var(--stacki-gray-300);
  border-radius: var(--stacki-radius-md);
  font-size: 0.845rem;
  font-family: var(--stacki-font-sans);
  color: var(--stacki-gray-700);
  outline: none;
  background: white;
  transition: border-color 0.18s;
}
.up-pwd-field input:focus {
  border-color: var(--stacki-primary);
  box-shadow: 0 0 0 3px rgba(30,95,191,0.1);
}

.up-pwd-btn {
  width: 100%;
  margin-top: 4px;
  padding: 10px 16px;
  background: var(--stacki-primary);
  color: white;
  border: none;
  border-radius: var(--stacki-radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--stacki-font-sans);
  cursor: pointer;
  transition: background 0.15s;
}
.up-pwd-btn:hover { background: var(--stacki-navy); }

.up-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--stacki-gray-100);
  flex-shrink: 0;
}

.btn-logout-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  background: none;
  border: 1.5px solid #fecaca;
  border-radius: var(--stacki-radius-md);
  color: var(--stacki-danger);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--stacki-font-sans);
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
  text-align: center;
}
.btn-logout-panel:hover { background: #fef2f2; }

/* Change-password hyperlink inside user panel */
.up-pwd-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--stacki-primary);
  text-decoration: none;
  padding: 10px 0;
  transition: color 0.15s;
}
.up-pwd-link:hover { color: var(--stacki-navy); text-decoration: none; }

/* ══════════════════════════════════════════════
   TICKETS PAGE
   ══════════════════════════════════════════════ */

/* ── Status badges ── */
.st-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 99px;
  font-size: 0.72rem; font-weight: 700; white-space: nowrap;
}
.st-creado    { background: #f1f5f9; color: #475569; }
.st-activo    { background: #dbeafe; color: #1d4ed8; }
.st-escalado  { background: #fef3c7; color: #92400e; }
.st-pendiente { background: #ede9fe; color: #6d28d9; }
.st-aprobado  { background: #d1fae5; color: #065f46; }
.st-resuelto  { background: #dcfce7; color: #15803d; }
.st-cancelado { background: #fee2e2; color: #991b1b; }

/* ── Impact badges ── */
.imp-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 99px;
  font-size: 0.7rem; font-weight: 700;
}
.imp-alto  { background: #fee2e2; color: #991b1b; }
.imp-medio { background: #fef3c7; color: #92400e; }
.imp-bajo  { background: #f1f5f9; color: #475569; }

/* ── Inactivity alert banner ── */
.inactivity-banner {
  display: flex; align-items: center; gap: 10px;
  background: #fff7ed; border: 1.5px solid #fed7aa;
  border-left: 4px solid #f97316;
  border-radius: var(--stacki-radius-md);
  padding: 10px 16px; margin-bottom: 10px;
  font-size: 0.845rem; color: #7c2d12;
}
.inactivity-banner strong { color: #9a3412; }
.inactivity-banners { margin-bottom: 6px; }

/* ── Ticket table ── */
.tickets-table th { white-space: nowrap; }
.tickets-table td { vertical-align: middle; }
.tkt-id { font-weight: 700; color: var(--stacki-primary); font-size: 0.82rem; }
.tkt-title { font-weight: 500; color: var(--stacki-navy); max-width: 280px; }
.tkt-title small { display: block; color: var(--muted); font-size: 0.75rem; font-weight: 400; }
.tkt-row { cursor: pointer; transition: background 0.12s; }
.tkt-row:hover { background: #f8faff; }
.tkt-row.selected { background: #eff6ff; }

/* ── Ticket detail panel ── */
.ticket-panel-overlay {
  position: fixed; inset: 0;
  background: rgba(10,30,61,0.28);
  z-index: 300; opacity: 0; pointer-events: none;
  transition: opacity 0.22s;
}
.ticket-panel-overlay.open { opacity: 1; pointer-events: all; }

.ticket-panel {
  position: fixed;
  top: 0; right: 0; height: 100vh;
  width: 480px; max-width: 96vw;
  background: white; z-index: 301;
  box-shadow: -8px 0 40px rgba(10,30,61,0.14);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
  display: flex; flex-direction: column;
}
.ticket-panel.open { transform: translateX(0); }

.tp-header {
  background: linear-gradient(145deg, var(--stacki-navy), var(--stacki-primary));
  padding: 20px 22px 18px; color: white; flex-shrink: 0; position: relative;
}
.tp-close {
  position: absolute; top: 14px; right: 14px;
  background: rgba(255,255,255,0.15); border: none; color: white;
  width: 30px; height: 30px; border-radius: 50%; font-size: 0.9rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s; line-height: 1;
}
.tp-close:hover { background: rgba(255,255,255,0.28); }
.tp-id { font-size: 0.75rem; opacity: 0.7; font-weight: 600; letter-spacing: 0.06em; margin-bottom: 4px; }
.tp-title { font-size: 0.975rem; font-weight: 700; line-height: 1.35; margin-bottom: 10px; }
.tp-badges { display: flex; gap: 7px; flex-wrap: wrap; }

.tp-body { flex: 1; overflow-y: auto; }

.tp-section { padding: 14px 22px; border-bottom: 1px solid var(--stacki-gray-100); }
.tp-section:last-child { border-bottom: none; }
.tp-section-title {
  font-size: 0.69rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--muted); margin-bottom: 10px;
}
.tp-info-row {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 8px; gap: 12px;
}
.tp-info-label { font-size: 0.78rem; color: var(--muted); flex-shrink: 0; }
.tp-info-value { font-size: 0.845rem; color: var(--stacki-gray-700); font-weight: 500; text-align: right; }

/* ── Status history timeline ── */
.timeline { list-style: none; padding: 0; margin: 0; }
.tl-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding-bottom: 14px; position: relative;
}
.tl-item::before {
  content: '';
  position: absolute; left: 7px; top: 18px;
  width: 2px; height: calc(100% - 18px);
  background: var(--stacki-gray-200);
}
.tl-item:last-child::before { display: none; }
.tl-dot {
  width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0;
  border: 2.5px solid white; box-shadow: 0 0 0 2px var(--stacki-gray-300);
  background: var(--stacki-gray-300); margin-top: 2px; z-index: 1;
}
.tl-dot.dot-creado    { background: #94a3b8; box-shadow: 0 0 0 2px #94a3b8; }
.tl-dot.dot-activo    { background: #3b82f6; box-shadow: 0 0 0 2px #3b82f6; }
.tl-dot.dot-escalado  { background: #f59e0b; box-shadow: 0 0 0 2px #f59e0b; }
.tl-dot.dot-pendiente { background: #8b5cf6; box-shadow: 0 0 0 2px #8b5cf6; }
.tl-dot.dot-aprobado  { background: #10b981; box-shadow: 0 0 0 2px #10b981; }
.tl-dot.dot-resuelto  { background: #22c55e; box-shadow: 0 0 0 2px #22c55e; }
.tl-dot.dot-cancelado { background: #ef4444; box-shadow: 0 0 0 2px #ef4444; }
.tl-content { flex: 1; }
.tl-status { font-size: 0.82rem; font-weight: 700; color: var(--stacki-navy); }
.tl-meta { font-size: 0.75rem; color: var(--muted); margin-top: 1px; }

/* ── Comments ── */
.comment-item {
  background: var(--stacki-gray-50);
  border-radius: var(--stacki-radius-md);
  padding: 10px 12px; margin-bottom: 10px;
}
.comment-author { font-size: 0.78rem; font-weight: 700; color: var(--stacki-navy); }
.comment-role { font-size: 0.7rem; color: var(--muted); margin-left: 6px; }
.comment-time { font-size: 0.7rem; color: var(--muted); float: right; }
.comment-text { font-size: 0.82rem; color: var(--stacki-gray-700); margin-top: 5px; line-height: 1.5; }

/* ── Ticket panel footer ── */
.tp-footer {
  padding: 14px 22px; border-top: 1px solid var(--stacki-gray-100);
  flex-shrink: 0; display: flex; gap: 8px; flex-wrap: wrap;
}

/* ── Ticket stats row ── */
.ticket-stats-row {
  display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px;
}
.tkt-stat {
  flex: 1; min-width: 100px;
  background: white; border: 1.5px solid var(--stacki-gray-200);
  border-radius: var(--stacki-radius-lg); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 4px;
}
.tkt-stat-value { font-size: 1.5rem; font-weight: 800; color: var(--stacki-navy); line-height: 1; }
.tkt-stat-label { font-size: 0.73rem; color: var(--muted); font-weight: 500; }
.tkt-stat.ts-activo    .tkt-stat-value { color: #1d4ed8; }
.tkt-stat.ts-escalado  .tkt-stat-value { color: #92400e; }
.tkt-stat.ts-pendiente .tkt-stat-value { color: #6d28d9; }
.tkt-stat.ts-resuelto  .tkt-stat-value { color: #15803d; }

/* ── Impact card selector ── */
.impact-cards { display: flex; gap: 10px; margin-top: 6px; }
.impact-card {
  flex: 1; padding: 10px; border-radius: var(--stacki-radius-md);
  border: 2px solid var(--stacki-gray-200);
  cursor: pointer; text-align: center; transition: border-color 0.15s, background 0.15s;
  font-size: 0.82rem; font-weight: 600; user-select: none;
}
.impact-card input[type=radio] { display: none; }
.impact-card.ic-alto   { color: #991b1b; }
.impact-card.ic-medio  { color: #92400e; }
.impact-card.ic-bajo   { color: #475569; }
.impact-card.selected.ic-alto  { background: #fee2e2; border-color: #ef4444; }
.impact-card.selected.ic-medio { background: #fef3c7; border-color: #f59e0b; }
.impact-card.selected.ic-bajo  { background: #f1f5f9; border-color: #94a3b8; }

/* ── New ticket modal extras ── */
.mf-radio-row { display: flex; gap: 10px; }
.mf-radio-opt {
  flex: 1; padding: 9px; border: 2px solid var(--stacki-gray-200);
  border-radius: var(--stacki-radius-md); cursor: pointer;
  text-align: center; font-size: 0.82rem; font-weight: 600;
  color: var(--muted); transition: border-color 0.15s, color 0.15s;
  user-select: none;
}
.mf-radio-opt input[type=radio] { display: none; }
.mf-radio-opt.selected { border-color: var(--stacki-primary); color: var(--stacki-primary); background: #eff6ff; }

/* ── Ticket confirmation ── */
.tkt-confirm-id {
  font-size: 1.4rem; font-weight: 800; color: var(--stacki-primary);
  text-align: center; padding: 12px; background: #eff6ff;
  border-radius: var(--stacki-radius-md); letter-spacing: 0.04em;
  margin: 10px 0;
}

/* ── Change status modal select ── */
.status-options { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 16px; }
.status-option {
  padding: 10px 14px; border: 2px solid var(--stacki-gray-200);
  border-radius: var(--stacki-radius-md); cursor: pointer;
  font-size: 0.875rem; font-weight: 600; transition: border-color 0.15s, background 0.15s;
  display: flex; align-items: center; gap: 10px;
}
.status-option input[type=radio] { display: none; }
.status-option.selected { border-color: var(--stacki-primary); background: #eff6ff; color: var(--stacki-primary); }
