:root {
  --otitest-primary: #0061FE;
  --otitest-primary-dark: #0047BE;
  --otitest-bg: #F4F6FB;
  --otitest-sidebar: #0F172A;
  --otitest-sidebar-muted: #94A3B8;
}

body { background: var(--otitest-bg) !important; }

/* ── Login / unauthenticated ──────────────────────────────────────── */
.auth-shell {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0061FE 0%, #0047BE 100%);
  padding: 24px;
}
.auth-card {
  background: #fff; border-radius: 16px; box-shadow: 0 20px 60px rgba(15, 23, 42, 0.2);
  padding: 36px 36px 32px; width: 100%; max-width: 380px;
}
.auth-brand {
  display: flex; align-items: center; gap: 12px; margin-bottom: 24px;
}
.brand-dot {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, #0061FE 0%, #0047BE 100%);
  box-shadow: 0 4px 12px rgba(0, 97, 254, 0.35);
}
.brand-name { font-size: 18px; font-weight: 700; color: #0F172A; line-height: 1.1; }
.brand-sub  { font-size: 12px; color: #64748B; line-height: 1.2; letter-spacing: 0.04em; text-transform: uppercase; }

.btn-primary {
  background: var(--otitest-primary) !important;
  border-color: var(--otitest-primary) !important;
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--otitest-primary-dark) !important;
  border-color: var(--otitest-primary-dark) !important;
  box-shadow: 0 0 0 0.2rem rgba(0, 97, 254, 0.25) !important;
}
.form-control:focus {
  border-color: var(--otitest-primary);
  box-shadow: 0 0 0 0.2rem rgba(0, 97, 254, 0.15);
}

/* ── App shell (sidebar + main) ────────────────────────────────────── */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 260px; min-width: 260px;
  background: var(--otitest-sidebar);
  color: #E2E8F0;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sidebar-brand {
  padding: 22px 22px 18px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar-brand .brand-name { color: #fff; }
.sidebar-brand .brand-sub { color: #94A3B8; }

.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }
.sidebar-nav .nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; margin: 2px 0; border-radius: 8px;
  color: var(--otitest-sidebar-muted);
  font-size: 14px; text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.sidebar-nav .nav-link i { font-size: 16px; width: 18px; text-align: center; }
.sidebar-nav .nav-link:hover {
  background: rgba(255, 255, 255, 0.06); color: #fff;
}
.sidebar-nav .nav-link.active {
  background: var(--otitest-primary); color: #fff;
  box-shadow: 0 4px 14px rgba(0, 97, 254, 0.35);
}

.sidebar-footer {
  padding: 16px 18px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.user-pill {
  display: flex; align-items: center; gap: 8px;
  color: #E2E8F0; font-size: 13px; margin-bottom: 8px;
}
.user-pill i { font-size: 18px; }
.logout-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--otitest-sidebar-muted); font-size: 13px; text-decoration: none;
}
.logout-link:hover { color: #fff; }

.main { flex: 1; padding: 32px 40px; max-width: 1200px; }

/* ── Page chrome ──────────────────────────────────────────────────── */
.page-header { margin-bottom: 24px; }
.page-header h1 {
  font-size: 24px; font-weight: 700; color: #0F172A;
  margin: 0; line-height: 1.2;
}
.page-header p { margin: 4px 0 0; }

.flash-stack { margin-bottom: 20px; }

/* ── Cards ────────────────────────────────────────────────────────── */
.stat-card {
  background: #fff; border-radius: 12px; padding: 18px;
  display: flex; align-items: center; gap: 16px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
.stat-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: rgba(0, 97, 254, 0.12); color: var(--otitest-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.stat-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: #64748B; }
.stat-value { font-size: 26px; font-weight: 700; color: #0F172A; line-height: 1.1; }
.stat-link  { font-size: 13px; color: var(--otitest-primary); text-decoration: none; }
.stat-link:hover { text-decoration: underline; }

.empty-card {
  background: #fff; border-radius: 12px; padding: 48px 24px;
  text-align: center; color: #64748B;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
.empty-card i { font-size: 36px; display: block; margin-bottom: 12px; color: #94A3B8; }
.empty-card p { font-size: 15px; }

.card { border: none; border-radius: 12px; }
.table thead th {
  background: #F8FAFC; color: #475569;
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em;
  border-bottom: 1px solid #E2E8F0;
}
.table > :not(caption) > * > * { padding: 12px 16px; }

@media (max-width: 800px) {
  .sidebar { display: none; }
  .main { padding: 20px; }
}
