/* styles.css - Sistema de Gestión de Inventario Poker */
:root {
  --bg-main: #0b0f19;
  --bg-card: #151d2e;
  --bg-card-hover: #1c263c;
  --bg-header: #0f172a;
  --border-color: #243048;
  --border-active: #3b82f6;
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --poker-gold: #eab308;
  --poker-gold-glow: rgba(234, 179, 8, 0.2);
  --poker-emerald: #10b981;
  --poker-emerald-glow: rgba(16, 185, 129, 0.25);
  --poker-blue: #3b82f6;
  --poker-blue-glow: rgba(59, 130, 246, 0.25);
  --poker-red: #ef4444;
  --poker-purple: #8b5cf6;
  
  --status-in-use: #10b981;
  --status-charging: #3b82f6;
  --status-idle: #64748b;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-mono: 'Consolas', 'Monaco', 'Courier New', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-main);
  min-height: 100vh;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
}

/* Header & Stats Banner */
header {
  background: linear-gradient(180deg, #131b2e 0%, #0d1322 100%);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.header-container {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-icon {
  font-size: 2rem;
  background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
  border-radius: var(--radius-md);
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px var(--poker-gold-glow);
}

.brand-titles h1 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-titles p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.badge-event {
  background: rgba(234, 179, 8, 0.15);
  color: var(--poker-gold);
  border: 1px solid rgba(234, 179, 8, 0.4);
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

/* Header Top Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  user-select: none;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  border-color: #3b82f6;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  transform: translateY(-1px);
}

.btn-gold {
  background: linear-gradient(135deg, #ca8a04, #a16207);
  color: #fff;
  border-color: var(--poker-gold);
  box-shadow: 0 2px 8px var(--poker-gold-glow);
}

.btn-gold:hover {
  background: linear-gradient(135deg, #eab308, #ca8a04);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #1e293b;
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: #27354f;
  border-color: #3b82f6;
}

.btn-success {
  background: #059669;
  color: white;
}

.btn-success:hover {
  background: #10b981;
}

.btn-danger {
  background: #dc2626;
  color: white;
}

.btn-danger:hover {
  background: #ef4444;
}

.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
}

/* Quick Stats Row */
.stats-grid {
  max-width: 1600px;
  margin: 1.25rem auto 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.85rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  transition: all 0.18s ease;
  cursor: pointer;
  user-select: none;
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  background: rgba(30, 41, 59, 0.95);
}

.stat-card.stat-card-active {
  border-color: #3b82f6 !important;
  background: rgba(37, 99, 235, 0.18) !important;
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.45) !important;
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.stat-info .stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.1;
}

.stat-info .stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* Controls & Tabs Toolbar */
.toolbar-section {
  max-width: 1600px;
  margin: 1.25rem auto 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.tabs-container {
  display: flex;
  background: #0f172a;
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  gap: 4px;
  overflow-x: auto;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
}

.tab-btn.tab-btn-admin.active {
  background: #d97706 !important;
  color: #ffffff !important;
  border-color: #f59e0b !important;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4) !important;
}

.tab-badge {
  background: rgba(0, 0, 0, 0.35);
  padding: 1px 7px;
  border-radius: 9999px;
  font-size: 0.72rem;
}

.search-filters {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-grow: 1;
  max-width: 600px;
}

.search-box {
  position: relative;
  flex-grow: 1;
}

.search-box input {
  width: 100%;
  background: #0f172a;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.6rem 1rem 0.6rem 2.4rem;
  color: var(--text-primary);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-box input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.search-icon {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.select-filter {
  background: #0f172a;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.85rem;
  color: var(--text-primary);
  font-size: 0.875rem;
  outline: none;
  cursor: pointer;
}

/* Main Equipment Grid */
main {
  max-width: 1600px;
  margin: 1.25rem auto;
  padding: 0 1.5rem 3rem 1.5rem;
  flex-grow: 1;
  width: 100%;
}

.devices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.1rem;
}

/* Device Card */
.device-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.85rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.device-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: var(--status-idle);
  transition: background-color 0.2s ease;
}

.device-card.status-in-use::before {
  background: var(--status-in-use);
  box-shadow: 0 0 10px var(--poker-emerald);
}

.device-card.status-charging::before {
  background: var(--status-charging);
  box-shadow: 0 0 10px var(--poker-blue);
}

.device-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  background: var(--bg-card-hover);
}

/* Main Equipment Grid & List Layouts */
main {
  max-width: 1600px;
  margin: 1.25rem auto;
  padding: 0 1.5rem 3rem 1.5rem;
  flex-grow: 1;
  width: 100%;
}

.devices-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.35rem !important;
  width: 100% !important;
}

