/* ====================================================================
   CMMS FILTROS ELECTRÓNICOS LARK
   Design System: Light Background + Glassmorphism + Industrial Navy Blue
   ==================================================================== */

:root {
  /* Industrial Navy Palette */
  --navy-dark: #07162c;
  --navy-primary: #0b2545;
  --navy-medium: #134074;
  --navy-light: #1d4e89;
  --navy-accent: #0284c7;
  --steel-slate: #64748b;
  --steel-light: #8da9c4;
  --ice-blue: #eef4f8;
  --ice-card: rgba(255, 255, 255, 0.82);
  --ice-border: rgba(255, 255, 255, 0.95);
  --ice-subtle: rgba(255, 255, 255, 0.55);

  /* Functional Status Colors */
  --status-abierto: #2563eb;
  --status-asignado: #4f46e5;
  --status-proceso: #0284c7;
  --status-pausa: #d97706;
  --status-resuelto: #059669;
  --status-cerrado: #475569;
  --status-reabierto: #ea580c;
  --status-critico: #dc2626;

  /* Typography & Sizing */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Glassmorphism Effects & Shadows */
  --glass-bg: rgba(255, 255, 255, 0.78);
  --glass-bg-hover: rgba(255, 255, 255, 0.92);
  --glass-border: 1px solid rgba(255, 255, 255, 0.85);
  --glass-border-subtle: 1px solid rgba(19, 64, 116, 0.12);
  --glass-blur: blur(16px);
  --glass-shadow: 0 12px 35px -8px rgba(11, 37, 69, 0.08), 0 4px 12px -2px rgba(11, 37, 69, 0.04);
  --glass-shadow-hover: 0 20px 45px -10px rgba(11, 37, 69, 0.14), 0 6px 16px -2px rgba(11, 37, 69, 0.06);
  --glass-shadow-inset: inset 0 1px 1px rgba(255, 255, 255, 0.9);

  /* Sidebar dimensions */
  --sidebar-width: 270px;
  --topbar-height: 72px;
}

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

body {
  font-family: var(--font-main);
  color: #1e293b;
  background-color: #f1f5f9;
  background-image: 
    radial-gradient(at 10% 20%, rgba(19, 64, 116, 0.06) 0px, transparent 50%),
    radial-gradient(at 90% 10%, rgba(2, 132, 199, 0.06) 0px, transparent 50%),
    radial-gradient(at 50% 80%, rgba(141, 169, 196, 0.12) 0px, transparent 60%),
    radial-gradient(at 80% 90%, rgba(11, 37, 69, 0.05) 0px, transparent 50%);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--navy-primary);
  font-weight: 700;
  letter-spacing: -0.02em;
}

a {
  color: var(--navy-medium);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--navy-accent);
}

/* GLASS PANEL UTILITIES */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  position: relative;
  transition: all 0.25s ease;
}

.glass-panel:hover {
  box-shadow: var(--glass-shadow-hover);
}

.glass-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-md);
  box-shadow: var(--glass-shadow);
  padding: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.glass-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--glass-shadow-hover);
}

/* APP LAYOUT */
.app-container {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* SIDEBAR */
.app-sidebar {
  width: var(--sidebar-width);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 4px 0 25px rgba(11, 37, 69, 0.05);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
  padding: 1.5rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  border-bottom: 1px solid rgba(19, 64, 116, 0.08);
}

.logo-badge {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--navy-primary) 0%, var(--navy-medium) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 6px 15px rgba(11, 37, 69, 0.25);
  flex-shrink: 0;
}

.logo-badge svg {
  width: 24px;
  height: 24px;
}

.logo-text h2 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--navy-primary);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.logo-text span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--steel-slate);
  font-weight: 600;
}

