/* === Satfilters Tareas — estilos básicos === */

:root {
  --brand: #0d6efd;
  --brand-dark: #0a58ca;
  --sidebar-bg: #1f2937;
  --sidebar-fg: #e5e7eb;
  --sidebar-active: #0d6efd;
}

body {
  background: #f5f6f8;
  color: #1f2937;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* === Login === */
.login-body {
  background: linear-gradient(135deg, #1f2937 0%, #0d6efd 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-wrap {
  width: 100%;
  max-width: 420px;
  padding: 2rem 1rem;
}
.login-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}
.login-brand {
  text-align: center;
  margin-bottom: 2rem;
}
.login-brand i {
  font-size: 3rem;
  color: var(--brand);
}
.login-brand h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0.5rem 0 0.25rem;
}

/* === Layout panel === */
.layout {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  background: var(--sidebar-bg);
  color: var(--sidebar-fg);
  width: 240px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
}
.sidebar-brand {
  font-size: 1.2rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.5rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.sidebar-brand i {
  font-size: 1.5rem;
  color: #60a5fa;
}
.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-top: 1rem;
}
.sidebar-nav a {
  color: var(--sidebar-fg);
  text-decoration: none;
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: background 0.15s;
}
.sidebar-nav a:hover {
  background: rgba(255, 255, 255, 0.05);
}
.sidebar-nav a.active {
  background: var(--sidebar-active);
  color: #fff;
}
.sidebar-user {
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
}
.sidebar-user .user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.5rem;
}

