:root {
  --bg-deep: #1d1247;
  --bg-sidebar: #24145c;
  --bg-main: #f5f4fb;
  --panel-bg: #ffffff;
  --purple-primary: #4f36c8;
  --purple-light: #7b61ff;
  --purple-soft: #eeeaff;
  --accent-warm: #f59e0b;
  --text-dark: #1f1b38;
  --text-muted: #8a86a3;
  --text-light: #d7d2ef;
  --green: #15803d;
  --red: #dc3545;
  --amber: #d97706;
  --border-light: #e8e4f2;
  --sidebar-active-bg: linear-gradient(90deg, #6f56ee, #4f36c8);
  --radius-lg: 18px;
  --radius-md: 14px;
  --shadow-card: 0 16px 34px rgba(55, 37, 127, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html,
body {
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-dark);
  background:
    linear-gradient(180deg, #efecfb 0, rgba(239, 236, 251, 0) 320px),
    var(--bg-main);
  line-height: 1.45;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  width: 248px;
  min-width: 248px;
  max-width: 248px;
  height: 100vh;
  padding: 20px 14px;
  overflow: hidden;
  color: #fff;
  background: var(--bg-sidebar);
  background-image:
    radial-gradient(circle at 18% 10%, rgba(123, 97, 255, 0.28), transparent 34%),
    linear-gradient(180deg, #301a75 0%, #1d1247 100%);
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 16px 38px rgba(18, 10, 49, 0.2);
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 18px;
  font-weight: 800;
  background: linear-gradient(135deg, #8c73ff, #4f36c8);
  box-shadow: 0 12px 26px rgba(79, 54, 200, 0.34);
}

.brand-title { font-size: 16px; font-weight: 700; }
.brand-sub { font-size: 11px; color: var(--text-light); letter-spacing: 0.02em; }

.nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar { display: none; }

.nav-item {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  min-height: 42px;
  border-radius: 14px;
  color: var(--text-light);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
  transform: translateX(2px);
}

.nav-item.active {
  color: #fff;
  background: var(--sidebar-active-bg);
  box-shadow: 0 12px 28px rgba(79, 54, 200, 0.28);
}

.nav-icon {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.07);
  opacity: 0.75;
}

.nav-item.active .nav-icon,
.nav-item:hover .nav-icon { opacity: 1; }

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  margin-top: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-user {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
}

.admin-info {
  min-width: 0;
}

.admin-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #2a1a00;
  font-size: 13px;
  font-weight: 800;
  background: linear-gradient(135deg, #facc15, #f97316);
}

.admin-name { font-size: 13px; font-weight: 700; }
.admin-email {
  max-width: 150px;
  overflow: hidden;
  color: var(--text-light);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Main ---------- */
.main {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  margin-left: 248px;
  padding: 24px 28px 40px;
  overflow-x: hidden;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 22px;
  margin-bottom: 22px;
  border: 1px solid rgba(232, 228, 242, 0.92);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 248, 255, 0.96)),
    var(--panel-bg);
  box-shadow: var(--shadow-card);
}

.topbar-copy {
  min-width: 0;
  max-width: 420px;
}

.topbar-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--purple-primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar-heading {
  color: var(--text-dark);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
}

.topbar-text {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

.topbar-right {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  min-width: 520px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.search-box,
.date-range,
.alert-chip,
.profile-chip {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
}

.search-box {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 12px 14px;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text-dark);
  font-size: 13px;
  background: transparent;
}

.search-box input::placeholder { color: var(--text-muted); }

.icon-search::before {
  content: "";
  display: block;
  width: 12px;
  height: 12px;
  border: 2px solid #94a3b8;
  border-radius: 50%;
  box-shadow: 6px 6px 0 -4px #94a3b8;
  transform: rotate(-10deg);
}

.date-range {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 14px;
  color: var(--text-dark);
  font-size: 13px;
  font-weight: 600;
}

.chip-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--purple-primary);
  background: var(--purple-soft);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.alert-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  color: var(--text-dark);
  font-size: 13px;
  font-weight: 700;
}

.alert-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
  padding: 8px 12px 8px 8px;
}

.profile-chip-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background: linear-gradient(135deg, #7b61ff, #4f36c8);
}

.profile-chip-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.profile-chip-meta strong {
  color: var(--text-dark);
  font-size: 12.5px;
  font-weight: 800;
}

.profile-chip-meta span {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-signout-form {
  margin-top: 8px;
}

.sidebar-signout-btn {
  padding: 0;
  border: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: transparent;
  cursor: pointer;
}

.sidebar-signout-btn:hover {
  color: #fff;
}

.status-action-form {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.mobile-verification {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  min-width: 130px;
}

.mobile-number {
  color: var(--text-dark);
  font-weight: 700;
}

.mobile-number.pending {
  display: inline-block;
  max-width: 112px;
  filter: blur(3px);
  opacity: 0.72;
  user-select: none;
}

.mobile-verified,
.mobile-pending {
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.mobile-verified {
  color: #0f9f6e;
  background: #dcfce7;
}

.mobile-pending {
  color: #b45309;
  background: #fef3c7;
}

.status-switch {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.status-switch-track {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 44px;
  height: 24px;
  padding: 2px;
  border-radius: 999px;
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.status-switch-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(22, 28, 45, 0.22);
  transition: transform 0.18s ease;
}

.status-switch.active .status-switch-track {
  background: #0f9f6e;
}

.status-switch.active .status-switch-thumb {
  transform: translateX(20px);
}

.status-switch.inactive .status-switch-track {
  background: #d7dce7;
}

.status-switch.inactive .status-switch-thumb {
  transform: translateX(0);
}

.status-switch:hover .status-switch-track {
  box-shadow: 0 0 0 4px rgba(79, 54, 200, 0.08);
}

.status-switch:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.status-switch:disabled:hover .status-switch-track {
  box-shadow: none;
}

.status-tooltip {
  position: relative;
  display: inline-flex;
}

.status-tooltip:hover::after,
.status-tooltip:focus-within::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 20;
  width: 220px;
  padding: 9px 11px;
  border-radius: 8px;
  color: #fff;
  background: #1c1c3a;
  box-shadow: 0 10px 24px rgba(20, 16, 58, 0.18);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.35;
  white-space: normal;
}

.status-tooltip:hover::before,
.status-tooltip:focus-within::before {
  content: "";
  position: absolute;
  right: 15px;
  bottom: calc(100% + 4px);
  z-index: 21;
  border-width: 6px 6px 0;
  border-style: solid;
  border-color: #1c1c3a transparent transparent;
}

.action-dot {
  padding: 8px 10px;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  color: var(--purple-primary);
  background: var(--purple-soft);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.entity-link {
  color: var(--text-dark);
  font-weight: 800;
  text-decoration: none;
}

.entity-link:hover {
  color: var(--purple-primary);
}

.profile-panel {
  padding: 24px;
}

.profile-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border-light);
}

.profile-avatar {
  width: 54px;
  height: 54px;
  font-size: 18px;
}

.profile-name {
  margin: 0 0 5px;
  color: var(--text-dark);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0;
}

.profile-meta {
  margin-bottom: 10px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}

.profile-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding-top: 22px;
}

.profile-field {
  padding: 14px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: #fff;
}

.profile-field-label {
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.profile-field-value {
  color: var(--text-dark);
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.page-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.page-title {
  color: var(--text-dark);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0;
}

.btn-primary,
.btn-recharge,
.btn-confirm,
.btn-approve {
  border: none;
  color: #fff;
  background: linear-gradient(90deg, #6f56ee, #4f36c8) !important;
  box-shadow: 0 14px 28px rgba(79, 54, 200, 0.24) !important;
}

.btn-primary {
  padding: 11px 18px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary:hover,
.btn-recharge:hover,
.btn-confirm:hover,
.btn-approve:hover { filter: brightness(1.05); }

/* ---------- Cards ---------- */
.stat-row {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.top-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.secondary-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.clients-summary,
.telecallers-summary,
.campaigns-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.telecallers-summary { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.campaigns-summary { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.stat-card,
.panel,
.wallet-card,
.recharge-panel,
.modal-box,
.ob-modal,
.detail-panel {
  border: 1px solid rgba(235, 232, 243, 0.95);
  border-radius: 18px !important;
  background: var(--panel-bg);
  box-shadow: var(--shadow-card);
}

.stat-card {
  padding: 18px;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 42px rgba(55, 37, 127, 0.12);
}

.stat-label {
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
}

.stat-value {
  color: var(--text-dark);
  font-size: 22px;
  font-weight: 800;
}

.stat-value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.stat-delta {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  margin-top: 6px;
  font-size: 11.5px;
  font-weight: 700;
}

.stat-delta.up { color: var(--green); }
.stat-delta.down { color: var(--red); }
.stat-delta .arrow { font-size: 9px; }

.live-pill,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  border-radius: 999px;
  color: var(--purple-primary);
  background: var(--purple-soft);
  font-size: 11px;
  font-weight: 700;
}

.live-pill { padding: 4px 10px; }
.pill { padding: 4px 10px; }

.live-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--purple-primary);
  box-shadow: 0 0 0 3px rgba(79, 54, 200, 0.14);
}

.icon-stat {
  display: flex;
  gap: 14px;
  align-items: center;
}

.summary-icon,
.wallet-card-icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 8px !important;
  font-size: 18px;
}

.summary-icon.blue,
.wallet-card-icon.blue { color: var(--purple-primary); background: var(--purple-soft); }
.summary-icon.green,
.wallet-card-icon.green { color: var(--green); background: #dcfce7; }
.summary-icon.red { color: var(--red); background: #fee2e2; }
.summary-icon.purple { color: var(--purple-primary); background: var(--purple-soft); }
.summary-icon.amber,
.wallet-card-icon.amber,
.wallet-card-icon.orange { color: var(--amber); background: #fef3c7; }

.icon-stat .stat-label { margin-bottom: 4px; }
.icon-stat .stat-value { font-size: 19px; }

/* ---------- Charts and lists ---------- */
.charts-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.bottom-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.panel {
  padding: 18px 20px 8px;
}

.list-panel { padding-bottom: 16px; }

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.panel-header h3 {
  color: var(--text-dark);
  font-size: 14.5px;
  font-weight: 800;
}

.entity-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
  list-style: none;
}

.entity-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}

.entity-list li:last-child { border-bottom: none; }

.entity-left,
.client-cell {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
  color: var(--text-dark);
  font-weight: 600;
}

.entity-left span,
.client-cell {
  overflow: hidden;
  text-overflow: ellipsis;
}

.avatar,
.client-avatar {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  background: linear-gradient(135deg, #7b61ff, #4f36c8);
}

.entity-amount {
  color: var(--text-dark);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.entity-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.entity-time {
  color: var(--text-muted);
  font-size: 10.5px;
}

.donut-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
}

.legend {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 9px;
  list-style: none;
}

.legend li {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

.legend-dot {
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.legend-label {
  flex: 1;
  color: var(--text-muted);
  font-weight: 600;
}

.legend-value {
  color: var(--text-dark);
  font-weight: 800;
}

/* ---------- Tables ---------- */
.table-panel {
  max-width: 100%;
  padding: 4px 4px 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table,
.wallet-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table thead th,
.wallet-table thead th {
  padding: 14px 16px;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
  background: #f7fafb;
  border-bottom: 1px solid var(--border-light);
}

.data-table tbody td,
.wallet-table tbody td {
  padding: 14px 16px;
  color: var(--text-dark);
  white-space: nowrap;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-light);
}

.data-table tbody tr:last-child td,
.wallet-table tbody tr:last-child td { border-bottom: none; }

.data-table tbody tr:hover,
.wallet-table tbody tr:hover { background: #f7f4ff; }

.cell-strong,
.amount-cell { font-weight: 800; }
.gst-cell,
.txn-id { color: var(--text-muted); }
.total-cell { color: var(--purple-primary); font-weight: 800; }
.txn-id { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11.5px; }

.status-badge,
.mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.status-badge.active,
.status-badge.online,
.status-badge.running,
.status-badge.completed,
.status-success {
  color: var(--green);
  background: #dcfce7;
}

.status-badge.inactive,
.status-badge.offline,
.status-badge.paused,
.status-badge.expired,
.status-failed {
  color: var(--red);
  background: #fee2e2;
}

.status-badge.scheduled,
.status-pending {
  color: var(--amber);
  background: #fef3c7;
}

.mode-badge {
  color: var(--text-dark);
  background: #f1edff;
}

.action-dot,
.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
}

.action-dot:hover,
.download-btn:hover {
  color: var(--purple-primary);
  background: var(--purple-soft);
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px 8px;
}

.entries-info {
  color: var(--text-muted);
  font-size: 12.5px;
}

.pagination {
  display: flex;
  gap: 6px;
  align-items: center;
}

.page-btn {
  width: 30px;
  height: 30px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  color: var(--text-dark);
  background: #fff;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 700;
}

.page-btn.active {
  color: #fff;
  background: var(--purple-primary);
  border-color: var(--purple-primary);
}

.page-ellipsis {
  padding: 0 2px;
  color: var(--text-muted);
  font-size: 12px;
}

/* ---------- Wallet shared helpers ---------- */
.wallet-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.wallet-summary {
  display: grid;
  flex-shrink: 0;
  grid-template-columns: 1fr;
  gap: 14px;
  width: 220px;
}

.wallet-card {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
}

.wallet-right {
  flex: 1;
  min-width: 0;
}

.wallet-card-label {
  margin-bottom: 3px;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
}

.wallet-card-value {
  color: var(--text-dark);
  font-size: 17px;
  font-weight: 800;
}

.wallet-card-sub {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 10.5px;
}

/* ---------- Login ---------- */
body.login-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(123, 97, 255, 0.24), transparent 28%),
    linear-gradient(180deg, #f1edff 0%, #f7f5fc 100%);
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(380px, 460px);
  gap: 32px;
  align-items: stretch;
  min-height: 100vh;
  padding: 32px;
}

.login-hero,
.login-card {
  border: 1px solid rgba(232, 228, 242, 0.92);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-card);
}

.login-hero {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 34px;
  background:
    radial-gradient(circle at top right, rgba(123, 97, 255, 0.2), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(244, 240, 255, 0.96));
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-sub {
  color: var(--text-muted);
}

.login-hero-copy {
  max-width: 560px;
}

.login-kicker,
.login-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--purple-primary);
  background: var(--purple-soft);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.login-hero-copy h1 {
  margin-top: 18px;
  color: var(--text-dark);
  font-size: 44px;
  font-weight: 800;
  line-height: 1.08;
}

.login-hero-copy p {
  max-width: 520px;
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.7;
}

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

.login-metric {
  padding: 18px;
  border: 1px solid rgba(232, 228, 242, 0.9);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.75);
}

.login-metric strong {
  display: block;
  color: var(--text-dark);
  font-size: 28px;
  font-weight: 800;
}

.login-metric span {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}

.login-card-wrap {
  display: flex;
  align-items: center;
}

.login-card {
  width: 100%;
  padding: 32px;
}

.login-card-head h2 {
  margin-top: 16px;
  color: var(--text-dark);
  font-size: 30px;
  font-weight: 800;
}

.login-card-head p {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 28px;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-field span {
  color: var(--text-dark);
  font-size: 13px;
  font-weight: 700;
}

.login-field input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  color: var(--text-dark);
  font-size: 14px;
  background: #fff;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.login-field input:focus {
  border-color: rgba(79, 54, 200, 0.55);
  box-shadow: 0 0 0 4px rgba(79, 54, 200, 0.08);
}

.login-error {
  padding: 12px 14px;
  border: 1px solid rgba(220, 53, 69, 0.18);
  border-radius: 14px;
  color: #b42318;
  background: #fff1f3;
  font-size: 13px;
  font-weight: 600;
}

.login-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.remember-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}

.remember-check input {
  accent-color: var(--purple-primary);
}

.login-link {
  color: var(--purple-primary);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.login-submit {
  width: 100%;
  padding: 14px 18px;
  font-size: 14px;
}

.login-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 13px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .clients-summary,
  .telecallers-summary,
  .campaigns-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .secondary-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .charts-row,
  .bottom-row { grid-template-columns: 1fr; }
  .login-shell { grid-template-columns: 1fr; }
  .login-card-wrap { align-items: flex-start; }
}

@media (max-width: 900px) {
  .app-shell { flex-direction: column; }

  .sidebar {
    position: sticky;
    left: auto;
    z-index: 20;
    width: 100%;
    min-width: 0;
    max-width: none;
    height: auto;
    padding: 12px 14px;
  }

  .brand { padding: 0 4px 10px; }

  .nav {
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav-item {
    min-width: max-content;
    padding: 9px 12px;
  }

  .sidebar-footer { display: none; }

  .main {
    margin-left: 0;
    padding: 18px 16px 32px;
  }

  .topbar,
  .page-title-row,
  .table-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-right {
    width: 100%;
    min-width: 0;
  }

  .topbar-actions {
    justify-content: flex-start;
  }

  .date-range { min-width: max-content; }
  .btn-primary { width: 100%; }

  .wallet-layout { flex-direction: column; }
  .wallet-summary { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .login-shell {
    min-height: auto;
    padding: 18px;
  }

  .login-hero,
  .login-card {
    padding: 24px;
    border-radius: 24px;
  }

  .login-hero-copy h1 {
    font-size: 34px;
  }

  .login-metrics {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .top-stats,
  .secondary-stats,
  .clients-summary,
  .telecallers-summary,
  .campaigns-summary,
  .wallet-summary {
    grid-template-columns: 1fr;
  }

  .page-title { font-size: 21px; }

  .stat-card,
  .panel { padding: 16px; }

  .panel-header,
  .donut-wrap,
  .entity-list li,
  .recharge-header,
  .modal-footer,
  .detail-action-row {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar {
    padding: 18px;
  }

  .topbar-heading {
    font-size: 24px;
  }

  .topbar-actions,
  .login-row,
  .login-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .date-range,
  .alert-chip,
  .profile-chip {
    width: 100%;
  }

  .login-shell {
    padding: 14px;
  }

  .login-hero-copy h1 {
    font-size: 28px;
  }

  .entity-right { align-items: flex-start; }
  .pagination { flex-wrap: wrap; }
}
