* { box-sizing: border-box; }

:root {
  --switch-blue-dark: #0a0f6b;
  --switch-blue: #12178f;
  --switch-blue-mid: #1b3fd6;
  --switch-blue-light: #3aa0f0;
  --switch-cyan: #4fc3f7;
  --text-dark: #1a1f36;
  --text-muted: #5b6172;
  --bg-page: #eef1fb;
  --card-bg: #ffffff;
  --border-color: #dfe3f0;
  --danger: #d0342c;
  --success: #1a8a3c;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(circle at 10% 0%, rgba(27, 63, 214, 0.06), transparent 40%),
    var(--bg-page);
  color: var(--text-dark);
}

/* ---------- Login page ---------- */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 85% 15%, rgba(79, 195, 247, 0.25), transparent 45%),
    linear-gradient(135deg, var(--switch-blue-dark) 0%, var(--switch-blue) 55%, var(--switch-blue-mid) 100%);
  padding: 24px;
}

.brand-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.brand-header .brand-name {
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.brand-header .brand-sub {
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
  margin-top: 2px;
}

.partner-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.partner-badge img {
  height: 22px;
  width: auto;
  display: block;
  border-radius: 4px;
  background: #fff;
  padding: 2px 5px;
}

.partner-badge span {
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  font-weight: 500;
}

.card {
  background: var(--card-bg);
  padding: 32px;
  border-radius: 14px;
  box-shadow: 0 20px 45px rgba(10, 15, 107, 0.35);
  width: 100%;
  max-width: 380px;
}
.card h1 {
  margin-top: 0;
  font-size: 20px;
  color: var(--switch-blue);
}

label { display: block; margin-bottom: 16px; font-size: 14px; color: var(--text-muted); }
input {
  width: 100%;
  padding: 10px 12px;
  margin-top: 6px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus {
  outline: none;
  border-color: var(--switch-blue-mid);
  box-shadow: 0 0 0 3px rgba(27, 63, 214, 0.15);
}

button {
  width: 100%;
  padding: 11px 12px;
  background: linear-gradient(135deg, var(--switch-blue-mid), var(--switch-blue-light));
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s;
}
button:hover { filter: brightness(1.08); }

.error {
  color: var(--danger);
  font-size: 13px;
  margin-top: 12px;
}
.hidden { display: none; }

.footer-note {
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  margin-top: 22px;
  text-align: center;
}

.brand-banner {
  width: 100%;
  max-width: 900px;
  margin-top: 30px;
  border-radius: 10px;
  display: block;
  opacity: 0.92;
}

/* ---------- Dashboard V2.0 ---------- */
.topbar-v2 {
  position: relative;
  background-color: var(--switch-blue-dark);
  background-image:
    linear-gradient(90deg, rgba(10, 15, 107, 0.94) 0%, rgba(10, 15, 107, 0.6) 42%, rgba(10, 15, 107, 0) 78%),
    url('/img/services-banner.png');
  background-repeat: no-repeat, no-repeat;
  background-position: center, right center;
  background-size: cover, contain;
  min-height: 150px;
  display: flex;
  align-items: center;
}

.topbar-v2-row {
  width: 100%;
  padding: 18px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.topbar-left { display: flex; align-items: center; gap: 14px; }

.brand-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.brand-icon svg { width: 22px; height: 22px; }

.brand-title {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.2px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.version-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 2px 8px;
  border-radius: 999px;
}
.brand-subtitle {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12.5px;
  margin-top: 2px;
}

.topbar-right { display: flex; align-items: center; gap: 12px; }

.partner-chip-v2 {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
}
.partner-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #f5a623;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logout-btn-v2 {
  width: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--switch-blue-dark);
  border: none;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.logout-btn-v2 svg { width: 16px; height: 16px; }
.logout-btn-v2:hover { filter: brightness(0.97); }

@media (max-width: 640px) {
  .topbar-v2 { min-height: 190px; }
  .topbar-v2-row { padding: 16px 18px; }
}

/* ---------- Main dashboard layout ---------- */
.wrap-v2 { max-width: 1180px; margin: 0 auto; padding: 28px 24px 48px; }

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(260px, 1fr);
  gap: 22px;
  align-items: stretch;
}

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

/* ---------- Quick action card ---------- */
.quick-action-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 30px 34px;
  box-shadow: 0 4px 22px rgba(10, 15, 107, 0.08);
  border: 1px solid var(--border-color);
}

.quick-action-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--switch-blue-mid);
  margin-bottom: 10px;
}
.quick-action-label svg { width: 14px; height: 14px; }

.quick-action-card h1 {
  margin: 0 0 8px;
  font-size: 26px;
  color: var(--text-dark);
}

.card-sub {
  margin: 0 0 22px;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 480px;
}

.msisdn-label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.input-with-icon {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 4px 4px 4px 14px;
  margin-top: 6px;
  background: #fafbff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input-with-icon svg {
  width: 17px;
  height: 17px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.input-with-icon:focus-within {
  border-color: var(--switch-blue-mid);
  box-shadow: 0 0 0 3px rgba(27, 63, 214, 0.12);
}
.input-with-icon input {
  border: none;
  margin: 0;
  padding: 10px 10px 10px 0;
  background: transparent;
}
.input-with-icon input:focus { box-shadow: none; }

.quick-action-card button {
  margin-top: 18px;
  padding: 13px 12px;
  font-size: 14.5px;
}

.hint {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

/* ---------- Stat cards ---------- */
.stats-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.stat-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 4px 22px rgba(10, 15, 107, 0.08);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex: 1;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-icon svg { width: 21px; height: 21px; }
.stat-icon-blue { background: #eaecfb; color: var(--switch-blue-mid); }
.stat-icon-green { background: #e3f6e9; color: var(--success); }
.stat-icon-amber { background: #fdf1de; color: #b9791a; }

.stat-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  text-transform: uppercase;
}
.stat-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.3;
}
.stat-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---------- Results ---------- */
.results {
  margin-top: 24px;
  background: var(--card-bg);
  padding: 26px 28px;
  border-radius: 16px;
  box-shadow: 0 4px 22px rgba(10, 15, 107, 0.08);
  border: 1px solid var(--border-color);
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.results-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  text-transform: uppercase;
}
.results-msisdn { font-size: 20px; font-weight: 700; color: var(--text-dark); }

.results-badges { display: flex; gap: 8px; }
.pill {
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
}
.pill-ok { background: #e3f6e9; color: var(--success); }
.pill-warn { background: #fdf1de; color: #b9791a; }

table { width: 100%; border-collapse: collapse; margin-top: 4px; font-size: 13px; }
th {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 2px solid var(--switch-blue-mid);
  color: var(--switch-blue-dark);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
td { text-align: left; padding: 12px 8px; border-bottom: 1px solid #eceef2; font-weight: 500; }
tr:hover td { background: #f5f7ff; }

.pill-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
}
.pill-cell svg { width: 14px; height: 14px; flex-shrink: 0; }
.pill-cell.ok { background: #e3f6e9; color: var(--success); }
.pill-cell.warn { background: #fdf1de; color: #b9791a; }
.pill-cell.neutral { background: #f1f2f6; color: #8a8f9c; }

.err { color: var(--danger); }