.sidebar-nav {
  padding: 1.25rem 0.85rem;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.nav-section-title {
  font-size: 0.68rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #94a3b8;
  padding: 0.75rem 0.85rem 0.35rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0.95rem;
  color: #334155;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  position: relative;
  transition: all 0.2s ease;
}

.nav-link svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  color: var(--navy-medium);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.nav-link:hover {
  background: rgba(19, 64, 116, 0.08);
  color: var(--navy-primary);
  transform: translateX(3px);
}

.nav-link:hover svg {
  color: var(--navy-primary);
  transform: scale(1.1);
}

.nav-link.active {
  background: linear-gradient(135deg, var(--navy-primary) 0%, var(--navy-medium) 100%);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(11, 37, 69, 0.22);
}

.nav-link.active svg {
  color: #ffffff;
}

.nav-link .badge-counter {
  margin-left: auto;
  background: rgba(239, 68, 68, 0.95);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.sidebar-footer {
  padding: 1rem 1.15rem;
  border-top: 1px solid rgba(19, 64, 116, 0.08);
  background: rgba(255, 255, 255, 0.4);
}

.user-mini-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #134074, #0284c7);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 10px rgba(11, 37, 69, 0.15);
  flex-shrink: 0;
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role-tag {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--steel-slate);
  display: block;
}

.btn-logout {
  color: #94a3b8;
  padding: 0.4rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-logout:hover {
  background: #fee2e2;
  color: #dc2626;
}

/* MAIN CONTENT AREA */
.app-main {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
}

/* TOPBAR */
.app-topbar {
  height: var(--topbar-height);
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 20px rgba(11, 37, 69, 0.03);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 90;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.topbar-title h1 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--navy-primary);
  line-height: 1.2;
}

.topbar-title p {
  font-size: 0.8rem;
  color: var(--steel-slate);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.btn-mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  color: var(--navy-primary);
}

/* CONTENT CONTAINER */
.page-content {
  padding: 2rem;
  flex: 1;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.65rem 1.25rem;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  line-height: 1.4;
  white-space: nowrap;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-primary {
  background: linear-gradient(135deg, var(--navy-primary) 0%, var(--navy-medium) 100%);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(11, 37, 69, 0.25);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #091e38 0%, #0d2f55 100%);
  box-shadow: 0 8px 24px rgba(11, 37, 69, 0.35);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.85);
  color: var(--navy-primary);
  border: 1px solid rgba(19, 64, 116, 0.18);
  box-shadow: 0 4px 12px rgba(11, 37, 69, 0.05);
}

.btn-secondary:hover {
  background: #ffffff;
  border-color: var(--navy-medium);
  color: var(--navy-medium);
  box-shadow: 0 6px 16px rgba(11, 37, 69, 0.08);
}

.btn-success {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.25);
}

.btn-success:hover {
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.35);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-warning {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.25);
}

.btn-warning:hover {
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.35);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-danger {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.35);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.42rem 0.85rem;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
}

/* KPI CARDS (DASHBOARD) */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.kpi-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--glass-shadow);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--kpi-accent, var(--navy-medium));
}

.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--glass-shadow-hover);
}

.kpi-icon-wrap {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--kpi-bg, rgba(19, 64, 116, 0.1));
  color: var(--kpi-color, var(--navy-medium));
  flex-shrink: 0;
}

.kpi-icon-wrap svg {
  width: 28px;
  height: 28px;
}

.kpi-meta h3 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--steel-slate);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.kpi-number {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--navy-primary);
  line-height: 1.1;
  font-family: var(--font-heading);
}

.kpi-subtext {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.35rem;
}

/* BADGES */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  white-space: nowrap;
}

.badge-status-abierto {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.badge-status-asignado {
  background: #ede9fe;
  color: #4338ca;
  border: 1px solid #ddd6fe;
}

.badge-status-proceso {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.badge-status-pausa {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.badge-status-resuelto {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.badge-status-cerrado {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.badge-status-reabierto {
  background: #ffedd5;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

.priority-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-prio-critica {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.badge-prio-alta {
  background: #ffedd5;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

.badge-prio-media {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.badge-prio-baja {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #ef4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  animation: pulse-ring 1.6s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.area-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.28rem 0.75rem;
  border-radius: 8px;
}

.area-ti {
  background: rgba(2, 132, 199, 0.12);
  color: #0369a1;
  border: 1px solid rgba(2, 132, 199, 0.25);
}

.area-mant {
  background: rgba(11, 37, 69, 0.08);
  color: var(--navy-primary);
  border: 1px solid rgba(11, 37, 69, 0.2);
}

/* DATA TABLES */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
}

.glass-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.88rem;
  text-align: left;
}

.glass-table th {
  background: rgba(248, 250, 252, 0.85);
  color: var(--navy-primary);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1rem 1.15rem;
  border-bottom: 2px solid rgba(19, 64, 116, 0.1);
  white-space: nowrap;
}

.glass-table td {
  padding: 1rem 1.15rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
  color: #334155;
  vertical-align: middle;
  background: rgba(255, 255, 255, 0.4);
  transition: background 0.15s ease;
}

.glass-table tr:hover td {
  background: rgba(255, 255, 255, 0.95);
}

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

/* FORMS & INPUTS */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy-primary);
  margin-bottom: 0.45rem;
}

.form-label .required {
  color: #ef4444;
}

.form-control {
  width: 100%;
  padding: 0.7rem 1rem;
  font-size: 0.88rem;
  font-family: inherit;
  color: #1e293b;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(141, 169, 196, 0.35);
  border-radius: var(--radius-md);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
}

.form-control:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--navy-accent);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.18);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23134074' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  user-select: none;
}

.form-check-input {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  cursor: pointer;
  accent-color: var(--navy-primary);
}

/* FILE UPLOAD DROPZONE */
.upload-dropzone {
  border: 2px dashed rgba(19, 64, 116, 0.3);
  background: rgba(238, 244, 248, 0.6);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.upload-dropzone:hover, .upload-dropzone.drag-over {
  border-color: var(--navy-accent);
  background: rgba(224, 242, 254, 0.45);
}

.upload-icon {
  width: 48px;
  height: 48px;
  color: var(--navy-medium);
  margin-bottom: 0.75rem;
}

.file-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.preview-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  aspect-ratio: 1;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.preview-item:hover img {
  transform: scale(1.05);
}

.preview-remove-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: background 0.2s ease;
}

.preview-remove-btn:hover {
  background: #dc2626;
}

/* PROCESS TIMELINE / LOG */
.timeline-container {
  position: relative;
  padding-left: 2rem;
  margin: 1.5rem 0;
}

.timeline-container::before {
  content: '';
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 11px;
  width: 2px;
  background: linear-gradient(180deg, var(--navy-medium) 0%, rgba(141, 169, 196, 0.3) 100%);
}

.timeline-step {
  position: relative;
  margin-bottom: 1.75rem;
}

.timeline-step:last-child {
  margin-bottom: 0;
}

.timeline-node {
  position: absolute;
  left: -2rem;
  top: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid var(--node-color, var(--navy-medium));
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.8), 0 2px 6px rgba(11, 37, 69, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  box-shadow: 0 4px 15px rgba(11, 37, 69, 0.04);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.35rem;
}

.timeline-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy-primary);
}