.main {
  flex: 1;
  padding: 2rem;
  max-width: 100%;
  overflow-x: auto;
}
.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.main-header h1 {
  font-size: 1.5rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* === Dashboard tareas === */
.tareas-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}
.stat {
  background: #fff;
  border-radius: 10px;
  padding: 1.25rem;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border-left: 4px solid #94a3b8;
}
.stat-num {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}
.stat-label {
  display: block;
  font-size: 0.85rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.25rem;
}
.stat-atrasadas { border-left-color: #dc3545; }
.stat-atrasadas .stat-num { color: #dc3545; }
.stat-hoy { border-left-color: #fd7e14; }
.stat-hoy .stat-num { color: #fd7e14; }
.stat-proximas { border-left-color: #0d6efd; }
.stat-proximas .stat-num { color: #0d6efd; }

.tareas-group {
  margin-bottom: 2rem;
}
.tareas-group h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e2e8f0;
}
.tareas-group h2 .badge {
  background: #e2e8f0;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 500;
}
.group-atrasadas h2 { color: #dc3545; }
.group-atrasadas h2 .badge { background: #fee2e2; color: #b91c1c; }

.tareas-list {
  display: grid;
  gap: 0.75rem;
}

.tarea-card {
  background: #fff;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border-left: 4px solid #94a3b8;
  transition: box-shadow 0.15s;
}
.tarea-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.tarea-card.prioridad-alta {
  border-left-color: #dc3545;
}
.tarea-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}
.tarea-fecha {
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.tarea-snooze {
  color: #fd7e14;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.tarea-titulo {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  color: #1e293b;
}
.tarea-desc {
  color: #64748b;
  font-size: 0.9rem;
  margin: 0 0 0.75rem;
  white-space: pre-wrap;
}
.tarea-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding-top: 0.5rem;
  border-top: 1px solid #f1f5f9;
}
.inline-form {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
}
.inline-form .form-select-sm {
  width: auto;
  min-width: 90px;
}

.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: #94a3b8;
}
.empty-state i {
  font-size: 4rem;
  display: block;
  margin-bottom: 1rem;
}
.empty-state h2 {
  font-size: 1.25rem;
  font-weight: 500;
  color: #64748b;
}

/* === Formularios === */
.form-card {
  padding: 2rem;
  max-width: 800px;
}
.form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
}

/* === Histórico === */
.filtros-card {
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

/* === Config === */
.config-grid {
  display: grid;
  gap: 1.5rem;
  max-width: 800px;
}
.config-actions {
  border: none;
  margin-top: 0;
  padding-top: 0;
  justify-content: flex-end;
}

/* Layout dos columnas: sub-sidebar + contenido */
.config-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  align-items: start;
}
.config-sidebar {
  position: sticky;
  top: 1rem;
  background: #fff;
  border-radius: 8px;
  padding: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.config-sidebar .nav-pills {
  gap: 0.25rem;
}
.config-sidebar .nav-pills .nav-link {
  color: #475569;
  text-align: left;
  padding: 0.6rem 0.85rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  transition: background 0.15s, color 0.15s;
}
.config-sidebar .nav-pills .nav-link:hover {
  background: #f1f5f9;
  color: #1e293b;
}
.config-sidebar .nav-pills .nav-link.active {
  background: #0d6efd;
  color: #fff;
}
.config-sidebar .nav-pills .nav-link i {
  font-size: 1rem;
  flex-shrink: 0;
}
.config-content {
  min-width: 0;
}
.config-section {
  max-width: 800px;
}

/* === Responsive — sidebar arriba en móvil === */
@media (max-width: 768px) {
  .layout {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    padding: 1rem;
  }
  .sidebar-nav {
    flex-direction: row;
    overflow-x: auto;
    padding-top: 0.5rem;
  }
  .sidebar-user {
    border-top: none;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 1rem;
    padding-top: 0;
  }
  .main {
    padding: 1rem;
  }
  .tareas-stats {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .tarea-acciones {
    flex-direction: column;
    align-items: stretch;
  }
  .inline-form {
    width: 100%;
  }
  .config-layout {
    grid-template-columns: 1fr;
  }
  .config-sidebar {
    position: static;
  }
  .config-sidebar .nav-pills {
    flex-direction: row !important;
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .config-sidebar .nav-pills .nav-link {
    white-space: nowrap;
  }
}

/* === Pestaña Extensión === */
.ext-stat {
  background: #f1f5f9;
  border-radius: 6px;
  padding: 0.75rem;
  text-align: center;
}
.ext-stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.ext-stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e293b;
}

/* Card oscura del cliente Windows (estilo del usuario) */
.ext-folder-card {
  background: #1f2937;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  color: #e5e7eb;
  border: 1px solid #334155;
}
.ext-folder-header {
  background: #111827;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid #334155;
}
.ext-folder-header i { color: #f59e0b; font-size: 1rem; }
.ext-folder-body { padding: 1rem; }
.ext-folder-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.ext-folder-empty {
  width: 100%;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  color: #94a3b8 !important;
}
.ext-folder-chip {
  background: #334155;
  color: #e5e7eb;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  border: 1px solid #475569;
}
.ext-folder-chip i.bi-folder-fill { color: #f59e0b; }
.ext-folder-name { font-weight: 600; }
.ext-folder-rename { color: #60a5fa !important; font-size: 0.8rem !important; }
.ext-folder-del { font-size: 1.1rem !important; font-weight: 700; line-height: 1; }
/* Inputs dentro de la card oscura */
.ext-folder-body .form-control,
.ext-folder-body .form-select {
  background: #0f172a;
  border-color: #475569;
  color: #e5e7eb;
}
.ext-folder-body .form-control::placeholder { color: #64748b; }
.ext-folder-body .form-control:focus,
.ext-folder-body .form-select:focus {
  background: #0f172a;
  border-color: #60a5fa;
  color: #e5e7eb;
  box-shadow: 0 0 0 0.2rem rgba(96, 165, 250, 0.15);
}
.ext-folder-body .input-group-text {
  background: #0f172a;
  border-color: #475569;
  color: #94a3b8;
}

/* === Usuarios (tabla + acciones inline) === */
.users-table td, .users-table th {
  vertical-align: middle;
}
.user-edit-row > td {
  background: #f8fafc;
  padding: 1rem 1.5rem;
  border-bottom: 2px solid #e2e8f0;
}
.user-row-self {
  background: #eff6ff;
}
.user-badge-self {
  background: #dbeafe;
  color: #1e40af;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 0.5rem;
}
