:root {
  --bp-primary: #3b5bfd;
  --bp-primary-dark: #2f46c9;
  --bp-gradient: linear-gradient(135deg, #4f46e5, #3b82f6);
  --bp-sidebar-bg: #0f1b3d;
  --bp-sidebar-hover: #16234f;
  --bp-sidebar-active: #3b5bfd;
  --bp-text-muted: #6b7280;
  --bp-bg: #f4f6fb;
  --bp-success: #16a34a;
  --bp-danger: #dc2626;
  --bp-warning: #d97706;
}

body {
  background: var(--bp-bg);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: #1f2937;
}

a { text-decoration: none; }

/* Auth pages */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eef1ff 0%, #f4f6fb 60%);
  position: relative;
  overflow: hidden;
}
.auth-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 10px 40px rgba(30, 41, 90, 0.08);
  padding: 40px;
  width: 100%;
  max-width: 440px;
}
.auth-logo { display:flex; flex-direction:column; align-items:center; margin-bottom: 24px; }
.auth-logo .brand-icon {
  width: 56px; height: 56px; border-radius: 14px;
  background: var(--bp-gradient); color:#fff; display:flex; align-items:center; justify-content:center;
  font-weight:700; font-size: 26px; margin-bottom: 10px;
}
.auth-logo h2 { font-weight: 700; margin: 0; }
.auth-logo h2 span { color: var(--bp-primary); }
.auth-logo p { color: var(--bp-text-muted); font-size: 13px; margin: 2px 0 0; }

/* App shell */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 260px;
  background: var(--bp-sidebar-bg);
  color: #cbd5e1;
  flex-shrink: 0;
  min-height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
}
.sidebar .brand { display:flex; align-items:center; gap:10px; padding: 20px 22px; }
.sidebar .brand .brand-icon {
  width: 34px; height: 34px; border-radius: 9px; background: var(--bp-gradient);
  display:flex; align-items:center; justify-content:center; color:#fff; font-weight:700;
}
.sidebar .brand span { color:#fff; font-weight:700; font-size: 18px; }
.sidebar-section-title {
  text-transform: uppercase; font-size: 11px; letter-spacing: .06em;
  color: #64748b; padding: 16px 22px 6px;
}
.sidebar-nav { flex: 1; overflow-y:auto; padding-bottom: 10px; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 22px; color: #cbd5e1; font-size: 14.5px; border-left: 3px solid transparent;
}
.sidebar-nav a i { width: 18px; text-align:center; opacity:.85; }
.sidebar-nav a:hover { background: var(--bp-sidebar-hover); color:#fff; }
.sidebar-nav a.active {
  background: var(--bp-sidebar-hover); color: #fff; border-left-color: var(--bp-primary);
}
.sidebar-footer { padding: 16px 22px; border-top: 1px solid rgba(255,255,255,.08); font-size: 12.5px; color:#94a3b8; }

.main-col { flex: 1; min-width: 0; display:flex; flex-direction:column; }
.topbar {
  background: #fff; border-bottom: 1px solid #e5e7eb;
  padding: 12px 24px; display:flex; align-items:center; justify-content:space-between;
  position: sticky; top: 0; z-index: 20;
}
.topbar .avatar-circle {
  width: 38px; height:38px; border-radius:50%; background: var(--bp-gradient);
  color:#fff; display:flex; align-items:center; justify-content:center; font-weight:600;
}
.content { padding: 24px; }
.page-title { font-weight: 700; font-size: 22px; margin-bottom: 2px; }
.breadcrumb-sm { font-size: 13px; color: var(--bp-text-muted); }

.stat-card { border-radius: 14px; border: none; padding: 18px 20px; box-shadow: 0 1px 3px rgba(0,0,0,.05); transition: box-shadow .15s, transform .15s; }
a.stat-card { display: block; }
a.stat-card:hover { box-shadow: 0 8px 20px rgba(30,41,90,.12); transform: translateY(-2px); }
.stat-card .stat-label { font-size: 13px; color: var(--bp-text-muted); font-weight: 600; }
.stat-card .stat-value { font-size: 26px; font-weight: 700; margin-top: 4px; }
.stat-card.blue { background:#eef2ff; }
.stat-card.green { background:#ecfdf5; }
.stat-card.yellow { background:#fffbeb; }
.stat-card.purple { background:#f5f3ff; }

.card-app { border: none; border-radius: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.badge-status-active { background:#dcfce7; color:#15803d; font-weight:600; }
.badge-status-inactive { background:#fee2e2; color:#b91c1c; font-weight:600; }
.badge-status-sent, .badge-status-success { background:#dcfce7; color:#15803d; font-weight:600; }
.badge-status-failed { background:#fee2e2; color:#b91c1c; font-weight:600; }

.brand-card { border-radius: 14px; border: 1px solid #eef0f5; transition: box-shadow .15s, transform .15s; }
.brand-card:hover { box-shadow: 0 8px 24px rgba(30,41,90,.1); transform: translateY(-2px); }
.brand-logo-box {
  height: 56px; display:flex; align-items:center; font-weight:800; font-size: 20px;
}

.btn-primary { background: var(--bp-gradient); border: none; }
.btn-primary:hover { background: var(--bp-primary-dark); }

.table thead th { font-size: 12.5px; text-transform: uppercase; color: var(--bp-text-muted); border-bottom-width: 1px; }
.table td, .table th { vertical-align: middle; }

.progress-steps li { display:flex; align-items:center; gap:10px; padding: 6px 0; font-size: 14px; }
.progress-steps li .step-icon { width:20px; text-align:center; }
.step-done { color: var(--bp-success); }
.step-pending { color: #cbd5e1; }

.credentials-box { background:#f4f6fb; border-radius: 10px; padding: 14px 16px; }
.credentials-box .row-item { display:flex; justify-content:space-between; padding: 4px 0; font-size: 14px; }

.form-label { font-weight: 600; font-size: 13.5px; }