.devices-grid.view-list-2col {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.35rem !important;
  width: 100% !important;
}

/* Fila Horizontal Continua: Dispositivo | Empleado | Botón Estado | Cronómetro */
.device-row {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: var(--radius-md);
  padding: 0.45rem 1.25rem;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 1.25rem;
  width: 100%;
  white-space: nowrap !important;
  transition: all 0.15s ease;
  position: relative;
  box-sizing: border-box;
}

.device-row:hover {
  background: #172033;
  border-color: #374151;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}

.device-row.state-active-use {
  border-color: rgba(16, 185, 129, 0.4);
  background: #0d1e1e;
}

.device-row.state-active-charge {
  border-color: rgba(59, 130, 246, 0.35);
  background: #0f1c2e;
}

/* Separadores verticales | */
.cell-divider {
  color: #374151;
  font-weight: 300;
  font-size: 0.9rem;
  user-select: none;
}

/* 1. Celda Dispositivo (ej: Tableta 1 o Laptop 1) */
.cell-device {
  min-width: 110px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  white-space: nowrap !important;
}

.device-tag-text {
  font-weight: 700;
  font-size: 0.9rem;
  color: #f3f4f6;
  white-space: nowrap !important;
}

.device-row.state-active-use .device-tag-text {
  color: #34d399;
}

/* 2. Celda Nombre de Empleado (Clic para menú con opción de ver responsiva) */
.cell-employee {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  overflow: hidden;
  min-width: 0;
  white-space: nowrap !important;
}

.clickable-emp-cell {
  cursor: pointer;
  border-radius: 4px;
  padding: 2px 6px;
  transition: all 0.15s ease;
  white-space: nowrap !important;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 100%;
}

.clickable-emp-cell:hover {
  background: rgba(59, 130, 246, 0.15);
}

.clickable-emp-cell:hover .emp-name-text {
  color: #93c5fd;
}

.emp-name-text {
  font-size: 0.88rem;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: ellipsis;
}

.emp-none {
  color: #64748b;
  font-style: italic;
  font-weight: normal;
  white-space: nowrap !important;
}

.emp-arrow {
  color: var(--text-muted);
  font-size: 0.72rem;
  margin-left: 2px;
  transition: transform 0.15s ease;
  flex-shrink: 0;
  white-space: nowrap !important;
}

.clickable-emp-cell:hover .emp-arrow {
  color: #93c5fd;
  transform: translateY(1px);
}

/* Global Employee Dropdown Menu */
.global-emp-dropdown {
  position: absolute;
  z-index: 500;
  background: #111827;
  border: 1px solid #374151;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  min-width: 220px;
  display: flex;
  flex-direction: column;
  padding: 0.35rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.global-emp-dropdown.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.emp-drop-header {
  padding: 0.45rem 0.65rem 0.5rem 0.65rem;
  border-bottom: 1px solid #1f2937;
  margin-bottom: 0.25rem;
  font-size: 0.85rem;
  color: #fff;
}

.emp-drop-btn {
  background: transparent;
  border: none;
  color: #e5e7eb;
  padding: 0.5rem 0.65rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.12s ease;
}

.emp-drop-btn:hover {
  background: #1f2937;
  color: #60a5fa;
}

/* 3. Celda Botón Único de Estado (EN USO / CARGANDO) */
.cell-status-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  white-space: nowrap !important;
}

.btn-state-toggle {
  padding: 0.32rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 800;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  letter-spacing: 0.02em;
  min-width: 120px;
  flex-shrink: 0;
}

.btn-state-toggle.state-in-use {
  background: #059669;
  color: #ffffff;
  border-color: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.btn-state-toggle.state-in-use:hover {
  background: #047857;
}

.btn-state-toggle.state-charging {
  background: #1e3a8a;
  color: #93c5fd;
  border-color: #3b82f6;
}

.btn-state-toggle.state-charging:hover {
  background: #2563eb;
  color: #ffffff;
}

/* 4. Celda Cronómetro (Únicamente tiempo del turno) */
.cell-timer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 80px;
  white-space: nowrap !important;
}

.timer-display {
  font-size: 0.92rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #34d399;
  white-space: nowrap !important;
}

.device-row:not(.state-active-use) .timer-display {
  color: #64748b;
}

/* 5. Acciones Auxiliares (Editar / Asignar) */
.cell-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  white-space: nowrap !important;
}

.btn-tiny-icon {
  background: #1f2937;
  border: 1px solid #374151;
  color: #9ca3af;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.76rem;
  transition: all 0.15s ease;
}

