/* PAGE */
.sesiones-list-page {
  min-height: calc(100vh - var(--header-height) - var(--footer-height));
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px 24px 140px;
  box-sizing: border-box;
}

/* HEADER */
.sesiones-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.sesiones-list-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* TITLE */
.sesiones-list-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-text);
}

.sesiones-list-subtitle {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-top: 4px;
}

/* KPIS */
.sesiones-list-header-kpis {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.sesiones-list-header-kpi {
  height: 52px;
  padding: 0 16px;
  border-radius: 18px;
  background: white;
  border: 1px solid #eef2ff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sesiones-list-header-kpi-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  flex-shrink: 0;
}

.sesiones-list-header-kpi-icon.blue {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.sesiones-list-header-kpi-icon.green {
  background: linear-gradient(135deg, #10b981, #059669);
}

.sesiones-list-header-kpi-icon.orange {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.sesiones-list-header-kpi-icon.purple {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.sesiones-list-header-kpi-text {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
}

.sesiones-list-header-kpi-text span {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
}

/* HEADER ACTIONS */
.sesiones-list-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* FILTERS */
.sesiones-list-filters {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) 220px 220px;
  gap: 16px;
  align-items: center;
}

/* SEARCH */
.sesiones-list-search-wrapper {
  position: relative;
  width: 100%;
  min-width: 0;
}

.sesiones-list-search-wrapper i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 15px;
}

.sesiones-list-search-input {
  width: 100%;
  height: 48px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: white;
  padding-left: 46px;
  padding-right: 16px;
  font-size: 14px;
  outline: none;
  transition: 0.2s ease;
  box-sizing: border-box;
}

.sesiones-list-search-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.sesiones-list-filter-status,
.sesiones-list-filter-device {
  width: 100%;
}

/* TABLE CARD */
.sesiones-list-table-card {
  background: white;
  border-radius: 28px;
  border: 1px solid #eef2ff;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.sesiones-list-table-wrapper {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 70vh;
  min-height: 200px;
  padding-bottom: 120px;
}

/* TABLE */
.sesiones-list-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1250px;
}

.sesiones-list-table thead {
  background: #f8fafc;
}

.sesiones-list-table thead th {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #f8fafc;
}

.sesiones-list-table th {
  text-align: left;
  padding: 18px 20px;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  white-space: nowrap;
  border-bottom: 1px solid #e2e8f0;
}

.sesiones-list-table td {
  padding: 18px 20px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.sesiones-list-row {
  transition: 0.2s ease;
}

.sesiones-list-row:hover {
  background: #f8fafc;
}

/* USER */
.sesiones-list-user {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sesiones-list-avatar {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
  font-size: 22px;
  flex-shrink: 0;
}

.sesiones-list-user-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
}

.sesiones-list-user-role {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-top: 4px;
}

/* DEVICE */
.sesiones-list-device {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.sesiones-list-device i {
  font-size: 18px;
  color: var(--color-primary);
}

/* BROWSER */
.sesiones-list-browser {
  font-size: 14px;
  color: #334155;
}

/* IP */
.sesiones-list-ip {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}

/* DATE */
.sesiones-list-date {
  font-size: 13px;
  color: #64748b;
  white-space: nowrap;
}

/* ACTIONS */
.sesiones-list-action-wrapper {
  position: relative;
}

/* MENU */
.sesiones-list-action-menu {
  position: fixed;
  width: 220px;
  background: white;
  border-radius: 18px;
  padding: 10px;
  z-index: 9999;
  border: 1px solid #e2e8f0;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}

.sesiones-list-action-menu.hidden {
  display: none;
}

/* ITEM */
.sesiones-list-action-item {
  width: 100%;
  height: 42px;
  border: none;
  background: transparent;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  cursor: pointer;
  transition: 0.2s ease;
  font-size: 14px;
  font-weight: 500;
  color: #334155;
}

.sesiones-list-action-item:hover {
  background: #f8fafc;
}

.sesiones-list-action-item.danger {
  color: #dc2626;
}

.sesiones-list-action-item.danger:hover {
  background: #fef2f2;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .sesiones-list-page {
    padding: 18px 18px 120px;
  }

  .sesiones-list-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .sesiones-list-header-left {
    width: 100%;
  }

  .sesiones-list-header-actions {
    width: 100%;
  }

  .sesiones-list-header-actions button {
    width: 100%;
  }

  .sesiones-list-filters {
    grid-template-columns: 1fr;
  }

  .sesiones-list-filter-status,
  .sesiones-list-filter-device {
    width: 100%;
  }

  .sesiones-list-search-wrapper {
    min-width: unset;
  }
}
