:root {
  --ink: #14151a;
  --muted: #6b7280;
  --paper: #f3f4f8;
  --card: #ffffff;
  --line: #e6e8ef;
  --accent: #5b46f5;
  --accent-ink: #ffffff;
  --accent-soft: #efeaff;
  --teal: #1f6f64;
  --good: #1f7a4d;
  --bad: #a3262c;
  --warn: #9a6700;
  --shadow: 0 10px 30px rgba(20, 22, 40, 0.06);
  font-family: "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 0% 0%, #e7e4ff 0%, transparent 55%),
    radial-gradient(700px 380px at 100% 0%, #ffe9df 0%, transparent 50%),
    var(--paper);
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

html.auth-page {
  height: 100%;
  overflow: hidden;
}
.auth-body {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #fff;
}
.auth-shell {
  height: 100%;
  width: 100%;
  overflow: hidden;
}
.auth-split {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #fff;
  overflow: hidden;
}
.auth-visual {
  position: relative;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(160deg, #090514, #1A0B2E);
}
.auth-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.auth-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(74, 20, 140, 0.22), rgba(26, 11, 46, 0.38));
  pointer-events: none;
}
.auth-card {
  margin: 0;
  width: auto;
  min-height: 0;
  height: 100%;
  background: #fff;
  border: 0;
  border-radius: 0;
  padding: clamp(16px, 4vh, 48px) clamp(24px, 6vw, 72px);
  box-shadow: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.auth-card form { width: min(360px, 100%); margin: 0 auto; }
.auth-logo {
  display: block;
  width: auto;
  max-width: min(280px, 100%);
  height: auto;
  max-height: 72px;
  margin: 0 auto 16px;
  object-fit: contain;
}
.auth-card h1 {
  margin: 0;
  text-align: center;
  color: #4A148C;
  font-size: clamp(28px, 4vh, 34px);
  font-weight: 750;
  letter-spacing: -0.03em;
}
.auth-sub {
  margin: 6px 0 clamp(14px, 3vh, 28px);
  text-align: center;
  color: #6b726c;
  font-size: 15px;
  font-weight: 400;
}
.auth-card label {
  color: #3a4148;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: clamp(10px, 2vh, 16px);
}
.auth-card .form-error { min-height: 0; margin: 0 0 8px; }
.auth-field {
  position: relative;
  display: block;
  margin-top: 6px;
}
.auth-field .field-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: #8d949c;
  pointer-events: none;
}
.auth-card .auth-field input {
  margin-top: 0;
  border: 1px solid #cccccc;
  border-radius: 5px;
  padding: 12px 42px 12px 38px;
  background: #fff;
  color: #1d2328;
}
.auth-card .auth-field input::placeholder { color: #b0b6bd; }
.auth-card .auth-field input:focus {
  outline: 2px solid rgba(168, 85, 247, 0.35);
  border-color: #A855F7;
}
.eye-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #6b7280;
  display: grid;
  place-items: center;
}
.eye-btn svg { width: 18px; height: 18px; }
.eye-btn .eye-shut { display: none; }
.eye-btn.is-visible .eye-open { display: none; }
.eye-btn.is-visible .eye-shut { display: block; }
.forgot {
  display: block;
  margin: -2px 0 18px;
  text-align: right;
  color: #8A2BE2;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.forgot:hover { text-decoration: underline; }
.auth-note {
  display: none;
  margin: -8px 0 16px;
  text-align: right;
  color: #5E17EB;
  font-size: 13px;
}
.auth-note:target { display: block; }
.auth-card .signin {
  width: 100%;
  margin-top: 4px;
  border: 0;
  border-radius: 999px;
  padding: 13px 16px;
  color: #fff;
  font-weight: 650;
  background: #8A2BE2;
  box-shadow: 0 8px 16px rgba(138, 43, 226, 0.22);
}
.auth-card .signin:hover { background: #5E17EB; }
@media (max-width: 800px) {
  .auth-split { grid-template-columns: 1fr; grid-template-rows: minmax(0, 30vh) minmax(0, 1fr); }
  .auth-card { padding: 16px 20px 18px; }
  .auth-sub { margin-bottom: 12px; }
  .auth-card label { margin-bottom: 10px; }
}
.eyebrow { letter-spacing: 0.14em; text-transform: uppercase; font-size: 12px; color: var(--accent); margin: 0; }
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab, .btn {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 8px 14px;
}
.tab.active, .btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); }
label { display: block; font-size: 13px; margin-bottom: 12px; color: var(--muted); }
input, select, textarea {
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
}
textarea { min-height: 140px; resize: vertical; }
.form-error { color: var(--bad); min-height: 1.2em; }
.hint { color: var(--muted); font-size: 13px; }

body.app-body {
  height: 100vh;
  overflow: hidden;
  background: #f4f6fb;
  display: flex;
  flex-direction: column;
}
.shell { display: grid; grid-template-columns: 200px minmax(0, 1fr); flex: 1 1 auto; height: auto; min-height: 0; gap: 8px; padding: 8px; width: 100%; background: #f4f6fb; }
.sidebar {
  background: #fff;
  color: #1f2430;
  width: 200px;
  padding: 12px 6px;
  border: 0;
  border-radius: 16px;
  position: relative;
  top: 0;
  height: auto;
  min-height: 0;
  overflow: auto;
  box-shadow: none;
}
.brand {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 750;
  color: #1f2430;
  padding: 4px 8px 14px;
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: #5b46f5;
  color: #fff;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.sidebar button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  text-align: left;
  background: transparent;
  color: #3c4257;
  border: 0;
  border-radius: 8px;
  padding: 7px 8px;
  margin-bottom: 2px;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}
.sidebar button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sidebar button svg { flex: 0 0 auto; width: 14px; height: 14px; color: #6b7280; }
.sidebar button:hover { background: #f3f4f8; color: #1f2430; }
.sidebar button.active { background: #ece9ff; color: #3a2f86; }
.sidebar button.active svg { color: #5b46f5; }
.nav-group { margin-bottom: 2px; }
.nav-parent { margin-bottom: 0; }
.nav-chevron { margin-left: auto; width: 12px; height: 12px; }
.nav-group.open .nav-chevron { transform: rotate(90deg); }
.nav-sub { display: none; padding: 2px 0 4px 16px; }
.nav-group.open .nav-sub { display: block; }
.nav-sub button { font-weight: 550; }
.workspace { display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100%; overflow: auto; background: #f4f6fb; border-radius: 16px; }
.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  flex: 0 0 54px;
  height: 54px;
  padding: 0 16px;
  position: relative;
  z-index: 5;
  background: #fff;
  border: 0;
  border-bottom: 1px solid #eceef3;
  border-radius: 0;
  box-shadow: none;
  box-sizing: border-box;
  font-size: 13px;
}
.top-title { grid-column: 2; text-align: center; }
.top-left { grid-column: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.menu-toggle {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #2c3340;
}
.menu-toggle:hover { background: #f3f5f8; }
.welcome { font-size: 13px; font-weight: 700; color: #1c2230; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wallet-strip { display: inline-flex; align-items: center; gap: 8px; margin-left: 4px; flex: 0 0 auto; }
.recharge-strip {
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: #5b46f5;
  color: #fff;
  border: 0;
  font-size: 12px;
  font-weight: 650;
}
.recharge-strip:hover { background: #4b3ee8; color: #fff; }
.wallet-modal { width: min(420px, 94vw); padding: 0; overflow: hidden; background: #fff; border-radius: 10px; }
.wallet-modal .msg-filter-banner { background: #5b46f5; color: #fff; padding: 8px 12px; }
.wallet-modal .msg-filter-banner h2 { margin: 0; font-size: 14px; font-weight: 650; }
.wallet-modal form { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
.wallet-modal label { display: flex; flex-direction: column; gap: 3px; margin: 0; font-size: 12px; font-weight: 650; color: #344054; }
.wallet-modal input { height: 28px; margin: 0; padding: 0 8px; border: 1px solid #d0d5dd; border-radius: 6px; background: #fff; font-size: 12px; }
.wallet-modal .modal-foot { margin: 0; padding-top: 4px; gap: 8px; }
.sub-activate { padding: 6px 12px; font-size: 13px; margin-left: 8px; }
.shell.menu-closed { grid-template-columns: 1fr; }
.shell.menu-closed .sidebar { display: none; }
.topbar h1 { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: -0.01em; color: #1c2230; }
.topbar .eyebrow { display: none; }
.top-actions { grid-column: 3; justify-self: end; display: flex; gap: 14px; align-items: center; color: #5c6575; min-width: 0; }
#who { display: none; }
.return-btn { background: #fff; border: 1px solid #d9dee8; padding: 6px 12px; border-radius: 8px; }
.server-ip, #gmtClock { font-size: 13px; font-weight: 500; white-space: nowrap; color: #5c6575; }
.server-ip::before { content: "Server IP: "; color: inherit; font-weight: 500; }
.icon-btn, .logout-btn {
  height: 34px;
  border: 1px solid #d9dee8;
  background: #fff;
  color: #2c3340;
  border-radius: 8px;
}
.icon-btn { width: 34px; padding: 0; display: grid; place-items: center; }
.logout-btn { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; font-size: 13px; font-weight: 600; }
.icon-btn:hover, .logout-btn:hover { background: #f6f7fb; }
.settings { position: relative; }
.settings-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 210px;
  background: #fff;
  border: 1px solid #e6e8ef;
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(20, 24, 40, 0.12);
  padding: 6px;
  z-index: 8;
}
.settings-menu button {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 9px 10px;
  color: #2d3340;
  font-weight: 600;
}
.settings-menu button:hover { background: #f4f5f8; }
.credit-pill {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.view { display: flex; flex-direction: column; padding: 0; height: 100%; min-height: 0; }
.view:has(.search-desk) { height: auto; min-height: 100%; flex: none; }
.search-desk {
  background: #fff;
  border: 1px solid #d7e2f4;
  border-radius: 8px;
  flex: none;
  height: auto;
  min-height: calc(100vh - 150px);
  overflow: visible;
  padding: 12px 14px 18px;
}
.search-bar { display: flex; align-items: flex-end; gap: 8px; width: 100%; }
.search-bar label {
  display: flex;
  flex-direction: column;
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9aa3b2;
}
.search-by { flex: 0 0 180px; }
.search-desk .search-bar select,
.search-desk .search-bar input {
  width: 100%;
  margin: 2px 0 0;
  height: 26px;
  border: 1px solid #d7dde6;
  border-radius: 4px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: #2c3340;
  background: #fff;
  box-shadow: none;
}
.search-desk .search-bar input::placeholder { color: #b0b6c2; }
.search-desk .search-bar select:disabled {
  color: #2c3340;
  background: #f6f7f9;
  opacity: 1;
  cursor: default;
}
.search-q { flex: 1 1 auto; min-width: 0; }
.search-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.search-go, .search-clear {
  height: 26px;
  min-width: 64px;
  padding: 0 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 650;
  line-height: 26px;
}
.search-go { background: #3b6cff; color: #fff; border: 0; }
.search-go:hover { background: #2f5fe8; }
.search-clear {
  border: 1px solid #d5dbe3;
  background: #fff;
  color: #3a4150;
}
.search-clear:hover { background: #f6f8fb; }
.search-desk table { margin-top: 18px; }
.search-desk .empty { text-align: center; color: #9aa1ad; padding: 22px 8px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.card {
  background: var(--card);
  border: 1px solid #e7e9f2;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 8px 22px rgba(20, 24, 40, 0.05);
}
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.dash-head h2 { margin: 0; font-size: 22px; font-weight: 750; letter-spacing: -0.02em; color: #1c2230; }
.dash-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.usage-stat {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border: 1px solid #8ee0aa;
  border-radius: 2px;
  background: #fff;
  color: #22a34a;
  font-size: 11px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
}
.dash-tools select.dash-range {
  width: auto;
  min-width: 84px;
  margin: 0;
  height: 24px;
  padding: 0 22px 0 8px;
  border: 1px solid #d7dde6;
  border-radius: 2px;
  background: #fff;
  font-size: 11px;
  font-weight: 600;
  color: #2c3340;
  line-height: 22px;
}
.refresh-btn {
  height: 24px;
  background: #3b82f6;
  color: #fff;
  border: 0;
  border-radius: 2px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 650;
  line-height: 24px;
}
.refresh-btn:hover { background: #2f74e6; }
.summary-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.summary-kpis .kpi { min-height: 42px; padding: 8px 10px; }
.summary-kpis .kpi span { font-size: 10px; white-space: normal; }
.summary-kpis .kpi b { font-size: 16px; }
.kpi-board {
  display: flex;
  align-items: stretch;
  gap: 6px;
  margin-bottom: 8px;
}
.kpi-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 0;
  min-width: 0;
}
.kpi {
  flex: 1 1 auto;
  border-radius: 4px;
  color: #fff;
  padding: 3px 8px;
  min-height: 24px;
  min-width: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  box-shadow: none;
  overflow: hidden;
}
.kpi-wide { flex: 1.25 1 0; }
.kpi span {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kpi b {
  font-size: 13px;
  font-weight: 750;
  line-height: 1;
  margin: 0;
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex: 0 0 auto;
}
.kpi-wide b { font-size: 16px; }
.kpi-blue { background: #2f7cf6; }
.kpi-green { background: #2eae4f; }
.kpi-lime { background: #3cbe5a; }
.kpi-leaf { background: #249644; }
.kpi-orange { background: #f5a524; }
.kpi-amber { background: #f08c12; }
.kpi-pink { background: #ef4b8b; }
.kpi-magenta { background: #d63384; }
.kpi-slate { background: #7b818a; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dash-panel {
  background: #fff;
  border: 1px solid #e7e9f2;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(20, 24, 40, 0.04);
  padding: 8px 8px 4px;
  min-width: 0;
  overflow: hidden;
}
.dash-panel h3 { margin: 0 0 6px; font-size: 11px; letter-spacing: 0.08em; color: #8b93a3; font-weight: 750; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.panel-title h3 { margin: 0; font-size: 11px; }
.panel-title select { width: 72px; height: 22px; margin: 0; padding: 0 6px; border-radius: 4px; font-size: 11px; }
.panel-tools { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.panel-tools input, .panel-tools select {
  height: 24px;
  margin: 0;
  border-radius: 6px;
  border: 1px solid #e3e6ee;
  padding: 0 6px;
  font-size: 11px;
  background: #fff;
}
.panel-tools input { flex: 1; min-width: 0; }
.panel-tools select { width: 96px; flex: 0 0 auto; }
.dash-panel table { font-size: 10px; table-layout: fixed; width: 100%; max-width: 100%; }
.dash-panel th,
.dash-panel td {
  padding: 2px 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 0;
}
.dash-panel th { height: 20px; font-size: 10px; letter-spacing: 0.04em; color: #8b93a3; }
.dash-panel .empty { text-align: center; color: #9aa1ad; padding: 12px 8px; }
.dash-panel .pill {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  font-size: 9px;
  padding: 0 4px;
  line-height: 13px;
}
.trunk-panel .trunk-name { width: 52%; }
.trunk-panel .trunk-status { width: 30%; }
.trunk-panel .trunk-active { width: 18%; }
.camp-panel .panel-title select { width: 72px; height: 22px; padding: 0 6px; font-size: 11px; }
.camp-panel .camp-name { width: 26%; }
.camp-panel .camp-status { width: 15%; }
.camp-panel .camp-rec { width: 13%; }
.camp-panel .camp-amt { width: 16%; }
.camp-panel .camp-when { width: 18%; }
.camp-panel .camp-act { width: 12%; }
.camp-panel td.actions {
  width: 12%;
  max-width: 12%;
  overflow: hidden;
  text-overflow: clip;
  padding: 2px 0;
  text-align: right;
  white-space: nowrap;
}
.camp-panel td.actions > * + * { margin-left: 1px; }
.camp-panel td.actions .eye-btn {
  position: static;
  top: auto;
  right: auto;
  transform: none;
  width: 14px;
  height: 14px;
  display: inline-grid;
}
.camp-panel td.actions .eye-btn svg { width: 12px; height: 12px; }
.card > .row { align-items: center; margin-bottom: 14px; }
.card > .row .btn, .card > .row .btn-compact { flex: 0 0 auto; }
#addUser {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 8px 18px;
}
.card > .row h2 { margin: 0; }
.card:has(> .campaign-head) > .row { margin-bottom: 8px; }
.card:has(> .campaign-head) > .row h2 { font-size: 15px; font-weight: 650; color: #1f2937; line-height: 1.2; }
.card:has(> .campaign-head) #backCampaigns { height: 26px; padding: 0 12px; font-size: 12px; }
.back-btn,
.row > .back-btn,
.card > .row .back-btn {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #cfd3e0;
  padding: 8px 18px;
}
.stat { position: relative; overflow: hidden; }
.card.stat::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 4px; border-radius: 999px; background: linear-gradient(180deg, #8b7cff, #5b46f5); }
.stat b { display: block; font-size: 28px; margin-top: 8px; letter-spacing: -0.03em; }
.stat span { color: var(--muted); font-size: 13px; font-weight: 600; }
.campaign-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7f8fc;
}
.camp-row { display: grid; gap: 6px 12px; min-width: 0; }
.camp-row-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.camp-row-meta { grid-template-columns: minmax(0, 1fr); }
.campaign-head p { margin: 0; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.campaign-head span { color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: 0.03em; text-transform: uppercase; }
.campaign-head b { font-size: 12px; font-weight: 650; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.campaign-message { min-width: 0; }
.campaign-message b { white-space: normal; overflow: visible; text-overflow: unset; }
.campaign-note { grid-column: 1 / -1; }
.campaign-head table, .campaign-head .pager { grid-column: 1 / -1; background: transparent; }
.campaign-head th, .campaign-head td { background: transparent; }
.campaign-head.msg-sheet {
  display: block;
  margin: 0;
  padding: 8px 10px 10px;
  border: 1px solid var(--line);
  background: #f7f8fc;
  border-radius: 10px;
  overflow: auto;
}
.campaign-head.msg-sheet,
.campaign-head.msg-sheet table,
.campaign-head.msg-sheet th,
.campaign-head.msg-sheet td,
.campaign-head.msg-sheet .col-filter th,
.campaign-head.msg-sheet tbody tr:hover td { background: #f7f8fc; }
.msg-table td.clip {
  display: table-cell;
  max-width: 220px;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
  font-size: 11px;
  line-height: 1.2;
  background: #f7f8fc;
}
.msg-table { font-size: 11px; }
.msg-table th { height: 24px; padding: 0 8px; font-size: 11px; }
.msg-table td { padding: 2px 8px; font-size: 11px; line-height: 1.2; }
.msg-table .pill { font-size: 10px; padding: 0 5px; line-height: 14px; }
.msg-table .dlr-eye {
  position: static;
  top: auto;
  right: auto;
  transform: none;
  width: 18px;
  height: 18px;
  margin-left: 6px;
  display: inline-grid;
  vertical-align: middle;
  color: #667085;
}
.msg-table .dlr-eye svg { width: 14px; height: 14px; }
.dlr-modal { width: min(560px, 94vw); }
.dlr-modal h2 { font-size: 16px; }
.dlr-text {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f7f8fc;
  color: #344054;
  font: 12px/1.45 ui-monospace, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}
.col-filter th { height: auto; padding: 3px 6px; background: #fff; }
.col-filter input { height: 22px; margin: 0; padding: 0 6px; font-size: 11px; border-radius: 4px; }
.layout { display: grid; grid-template-columns: 1fr; gap: 16px; }
#sendForm.layout { flex: 1; min-height: 0; grid-template-columns: minmax(0, 1fr) 260px; align-items: stretch; gap: 8px; }
.compose-card, #previewCard { min-height: 100%; overflow: auto; }
.compose-card { padding: 12px 14px 14px; }
#previewCard h2 { margin: 0 0 8px; font-size: 15px; }
.compose-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 16px;
  align-items: start;
}
.compose-grid > label,
.compose-grid .span-3 { margin: 0; color: #1f2937; font-size: 12px; font-weight: 500; }
.compose-grid .span-3 { grid-column: 1 / -1; }
.compose-grid .req { color: #e11d48; margin-left: 2px; }
.compose-grid input,
.compose-grid select,
.compose-grid textarea {
  height: 28px;
  margin-top: 3px;
  border: 1px solid #e1e5ee;
  border-radius: 4px;
  padding: 0 8px;
  font-size: 12px;
  color: #1f2937;
  background: #fff;
}
.compose-grid textarea {
  height: 48px;
  min-height: 48px;
  padding: 6px 8px;
  resize: vertical;
}
.compose-grid .meta { margin: 0; font-size: 12px; }
.file-upload-block { display: flex; flex-direction: column; gap: 6px; }
.file-upload-label { color: #1f2937; font-size: 12px; font-weight: 500; }
.file-rows { display: flex; flex-direction: column; gap: 8px; }
.file-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.file-row input[type="file"] {
  flex: 1;
  min-width: 0;
  height: 28px;
  margin-top: 0;
}
.file-add,
.file-remove {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 4px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  padding: 0;
}
.file-add { background: #5b4dff; color: #fff; }
.file-add:hover { background: #4b3ee8; }
.file-remove { background: #c43838; color: #fff; }
.file-remove:hover { background: #a82f2f; }
.split-box h3 { margin: 12px 0 8px; font-size: 14px; }
.split-head { margin: 0 0 8px; font-weight: 600; }
.split-table { width: 100%; border-collapse: collapse; margin: 8px 0; }
.split-table th, .split-table td { border-bottom: 1px solid #e1e5ee; padding: 6px 8px; text-align: left; font-size: 12px; vertical-align: middle; }
.split-table th { background: #f4f1ff; }
.split-box .split-table input[type="number"] { width: 110px; }
.split-box .gmt-date { min-width: 220px; }
.split-box #addSchedule { margin-top: 4px; }
.compose-grid .check-line input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 8px;
}
.wallet-warn {
  margin: 14px 0 0;
  padding: 8px 12px;
  border-radius: 8px;
  background: #fff4e5;
  color: #9a6700;
  font-size: 13px;
  font-weight: 650;
}
.compose-actions { display: flex; gap: 8px; align-items: center; margin-top: 22px; }
.compose-actions .sys-create { flex: 0 0 auto; }
.compose-actions .btn {
  flex: 0 0 auto;
  height: 28px;
  border-radius: 4px;
  padding: 0 12px;
  font-size: 12px;
}
.user-create .compose-actions { margin-top: 32px; }
.pw-field { position: relative; display: block; }
.pw-field .eye-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  width: 22px;
  height: 22px;
  transform: translateY(-50%);
}
.pw-field input { padding-right: 28px; }
.row { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.row > * { flex: 1; }
.user-sheet { background: #e7e9f7; border: 0; padding: 18px; }
.user-sheet .row { align-items: center; margin-bottom: 14px; }
.user-sheet .btn-compact { flex: 0 0 auto; padding: 6px 12px; font-size: 13px; }
.user-sheet h2 { margin: 0; }
.user-grid { width: 100%; border-collapse: collapse; font-size: 12px; }
.pw-cell { display: flex; align-items: center; gap: 8px; letter-spacing: 0.08em; }
.eye-btn { border: 0; background: transparent; padding: 0; line-height: 0; color: #5c6578; }
.pill.connected, .pill.CONNECTED { background: #e5f4ea; color: var(--good); font-weight: 700; letter-spacing: 0.04em; }
.pill.inactive { background: #e23b3b; color: #fff; font-weight: 700; }
.pill.disconnected, .pill.DISCONNECTED { background: #fff1d6; color: var(--warn); }
td.balance { white-space: nowrap; }
.balance-cell { display: inline-flex; align-items: center; gap: 8px; min-height: 30px; }
.balance-value { font-weight: 700; font-variant-numeric: tabular-nums; }
.balance-loading { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.balance-spin {
  width: 12px;
  height: 12px;
  border: 2px solid #d9dced;
  border-top-color: #3f51d6;
  border-radius: 50%;
  display: inline-block;
  animation: balance-spin 0.7s linear infinite;
}
@keyframes balance-spin { to { transform: rotate(360deg); } }
.balance-error { color: var(--bad); font-size: 13px; font-weight: 650; cursor: help; }
.balance-btn {
  border: 0;
  border-radius: 999px;
  background: #3f51d6;
  color: #fff;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 650;
}
.balance-btn:hover { background: #3242c4; }
.balance-refresh {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 8px;
  background: #eef0fb;
  color: #3f51d6;
  display: inline-grid;
  place-items: center;
  padding: 0;
}
.balance-refresh:hover { background: #e0e4f8; }
td.actions { white-space: nowrap; width: 1%; text-align: right; vertical-align: middle; }
td.actions > * + * { margin-left: 8px; }
td.actions .eye-btn {
  position: static;
  top: auto;
  right: auto;
  transform: none;
  width: 22px;
  height: 22px;
  display: inline-grid;
  color: #667085;
}
td.actions .eye-btn svg { width: 16px; height: 16px; }
.vendor-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 12px; }
.vendor-bar .inline, .search-label { display: flex; align-items: center; gap: 6px; margin: 0; color: #667085; flex: 0 0 auto; font-size: 12px; }
.vendor-bar select, .vendor-bar input {
  width: auto;
  height: 26px;
  margin: 0;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 12px;
}
.search-label { margin-left: auto; }
.search-label input { min-width: 140px; }
.create-vendor, .vendor-bar .sys-create { flex: 0 0 auto; }
.vendor-bar .search-label { margin-left: auto; }
.endpoint-cell { display: grid; gap: 4px; font-size: 13px; }
.endpoint-cell b { color: var(--muted); font-weight: 650; margin-right: 4px; }
.url-cell { max-width: 220px; word-break: break-all; }
.vendor-expand { display: inline-flex; align-items: center; gap: 8px; }
.expand-btn {
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #333;
  font-size: 16px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  flex: 0 0 auto;
}
.expand-btn:hover { background: #f7f8fc; }
.api-account-detail td { padding: 0; background: #f7f8fc; border-bottom: 1px solid var(--line); }
.api-account-detail[hidden] { display: none; }
.endpoint-panel {
  display: grid;
  gap: 10px;
  padding: 14px 16px 14px 48px;
  background: #f4f5f8;
}
.endpoint-item { display: grid; gap: 2px; }
.endpoint-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.endpoint-value { font-size: 14px; color: var(--ink); word-break: break-all; }
.api-account-modal { width: min(640px, 94vw); }
.api-account-form { display: grid; gap: 12px; margin-top: 16px; }
.api-account-form label { display: grid; gap: 6px; margin: 0; font-size: 14px; color: #222; }
.api-account-form input { margin: 0; }
.secret-field { display: flex; align-items: center; gap: 8px; }
.secret-field input { flex: 1; }
.vendor-form-card { background: #fff; border-radius: 18px; padding: 28px 28px 22px; }
.vendor-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 28px; }
#tplForm.vendor-form { grid-template-columns: 1fr; max-width: 640px; margin: 0 auto; }
#tplForm textarea { min-height: 140px; }
.vendor-form label { font-size: 14px; color: #222; }
.vendor-form input { border-radius: 12px; background: #fff; }
.vendor-form .check-line { grid-column: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.vendor-form .check-line input { width: 18px; height: 18px; }
.vendor-actions { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 18px; }
.vendor-actions .sys-create { flex: 0 0 auto; min-width: 148px; height: 34px; }
.pill-btn { background: #6d4dff; color: #fff; border: 1px solid #6d4dff; border-radius: 999px; padding: 10px 22px; }
.pill-btn.ghost { background: #fff; color: #6d4dff; }
.modal-back { position: fixed; inset: 0; background: rgba(20, 16, 40, 0.28); display: grid; place-items: center; z-index: 20; }
.modal-back.confirm-layer { z-index: 40; }
.price-modal { width: min(760px, 94vw); background: #fff; border-radius: 16px; padding: 22px 24px 18px; box-shadow: 0 24px 60px rgba(20, 16, 40, 0.18); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-head h2 { margin: 0; font-size: 22px; }
.x-btn { border: 0; background: transparent; font-size: 28px; line-height: 1; color: #444; }
.price-map { display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 14px; align-items: end; margin: 18px 0; }
.price-map label { display: flex; flex-direction: column; gap: 8px; }
.price-grid { width: 100%; border-collapse: collapse; font-size: 12px; }
.price-grid tr.price-pick { cursor: pointer; }
.modal-foot { display: flex; justify-content: flex-end; margin-top: 16px; }
.confirm-modal {
  width: min(420px, 92vw);
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px 22px;
  box-shadow: 0 24px 60px rgba(20, 16, 40, 0.18);
}
.confirm-modal h2 { margin: 0; font-size: 18px; font-weight: 650; text-align: center; line-height: 1.4; }
.confirm-modal .modal-foot { justify-content: center; gap: 10px; }
.route-create h2 { margin: 0 0 4px; }
.section-bar { margin: 16px 0 12px; background: #3f51d6; color: #fff; border-radius: 8px; padding: 10px 14px; font-weight: 700; letter-spacing: 0.04em; }
.route-country { display: block; max-width: 100%; }
.trunk-head, .trunk-row { display: grid; grid-template-columns: 1.6fr 140px 90px 48px; gap: 12px; align-items: center; }
.trunk-head { color: #667; font-size: 12px; letter-spacing: 0.04em; margin-bottom: 8px; }
.trunk-row { margin-bottom: 8px; }
.trunk-row select, .trunk-row input { margin: 0; }
.trunk-hint { color: #667; }
.add-trunk { background: #fff; color: #6d4dff; border: 1px dashed #6d4dff; border-radius: 10px; padding: 8px 14px; }
.add-trunk:disabled { opacity: 0.4; cursor: default; }
.trunk-total { margin: 14px 0; }
.route-actions { display: flex; justify-content: flex-end; gap: 10px; }
.icon-btn { width: 30px; height: 30px; border: 0; border-radius: 8px; background: #3f51d6; color: #fff; display: inline-grid; place-items: center; padding: 0; }
.icon-btn.stop { background: #2f2f2f; }
.icon-btn.remove { background: #c43838; }
.icon-btn:disabled { opacity: 0.35; cursor: default; }
.run-btn { border: 0; border-radius: 999px; color: #fff; padding: 6px 12px; font-size: 13px; }
.run-btn.start { background: #1f9d55; }
.run-btn.stop { background: #2f2f2f; }
.run-btn:disabled { opacity: 0.35; cursor: default; }

.card { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td {
  text-align: left;
  padding: 6px 10px;
  border-bottom: 1px solid #f0f2f6;
  vertical-align: middle;
  white-space: nowrap;
}
th {
  height: 30px;
  padding: 0 10px;
  color: #98a2b3;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  background: #f4f6fb;
  border-bottom: 0;
}
td { font-size: 12px; line-height: 1.25; color: #344054; background: #fff; }
th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; }
td.status-count { white-space: nowrap; }
.status-resend {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}
.resend-btn {
  position: static;
  top: auto;
  right: auto;
  transform: none;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: #efeaff;
  color: #5b46f5;
  display: inline-grid;
  place-items: center;
  line-height: 0;
  cursor: pointer;
}
.resend-btn:hover {
  background: #5b46f5;
  color: #fff;
}
.resend-btn svg {
  width: 12px;
  height: 12px;
  display: block;
}
tbody tr:hover td { background: #fafbff; }
table .pill { font-size: 11px; padding: 1px 6px; line-height: 16px; }
table .icon-btn { width: 22px; height: 22px; border-radius: 6px; }
table .icon-btn svg,
table .eye-btn svg { width: 12px; height: 12px; }
.pill {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  background: #eee7dc;
}
.pill.delivered, .pill.DELIVERED, .pill.completed, .pill.approved, .pill.active, .pill.ACTIVE, .pill.connected, .pill.CONNECTED { background: #e5f4ea; color: var(--good); }
.pill.failed, .pill.FAILED, .pill.undelivered, .pill.rejected, .pill.cancelled, .pill.inactive, .pill.INACTIVE { background: #fde8e6; color: var(--bad); }
.pill.disconnected, .pill.DISCONNECTED { background: #fff1d6; color: var(--warn); }
.pill.queued, .pill.QUEUED, .pill.sending, .pill.SENDING, .pill.scheduled, .pill.sent, .pill.SENT, .pill.pending, .pill.PENDING, .pill.waiting, .pill.connecting, .pill.processing { background: #fff1d6; color: var(--warn); }
.file-busy { display: flex; align-items: center; gap: 8px; }
.file-busy[hidden] { display: none; }
.upload-progress { width: min(480px, 92vw); }
.upload-progress h2 { margin-bottom: 10px; }
.upload-progress .meta { text-align: center; line-height: 1.45; }
.progress-track {
  height: 12px;
  margin: 16px 0 8px;
  background: #eceff6;
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0;
  background: #6d4dff;
  border-radius: 999px;
  transition: width 0.35s ease;
}
.progress-fill.indeterminate {
  width: 40%;
  animation: progress-slide 1.2s ease-in-out infinite;
}
.progress-file { margin: 0 0 10px; text-align: center; font-weight: 700; color: #1d1a33; }
.progress-count { margin: 0; text-align: center; font-weight: 650; color: #333; }
@keyframes progress-slide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(280%); }
}
.pill.waiting { text-transform: uppercase; }
.pill.completed { text-transform: capitalize; }
.bars { display: flex; align-items: end; gap: 10px; height: 120px; }
.bar { flex: 1; background: #f0d3c4; border-radius: 8px 8px 2px 2px; min-height: 4px; position: relative; }
.bar span { position: absolute; top: -18px; left: 0; right: 0; text-align: center; font-size: 11px; color: var(--muted); }
.meta { color: var(--muted); font-size: 13px; }
.check { display: flex; gap: 8px; align-items: flex-start; color: var(--ink); }
.check input { width: auto; margin-top: 3px; }
.toast {
  position: fixed;
  bottom: 18px;
  right: 18px;
  background: var(--ink);
  color: white;
  padding: 12px 16px;
  border-radius: 12px;
}
.pager { display: flex; gap: 6px; align-items: center; margin-top: 8px; font-size: 12px; }
.pager label { display: flex; align-items: center; gap: 6px; margin: 0; flex: 0 0 auto; font-size: 12px; color: #667085; }
.pager select,
.pager .btn {
  height: 26px;
  margin: 0;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12px;
}
.pager select { width: auto; }
.pager .meta { font-size: 12px; }
.campaign-toolbar {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 10px;
  width: auto;
  max-width: 100%;
}
.campaign-toolbar > * {
  flex: 0 0 auto;
  min-width: 0;
}
.campaign-toolbar .toolbar-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 96px;
  margin: 0;
  margin-bottom: 0;
  font-size: 11px;
  line-height: 1.2;
}
.campaign-toolbar .toolbar-field select,
.campaign-toolbar .toolbar-q,
.campaign-toolbar .toolbar-search-btn {
  height: 28px;
  margin: 0;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 12px;
}
.campaign-toolbar .toolbar-field select {
  width: 96px;
}
.campaign-toolbar .toolbar-date {
  width: 132px;
}
.campaign-toolbar .toolbar-date input[type="date"] {
  width: 132px;
  height: 28px;
  margin: 0;
  padding: 0 6px;
  border-radius: 8px;
  font-size: 12px;
}
.campaign-toolbar .toolbar-q {
  width: 200px;
  max-width: 200px;
  flex: 0 0 200px;
}
.campaign-toolbar .toolbar-search-btn {
  width: auto;
  padding: 0 12px;
  white-space: nowrap;
  align-self: flex-end;
}
@media (max-width: 720px) {
  .campaign-toolbar {
    flex-wrap: wrap;
  }
  .campaign-toolbar .toolbar-q {
    width: min(200px, calc(100% - 112px));
    max-width: 100%;
    flex: 1 1 140px;
  }
}
.split { display: grid; grid-template-columns: 280px 1fr; gap: 16px; }
@media (max-width: 1100px) {
  .kpi-wide b { font-size: 18px; }
  .kpi b { font-size: 14px; }
}
.analytics-desk { padding: 8px 16px 20px; min-height: calc(100vh - 150px); }
.analytics-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  padding: 2px 0 8px;
  border-bottom: 1px solid #eef1f6;
}
.analytics-filters { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.analytics-filters select,
.analytics-filters input {
  width: auto;
  margin: 0;
  height: 26px;
  border-radius: 4px;
  padding: 0 6px;
  font-size: 12px;
  color: #344054;
  background: #fff;
}
#anRefresh { width: 168px; }
#anCustomer { width: 128px; }
.gmt-date { position: relative; display: inline-flex; align-items: center; }
.gmt-date-face {
  display: block;
  height: 26px;
  line-height: 24px;
  min-width: 118px;
  padding: 0 24px 0 6px;
  border: 1px solid #d0d5dd;
  border-radius: 4px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E") right 6px center no-repeat;
  font-size: 12px;
  color: #344054;
  white-space: nowrap;
  pointer-events: none;
}
.gmt-date-face.is-empty { color: #98a2b3; }
.gmt-date input[type="date"],
.gmt-date input[type="datetime-local"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.compose-grid .gmt-date { display: flex; width: 100%; margin-top: 3px; }
.compose-grid .gmt-date-face {
  width: 100%;
  height: 28px;
  line-height: 26px;
  border-color: #e1e5ee;
  color: #1f2937;
}
.analytics-filters input[type="date"] { width: 118px; }
.an-to { color: #667085; font-size: 12px; }
.an-search {
  width: auto;
  height: 26px;
  margin: 0;
  border: 1px solid #d0d5dd;
  border-radius: 4px;
  background: #fff;
  color: #344054;
  padding: 0 10px;
  font-size: 12px;
}
.an-scroll { overflow-x: auto; margin-top: 14px; }
.an-table { width: 100%; border-collapse: collapse; min-width: 1100px; font-size: 11px; }
.an-table th {
  height: 24px;
  padding: 0 6px;
  font-size: 11px;
}
.an-table td {
  padding: 2px 6px;
  font-size: 11px;
  line-height: 1.2;
}
.an-table th,
.an-table td { white-space: nowrap; }
.an-toggle, .an-spacer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-right: 4px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  color: #fff;
  background: #f04438;
  font-size: 12px;
  line-height: 1;
  vertical-align: middle;
}
.an-toggle.open { background: #f04438; }
.an-spacer { background: transparent; }
.an-child td:first-child { color: #475467; }
.an-badge {
  display: inline-block;
  min-width: 46px;
  padding: 0 4px;
  border-radius: 3px;
  color: #fff;
  font-size: 10px;
  font-weight: 650;
  text-align: center;
  line-height: 16px;
}
.an-badge.good { background: #16a34a; }
.an-badge.bad { background: #ef4444; }
.an-link { color: #3b6cff; }
button.an-count {
  border: 0;
  background: transparent;
  padding: 0;
  color: #3b6cff;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}
.report-desk { padding: 8px 12px 12px; }
.report-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.report-back, .report-download {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 26px;
  padding: 0 8px;
  border: 1px solid #d9d6fe;
  border-radius: 6px;
  background: #fff;
  color: #6d5bd0;
  font-size: 12px;
}
.report-back svg { width: 12px; height: 12px; }
.report-bar .report-download { margin-left: auto; }
.report-size { display: inline-flex; align-items: center; gap: 4px; margin: 0; color: #667085; font-size: 12px; }
.report-size select { width: 52px; height: 26px; margin: 0; padding: 0 4px; border: 1px solid #e4e7ec; border-radius: 4px; background: #fff; font-size: 12px; }
.report-funnel {
  width: 22px;
  height: 22px;
  border: 0;
  background: transparent;
  color: #98a2b3;
  padding: 0;
}
.report-funnel svg { width: 13px; height: 13px; }
.report-funnel.on { color: #6d5bd0; }
.report-col-wrap { position: relative; margin-left: auto; }
.report-columns { border: 0; background: transparent; color: #6d5bd0; font-size: 12px; padding: 0 2px; }
.report-col-menu {
  position: absolute;
  right: 0;
  top: 24px;
  z-index: 5;
  min-width: 200px;
  padding: 6px 8px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.08);
}
.report-col-menu label { display: flex; align-items: center; gap: 8px; margin: 0; padding: 3px 0; font-size: 12px; color: #344054; font-weight: 400; }
.report-note { margin: 0 0 8px; color: #667085; font-size: 12px; }
.report-note b { color: #344054; font-weight: 600; }
.report-table { width: 100%; min-width: 760px; }
.report-table th { background: #f7f8fc; color: #98a2b3; font-weight: 500; }
.report-table .col-filter th { height: auto; background: #fff; padding: 3px 6px 4px; }
.report-table .col-filter input { width: 100%; height: 22px; margin: 0; padding: 0 6px; border: 1px solid #e4e7ec; border-radius: 4px; font-size: 11px; }
.report-table td { white-space: nowrap; background: #f7f8fc; }
.report-table td.clip { max-width: 220px; background: #f7f8fc; }
.con-desk { padding: 10px 12px 12px; }
.con-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.con-bar .report-col-wrap { margin-left: auto; }
.con-scroll {
  position: relative;
  max-height: calc(100vh - 250px);
  min-height: 240px;
  max-width: 100%;
  overflow: auto;
  border: 1px solid #e7e4fb;
  border-radius: 8px;
}
.con-table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; }
.con-table td.clip { max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.con-table th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #f4f1ff;
  color: #5b46c6;
  font-weight: 650;
  text-align: left;
  padding: 0;
  border-bottom: 1px solid #e4dffc;
  box-shadow: 0 1px 0 #e4dffc;
}
.con-table thead tr:first-child th { height: 36px; }
.con-sort { width: 100%; height: 100%; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; padding: 0 8px; cursor: pointer; white-space: nowrap; }
.con-table .col-filter th { top: 36px; z-index: 10; background: #fff; padding: 4px 6px 6px; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06); }
.con-table .col-filter input { width: 100%; height: 24px; margin: 0; padding: 0 6px; border: 1px solid #e4e7ec; border-radius: 4px; font-size: 11px; }
.con-table td { padding: 7px 8px; border-bottom: 1px solid #f0eef8; white-space: nowrap; color: #344054; }
.con-table tbody tr:nth-child(even) td { background: #fbfaff; }
.con-table tbody tr:hover td { background: #f3f0ff; }
.con-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.con-metrics { margin-left: auto; display: flex; gap: 16px; color: #344054; font-size: 12px; }
.con-metrics b { color: #5b46c6; font-weight: 700; margin-right: 4px; }
.con-pages { display: flex; align-items: center; gap: 4px; }
.con-page, .con-gap { min-width: 26px; height: 26px; padding: 0 6px; border: 1px solid #e4e7ec; border-radius: 4px; background: #fff; color: #344054; font-size: 12px; }
.con-page.on { background: #efeaff; border-color: #d9d6fe; color: #5b46c6; font-weight: 700; }
.con-page:disabled { color: #c0c5d0; }
.con-gap { display: inline-grid; place-items: center; border: 0; background: transparent; }
.msg-filter { width: min(520px, 94vw); padding: 0; overflow: hidden; background: #fff; border-radius: 10px; }
.msg-filter.download-status { width: min(360px, 94vw); }
.msg-filter-banner { background: #5b46f5; color: #fff; padding: 8px 12px; }
.msg-filter-banner h2 { margin: 0; font-size: 14px; font-weight: 650; }
.msg-filter form { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px 12px; }
.msg-filter label { display: flex; flex-direction: column; gap: 3px; margin: 0; font-size: 12px; font-weight: 650; color: #344054; }
.msg-filter select, .msg-date input[data-date] { height: 28px; margin: 0; padding: 0 8px; border: 1px solid #d0d5dd; border-radius: 6px; background: #fff; font-size: 12px; font-weight: 500; }
.msg-filter-label { font-size: 12px; font-weight: 650; color: #344054; }
.msg-range { display: flex; align-items: center; gap: 6px; }
.msg-range > span { color: #667085; font-size: 12px; }
.msg-date { position: relative; flex: 1; }
.msg-date input[data-date] { width: 100%; padding-right: 28px; }
.msg-date button { position: absolute; right: 6px; top: 6px; border: 0; background: transparent; color: #667085; padding: 0; }
.msg-date button svg { width: 14px; height: 14px; }
.msg-date input[type="date"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.msg-filter-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 2px; }
.msg-filter-actions .btn { height: 28px; padding: 0 12px; font-size: 12px; }
.msg-filter-actions .primary { background: #5b46f5; border-color: #5b46f5; color: #fff; }
.system-users {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 78px);
  padding: 16px 18px 14px;
  border-radius: 16px;
}
.sys-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sys-head h2 { margin: 0; font-size: 16px; font-weight: 600; color: #1f2937; }
.sys-create {
  height: 34px;
  padding: 0 14px;
  border: 1px solid #d6ccff;
  border-radius: 999px;
  background: #fff;
  color: #6d5bd0;
  font-size: 13px;
}
.sys-create:hover { background: #f7f5ff; }
.vendor-bar .sys-create { flex: 0 0 auto; }
.sys-table-wrap { overflow-x: auto; }
.sys-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.sys-table th {
  height: 30px;
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: #98a2b3;
  background: #f4f6fb;
  padding: 0 10px;
  border-bottom: 0;
  white-space: nowrap;
}
.sys-table td {
  height: 34px;
  padding: 0 10px;
  font-size: 12px;
  line-height: 1;
  color: #344054;
  background: #fff;
  border-bottom: 1px solid #f0f2f6;
  vertical-align: middle;
  white-space: nowrap;
}
.sys-table .pill { font-size: 11px; padding: 1px 6px; line-height: 16px; }
.sys-table .icon-btn { width: 22px; height: 22px; border-radius: 6px; }
.sys-table .icon-btn svg,
.sys-table .eye-btn svg { width: 12px; height: 12px; }
.sys-actions { display: inline-flex; align-items: center; gap: 4px; }
.sys-table .sub-activate {
  height: 22px;
  margin-left: 6px;
  padding: 0 8px;
  border: 0;
  border-radius: 4px;
  background: #3f51d6;
  color: #fff;
  font-size: 11px;
}
.sys-pw { display: inline-flex; align-items: center; gap: 6px; }
.sys-pw .pw-mask { letter-spacing: 0.12em; }
.sys-pw:has(.eye-btn.open) .pw-mask { letter-spacing: 0; }
.sys-table .eye-btn,
.pw-cell .eye-btn {
  position: static;
  top: auto;
  right: auto;
  transform: none;
  width: 16px;
  height: 16px;
  color: #667085;
}
.sys-edit { position: relative; text-align: right; }
.sys-edit-btn {
  border: 0;
  background: transparent;
  color: #667085;
  padding: 0;
  font-size: 13px;
}
.sys-menu {
  position: absolute;
  right: 0;
  top: 30px;
  z-index: 4;
  min-width: 148px;
  padding: 6px;
  background: #fff;
  border: 1px solid #e7e9f2;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(20, 24, 40, 0.08);
}
.sys-menu[hidden] { display: none; }
.sys-menu button {
  display: block;
  width: 100%;
  margin: 0;
  padding: 7px 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #344054;
  font-size: 13px;
  text-align: left;
}
.sys-menu button:hover { background: #f4f6fb; }
.sys-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
  color: #98a2b3;
  font-size: 12px;
}
.sys-pager { display: flex; gap: 4px; }
.sys-pager button {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid #e4e7ec;
  border-radius: 6px;
  background: #fff;
  color: #98a2b3;
  font-size: 12px;
}
.sys-pager button:disabled { opacity: 0.4; }
@media (max-width: 980px) {
  body.app-body { height: auto; overflow: auto; }
  .shell, .layout, .split, .vendor-form, #sendForm.layout, .compose-grid { grid-template-columns: 1fr; }
  .shell { height: auto; padding: 8px; gap: 8px; }
  .sidebar { position: static; width: auto; height: auto; border-right: 0; border-bottom: 1px solid #e7e9f2; }
  .sidebar nav { display: flex; gap: 6px; overflow: auto; }
  .sidebar button { width: auto; white-space: nowrap; }
  .workspace { height: auto; overflow: visible; }
  .dash-grid { grid-template-columns: 1fr; }
  .kpi-board { overflow-x: auto; }
  .kpi-wide, .kpi-stack { flex: 1 0 150px; }
  .topbar { grid-template-columns: 1fr; height: auto; flex-basis: auto; padding: 10px 16px; }
  .top-title, .top-actions, .top-left { grid-column: auto; justify-self: start; }
}
