/* ---------- Login page redesign ---------- */
body.jazzmin-login-page {
  background: linear-gradient(135deg, #0f2027 0%, #203a43 45%, #2c5364 100%);
  min-height: 100vh;
}

body.jazzmin-login-page .login-box {
  margin-top: 6vh;
}

body.jazzmin-login-page .login-logo {
  color: #fff;
  margin-bottom: 18px;
  text-align: center;
}

body.jazzmin-login-page .login-logo b,
body.jazzmin-login-page .login-logo a {
  color: #fff !important;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.3px;
  line-height: 1.3;
}

body.jazzmin-login-page .login-logo::after {
  content: "Built by Umar Muhammad Goni (20/05/04/048) & Moses Joseph (20/05/04/038)";
  display: block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.2px;
}

body.jazzmin-login-page .card {
  border-radius: 18px;
  border: none;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

body.jazzmin-login-page .login-box-msg {
  background: linear-gradient(135deg, #1e5799 0%, #2989d8 50%, #207cca 100%);
  color: #fff !important;
  padding: 22px 20px;
  margin: 0;
  font-weight: 600;
  letter-spacing: 0.3px;
}

body.jazzmin-login-page .card-body {
  padding: 28px 26px 20px;
}

body.jazzmin-login-page .form-control {
  border-radius: 10px;
  border: 1px solid #dfe6ee;
  padding: 10px 14px;
}

body.jazzmin-login-page .input-group-text {
  border-radius: 0 10px 10px 0;
  background: #f4f7fb;
}

body.jazzmin-login-page .btn-primary,
body.jazzmin-login-page .btn-block {
  background: linear-gradient(135deg, #1e5799 0%, #2989d8 100%);
  border: none;
  border-radius: 10px;
  padding: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* ---------- Trademark / ownership watermark ---------- */
body.jazzmin-login-page::after,
.wrapper::after {
  content: "© Umar Muhammad Goni  •  ID: 20/05/04/048";
  position: fixed;
  bottom: 10px;
  right: 16px;
  z-index: 9999;
  font-size: 11px;
  letter-spacing: 0.4px;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.35);
  padding: 4px 10px;
  border-radius: 20px;
  pointer-events: none;
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
}

.wrapper::after {
  color: rgba(0, 0, 0, 0.55);
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.15);
}

/* ---------- Admin workspace polish ---------- */
:root {
  --tg-navy: #0f172a;
  --tg-slate: #334155;
  --tg-muted: #64748b;
  --tg-border: #e2e8f0;
  --tg-surface: #ffffff;
  --tg-soft: #f8fafc;
  --tg-blue: #2563eb;
  --tg-green: #059669;
  --tg-red: #dc2626;
  --tg-amber: #d97706;
}

.content-wrapper {
  background: #f4f7fb !important;
}

.content-header h1,
.content-header .content-title {
  color: var(--tg-navy);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.card,
.card.card-outline,
#content-main .module,
#content-main fieldset.module {
  border: 1px solid var(--tg-border) !important;
  border-radius: 14px !important;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06) !important;
  overflow: hidden;
}

.nav-tabs {
  border-bottom: 1px solid var(--tg-border) !important;
  gap: 6px;
  padding: 8px 10px 0;
  background: var(--tg-soft);
}

.nav-tabs .nav-link {
  border: 0 !important;
  border-radius: 9px 9px 0 0 !important;
  color: var(--tg-muted) !important;
  font-weight: 600;
  padding: 10px 18px;
}

.nav-tabs .nav-link.active {
  color: var(--tg-blue) !important;
  background: #fff !important;
  box-shadow: inset 0 -3px 0 var(--tg-blue);
}

.form-group label,
.fieldBox label {
  color: var(--tg-slate);
  font-weight: 600;
}

.form-control,
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
  border: 1px solid #cbd5e1 !important;
  border-radius: 9px !important;
  min-height: 40px;
  box-shadow: none !important;
}

.form-control:focus {
  border-color: #60a5fa !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
}

.help-block,
.help,
.text-muted,
.muted-meta {
  color: var(--tg-muted) !important;
  font-size: 12px;
}

fieldset .description,
.tab-pane > p.help {
  color: var(--tg-muted);
  background: #f8fafc;
  border-left: 3px solid #93c5fd;
  border-radius: 6px;
  padding: 9px 12px;
  margin-bottom: 18px;
}

.money-pill,
.gate-chip,
.type-chip,
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
}

