:root {
  --bg0: #060712;
  --bg1: #0b1220;
  --ink: #eaf0ff;
  --muted: rgba(234, 240, 255, 0.72);
  --card: rgba(255, 255, 255, 0.06);
  --stroke: rgba(255, 255, 255, 0.12);
  --accent: #46e6b3;
  --accent2: #4ea7ff;
  --danger: #ff5c7a;
  --shadow: rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Space Grotesk", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--ink);
  background: radial-gradient(1200px 700px at 25% -10%, #0a1a2a 0%, var(--bg0) 55%),
    radial-gradient(900px 600px at 110% 25%, #071c18 0%, var(--bg0) 55%),
    linear-gradient(180deg, var(--bg0), var(--bg0));
  overflow-x: hidden;
}

.bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.grid {
  position: absolute;
  inset: -20%;
  background-image: linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.14;
  transform: rotate(-6deg);
  filter: blur(0.2px);
  mask-image: radial-gradient(closest-side at 40% 25%, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0));
}

.orb {
  position: absolute;
  width: 560px;
  height: 560px;
  border-radius: 999px;
  filter: blur(22px);
  opacity: 0.55;
  mix-blend-mode: screen;
  animation: drift 10s ease-in-out infinite;
}

.orb-a {
  left: -180px;
  top: -220px;
  background: radial-gradient(circle at 35% 35%, rgba(70, 230, 179, 0.42), rgba(70, 230, 179, 0) 60%),
    radial-gradient(circle at 65% 45%, rgba(78, 167, 255, 0.22), rgba(78, 167, 255, 0) 55%);
}

.orb-b {
  right: -220px;
  top: 120px;
  width: 620px;
  height: 620px;
  animation-delay: -3.2s;
  background: radial-gradient(circle at 35% 35%, rgba(78, 167, 255, 0.34), rgba(78, 167, 255, 0) 60%),
    radial-gradient(circle at 65% 55%, rgba(70, 230, 179, 0.18), rgba(70, 230, 179, 0) 55%);
}

@keyframes drift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(30px, 22px, 0) scale(1.03);
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
}

.wrap {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 28px 16px;
}

.phoneShell {
  width: min(100%, 430px);
}

.card {
  width: 100%;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.05));
  border: 1px solid var(--stroke);
  box-shadow: 0 26px 80px var(--shadow);
  padding: 20px;
  backdrop-filter: blur(10px);
  transform: translateY(10px);
  opacity: 0;
  animation: enter 550ms cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
}

@keyframes enter {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.head {
  margin-bottom: 16px;
}

.brandRow {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}

.logo {
  width: 84px;
  height: 84px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: radial-gradient(circle at 30% 30%, rgba(70, 230, 179, 0.35), rgba(70, 230, 179, 0) 55%),
    radial-gradient(circle at 65% 55%, rgba(78, 167, 255, 0.22), rgba(78, 167, 255, 0) 60%),
    rgba(255, 255, 255, 0.06);
  display: grid;
  place-items: center;
  padding: 10px;
}

.logoImg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: auto;
}

.sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}

