:root {
  --pulso-blue: #0b2447;
  --pulso-blue-2: #19376d;
  --pulso-green: #22a06b;
  --pulso-bg: #f3f6fa;
  --pulso-text: #1e293b;
}

html { font-size: 15px; }
body { color: var(--pulso-text); background: var(--pulso-bg); margin: 0; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 264px; background: var(--pulso-blue); color: #fff; padding: 22px 18px; position: sticky; top: 0; height: 100vh; }
.brand { color: #fff; display: flex; gap: 12px; align-items: center; text-decoration: none; margin-bottom: 28px; }
.brand:hover { color: #fff; }
.brand-mark { width: 42px; height: 42px; border-radius: 8px; display: grid; place-items: center; background: var(--pulso-green); font-weight: 800; }
.brand small { display: block; color: #b8c7dc; }
.sidebar-nav { display: grid; gap: 6px; }
.sidebar-nav a { color: #dbe7f6; text-decoration: none; padding: 11px 12px; border-radius: 8px; }
.sidebar-nav a:hover { background: var(--pulso-blue-2); color: #fff; }
.content-wrap { flex: 1; min-width: 0; }
.topbar { min-height: 82px; background: #fff; border-bottom: 1px solid #d9e2ef; display: flex; align-items: center; justify-content: space-between; padding: 16px 28px; }
.topbar h1 { margin: 0; font-size: 1.45rem; font-weight: 700; }
.eyebrow { color: var(--pulso-green); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0; }
.main-content { padding: 28px; }
.toolbar { background: #fff; border: 1px solid #d9e2ef; border-radius: 8px; padding: 16px; margin-bottom: 18px; }
.card, .table-card { border: 1px solid #d9e2ef; border-radius: 8px; box-shadow: 0 8px 22px rgba(15, 23, 42, .04); }
.table-card { background: #fff; overflow: hidden; }
.table { margin: 0; }
.metric { background: #fff; border: 1px solid #d9e2ef; border-radius: 8px; padding: 18px; }
.metric strong { display: block; font-size: 1.7rem; }
.status-badge { border-radius: 999px; padding: .35rem .6rem; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.status-success { background: #dcfce7; color: #166534; }
.status-danger { background: #fee2e2; color: #991b1b; }
.status-warning { background: #fef3c7; color: #92400e; }
.status-primary { background: #dbeafe; color: #1d4ed8; }
.status-muted { background: #e2e8f0; color: #475569; }
.btn-primary { background: var(--pulso-blue-2); border-color: var(--pulso-blue-2); }
.btn-success { background: var(--pulso-green); border-color: var(--pulso-green); }
.form-label { font-weight: 700; }
.nav-tabs .nav-link { color: var(--pulso-blue-2); }
.progress { height: 12px; }
.progress-bar { background: var(--pulso-green); }
.overdue { background: #fff5f5; }
.topbar h1 { overflow-wrap: anywhere; }
.metric strong { overflow-wrap: anywhere; }
.table td form { min-width: 160px; }
.task-actions { min-width: 225px; }
.list-group-horizontal .list-group-item { flex: 0 1 auto; }

.auth-shell { min-height: 100vh; padding: 32px 20px; display: grid; align-content: center; justify-items: center; gap: 24px; background: #edf2f7; }
.auth-brand { color: var(--pulso-blue); display: flex; gap: 12px; align-items: center; text-decoration: none; }
.auth-brand:hover { color: var(--pulso-blue); }
.auth-brand small { color: #64748b; display: block; }
.auth-card { width: min(100%, 430px); background: #fff; border: 1px solid #d9e2ef; border-radius: 8px; padding: 28px; box-shadow: 0 12px 34px rgba(15, 23, 42, .08); }
.auth-alert { width: min(100%, 430px); margin: 0; }
.recovery-code { font-size: 1.35rem; text-align: center; letter-spacing: .35rem; font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
  .app-shell { display: block; }
  .sidebar { width: 100%; height: auto; position: static; }
  .sidebar-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar { align-items: flex-start; gap: 12px; flex-direction: column; }
  .main-content { padding: 18px; }
}