.money-pill {
  padding: 5px 10px;
  color: #065f46;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}

.money-pill.money-low {
  color: #92400e;
  background: #fffbeb;
  border-color: #fde68a;
}

.status-pill {
  padding: 5px 9px;
  font-size: 11px;
}

.status-online {
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}

.status-offline {
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.status-warning {
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.status-neutral {
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
}

.gate-chip,
.type-chip {
  padding: 4px 9px;
  color: #1e40af;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  font-size: 11px;
}

.controller-name {
  color: var(--tg-navy);
  font-weight: 700;
}

.info-card,
.metric-card {
  border: 1px solid var(--tg-border);
  border-radius: 12px;
  background: #fff;
  padding: 14px 16px;
}

.info-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.info-card strong,
.metric-card strong {
  color: var(--tg-navy);
  font-size: 16px;
}

.info-card span,
.metric-card span {
  color: var(--tg-muted);
  font-size: 12px;
}

.info-card-success {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.info-card-warning {
  background: #fffbeb;
  border-color: #fde68a;
}

.info-card-danger {
  background: #fef2f2;
  border-color: #fecaca;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  margin: 4px 0 8px;
}

.metric-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

#result_list {
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}

#result_list thead th {
  background: #f8fafc !important;
  color: #475569 !important;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.045em;
  border-bottom: 1px solid var(--tg-border) !important;
}

#result_list tbody tr:hover {
  background: #f8fbff !important;
}

#result_list td,
#result_list th {
  vertical-align: middle !important;
}

.submit-row .btn,
.submit-row input,
.object-tools .btn,
.object-tools a {
  border-radius: 9px !important;
  font-weight: 600 !important;
}

.btn-success,
input[name="_save"] {
  background: #059669 !important;
  border-color: #059669 !important;
}

.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
  box-shadow: 0 5px 15px rgba(37, 99, 235, 0.28);
  border-radius: 8px;
}

.main-sidebar .nav-link {
  margin: 2px 8px;
  width: calc(100% - 16px);
}

@media (max-width: 768px) {
  .account-grid {
    grid-template-columns: 1fr;
  }

  .nav-tabs .nav-link {
    padding: 9px 11px;
    font-size: 13px;
  }

  .wrapper::after {
    display: none;
  }
}

/* ---------- Operations dashboard ---------- */
.toll-ops-dashboard .content-header { display: none; }
.toll-ops-dashboard .content { padding-top: 24px; }
.toll-ops-dashboard #content-main { max-width: none; }

.ops-shell {
  --ops-ink: #0f172a;
  --ops-text: #334155;
  --ops-muted: #64748b;
  --ops-border: #e2e8f0;
  --ops-green: #059669;
  --ops-blue: #2563eb;
  --ops-red: #dc2626;
  --ops-amber: #d97706;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-bottom: 28px;
}

.ops-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 28px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 85% 0%, rgba(37, 99, 235, .25), transparent 34%),
    linear-gradient(135deg, #0f172a 0%, #172554 55%, #1e3a8a 100%);
  color: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .18);
}

.ops-eyebrow {
  display: block;
  color: #60a5fa;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-bottom: 7px;
}

.ops-hero h1 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -.035em;
}

.ops-hero p {
  margin: 8px 0 0;
  color: #cbd5e1;
  font-size: 13px;
}

.ops-system-state {
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 14px;
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(12px);
}

.ops-system-state strong, .ops-system-state small { display: block; }
.ops-system-state strong { font-size: 13px; }
.ops-system-state small { margin-top: 2px; color: #cbd5e1; font-size: 10px; }
.ops-live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 5px rgba(52, 211, 153, .13), 0 0 18px rgba(52, 211, 153, .65);
}

.ops-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.ops-stat {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 118px;
  padding: 18px;
  border: 1px solid var(--ops-border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 9px 26px rgba(15, 23, 42, .055);
  overflow: hidden;
}

.ops-stat::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -34px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: #eff6ff;
}

.ops-stat-icon {
  position: relative;
  z-index: 1;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #1d4ed8;
  background: #eff6ff;
  font-size: 18px;
  font-weight: 800;
}