.eyebrow {
  margin: 0;
  color: rgba(234, 240, 255, 0.52);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.form {
  display: grid;
  gap: 14px;
}

.modeRow {
  display: flex;
  gap: 10px;
}

.chip {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(234, 240, 255, 0.82);
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.chip:active {
  transform: scale(0.99);
}

.chipActive {
  background: rgba(70, 230, 179, 0.12);
  border-color: rgba(70, 230, 179, 0.28);
  color: rgba(234, 240, 255, 0.94);
}

.field span {
  display: block;
  font-size: 12px;
  letter-spacing: 0.3px;
  color: rgba(234, 240, 255, 0.78);
  margin-bottom: 8px;
}

input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

input:focus {
  border-color: rgba(70, 230, 179, 0.55);
  box-shadow: 0 0 0 6px rgba(70, 230, 179, 0.10);
  transform: translateY(-1px);
}

.pw {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.ghost {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(234, 240, 255, 0.82);
  border-radius: 14px;
  padding: 10px 12px;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
  user-select: none;
}

.ghost.danger {
  border-color: rgba(255, 92, 122, 0.28);
  background: rgba(255, 92, 122, 0.08);
  color: rgba(255, 220, 228, 0.92);
}

.ghost:active {
  transform: scale(0.98);
}

.conflictActions {
  display: flex;
  gap: 10px;
}

.btn {
  height: 48px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(90deg, var(--accent), #62f2c6);
  color: #04120b;
  font-weight: 800;
  letter-spacing: 0.2px;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr 22px;
  align-items: center;
  padding: 0 14px 0 16px;
  transition: transform 140ms ease, filter 140ms ease;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  inset: -60%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 55%);
  transform: translateX(-20%) translateY(-10%);
  opacity: 0.55;
}

.btn:hover {
  filter: brightness(1.02);
}

.btn:active {
  transform: translateY(1px);
}

.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(4, 18, 11, 0.2);
  border-top-color: rgba(4, 18, 11, 0.85);
  opacity: 0;
}

.loading .spinner {
  opacity: 1;
  animation: spin 700ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.msg {
  min-height: 18px;
  color: rgba(234, 240, 255, 0.78);
  font-size: 12px;
}

.msg.error {
  color: var(--danger);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.pill {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: rgba(234, 240, 255, 0.76);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  color: rgba(234, 240, 255, 0.9);
}

.foot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hint {
  color: rgba(234, 240, 255, 0.62);
  font-size: 12px;
  line-height: 18px;
}

.dashboard {
  width: 100%;
}

.dashHead {
  margin-bottom: 18px;
}

.menuGrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.menuCard {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  min-height: 156px;
  padding: 18px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.menuCard:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.menuIcon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 18px;
  background: rgba(255, 255, 255, 0.08);
}

.menuTitle {
  font-size: 24px;
  font-weight: 700;
}

.menuText {
  color: rgba(234, 240, 255, 0.7);
  line-height: 1.5;
}

.menuCard.sms .menuIcon {
  background: linear-gradient(135deg, rgba(78, 167, 255, 0.28), rgba(78, 167, 255, 0.08));
}

.menuCard.wa .menuIcon {
  background: linear-gradient(135deg, rgba(70, 230, 179, 0.28), rgba(70, 230, 179, 0.08));
}

.menuCard.rcs .menuIcon {
  background: linear-gradient(135deg, rgba(255, 190, 92, 0.28), rgba(255, 190, 92, 0.08));
}

.dashActions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
  gap: 10px;
}

.pendingHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.pendingHeadActions {
  display: flex;
  gap: 10px;
}

.pendingTitle {
  margin: 6px 0 0;
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.toolbarInput,
.toolbarSelect {
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  outline: none;
}

.toolbarSelect option {
  color: #08111e;
}

.pendingMeta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.tableWrap {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
}

.pendingTable {
  width: 100%;
  border-collapse: collapse;
}

.pendingTable th,
.pendingTable td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  text-align: left;
  vertical-align: top;
  font-size: 12px;
}

.pendingTable th {
  color: rgba(234, 240, 255, 0.62);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.03);
}

.pendingTable tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

.templateCode {
  color: rgba(234, 240, 255, 0.96);
}

.clientName {
  font-weight: 600;
}

.clientEmail,
.muted {
  color: rgba(234, 240, 255, 0.58);
}

.statusBadge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-transform: capitalize;
  font-size: 11px;
}

.statusBadge.pending {
  color: #ffbe5c;
  background: rgba(255, 190, 92, 0.1);
}

.statusBadge.approved {
  color: #46e6b3;
  background: rgba(70, 230, 179, 0.1);
}

.statusBadge.rejected {
  color: #ff9caf;
  background: rgba(255, 92, 122, 0.1);
}

.rowActions {
  display: flex;
  gap: 8px;
}

.miniBtn {
  border: 0;
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.miniBtn.approve {
  color: #04120b;
  background: linear-gradient(90deg, var(--accent), #62f2c6);
}

.miniBtn.reject {
  color: #ffd9e1;
  background: rgba(255, 92, 122, 0.14);
  border: 1px solid rgba(255, 92, 122, 0.24);
}

.miniBtn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.emptyState {
  text-align: center;
  color: rgba(234, 240, 255, 0.62);
  padding: 28px 16px;
}

.desktopOnly {
  display: none;
}

.mobileOnly {
  display: block;
}

.pendingCardList {
  display: grid;
  gap: 12px;
}

.pendingItemCard {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.pendingItemTop {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.pendingItemIndex {
  color: rgba(234, 240, 255, 0.48);
  font-size: 12px;
}

.pendingItemTitle {
  margin: 8px 0 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  word-break: break-word;
}

.pendingItemClient {
  margin-top: 6px;
  color: rgba(234, 240, 255, 0.7);
  line-height: 1.45;
}

.pendingItemMeta {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.pendingItemMetaRow {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.pendingItemKey {
  color: rgba(234, 240, 255, 0.5);
  font-size: 12px;
}

.pendingItemValue {
  color: rgba(234, 240, 255, 0.82);
  font-size: 12px;
  text-align: right;
}

.pendingItemPreview {
  margin-top: 12px;
  color: rgba(234, 240, 255, 0.62);
  line-height: 1.5;
  font-size: 12px;
}

.pendingItemActions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.pendingItemActions .miniBtn {
  flex: 1;
  min-height: 40px;
}

@media (max-width: 420px) {
  .card {
    padding: 18px 16px;
  }
  .brandRow {
    grid-template-columns: 68px 1fr;
    gap: 12px;
  }
  .logo {
    width: 68px;
    height: 68px;
    border-radius: 20px;
    padding: 8px;
  }
  .menuTitle {
    font-size: 22px;
  }
}

@media (min-width: 900px) {
  .phoneShell {
    width: min(100%, 920px);
  }
  .dashboard {
    width: 100%;
  }
  .menuGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .toolbar {
    grid-template-columns: minmax(0, 1fr) 160px;
  }
  .desktopOnly {
    display: block;
  }
  .mobileOnly {
    display: none;
  }
  .pendingTitle {
    font-size: 28px;
  }
}
