* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: #f1f5f9;
  color: #1e293b;
  min-height: 100vh;
}

.navbar {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #0f172a;
  color: #e2e8f0;
  padding: 0 20px;
  height: 56px;
}

.navbar-brand {
  font-weight: 700;
  font-size: 18px;
  color: #38bdf8;
}

.navbar-nav { display: flex; gap: 4px; flex: 1; }
.navbar-nav a {
  color: #cbd5e1;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 14px;
}
.navbar-nav a:hover { background: #1e293b; color: #fff; }

.navbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.container { max-width: 1200px; margin: 24px auto; padding: 0 20px; }

h1 { font-size: 24px; margin-bottom: 16px; }
h2 { font-size: 16px; margin-bottom: 12px; color: #334155; }

.card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stat-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}
.stat-value { font-size: 22px; font-weight: 700; color: #0f172a; }
.stat-value.small { font-size: 15px; }
.stat-label { font-size: 13px; color: #64748b; margin-top: 4px; }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #e2e8f0; }
.table thead th { background: #f8fafc; color: #475569; font-size: 13px; }
.table tbody tr:hover { background: #f8fafc; }
.table .num { text-align: right; }

.table-scroll { overflow-x: auto; }

.muted { color: #64748b; font-size: 13px; margin-bottom: 12px; }
.mono { font-family: Consolas, monospace; font-size: 13px; white-space: pre-wrap; word-break: break-word; }
.log-box { background: #0f172a; color: #a5f3fc; border-radius: 8px; padding: 12px; max-height: 320px; overflow-y: auto; }

.filters { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 16px; }
.filters .form-group-grow { flex: 1; min-width: 180px; }
.filters .form-group-actions { display: flex; gap: 8px; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; align-items: end; }

.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: #475569; margin-bottom: 4px; }
.form-group input[type="text"],
.form-group input[type="password"],
.form-group select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 14px;
}
.form-group input:focus, .form-group select:focus { outline: none; border-color: #38bdf8; }

.checkbox-list { display: flex; flex-wrap: wrap; gap: 10px; }
.checkbox-list label { font-size: 14px; font-weight: 400; display: flex; align-items: center; gap: 6px; }

.inline-form { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.inline-form input[type="text"],
.inline-form input[type="password"] {
  padding: 5px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  width: 110px;
}
.inline-form .small-input { width: 150px; }
.inline-label { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }

.btn {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #1e293b;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: #f1f5f9; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: #0284c7; border-color: #0284c7; color: #fff; }
.btn-primary:hover { background: #0369a1; }

.btn-danger { background: #dc2626; border-color: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; }

.btn-outline { background: transparent; }

.btn-block { width: 100%; }
.btn-sm { padding: 4px 10px; font-size: 13px; }

.alert {
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 14px;
}
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-danger  { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.badge-completado { background: #dcfce7; color: #166534; }
.badge-ejecutando { background: #dbeafe; color: #1e40af; }
.badge-pendiente  { background: #f1f5f9; color: #475569; }
.badge-error      { background: #fee2e2; color: #991b1b; }

.progress { height: 10px; background: #e2e8f0; border-radius: 999px; overflow: hidden; margin: 16px 0; }
.progress-bar { height: 100%; width: 0%; background: #0284c7; border-radius: 999px; transition: width 0.4s; }

.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  min-height: 100vh;
}
.login-card {
  background: #fff;
  padding: 36px;
  border-radius: 14px;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.login-card h1 { text-align: center; color: #0284c7; margin-bottom: 24px; }