.btn-tiny-icon:hover {
  color: #ffffff;
  background: #374151;
  border-color: #60a5fa;
}

/* View Mode Switcher in toolbar */
.view-switch-group {
  display: flex;
  background: #0f172a;
  padding: 2px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.view-switch-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.15s ease;
}

.view-switch-btn.active {
  background: #1e293b;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Device Card (Vista en Cuadrícula) */
.device-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.85rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.device-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: var(--status-idle);
  transition: background-color 0.2s ease;
}

.device-card.status-in-use::before {
  background: var(--status-in-use);
  box-shadow: 0 0 10px var(--poker-emerald);
}

.device-card.status-charging::before {
  background: var(--status-charging);
  box-shadow: 0 0 10px var(--poker-blue);
}

.device-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  background: var(--bg-card-hover);
}

.employee-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.employee-name-wrap {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  overflow: hidden;
}

.employee-icon {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.employee-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.employee-unassigned {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.85rem;
}

/* Responsiva Pill */
.responsiva-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 9999px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.responsiva-pill:hover {
  opacity: 0.85;
  transform: scale(1.03);
}

.pill-attached {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.pill-pending {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Timer & Usage Info */
.usage-metrics {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.45rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.metric-item {
  display: flex;
  flex-direction: column;
}

.metric-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.metric-value {
  font-size: 0.88rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.live-timer-val {
  color: #34d399;
  font-weight: 800;
}

/* Card Actions Toolbar */
.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.45rem;
  align-items: center;
}

.btn-toggle-use {
  background: #1e293b;
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 0.78rem;
  padding: 0.48rem 0.5rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

.btn-toggle-use:hover {
  background: rgba(16, 185, 129, 0.2);
}

.btn-toggle-use.active-btn {
  background: #059669;
  color: #fff;
  border-color: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.btn-toggle-charge {
  background: #1e293b;
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
  font-size: 0.78rem;
  padding: 0.48rem 0.5rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

.btn-toggle-charge:hover {
  background: rgba(59, 130, 246, 0.2);
}

.btn-toggle-charge.active-btn {
  background: #2563eb;
  color: #fff;
  border-color: #3b82f6;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

.btn-icon-square {
  background: #1e293b;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-icon-square:hover {
  color: #fff;
  background: #2d3e5c;
  border-color: #3b82f6;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 7, 15, 0.88);
  backdrop-filter: blur(6px);
  display: none !important;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-in-out;
}

.modal-overlay.open {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.modal-card {
  background: #131b2e;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 650px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
}

.modal-card-lg {
  max-width: 950px;
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #0e1525;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.modal-close-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: #0e1525;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Forms in Modal */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.form-control {
  background: #090e1a;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  color: #fff;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.form-control:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* File Upload Area */
.file-dropzone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  background: rgba(15, 23, 42, 0.4);
  cursor: pointer;
  transition: all 0.2s ease;
}

.file-dropzone:hover, .file-dropzone.dragover {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.08);
}

.dropzone-icon {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  color: #60a5fa;
}

/* Document Viewer Modal */
.doc-viewer-container {
  min-height: 480px;
  background: #080c16;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.doc-viewer-container img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

.doc-viewer-container iframe {
  width: 100%;
  height: 70vh;
  border: none;
}

/* Responsiva Lookup Popup Results */
.lookup-results-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 380px;
  overflow-y: auto;
}

.lookup-item {
  background: #0d1322;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.15s ease;
}

.lookup-item:hover {
  background: #18233a;
  border-color: #3b82f6;
}

.lookup-emp-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.lookup-dev-info {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  gap: 0.8rem;
}

/* Sessions history list in details modal */
.session-history-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 200px;
  overflow-y: auto;
  background: #090e1a;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.session-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.session-item:last-child {
  border-bottom: none;
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  padding: 4rem 2rem;
  text-align: center;
  background: var(--bg-card);
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
}

.empty-state-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto 1.5rem auto;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 200;
  pointer-events: none;
}

.toast {
  background: #1e293b;
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.875rem;
  font-weight: 500;
  animation: slide-in 0.2s ease-out;
  pointer-events: auto;
}

.toast.toast-success {
  border-left: 4px solid #10b981;
}

.toast.toast-error {
  border-left: 4px solid #ef4444;
}

.toast.toast-info {
  border-left: 4px solid #3b82f6;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    align-items: flex-start;
  }
  .toolbar-section {
    flex-direction: column;
    align-items: stretch;
  }
  .search-filters {
    max-width: 100%;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
}