.ops-stat > div { position: relative; z-index: 1; min-width: 0; }
.ops-stat small, .ops-stat span { display: block; color: var(--ops-muted); }
.ops-stat small { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.ops-stat strong { display: block; color: var(--ops-ink); font-size: 25px; line-height: 1.1; margin: 5px 0 4px; }
.ops-stat span { font-size: 11px; }

.ops-grid { display: grid; gap: 18px; }
.ops-grid-main { grid-template-columns: minmax(0, 1.75fr) minmax(310px, .85fr); }
.ops-grid-bottom { grid-template-columns: minmax(0, 1.25fr) minmax(310px, .75fr); }

.ops-panel {
  border: 1px solid var(--ops-border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 9px 28px rgba(15, 23, 42, .055);
  overflow: hidden;
}

.ops-panel-head {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--ops-border);
}

.ops-panel-head .ops-eyebrow { margin-bottom: 3px; font-size: 9px; }
.ops-panel-head h2 { margin: 0; color: var(--ops-ink); font-size: 16px; font-weight: 800; }
.ops-link { color: var(--ops-blue) !important; font-size: 11px; font-weight: 700; white-space: nowrap; }

.ops-table-wrap { overflow-x: auto; }
.ops-table { width: 100%; border-collapse: collapse; }
.ops-table th {
  padding: 10px 14px;
  color: var(--ops-muted);
  background: #f8fafc;
  border-bottom: 1px solid var(--ops-border);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  text-align: left;
}
.ops-table td {
  padding: 12px 14px;
  color: var(--ops-text);
  border-bottom: 1px solid #eef2f7;
  font-size: 12px;
  vertical-align: middle;
}
.ops-table tr:last-child td { border-bottom: 0; }
.ops-table td strong, .ops-table td small { display: block; }
.ops-table td small { margin-top: 2px; color: var(--ops-muted); font-size: 10px; }
.ops-table a { color: #1d4ed8 !important; }

.ops-chip {
  display: inline-flex;
  padding: 4px 8px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1e40af;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.ops-status, .ops-state {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.ops-status { padding: 4px 8px; }
.ops-status-success, .ops-state-online { color: #047857; background: #ecfdf5; }
.ops-status-failed, .ops-state-offline { color: #b91c1c; background: #fef2f2; }
.ops-status-pending, .ops-state-warning { color: #b45309; background: #fffbeb; }
.ops-state-neutral { color: #475569; background: #f1f5f9; }
.ops-muted { color: var(--ops-muted); }
.ops-empty { padding: 24px !important; color: var(--ops-muted) !important; text-align: center; font-size: 12px; }

.ops-gate-list, .ops-balance-list { display: flex; flex-direction: column; }
.ops-gate-row, .ops-balance-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 17px;
  border-bottom: 1px solid #eef2f7;
  color: inherit !important;
  transition: background .15s ease;
}
.ops-gate-row:last-child, .ops-balance-row:last-child { border-bottom: 0; }
.ops-gate-row:hover, .ops-balance-row:hover { background: #f8fbff; text-decoration: none !important; }
.ops-gate-mark { font-size: 13px; }
.ops-gate-online { color: #10b981; }
.ops-gate-warning { color: #f59e0b; }
.ops-gate-offline { color: #ef4444; }
.ops-gate-neutral { color: #94a3b8; }
.ops-gate-copy { flex: 1; min-width: 0; }
.ops-gate-copy strong, .ops-gate-copy small, .ops-gate-state small { display: block; }
.ops-gate-copy strong { color: var(--ops-ink); font-size: 12px; }
.ops-gate-copy small, .ops-gate-state small { margin-top: 2px; color: var(--ops-muted); font-size: 9px; }
.ops-gate-state { text-align: right; }
.ops-state { padding: 4px 8px; }

.ops-balance-row { justify-content: space-between; }
.ops-balance-row > div strong, .ops-balance-row > div small { display: block; }
.ops-balance-row > div strong { color: var(--ops-ink); font-size: 12px; }
.ops-balance-row > div small { margin-top: 3px; color: var(--ops-muted); font-size: 10px; }
.ops-balance-amount {
  padding: 5px 9px;
  border-radius: 999px;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  font-size: 11px;
  font-weight: 800;
}

.ops-actions { display: grid; grid-template-columns: 1fr; padding: 10px; gap: 8px; }
.ops-actions > a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  color: inherit !important;
  border: 1px solid var(--ops-border);
  border-radius: 11px;
  background: #fff;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.ops-actions > a:hover { transform: translateY(-1px); border-color: #bfdbfe; box-shadow: 0 7px 18px rgba(37, 99, 235, .08); text-decoration: none !important; }
.ops-actions > a > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: #1d4ed8; background: #eff6ff; font-size: 17px; font-weight: 800; }
.ops-actions strong, .ops-actions small { display: block; }
.ops-actions strong { color: var(--ops-ink); font-size: 12px; }
.ops-actions small { margin-top: 2px; color: var(--ops-muted); font-size: 10px; }

/* Cleaner footer and no floating ownership pill over tables. */
.wrapper::after { display: none !important; content: none !important; }
.main-footer { color: #64748b; font-size: 12px; }

@media (max-width: 1100px) {
  .ops-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops-grid-main, .ops-grid-bottom { grid-template-columns: 1fr; }
}

@media (max-width: 650px) {
  .toll-ops-dashboard .content { padding-top: 12px; }
  .ops-shell { gap: 12px; }
  .ops-hero { align-items: flex-start; flex-direction: column; padding: 20px; border-radius: 14px; }
  .ops-system-state { min-width: 0; width: 100%; }
  .ops-metrics { grid-template-columns: 1fr; gap: 10px; }
  .ops-stat { min-height: 92px; }
  .ops-panel-head { align-items: flex-start; flex-direction: column; gap: 6px; }
}