.timeline-time {
  font-size: 0.74rem;
  color: var(--steel-slate);
  font-weight: 600;
}

.timeline-author {
  font-size: 0.76rem;
  color: var(--navy-medium);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.timeline-content {
  font-size: 0.84rem;
  color: #334155;
}

.timeline-badge-pause {
  display: inline-block;
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 0.4rem;
}

/* EVIDENCE GALLERY */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.gallery-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--glass-shadow-hover);
}

.gallery-thumb {
  width: 100%;
  height: 140px;
  object-fit: cover;
  cursor: pointer;
  display: block;
}

.gallery-info {
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.7);
}

.gallery-info .file-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--navy-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gallery-info .file-meta {
  font-size: 0.68rem;
  color: var(--steel-slate);
  margin-top: 0.2rem;
}

.gallery-delete-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(220, 38, 38, 0.9);
  color: #ffffff;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
  transition: all 0.2s ease;
  z-index: 5;
}

.gallery-delete-btn:hover {
  background: #b91c1c;
  transform: scale(1.1);
}

/* MODALS */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(7, 22, 44, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-dialog {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 60px -15px rgba(11, 37, 69, 0.35);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active .modal-dialog {
  transform: scale(1);
}

.modal-header {
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid rgba(19, 64, 116, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--navy-primary);
}

.modal-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.35rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: #f1f5f9;
  color: #ef4444;
}

.modal-body {
  padding: 1.75rem;
}

.modal-footer {
  padding: 1.25rem 1.75rem;
  border-top: 1px solid rgba(19, 64, 116, 0.1);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  background: rgba(248, 250, 252, 0.6);
  border-bottom-left-radius: var(--radius-xl);
  border-bottom-right-radius: var(--radius-xl);
}

/* TOAST NOTIFICATIONS */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast-item {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  box-shadow: 0 10px 25px -5px rgba(11, 37, 69, 0.15);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 320px;
  max-width: 420px;
  border-left: 4px solid var(--navy-primary);
  pointer-events: auto;
  animation: toast-in 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transition: all 0.2s ease;
}

.toast-success { border-left-color: #10b981; }
.toast-error { border-left-color: #ef4444; }
.toast-warning { border-left-color: #f59e0b; }
.toast-info { border-left-color: #0284c7; }

@keyframes toast-in {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* RESPONSIVE BREAKPOINTS */
@media (max-width: 992px) {
  .app-sidebar {
    transform: translateX(-100%);
  }
  .app-sidebar.open {
    transform: translateX(0);
  }
  .app-main {
    margin-left: 0;
  }
  .btn-mobile-toggle {
    display: flex;
  }
}

@media (max-width: 768px) {
  .app-topbar {
    padding: 0 1rem;
  }
  .page-content {
    padding: 1.25rem;
  }
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  .topbar-title h1 {
    font-size: 1.15rem;
  }
}
