/* ═══════════════════════════════════════
   VARIABLES
═══════════════════════════════════════ */
:root {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: rgba(59, 130, 246, 0.08);
  --primary-glow: rgba(59, 130, 246, 0.22);
  --bg-page: #ffffff;
  --bg-card: #ffffff;
  --card-bg: #ffffff;
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --surface-bg: #f1f5f9;
  --border-color: #e2e8f0;
  --border-input: #cbd5e1;
  --bg-input: #ffffff;
  --sidebar-bg: #282c31;
  --sidebar-hover: #353a42;
  --sidebar-active: #3c424b;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-subtle: #f1f5f9;
  --danger: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;
  --info: #3b82f6;
  --card-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
  --card-shadow-hover: 0 12px 32px -4px rgba(59, 130, 246, 0.12), 0 4px 12px -2px rgba(0, 0, 0, 0.04);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --transition: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ═══════════════════════════════════════
/* ═══════════════════════════════════════
   LIGHT THEME ENFORCED GLOBALLY (Dark Mode Disabled)
═══════════════════════════════════════ */
html.dark,
html {
  color-scheme: light;
  --bg-page: #ffffff;
  --bg-card: #ffffff;
  --card-bg: #ffffff;
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --surface-bg: #f1f5f9;
  --border-color: #e2e8f0;
  --border-input: #cbd5e1;
  --bg-input: #ffffff;
  --sidebar-bg: #282c31;
  --sidebar-hover: #353a42;
  --sidebar-active: #3c424b;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-subtle: #f1f5f9;
  --card-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
  --card-shadow-hover: 0 12px 32px -4px rgba(59, 130, 246, 0.12), 0 4px 12px -2px rgba(0, 0, 0, 0.04);
}

html.dark body,
body {
  background-color: var(--bg-page);
  color: var(--text-primary);
}

html.dark .dashboard-layout,
html.dark .main-content,
html.dark .page-content {
  background-color: var(--bg-page);
  color: var(--text-primary);
}

/* ═══════════════════════════════════════
   RESET
═══════════════════════════════════════ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: .875rem;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
}

label,
.form-group label {
  color: var(--text-primary);
}

.card,
.stx-card,
.table-card {
  color: var(--text-primary);
}

.card-title,
.stx-card-title {
  color: var(--text-primary);
}

.card-header,
.stx-card-header {
  color: var(--text-primary);
}

.text-muted,
.stx-text-muted {
  color: var(--text-muted) !important;
}

.text-secondary,
.stx-text-secondary {
  color: var(--text-secondary) !important;
}

.stx-crumb-current,
.crumb-curr {
  color: var(--text-primary) !important;
}

::-webkit-scrollbar {
  width: 5px;
  height: 5px
}

::-webkit-scrollbar-track {
  background: transparent
}

::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, .25);
  border-radius: 10px
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, .45)
}

/* ═══════════════════════════════════════
   KEYFRAMES
═══════════════════════════════════════ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(14px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

@keyframes fadeIn {
  from {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(.94) translateY(6px)
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0)
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg)
  }
}

@keyframes shimmer {
  0% {
    background-position: 200% 0
  }

  100% {
    background-position: -200% 0
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: .5
  }
}

@keyframes toastSlide {
  from {
    opacity: 0;
    transform: translateX(110%) scale(.95)
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1)
  }
}

@keyframes ripple {
  from {
    transform: scale(0);
    opacity: .4
  }

  to {
    transform: scale(4);
    opacity: 0
  }
}

@keyframes coverGlow {

  0%,
  100% {
    transform: translate(0, 0)
  }

  50% {
    transform: translate(10%, 10%)
  }
}

@keyframes authCardEnter {
  from {
    opacity: 0;
    transform: scale(.92) translateY(30px);
    filter: blur(5px)
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0)
  }
}

@keyframes rowIn {
  from {
    opacity: 0;
    transform: translateY(6px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(.99)
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1)
  }
}

@keyframes badgePop {
  0% {
    transform: scale(.85);
    opacity: 0
  }

  70% {
    transform: scale(1.08)
  }

  100% {
    transform: scale(1);
    opacity: 1
  }
}

@keyframes borderGlow {

  0%,
  100% {
    box-shadow: 0 0 0 0 var(--primary-glow)
  }

  50% {
    box-shadow: 0 0 0 4px var(--primary-glow)
  }
}

/* ═══════════════════════════════════════
   AUTH
═══════════════════════════════════════ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: radial-gradient(circle at 50% 15%, #1e293b 0%, #0f172a 45%, #020617 100%) !important;
}

.auth-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(99, 102, 241, .12);
  display: flex;
  max-width: 900px;
  width: 100%;
  animation: authCardEnter .5s cubic-bezier(.34, 1.56, .64, 1)
}

.auth-cover {
  background: linear-gradient(135deg, #735DFF 0%, #5A3DE8 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 45%;
  min-height: 500px;
  padding: 2rem
}

.auth-cover::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, .08) 0%, transparent 60%);
  animation: coverGlow 8s ease-in-out infinite
}

.auth-cover-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: white
}

.auth-cover-content h2 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.6;
  max-width: 300px;
  margin-top: 1.5rem;
  opacity: .9
}

.auth-form {
  flex: 1;
  padding: 2.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center
}

.auth-form-inner {
  width: 100%;
  max-width: 380px
}

.auth-form-inner h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
  animation: fadeInUp .3s ease
}

.auth-form-inner p {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 28px;
  animation: fadeInUp .35s ease
}

.auth-card-signup {
  max-width: 1000px;
  min-height: 620px
}

.auth-cover-signup {
  width: 320px;
  flex-shrink: 0;
  min-height: 620px;
  background: linear-gradient(135deg, #0a0a24 0%, #06061a 100%) !important;
}

.auth-form-signup {
  flex: 1;
  align-items: flex-start;
  padding: 2.5rem;
  overflow-y: auto;
  max-height: 620px
}

.auth-signup-inner {
  width: 100%;
  max-width: 520px;
  margin: 0 auto
}

.signup-steps {
  display: flex;
  flex-direction: column;
  gap: 14px
}

.pay-method-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 6px
}

.auth-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px
}

.auth-form-actions .fly-btn {
  flex: 1 1 0
}

.auth-form-actions .auth-primary-action {
  flex-grow: 2
}


.auth-card-login {
  max-width: 900px;
  min-height: 500px
}

.auth-cover-login {
  width: 45%;
  align-items: center;
  justify-content: center;
  min-height: 500px;
  padding: 2rem;
  background: linear-gradient(145deg, #5b5ff0 0%, #4f46e5 52%, #4338ca 100%)
}

.auth-cover-login::after {
  content: '';
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 14px;
  pointer-events: none
}

.auth-cover-content-login {
  text-align: center;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px
}

.auth-brand-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px
}

.auth-brand-mark {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .15);
  border: 1px solid rgba(255, 255, 255, .22);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .16)
}

.auth-brand-mark svg {
  width: 24px;
  height: 24px
}

.auth-eyebrow {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255, 255, 255, .7);
  margin-bottom: 3px
}

.auth-brand-block h1,
.auth-cover-content-login h1 {
  color: #fff;
  font-size: 30px;
  line-height: 1.05;
  font-weight: 900;
  margin: 0;
  letter-spacing: 0;
  text-shadow: 0 1px 4px rgba(15, 23, 42, .16)
}

.auth-cover-copy {
  color: rgba(255, 255, 255, .88);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
  max-width: 320px;
  margin: 0
}

.auth-form-login {
  padding: 2.25rem;
  align-items: center;
  background: linear-gradient(180deg, #fff 0%, #fbfdff 100%)
}

.auth-login-inner {
  max-width: 390px
}

.auth-login-heading {
  margin-bottom: 20px
}

.auth-login-heading h2 {
  font-size: 26px;
  line-height: 1.12;
  font-weight: 900;
  color: var(--text-primary);
  margin: 0 0 6px;
  letter-spacing: 0
}

.auth-login-heading p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0
}

.auth-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 11px 13px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 14px;
  animation: fadeInUp .2s ease
}

.auth-login-form {
  display: flex;
  flex-direction: column;
  gap: 2px
}

.auth-input-wrap {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%
}

.auth-input-icon {
  position: absolute;
  left: 12px;
  top: 0;
  width: 24px;
  height: 42px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: color var(--transition);
  z-index: 2
}

.auth-input-wrap:focus-within .auth-input-icon {
  color: var(--primary)
}

.auth-input {
  height: 42px !important;
  padding-left: 46px !important;
  padding-right: 44px !important;
  font-size: 14px;
  border-radius: 8px;
  line-height: 42px
}

.auth-password-toggle {
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  justify-content: center;
  z-index: 3
}

.auth-captcha-card {
  display: grid;
  grid-template-columns: 1fr 112px;
  align-items: center;
  gap: 12px;
  margin: 2px 0 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc
}

.auth-captcha-question {
  min-width: 0
}

.auth-captcha-question .fly-label {
  margin-bottom: 2px;
  color: var(--text-secondary)
}

.auth-captcha-question strong {
  display: block;
  color: var(--primary-dark);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0
}

.auth-captcha-input {
  height: 40px;
  text-align: center;
  font-weight: 800;
  font-size: 15px;
  border-radius: 8px;
  background: #fff
}

.auth-submit-btn {
  width: 100%;
  height: 42px;
  margin-top: 0;
  border-radius: 9px;
  font-size: 14px
}

.auth-btn-content,
.auth-btn-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px
}

.auth-btn-spinner {
  width: 16px;
  height: 16px;
  border-width: 2px;
  margin: 0
}

.auth-link-row {
  margin-top: 22px;
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap
}

.auth-link-row a {
  color: var(--primary);
  font-weight: 800;
  text-decoration: none;
  transition: color var(--transition)
}

.auth-link-row a:hover {
  color: var(--primary-dark)
}

.security-verification {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: linear-gradient(135deg, #f0f0ff 0%, #ede9fe 52%, #e0e7ff 100%)
}

.security-verification-box {
  width: min(420px, 100%);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(99, 102, 241, .12);
  padding: 30px;
  text-align: center;
  animation: authCardEnter .45s cubic-bezier(.34, 1.56, .64, 1)
}

.security-verification-mark {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  margin: 0 auto 16px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center
}

.security-verification-mark svg {
  width: 26px;
  height: 26px
}

.security-verification-box h2 {
  font-size: 22px;
  font-weight: 900;
  margin: 0 0 8px;
  color: var(--text-primary);
  letter-spacing: 0
}

.security-verification-box p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0
}

/* Signup steps */
.signup-step-ind {
  min-height: 38px;
  border-radius: 10px;
  border: 1.5px solid rgba(255, 255, 255, .24);
  background: rgba(255, 255, 255, .08);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, .72);
  transition: all .3s ease
}

.signup-step-ind .step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .16);
  color: white;
  flex: 0 0 auto
}

.signup-step-ind--active {
  border-color: var(--primary);
  background: var(--primary);
  color: white
}

/* ═══════════════════════════════════════
   FORM ELEMENTS
═══════════════════════════════════════ */
.fly-label {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary)
}

.form-group {
  margin-bottom: 16px
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary)
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px
}

.input-wrapper {
  position: relative
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 2px;
  display: flex;
  align-items: center;
  transition: color var(--transition)
}

.password-toggle:hover {
  color: var(--primary)
}

.fly-input {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  font-size: 13px;
  color: var(--text-primary);
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  font-family: inherit;
  box-sizing: border-box
}

.fly-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light)
}

.fly-input:hover:not(:focus) {
  border-color: #cbd5e1
}

.fly-input::placeholder {
  color: var(--text-muted);
  font-size: 12px
}

select.fly-input {
  cursor: pointer
}

textarea.fly-input {
  height: auto;
  padding: 8px 12px;
  resize: vertical;
  line-height: 1.5
}

/* Filter bar */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-bg);
  flex-wrap: wrap
}

.filter-bar-labeled {
  align-items: flex-end
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 0 1 160px
}

.filter-field-wide {
  flex: 1 1 220px
}

.filter-field label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .06em
}

.filter-field .fly-input,
.filter-field .filter-select,
.filter-field .search-input {
  width: 100%;
  min-width: 0
}

.search-input {
  height: 36px;
  flex: 1;
  min-width: 160px;
  padding: 0 12px 0 34px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  outline: none;
  font-family: inherit;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%2394a3b8' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") no-repeat 10px center, #fff;
  transition: border-color var(--transition), box-shadow var(--transition)
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light)
}

.filter-select {
  height: 36px;
  padding: 0 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  outline: none;
  font-family: inherit;
  background: #fff;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
  min-width: 120px
}

.filter-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light)
}

input[type="date"].filter-select,
input[type="date"].fly-input {
  min-width: 0;
  max-width: 180px;
  cursor: text
}

/* ═══════════════════════════════════════
   BUTTONS
═══════════════════════════════════════ */
.fly-btn {
  position: relative;
  overflow: hidden;
  height: 36px;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
  box-shadow: 0 4px 14px var(--primary-glow);
  white-space: nowrap;
  user-select: none;
  flex-shrink: 0
}

.fly-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .12) 0%, transparent 100%);
  pointer-events: none
}

.fly-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(99, 102, 241, .35)
}

.fly-btn:active {
  transform: translateY(0) scale(.98);
  box-shadow: none
}

.fly-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none
}

.fly-btn-sm {
  height: 30px;
  padding: 0 12px;
  font-size: 11px;
  gap: 5px;
  border-radius: 6px
}

.fly-btn-secondary,
.fly-btn.secondary {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  box-shadow: none
}

.fly-btn-secondary:hover,
.fly-btn.secondary:hover {
  background: var(--primary-light);
  box-shadow: none;
  transform: translateY(-1px)
}

.fly-btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 2px 10px rgba(239, 68, 68, .2)
}

.fly-btn-danger:hover {
  box-shadow: 0 6px 18px rgba(239, 68, 68, .35)
}

.fly-btn .ripple-el {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .3);
  width: 60px;
  height: 60px;
  margin-left: -30px;
  margin-top: -30px;
  animation: ripple .55s ease-out forwards;
  pointer-events: none
}

/* ═══════════════════════════════════════
   LAYOUT
═══════════════════════════════════════ */
.dashboard-layout {
  display: flex;
  min-height: 100vh
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 200px;
  min-width: 200px;
  max-width: 200px;
  height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  z-index: 100;
  contain: layout style;
  transition: transform .25s cubic-bezier(.4, 0, .2, 1), box-shadow .25s ease
}

.sidebar-logo {
  padding: 18px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  flex-shrink: 0
}

.sidebar-logo-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #735DFF, #5A3DE8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(99, 102, 241, .4)
}

.sidebar-logo h1 {
  color: white;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.03em
}

.sidebar-logo p {
  color: rgba(255, 255, 255, .35);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .18em;
  margin-top: 1px
}

.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  overflow-y: auto;
  min-height: 0
}

.sidebar-nav::-webkit-scrollbar {
  width: 4px
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .2);
  border-radius: 10px
}

.sidebar-group {
  margin-bottom: 4px
}

.sidebar-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, .3);
  text-transform: uppercase;
  letter-spacing: .12em;
  cursor: pointer;
  border-radius: var(--radius-xs);
  transition: color var(--transition), background var(--transition)
}

.sidebar-group-header:hover {
  color: rgba(255, 255, 255, .7);
  background: rgba(255, 255, 255, .03)
}

.sidebar-group-header .group-toggle {
  display: flex;
  align-items: center;
  transition: transform .2s ease
}

.sidebar-group.collapsed .group-toggle {
  transform: rotate(-90deg)
}

.sidebar-group-items {
  overflow: hidden;
  max-height: 1200px;
  opacity: 1;
  transition: max-height .3s cubic-bezier(.4, 0, .2, 1), opacity .25s ease
}

.sidebar-group.collapsed .sidebar-group-items {
  max-height: 0;
  opacity: 0
}

.sidebar-nav-item {
  position: relative;
  overflow: hidden;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, .55);
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
  text-align: left;
  font-family: inherit;
  margin-bottom: 1px
}

.sidebar-nav-item svg {
  flex-shrink: 0;
  transition: opacity var(--transition);
  opacity: .6
}

.sidebar-nav-item:hover {
  color: rgba(255, 255, 255, .9);
  background: var(--sidebar-hover);
  box-shadow: inset 3px 0 0 rgba(115, 93, 255, .5)
}

.sidebar-nav-item:hover svg {
  opacity: 1
}

.sidebar-nav-item.active {
  color: white;
  background: var(--sidebar-active);
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(99, 102, 241, .3)
}

.sidebar-nav-item.active svg {
  opacity: 1
}

.sidebar-nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 25%;
  bottom: 25%;
  width: 3px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
  opacity: 0;
  transition: top .2s, bottom .2s, opacity .2s
}

.sidebar-nav-item.active::before {
  top: 0;
  bottom: 0;
  opacity: 1;
  background: rgba(255, 255, 255, .8)
}

.sidebar-user {
  padding: 12px 10px;
  border-top: 1px solid rgba(255, 255, 255, .07);
  flex-shrink: 0;
  margin-top: auto
}

.sidebar-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  margin-bottom: 4px
}

.sidebar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(115, 93, 255, .5), rgba(90, 61, 232, .5));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  border: 1.5px solid rgba(115, 93, 255, .4)
}

.sidebar-user-name {
  color: white;
  font-size: 13px;
  font-weight: 600
}

.sidebar-user-role {
  color: rgba(255, 255, 255, .35);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .1em
}

.sidebar-logout {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, .45);
  font-size: 12px;
  font-family: inherit;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition)
}

.sidebar-logout:hover {
  color: #f87171;
  background: rgba(239, 68, 68, .1)
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  z-index: 99
}

.main-content {
  margin-left: 200px;
  width: calc(100% - 200px);
  max-width: calc(100% - 200px);
  min-height: 100vh;
  display: flex;
  flex-direction: column
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 56px !important;
  min-height: 56px !important;
  padding: 0 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: linear-gradient(180deg, #2c3137 0%, #1c2026 100%) !important;
  border-bottom: 1px solid #15191d !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35) !important;
}

.top-bar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.top-bar-brand-name {
  font-size: 17px !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  letter-spacing: 0.04em !important;
  background: none !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.top-bar-username-text {
  color: #f8fafc !important;
}

.top-bar-profile-silhouette {
  fill: #cbd5e1 !important;
}

.dropdown-arrow-icon {
  stroke: #94a3b8 !important;
}

.top-bar-user:hover {
  background: rgba(255, 255, 255, 0.08) !important;
}

.mobile-menu-btn svg {
  stroke: #ffffff !important;
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ── Topbar Utility Action Buttons (1:1 IMS SMS Benchmark) ── */
.top-bar-utility-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-bar-action-btn {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  max-width: 34px !important;
  max-height: 34px !important;
  border-radius: 7px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  padding: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  user-select: none;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
  stroke: #ffffff !important;
  box-shadow: none !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

.top-bar-action-btn:hover {
  background: rgba(255, 255, 255, 0.16) !important;
  border-color: rgba(255, 255, 255, 0.28) !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.top-bar-action-btn:active {
  transform: translateY(0);
}

.top-bar-action-btn svg {
  width: 15px !important;
  height: 15px !important;
  display: block;
  stroke: currentColor;
  fill: none;
  transition: transform 0.2s ease;
}

html.dark .top-bar-action-btn:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

/* ── Specific Topbar Language & Bonus Buttons (matching user screenshot) ── */
.top-bar-lang-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.top-bar-lang-btn {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  border-radius: 6px !important;
  background: transparent !important;
  border: none !important;
  color: #e2e8f0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  position: relative !important;
  padding: 0 !important;
  transition: all 0.15s ease !important;
}

.top-bar-lang-btn:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

.top-bar-lang-btn svg {
  width: 18px !important;
  height: 18px !important;
  stroke-width: 1.9 !important;
}

.top-bar-bonus-btn {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.22) !important;
  color: #cbd5e1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  padding: 0 !important;
  transition: all 0.2s ease !important;
}

.top-bar-bonus-btn:hover {
  border-color: rgba(255, 255, 255, 0.45) !important;
  background: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
  transform: translateY(-1px);
}

.top-bar-bonus-btn svg {
  width: 16px !important;
  height: 16px !important;
}

/* Floating Language Selection Dropdown Menu (matching Image 2) */
.stx-lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 165px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.06);
  padding: 6px 0;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  display: flex;
  flex-direction: column;
}

.stx-lang-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ====================================================================
   Auth Screen Top Actions Bar & Language Switcher
   ==================================================================== */
.auth-top-actions-bar {
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-top-actions-bar .top-bar-lang-wrapper {
  position: relative;
}

.auth-top-actions-bar .top-bar-lang-btn {
  color: #ffffff !important;
  border: 1.5px solid rgba(255, 255, 255, 0.28) !important;
  border-radius: 10px !important;
  width: 40px !important;
  height: 40px !important;
  background: rgba(255, 255, 255, 0.1) !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.auth-top-actions-bar .top-bar-lang-btn:hover,
.auth-top-actions-bar .top-bar-lang-btn:active {
  background: rgba(255, 255, 255, 0.22) !important;
  border-color: rgba(255, 255, 255, 0.55) !important;
  transform: translateY(-1px);
}

.auth-top-actions-bar .stx-lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 10000;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.38);
}

.stx-lang-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 14px;
  background: none;
  border: none;
  font-size: 13.5px;
  font-weight: 500;
  color: #1e293b;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s ease;
  user-select: none;
  box-sizing: border-box;
}

.stx-lang-item:hover {
  background: #f1f5f9;
}

.stx-lang-item.active {
  color: #0f172a;
  font-weight: 600;
}

.stx-lang-flag {
  width: 20px;
  height: 15px;
  margin-right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
}

[dir="rtl"] .stx-lang-flag {
  margin-right: 0;
  margin-left: 10px;
}

.stx-flag-icon {
  width: 20px;
  height: 15px;
  border-radius: 2.5px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08);
  display: block;
  overflow: hidden;
  flex-shrink: 0;
}

.stx-lang-name {
  flex: 1;
  color: inherit;
  white-space: nowrap;
}

.stx-lang-check {
  width: 14px;
  height: 14px;
  stroke: #2563eb;
  margin-left: 10px;
  flex-shrink: 0;
}

.stx-lang-check-spacer {
  width: 14px;
  height: 14px;
  margin-left: 10px;
  flex-shrink: 0;
}

/* ── Profile User Button ── */
.top-bar-user {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  position: relative;
  transition: background 0.15s ease;
  user-select: none;
}

.top-bar-user:hover {
  background: rgba(255, 255, 255, 0.08) !important;
}

.top-bar-username-text {
  font-size: 12.5px !important;
  font-weight: 500 !important;
  color: #b0b0b0 !important;
  margin-right: 6px !important;
  letter-spacing: 0.01em;
}

.top-bar-profile-silhouette {
  width: 14px;
  height: 14px;
  fill: #ffffff;
  display: inline-block;
  vertical-align: middle;
}

.dropdown-arrow-icon {
  margin-left: 4px;
  color: #a3a3a3;
  transition: transform 0.2s ease-in-out;
}

.top-bar-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.top-bar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary)
}

.top-bar-logout {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 12px;
  font-family: inherit;
  font-weight: 600;
  transition: color var(--transition), border-color var(--transition), background var(--transition)
}

.top-bar-logout:hover {
  color: var(--danger);
  border-color: var(--danger);
  background: rgba(239, 68, 68, .05)
}

.mobile-menu-btn {
  display: none;
  width: 34px;
  height: 32px;
  background: linear-gradient(180deg, #ffffff 0%, #f1f3f5 40%, #e9ecef 100%) !important;
  border: 1px solid #ced4da !important;
  border-radius: 6px !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  margin-right: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), inset 0 1px 0 #ffffff !important;
  color: #6c757d !important;
  flex-shrink: 0;
}

.mobile-menu-btn:hover {
  background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 40%, #dee2e6 100%) !important;
}

.mobile-menu-btn svg {
  stroke: #6c757d !important;
}

.page-content {
  flex: 1;
  padding: 12px 16px 24px;
}

/* ═══════════════════════════════════════
   CARDS
═══════════════════════════════════════ */
/* ═══════════════════════════════════════
   CARDS
═══════════════════════════════════════ */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: box-shadow var(--transition), border-color var(--transition);
  animation: cardIn .28s cubic-bezier(.25, .46, .45, .94) both
}

.card:hover {
  box-shadow: var(--card-shadow-hover);
  border-color: #cbd5e1
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 8px;
  background: rgba(255, 255, 255, 0.6)
}

.card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em
}

.card-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap
}

.card-body {
  padding: 20px 20px
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 20px
}

.stat-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--card-shadow);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  animation: cardIn .3s cubic-bezier(.25, .46, .45, .94) both;
  overflow: hidden
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
  opacity: 0;
  transition: opacity var(--transition)
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-hover);
  border-color: #cbd5e1
}

.stat-card:hover::before {
  opacity: 1
}

.stat-card-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 8px
}

.stat-card-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -.03em;
  line-height: 1.1;
  animation: fadeInUp .4s ease both
}

.payout-summary-grid,
.payout-request-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  padding: 16px 20px
}

/* ═══════════════════════════════════════
   TABLES
═══════════════════════════════════════ */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 0 0 var(--radius) var(--radius)
}

.fly-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px
}

.fly-table thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .06em;
  background: rgba(248, 250, 252, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2
}

.fly-table tbody tr {
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition), transform var(--transition);
  animation: rowIn .22s ease both
}

.fly-table tbody tr:nth-child(1) {
  animation-delay: .03s
}

.fly-table tbody tr:nth-child(2) {
  animation-delay: .06s
}

.fly-table tbody tr:nth-child(3) {
  animation-delay: .09s
}

.fly-table tbody tr:nth-child(4) {
  animation-delay: .12s
}

.fly-table tbody tr:nth-child(5) {
  animation-delay: .15s
}

.fly-table tbody tr:hover {
  background: rgba(99, 102, 241, 0.03)
}

.fly-table td {
  padding: 12px 16px;
  color: var(--text-primary);
  vertical-align: middle;
  white-space: nowrap;
}

.fly-table td code {
  font-size: 12px;
  background: #f1f5f9;
  color: var(--primary-dark);
  padding: 3px 8px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  white-space: nowrap;
  border: 1px solid var(--border-subtle)
}

.fly-table-compact th,
.fly-table-compact td {
  padding: 8px 12px;
  font-size: 12px
}

.empty-row td {
  text-align: center;
  padding: 40px 24px;
  color: var(--text-muted);
  font-size: 13px;
  animation: fadeInUp .3s ease both
}

.message-text {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.otp-code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-weight: 700;
  color: var(--danger);
  background: rgba(239, 68, 68, 0.08);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(239, 68, 68, 0.2);
  letter-spacing: 0.04em
}

.actions-cell {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

html:not(.dark) .action-btn {
  background: #fff;
  border-color: #cbd5e1;
  color: #0f172a;
}

html:not(.dark) .action-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
}

html:not(.dark) .action-btn.delete:hover {
  background: rgba(239, 68, 68, .08);
  border-color: var(--danger);
  color: var(--danger);
}

/* ═══════════════════════════════════════
   BADGES
═══════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  animation: badgePop .22s cubic-bezier(.34, 1.56, .64, 1) both
}

.badge-primary {
  background: rgba(99, 102, 241, .12);
  color: #4f46e5
}

.badge-success {
  background: rgba(16, 185, 129, .12);
  color: #059669
}

.badge-danger {
  background: rgba(239, 68, 68, .12);
  color: #dc2626
}

.badge-warning {
  background: rgba(245, 158, 11, .12);
  color: #d97706
}

.badge-secondary {
  background: #f1f5f9;
  color: #64748b
}

.badge-info {
  background: rgba(59, 130, 246, .12);
  color: #2563eb
}

/* ═══════════════════════════════════════
   PAGINATION
═══════════════════════════════════════ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 8px
}

.pagination-info {
  font-size: 12px;
  color: var(--text-secondary)
}

.pagination-buttons {
  display: flex;
  gap: 3px;
  flex-wrap: wrap
}

.pagination-btn {
  height: 30px;
  min-width: 30px;
  padding: 0 8px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all .15s ease;
  color: var(--text-primary)
}

.pagination-btn:hover {
  background: #f8fafc;
  border-color: var(--primary);
  color: var(--primary)
}

.pagination-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary)
}

.pagination-btn:disabled {
  opacity: .4;
  cursor: not-allowed
}

/* ═══════════════════════════════════════
   SPINNER / LOADING
═══════════════════════════════════════ */
.spinner {
  width: 24px;
  height: 24px;
  border: 2.5px solid var(--primary-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0
}

.spinner-inline {
  width: 14px;
  height: 14px;
  border-width: 2px
}

.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px
}

.skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: 6px
}

/* ═══════════════════════════════════════
   MODAL
═══════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn .18s ease
}

.modal {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 25px 60px rgba(0, 0, 0, .18);
  width: 100%;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  animation: scaleIn .22s cubic-bezier(.34, 1.2, .64, 1) both
}

.modal.small {
  max-width: 400px
}

.modal.medium {
  max-width: 520px
}

.modal.large {
  max-width: 800px
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1
}

.modal-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary)
}

.modal-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: 6px;
  transition: background var(--transition), color var(--transition)
}

.modal-close:hover {
  background: #f1f5f9;
  color: var(--text-primary)
}

.modal-body {
  padding: 20px
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap
}

.modal-footer .fly-btn {
  flex: 0 0 auto
}

/* ═══════════════════════════════════════
   TOAST
═══════════════════════════════════════ */
.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 360px
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
  animation: toastSlide .3s cubic-bezier(.34, 1.2, .64, 1) both;
  transition: opacity .3s ease, transform .3s ease;
  background: #fff;
  border: 1px solid var(--border)
}

.toast-icon {
  flex-shrink: 0;
  margin-top: 1px
}

.toast-success {
  border-left: 3px solid var(--success)
}

.toast-error {
  border-left: 3px solid var(--danger)
}

.toast-info {
  border-left: 3px solid var(--info)
}

.toast-warning {
  border-left: 3px solid var(--warning)
}

/* ═══════════════════════════════════════
   EMPTY STATE
═══════════════════════════════════════ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  animation: fadeInUp .3s ease both
}

.empty-state h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px
}

.empty-state p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  max-width: 320px
}

/* ═══════════════════════════════════════
   PAY METHOD CARDS
═══════════════════════════════════════ */
.pay-method-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 108px;
  padding: 16px 12px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  text-align: center;
  background: #fff;
  gap: 4px
}

.pay-method-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, .15);
  border-color: #c7d2fe
}

.pay-method-card--active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
  animation: badgePop .2s ease
}

.proof-dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 148px;
  width: 100%;
  padding: 20px 14px;
  border: 1.5px dashed #c7d2fe;
  border-radius: var(--radius-sm);
  background: rgba(99, 102, 241, .04);
  color: var(--primary);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition)
}

.proof-dropzone:hover,
.proof-dropzone--drag {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .08)
}

.proof-dropzone svg {
  margin: 0 auto
}

.proof-dropzone img {
  max-width: 100%;
  height: auto
}

/* ═══════════════════════════════════════
   PROFILE
═══════════════════════════════════════ */
.profile-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  align-items: start
}

.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 28px;
  font-weight: 800;
  border: 3px solid var(--primary-light)
}

.profile-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary)
}

.profile-role {
  font-size: 12px;
  color: var(--text-secondary)
}

.profile-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px
}

.profile-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border)
}

/* ═══════════════════════════════════════
   PAGE TRANSITIONS & LIVE EFFECTS
═══════════════════════════════════════ */
.page-content>* {
  animation: cardIn .28s cubic-bezier(.25, .46, .45, .94) both
}

.page-content>*:nth-child(2) {
  animation-delay: .05s
}

.page-content>*:nth-child(3) {
  animation-delay: .1s
}

.page-content>*:nth-child(4) {
  animation-delay: .14s
}

/* Fly-in for dashboard stats */
.stats-grid .stat-card:nth-child(1) {
  animation-delay: .04s
}

.stats-grid .stat-card:nth-child(2) {
  animation-delay: .08s
}

.stats-grid .stat-card:nth-child(3) {
  animation-delay: .12s
}

.stats-grid .stat-card:nth-child(4) {
  animation-delay: .16s
}

.stats-grid .stat-card:nth-child(5) {
  animation-delay: .2s
}

.stats-grid .stat-card:nth-child(6) {
  animation-delay: .24s
}

/* Input focus glow */
.fly-input:focus {
  animation: borderGlow 2s ease-in-out infinite
}

/* Input focus glow */
.fly-input:focus {
  animation: borderGlow 2s ease-in-out infinite
}

/* ═══════════════════════════════════════
   RESPONSIVE (MOBILE & DESKTOP LAYOUT)
═══════════════════════════════════════ */
@media (min-width: 769px) {
  .mobile-menu-btn {
    display: none !important;
  }

  .sidebar, aside.sidebar, #sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 200px !important;
    min-width: 200px !important;
    max-width: 200px !important;
    height: 100vh !important;
    height: 100dvh !important;
    transform: none !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: 100 !important;
    box-shadow: 4px 0 24px rgba(0, 0, 0, .18) !important;
  }

  .sidebar-overlay {
    display: none !important;
  }

  .main-content {
    margin-left: 200px !important;
    width: calc(100% - 200px) !important;
    max-width: calc(100% - 200px) !important;
  }

  .top-bar {
    padding-left: 24px !important;
  }
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: flex !important;
    position: static !important;
    width: 32px !important;
    height: 30px !important;
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    border-radius: 4px !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin-right: 6px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
    color: #475569 !important;
    flex-shrink: 0 !important;
  }

  .sidebar, aside.sidebar, #sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 270px !important;
    max-width: 80vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    transform: translateX(-100%) !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    box-shadow: none !important;
    z-index: 9999 !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overscroll-behavior: contain;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, visibility 0.28s !important;
  }

  .sidebar.open, aside.sidebar.open, #sidebar.open {
    transform: translateX(0) !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    box-shadow: 16px 0 50px rgba(0, 0, 0, 0.6) !important;
  }

  body.sidebar-open {
    overflow: hidden !important;
    touch-action: none;
  }

  .sidebar-overlay {
    display: none;
  }

  .sidebar-overlay.open {
    display: block !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.6) !important;
    z-index: 9998 !important;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    touch-action: none;
  }

  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .top-bar {
    padding-left: 12px !important;
    padding-right: 12px !important;
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
  }

  .top-bar-user {
    padding: 4px 8px !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
  }

  .top-bar-username-text {
    max-width: 90px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 12px !important;
    display: inline-block !important;
  }

  .top-bar-actions {
    gap: 6px !important;
    flex-shrink: 0 !important;
  }

  .top-bar-utility-actions {
    gap: 6px !important;
  }

  .top-bar-action-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
  }

  .page-content {
    padding: 16px 14px;
  }

  .profile-layout {
    grid-template-columns: 1fr;
  }

  .filter-bar>* {
    flex: 1 1 160px;
  }
}

@media (max-width:768px) {

  /* Large touch targets & readable fonts to prevent iOS zoom */
  .fly-input,
  select.fly-input,
  textarea.fly-input,
  .search-input,
  .filter-select {
    font-size: 16px !important;
    height: 44px;
    border-radius: var(--radius-sm);
  }

  .fly-btn {
    min-height: 44px;
    padding: 0 18px;
    font-size: 14px;
    border-radius: var(--radius-sm);
  }

  .fly-btn-sm {
    min-height: 36px;
    padding: 0 14px;
    font-size: 12px;
  }

  .action-btn {
    min-height: 36px;
    padding: 6px 12px;
    font-size: 12px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px
  }

  .stat-card {
    padding: 16px;
    border-radius: var(--radius-sm)
  }

  .stat-card-value {
    font-size: 22px
  }

  .card {
    border-radius: var(--radius-sm)
  }

  .card-header {
    padding: 14px 16px;
    flex-wrap: wrap
  }

  .card-body {
    padding: 16px 14px
  }

  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch
  }

  .fly-table {
    min-width: 640px
  }

  .fly-table th,
  .fly-table td {
    padding: 12px 14px;
    font-size: 13px;
    white-space: nowrap
  }

  .modal {
    max-width: calc(100vw - 20px) !important;
    max-height: calc(100vh - 20px)
  }

  .modal-body {
    padding: 16px
  }

  .modal-footer {
    flex-wrap: wrap;
    gap: 10px
  }

  .modal-footer .fly-btn {
    flex: 1 1 100%;
    min-height: 46px
  }

  .form-row {
    grid-template-columns: 1fr
  }

  .page-content {
    padding: 12px 10px
  }

  .profile-info-grid {
    grid-template-columns: 1fr
  }

  .top-bar-user-name {
    display: none
  }

  input[type="date"].filter-select,
  input[type="date"].fly-input {
    max-width: 100%
  }
}

@media (max-width:600px) {

  /* Native Mobile Bottom Sheet Modals */
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
    background: rgba(15, 23, 42, 0.6)
  }

  .modal {
    border-radius: 20px 20px 0 0 !important;
    max-width: 100% !important;
    max-height: 90vh;
    animation: scaleIn .25s ease both;
    position: relative
  }

  .modal::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    background: #cbd5e1;
    border-radius: 4px;
    z-index: 10
  }

  .modal-header {
    padding-top: 20px
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 12px
  }

  .filter-field,
  .search-input,
  .filter-select {
    flex: unset;
    width: 100%;
    max-width: 100%
  }

  .top-bar-logout span {
    display: none
  }

  .top-bar-logout {
    padding: 8px 10px;
    min-height: 40px
  }
}

@media (max-width:480px) {
  .stats-grid {
    grid-template-columns: 1fr
  }

  .auth-form {
    padding: 1.5rem 1rem
  }

  .page-content {
    padding: 10px 8px
  }

  .stat-card {
    padding: 14px
  }

  .stat-card-value {
    font-size: 24px
  }
}

@media (min-width:1440px) {
  .page-content {
    padding: 28px 40px
  }

  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr))
  }
}

/* ═══════════════════════════════════════
   PERFORMANCE
═══════════════════════════════════════ */
.sidebar {
  will-change: transform
}

.fly-table tbody {
  will-change: auto
}

.card,
.stat-card,
.modal,
.toast {
  backface-visibility: hidden
}

@media (prefers-reduced-motion:reduce) {

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important
  }
}

/* ═══════════════════════════════════════
   MISC UTILITIES
═══════════════════════════════════════ */
.pg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px
}

/* SMPP / security specific */
.smpp-stat {
  background: rgba(99, 102, 241, .06);
  border: 1px solid rgba(99, 102, 241, .15);
  border-radius: 8px;
  padding: 12px 16px
}

/* Avatar upload */
.avatar-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1.5px dashed var(--border);
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  transition: all var(--transition)
}

.avatar-upload-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light)
}

/* ═══ DASHBOARD ICONS & SERVICE CHIPS ═══ */
.stat-icon {
  opacity: .15;
  flex-shrink: 0;
}

.stat-card-change {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.service-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 18px;
  min-height: 80px;
  align-content: flex-start;
}

.service-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.service-chip-count {
  background: var(--primary);
  color: white;
  border-radius: 10px;
  padding: 1px 6px;
  font-size: 10px;
}

/* ═══ LARGE DATA / VIRTUAL TABLE ═══ */
.table-wrapper {
  max-height: 600px;
  overflow-y: auto;
}

.fly-table tbody tr {
  contain: layout style;
}

/* ═══ ALLOCATION PROGRESS BAR ═══ */
.alloc-progress-wrap {
  padding: 12px 18px;
  background: rgba(99, 102, 241, .05);
  border-bottom: 1px solid var(--border);
}

.alloc-progress-bar {
  height: 6px;
  background: #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  margin-top: 6px;
}

.alloc-progress-fill {
  height: 100%;
  border-radius: 10px;
  transition: width .5s ease;
  background: var(--primary);
}

.alloc-progress-fill.danger {
  background: var(--danger);
}

/* ═══ PAYOUT STAT HIGHLIGHT ═══ */
.payout-total-badge {
  font-size: 15px;
  font-weight: 800;
  color: var(--success);
}

/* ═══ ANIMATIONS FOR DYNAMIC CONTENT ═══ */
@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stat-card-value {
  animation: countUp .4s ease both;
}

/* ═══ MOBILE TABLE SCROLL HINT ═══ */
@media (max-width: 768px) {
  .table-wrapper::after {
    content: '← scroll →';
    display: block;
    text-align: center;
    font-size: 10px;
    color: var(--text-muted);
    padding: 4px;
  }

  .table-wrapper {
    max-height: 400px;
  }
}

/* ═══════════════════════════════════════
   SUCCESS POPUP WITH ANIMATED TICK
═══════════════════════════════════════ */
@keyframes successOverlayIn {
  from {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

@keyframes successModalIn {
  from {
    opacity: 0;
    transform: scale(.7) translateY(30px)
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0)
  }
}

@keyframes circleIn {
  from {
    stroke-dashoffset: 157
  }

  to {
    stroke-dashoffset: 0
  }
}

@keyframes tickIn {
  from {
    stroke-dashoffset: 50
  }

  to {
    stroke-dashoffset: 0
  }
}

@keyframes titleIn {
  from {
    opacity: 0;
    transform: translateY(10px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

.success-overlay {
  animation: successOverlayIn .2s ease both;
}

.success-modal {
  background: #fff;
  border-radius: 20px;
  padding: 40px 32px 32px;
  max-width: 380px;
  width: calc(100vw - 32px);
  text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .18);
  animation: successModalIn .4s cubic-bezier(.34, 1.56, .64, 1) both;
}

.success-icon-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.success-circle {
  width: 80px;
  height: 80px;
}

.success-circle-bg {
  stroke: #e2e8f0;
  stroke-width: 2;
}

.success-circle-fill {
  stroke: #10b981;
  stroke-width: 2.5;
  stroke-dasharray: 157;
  stroke-dashoffset: 157;
  stroke-linecap: round;
  transform-origin: center;
  transform: rotate(-90deg);
  animation: circleIn .6s cubic-bezier(.4, 0, .2, 1) .1s forwards;
}

.success-tick {
  stroke: #10b981;
  stroke-width: 2.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: tickIn .35s ease .55s forwards;
}

.success-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
  animation: titleIn .3s ease .6s both;
}

.success-msg {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  animation: titleIn .3s ease .65s both;
  line-height: 1.6;
}

.success-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  animation: titleIn .3s ease .7s both;
}

.success-dl-btn {
  gap: 7px;
  flex: 1 1 auto;
  min-width: 100px;
}

.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

.table-wrapper::-webkit-scrollbar {
  height: 6px;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.3);
  border-radius: 10px;
}

.table-wrapper::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.02);
}

/* RESPONSIVE REPAIR LAYER - 2026-06
   Keeps the existing SIGMAPANEL scheme while fixing overflow and scaling. */
html,
body,
#app {
  width: 100%;
  max-width: 100%;
  min-height: 100%;
}

body {
  overflow-x: hidden;
}

img,
svg,
canvas,
video,
iframe {
  max-width: 100%;
}

button,
input,
select,
textarea,
.card,
.stat-card,
.modal,
.table-wrapper,
.dashboard-layout,
.main-content,
.page-content,
.top-bar,
.filter-bar,
.card-header,
.modal-body,
.form-row,
.stats-grid {
  min-width: 0;
}

.dashboard-layout {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

.main-content {
  flex: 1 1 auto;
  width: calc(100% - 200px);
  max-width: calc(100% - 200px);
  min-width: 0;
  overflow-x: hidden;
}

.page-content {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

.top-bar {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.top-bar-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-bar-actions {
  min-width: 0;
  flex-shrink: 0;
}

.card,
.stat-card,
.profile-card,
.pay-method-card,
.smpp-stat {
  max-width: 100%;
  border-radius: 8px;
}

.card-header,
.card-header-actions,
.filter-bar,
.modal-footer,
.success-actions,
.actions-cell {
  min-width: 0;
}

.card-header>*,
.filter-bar>*,
.modal-footer>* {
  min-width: 0;
}

.card-header .input-wrapper,
.card-header-actions .input-wrapper,
.filter-bar .input-wrapper,
.input-wrapper[style*="width"] {
  width: min(240px, 100%) !important;
  max-width: 100% !important;
}

.fly-input,
.search-input,
.filter-select,
.fly-btn,
.action-btn {
  max-width: 100%;
}

.fly-input,
.search-input,
.filter-select {
  min-height: 38px;
}

textarea.fly-input {
  min-height: 88px;
}

.fly-btn {
  min-height: 36px;
  max-width: 100%;
}

.action-btn {
  min-height: 30px;
}

.stats-grid,
.payout-summary-grid,
.payout-request-grid,
.pg-grid,
.filter-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
}

.stat-card-value {
  overflow-wrap: anywhere;
  line-height: 1.15;
}

.profile-layout {
  min-width: 0;
}

.profile-info-grid {
  min-width: 0;
}

.table-wrapper {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: auto;
  max-height: min(70vh, 640px);
  overscroll-behavior: contain;
}

.fly-table {
  width: 100%;
  min-width: 760px;
  table-layout: auto;
}

.fly-table th,
.fly-table td {
  max-width: 280px;
}

.fly-table td,
.fly-table th,
.message-text,
.sidebar-nav-item,
.sidebar-user-name,
.top-bar-user-name,
.badge,
code {
  overflow-wrap: normal;
}

.fly-table td code {
  white-space: nowrap !important;
  word-break: keep-all !important;
}

.message-text {
  max-width: min(360px, 38vw);
}

.actions-cell {
  max-width: none;
  width: max-content;
}

.badge {
  max-width: 100%;
}

.modal-overlay {
  padding: 16px;
  overflow: hidden;
}

.modal {
  display: flex;
  flex-direction: column;
  width: min(100%, 560px);
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 32px);
  overflow: hidden;
}

.modal.small {
  width: min(100%, 400px);
}

.modal.medium {
  width: min(100%, 560px);
}

.modal.large {
  width: min(100%, 960px);
}

.modal-header,
.modal-footer {
  flex: 0 0 auto;
}

.modal-body {
  flex: 1 1 auto;
  overflow: auto;
  max-width: 100%;
}

.modal-body [style*="grid-template-columns"] {
  max-width: 100%;
}

.toast-container {
  width: min(360px, calc(100vw - 24px));
  right: 12px;
}

.toast {
  max-width: 100%;
}

.auth-page {
  width: 100%;
  overflow-x: hidden;
}

.auth-card {
  max-width: min(900px, 100%);
}

@media (max-width: 1200px) {
  .page-content {
    padding: 16px;
  }

  .fly-table {
    min-width: 700px;
  }

  .actions-cell {
    max-width: none;
    width: max-content;
  }
}

@media (min-width: 769px) {
  .main-content {
    margin-left: 200px !important;
    width: calc(100% - 200px) !important;
    max-width: calc(100% - 200px) !important;
  }
}

@media (max-width: 768px) {
  .main-content {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
  }

  .top-bar {
    padding-right: 14px;
  }

  .page-content {
    padding: 14px;
  }
}

@media (max-width: 900px) {
  .auth-page {
    align-items: flex-start;
    padding: 12px;
    min-height: 100dvh;
  }

  .auth-card {
    flex-direction: column;
    max-width: 520px;
    min-height: 0;
    border-radius: 14px;
  }

  .auth-card-login {
    max-width: 520px;
    min-height: 0;
  }

  .auth-cover,
  .auth-cover-signup {
    width: 100% !important;
    min-height: 150px;
    padding: 1.25rem;
  }

  .auth-cover-login {
    min-height: 190px;
    gap: 16px;
  }

  .auth-cover-content-login {
    gap: 14px;
  }


  .auth-cover-content h1 {
    font-size: 22px !important;
  }

  .auth-cover-content p {
    margin-bottom: 16px !important;
  }

  .auth-form,
  .auth-form-signup {
    padding: 1.5rem 1.15rem !important;
    max-height: none;
    overflow: visible;
  }

  .auth-form-login {
    padding: 1.45rem 1.25rem 1.6rem !important;
  }

  .auth-form-inner,
  .auth-signup-inner {
    max-width: 100%;
  }

  .signup-steps {
    flex-direction: row;
    gap: 8px;
  }

  .signup-step-ind {
    flex: 1 1 0;
    min-width: 0;
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .auth-page {
    padding: 0;
    background: #fff;
  }

  .auth-card {
    width: 100%;
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .auth-cover,
  .auth-cover-signup {
    min-height: auto;
    padding: 18px 16px;
  }

  .auth-cover-content>div:first-child {
    font-size: 40px !important;
    margin-bottom: 8px !important;
  }

  .auth-cover-content h1 {
    font-size: 20px !important;
    margin-bottom: 4px !important;
  }

  .auth-cover-content p {
    font-size: 12px !important;
    margin-bottom: 12px !important;
  }

  .auth-form,
  .auth-form-signup {
    padding: 18px 16px 24px !important;
  }

  .auth-form-login {
    padding: 18px 16px 22px !important;
  }

  .auth-brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .auth-brand-block h1,
  .auth-cover-content-login h1 {
    font-size: 22px !important;
  }

  .auth-cover-copy {
    font-size: 13px;
    line-height: 1.5;
  }


  .auth-login-heading h2 {
    font-size: 22px;
  }

  .auth-input {
    padding-left: 46px !important;
    padding-right: 44px !important;
  }

  .auth-input-icon {
    height: 40px;
  }

  .auth-captcha-card {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .auth-captcha-input {
    text-align: left;
  }

  .auth-form-inner h2,
  .auth-signup-inner h2 {
    font-size: 20px !important;
  }

  .auth-form-inner p,
  .auth-signup-inner p {
    margin-bottom: 18px !important;
  }

  .auth-form .form-row {
    grid-template-columns: 1fr !important;
    gap: 0;
  }

  .auth-form .form-group {
    margin-bottom: 13px;
  }

  .auth-form .fly-input {
    height: 40px;
    font-size: 14px;
  }

  .password-toggle {
    right: 10px;
    min-width: 30px;
    min-height: 30px;
    justify-content: center;
  }

  .signup-steps {
    flex-direction: column;
    gap: 7px;
    width: 100%;
  }

  .signup-step-ind {
    min-height: 34px;
    padding: 7px 9px;
    font-size: 11px;
  }

  .pay-method-grid {
    grid-template-columns: 1fr;
  }

  .pay-method-card {
    min-height: 88px;
  }

  .proof-dropzone {
    min-height: 124px;
    padding: 16px 12px;
  }

  #proof-preview img {
    max-width: 100%;
    height: auto;
  }

  .auth-form-actions {
    flex-direction: column;
  }

  .auth-form-actions .fly-btn,
  .auth-form-actions .auth-primary-action {
    width: 100%;
    min-height: 40px;
    flex: 1 1 auto;
  }
}

@media (max-width: 768px) {
  .page-content {
    padding: 10px;
  }

  .top-bar {
    height: 56px;
    gap: 8px;
  }

  .top-bar-actions {
    gap: 8px;
  }

  .card-header {
    align-items: stretch;
  }

  .card-header-actions,
  .card-header>div:last-child {
    width: 100%;
  }

  .filter-bar {
    align-items: stretch;
  }

  .filter-field,
  .filter-field-wide {
    flex: 1 1 100%;
  }

  .form-row,
  .profile-info-grid,
  .modal-body [style*="grid-template-columns:1fr 1fr"],
  .modal-body [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  .stats-grid,
  .payout-summary-grid,
  .payout-request-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .stat-card {
    padding: 12px;
  }

  .stat-card-value {
    font-size: 19px;
  }

  .fly-table {
    min-width: 680px;
  }

  .fly-table th,
  .fly-table td {
    max-width: 220px;
  }

  .message-text {
    max-width: 240px;
  }

  .actions-cell {
    max-width: 240px;
  }

  .modal-overlay {
    padding: 10px;
  }

  .modal {
    max-width: calc(100vw - 20px) !important;
    max-height: calc(100dvh - 20px);
  }
}

@media (max-width: 600px) {
  .mobile-menu-btn {
    top: 10px;
    left: 10px;
  }

  .top-bar {
    padding-left: 52px;
  }

  .top-bar-user {
    display: flex;
    padding: 4px 6px;
  }

  .card-body,
  .modal-body {
    padding: 12px;
  }

  .card-header {
    padding: 10px 12px;
  }

  .filter-bar {
    padding: 10px 12px;
  }

  .fly-btn,
  .fly-btn-sm,
  .action-btn {
    min-width: 0;
  }

  .card-header .fly-btn {
    width: 100%;
  }

  .filter-bar .fly-btn {
    width: auto;
    flex: 0 0 auto;
  }

  .filter-bar .filter-action-btn {
    min-width: 74px;
    align-self: flex-end;
  }

  .stats-grid,
  .payout-summary-grid,
  .payout-request-grid {
    grid-template-columns: 1fr;
  }

  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .modal {
    max-width: 100% !important;
    width: 100%;
    max-height: 92dvh;
    border-radius: 14px 14px 0 0 !important;
  }

  .modal-footer {
    gap: 8px;
  }

  .modal-footer .fly-btn {
    flex: 1 1 100%;
  }

  .success-modal {
    width: 100%;
    max-width: none;
    border-radius: 14px 14px 0 0;
    padding: 28px 18px 22px;
  }
}

@media (max-width: 420px) {
  .page-content {
    padding: 8px;
  }

  .top-bar-title {
    font-size: 14px;
  }

  .card-title {
    font-size: 13px;
  }

  .fly-table {
    min-width: 620px;
  }

  .fly-table th,
  .fly-table td {
    padding: 7px 8px;
  }

  .toast-container {
    left: 8px;
    right: 8px;
    width: auto;
  }
}


/* Professional admin/manager review and import surfaces */
.professional-card {
  background: #fff;
}

.professional-header {
  align-items: flex-start;
}

.professional-subtitle {
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
}

.professional-list {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.review-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.review-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.review-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
}

.review-meta {
  color: var(--text-secondary);
  font-size: 12px;
  margin-top: 2px;
}

.review-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.review-grid>div {
  min-width: 0;
  padding: 10px;
  border: 1px solid #eef2f7;
  border-radius: 8px;
  background: #f8fafc;
}

.review-grid span {
  display: block;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 3px;
}

.review-grid strong {
  display: block;
  min-width: 0;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.professional-note {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid rgba(99, 102, 241, .16);
  border-radius: 8px;
  background: rgba(99, 102, 241, .06);
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
  margin-bottom: 16px;
}

.professional-note strong {
  color: var(--primary-dark);
  font-size: 13px;
}

.professional-note-warning {
  border-color: rgba(245, 158, 11, .25);
  background: rgba(245, 158, 11, .08);
  color: #92400e;
}

.professional-note-warning strong {
  color: #92400e;
}

.field-help {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.4;
}

.upload-panel .card-body {
  padding: 18px;
}

.upload-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.upload-toolbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.upload-textarea {
  min-height: 260px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 12px;
}

.upload-submit-btn {
  width: 100%;
}

@media (max-width: 700px) {

  .review-card-top,
  .upload-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .review-actions,
  .upload-toolbar-actions {
    justify-content: flex-start;
  }

  .review-actions .fly-btn,
  .upload-toolbar-actions .fly-btn {
    width: 100%;
  }
}

/* ── Icon System ─────────────────────────────────────────────── */
.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(255, 255, 255, .07);
  flex-shrink: 0;
  transition: background var(--transition), box-shadow var(--transition);
}

.sidebar-nav-item:hover .nav-icon {
  background: rgba(115, 93, 255, .25);
  box-shadow: 0 0 0 1px rgba(115, 93, 255, .3);
}

.sidebar-nav-item.active .nav-icon {
  background: rgba(255, 255, 255, .15);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}

.sidebar-nav-item.active .nav-icon svg {
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, .35));
}

/* stat-card icon badge */
.stat-card-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.stat-card-icon.purple {
  background: rgba(115, 93, 255, .12);
  color: #735DFF;
}

.stat-card-icon.green {
  background: rgba(16, 185, 129, .12);
  color: #10b981;
}

.stat-card-icon.blue {
  background: rgba(59, 130, 246, .12);
  color: #3b82f6;
}

.stat-card-icon.amber {
  background: rgba(245, 158, 11, .12);
  color: #f59e0b;
}

.stat-card-icon.red {
  background: rgba(239, 68, 68, .12);
  color: #ef4444;
}

.stat-card-icon svg {
  width: 20px;
  height: 20px;
}

/* action-btn icon alignment */
.action-btn svg {
  vertical-align: middle;
  flex-shrink: 0;
}

/* fly-btn icon */
.fly-btn svg {
  flex-shrink: 0;
}

/* responsive icon sizes */
@media (max-width: 768px) {
  .nav-icon {
    width: 26px;
    height: 26px;
    border-radius: 6px;
  }

  .stat-card-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }

  .stat-card-icon svg {
    width: 17px;
    height: 17px;
  }
}

/* ═══════════════════════════════════════
   PROFESSIONAL UI ENHANCEMENTS v2
═══════════════════════════════════════ */

/* ── New keyframes ───────────────────── */
@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(8px) scale(.92)
  }

  to {
    opacity: 1;
    transform: none
  }
}

@keyframes glowPulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, .0)
  }

  50% {
    box-shadow: 0 0 0 6px rgba(99, 102, 241, .12)
  }
}

@keyframes slideLeft {
  from {
    opacity: 0;
    transform: translateX(18px)
  }

  to {
    opacity: 1;
    transform: none
  }
}

@keyframes barFill {
  from {
    width: 0
  }
}

@keyframes floatUp {

  0%,
  100% {
    transform: translateY(0)
  }

  50% {
    transform: translateY(-4px)
  }
}

/* ── Page background mesh ────────────── */
body {
  background: #f0f2f8 url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='g' width='60' height='60' patternUnits='userSpaceOnUse'%3E%3Cpath d='M0 60V0h60' fill='none' stroke='%23e2e8f0' stroke-width='.5'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23g)'/%3E%3C/svg%3E");
}

/* ── Cards — deeper glass ────────────── */
.card {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, .7);
  box-shadow: 0 2px 8px rgba(15, 23, 42, .06), 0 0 0 1px rgba(255, 255, 255, .5) inset;
  transition: box-shadow .25s ease, transform .2s ease;
}

.card:hover {
  box-shadow: 0 8px 30px rgba(15, 23, 42, .1), 0 0 0 1px rgba(255, 255, 255, .6) inset;
}

/* ── Stat cards — gradient accent ───── */
.stat-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, .98) 0%, rgba(248, 250, 255, .95) 100%);
  border: 1px solid rgba(99, 102, 241, .1);
  box-shadow: 0 2px 10px rgba(99, 102, 241, .07), 0 1px 3px rgba(0, 0, 0, .04);
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle at top right, rgba(99, 102, 241, .07), transparent 70%);
  pointer-events: none;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(99, 102, 241, .13);
  animation: glowPulse 2s ease;
}

.stat-card-value {
  animation: countUp .5s cubic-bezier(.34, 1.56, .64, 1) both;
}

.stat-card-label {
  letter-spacing: .1em;
}

/* ── Sidebar — deeper dark + glow ────── */
.sidebar {
  background: linear-gradient(180deg, #0d1424 0%, #0f172a 100%);
  box-shadow: 4px 0 24px rgba(0, 0, 0, .18);
}

.sidebar-logo {
  background: rgba(255, 255, 255, .025);
}

.sidebar-logo-icon {
  box-shadow: 0 4px 16px rgba(115, 93, 255, .5), 0 0 0 1px rgba(115, 93, 255, .3) inset;
  animation: floatUp 4s ease-in-out infinite;
}

.sidebar-group-header {
  font-size: 9px;
  letter-spacing: .18em;
}

.sidebar-nav-item {
  border-radius: 9px;
  transition: color .15s ease, background .15s ease, transform .15s ease;
}

.sidebar-nav-item:hover {
  transform: translateX(2px);
  background: rgba(99, 102, 241, .12);
}

.sidebar-nav-item.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, .85) 0%, rgba(79, 70, 229, .9) 100%);
  box-shadow: 0 4px 16px rgba(99, 102, 241, .35), inset 0 1px 0 rgba(255, 255, 255, .15);
}

.sidebar-nav-item.active::before {
  background: #fff;
}

.sidebar-user-avatar {
  box-shadow: 0 0 0 2px rgba(115, 93, 255, .4);
}

/* ── Top bar — dark charcoal header matching sidebar ───────────────── */
html.dark .top-bar {
  background: linear-gradient(180deg, #151a23 0%, #11151c 100%) !important;
  border-bottom: 1px solid #232a36 !important;
}

/* ── Buttons — deeper shadow ─────────── */
.fly-btn {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 50%, #4338ca 100%);
  box-shadow: 0 4px 14px rgba(99, 102, 241, .3), 0 1px 0 rgba(255, 255, 255, .2) inset;
  letter-spacing: .01em;
}

.fly-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, .4);
}

.fly-btn:active {
  transform: translateY(0) scale(.97);
}

.fly-btn-sm {
  letter-spacing: 0;
}

/* ── Table — zebra + hover glow ─────── */
.fly-table thead th {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  font-size: 10px;
  letter-spacing: .1em;
  border-bottom: 2px solid var(--border);
}

.fly-table tbody tr:hover {
  background: rgba(99, 102, 241, .04);
}

.fly-table tbody tr {
  animation: slideLeft .2s ease both;
}

.fly-table tbody tr:nth-child(even) {
  background: rgba(248, 250, 252, .7);
}

.fly-table tbody tr:nth-child(even):hover {
  background: rgba(99, 102, 241, .04);
}

/* ── Badges — pill with depth ────────── */
.badge {
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: 10px;
}

.badge-success {
  background: rgba(16, 185, 129, .1);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, .2);
}

.badge-danger {
  background: rgba(239, 68, 68, .1);
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, .2);
}

.badge-primary {
  background: rgba(99, 102, 241, .1);
  color: #4338ca;
  border: 1px solid rgba(99, 102, 241, .2);
}

.badge-warning {
  background: rgba(245, 158, 11, .1);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, .2);
}

.badge-info {
  background: rgba(59, 130, 246, .1);
  color: #1d4ed8;
  border: 1px solid rgba(59, 130, 246, .2);
}

.badge-secondary {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
}

/* ── Action buttons (Light Mode) ──────────────────── */
html:not(.dark) .action-btn {
  background: rgba(248, 250, 252, .9);
  border: 1.5px solid rgba(226, 232, 240, .8);
  border-radius: 7px;
  transition: all .15s ease;
}

html:not(.dark) .action-btn:hover {
  background: #fff;
  border-color: #a5b4fc;
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(99, 102, 241, .12);
  transform: translateY(-1px) scale(1.03);
}

/* ── Modal — polished ────────────────── */
.modal-overlay {
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  background: rgba(15, 23, 42, .5);
}

.modal {
  border: 1px solid rgba(255, 255, 255, .6);
  box-shadow: 0 32px 80px rgba(15, 23, 42, .22), 0 0 0 1px rgba(255, 255, 255, .5) inset;
}

.modal-header {
  background: linear-gradient(180deg, #fff 0%, #fafbff 100%);
}

/* ── Inputs — refined focus ──────────── */
.fly-input {
  background: rgba(255, 255, 255, .9);
  border: 1.5px solid rgba(226, 232, 240, .9);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.fly-input:focus {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .12), 0 1px 3px rgba(99, 102, 241, .08);
  animation: none;
}

.fly-input:hover:not(:focus) {
  border-color: #a5b4fc;
  background: #fff;
}

/* ── Toasts — richer ─────────────────── */
.toast {
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 12px 32px rgba(15, 23, 42, .15), 0 0 0 1px rgba(255, 255, 255, .8) inset;
}

/* ── Pagination ──────────────────────── */
.pagination-btn {
  transition: all .15s ease;
  font-weight: 600;
}

.pagination-btn:hover {
  box-shadow: 0 2px 8px rgba(99, 102, 241, .15);
}

.pagination-btn.active {
  box-shadow: 0 4px 12px rgba(99, 102, 241, .3);
}

/* ── Progress bars (rate card) ───────── */
[style*="border-radius:10px;overflow:hidden"]>[style*="height:100%"] {
  animation: barFill .8s cubic-bezier(.4, 0, .2, 1) both;
}

/* ── Card header ─────────────────────── */
.card-header {
  background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(250, 251, 255, .9) 100%);
}

.card-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -.01em;
}

/* ── Bulk action bar ─────────────────── */
#bulk-action-bar {
  background: linear-gradient(135deg, rgba(99, 102, 241, .08) 0%, rgba(79, 70, 229, .05) 100%);
  border-bottom: 1px solid rgba(99, 102, 241, .15);
  animation: slideLeft .2s ease;
}

/* ── Loading shimmer ─────────────────── */
.skeleton {
  border-radius: 8px;
}

/* ── Responsive tweaks ───────────────── */
@media (max-width: 768px) {
  .stat-card::after {
    display: none;
  }

  .fly-table tbody tr {
    animation: none;
  }
}

/* ═══════════════════════════════════════
   ANIMATIONS & MODERN UI v3
═══════════════════════════════════════ */

/* ── Number counter animate ──────────── */
@keyframes numRoll {
  from {
    opacity: 0;
    transform: translateY(12px) scale(.9)
  }

  to {
    opacity: 1;
    transform: none
  }
}

.stat-card-value {
  animation: numRoll .55s cubic-bezier(.34, 1.56, .64, 1) both;
}

/* ── Stat card icon badge ─────────────── */
.stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform .2s ease;
}

.stat-card:hover .stat-icon {
  transform: scale(1.1) rotate(-4deg);
}

.stat-card--sms .stat-icon {
  background: rgba(99, 102, 241, .12);
  color: #6366f1;
}

.stat-card--numbers .stat-icon {
  background: rgba(59, 130, 246, .12);
  color: #3b82f6;
}

.stat-card--providers .stat-icon {
  background: rgba(245, 158, 11, .12);
  color: #f59e0b;
}

.stat-card--profit .stat-icon {
  background: rgba(16, 185, 129, .12);
  color: #10b981;
}

.stat-card--month .stat-icon {
  background: rgba(168, 85, 247, .12);
  color: #a855f7;
}

.stat-card-change {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ── Toast v2 — with progress bar ────── */
.toast {
  border-radius: 12px;
  border: none;
  min-width: 260px;
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  border-radius: 0 0 12px 12px;
  animation: toastBar 4s linear forwards;
}

@keyframes toastBar {
  from {
    width: 100%
  }

  to {
    width: 0
  }
}

.toast-success .toast-progress {
  background: var(--success);
}

.toast-error .toast-progress {
  background: var(--danger);
}

.toast-info .toast-progress {
  background: var(--info);
}

.toast-warning .toast-progress {
  background: var(--warning);
}

.toast {
  position: relative;
  overflow: hidden;
}

.toast-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.toast-title {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-primary);
}

.toast-sub {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ── Success modal ────────────────────── */
.success-overlay {
  backdrop-filter: blur(8px);
  background: rgba(15, 23, 42, .55);
}

.success-modal {
  background: #fff;
  border-radius: 20px;
  padding: 36px 28px 28px;
  width: min(420px, calc(100vw - 32px));
  text-align: center;
  box-shadow: 0 32px 80px rgba(15, 23, 42, .22);
  animation: scaleIn .3s cubic-bezier(.34, 1.2, .64, 1) both;
}

.success-icon-wrap {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  animation: numRoll .4s cubic-bezier(.34, 1.56, .64, 1) both;
}

.success-circle-bg {
  stroke: #e2e8f0;
  stroke-width: 2;
}

.success-circle-fill {
  stroke: #10b981;
  stroke-width: 2;
  stroke-dasharray: 157;
  stroke-dashoffset: 157;
  animation: circleDraw .5s .1s ease forwards;
}

.success-tick {
  stroke: #10b981;
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: tickDraw .3s .5s ease forwards;
}

@keyframes circleDraw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes tickDraw {
  to {
    stroke-dashoffset: 0;
  }
}

.success-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 8px;
}

.success-msg {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 20px;
  line-height: 1.6;
}

.success-actions {
  margin-top: 16px;
}

/* ── Service chips (dashboard) ─────────── */
.service-list {
  padding: 16px 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 80px;
  align-content: flex-start;
}

.service-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: rgba(99, 102, 241, .07);
  border: 1px solid rgba(99, 102, 241, .15);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #4338ca;
  animation: badgePop .25s cubic-bezier(.34, 1.56, .64, 1) both;
  transition: transform .15s ease, box-shadow .15s ease;
}

.service-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(99, 102, 241, .15);
}

.service-chip-count {
  background: #6366f1;
  color: #fff;
  border-radius: 10px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 800;
}

/* ── Page entry animation ─────────────── */
@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(10px)
  }

  to {
    opacity: 1;
    transform: none
  }
}

.page-content>* {
  animation: pageIn .3s ease both;
}

.page-content>*:nth-child(1) {
  animation-delay: .02s;
}

.page-content>*:nth-child(2) {
  animation-delay: .07s;
}

.page-content>*:nth-child(3) {
  animation-delay: .12s;
}

.page-content>*:nth-child(4) {
  animation-delay: .17s;
}

/* ── Loading skeleton ─────────────────── */
.skeleton-row {
  height: 14px;
  border-radius: 7px;
  margin-bottom: 10px;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}



/* ═══════════════════════════════════════
   SSP LOGO — Premium futuristic branding
═══════════════════════════════════════ */

/* ── SIDEBAR LOGO ── */
.ssp-sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  animation: sspSlideIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ssp-sidebar-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #0d0d2b, #16163a);
  border-radius: 10px;
  border: 1px solid rgba(0, 198, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(0, 198, 255, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: box-shadow 0.3s ease;
}

.ssp-sidebar-icon:hover,
.sidebar-logo:hover .ssp-sidebar-icon {
  box-shadow: 0 0 20px rgba(0, 198, 255, 0.4), 0 0 40px rgba(0, 255, 163, 0.15);
}

.ssp-sidebar-icon svg {
  width: 22px;
  height: 22px;
}

.ssp-sidebar-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.ssp-sidebar-wordmark {
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  font-family: 'Arial Black', Impact, sans-serif;
  letter-spacing: -0.5px;
}

.ssp-s {
  color: #fff;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.3), 0 1px 0 rgba(255, 255, 255, 0.15);
  background: linear-gradient(180deg, #fff 0%, #dde0f8 50%, #fff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ssp-p {
  background: linear-gradient(135deg, #00C6FF 0%, #0072FF 55%, #00FFA3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 6px rgba(0, 198, 255, 0.5));
}

.ssp-sidebar-sub {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.06em;
  line-height: 1;
}

.ssp-sidebar-tag {
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: linear-gradient(90deg, #00C6FF, #00FFA3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

/* ── LOGIN PAGE LOGO ── */
.auth-cover-login {
  background: linear-gradient(155deg, #06061a 0%, #0a0a28 45%, #080f22 100%) !important;
}

.auth-cover-login::before {
  background: radial-gradient(ellipse at 30% 40%, rgba(0, 198, 255, 0.08) 0%, transparent 65%) !important;
  animation: sspPulseAura 5s ease-in-out infinite !important;
}

.auth-cover-login::after {
  border-color: rgba(0, 198, 255, 0.14) !important;
}

.ssp-login-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  animation: sspFadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ssp-login-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, #0d0d2b, #16163a);
  border-radius: 18px;
  border: 1px solid rgba(0, 198, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 1px rgba(0, 255, 163, 0.1),
    0 0 24px rgba(0, 198, 255, 0.25),
    0 0 60px rgba(0, 198, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  animation: sspIconPulse 3.5s ease-in-out infinite;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ssp-login-icon:hover {
  transform: scale(1.06) translateY(-2px);
}

.ssp-login-icon svg {
  width: 38px;
  height: 38px;
}

.ssp-login-letters {
  font-family: 'Arial Black', Impact, sans-serif;
  font-weight: 900;
  font-size: 64px;
  line-height: 1;
  letter-spacing: -2px;
  animation: sspLettersFadeIn 1s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
  position: relative;
}

.ssp-login-ss {
  background: linear-gradient(180deg,
      #ffffff 0%,
      #e2e6ff 20%,
      #ffffff 42%,
      #c8ccee 62%,
      #ffffff 80%,
      #d4d8f4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.25));
}

.ssp-login-p {
  background: linear-gradient(135deg, #00C6FF 0%, #0072FF 50%, #00FFA3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 16px rgba(0, 198, 255, 0.6)) drop-shadow(0 0 32px rgba(0, 255, 163, 0.25));
  animation: sspPGlow 2.8s ease-in-out infinite;
}

.ssp-login-name {
  font-size: 20px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  animation: sspFadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.25s both;
}

.ssp-login-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  background: linear-gradient(90deg, #00C6FF 0%, #ffffff 50%, #00FFA3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.85;
  animation: sspFadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both;
}

/* ── KEYFRAMES ── */
@keyframes sspFadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sspSlideIn {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes sspLettersFadeIn {
  from {
    opacity: 0;
    transform: scale(0.88) translateY(10px);
    filter: blur(6px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}

@keyframes sspIconPulse {

  0%,
  100% {
    box-shadow: 0 0 0 1px rgba(0, 255, 163, 0.1),
      0 0 24px rgba(0, 198, 255, 0.25),
      0 0 60px rgba(0, 198, 255, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.07);
  }

  50% {
    box-shadow: 0 0 0 1px rgba(0, 255, 163, 0.2),
      0 0 36px rgba(0, 198, 255, 0.4),
      0 0 80px rgba(0, 198, 255, 0.14),
      0 0 100px rgba(0, 255, 163, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.07);
  }
}

@keyframes sspPGlow {

  0%,
  100% {
    filter: drop-shadow(0 0 12px rgba(0, 198, 255, 0.5)) drop-shadow(0 0 28px rgba(0, 255, 163, 0.2));
  }

  50% {
    filter: drop-shadow(0 0 22px rgba(0, 198, 255, 0.75)) drop-shadow(0 0 48px rgba(0, 255, 163, 0.35));
  }
}

@keyframes sspPulseAura {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

/* ═══════════════════════════════════════
   STX WHITE SIDEBAR & BLACK-ON-WHITE MENU OVERRIDES
   ═══════════════════════════════════════ */
html:not(.dark) .sidebar {
  background: #ffffff !important;
  border-right: 1px solid #e2e8f0 !important;
}

html:not(.dark) .sidebar-logo {
  border-bottom: 1px solid #f1f5f9 !important;
}

html:not(.dark) .ssp-s {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  text-shadow: none !important;
  background: none !important;
}

html:not(.dark) .ssp-p {
  background: linear-gradient(135deg, #00C6FF 0%, #0072FF 55%, #00FFA3 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

html:not(.dark) .ssp-sidebar-sub {
  color: #64748b !important;
}

html:not(.dark) .ssp-sidebar-icon {
  background: #0f172a !important;
  border: 1px solid #1e293b !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12) !important;
}

html:not(.dark) .sidebar-group-header {
  color: #64748b !important;
  font-weight: 700 !important;
  font-size: 11px !important;
}

html:not(.dark) .sidebar-group-header:hover {
  color: #0f172a !important;
  background: #f8fafc !important;
}

html:not(.dark) .sidebar-nav-item {
  color: #334155 !important;
  background: transparent !important;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: none !important;
  font-weight: 500 !important;
}

html:not(.dark) .sidebar-nav-item svg {
  color: #64748b !important;
  opacity: 0.85 !important;
}

html:not(.dark) .sidebar-nav-item:hover {
  color: #0f172a !important;
  background: #f1f5f9 !important;
  box-shadow: none !important;
}

html:not(.dark) .sidebar-nav-item:hover svg {
  color: #0f172a !important;
  opacity: 1 !important;
}

html:not(.dark) .sidebar-nav-item.active {
  color: #ffffff !important;
  background: #0f172a !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.15) !important;
}

html:not(.dark) .sidebar-nav-item.active svg {
  color: #ffffff !important;
  opacity: 1 !important;
}

html:not(.dark) .sidebar-nav-item::before {
  display: none !important;
}

html:not(.dark) .sidebar-user {
  background: #ffffff !important;
  border-top: 1px solid #f1f5f9 !important;
}

html:not(.dark) .sidebar-user-name {
  color: #0f172a !important;
  font-weight: 700 !important;
}

html:not(.dark) .sidebar-user-role {
  color: #64748b !important;
}

html:not(.dark) .sidebar-user-avatar {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
  border: 1.5px solid rgba(59, 130, 246, 0.4) !important;
}

html:not(.dark) .sidebar-logout {
  color: #64748b !important;
  font-weight: 600 !important;
}

html:not(.dark) .sidebar-logout:hover {
  color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.08) !important;
}

html:not(.dark) .mobile-menu-btn {
  background: linear-gradient(180deg, #ffffff 0%, #f1f3f5 40%, #e9ecef 100%) !important;
  color: #6c757d !important;
}

.main-content {
  background: var(--bg-page) !important;
  background-color: var(--bg-page) !important;
}

.top-bar-avatar {
  background: #ffffff !important;
  color: #1e293b !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Avatar Image Constraints */
.user-avatar-img,
img.sidebar-user-avatar,
img.top-bar-avatar,
img.hierarchy-img,
.hierarchy-avatar img {
  width: 32px !important;
  height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
  object-fit: cover !important;
  border-radius: 50% !important;
  display: inline-block !important;
}

img.profile-avatar {
  width: 80px !important;
  height: 80px !important;
  max-width: 80px !important;
  max-height: 80px !important;
  object-fit: cover !important;
  border-radius: 50% !important;
}

/* ═══════════════════════════════════════
   HIERARCHY MAP STYLES
   ═══════════════════════════════════════ */
.hierarchy-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 0;
}

.hierarchy-node {
  position: relative;
  margin-bottom: 8px;
}

.hierarchy-card {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
}

.hierarchy-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.hierarchy-self {
  border-color: #3b82f6 !important;
  background: #f8fafc !important;
}

.hierarchy-avatar {
  flex-shrink: 0;
}

.hierarchy-avatar div,
div.hierarchy-img {
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.hierarchy-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hierarchy-name {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hierarchy-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ═══════════════════════════════════════
   WHITE LEFT LOGIN CARD & RESPONSIVE AUTH OVERRIDES
   ═══════════════════════════════════════ */
.auth-page {
  background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 50%, #f8fafc 100%) !important;
}

.auth-card,
.auth-card-modern {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.12), 0 0 20px rgba(2, 132, 199, 0.08) !important;
  border-radius: 20px !important;
}

#top-bar-theme-btn,
#auth-theme-toggle,
[id^="auth-theme-toggle"] {
  display: none !important;
}

.auth-cover-login {
  background: #ffffff !important;
  border-right: 1px solid #e2e8f0 !important;
  box-shadow: none !important;
}

.auth-cover-login::after {
  border: 1px solid #e2e8f0 !important;
}

.ssp-login-icon {
  background: #0f172a !important;
  border: 1px solid #1e293b !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.15) !important;
}

.ssp-login-name {
  color: #0f172a !important;
}

.ssp-login-tag {
  color: #64748b !important;
}

.auth-cover-copy {
  color: #475569 !important;
}

.auth-form-login {
  background: #ffffff !important;
}

/* Full Mobile & Tablet Responsiveness */
@media (max-width: 900px) {

  .auth-card-login,
  .auth-card {
    flex-direction: column !important;
    width: 94% !important;
    max-width: 480px !important;
    margin: 16px auto !important;
  }

  .auth-cover-login,
  .auth-cover {
    width: 100% !important;
    min-height: auto !important;
    padding: 24px 16px !important;
    border-right: none !important;
    border-bottom: 1px solid #e2e8f0 !important;
  }

  .auth-form-login,
  .auth-form {
    width: 100% !important;
    padding: 24px 20px !important;
  }

  .auth-captcha-card {
    grid-template-columns: 1fr 100px !important;
  }
}

/* ═══════════════════════════════════════
   STX SMS TEST PANEL & STANDARDIZED DATATABLE STYLES
   ═══════════════════════════════════════ */
.test-panel-container {
  display: flex;
  gap: 20px;
  align-items: stretch;
  width: 100%;
}

.test-panel-left {
  flex: 0 0 calc(40% - 10px);
  width: calc(40% - 10px);
  min-width: 0;
}

.test-panel-right {
  flex: 0 0 calc(60% - 10px);
  width: calc(60% - 10px);
  min-width: 0;
}

@media (max-width: 1024px) {
  .test-panel-left {
    flex: 0 0 calc(50% - 8px);
    width: calc(50% - 8px);
  }
  .test-panel-right {
    flex: 0 0 calc(50% - 8px);
    width: calc(50% - 8px);
  }
}

@media (max-width: 768px) {
  .test-panel-container {
    flex-direction: column;
    gap: 16px;
  }
  .test-panel-left,
  .test-panel-right {
    flex: 0 0 100%;
    width: 100%;
  }
}

/* White STX Standard Buttons */
html:not(.dark) .fly-btn-white {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
  transition: all 0.2s ease !important;
}

html:not(.dark) .fly-btn-white:hover {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
  color: #020617 !important;
}

.fly-btn-xs {
  height: 28px !important;
  padding: 0 10px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
}

.pagination-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  font-size: 12px;
  color: #64748b;
}

/* ════════════════════════════════════════════════════════════
   UNIFIED WHITE CARDS & BUTTONS STYLING (STX DESIGN SYSTEM)
   ════════════════════════════════════════════════════════════ */

html:not(.dark) .card,
html:not(.dark) .stat-card,
html:not(.dark) .stat-card-item {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(0, 0, 0, 0.03) !important;
}

html:not(.dark) .stat-card-value {
  color: #0f172a !important;
}

html:not(.dark) .stat-card-label {
  color: #475569 !important;
}

html:not(.dark) .stat-card-icon {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border: 1px solid #e2e8f0 !important;
}

/* Global Buttons: White background with crisp dark text & slate border */
html:not(.dark) .fly-btn,
html:not(.dark) .btn,
html:not(.dark) .button {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
  font-weight: 700 !important;
  transition: all 0.15s ease !important;
}

html:not(.dark) .fly-btn:hover,
html:not(.dark) .btn:hover,
html:not(.dark) .button:hover {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
}

html:not(.dark) .fly-btn:active,
html:not(.dark) .btn:active,
html:not(.dark) .button:active {
  background: #f1f5f9 !important;
  transform: translateY(1px) !important;
}

/* ════════════════════════════════════════════════════════════
   STX SMS NUMBERS & GLOBAL STANDARDIZATION
   ════════════════════════════════════════════════════════════ */

.sidebar-footer-branding {
  padding: 12px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: auto;
}

.sidebar-brand-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 12px;
}

.sidebar-brand-title {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.03em;
  line-height: 1.1;
}

.sidebar-brand-sub {
  font-size: 9px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.02em;
  margin-top: 2px;
}

.stx-global-footer {
  text-align: center;
  padding: 20px 16px;
  margin-top: 30px;
  border-top: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

.stx-global-footer .stx-footer-main {
  font-weight: 600;
  color: #334155;
  margin-bottom: 2px;
}

.stx-global-footer .stx-footer-sub {
  color: #64748b;
  font-size: 11px;
}

.sms-numbers-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sms-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.sms-page-title {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.02em;
}

.sms-breadcrumb {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.sms-breadcrumb span {
  color: #0f172a;
  font-weight: 600;
}

.stx-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.stx-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #e2e8f0;
  gap: 12px;
  flex-wrap: wrap;
  background: #ffffff;
}

.stx-toolbar-left,
.stx-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.stx-select,
.stx-select-sm,
.stx-input-sm {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  color: #0f172a;
  outline: none;
  transition: border-color 0.15s ease;
}

.stx-select:focus,
.stx-select-sm:focus,
.stx-input-sm:focus {
  border-color: #2563eb;
}

.stx-toolbar-label {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.stx-records-group,
.stx-export-group,
.stx-search-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.stx-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.stx-btn-filter {
  background: #e11d48 !important;
  color: #ffffff !important;
  border-color: #e11d48 !important;
}

.stx-btn-filter:hover {
  background: #be123c !important;
  border-color: #be123c !important;
}

.stx-btn-success {
  background: #16a34a !important;
  color: #ffffff !important;
  border-color: #16a34a !important;
}

.stx-btn-success:hover {
  background: #15803d !important;
}

.stx-btn-danger {
  background: #dc2626 !important;
  color: #ffffff !important;
  border-color: #dc2626 !important;
}

.stx-btn-danger:hover {
  background: #b91c1c !important;
}

.stx-btn-export {
  padding: 5px 10px;
  font-size: 11px;
}

.stx-table-wrapper {
  overflow-x: auto;
  max-width: 100%;
}

.stx-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  color: #0f172a;
  text-align: left;
}

.stx-table th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.05em;
  padding: 10px 14px;
  border-bottom: 1px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
  white-space: nowrap;
}

.stx-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  border-right: 1px solid #f1f5f9;
  vertical-align: middle;
}

.stx-table th:last-child,
.stx-table td:last-child {
  border-right: none;
}

.stx-table tbody tr:nth-child(even) {
  background: #fafafa;
}

.stx-table tbody tr:hover {
  background: #f1f5f9;
}

.stx-checkbox {
  cursor: pointer;
  width: 15px;
  height: 15px;
  accent-color: #2563eb;
}

.stx-payout-cell {
  line-height: 1.3;
}

.stx-limits-badge {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
}

.edit-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
}

.edit-icon-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.pagination-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-top: 1px solid var(--border, #e2e8f0);
  flex-wrap: wrap;
  gap: 12px;
  background: var(--bg-card, #ffffff);
}

.pagination-info {
  font-size: 12px;
  color: var(--text-secondary, #64748b);
}

.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination-btn {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-input, #cbd5e1);
  color: var(--text-primary, #334155);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pagination-btn:hover:not(:disabled) {
  background: var(--surface-bg, #f1f5f9);
  border-color: var(--border-input, #94a3b8);
}

.pagination-btn.active {
  background: #0f172a !important;
  color: #ffffff !important;
  border-color: #0f172a !important;
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ═══════════════════════════════════════
   PREMIUM FORM CONTROLS & CDR STYLES
═══════════════════════════════════════ */
.fly-input,
.fly-select,
.stx-input,
.stx-select {
  height: 40px;
  padding: 0 12px;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary, #0f172a);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fly-input:focus,
.fly-select:focus,
.stx-input:focus,
.stx-select:focus {
  border-color: var(--primary, #3b82f6);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.stx-select,
.fly-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px 16px;
  padding-right: 32px;
}

/* Remove dropdown arrows from registration fields & no-arrow selects */
.no-arrow,
#signup-step-content select,
#signup-modal select,
.auth-box select,
#s-prof {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: none !important;
  padding-right: 12px !important;
}

.no-arrow::-ms-expand,
#signup-step-content select::-ms-expand,
#signup-modal select::-ms-expand,
.auth-box select::-ms-expand,
#s-prof::-ms-expand {
  display: none !important;
}

.stx-card {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.stx-btn-primary {
  height: 40px;
  background: #0f172a;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  padding: 0 18px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.stx-btn-primary:hover {
  background: #1e293b;
}

.stx-btn-export {
  height: 25px !important;
  background: linear-gradient(180deg, #ffffff 0%, #e6e6e6 100%) !important;
  color: #333333 !important;
  border: 1px solid #cccccc !important;
  border-radius: 3px !important;
  font-size: 11.5px !important;
  font-weight: 500 !important;
  padding: 0 10px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 1px 1px rgba(0,0,0,0.04) !important;
  transition: all 0.15s ease !important;
}

.stx-btn-export:hover {
  background: #e6e6e6 !important;
  border-color: #adadad !important;
}

.stx-input-sm,
.stx-select-sm {
  height: 35px !important;
  padding: 0 10px !important;
  font-size: 12px !important;
  border-radius: 6px !important;
}

.stx-btn-sm {
  height: 35px !important;
  padding: 0 12px !important;
  font-size: 12px !important;
  border-radius: 6px !important;
}

/* ═══════════════════════════════════════
   RESPONSIVE DESIGN (MOBILE, TABLET, DESKTOP)
═══════════════════════════════════════ */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr !important;
  }
  
  .stx-card {
    padding: 14px !important;
  }
  
  .table-wrapper,
  .stx-table-wrapper {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    display: block;
  }

  .stx-table,
  .fly-table {
    min-width: 650px;
  }

  .modal-content,
  .fly-modal-content {
    width: 94vw !important;
    max-width: 480px !important;
    padding: 16px !important;
  }

  .form-row {
    flex-direction: column !important;
    gap: 10px !important;
  }

  .stx-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .stx-toolbar > div {
    width: 100% !important;
    justify-content: space-between !important;
  }
}

/* ═══════════════════════════════════════
   PREMIUM AUTH / SIGNUP CARD REDESIGN
═══════════════════════════════════════ */
.auth-card-signup {
  max-width: 980px !important;
  min-height: 640px !important;
  border-radius: 20px !important;
  border: 1px solid rgba(226, 232, 240, 0.8) !important;
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.18), 0 10px 20px -5px rgba(0, 0, 0, 0.04) !important;
}

.auth-cover-signup {
  width: 340px !important;
  background: linear-gradient(135deg, #735DFF 0%, #5A3DE8 100%) !important;
  padding: 32px 24px !important;
}

.auth-logo-badge {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  color: white;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.auth-step-pill {
  display: inline-block;
  padding: 4px 10px;
  background: #f1f5f9;
  color: #475569;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.signup-step-ind {
  min-height: 50px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  background: rgba(255, 255, 255, 0.07) !important;
  padding: 10px 14px !important;
  color: rgba(255, 255, 255, 0.7) !important;
}

.signup-step-ind .step-num {
  width: 26px !important;
  height: 26px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.2) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

.signup-step-ind--active {
  border-color: rgba(255, 255, 255, 0.6) !important;
  background: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
}

.signup-step-ind--active .step-num {
  background: #ffffff !important;
  color: #4f46e5 !important;
}

.pay-method-card {
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  background: #ffffff;
  transition: all 0.2s ease;
}

.pay-method-card:hover {
  border-color: #6366f1;
  background: #f8fafc;
}

.pay-method-card--active {
  border-color: #4f46e5 !important;
  background: rgba(99, 102, 241, 0.06) !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
}

.proof-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  background: #f8fafc;
  transition: all 0.2s ease;
}

.proof-dropzone:hover,
.proof-dropzone--drag {
  border-color: #4f46e5;
  background: #f1f5f9;
}

.auth-card-success {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  width: 100% !important;
  max-width: 520px !important;
  margin: auto !important;
  padding: 36px 28px !important;
  background: #ffffff !important;
  border-radius: 18px !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15) !important;
  box-sizing: border-box !important;
}

@media (max-width: 640px) {
  .auth-card-success {
    padding: 24px 16px !important;
    width: 95% !important;
    border-radius: 14px !important;
  }
}

/* Tablet & Mobile Enhancements for Signup Wizard & Auth Pages */
@media (max-width: 1024px) {
  .auth-card-signup {
    flex-direction: column !important;
    width: 95% !important;
    max-width: 640px !important;
    min-height: auto !important;
    margin: 16px auto !important;
  }

  .auth-cover-signup {
    width: 100% !important;
    padding: 24px 20px !important;
    min-height: auto !important;
  }

  .signup-steps {
    flex-direction: row !important;
    gap: 8px !important;
    overflow-x: auto !important;
    padding-bottom: 4px !important;
  }

  .signup-step-ind {
    flex: 1 1 0 !important;
    min-width: 130px !important;
    padding: 8px 10px !important;
  }

  .auth-form-signup {
    width: 100% !important;
    padding: 24px 20px !important;
  }

  .pay-method-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
  }
}

@media (max-width: 640px) {
  .auth-card-signup {
    width: 100% !important;
    margin: 0 !important;
    border-radius: 0 !important;
    border: none !important;
  }

  .signup-step-ind {
    min-width: 100px !important;
  }
}

/* User Profile Dropdown Menu styling */
.top-bar-user {
  position: relative;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 20px;
  transition: background-color 0.2s ease;
}

.top-bar-user:hover {
  background-color: var(--bg-hover, rgba(0,0,0,0.03));
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 190px;
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.08);
  border: 1px solid #d1d5db;
  z-index: 1000;
  display: none;
  overflow: hidden;
  animation: dropdownPop 0.15s ease;
}

@keyframes dropdownPop {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.user-dropdown-menu.show {
  display: block;
}

.user-dropdown-body {
  padding: 6px 0;
  background: #ffffff;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  text-decoration: none;
  transition: background 0.12s ease, color 0.12s ease;
  cursor: pointer;
}

.user-dropdown-item:hover {
  background-color: #f3f4f6;
  color: #111827;
}

.user-dropdown-item.logout {
  color: #ef4444 !important;
  font-weight: 700;
}

.user-dropdown-item.logout:hover {
  background-color: #fef2f2;
  color: #dc2626 !important;
}

.dropdown-divider {
  margin: 4px 0;
  border: none;
  border-top: 1px solid #e5e7eb;
}

.dropdown-item-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
}

/* Sidebar Announcement Banner Card */
.sidebar-announcement-card {
  margin: 12px 14px 16px 14px;
  padding: 14px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.5;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  position: relative;
  transition: all 0.3s ease;
  word-break: break-word;
}

.sidebar-announcement-card.type-info {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar-announcement-card.type-promotion {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar-announcement-card.type-success {
  background: linear-gradient(135deg, #059669, #10b981);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar-announcement-card.type-warning {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar-announcement-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sidebar-announcement-body {
  font-size: 12px;
  opacity: 0.95;
  font-weight: 500;
}

/* Mobile Responsiveness Enhancements */
@media (max-width: 600px) {
  .user-dropdown-menu {
    position: absolute !important;
    top: calc(100% + 6px) !important;
    right: 0 !important;
    left: auto !important;
    width: 190px !important;
    min-width: 180px !important;
    max-width: 220px !important;
    border-radius: 12px !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.08) !important;
    z-index: 2000 !important;
  }
  .sidebar-announcement-card {
    margin: 10px;
    padding: 12px;
  }
}

/* User Dropdown Arrow Rotation */
.top-bar-user:has(.user-dropdown-menu.show) .dropdown-arrow-icon {
  transform: rotate(180deg);
  color: var(--primary) !important;
}

/* Back to Top Button */
.stx-back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
  cursor: pointer;
  z-index: 1000;
  transition: opacity 0.3s var(--transition), transform 0.3s var(--transition), background 0.2s;
  opacity: 0;
  transform: translateY(10px) scale(0.9);
  pointer-events: none;
}

.stx-back-to-top.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.stx-back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-2px) scale(1.05);
}

.stx-back-to-top:active {
  transform: translateY(1px) scale(0.98);
}

/* Modern Styling for datetime-local Inputs */
input[type="datetime-local"] {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  background-color: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
  appearance: none;
  -webkit-appearance: none;
}

input[type="datetime-local"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Modernize the calendar icon inside datetime-local */
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Ctext x='4' y='20' font-family='sans-serif' font-size='10' fill='%233b82f6' font-weight='bold'%3EUTC%3C/text%3E%3C/svg%3E") no-repeat center;
  cursor: pointer;
  width: 24px;
  height: 24px;
  padding: 4px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
  background-color: rgba(59, 130, 246, 0.1);
}

/* Ultra-Modern Sleek Flatpickr Date/Time Picker Styling */
.flatpickr-calendar {
  display: none;
  position: absolute !important;
  visibility: hidden;
  background: var(--bg-card, #0f172a) !important;
  border: 1px solid var(--border, #334155) !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4) !important;
  border-radius: 12px !important;
  font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
  color: var(--text-primary, #f8fafc) !important;
  padding: 10px 12px !important;
  z-index: 99999 !important;
  box-sizing: border-box !important;
  width: 320px !important;
  max-width: 320px !important;
}

.flatpickr-calendar.open {
  display: block !important;
  visibility: visible !important;
}

.flatpickr-calendar.inline {
  display: block !important;
  position: relative !important;
  visibility: visible !important;
}

.flatpickr-innerContainer,
.flatpickr-rContainer,
.flatpickr-days {
  width: 100% !important;
  max-width: 100% !important;
}

.dayContainer {
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: space-between !important;
  padding: 0 !important;
}

.flatpickr-calendar.arrowTop:before,
.flatpickr-calendar.arrowTop:after {
  border-bottom-color: var(--border, #334155) !important;
}

.flatpickr-months {
  background: transparent !important;
  padding: 4px 0 8px 0 !important;
}

.flatpickr-months .flatpickr-month {
  background: transparent !important;
  color: var(--text-primary, #f8fafc) !important;
}

.flatpickr-current-month {
  color: var(--text-primary, #f8fafc) !important;
  font-weight: 700 !important;
  font-size: 14px !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
  background: var(--bg-card, #0f172a) !important;
  color: var(--text-primary, #f8fafc) !important;
  font-weight: 700 !important;
  border-radius: 6px !important;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
  color: var(--text-secondary, #94a3b8) !important;
  fill: var(--text-secondary, #94a3b8) !important;
  border-radius: 8px !important;
  padding: 4px !important;
  transition: all .2s ease !important;
}

.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover {
  color: var(--primary, #3b82f6) !important;
  fill: var(--primary, #3b82f6) !important;
  background: rgba(59, 130, 246, 0.12) !important;
}

span.flatpickr-weekday {
  color: var(--text-secondary, #94a3b8) !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  width: 14.28% !important;
  max-width: 14.28% !important;
  display: inline-block !important;
  text-align: center !important;
}

.flatpickr-day {
  color: var(--text-primary, #f8fafc) !important;
  border-radius: 8px !important;
  font-weight: 500 !important;
  transition: all .15s ease !important;
  width: 14.28% !important;
  max-width: 38px !important;
  height: 36px !important;
  line-height: 36px !important;
  box-sizing: border-box !important;
}

.flatpickr-day:hover {
  background: rgba(59, 130, 246, 0.15) !important;
  color: var(--primary, #3b82f6) !important;
}

.flatpickr-day.today {
  border: 1.5px solid var(--primary, #3b82f6) !important;
  color: var(--primary, #3b82f6) !important;
  font-weight: 700 !important;
}

.flatpickr-day.today:hover {
  background: var(--primary, #3b82f6) !important;
  color: #ffffff !important;
}

.flatpickr-day.selected, 
.flatpickr-day.startRange, 
.flatpickr-day.endRange, 
.flatpickr-day.selected:hover, 
.flatpickr-day.nextMonthDay.selected,
.flatpickr-day.prevMonthDay.selected {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
  border-color: #3b82f6 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35) !important;
}

.flatpickr-time {
  border-top: 1px solid var(--border, #334155) !important;
  background: rgba(15, 23, 42, 0.6) !important;
  border-radius: 0 0 10px 10px !important;
  padding: 6px 0 !important;
}

.flatpickr-time input {
  color: var(--text-primary, #f8fafc) !important;
  font-weight: 700 !important;
}

.flatpickr-time input:hover, 
.flatpickr-time .flatpickr-am-pm:hover, 
.flatpickr-time input:focus, 
.flatpickr-time .flatpickr-am-pm:focus {
  background: rgba(59, 130, 246, 0.15) !important;
  color: var(--primary, #3b82f6) !important;
}

.flatpickr-time .numInputWrapper span.arrowUp:after {
  border-bottom-color: var(--text-secondary, #94a3b8) !important;
}

.flatpickr-time .numInputWrapper span.arrowDown:after {
  border-top-color: var(--text-secondary, #94a3b8) !important;
}

/* Mobile Viewport & Sidebar Safe Area Optimization */
@media (max-width: 768px) {
  aside.sidebar, #sidebar {
    display: flex !important;
    flex-direction: column !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: max(28px, env(safe-area-inset-bottom, 28px)) !important;
    box-sizing: border-box !important;
  }

  .sidebar-nav {
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    min-height: 0 !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 16px !important;
  }

  #sidebar-announcement-container {
    flex-shrink: 0 !important;
    padding: 10px !important;
    margin-bottom: max(28px, env(safe-area-inset-bottom, 28px)) !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .sidebar-announcement-card {
    display: block !important;
    margin-bottom: 12px !important;
  }
}

/* ═══════════════════════════════════════
   SEARCHABLE COUNTRY PICKER
   ═══════════════════════════════════════ */
.searchable-country-picker {
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.searchable-country-picker input:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
  outline: none;
}

.country-dropdown-menu {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f8fafc;
}

.country-dropdown-menu::-webkit-scrollbar {
  width: 6px;
}

.country-dropdown-menu::-webkit-scrollbar-track {
  background: #f8fafc;
  border-radius: 4px;
}

.country-dropdown-menu::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 4px;
}

.country-dropdown-menu::-webkit-scrollbar-thumb:hover {
  background-color: #94a3b8;
}

.country-opt-item:hover,
.country-opt-item:focus {
  background-color: #f1f5f9 !important;
}

.country-opt-item:active {
  background-color: #e2e8f0 !important;
}

/* ═══════════════════════════════════════
   TOP MARQUEE ANNOUNCEMENT TICKER
═══════════════════════════════════════ */
#top-marquee-bar {
  width: 100%;
  margin: 0 0 14px 0 !important;
  background: linear-gradient(90deg, #0a0c1e 0%, #111540 35%, #23296c 100%) !important;
  position: relative;
  min-height: 42px !important;
  display: flex;
  align-items: center;
  z-index: 10;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(0, 0, 0, 0.4);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
  transition: background 0.25s ease, border-color 0.25s ease;
  font-size: 13.5px !important;
  box-sizing: border-box !important;
}

/* Animated/Scrolling Mode: Fixed height single-line marquee */
#top-marquee-bar:not(.is-static) {
  height: 40px !important;
  line-height: 40px !important;
  overflow: hidden !important;
  white-space: nowrap !important;
}

/* Static Mode: Auto-expanding height, multi-line text wrapping without clipping */
#top-marquee-bar.is-static {
  height: auto !important;
  min-height: 44px !important;
  line-height: 1.6 !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 10px 24px !important;
  overflow: visible !important;
  white-space: normal !important;
  text-align: center !important;
}

#top-marquee-bar.is-static .marquee-track,
#top-marquee-bar.is-static .announcement-static-box {
  animation: none !important;
  transform: none !important;
  white-space: normal !important;
  overflow: visible !important;
  width: 100% !important;
}

#top-marquee-bar.theme-dark {
  background: linear-gradient(90deg, #0b1120 0%, #151d30 50%, #0b1120 100%) !important;
  border-bottom: 1px solid rgba(56, 189, 248, 0.25) !important;
  color: #f1f5f9 !important;
}
#top-marquee-bar.theme-info {
  background: linear-gradient(90deg, #0b1120 0%, #072942 50%, #0b1120 100%) !important;
  border-bottom: 1px solid rgba(14, 165, 233, 0.35) !important;
  color: #e0f2fe !important;
}
#top-marquee-bar.theme-promotion {
  background: linear-gradient(90deg, #0b1120 0%, #2e1065 50%, #0b1120 100%) !important;
  border-bottom: 1px solid rgba(168, 85, 247, 0.35) !important;
  color: #faf5ff !important;
}
#top-marquee-bar.theme-success {
  background: linear-gradient(90deg, #0b1120 0%, #064e3b 50%, #0b1120 100%) !important;
  border-bottom: 1px solid rgba(16, 185, 129, 0.35) !important;
  color: #ecfdf5 !important;
}
#top-marquee-bar.theme-warning {
  background: linear-gradient(90deg, #0b1120 0%, #451a03 50%, #0b1120 100%) !important;
  border-bottom: 1px solid rgba(245, 158, 11, 0.35) !important;
  color: #fffbeb !important;
}

#top-marquee-bar .marquee-track {
  display: inline-flex;
  align-items: center;
  animation: marqueeScroll var(--marquee-duration, 140s) linear infinite;
  will-change: transform;
}

#top-marquee-bar:hover .marquee-track,
#top-marquee-bar:active .marquee-track {
  animation-play-state: paused;
}

#top-marquee-bar .marquee-content {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 0 24px;
  font-size: 13.5px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.02em;
}

#top-marquee-bar .marquee-content span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#top-marquee-bar .announcement-static-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.02em;
  line-height: 1.6;
  white-space: normal;
  word-break: break-word;
  text-align: center;
}

#top-marquee-bar .announcement-static-box a {
  color: #38bdf8 !important;
  text-decoration: underline !important;
  font-weight: 700 !important;
  margin: 0 4px;
}

#top-marquee-bar .announcement-static-box a:hover {
  color: #7dd3fc !important;
}

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (max-width: 768px) {
  #top-marquee-bar {
    height: 30px;
  }
  #top-marquee-bar .marquee-content {
    font-size: 11.5px;
    gap: 20px;
    padding: 0 20px;
  }
  #top-marquee-bar .announcement-static-box {
    font-size: 11.5px;
    gap: 6px;
  }
  #top-marquee-bar .announcement-static-box .announcement-badge {
    font-size: 9.5px;
    padding: 1px 6px;
  }
}

/* ═══════════════════════════════════════
   CIRCULAR STX PANEL SIDEBAR BRANDING
═══════════════════════════════════════ */
.stx-sidebar-header {
  padding: 16px 14px 12px;
  background: linear-gradient(180deg, #282d33 0%, #1f2328 100%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stx-logo-circle {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: radial-gradient(circle at 45% 35%, #0e192c 0%, #050811 100%);
  border: 2px solid #00d2ff;
  box-shadow: 0 0 16px rgba(0, 210, 255, 0.32), inset 0 0 14px rgba(0, 210, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px auto;
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.stx-logo-circle:hover {
  transform: scale(1.04);
  border-color: #38bdf8;
  box-shadow: 0 0 24px rgba(0, 210, 255, 0.55), inset 0 0 18px rgba(0, 210, 255, 0.25);
}

.stx-circle-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1px;
  padding: 4px;
}

.stx-circle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-bottom: 2px;
  filter: drop-shadow(0 2px 6px rgba(0, 198, 255, 0.35));
}

.stx-circle-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.stx-brand-name {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1;
  background: linear-gradient(90deg, #ffffff 0%, #38bdf8 50%, #00d2ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 3px rgba(0, 198, 255, 0.4));
}

.stx-brand-sub {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 8px;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1;
  margin-top: 2px;
}

.stx-welcome-text {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  font-size: 12.5px;
  font-weight: 400;
  color: #94a3b8;
  text-align: center;
  line-height: 1.35;
  margin-top: 4px;
}

.stx-welcome-name {
  font-weight: 700;
  color: #f8fafc;
}

.stx-role-label {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.02em;
  margin-top: 2px;
  text-align: center;
  text-transform: uppercase;
}

.stx-sidebar-clock {
  font-size: 11px;
  font-weight: 400;
  color: #64748b;
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  margin-top: 2px;
  letter-spacing: 0.01em;
  text-align: center;
}

html.dark .stx-sidebar-header {
  background: linear-gradient(180deg, #151a23 0%, #11151c 100%) !important;
  border-bottom: 1px solid #232a36 !important;
}

html.dark .stx-welcome-text {
  color: #94a3b8;
}
html.dark .stx-welcome-name {
  color: #f8fafc;
}
html.dark .stx-role-label {
  color: #38bdf8;
}
html.dark .stx-sidebar-clock {
  color: #64748b;
}

/* ═══════════════════════════════════════
   ACCORDION SIDEBAR NAVIGATION (REFERENCE DESIGN)
═══════════════════════════════════════ */
.sidebar {
  background: linear-gradient(180deg, #2c3137 0%, #22262a 100%) !important;
  border-right: 1px solid #1a1e22 !important;
  width: 200px !important;
  min-width: 200px !important;
  max-width: 200px !important;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
}

.sidebar::-webkit-scrollbar {
  width: 5px;
}
.sidebar::-webkit-scrollbar-thumb {
  background: #3e454d;
  border-radius: 3px;
}

.sidebar-nav {
  padding: 0 !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.nav-accordion-item {
  width: 100%;
  margin: 0;
  border-bottom: 1px solid #202428;
}

.nav-accordion-header {
  background: linear-gradient(180deg, #3d434a 0%, #30353b 100%);
  color: #ffffff;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: all 0.15s ease;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  border-left: none;
  border-right: none;
  border-bottom: none;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
}

.nav-accordion-header:hover {
  background: #474f57;
  color: #ffffff;
}

/* When an accordion is open / active */
.nav-accordion-header.open {
  background: linear-gradient(180deg, #272f3d 0%, #1e2532 100%) !important;
  color: #ffffff !important;
  border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-bottom: 1px solid #151a24 !important;
}

.nav-accordion-header.open .nav-acc-title {
  color: #ffffff !important;
  font-weight: 800;
}

.nav-accordion-header.open .nav-acc-arrow {
  color: #38bdf8 !important;
  transform: rotate(180deg);
}

/* When a direct root item (like DAILY BONUS, DASHBOARD, or SMS TEST PANEL) is currently active */
.nav-accordion-header.active-direct {
  background: #ffffff !important;
  color: #0f172a !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.nav-accordion-header.active-direct .nav-acc-title {
  color: #0f172a !important;
  font-weight: 700 !important;
}

.nav-accordion-header.active-direct .nav-acc-arrow {
  display: none !important;
}

.nav-acc-left {
  display: flex;
  align-items: center;
  gap: 7px;
}

.nav-acc-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-acc-title {
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.02em;
  transition: color 0.15s ease;
}

.nav-acc-arrow {
  width: 12px;
  height: 12px;
  color: rgba(255, 255, 255, 0.75);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.15s ease;
}

.nav-acc-arrow svg {
  display: block;
}

/* Accordion Sub-Menu */
.nav-accordion-body {
  display: none;
  background: #11151c !important;
  flex-direction: column;
  width: 100%;
  border-bottom: 1px solid #1a202c !important;
}

.nav-accordion-body.expanded {
  display: flex;
}

.nav-sub-item {
  padding: 8px 10px 8px 18px;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8 !important;
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
  background: #11151c !important;
  transition: all 0.12s ease;
  text-decoration: none;
  border-top: none;
  border-left: none;
  border-right: none;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
}

.nav-sub-item:last-child {
  border-bottom: none !important;
}

.nav-sub-item:hover {
  background: #182235 !important;
  color: #ffffff !important;
}

.nav-sub-item.active {
  background: #182235 !important;
  color: #38bdf8 !important;
  font-weight: 800;
  border-left: 3px solid #38bdf8 !important;
  padding-left: 15px !important;
}

.nav-sub-bullet {
  font-size: 11px;
  color: #64748b !important;
  flex-shrink: 0;
  transition: color 0.12s ease;
}

.nav-sub-item:hover .nav-sub-bullet {
  color: #94a3b8 !important;
}

.nav-sub-item.active .nav-sub-bullet {
  color: #38bdf8 !important;
}

.nav-sub-label {
  font-size: 12.5px;
  font-weight: inherit;
  color: inherit;
}

/* ═══════════════════════════════════════
   DOWNLOAD .TXT DROPDOWN & MODAL
═══════════════════════════════════════ */
.stx-download-dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.stx-download-btn {
  background: #dc2626 !important;
  color: #fff !important;
  border: none;
  border-radius: 4px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.2s;
}

.stx-download-btn:hover {
  background: #b91c1c !important;
}

.stx-download-panel {
  position: absolute;
  top: 100%;
  right: 0 !important;
  left: auto !important;
  z-index: 9999;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.25), 0 8px 10px -6px rgba(0,0,0,0.15);
  padding: 14px;
  width: 240px;
  max-width: 90vw;
  display: none;
}

.stx-download-panel.show {
  display: block;
  animation: dropdownSlideIn 0.2s ease;
}

@keyframes dropdownSlideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.stx-download-panel h4 {
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 8px;
}

.stx-download-panel label {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.stx-download-panel select {
  width: 100%;
  padding: 6px 10px;
  font-size: 12.5px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  background: #fff;
  color: #0f172a;
  margin-top: 4px;
}

html.dark .stx-download-panel {
  background: #151a23 !important;
  border: 1px solid #334155 !important;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.5), 0 8px 10px -6px rgba(0,0,0,0.3) !important;
}

html.dark .stx-download-panel h4 {
  color: #f8fafc !important;
}

html.dark .stx-download-panel label {
  color: #cbd5e1 !important;
}

html.dark .stx-download-panel select {
  background: #1e293b !important;
  border: 1px solid #334155 !important;
  color: #f8fafc !important;
}

/* Self-Allocation success modal */
.self-alloc-success-modal {
  text-align: center;
}

.self-alloc-success-modal h3 {
  font-size: 16px;
  font-weight: 800;
  color: #16a34a;
  margin-bottom: 6px;
}

.self-alloc-success-modal .alloc-summary {
  font-size: 13px;
  color: #475569;
  margin-bottom: 16px;
}

.self-alloc-success-modal .alloc-download-section {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin-top: 12px;
}

/* ═══════════════════════════════════════
   NEWS POPUP MODAL
═══════════════════════════════════════ */
.news-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.news-popup-container {
  background: #ffffff;
  border-radius: 10px;
  max-width: 580px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: popupSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popupSlideUp {
  from { opacity: 0; transform: translateY(30px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.news-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid #e2e8f0;
}

.news-popup-header h3 {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.news-popup-close {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #94a3b8;
  line-height: 1;
  padding: 4px;
  transition: color 0.2s;
}

.news-popup-close:hover {
  color: #ef4444;
}

.news-popup-card {
  padding: 16px 20px;
  border-bottom: 1px solid #f1f5f9;
}

.news-popup-card:last-child {
  border-bottom: none;
}

.news-popup-card-title {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  text-align: center;
  margin-bottom: 8px;
}

.news-popup-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 8px;
}

.news-popup-body {
  font-size: 13px;
  color: #334155;
  line-height: 1.6;
  padding: 8px 0;
}

.news-popup-mark-btn {
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 7px 18px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: block;
  margin: 8px 0 0 auto;
  transition: background 0.2s;
}

.news-popup-mark-btn:hover {
  background: #1d4ed8;
}

/* ═══════════════════════════════════════
   BREADCRUMB BAR (STX AESTHETICS)
═══════════════════════════════════════ */
.stx-breadcrumb {
  background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 7px 16px;
  font-size: 12.5px;
  font-weight: 600;
  color: #4b5563;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.stx-crumb-link {
  color: #0284c7;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s;
}

.stx-crumb-link:hover {
  color: #0369a1;
  text-decoration: underline;
}

.stx-crumb-sep {
  margin: 0 8px;
  color: #9ca3af;
  font-size: 11px;
}

.stx-crumb-current {
  color: #374151;
  font-weight: 700;
}

/* ═══════════════════════════════════════
   QUICK ACCESS ROW (6 CARDS)
═══════════════════════════════════════ */
.quick-access-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

@media (max-width: 1024px) {
  .quick-access-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .quick-access-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    margin-bottom: 16px !important;
  }
  .quick-card {
    padding: 12px 6px 10px !important;
  }
  .quick-card-icon {
    width: 38px !important;
    height: 38px !important;
    margin-bottom: 6px !important;
  }
  .quick-card-icon svg {
    width: 34px !important;
    height: 34px !important;
  }
  .quick-card-label {
    font-size: 11.5px !important;
  }
}

.quick-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 12px 6px 10px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05), inset 0 1px 0 rgba(255,255,255,0.8);
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.quick-card:hover {
  background: linear-gradient(180deg, #e9ecef 0%, #dee2e6 100%) !important;
  border-color: #94a3b8 !important;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.06) !important;
}

.quick-card:hover .quick-card-label {
  text-decoration: underline !important;
  color: #0f172a !important;
}

.client-quick-card:hover {
  background: linear-gradient(180deg, #e9ecef 0%, #dee2e6 100%) !important;
  border-color: #94a3b8 !important;
}

.client-quick-card:hover span {
  text-decoration: underline !important;
  color: #0f172a !important;
}

.quick-card-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quick-card-icon svg {
  width: 36px;
  height: 36px;
}

.quick-card-label {
  font-size: 11.5px;
  font-weight: 700;
  color: #334155;
  letter-spacing: -0.01em;
  transition: color 0.1s ease;
}

/* ═══════════════════════════════════════
   DIGITAL FLIP-CLOCK WIDGET
═══════════════════════════════════════ */
.flip-clock-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 4px 0 24px;
}

.flip-clock-frame {
  background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 8px 16px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
}

.digit-box {
  background: #1e293b;
  color: #ffffff;
  font-family: 'Inter', -apple-system, monospace;
  font-size: 30px;
  font-weight: 900;
  width: 32px;
  height: 44px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.08);
}

.digit-box::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: rgba(0,0,0,0.4);
}

.digit-colon {
  font-size: 26px;
  font-weight: 900;
  color: #334155;
  margin: 0 2px;
  line-height: 1;
  width: 10px;
  display: inline-flex;
  justify-content: center;
  text-align: center;
}

.flip-clock-sub {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
  user-select: none;
}

.utc-pill {
  background: #0284c7;
  color: #ffffff;
  padding: 1.5px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

/* ═══════════════════════════════════════
   DASHBOARD STATS PILL (Clients · Numbers)
═══════════════════════════════════════ */
.dashboard-stats-pill-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin: -8px 0 10px 0;
  width: 100%;
}

.dashboard-stats-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, #f8fafc 0%, #edf2f7 100%);
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 5px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #475569;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  user-select: none;
  transition: all 0.2s ease;
}

.dashboard-stats-pill:hover {
  border-color: #94a3b8;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.dashboard-stats-pill .stats-pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0284c7;
  display: inline-block;
  box-shadow: 0 0 6px rgba(2, 132, 199, 0.6);
  flex-shrink: 0;
}

.dashboard-stats-pill .stats-pill-text {
  text-transform: uppercase;
  color: #475569;
}

html.dark .dashboard-stats-pill {
  background: linear-gradient(180deg, #1e293b 0%, #151e2e 100%);
  border-color: #334155;
  color: #94a3b8;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

html.dark .dashboard-stats-pill:hover {
  border-color: #475569;
}

html.dark .dashboard-stats-pill .stats-pill-dot {
  background: #38bdf8;
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.6);
}

html.dark .dashboard-stats-pill .stats-pill-text {
  color: #cbd5e1;
}

@media (max-width: 640px) {
  .dashboard-stats-pill-bar {
    justify-content: center;
    margin: 4px 0 12px 0;
  }
}

/* ═══════════════════════════════════════
   4 TOP KPI CARDS
═══════════════════════════════════════ */
.kpi-grid-ps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

@media (max-width: 1024px) {
  .kpi-grid-ps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .kpi-grid-ps {
    grid-template-columns: 1fr;
  }
}

.kpi-card-ps {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.kpi-left-ps {
  display: flex;
  align-items: center;
  gap: 12px;
}

.kpi-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.kpi-info-ps .kpi-label-ps {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 2px;
}

.kpi-info-ps .kpi-value-ps {
  font-size: 19px;
  font-weight: 900;
  color: #0284c7;
  line-height: 1.1;
}

.kpi-trend-ps {
  color: #16a34a;
  font-size: 16px;
  font-weight: 800;
}

/* ═══════════════════════════════════════
   MAIN CHART + RIGHT STATS SPLIT
═══════════════════════════════════════ */
.dashboard-main-split {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 14px;
  margin-bottom: 16px;
}

@media (max-width: 900px) {
  .dashboard-main-split {
    grid-template-columns: 1fr;
  }
}

.chart-card-ps {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
}

.chart-title-ps {
  font-size: 12px;
  font-weight: 800;
  color: #334155;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.side-stats-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.side-stat-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.side-stat-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.side-stat-num {
  font-size: 15px;
  font-weight: 900;
  line-height: 1.1;
  color: #059669;
}

.side-stat-num.blue { color: #0284c7; }
.side-stat-num.gold { color: #d97706; }
.side-stat-num.green { color: #059669; }
.side-stat-num.orange { color: #ea580c; }
.side-stat-num.slate { color: #334155; }

.side-stat-lbl {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-top: 1px;
}

/* ═══════════════════════════════════════
   BOTTOM 2 TABLES
═══════════════════════════════════════ */
.dashboard-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 800px) {
  .dashboard-bottom-grid {
    grid-template-columns: 1fr;
  }
}

.table-card-ps {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  overflow: hidden;
}

.table-header-ps {
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.table-header-title {
  font-size: 11.5px;
  font-weight: 800;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.table-count-badge {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
}

.table-header-btn {
  background: #0284c7 !important;
  color: #ffffff !important;
  border: none !important;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(2, 132, 199, 0.35);
  transition: background 0.15s ease, transform 0.1s ease;
}

.table-header-btn:hover {
  background: #0369a1 !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(2, 132, 199, 0.45);
}

.table-header-btn:active {
  background: #075985 !important;
  transform: translateY(0);
}


/* ═══════════════════════════════════════
   BREADCRUMB CARD (Metallic Silver)
═══════════════════════════════════════ */
.breadcrumb-card {
  background: linear-gradient(180deg, #fbfcfd 0%, #ebeef0 100%) !important;
  border: 1px solid #d5d9dd !important;
  border-radius: 4px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
  padding: 8px 16px !important;
  margin-bottom: 14px;
  font-size: 13px;
  color: #475569;
}

.breadcrumb-card a {
  color: #0284c7;
  text-decoration: none;
  font-weight: 500;
}

.breadcrumb-card a:hover {
  text-decoration: underline;
}

.breadcrumb-card .breadcrumb-separator {
  margin: 0 6px;
  color: #94a3b8;
  font-size: 11px;
}

/* ═══════════════════════════════════════════════════════
   STX TELECOM DESIGN SYSTEM (SMS MODULE & MY NUMBERS)
═══════════════════════════════════════════════════════ */

/* 1. Breadcrumb Container */
.stx-tc-breadcrumb {
  background: linear-gradient(180deg, #fbfcfd 0%, #ebeef0 100%) !important;
  border: 1px solid #d5d9dd !important;
  border-radius: 4px !important;
  padding: 8px 16px !important;
  font-size: 11.5px !important;
  color: #555555 !important;
  margin-bottom: 10px !important;
  display: flex !important;
  align-items: center !important;
  box-shadow: inset 0 1px 0 #ffffff, 0 1px 2px rgba(0,0,0,0.03) !important;
}
.stx-tc-breadcrumb a, .stx-tc-breadcrumb .crumb-link {
  color: #0284c7 !important;
  text-decoration: none !important;
  cursor: pointer !important;
  font-weight: 600 !important;
}
.stx-tc-breadcrumb a:hover, .stx-tc-breadcrumb .crumb-link:hover {
  text-decoration: underline !important;
}
.stx-tc-breadcrumb .crumb-sep {
  color: #9ca3af !important;
  margin: 0 7px !important;
  font-size: 11px !important;
}
.stx-tc-breadcrumb .crumb-curr {
  color: #555555 !important;
  font-weight: 500 !important;
}

/* 2. Instruction Subtitle */
.stx-tc-subtitle {
  font-size: 11.5px !important;
  color: #333333 !important;
  line-height: 1.45 !important;
  margin: 0 0 14px 2px !important;
}

/* 3. Filter Box */
.stx-tc-filter-box {
  background: linear-gradient(180deg, #fcfdfd 0%, #f4f5f7 100%) !important;
  border: 1px solid #d5d9dd !important;
  border-radius: 4px !important;
  padding: 10px 14px !important;
  box-shadow: inset 0 1px 0 #ffffff, 0 1px 2px rgba(0,0,0,0.03) !important;
  display: flex !important;
  align-items: flex-end !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  margin-bottom: 16px !important;
  position: relative !important;
  z-index: 60 !important;
}
.stx-tc-field-group {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}
.stx-tc-label {
  font-size: 11px !important;
  font-weight: 700 !important;
  color: #333333 !important;
  letter-spacing: 0.01em !important;
}
.stx-tc-input, .stx-tc-select {
  height: 28px !important;
  padding: 3px 8px !important;
  font-size: 12px !important;
  color: #333333 !important;
  background: #ffffff !important;
  border: 1px solid #cccccc !important;
  border-radius: 3px !important;
  box-shadow: inset 0 1px 1px rgba(0,0,0,0.075) !important;
  outline: none !important;
  box-sizing: border-box !important;
}
.stx-tc-input:focus, .stx-tc-select:focus {
  border-color: #66afe9 !important;
  box-shadow: inset 0 1px 1px rgba(0,0,0,0.075), 0 0 6px rgba(102,175,233,0.5) !important;
}
.stx-tc-input::placeholder {
  color: #999999 !important;
}

/* Searchable Select inside Filter Box */
.stx-tc-filter-box .searchable-select-picker {
  display: inline-block !important;
  vertical-align: middle !important;
}
.stx-tc-filter-box .searchable-select-input {
  height: 28px !important;
  padding-left: 24px !important;
  padding-right: 20px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  color: #333333 !important;
  background: #ffffff !important;
  border: 1px solid #cccccc !important;
  border-radius: 3px !important;
  box-shadow: inset 0 1px 1px rgba(0,0,0,0.075) !important;
  box-sizing: border-box !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
.stx-tc-filter-box .searchable-select-input:focus {
  border-color: #66afe9 !important;
  box-shadow: inset 0 1px 1px rgba(0,0,0,0.075), 0 0 6px rgba(102,175,233,0.5) !important;
}
.stx-tc-filter-box .searchable-select-input::placeholder,
.searchable-select-input::placeholder {
  color: #94a3b8 !important;
  font-weight: 400 !important;
  opacity: 1 !important;
}
html.dark .stx-tc-filter-box .searchable-select-input::placeholder,
html.dark .searchable-select-input::placeholder {
  color: #64748b !important;
  font-weight: 400 !important;
  opacity: 1 !important;
}
.stx-tc-filter-box .searchable-select-menu {
  min-width: 220px !important;
  max-height: 260px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 4px !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.16) !important;
  background: #ffffff !important;
}
.stx-tc-filter-box .searchable-opt-item {
  padding: 6px 10px !important;
  font-size: 12px !important;
}
.stx-tc-filter-box .searchable-opt-item:hover,
.stx-tc-filter-box .searchable-opt-item.searchable-opt-selected {
  background: #f1f5f9 !important;
}

/* SMS Test Panel Filter Card & Dropdown */
.tp-filter-card,
.stx-card.tp-filter-card {
  overflow: visible !important;
  position: relative !important;
  z-index: 1000 !important;
}
#tp-range-picker-container {
  position: relative !important;
  z-index: 1002 !important;
}
#tp-range-dropdown-list {
  z-index: 999999 !important;
}
#tp-range-dropdown-list::-webkit-scrollbar {
  width: 6px;
}
#tp-range-dropdown-list::-webkit-scrollbar-track {
  background: #f1f5f9;
}
#tp-range-dropdown-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
#tp-range-dropdown-list::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}


/* Filter Action Buttons */
.stx-tc-btn-filter {
  background: linear-gradient(180deg, #d9534f 0%, #c9302c 100%) !important;
  border: 1px solid #ac2925 !important;
  color: #ffffff !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  padding: 0 14px !important;
  height: 28px !important;
  border-radius: 3px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 1px 2px rgba(0,0,0,0.08) !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-shadow: 0 -1px 0 rgba(0,0,0,0.2) !important;
}
.stx-tc-btn-filter:hover {
  background: linear-gradient(180deg, #c9302c 0%, #ac2925 100%) !important;
}
.stx-tc-btn-reset {
  background: linear-gradient(180deg, #ffffff 0%, #e6e6e6 100%) !important;
  border: 1px solid #cccccc !important;
  color: #333333 !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  padding: 0 12px !important;
  height: 28px !important;
  border-radius: 3px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 1px 2px rgba(0,0,0,0.04) !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.stx-tc-btn-reset:hover {
  background: #e6e6e6 !important;
  border-color: #adadad !important;
}
.stx-tc-btn-search-blue {
  background: linear-gradient(180deg, #428bca 0%, #3071a9 100%) !important;
  border: 1px solid #285e8e !important;
  color: #ffffff !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  padding: 0 16px !important;
  height: 28px !important;
  border-radius: 3px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 1px 2px rgba(0,0,0,0.08) !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-shadow: 0 -1px 0 rgba(0,0,0,0.2) !important;
}
.stx-tc-btn-search-blue:hover {
  background: linear-gradient(180deg, #3071a9 0%, #285e8e 100%) !important;
}

/* Split Button Download */
.stx-tc-split-btn-wrap {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  z-index: 70 !important;
}
.stx-tc-split-main {
  background: linear-gradient(180deg, #ffffff 0%, #e6e6e6 100%) !important;
  border: 1px solid #cccccc !important;
  border-right: none !important;
  color: #333333 !important;
  font-size: 11.5px !important;
  font-weight: 500 !important;
  padding: 0 10px !important;
  height: 28px !important;
  border-radius: 3px 0 0 3px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2) !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
}
.stx-tc-split-caret {
  background: linear-gradient(180deg, #ffffff 0%, #e6e6e6 100%) !important;
  border: 1px solid #cccccc !important;
  color: #333333 !important;
  font-size: 9px !important;
  padding: 0 7px !important;
  height: 28px !important;
  border-radius: 0 3px 3px 0 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2) !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.searchable-select-menu::-webkit-scrollbar,
.country-dropdown-menu::-webkit-scrollbar,
#ba-ranges::-webkit-scrollbar,
#ba-user-list::-webkit-scrollbar {
  width: 6px;
}
.searchable-select-menu::-webkit-scrollbar-track,
.country-dropdown-menu::-webkit-scrollbar-track,
#ba-ranges::-webkit-scrollbar-track,
#ba-user-list::-webkit-scrollbar-track {
  background: #f1f5f9;
}
.searchable-select-menu::-webkit-scrollbar-thumb,
.country-dropdown-menu::-webkit-scrollbar-thumb,
#ba-ranges::-webkit-scrollbar-thumb,
#ba-user-list::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 4px;
}
.searchable-select-menu::-webkit-scrollbar-thumb:hover,
.country-dropdown-menu::-webkit-scrollbar-thumb:hover,
#ba-ranges::-webkit-scrollbar-thumb:hover,
#ba-user-list::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* Bulk Allocation dropdown & card overflow safety */
.card:has(#ba-range-dropdown),
.card:has(#ba-user-list),
.card.overflow-visible {
  overflow: visible !important;
}

#ba-ranges,
#ba-user-list {
  scrollbar-width: thin;
  scrollbar-color: #94a3b8 #f1f5f9;
}

html.dark #ba-range-dropdown,
html.dark #ba-user-list,
html.dark #ca-range-dropdown {
  background: #1e242c !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5) !important;
}

.stx-export-btn {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  color: #ffffff !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  padding: 6px 14px !important;
  border-radius: 5px !important;
  border: 1px solid #0284c7 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25) !important;
}

.stx-export-btn:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%) !important;
  border-color: #0369a1 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4) !important;
}

html.dark .stx-export-btn {
  background: #0284c7 !important;
  border-color: #0284c7 !important;
  color: #ffffff !important;
}

html.dark .stx-export-btn:hover {
  background: #38bdf8 !important;
  border-color: #38bdf8 !important;
  color: #0f172a !important;
}

html.dark #ba-range-select-trigger {
  background: #1e242c !important;
  border-color: #334155 !important;
}

html.dark #ba-ranges::-webkit-scrollbar-track,
html.dark #ba-user-list::-webkit-scrollbar-track {
  background: #151a23 !important;
}

html.dark #ba-ranges::-webkit-scrollbar-thumb,
html.dark #ba-user-list::-webkit-scrollbar-thumb {
  background: #475569 !important;
}

/* ═══════════════════════════════════════════════════════════════════
   PHASE 2: UNIFIED DATA TABLES & BENCHMARK HARMONIZATION (1:1)
═══════════════════════════════════════════════════════════════════ */

/* Canonical table headers (1:1 STX Telecom Benchmark - Light Mode) */
html:not(.dark) .stx-table th,
html:not(.dark) .fly-table th,
html:not(.dark) .data-table th {
  padding: 7px 10px !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  color: #333333 !important;
  text-align: left !important;
  border-bottom: 2px solid #cbd5e1 !important;
  border-right: 1px solid #e2e8f0 !important;
  white-space: nowrap !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  background: linear-gradient(180deg, #fbfcfd 0%, #f1f3f5 100%) !important;
}
html:not(.dark) .stx-table th:last-child,
html:not(.dark) .fly-table th:last-child,
html:not(.dark) .data-table th:last-child {
  border-right: none !important;
}

/* Canonical table rows and cells */
html:not(.dark) .stx-table td,
html:not(.dark) .fly-table td,
html:not(.dark) .data-table td {
  padding: 6px 10px !important;
  font-size: 11.5px !important;
  color: #333333 !important;
  border-bottom: 1px solid #e9edf0 !important;
  border-right: 1px solid #f1f5f9 !important;
  vertical-align: middle !important;
}
html:not(.dark) .stx-table td:last-child,
html:not(.dark) .fly-table td:last-child,
html:not(.dark) .data-table td:last-child {
  border-right: none !important;
}

html:not(.dark) .stx-table tbody tr,
html:not(.dark) .fly-table tbody tr,
html:not(.dark) .data-table tbody tr {
  background: #ffffff;
  border-bottom: 1px solid #e9edf0 !important;
  transition: background 0.1s ease !important;
}
html:not(.dark) .stx-table tbody tr:nth-child(even),
html:not(.dark) .fly-table tbody tr:nth-child(even),
html:not(.dark) .data-table tbody tr:nth-child(even) {
  background: #fbfcfd;
}
html:not(.dark) .stx-table tbody tr:hover,
html:not(.dark) .fly-table tbody tr:hover,
html:not(.dark) .data-table tbody tr:hover {
  background: #f0f7fd !important;
}

/* ═══════════════════════════════════════════════════════════════════
   PHASE 2: DARK THEME HARMONIZATION FOR TABLES, CARDS & FILTERS
═══════════════════════════════════════════════════════════════════ */

/* Dark Mode Cards & Containers */
html.dark .stx-card,
html.dark .card,
html.dark .stx-tc-card,
html.dark .tp-filter-card {
  background: #151a23 !important;
  border-color: #232a36 !important;
  color: #f8fafc !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
}

html.dark .stx-tc-card-header,
html.dark .card-header {
  background: linear-gradient(180deg, #1e2634 0%, #171e29 100%) !important;
  border-bottom: 1px solid #232a36 !important;
}

html.dark .stx-tc-card-title,
html.dark .card-title {
  color: #f8fafc !important;
}

html.dark .stx-tc-subtitle,
html.dark .stx-tc-breadcrumb,
html.dark .stx-tc-count-badge {
  color: #94a3b8 !important;
}

html.dark .stx-tc-breadcrumb a,
html.dark .stx-tc-breadcrumb .crumb-link {
  color: #38bdf8 !important;
}

/* Dark Mode Filters & Inputs */
html.dark .stx-tc-filter-box,
html.dark .filter-bar,
html.dark .filter-bar-labeled,
body.dark .filter-bar,
body.dark .filter-bar-labeled {
  background: linear-gradient(180deg, #18202d 0%, #131923 100%) !important;
  border-color: #232a36 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 1px 2px rgba(0,0,0,0.3) !important;
}

html.dark .stx-tc-label,
html.dark .filter-bar label,
html.dark .filter-field label,
body.dark .filter-bar label,
body.dark .filter-field label {
  color: #cbd5e1 !important;
}

html.dark .stx-tc-input,
html.dark .stx-tc-select,
html.dark .fly-input,
html.dark .fly-select,
html.dark .stx-input-sm,
html.dark .stx-select-sm,
html.dark .searchable-select-input,
html.dark .filter-select,
body.dark .filter-select {
  background: #0b0f19 !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4) !important;
}

html.dark .search-input,
body.dark .search-input {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%2394a3b8' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") no-repeat 10px center, #0b0f19 !important;
  background-color: #0b0f19 !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4) !important;
}

html.dark .stx-tc-input:focus,
html.dark .stx-tc-select:focus,
html.dark .searchable-select-input:focus,
html.dark .fly-input:focus,
html.dark .fly-select:focus {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2) !important;
}

html.dark .searchable-select-menu,
html.dark .country-dropdown-menu {
  background: #151a23 !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
}

html.dark .searchable-opt-item {
  color: #cbd5e1 !important;
}

html.dark .searchable-opt-item:hover,
html.dark .searchable-opt-item.searchable-opt-selected {
  background: #222d3d !important;
  color: #ffffff !important;
}

/* Dark Mode Test Panel Dropdown */
html.dark #tp-range-dropdown-list {
  background: #151a23 !important;
  border-color: #334155 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
}

html.dark .tp-range-item {
  color: #e2e8f0 !important;
  border-bottom-color: #1e2634 !important;
}

html.dark .tp-range-item:hover,
html.dark .tp-range-item.selected {
  background: #1e293b !important;
  color: #38bdf8 !important;
}

/* Dark Mode Table Headers */
html.dark .stx-tc-table,
html.dark .stx-table,
html.dark .fly-table,
html.dark .data-table {
  border-top-color: #232a36 !important;
  border-bottom-color: #232a36 !important;
}

html.dark .stx-tc-table thead tr,
html.dark .stx-table thead tr,
html.dark .fly-table thead tr,
html.dark .data-table thead tr,
html.dark .stx-table th,
html.dark .fly-table th,
html.dark .data-table th {
  background: linear-gradient(180deg, #1b2331 0%, #151c27 100%) !important;
  border-bottom-color: #2a3444 !important;
}

html.dark .stx-tc-table th,
html.dark .stx-table th,
html.dark .fly-table th,
html.dark .data-table th {
  color: #cbd5e1 !important;
  border-right-color: #232a36 !important;
}

/* Dark Mode Table Rows & Cells */
html.dark .stx-tc-table tbody tr,
html.dark .stx-table tbody tr,
html.dark .fly-table tbody tr,
html.dark .data-table tbody tr {
  background: #151a23 !important;
  border-bottom-color: #1e2634 !important;
}

html.dark .stx-tc-table tbody tr:nth-child(even),
html.dark .stx-table tbody tr:nth-child(even),
html.dark .fly-table tbody tr:nth-child(even),
html.dark .data-table tbody tr:nth-child(even) {
  background: #18202d !important;
}

html.dark .stx-tc-table tbody tr:hover,
html.dark .stx-table tbody tr:hover,
html.dark .fly-table tbody tr:hover,
html.dark .data-table tbody tr:hover {
  background: #202b3d !important;
}

html.dark .stx-tc-table tbody tr.row-selected,
html.dark .stx-table tbody tr.row-selected {
  background: #1e334d !important;
}

html.dark .stx-tc-table td,
html.dark .stx-table td,
html.dark .fly-table td,
html.dark .data-table td {
  color: #e2e8f0 !important;
  border-right-color: #1e2634 !important;
}

/* Dark Mode Export Buttons */
html.dark .stx-tc-export-btn,
html.dark .stx-btn-export,
html.dark .export-btn-group button {
  background: #1e293b !important;
  border: 1px solid #334155 !important;
  color: #e2e8f0 !important;
  box-shadow: none !important;
}

html.dark .stx-tc-export-btn:hover,
html.dark .stx-btn-export:hover,
html.dark .export-btn-group button:hover {
  background: #334155 !important;
  border-color: #475569 !important;
  color: #ffffff !important;
}

html.dark .stx-tc-btn-reset {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

html.dark .stx-tc-btn-reset:hover {
  background: #334155 !important;
  border-color: #475569 !important;
  color: #ffffff !important;
}

html.dark .stx-tc-split-main,
html.dark .stx-tc-split-caret {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

html.dark .stx-tc-seg-btn.active {
  background: #334155 !important;
  color: #ffffff !important;
}

html.dark .stx-tc-seg-btn.inactive {
  background: #151a23 !important;
  color: #94a3b8 !important;
}

/* Dark Mode Pagination Footers */
html.dark .stx-tc-footer,
html.dark .card-footer {
  background: #18202d !important;
  border-top-color: #232a36 !important;
  color: #94a3b8 !important;
}

html.dark .stx-tc-page-btn {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

html.dark .stx-tc-page-btn:hover:not(:disabled) {
  background: #334155 !important;
  border-color: #475569 !important;
}

html.dark .stx-tc-page-btn.active {
  background: #0284c7 !important;
  border-color: #0284c7 !important;
  color: #ffffff !important;
}

html.dark .stx-tc-page-btn:disabled {
  background: #151a23 !important;
  border-color: #232a36 !important;
  color: #475569 !important;
}

/* Dark Mode Status Badges */
html.dark .badge-success {
  background: rgba(16, 185, 129, 0.15) !important;
  color: #34d399 !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
}

html.dark .badge-danger {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #f87171 !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}

html.dark .badge-primary {
  background: rgba(99, 102, 241, 0.15) !important;
  color: #818cf8 !important;
  border-color: rgba(99, 102, 241, 0.3) !important;
}

html.dark .badge-warning {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #fbbf24 !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
}

html.dark .badge-info {
  background: rgba(59, 130, 246, 0.15) !important;
  color: #60a5fa !important;
  border-color: rgba(59, 130, 246, 0.3) !important;
}

html.dark .badge-secondary {
  background: rgba(148, 163, 184, 0.12) !important;
  color: #94a3b8 !important;
  border-color: rgba(148, 163, 184, 0.25) !important;
}

/* 4. STX Card & Strip Header */
html:not(.dark) .stx-tc-card {
  border: 1px solid #d5d9dd !important;
  border-radius: 4px !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03) !important;
  background: #ffffff !important;
  overflow: hidden !important;
}
html:not(.dark) .stx-tc-card-header {
  background: linear-gradient(180deg, #f5f5f5 0%, #e8e8e8 100%) !important;
  border-bottom: 1px solid #d5d9dd !important;
  height: 34px !important;
  min-height: 34px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 0 14px !important;
  box-sizing: border-box !important;
}
html:not(.dark) .stx-tc-card-title {
  font-weight: 800 !important;
  font-size: 11.5px !important;
  color: #333333 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
}
html:not(.dark) .stx-tc-card-header-actions {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}
html:not(.dark) .stx-tc-count-badge {
  font-size: 11.5px !important;
  color: #555555 !important;
}
html:not(.dark) .stx-tc-toggle-link {
  background: linear-gradient(180deg, #ffc107 0%, #e0a800 100%) !important;
  border: 1px solid #d39e00 !important;
  color: #212529 !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  padding: 2px 9px !important;
  height: 22px !important;
  line-height: 18px !important;
  border-radius: 3px !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 1px 1px rgba(0, 0, 0, 0.08) !important;
  transition: all 0.15s ease !important;
}
html:not(.dark) .stx-tc-toggle-link:hover {
  background: linear-gradient(180deg, #e0a800 0%, #c69500 100%) !important;
  border-color: #b98b00 !important;
  color: #000000 !important;
  text-decoration: none !important;
}
html:not(.dark) .stx-tc-toggle-link:active {
  background: #c69500 !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2) !important;
}

/* Action Buttons (Assign / Unassign / Return) */
html:not(.dark) .stx-tc-actions-row {
  padding: 8px 14px 4px 14px !important;
  display: flex !important;
  gap: 8px !important;
  align-items: center !important;
}
html:not(.dark) .stx-tc-btn-assign {
  background: linear-gradient(180deg, #428bca 0%, #3071a9 100%) !important;
  border: 1px solid #285e8e !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  font-size: 11.5px !important;
  height: 28px !important;
  padding: 0 16px !important;
  border-radius: 3px !important;
  cursor: pointer !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 1px 1px rgba(0,0,0,0.08) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-shadow: 0 -1px 0 rgba(0,0,0,0.2) !important;
}
html:not(.dark) .stx-tc-btn-assign:hover {
  background: linear-gradient(180deg, #3071a9 0%, #285e8e 100%) !important;
}
html:not(.dark) .stx-tc-btn-unassign {
  background: linear-gradient(180deg, #f0ad4e 0%, #ec971f 100%) !important;
  border: 1px solid #d58512 !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  font-size: 11.5px !important;
  height: 28px !important;
  padding: 0 16px !important;
  border-radius: 3px !important;
  cursor: pointer !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 1px 1px rgba(0,0,0,0.08) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-shadow: 0 -1px 0 rgba(0,0,0,0.2) !important;
}
html:not(.dark) .stx-tc-btn-unassign:hover {
  background: linear-gradient(180deg, #ec971f 0%, #d58512 100%) !important;
}
html:not(.dark) .stx-tc-btn-return {
  background: linear-gradient(180deg, #d9534f 0%, #c9302c 100%) !important;
  border: 1px solid #ac2925 !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  font-size: 11.5px !important;
  height: 28px !important;
  padding: 0 16px !important;
  border-radius: 3px !important;
  cursor: pointer !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 1px 1px rgba(0,0,0,0.08) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-shadow: 0 -1px 0 rgba(0,0,0,0.2) !important;
}

/* Controls & Export Row */
html:not(.dark) .stx-tc-controls-row {
  padding: 6px 14px 8px 14px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
}
html:not(.dark) .stx-tc-export-btn {
  background: linear-gradient(180deg, #ffffff 0%, #f0f0f0 100%) !important;
  border: 1px solid #cccccc !important;
  border-radius: 3px !important;
  padding: 0 9px !important;
  height: 24px !important;
  font-size: 11px !important;
  color: #333333 !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 1px 1px rgba(0,0,0,0.04) !important;
}
html:not(.dark) .stx-tc-export-btn:hover {
  background: #e6e6e6 !important;
  border-color: #adadad !important;
}
html:not(.dark) .stx-tc-segmented-wrap {
  display: inline-flex !important;
  border: 1px solid #cccccc !important;
  border-radius: 3px !important;
  overflow: hidden !important;
  height: 24px !important;
  margin-left: 6px !important;
}
html:not(.dark) .stx-tc-seg-btn {
  border: none !important;
  padding: 0 10px !important;
  font-size: 11px !important;
  height: 100% !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
html:not(.dark) .stx-tc-seg-btn.active {
  background: #d4d4d4 !important;
  color: #111827 !important;
  font-weight: 700 !important;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.12) !important;
}
html:not(.dark) .stx-tc-seg-btn.inactive {
  background: #ffffff !important;
  color: #4b5563 !important;
  font-weight: 500 !important;
}

/* Table */
html:not(.dark) .stx-tc-table {
  width: 100% !important;
  border-collapse: collapse !important;
  border-top: 1px solid #d5d9dd !important;
  border-bottom: 1px solid #d5d9dd !important;
  margin: 0 !important;
}
html:not(.dark) .stx-tc-table thead tr {
  background: linear-gradient(180deg, #fbfcfd 0%, #f1f3f5 100%) !important;
  border-bottom: 2px solid #cbd5e1 !important;
}
html:not(.dark) .stx-tc-table th {
  padding: 7px 10px !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  color: #333333 !important;
  text-align: left !important;
  border-right: 1px solid #e2e8f0 !important;
  white-space: nowrap !important;
}
html:not(.dark) .stx-tc-table th:last-child {
  border-right: none !important;
}
html:not(.dark) .stx-tc-table tbody tr {
  background: #ffffff;
  border-bottom: 1px solid #e9edf0 !important;
  transition: background 0.1s ease !important;
}
html:not(.dark) .stx-tc-table tbody tr:nth-child(even) {
  background: #fbfcfd;
}
html:not(.dark) .stx-tc-table tbody tr:hover {
  background: #f0f7fd !important;
}
html:not(.dark) .stx-tc-table tbody tr.row-selected {
  background: #e6f3fa !important;
}
html:not(.dark) .stx-tc-table td {
  padding: 6px 10px !important;
  font-size: 11.5px !important;
  color: #333333 !important;
  border-right: 1px solid #f1f5f9 !important;
  vertical-align: middle !important;
}
html:not(.dark) .stx-tc-table td:last-child {
  border-right: none !important;
}

/* Pagination Footer */
html:not(.dark) .stx-tc-footer {
  background: #f8fafc !important;
  border-top: 1px solid #d5d9dd !important;
  padding: 8px 14px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  font-size: 11.5px !important;
  color: #555555 !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
}
html:not(.dark) .stx-tc-page-btn {
  background: linear-gradient(180deg, #ffffff 0%, #eeeeee 100%) !important;
  border: 1px solid #d0d0d0 !important;
  border-radius: 3px !important;
  padding: 0 8px !important;
  height: 25px !important;
  font-size: 11px !important;
  color: #333333 !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 24px !important;
}
html:not(.dark) .stx-tc-page-btn:hover:not(:disabled) {
  background: #e6e6e6 !important;
  border-color: #adadad !important;
}
html:not(.dark) .stx-tc-page-btn.active {
  background: #ffffff !important;
  border: 1px solid #0284c7 !important;
  color: #0284c7 !important;
  font-weight: 700 !important;
  box-shadow: inset 0 0 0 1px #0284c7 !important;
}
html:not(.dark) .stx-tc-page-btn:disabled {
  background: #f5f5f5 !important;
  border: 1px solid #e0e0e0 !important;
  color: #b0b0b0 !important;
  cursor: not-allowed !important;
}

/* ═══════════════════════════════════════════════════════════════════
   STX TELECOM DARK THEME BENCHMARK (MY NUMBERS & ALL TABLES)
═══════════════════════════════════════════════════════════════════ */

/* 1. Dark Mode Card Container */
html.dark .stx-tc-card {
  background: #131b2e !important;
  border: 1px solid #1e293b !important;
  border-radius: 6px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
  overflow: hidden !important;
}

html.dark .stx-tc-card-header {
  background: linear-gradient(180deg, #182235 0%, #131b2e 100%) !important;
  border-bottom: 1px solid #1e293b !important;
  height: 36px !important;
  min-height: 36px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 0 14px !important;
  box-sizing: border-box !important;
}

html.dark .stx-tc-card-title {
  font-weight: 800 !important;
  font-size: 11.5px !important;
  color: #f8fafc !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
}

html.dark .stx-tc-card-header-actions {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

html.dark .stx-tc-count-badge {
  font-size: 11.5px !important;
  color: #94a3b8 !important;
  font-weight: 600 !important;
}

/* 2. Show all / Paginated Toggle Button */
html.dark .stx-tc-toggle-link {
  background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%) !important;
  border: 1px solid #0284c7 !important;
  color: #ffffff !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  padding: 2px 10px !important;
  height: 22px !important;
  line-height: 18px !important;
  border-radius: 4px !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
  transition: all 0.15s ease !important;
}

html.dark .stx-tc-toggle-link:hover {
  background: linear-gradient(180deg, #0ea5e9 0%, #0284c7 100%) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
}

/* 3. Action Buttons Row (Assign / Unassign / Return) */
html.dark .stx-tc-actions-row {
  padding: 8px 14px 4px 14px !important;
  display: flex !important;
  gap: 8px !important;
  align-items: center !important;
}

html.dark .stx-tc-btn-assign {
  background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%) !important;
  border: 1px solid #0284c7 !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  font-size: 11.5px !important;
  height: 28px !important;
  padding: 0 16px !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.15s ease !important;
}
html.dark .stx-tc-btn-assign:hover {
  background: linear-gradient(180deg, #0ea5e9 0%, #0284c7 100%) !important;
  border-color: #38bdf8 !important;
}

html.dark .stx-tc-btn-unassign {
  background: linear-gradient(180deg, #d97706 0%, #b45309 100%) !important;
  border: 1px solid #d97706 !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  font-size: 11.5px !important;
  height: 28px !important;
  padding: 0 16px !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.15s ease !important;
}
html.dark .stx-tc-btn-unassign:hover {
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%) !important;
  border-color: #fbbf24 !important;
}

html.dark .stx-tc-btn-return {
  background: linear-gradient(180deg, #dc2626 0%, #b91c1c 100%) !important;
  border: 1px solid #dc2626 !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  font-size: 11.5px !important;
  height: 28px !important;
  padding: 0 16px !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.15s ease !important;
}
html.dark .stx-tc-btn-return:hover {
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%) !important;
  border-color: #f87171 !important;
}

/* 4. Controls & Export Row */
html.dark .stx-tc-controls-row {
  padding: 6px 14px 8px 14px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  color: #cbd5e1 !important;
  font-size: 11.5px !important;
}

html.dark .stx-tc-controls-row > div,
html.dark .stx-tc-controls-row span,
html.dark .stx-tc-controls-row label,
html.dark #sms-records-container,
html.dark #sms-records-container span {
  color: #cbd5e1 !important;
  font-weight: 600 !important;
}

html.dark .stx-tc-export-btn {
  background: #1e293b !important;
  border: 1px solid #334155 !important;
  border-radius: 4px !important;
  padding: 0 10px !important;
  height: 25px !important;
  font-size: 11.5px !important;
  color: #cbd5e1 !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.15s ease !important;
}
html.dark .stx-tc-export-btn:hover {
  background: #334155 !important;
  border-color: #475569 !important;
  color: #ffffff !important;
}

html.dark .stx-tc-segmented-wrap {
  display: inline-flex !important;
  border: 1px solid #334155 !important;
  border-radius: 4px !important;
  overflow: hidden !important;
  height: 25px !important;
  margin-left: 6px !important;
  background: #0f172a !important;
}

html.dark .stx-tc-seg-btn {
  border: none !important;
  padding: 0 12px !important;
  font-size: 11px !important;
  height: 100% !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.15s ease !important;
}

html.dark .stx-tc-seg-btn.active {
  background: #0284c7 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
}

html.dark .stx-tc-seg-btn.inactive {
  background: #1e293b !important;
  color: #94a3b8 !important;
  font-weight: 500 !important;
}
html.dark .stx-tc-seg-btn.inactive:hover {
  background: #334155 !important;
  color: #ffffff !important;
}

/* 5. Dark Mode Table */
html.dark .stx-tc-table {
  width: 100% !important;
  border-collapse: collapse !important;
  border-top: 1px solid #1e293b !important;
  border-bottom: 1px solid #1e293b !important;
  margin: 0 !important;
  background: #131b2e !important;
}

html.dark .stx-tc-table thead tr {
  background: linear-gradient(180deg, #182235 0%, #131b2e 100%) !important;
  border-bottom: 1px solid #1e293b !important;
}

html.dark .stx-tc-table th {
  padding: 8px 10px !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  color: #94a3b8 !important;
  text-align: left !important;
  border-right: 1px solid #1e293b !important;
  border-bottom: 1px solid #1e293b !important;
  white-space: nowrap !important;
  letter-spacing: 0.04em !important;
}
html.dark .stx-tc-table th:last-child {
  border-right: none !important;
}

html.dark .stx-tc-table tbody tr {
  background: #131b2e !important;
  border-bottom: 1px solid #1e293b !important;
  transition: background 0.12s ease !important;
}
html.dark .stx-tc-table tbody tr:nth-child(even) {
  background: #151e33 !important;
}
html.dark .stx-tc-table tbody tr:hover {
  background: #1c273e !important;
}
html.dark .stx-tc-table tbody tr.row-selected {
  background: #1e334d !important;
}

html.dark .stx-tc-table td {
  padding: 7px 10px !important;
  font-size: 11.5px !important;
  color: #cbd5e1 !important;
  border-right: 1px solid #1e293b !important;
  border-bottom: 1px solid #1e293b !important;
  vertical-align: middle !important;
}
html.dark .stx-tc-table td:last-child {
  border-right: none !important;
}
html.dark .stx-tc-table td strong {
  color: #f8fafc !important;
  font-weight: 700 !important;
}

/* 6. Pagination Footer */
html.dark .stx-tc-footer {
  background: #131b2e !important;
  border-top: 1px solid #1e293b !important;
  padding: 10px 14px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  font-size: 11.5px !important;
  color: #94a3b8 !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
}

html.dark .stx-tc-page-btn {
  background: #1e293b !important;
  border: 1px solid #334155 !important;
  border-radius: 4px !important;
  padding: 0 9px !important;
  height: 26px !important;
  font-size: 11.5px !important;
  color: #cbd5e1 !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 26px !important;
  transition: all 0.15s ease !important;
}
html.dark .stx-tc-page-btn:hover:not(:disabled) {
  background: #334155 !important;
  border-color: #475569 !important;
  color: #ffffff !important;
}
html.dark .stx-tc-page-btn.active {
  background: #0284c7 !important;
  border-color: #0284c7 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 0 8px rgba(2, 132, 199, 0.4) !important;
}
html.dark .stx-tc-page-btn:disabled {
  background: #0f172a !important;
  border-color: #1e293b !important;
  color: #475569 !important;
  cursor: not-allowed !important;
  opacity: 0.5 !important;
}

/* 7. Universal Dark Table & Cell Border Overrides Across All Pages */
html.dark table,
html.dark .stx-table,
html.dark .fly-table,
html.dark .data-table,
html.dark .stx-tc-table {
  border-color: #1e293b !important;
}

html.dark table th,
html.dark table td,
html.dark .stx-table th,
html.dark .stx-table td,
html.dark .fly-table th,
html.dark .fly-table td,
html.dark .data-table th,
html.dark .data-table td,
html.dark .stx-tc-table th,
html.dark .stx-tc-table td {
  border-color: #1e293b !important;
  color: #cbd5e1 !important;
}

html.dark table tbody tr,
html.dark .stx-table tbody tr,
html.dark .fly-table tbody tr,
html.dark .data-table tbody tr,
html.dark .stx-tc-table tbody tr {
  border-bottom: 1px solid #1e293b !important;
}

html.dark table tbody tr:hover,
html.dark .stx-table tbody tr:hover,
html.dark .fly-table tbody tr:hover,
html.dark .data-table tbody tr:hover,
html.dark .stx-tc-table tbody tr:hover {
  background: #1c273e !important;
}

/* Checkbox Dark Mode Overrides */
html.dark input[type="checkbox"],
html.dark .stx-checkbox {
  accent-color: #0284c7 !important;
  cursor: pointer !important;
}

/* ═══════════════════════════════════════════════════════════════════
   ACTION BUTTONS DARK MODE HARMONIZATION (TABLE ACTIONS & BUTTONS)
═══════════════════════════════════════════════════════════════════ */
html.dark .action-btn {
  background: #1e293b !important;
  background-color: #1e293b !important;
  border: 1px solid #334155 !important;
  color: #e2e8f0 !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
  transition: all 0.15s ease !important;
}

html.dark .action-btn:hover {
  background: #334155 !important;
  background-color: #334155 !important;
  border-color: #475569 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
  transform: translateY(-1px) !important;
}

html.dark .action-btn svg {
  stroke: currentColor !important;
  vertical-align: middle !important;
}

/* Primary/Add buttons: e.g. "+ Add Numbers", "Create" */
html.dark .action-btn[title*="Add"],
html.dark .action-btn[title*="Create"],
html.dark .action-btn.action-btn-add,
html.dark .action-btn.action-btn-primary {
  background: rgba(2, 132, 199, 0.16) !important;
  background-color: rgba(2, 132, 199, 0.16) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  color: #38bdf8 !important;
}

html.dark .action-btn[title*="Add"]:hover,
html.dark .action-btn[title*="Create"]:hover,
html.dark .action-btn.action-btn-add:hover,
html.dark .action-btn.action-btn-primary:hover {
  background: #0284c7 !important;
  background-color: #0284c7 !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(2, 132, 199, 0.45) !important;
}

/* View buttons */
html.dark .action-btn[title*="View"],
html.dark .action-btn.action-btn-view {
  background: rgba(148, 163, 184, 0.12) !important;
  background-color: rgba(148, 163, 184, 0.12) !important;
  border: 1px solid rgba(148, 163, 184, 0.25) !important;
  color: #cbd5e1 !important;
}

html.dark .action-btn[title*="View"]:hover,
html.dark .action-btn.action-btn-view:hover {
  background: #334155 !important;
  background-color: #334155 !important;
  border-color: #475569 !important;
  color: #ffffff !important;
}

/* Edit buttons */
html.dark .action-btn[title*="Edit"],
html.dark .action-btn.action-btn-edit {
  background: rgba(245, 158, 11, 0.14) !important;
  background-color: rgba(245, 158, 11, 0.14) !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  color: #fbbf24 !important;
}

html.dark .action-btn[title*="Edit"]:hover,
html.dark .action-btn.action-btn-edit:hover {
  background: #d97706 !important;
  background-color: #d97706 !important;
  border-color: #f59e0b !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.35) !important;
}

/* Delete / Danger buttons */
html.dark .action-btn.delete,
html.dark .action-btn[title*="Delete"],
html.dark .action-btn.action-btn-delete,
html.dark .action-btn.action-btn-danger {
  background: rgba(239, 68, 68, 0.14) !important;
  background-color: rgba(239, 68, 68, 0.14) !important;
  border: 1px solid rgba(239, 68, 68, 0.35) !important;
  color: #f87171 !important;
}

html.dark .action-btn.delete:hover,
html.dark .action-btn[title*="Delete"]:hover,
html.dark .action-btn.action-btn-delete:hover,
html.dark .action-btn.action-btn-danger:hover {
  background: #dc2626 !important;
  background-color: #dc2626 !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.45) !important;
}

/* Exempt transparent/minimal inline buttons from forced backgrounds */
html.dark .action-btn[style*="background:transparent"],
html.dark .action-btn[style*="background: transparent"],
html.dark .action-btn[style*="background:none"],
html.dark .action-btn[style*="background: none"] {
  background: transparent !important;
  background-color: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

html.dark .edit-icon-btn {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}

html.dark .edit-icon-btn:hover {
  background: #334155 !important;
  border-color: #475569 !important;
  color: #ffffff !important;
}

/* Searchable Select & Country Picker Dropdowns */
.searchable-select-menu,
.country-dropdown-menu {
  max-height: 280px !important;
  overflow-y: auto !important;
  scroll-behavior: smooth !important;
}
.searchable-select-menu::-webkit-scrollbar,
.country-dropdown-menu::-webkit-scrollbar {
  width: 6px;
}
.searchable-select-menu::-webkit-scrollbar-track,
.country-dropdown-menu::-webkit-scrollbar-track {
  background: #f1f5f9;
}
.searchable-select-menu::-webkit-scrollbar-thumb,
.country-dropdown-menu::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.searchable-select-menu::-webkit-scrollbar-thumb:hover,
.country-dropdown-menu::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ═══════════════════════════════════════════════════════════════════
   PHASE 3: MODALS, FORM CONTROLS & USER DROPDOWN (DARK HARMONIZATION)
═══════════════════════════════════════════════════════════════════ */

/* Modals & Dialogs */
html.dark .modal {
  background: #151a23 !important;
  border: 1px solid #232a36 !important;
  color: #f8fafc !important;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6) !important;
}

html.dark .modal-header {
  background: linear-gradient(180deg, #1e2634 0%, #171e29 100%) !important;
  border-bottom: 1px solid #232a36 !important;
}

html.dark .modal-title {
  color: #f8fafc !important;
}

html.dark .modal-close {
  color: #94a3b8 !important;
}

html.dark .modal-close:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}

html.dark .modal-footer {
  background: #18202d !important;
  border-top: 1px solid #232a36 !important;
}

/* Modal Form Controls & Inputs */
html.dark .modal-body label,
html.dark .form-group label,
html.dark .fly-form-group label {
  color: #cbd5e1 !important;
}

html.dark .modal-body input:not([type="checkbox"]):not([type="radio"]),
html.dark .modal-body select,
html.dark .modal-body textarea,
html.dark .form-control {
  background: #0b0f19 !important;
  border: 1px solid #334155 !important;
  color: #f8fafc !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4) !important;
}

html.dark .modal-body input:focus,
html.dark .modal-body select:focus,
html.dark .modal-body textarea:focus,
html.dark .form-control:focus {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2) !important;
}

/* User Profile Dropdown Menu in Dark Mode */
html.dark .user-dropdown-menu {
  background: #151a23 !important;
  border: 1px solid #334155 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
}

html.dark .user-dropdown-body {
  background: #151a23 !important;
}

html.dark .user-dropdown-item {
  color: #cbd5e1 !important;
}

html.dark .user-dropdown-item:hover {
  background-color: #222d3d !important;
  color: #ffffff !important;
}

html.dark .user-dropdown-item.logout {
  color: #f87171 !important;
}

html.dark .user-dropdown-item.logout:hover {
  background-color: rgba(239, 68, 68, 0.15) !important;
  color: #ef4444 !important;
}

html.dark .dropdown-divider {
  border-top-color: #232a36 !important;
}

/* ═══════════════════════════════════════════════════════════════════
   DASHBOARD CARDS, WIDGETS & AUTH DARK THEME ENFORCEMENT
═══════════════════════════════════════════════════════════════════ */

/* 1. Breadcrumbs */
html.dark .stx-breadcrumb,
html.dark .breadcrumb-card {
  background: linear-gradient(180deg, #18202d 0%, #131923 100%) !important;
  border: 1px solid #232a36 !important;
  color: #94a3b8 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

html.dark .stx-crumb-link,
html.dark .breadcrumb-card a {
  color: #38bdf8 !important;
}

html.dark .stx-crumb-link:hover,
html.dark .breadcrumb-card a:hover {
  color: #7dd3fc !important;
}

html.dark .stx-crumb-sep {
  color: #64748b !important;
}

html.dark .stx-crumb-current {
  color: #f8fafc !important;
}

/* 2. Quick Access Row (6 Cards & Client Cards) */
html.dark .quick-card,
html.dark .client-quick-card {
  background: linear-gradient(180deg, #18202d 0%, #131923 100%) !important;
  border: 1px solid #232a36 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35) !important;
}

html.dark .quick-card:hover,
html.dark .client-quick-card:hover {
  background: linear-gradient(180deg, #222c3d 0%, #1a2230 100%) !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.2) !important;
}

html.dark .quick-card-label,
html.dark .client-quick-card span {
  color: #e2e8f0 !important;
}

html.dark .quick-card:hover .quick-card-label,
html.dark .client-quick-card:hover span {
  color: #38bdf8 !important;
  text-decoration: underline !important;
}

/* 3. Digital Flip-Clock Widget */
html.dark .flip-clock-frame {
  background: linear-gradient(180deg, #18202d 0%, #131923 100%) !important;
  border: 1px solid #232a36 !important;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.25) !important;
}

html.dark .digit-box {
  background: #0f172a !important;
  border: 1px solid #232a36 !important;
  color: #ffffff !important;
}

html.dark .digit-colon {
  color: #94a3b8 !important;
}

html.dark .flip-clock-sub {
  color: #94a3b8 !important;
}

/* 4. Top 4 KPI Cards */
html.dark .kpi-card-ps {
  background: linear-gradient(180deg, #18202d 0%, #131923 100%) !important;
  border: 1px solid #232a36 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35) !important;
}

html.dark .kpi-info-ps .kpi-label-ps {
  color: #94a3b8 !important;
}

html.dark .kpi-info-ps .kpi-value-ps {
  color: #38bdf8 !important;
}

html.dark .kpi-icon-box {
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* 5. Main Chart Card & Side Stats */
html.dark .chart-card-ps {
  background: #151a23 !important;
  border: 1px solid #232a36 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35) !important;
}

html.dark .chart-title-ps {
  color: #f8fafc !important;
  border-bottom-color: #232a36 !important;
}

html.dark .side-stats-card {
  background: #151a23 !important;
  border: 1px solid #232a36 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35) !important;
}

html.dark .side-stat-row {
  border-bottom: 1px solid #1e2634 !important;
  padding-bottom: 8px;
}

html.dark .side-stat-row:last-child {
  border-bottom: none !important;
  padding-bottom: 0;
}

html.dark .side-stat-lbl {
  color: #94a3b8 !important;
}

html.dark .side-stat-circle {
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* 6. Dashboard Bottom Tables Containers */
html.dark .table-card-ps {
  background: #151a23 !important;
  border: 1px solid #232a36 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

html.dark .table-header-ps {
  background: #1b2331 !important;
  border-bottom: 1px solid #2a3444 !important;
}

html.dark .table-header-title {
  color: #f8fafc !important;
}

html.dark .table-count-badge {
  background: #232a36 !important;
  border: 1px solid #334155 !important;
  color: #f8fafc !important;
}

/* 7. Subadmin Workspace Cards */
html.dark .subadmin-workspace-card {
  background: #151a23 !important;
  border: 1px solid #232a36 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) !important;
}

html.dark .subadmin-workspace-card strong {
  color: #f8fafc !important;
}

html.dark .subadmin-workspace-card:hover {
  background: #1c2330 !important;
  border-color: #38bdf8 !important;
}

/* 8. Global Footer Clean Integration (No White Strip) */
.stx-global-footer {
  background: transparent !important;
  border-top: 1px solid #e2e8f0;
  color: #64748b;
  padding: 20px 16px;
  margin-top: 24px;
}

html.dark .stx-global-footer {
  background: transparent !important;
  border-top-color: #232a36 !important;
  color: #94a3b8 !important;
}

html.dark .stx-global-footer .stx-footer-main {
  color: #cbd5e1 !important;
}

html.dark .stx-global-footer .stx-footer-sub {
  color: #64748b !important;
}

/* 9. Auth Pages (Login & Signup Cards) - Light Mode Enforced */
html.dark .auth-page,
.auth-page {
  background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 50%, #f8fafc 100%) !important;
}

html.dark .auth-card-modern,
.auth-card-modern {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.12), 0 0 20px rgba(2, 132, 199, 0.08) !important;
}

html.dark .auth-card-modern h2,
.auth-card-modern h2 {
  color: #0f172a !important;
}

html.dark .auth-card-modern input#l-user,
html.dark .auth-card-modern input#l-pass,
html.dark .auth-card-modern input#l-captcha {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

html.dark .auth-card-modern input#l-user::placeholder,
html.dark .auth-card-modern input#l-pass::placeholder,
html.dark .auth-card-modern input#l-captcha::placeholder {
  color: #64748b !important;
}

html.dark .auth-card-modern input#l-user:focus,
html.dark .auth-card-modern input#l-pass:focus {
  background: #0f172a !important;
  border-color: #00C6FF !important;
  box-shadow: 0 0 0 3px rgba(0, 198, 255, 0.2) !important;
}

html.dark .auth-card-modern .auth-captcha-pill {
  background: #1e293b !important;
  border-color: #334155 !important;
}

html.dark .auth-card-modern .auth-captcha-pill span {
  color: #94a3b8 !important;
}

html.dark .auth-card-modern #captcha-q {
  color: #38bdf8 !important;
}

html.dark .auth-card-modern #to-test-panel,
html.dark .auth-card-modern #to-login,
html.dark .auth-card-modern #auth-theme-toggle {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}

html.dark .auth-card-modern #to-test-panel:hover,
html.dark .auth-card-modern #to-login:hover,
html.dark .auth-card-modern #auth-theme-toggle:hover {
  border-color: #00C6FF !important;
  color: #00C6FF !important;
}

html.dark .auth-card-modern .auth-signup-link-wrap {
  color: #94a3b8 !important;
}

html.dark .auth-card-modern #to-signup {
  color: #38bdf8 !important;
}

html.dark .auth-card-success {
  background: #151a23 !important;
  border-color: #232a36 !important;
  color: #f8fafc !important;
}

html.dark .auth-card-success h2 {
  color: #f8fafc !important;
}

html.dark .signup-step-ind {
  background: #1e293b !important;
  color: #94a3b8 !important;
}

html.dark .signup-step-ind--active {
  background: #0284c7 !important;
  color: #ffffff !important;
}

/* ═══════════════════════════════════════════════════════════════
   COHESIVE DARK MODE SYSTEM (CREDIT NOTES, DATATABLES & FORMS)
   ═══════════════════════════════════════════════════════════════ */

/* Global Dark Theme Variable Overrides */
html.dark,
body.dark {
  --bg-page: #0b0f19;
  --bg-card: #131b2e;
  --card-bg: #131b2e;
  --bg-primary: #182235;
  --bg-secondary: #0f172a;
  --surface-bg: #151d2f;
  --border-color: #1e293b;
  --sidebar-bg: #0f172a;
  --sidebar-hover: #1e293b;
  --sidebar-active: #232d42;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border: #1e293b;
  --border-subtle: #1e293b;
  --border-input: #334155;
  --bg-input: #1e293b;
}

/* 1. Breadcrumbs & Filter Bar Dark Mode */
html.dark .stx-breadcrumb,
html.dark .breadcrumb-card,
html.dark .cn-breadcrumb-bar,
html.dark .cn-filter-box,
html.dark .tp-filter-card,
body.dark .stx-breadcrumb,
body.dark .cn-breadcrumb-bar,
body.dark .cn-filter-box {
  background: rgba(19, 27, 46, 0.85) !important;
  background-color: #131b2e !important;
  border: 1px solid #1e293b !important;
  color: #94a3b8 !important;
  border-radius: 6px !important;
}

html.dark .cn-breadcrumb-bar span,
html.dark .stx-breadcrumb span {
  color: #cbd5e1;
}

html.dark .cn-filter-box label,
html.dark .tp-filter-card label {
  color: #cbd5e1 !important;
}

/* 2. Global Card, Card Headers & DataTables Card */
html.dark .card,
html.dark .stx-card,
html.dark .credit-notes-view .stx-card,
html.dark .cn-table-card,
html.dark .table-card,
body.dark .card,
body.dark .stx-card {
  background: #131b2e !important;
  background-color: #131b2e !important;
  border: 1px solid #1e293b !important;
  border-color: #1e293b !important;
  color: #f8fafc !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.4) !important;
}

html.dark .card-header,
html.dark .stx-card-header,
html.dark .cn-card-title,
html.dark .table-header,
body.dark .card-header {
  background: #182235 !important;
  background-color: #182235 !important;
  border-bottom: 1px solid #1e293b !important;
  color: #f8fafc !important;
}

html.dark .cn-toolbar,
html.dark .stx-toolbar {
  background: #131b2e !important;
  background-color: #131b2e !important;
  border-bottom: 1px solid #1e293b !important;
  color: #cbd5e1 !important;
}

/* 3. Export Buttons (Copy, TXT, CSV, Excel) & Dropdowns */
html.dark .stx-pill-btn,
html.dark .stx-btn-dl,
html.dark .stx-btn-export,
html.dark .stx-tc-export-btn,
html.dark .export-btn-group button,
body.dark .stx-pill-btn {
  background: #1e293b !important;
  background-color: #1e293b !important;
  border: 1px solid #334155 !important;
  color: #cbd5e1 !important;
  box-shadow: none !important;
  border-radius: 4px !important;
  transition: all 0.15s ease-in-out !important;
}

html.dark .stx-pill-btn:hover,
html.dark .stx-btn-dl:hover,
html.dark .stx-btn-export:hover,
html.dark .stx-tc-export-btn:hover,
html.dark .export-btn-group button:hover,
body.dark .stx-pill-btn:hover {
  background: #334155 !important;
  background-color: #334155 !important;
  border-color: #475569 !important;
  color: #ffffff !important;
}

html.dark #cn-col-menu,
html.dark .searchable-select-menu,
html.dark .country-dropdown-menu,
html.dark #tp-range-dropdown-list {
  background: #1e293b !important;
  background-color: #1e293b !important;
  border: 1px solid #334155 !important;
  color: #e2e8f0 !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
}

/* 4. Global Form Controls & Input Styling */
html.dark .form-control,
html.dark .stx-input,
html.dark .stx-select,
html.dark .fly-input,
html.dark .flatpickr-input,
html.dark input[type="text"]:not(.btn),
html.dark input[type="search"],
html.dark input[type="number"],
html.dark input[type="password"],
html.dark select:not(.btn),
html.dark textarea,
body.dark .form-control,
body.dark .stx-input,
body.dark .stx-select {
  background: #1e293b !important;
  background-color: #1e293b !important;
  border: 1px solid #334155 !important;
  color: #e2e8f0 !important;
}

html.dark input::placeholder,
html.dark textarea::placeholder {
  color: #64748b !important;
}

html.dark input:focus,
html.dark select:focus,
html.dark textarea:focus {
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.25) !important;
  outline: none !important;
}

/* 5. Global Table Structure (Header, Rows, Stripes & Hover) */
html.dark .table,
html.dark .stx-table,
html.dark .fly-table,
html.dark .data-table,
html.dark .dataTable,
html.dark #credit-notes-table,
html.dark #admin-credit-notes-table,
body.dark .table,
body.dark .stx-table {
  background: #131b2e !important;
  background-color: #131b2e !important;
  color: #e2e8f0 !important;
  border-color: #1e293b !important;
}

html.dark .table thead,
html.dark .stx-table thead,
html.dark .fly-table thead,
html.dark .table th,
html.dark .stx-table th,
html.dark .fly-table th,
html.dark .data-table th,
html.dark #credit-notes-table th,
html.dark #admin-credit-notes-table th,
body.dark .table th,
body.dark .stx-table th {
  background: linear-gradient(180deg, #1e293b 0%, #151c28 100%) !important;
  background-color: #1e293b !important;
  color: #cbd5e1 !important;
  border-bottom: 1px solid #2a3444 !important;
  border-right: 1px solid #1e293b !important;
  font-weight: 700 !important;
}

html.dark .table tbody tr,
html.dark .stx-table tbody tr,
html.dark .fly-table tbody tr,
html.dark #credit-notes-table tbody tr,
html.dark #admin-credit-notes-table tbody tr,
body.dark .table tbody tr,
body.dark .stx-table tbody tr {
  background: #131b2e !important;
  background-color: #131b2e !important;
  color: #e2e8f0 !important;
  border-bottom: 1px solid #1e293b !important;
  transition: background-color 0.15s ease;
}

html.dark .table tbody tr:nth-child(even),
html.dark .stx-table tbody tr:nth-child(even),
html.dark .fly-table tbody tr:nth-child(even),
html.dark #credit-notes-table tbody tr:nth-child(even),
html.dark #admin-credit-notes-table tbody tr:nth-child(even),
body.dark .table tbody tr:nth-child(even),
body.dark .stx-table tbody tr:nth-child(even) {
  background: #162035 !important;
  background-color: #162035 !important;
}

html.dark .table tbody tr:hover,
html.dark .stx-table tbody tr:hover,
html.dark .fly-table tbody tr:hover,
html.dark #credit-notes-table tbody tr:hover,
html.dark #admin-credit-notes-table tbody tr:hover,
body.dark .table tbody tr:hover,
body.dark .stx-table tbody tr:hover {
  background: #1e293b !important;
  background-color: #1e293b !important;
}

html.dark .table td,
html.dark .stx-table td,
html.dark .fly-table td,
html.dark #credit-notes-table td,
html.dark #admin-credit-notes-table td,
body.dark .table td,
body.dark .stx-table td {
  color: #e2e8f0 !important;
  border-right: 1px solid #1e293b !important;
  border-bottom: 1px solid #1e293b !important;
}

/* 6. Table Footer & Universal Pagination Styling (Dark Mode) */
html.dark .stx-table-footer,
html.dark .cn-table-footer,
html.dark .card-footer,
html.dark .dataTables_paginate,
html.dark .stx-tc-footer,
html.dark .pagination-wrapper,
body.dark .stx-table-footer,
body.dark .cn-table-footer,
body.dark .card-footer,
body.dark .pagination-wrapper {
  background: #131b2e !important;
  background-color: #131b2e !important;
  border-top: 1px solid #1e293b !important;
  color: #94a3b8 !important;
}

html.dark .pagination-info,
body.dark .pagination-info {
  color: #94a3b8 !important;
  font-size: 12px !important;
}

html.dark .pagination-ellipsis,
body.dark .pagination-ellipsis {
  color: #64748b !important;
}

html.dark .stx-btn-page,
html.dark .stx-tc-page-btn,
html.dark .paginate_button,
html.dark .pagination-btn,
body.dark .stx-btn-page,
body.dark .stx-tc-page-btn,
body.dark .pagination-btn {
  background: #1e293b !important;
  background-color: #1e293b !important;
  border: 1px solid #334155 !important;
  color: #cbd5e1 !important;
  border-radius: 4px !important;
  font-size: 11.5px !important;
  transition: all 0.15s ease !important;
}

html.dark .stx-btn-page:hover:not(:disabled):not(.active),
html.dark .stx-tc-page-btn:hover:not(:disabled):not(.active),
html.dark .paginate_button:hover:not(.disabled):not(.current),
html.dark .pagination-btn:hover:not(:disabled):not(.active),
body.dark .stx-btn-page:hover:not(:disabled):not(.active),
body.dark .pagination-btn:hover:not(:disabled):not(.active) {
  background: #334155 !important;
  background-color: #334155 !important;
  border-color: #475569 !important;
  color: #ffffff !important;
}

html.dark .stx-btn-page.active,
html.dark .stx-tc-page-btn.active,
html.dark .paginate_button.current,
html.dark .pagination-btn.active,
body.dark .stx-btn-page.active,
body.dark .pagination-btn.active {
  background: #0284c7 !important;
  background-color: #0284c7 !important;
  border-color: #0284c7 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
}

html.dark .stx-btn-page:disabled,
html.dark .stx-tc-page-btn:disabled,
html.dark .paginate_button.disabled,
html.dark .pagination-btn:disabled,
body.dark .stx-btn-page:disabled,
body.dark .pagination-btn:disabled {
  background: #131b2e !important;
  background-color: #131b2e !important;
  border-color: #1e293b !important;
  color: #64748b !important;
  opacity: 0.4 !important;
  cursor: not-allowed !important;
}

/* 7. Flatpickr Calendar Popup in Dark Mode */
html.dark .flatpickr-calendar {
  background: #131b2e !important;
  border: 1px solid #1e293b !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6) !important;
  color: #f8fafc !important;
  border-radius: 8px !important;
}

html.dark .flatpickr-months,
html.dark .flatpickr-month,
html.dark .flatpickr-current-month {
  background: #182235 !important;
  color: #f8fafc !important;
  fill: #f8fafc !important;
  border-radius: 8px 8px 0 0 !important;
}

html.dark .flatpickr-weekdays,
html.dark span.flatpickr-weekday {
  background: #182235 !important;
  color: #94a3b8 !important;
}

html.dark .flatpickr-day {
  color: #cbd5e1 !important;
  border-radius: 4px !important;
}

html.dark .flatpickr-day:hover,
html.dark .flatpickr-day.prevMonthDay:hover,
html.dark .flatpickr-day.nextMonthDay:hover {
  background: #1e293b !important;
  border-color: #334155 !important;
}

html.dark .flatpickr-day.selected,
html.dark .flatpickr-day.startRange,
html.dark .flatpickr-day.endRange {
  background: #0284c7 !important;
  border-color: #0284c7 !important;
  color: #ffffff !important;
}

html.dark .flatpickr-day.prevMonthDay,
html.dark .flatpickr-day.nextMonthDay {
  color: #475569 !important;
}

/* 8. Global Buttons & Cards Dark Mode Enforcement */
html.dark .sidebar,
body.dark .sidebar {
  background: #11151c !important;
  background-color: #11151c !important;
  border-right: 1px solid #1e2532 !important;
}

html.dark .sidebar-logo,
body.dark .sidebar-logo {
  border-bottom: 1px solid #1e2532 !important;
}

html.dark .ssp-s,
body.dark .ssp-s {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

html.dark .sidebar-group-header,
body.dark .sidebar-group-header {
  color: #64748b !important;
}

html.dark .sidebar-group-header:hover,
body.dark .sidebar-group-header:hover {
  color: #f8fafc !important;
  background: #1b2230 !important;
}

html.dark .sidebar-nav-item,
body.dark .sidebar-nav-item {
  color: #cbd5e1 !important;
  background: transparent !important;
}

html.dark .sidebar-nav-item svg,
body.dark .sidebar-nav-item svg {
  color: #94a3b8 !important;
}

html.dark .sidebar-nav-item:hover,
body.dark .sidebar-nav-item:hover {
  color: #ffffff !important;
  background: #1b2230 !important;
}

html.dark .sidebar-nav-item:hover svg,
body.dark .sidebar-nav-item:hover svg {
  color: #38bdf8 !important;
}

html.dark .sidebar-nav-item.active,
body.dark .sidebar-nav-item.active {
  color: #ffffff !important;
  background: #222b3d !important;
}

html.dark .sidebar-user,
body.dark .sidebar-user {
  background: #11151c !important;
  border-top: 1px solid #1e2532 !important;
}

html.dark .sidebar-user-name,
body.dark .sidebar-user-name {
  color: #f8fafc !important;
}

html.dark .sidebar-user-role,
body.dark .sidebar-user-role {
  color: #94a3b8 !important;
}

html.dark .sidebar-logout,
body.dark .sidebar-logout {
  color: #94a3b8 !important;
}

html.dark .stx-btn:not(.stx-btn-primary):not(.stx-btn-danger):not(.stx-btn-filter):not(.stx-btn-success),
html.dark .fly-btn:not(.stx-btn-primary):not(.stx-btn-danger):not(.stx-btn-filter):not(.stx-btn-success),
html.dark .fly-btn-white,
body.dark .stx-btn:not(.stx-btn-primary):not(.stx-btn-danger):not(.stx-btn-filter):not(.stx-btn-success),
body.dark .fly-btn:not(.stx-btn-primary):not(.stx-btn-danger):not(.stx-btn-filter):not(.stx-btn-success),
body.dark .fly-btn-white {
  background: #1e293b !important;
  background-color: #1e293b !important;
  color: #e2e8f0 !important;
  border: 1px solid #334155 !important;
}

html.dark .stx-btn:not(.stx-btn-primary):not(.stx-btn-danger):not(.stx-btn-filter):not(.stx-btn-success):hover,
html.dark .fly-btn:not(.stx-btn-primary):not(.stx-btn-danger):not(.stx-btn-filter):not(.stx-btn-success):hover,
html.dark .fly-btn-white:hover,
body.dark .stx-btn:not(.stx-btn-primary):not(.stx-btn-danger):not(.stx-btn-filter):not(.stx-btn-success):hover,
body.dark .fly-btn:not(.stx-btn-primary):not(.stx-btn-danger):not(.stx-btn-filter):not(.stx-btn-success):hover,
body.dark .fly-btn-white:hover {
  background: #334155 !important;
  background-color: #334155 !important;
  border-color: #475569 !important;
  color: #ffffff !important;
}

html.dark .stat-card,
html.dark .stat-card-item,
body.dark .stat-card,
body.dark .stat-card-item {
  background: #131b2e !important;
  color: #f8fafc !important;
  border: 1px solid #1e293b !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.4) !important;
}

html.dark .stat-card-value,
body.dark .stat-card-value {
  color: #f8fafc !important;
}

html.dark .stat-card-label,
body.dark .stat-card-label {
  color: #94a3b8 !important;
}

html.dark .stat-card-icon,
body.dark .stat-card-icon {
  background: #1e293b !important;
  color: #38bdf8 !important;
  border: 1px solid #334155 !important;
}

html.dark .mobile-menu-btn,
body.dark .mobile-menu-btn {
  background: #1e293b !important;
  border: 1px solid #334155 !important;
  color: #f8fafc !important;
}

html.dark .top-bar-avatar,
body.dark .top-bar-avatar {
  background: #1e293b !important;
  color: #f8fafc !important;
  border: 1px solid #334155 !important;
}

html.dark .hierarchy-card,
body.dark .hierarchy-card {
  background: #131b2e !important;
  border-color: #1e293b !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
}

html.dark .hierarchy-self,
body.dark .hierarchy-self {
  background: #182235 !important;
  border-color: #3b82f6 !important;
}

html.dark .hierarchy-name,
body.dark .hierarchy-name {
  color: #f8fafc !important;
}

/* 9. STX-TC Tables & Cards Dark Mode */
html.dark .stx-tc-card {
  background: #131b2e !important;
  border: 1px solid #1e293b !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.4) !important;
}

html.dark .stx-tc-card-header {
  background: #182235 !important;
  border-bottom: 1px solid #1e293b !important;
}

html.dark .stx-tc-card-title {
  color: #f8fafc !important;
}

html.dark .stx-tc-count-badge {
  color: #94a3b8 !important;
}

html.dark .stx-tc-actions-row,
html.dark .stx-tc-controls-row {
  background: #131b2e !important;
}

html.dark .stx-tc-segmented-wrap {
  border-color: #334155 !important;
}

html.dark .stx-tc-seg-btn.inactive {
  background: #1e293b !important;
  color: #94a3b8 !important;
}

html.dark .stx-tc-seg-btn.active {
  background: #334155 !important;
  color: #ffffff !important;
}

html.dark .stx-tc-table {
  background: #131b2e !important;
  border-color: #1e293b !important;
}

html.dark .stx-tc-table thead tr {
  background: linear-gradient(180deg, #1e293b 0%, #151c28 100%) !important;
  border-bottom: 1px solid #2a3444 !important;
}

html.dark .stx-tc-table th {
  color: #cbd5e1 !important;
  border-right: 1px solid #1e293b !important;
}

html.dark .stx-tc-table tbody tr {
  background: #131b2e !important;
  border-bottom: 1px solid #1e293b !important;
}

html.dark .stx-tc-table tbody tr:nth-child(even) {
  background: #162035 !important;
}

html.dark .stx-tc-table tbody tr:hover {
  background: #1e293b !important;
}

html.dark .stx-tc-table td {
  color: #e2e8f0 !important;
  border-right: 1px solid #1e293b !important;
}

/* ═══════════════════════════════════════
   CREDIT NOTES MODULE — LIGHT & DARK THEME
═══════════════════════════════════════ */
.credit-notes-view {
  font-family: inherit;
  max-width: 100%;
  margin: 0 auto;
}

.cn-breadcrumb-bar {
  background: var(--card-bg, #ffffff) !important;
  border: 1px solid var(--border, #e2e8f0) !important;
  border-radius: 6px !important;
  padding: 10px 16px !important;
  font-size: 12.5px !important;
  color: var(--text-secondary, #64748b) !important;
  margin-bottom: 8px !important;
  display: flex !important;
  align-items: center !important;
  transition: background var(--transition), border-color var(--transition) !important;
}

html.dark .cn-breadcrumb-bar {
  background: #131b2e !important;
  border-color: #1e293b !important;
  color: #94a3b8 !important;
}

.cn-card-title {
  background: var(--surface-bg, #f8fafc) !important;
  border-bottom: 1px solid var(--border, #e2e8f0) !important;
  padding: 12px 16px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  color: var(--text-primary, #1e293b) !important;
  letter-spacing: 0.04em !important;
}

html.dark .cn-card-title {
  background: #182235 !important;
  border-bottom-color: #1e293b !important;
  color: #f8fafc !important;
}

.cn-col-menu {
  background: var(--card-bg, #ffffff) !important;
  border: 1px solid var(--border-input, #cbd5e1) !important;
  border-radius: 6px !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
  z-index: 100 !important;
  min-width: 180px !important;
  padding: 12px 14px !important;
  color: var(--text-primary, #0f172a) !important;
}

html.dark .cn-col-menu {
  background: #1e293b !important;
  border-color: #334155 !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
  color: #cbd5e1 !important;
}

.cn-filter-box {
  background: var(--card-bg, #ffffff) !important;
  border: 1px solid var(--border, #e2e8f0) !important;
  border-radius: 8px !important;
  box-shadow: var(--card-shadow) !important;
  padding: 16px 20px !important;
  margin-bottom: 16px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  transition: background var(--transition), border-color var(--transition) !important;
}

html.dark .cn-filter-box {
  background: #131b2e !important;
  border-color: #1e293b !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.4) !important;
}

.cn-filter-box .stx-input {
  height: 36px !important;
  padding: 6px 12px !important;
  border: 1px solid var(--border-input, #cbd5e1) !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  background: var(--bg-input, #ffffff) !important;
  color: var(--text-primary, #0f172a) !important;
}

html.dark .cn-filter-box .stx-input {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

.cn-inspector-bar {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: var(--surface-bg, #f1f5f9) !important;
  padding: 6px 12px !important;
  border-radius: 6px !important;
  border: 1px solid var(--border, #e2e8f0) !important;
}

html.dark .cn-inspector-bar {
  background: #182235 !important;
  border-color: #1e293b !important;
}

.cn-inspector-bar input {
  height: 30px !important;
  padding: 2px 8px !important;
  border: 1px solid var(--border-input, #cbd5e1) !important;
  background: var(--bg-input, #ffffff) !important;
  color: var(--text-primary, #0f172a) !important;
  border-radius: 4px !important;
  font-family: monospace !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  width: 140px !important;
  text-transform: uppercase !important;
}

html.dark .cn-inspector-bar input {
  border-color: #334155 !important;
  background: #1e293b !important;
  color: #f8fafc !important;
}

.cn-table-card {
  background: var(--card-bg, #ffffff) !important;
  border: 1px solid var(--border, #e2e8f0) !important;
  border-radius: 8px !important;
  box-shadow: var(--card-shadow) !important;
  overflow: hidden !important;
  transition: background var(--transition), border-color var(--transition) !important;
}

html.dark .cn-table-card {
  background: #131b2e !important;
  border-color: #1e293b !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.4) !important;
}

.cn-toolbar {
  padding: 12px 20px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  border-bottom: 1px solid var(--border, #e2e8f0) !important;
  background: var(--card-bg, #ffffff) !important;
}

html.dark .cn-toolbar {
  background: #131b2e !important;
  border-bottom-color: #1e293b !important;
}

.cn-toolbar .stx-select,
.cn-toolbar .stx-input {
  border: 1px solid var(--border-input, #cbd5e1) !important;
  background: var(--bg-input, #ffffff) !important;
  color: var(--text-primary, #0f172a) !important;
}

html.dark .cn-toolbar .stx-select,
html.dark .cn-toolbar .stx-input {
  border-color: #334155 !important;
  background: #1e293b !important;
  color: #e2e8f0 !important;
}

.cn-toolbar .stx-pill-btn {
  background: var(--surface-bg, #f1f5f9) !important;
  color: var(--text-primary, #334155) !important;
  border: 1px solid var(--border, #cbd5e1) !important;
  padding: 5px 12px !important;
  border-radius: 4px !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
}

html.dark .cn-toolbar .stx-pill-btn {
  background: #1e293b !important;
  color: #cbd5e1 !important;
  border-color: #334155 !important;
}

.stx-table thead tr {
  border-bottom: 1px solid var(--border, #e2e8f0) !important;
  background: var(--surface-bg, #f8fafc) !important;
}

html.dark .stx-table thead tr {
  border-bottom-color: #2a3444 !important;
  background: #1e293b !important;
}

.stx-table th {
  padding: 10px 14px !important;
  font-weight: 700 !important;
  color: var(--text-primary, #1e293b) !important;
  background: var(--surface-bg, #f8fafc) !important;
  border-right: 1px solid var(--border, #e2e8f0) !important;
}

html.dark .stx-table th {
  color: #cbd5e1 !important;
  background: #1e293b !important;
  border-right-color: #1e293b !important;
}

.stx-table tbody tr.cn-row-even {
  background: var(--card-bg, #ffffff) !important;
}
.stx-table tbody tr.cn-row-odd {
  background: var(--surface-bg, #f8fafc) !important;
}

html.dark .stx-table tbody tr.cn-row-even {
  background: #131b2e !important;
}
html.dark .stx-table tbody tr.cn-row-odd {
  background: #162035 !important;
}

.stx-table tbody tr:hover {
  background: var(--surface-bg, #f1f5f9) !important;
}

html.dark .stx-table tbody tr:hover {
  background: #1e293b !important;
}

.stx-table td {
  padding: 10px 14px !important;
  border-bottom: 1px solid var(--border, #e2e8f0) !important;
  border-right: 1px solid var(--border, #e2e8f0) !important;
  color: var(--text-primary, #0f172a) !important;
}

html.dark .stx-table td {
  border-bottom-color: #1e293b !important;
  border-right-color: #1e293b !important;
  color: #cbd5e1 !important;
}

.cn-table-footer {
  padding: 12px 20px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  background: var(--card-bg, #ffffff) !important;
  border-top: 1px solid var(--border, #e2e8f0) !important;
  font-size: 12px !important;
  color: var(--text-secondary, #64748b) !important;
}

html.dark .cn-table-footer {
  background: #131b2e !important;
  border-top-color: #1e293b !important;
  color: #94a3b8 !important;
}

.cn-table-footer .stx-btn-page {
  padding: 4px 10px !important;
  background: var(--surface-bg, #f1f5f9) !important;
  color: var(--text-primary, #334155) !important;
  border: 1px solid var(--border, #cbd5e1) !important;
  border-radius: 3px !important;
  cursor: pointer !important;
}

html.dark .cn-table-footer .stx-btn-page {
  background: #1e293b !important;
  color: #cbd5e1 !important;
  border-color: #334155 !important;
}

.cn-table-footer .stx-btn-page.active {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-color: #0284c7 !important;
  font-weight: 700 !important;
}

/* ══════════════════════════════════════════════════════════════
   TASK 3: COMPREHENSIVE DARK MODE & DESIGN AUDIT
   Standardize all container cards on bg-[#0f172a] / bg-[#131b2e]
   with slate-800 borders (#1e293b). Purge all stray white containers.
   ══════════════════════════════════════════════════════════════ */

/* 1. Modern Authentication Card (Login, Forgot Password, 2FA Challenge, Signup) */
html.dark .auth-card-modern {
  background: #0f172a !important;
  background-color: #0f172a !important;
  border: 1px solid #1e293b !important;
  color: #f8fafc !important;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
}

html.dark .auth-card-modern h2 {
  color: #f8fafc !important;
}

html.dark .auth-card-modern label {
  color: #cbd5e1 !important;
}

html.dark .auth-card-modern input:not([type="checkbox"]):not([type="radio"]) {
  background: #1e293b !important;
  background-color: #1e293b !important;
  color: #f8fafc !important;
  border-color: #334155 !important;
}

html.dark .auth-card-modern input:not([type="checkbox"]):not([type="radio"]):focus {
  background: #1e293b !important;
  background-color: #1e293b !important;
  border-color: #00C6FF !important;
  box-shadow: 0 0 0 3px rgba(0, 198, 255, 0.2) !important;
}

html.dark .auth-captcha-pill {
  background: #1e293b !important;
  border-color: #334155 !important;
}

html.dark .auth-captcha-pill span {
  color: #cbd5e1 !important;
}

html.dark .auth-captcha-pill input {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

html.dark .auth-signup-link-wrap {
  color: #94a3b8 !important;
}

/* 2. Purge Stray Light Containers & Standardize Cards */
html.dark .bg-white,
html.dark .card-light,
html.dark .card-white,
html.dark [class*="card-white"],
html.dark [class*="bg-white"] {
  background: #131b2e !important;
  background-color: #131b2e !important;
  color: #f8fafc !important;
  border-color: #1e293b !important;
}

/* Universal Card Standardization on bg-[#0f172a] / bg-[#131b2e] with border-slate-800 */
html.dark .card,
html.dark .stx-card,
html.dark .fly-card,
html.dark .stat-card,
html.dark .cn-table-card,
html.dark .tp-filter-card,
html.dark .credit-notes-view .cn-table-card,
html.dark .sms-cdr-page .stx-card,
html.dark div[style*="background: #fff"],
html.dark div[style*="background:#fff"],
html.dark div[style*="background: #ffffff"],
html.dark div[style*="background:#ffffff"],
html.dark div[style*="background: rgb(255, 255, 255)"] {
  background: #131b2e !important;
  background-color: #131b2e !important;
  border-color: #1e293b !important;
  color: #f8fafc !important;
}

/* Inner header rows or containers with light slate / grey backgrounds */
html.dark .card > div:first-child,
html.dark .stx-card > div:first-child,
html.dark div[style*="background: #eceff1"],
html.dark div[style*="background:#eceff1"],
html.dark div[style*="background: #f8fafc"],
html.dark div[style*="background:#f8fafc"],
html.dark div[style*="background: #f1f5f9"],
html.dark div[style*="background:#f1f5f9"] {
  background: #182235 !important;
  background-color: #182235 !important;
  border-color: #1e293b !important;
  color: #f8fafc !important;
}

/* Card Titles, Headers, and Typography in Dark Mode */
html.dark .card h2,
html.dark .card h3,
html.dark .card h4,
html.dark .stx-card h2,
html.dark .stx-card h3,
html.dark .stx-card h4,
html.dark .card strong,
html.dark .stx-card strong {
  color: #f8fafc !important;
}

html.dark .card label,
html.dark .stx-card label,
html.dark .card span:not(.badge):not(.nav-sub-bullet),
html.dark .stx-card span:not(.badge):not(.nav-sub-bullet) {
  color: #cbd5e1;
}

/* 3. Account Settings & Profile Specific Container Fixes */
html.dark #profile-avatar-preview {
  background: #131b2e !important;
  border-color: #0284c7 !important;
}

html.dark input[readonly].fly-input {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #94a3b8 !important;
}

/* 4. Breadcrumbs Standardization in Dark Mode */
html.dark .stx-breadcrumb,
html.dark .stx-tc-breadcrumb,
html.dark .sms-breadcrumb,
html.dark .breadcrumb-card,
html.dark .cn-breadcrumb-bar {
  background: #131b2e !important;
  background-color: #131b2e !important;
  border: 1px solid #1e293b !important;
  color: #94a3b8 !important;
}

html.dark .stx-tc-breadcrumb .crumb-curr,
html.dark .stx-breadcrumb .stx-crumb-current,
html.dark .crumb-curr {
  color: #94a3b8 !important;
  font-weight: 600 !important;
}

html.dark .stx-tc-breadcrumb a,
html.dark .stx-breadcrumb .stx-crumb-link,
html.dark .stx-tc-breadcrumb .crumb-link {
  color: #38bdf8 !important;
}

html.dark .stx-tc-subtitle {
  color: #94a3b8 !important;
}

/* 5. STX-TC Filter Box & Form Elements in Dark Mode */
html.dark .stx-tc-filter-box {
  background: #131b2e !important;
  background-color: #131b2e !important;
  border: 1px solid #1e293b !important;
  box-shadow: none !important;
}

html.dark .stx-tc-label {
  color: #cbd5e1 !important;
}

html.dark .stx-tc-input,
html.dark .stx-tc-select,
html.dark .stx-tc-filter-box .searchable-select-input {
  background: #1e293b !important;
  background-color: #1e293b !important;
  border: 1px solid #334155 !important;
  color: #f8fafc !important;
  box-shadow: none !important;
}

html.dark .stx-tc-btn-reset,
html.dark .stx-tc-split-main,
html.dark .stx-tc-split-caret {
  background: #1e293b !important;
  border: 1px solid #334155 !important;
  color: #cbd5e1 !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

html.dark .stx-tc-btn-reset:hover,
html.dark .stx-tc-split-main:hover,
html.dark .stx-tc-split-caret:hover {
  background: #334155 !important;
  color: #ffffff !important;
}

/* 6. DataTables Structure & Pagination Blending */
html.dark .dataTables_wrapper,
html.dark .dataTables_length,
html.dark .dataTables_filter,
html.dark .dataTables_info,
html.dark .dataTables_processing {
  color: #94a3b8 !important;
}

html.dark .dataTables_length select,
html.dark .dataTables_filter input {
  background: #1e293b !important;
  border: 1px solid #334155 !important;
  color: #f8fafc !important;
  border-radius: 4px !important;
  padding: 4px 8px !important;
}

html.dark .dataTables_paginate .paginate_button {
  background: #1e293b !important;
  border: 1px solid #334155 !important;
  color: #cbd5e1 !important;
  border-radius: 4px !important;
}

html.dark .dataTables_paginate .paginate_button:hover:not(.current):not(.disabled) {
  background: #334155 !important;
  border-color: #475569 !important;
  color: #ffffff !important;
}

html.dark .dataTables_paginate .paginate_button.current,
html.dark .dataTables_paginate .paginate_button.current:hover {
  background: #0284c7 !important;
  border-color: #0284c7 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
}

html.dark .dataTables_paginate .paginate_button.disabled,
html.dark .dataTables_paginate .paginate_button.disabled:hover {
  background: #131b2e !important;
  border-color: #1e293b !important;
  color: #64748b !important;
  opacity: 0.4 !important;
}

/* ═══════════════════════════════════════════════════════════════
   7. UNIVERSAL MODALS, TOASTS & AGENT SUB-TABLES DARK THEME AUDIT
   ═══════════════════════════════════════════════════════════════ */

/* Base Styles: Agent Children Expansion & Toggle Pill */
.agent-toggle-pill {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
  font-weight: 700;
  border-radius: 12px;
  padding: 3px 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.agent-children-panel {
  padding: 14px 20px;
  background: #f8fafc;
  border-left: 4px solid #0284c7;
  border-bottom: 1px solid #cbd5e1;
  margin: 4px 0 10px 0;
  border-radius: 0 8px 8px 0;
}

.agent-children-title {
  font-weight: 700;
  font-size: 13px;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
}

.agent-children-tag {
  font-size: 11px;
  color: #64748b;
  background: #e2e8f0;
  padding: 2px 8px;
  border-radius: 10px;
}

.agent-children-empty {
  padding: 18px;
  text-align: center;
  color: #64748b;
  font-size: 12.5px;
  background: #ffffff;
  border-radius: 6px;
  border: 1px dashed #cbd5e1;
}

.agent-children-table-wrapper {
  overflow-x: auto;
  background: #ffffff;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.agent-sub-table thead {
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
}

.agent-sub-row {
  border-bottom: 1px solid #f1f5f9;
}

.agent-sub-username {
  color: #0f172a;
}

/* ── Dark Mode Overrides: Modals & Dialogs ── */
html.dark .modal-overlay,
body.dark .modal-overlay {
  background: rgba(11, 15, 25, 0.78) !important;
  backdrop-filter: blur(8px) !important;
}

html.dark .modal,
html.dark .modal-content,
html.dark .modal-dialog,
html.dark .fly-modal-content,
html.dark .success-modal,
body.dark .modal,
body.dark .modal-content,
body.dark .modal-dialog,
body.dark .fly-modal-content,
body.dark .success-modal {
  background: #131b2e !important;
  border: 1px solid #1e293b !important;
  color: #f8fafc !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
}

html.dark .modal-header,
html.dark .modal-dialog > div:first-child,
body.dark .modal-header {
  background: #182235 !important;
  border-bottom: 1px solid #1e293b !important;
  color: #f8fafc !important;
}

html.dark .modal-title,
html.dark .modal-dialog h4,
body.dark .modal-title {
  color: #f8fafc !important;
}

html.dark .modal-close,
html.dark .modal-dialog button[onclick*="closeModal"],
body.dark .modal-close {
  color: #94a3b8 !important;
}

html.dark .modal-close:hover,
html.dark .modal-dialog button[onclick*="closeModal"]:hover,
body.dark .modal-close:hover {
  background: #1e293b !important;
  color: #ffffff !important;
}

html.dark .modal-body,
body.dark .modal-body {
  background: #131b2e !important;
  color: #cbd5e1 !important;
}

html.dark .modal-footer,
body.dark .modal-footer {
  background: #131b2e !important;
  border-top: 1px solid #1e293b !important;
}

html.dark .modal input,
html.dark .modal select,
html.dark .modal textarea,
html.dark .modal-dialog input,
html.dark .modal-dialog select,
html.dark .modal-dialog textarea,
body.dark .modal input,
body.dark .modal select,
body.dark .modal textarea,
body.dark .modal-dialog input,
body.dark .modal-dialog select,
body.dark .modal-dialog textarea {
  background: #1e293b !important;
  border: 1px solid #334155 !important;
  color: #f8fafc !important;
}

html.dark .modal input::placeholder,
html.dark .modal textarea::placeholder,
html.dark .modal-dialog input::placeholder,
html.dark .modal-dialog textarea::placeholder {
  color: #64748b !important;
}

html.dark .modal label,
html.dark .modal-dialog label,
body.dark .modal label,
body.dark .modal-dialog label {
  color: #cbd5e1 !important;
}

html.dark .fly-btn.secondary,
html.dark .fly-btn.fly-btn-secondary,
html.dark .fly-btn-outline,
body.dark .fly-btn.secondary,
body.dark .fly-btn.fly-btn-secondary,
body.dark .fly-btn-outline {
  background: #1e293b !important;
  border: 1px solid #334155 !important;
  color: #cbd5e1 !important;
}

html.dark .fly-btn.secondary:hover,
html.dark .fly-btn.fly-btn-secondary:hover,
html.dark .fly-btn-outline:hover,
body.dark .fly-btn.secondary:hover,
body.dark .fly-btn.fly-btn-secondary:hover,
body.dark .fly-btn-outline:hover {
  background: #334155 !important;
  color: #ffffff !important;
}

html.dark .success-title {
  color: #f8fafc !important;
}
html.dark .success-msg {
  color: #94a3b8 !important;
}
html.dark .success-circle-bg {
  stroke: #1e293b !important;
}

/* ── Dark Mode Overrides: Toasts ── */
html.dark .toast,
body.dark .toast {
  background: #131b2e !important;
  border: 1px solid #1e293b !important;
  color: #f8fafc !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
}

html.dark .toast-title,
body.dark .toast-title {
  color: #f8fafc !important;
}

html.dark .toast-sub,
html.dark .toast-message,
html.dark .toast-body,
body.dark .toast-sub,
body.dark .toast-message,
body.dark .toast-body {
  color: #cbd5e1 !important;
}

/* ── Dark Mode Overrides: Hierarchy Map ── */
html.dark .hierarchy-card,
body.dark .hierarchy-card {
  background: #131b2e !important;
  border: 1.5px solid #1e293b !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35) !important;
  color: #f8fafc !important;
}

html.dark .hierarchy-card:hover,
body.dark .hierarchy-card:hover {
  border-color: #334155 !important;
  background: #182235 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45) !important;
}

html.dark .hierarchy-self,
body.dark .hierarchy-self {
  background: #182235 !important;
  border-color: #0284c7 !important;
  box-shadow: 0 0 12px rgba(2, 132, 199, 0.25) !important;
}

html.dark .hierarchy-name,
body.dark .hierarchy-name {
  color: #f8fafc !important;
}

html.dark .hierarchy-meta,
body.dark .hierarchy-meta {
  color: #94a3b8 !important;
}

/* ── Dark Mode Overrides: Agent Children Sub-Tables ── */
html.dark .agent-toggle-pill {
  background: rgba(2, 132, 199, 0.2) !important;
  color: #38bdf8 !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
}

html.dark .agent-children-row,
html.dark [id^="agent-children-"] {
  background: #0b0f19 !important;
}

html.dark .agent-children-panel {
  background: #0f172a !important;
  border-left-color: #0284c7 !important;
  border-bottom-color: #1e293b !important;
}

html.dark .agent-children-title {
  color: #f8fafc !important;
}

html.dark .agent-children-tag {
  background: #1e293b !important;
  color: #94a3b8 !important;
}

html.dark .agent-children-empty {
  background: #131b2e !important;
  border-color: #1e293b !important;
  color: #94a3b8 !important;
}

html.dark .agent-children-table-wrapper {
  background: #131b2e !important;
  border-color: #1e293b !important;
}

html.dark .agent-sub-table thead {
  background: #182235 !important;
  border-bottom-color: #1e293b !important;
}

html.dark .agent-sub-table th {
  color: #cbd5e1 !important;
  border-color: #1e293b !important;
}

html.dark .agent-sub-row {
  border-bottom-color: #1e293b !important;
}

html.dark .agent-sub-table td {
  border-bottom-color: #1e293b !important;
  color: #cbd5e1 !important;
}

html.dark .agent-sub-username {
  color: #f8fafc !important;
}

/* ==========================================================================
   STX PANEL — BONUS POINT DAILY REWARDS MODULE & NAVIGATION POLISH
   ========================================================================== */

/* Active State for DAILY BONUS and Direct Sidebar Tabs (Matching image_7.png & reference navigation pill) */
.nav-accordion-header[data-page="bonus-point"] {
  transition: all 0.15s ease;
}

.nav-accordion-header[data-page="bonus-point"]:hover {
  background: #353a42 !important;
}

.nav-accordion-header[data-page="bonus-point"].active-direct,
.nav-accordion-header.active-direct {
  background: #ffffff !important;
  color: #0f172a !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.nav-accordion-header[data-page="bonus-point"].active-direct .nav-acc-title,
.nav-accordion-header.active-direct .nav-acc-title {
  color: #0f172a !important;
  font-weight: 700 !important;
}

.nav-accordion-header[data-page="bonus-point"].active-direct .nav-acc-arrow,
.nav-accordion-header.active-direct .nav-acc-arrow {
  display: none !important;
}

.nav-accordion-header[data-page="bonus-point"] .nav-acc-icon svg {
  transition: transform 0.2s ease;
}

.nav-accordion-header[data-page="bonus-point"]:hover .nav-acc-icon svg {
  transform: scale(1.05);
}

/* Topbar Bonus Status Widget */
.top-bar-bonus-widget {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.top-bar-bonus-btn {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
}

.top-bar-bonus-btn:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  transform: translateY(-1px);
}

.bonus-widget-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  font-size: 9px;
  font-weight: 900;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  padding: 1px 5px;
  border-radius: 10px;
  line-height: 1.2;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.7);
  animation: pulse-bonus-badge 2s infinite ease-in-out;
}

@keyframes pulse-bonus-badge {
  0% { transform: scale(1); box-shadow: 0 0 4px rgba(16, 185, 129, 0.4); }
  50% { transform: scale(1.12); box-shadow: 0 0 12px rgba(16, 185, 129, 0.85); }
  100% { transform: scale(1); box-shadow: 0 0 4px rgba(16, 185, 129, 0.4); }
}

/* ==========================================================================
   STX PANEL — DAILY BONUS MODULE (Identical to image_7.png specification)
   ========================================================================== */

.bonus-page-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 20px;
}

/* Breadcrumbs & Notice on Page Background */
.bonus-page-wrapper .bonus-breadcrumb-bar {
  font-size: 12.5px;
  color: #94a3b8 !important;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.bonus-page-wrapper .bonus-breadcrumb-bar .crumb-link {
  color: #38bdf8 !important;
  cursor: pointer;
  font-weight: 600;
}

.bonus-page-wrapper .bonus-breadcrumb-bar .crumb-active {
  color: #f8fafc !important;
  font-weight: 700;
}

.bonus-page-wrapper .bonus-notice-text {
  font-size: 13px;
  color: #cbd5e1 !important;
  margin-bottom: 14px;
}

/* White Card Surfaces (Strictly White & Isolated from Dark Theme Card Overrides) */
.bonus-card,
html.dark .bonus-card,
body.dark .bonus-card,
html:not(.dark) .bonus-card {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 8px !important;
  margin-bottom: 24px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
  overflow: hidden !important;
  color: #111827 !important;
}

/* Section Sub-Header Bar (TODAY / YOUR BONUSES) */
.bonus-card-header,
html.dark .bonus-card-header,
body.dark .bonus-card-header,
html:not(.dark) .bonus-card-header {
  background: #f3f4f6 !important;
  background-color: #f3f4f6 !important;
  padding: 10px 16px !important;
  border-bottom: 1px solid #e5e7eb !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  color: #111827 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
}

/* Card Body */
.bonus-card-body,
html.dark .bonus-card-body,
body.dark .bonus-card-body {
  padding: 20px !important;
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #111827 !important;
}

/* Progress Bar Section */
.bonus-progress-label,
html.dark .bonus-progress-label {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #111827 !important;
  margin-bottom: 8px !important;
}

.bonus-progress-track,
html.dark .bonus-progress-track,
body.dark .bonus-progress-track {
  width: 100% !important;
  height: 13px !important;
  background: #e5e7eb !important;
  background-color: #e5e7eb !important;
  border: none !important;
  border-radius: 6px !important;
  overflow: hidden !important;
  box-shadow: none !important;
}

.bonus-progress-fill,
html.dark .bonus-progress-fill,
body.dark .bonus-progress-fill {
  height: 100% !important;
  background: #f59e0b !important;
  background-color: #f59e0b !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  transition: width 0.3s ease !important;
}

/* Metrics Table (Clean Alternating Layout) */
.bonus-metrics-table,
html.dark .bonus-metrics-table,
body.dark .bonus-metrics-table {
  width: 100% !important;
  border-collapse: collapse !important;
  border: 1px solid #e5e7eb !important;
  margin-bottom: 12px !important;
  background: #ffffff !important;
  background-color: #ffffff !important;
  border-radius: 6px !important;
  overflow: hidden !important;
}

.bonus-metrics-table tr,
html.dark .bonus-metrics-table tr {
  border-bottom: 1px solid #e5e7eb !important;
  background: #ffffff !important;
}

.bonus-metrics-table td.label-col,
html.dark .bonus-metrics-table td.label-col {
  background: #f9fafb !important;
  background-color: #f9fafb !important;
  color: #374151 !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  padding: 10px 16px !important;
  width: 45% !important;
  border-right: 1px solid #e5e7eb !important;
}

.bonus-metrics-table td.value-col,
html.dark .bonus-metrics-table td.value-col {
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #111827 !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  padding: 10px 16px !important;
}

.bonus-warning-footer,
html.dark .bonus-warning-footer {
  font-size: 12.5px !important;
  color: #4b5563 !important;
  padding-top: 4px !important;
}

/* Bottom Card: YOUR BONUSES Table */
.bonus-history-table,
html.dark .bonus-history-table,
body.dark .bonus-history-table {
  width: 100% !important;
  border-collapse: collapse !important;
  text-align: left !important;
  font-size: 12.5px !important;
  background: #ffffff !important;
  background-color: #ffffff !important;
}

.bonus-history-table thead tr,
html.dark .bonus-history-table thead tr {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border-bottom: 2px solid #e5e7eb !important;
}

.bonus-history-table th,
html.dark .bonus-history-table th,
body.dark .bonus-history-table th {
  padding: 10px 16px !important;
  font-weight: 700 !important;
  color: #374151 !important;
  font-size: 11.5px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  background: #ffffff !important;
  background-color: #ffffff !important;
  border-right: none !important;
  border-bottom: 2px solid #e5e7eb !important;
}

.bonus-history-table tbody tr,
html.dark .bonus-history-table tbody tr,
body.dark .bonus-history-table tbody tr {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border-bottom: 1px solid #f3f4f6 !important;
  transition: background 0.15s ease !important;
}

.bonus-history-table tbody tr:hover,
html.dark .bonus-history-table tbody tr:hover {
  background: #f9fafb !important;
  background-color: #f9fafb !important;
}

.bonus-history-table td,
html.dark .bonus-history-table td,
body.dark .bonus-history-table td {
  padding: 10px 16px !important;
  color: #111827 !important;
  font-size: 12.5px !important;
  border-bottom: 1px solid #f3f4f6 !important;
  border-right: none !important;
  background: transparent !important;
}

.bonus-history-empty,
html.dark .bonus-history-empty {
  text-align: center !important;
  padding: 32px 16px !important;
  color: #6b7280 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  background: #ffffff !important;
}

/* Pagination Bar */
.bonus-pagination-bar,
html.dark .bonus-pagination-bar,
body.dark .bonus-pagination-bar {
  padding: 12px 18px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  border-top: 1px solid #e5e7eb !important;
  font-size: 12px !important;
  color: #6b7280 !important;
  background: #ffffff !important;
  background-color: #ffffff !important;
}

.bonus-page-btn,
html.dark .bonus-page-btn,
body.dark .bonus-page-btn {
  padding: 4px 10px !important;
  font-size: 11.5px !important;
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #374151 !important;
  border: 1px solid #d1d5db !important;
  border-radius: 3px !important;
  cursor: pointer !important;
  outline: none !important;
}

.bonus-page-btn.active,
html.dark .bonus-page-btn.active {
  font-weight: 700 !important;
  background: #f3f4f6 !important;
  background-color: #f3f4f6 !important;
  color: #111827 !important;
  border: 1px solid #cbd5e1 !important;
}

.bonus-page-btn:disabled,
html.dark .bonus-page-btn:disabled {
  color: #9ca3af !important;
  cursor: not-allowed !important;
  background: #ffffff !important;
  border-color: #e5e7eb !important;
}

.bonus-claim-btn {
  background: #10b981 !important;
  color: #ffffff !important;
  border: none !important;
  font-weight: 700 !important;
  font-size: 12px !important;
  padding: 6px 16px !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.bonus-claim-btn:hover {
  background: #059669 !important;
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════════
   STX ENTERPRISE SETTINGS & ACCOUNT VIEWS (2FA & NOTIFICATIONS)
═══════════════════════════════════════════════════════════════ */
.stx-settings-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  background: #ffffff;
  overflow: hidden;
  margin-bottom: 22px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

html.dark .stx-settings-card {
  background: #151a23 !important;
  border-color: #232a36 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
}

.stx-card-header-bar {
  background: linear-gradient(180deg, #f8fafc 0%, #edf2f7 100%);
  border-bottom: 1px solid #e2e8f0;
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

html.dark .stx-card-header-bar {
  background: linear-gradient(180deg, #1c232f 0%, #171d28 100%) !important;
  border-bottom-color: #262e3d !important;
}

.stx-card-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  color: #1e293b;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

html.dark .stx-card-header-title {
  color: #f8fafc !important;
}

.stx-card-body {
  padding: 20px 22px;
}

/* Switches */
.stx-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.stx-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.stx-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 24px;
}

html.dark .stx-slider {
  background-color: #334155;
}

.stx-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.stx-switch input:checked + .stx-slider {
  background-color: #0284c7;
}

.stx-switch.switch-emerald input:checked + .stx-slider {
  background-color: #10b981;
}

.stx-switch input:checked + .stx-slider:before {
  transform: translateX(20px);
}

/* Test Dispatcher Cards */
.stx-test-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: all 0.2s ease;
}

.stx-test-card:hover {
  border-color: #38bdf8;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.08);
  transform: translateY(-2px);
}

html.dark .stx-test-card {
  background: #111722 !important;
  border-color: #232a36 !important;
}

html.dark .stx-test-card:hover {
  border-color: #0284c7 !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4) !important;
}

.stx-test-btn {
  width: 100%;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  background: #ffffff;
  color: #0284c7;
  border-color: #cbd5e1;
}

.stx-test-btn:hover:not(:disabled) {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
}

.stx-test-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

html.dark .stx-test-btn {
  background: #19202b !important;
  color: #38bdf8 !important;
  border-color: #2c3647 !important;
}

html.dark .stx-test-btn:hover:not(:disabled) {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-color: #0284c7 !important;
}

/* ═══════════════════════════════════════
   SMS TEST PANEL (TABBED DESIGN 1:1)
═══════════════════════════════════════ */
.tp-tab-btn {
  border-radius: 4px;
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  outline: none;
}

.tp-tab-btn:hover {
  background: #f8fafc;
  color: #0f172a;
}

.tp-tab-btn.active {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-color: #0284c7 !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

html.dark .tp-tab-btn {
  background: #151d2f;
  border-color: #26334a;
  color: #94a3b8;
}

html.dark .tp-tab-btn:hover {
  background: #1c273e;
  color: #f8fafc;
}

html.dark .tp-tab-btn.active {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-color: #0284c7 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SMS TEST PANEL: 1:1 REPLICATION OF REFERENCE DESIGN (LAMIX SMS)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Public test panel page container */
.public-test-panel-page {
  background: #edf1f5 !important;
  color: #333333 !important;
  min-height: 100vh;
}

/* Card container matching reference */
.tp-main-card {
  background: #ffffff !important;
  border: 1px solid #d2d6de !important;
  border-radius: 3px !important;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05) !important;
  margin-bottom: 24px;
  overflow: visible;
}

/* Card Header Strip */
.tp-card-header {
  background: linear-gradient(to bottom, #ffffff 0%, #f4f4f4 100%) !important;
  border-bottom: 1px solid #d2d6de !important;
  padding: 8px 14px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  min-height: 42px !important;
}

.tp-card-header-title {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #333333 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.02em !important;
}

/* Filter Card in Tab 1 */
.tp-filter-box {
  background: #ffffff !important;
  border: 1px solid #d2d6de !important;
  border-radius: 3px !important;
  padding: 12px 16px !important;
  margin-bottom: 15px !important;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05) !important;
}

/* Table styling */
.tp-table-wrapper {
  overflow-x: auto;
  border: none !important;
}

.tp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  background: #ffffff !important;
}

.tp-table thead tr {
  background: #ffffff !important;
  border-bottom: 2px solid #dee2e6 !important;
}

.tp-table th {
  padding: 8px 14px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #333333 !important;
  border-top: none !important;
  border-bottom: none !important;
  text-align: left;
}

.tp-table tbody tr {
  background: #ffffff !important;
  border-bottom: 1px solid #f4f4f4 !important;
  transition: background 0.1s ease;
}

.tp-table tbody tr:hover {
  background: #f9f9f9 !important;
}

.tp-table td {
  padding: 8px 14px !important;
  font-size: 12px !important;
  color: #333333 !important;
  border-top: none !important;
  border-bottom: none !important;
}

/* Export buttons */
.tp-export-btn {
  background: #ffffff !important;
  border: 1px solid #cccccc !important;
  border-radius: 3px !important;
  padding: 3px 10px !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  color: #333333 !important;
  cursor: pointer;
  transition: all 0.15s ease;
  outline: none;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.tp-export-btn:hover {
  background: #e6e6e6 !important;
  border-color: #adadad !important;
  color: #333333 !important;
}

/* Inputs & Selects */
.tp-input {
  background: #ffffff !important;
  border: 1px solid #cccccc !important;
  border-radius: 3px !important;
  padding: 3px 8px !important;
  font-size: 12px !important;
  color: #333333 !important;
  outline: none;
}

/* Footer */
.tp-pagination-footer {
  padding: 10px 14px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  border-top: 1px solid #e5e7eb !important;
  background: #ffffff !important;
  font-size: 12px !important;
  color: #777777 !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
}

/* Connected DataTables Pagination Buttons */
.tp-pagination-group {
  display: inline-flex !important;
  border-radius: 3px !important;
  overflow: hidden !important;
}

.tp-pagination-group button {
  background: #ffffff !important;
  border: 1px solid #dddddd !important;
  color: #337ab7 !important;
  padding: 4px 10px !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  cursor: pointer !important;
  margin-left: -1px !important;
  outline: none !important;
  border-radius: 0 !important;
}

.tp-pagination-group button:first-child {
  margin-left: 0 !important;
  border-top-left-radius: 3px !important;
  border-bottom-left-radius: 3px !important;
}

.tp-pagination-group button:last-child {
  border-top-right-radius: 3px !important;
  border-bottom-right-radius: 3px !important;
}

.tp-pagination-group button:hover:not(:disabled):not(.active) {
  background: #eeeeee !important;
  border-color: #dddddd !important;
}

.tp-pagination-group button.active {
  background: #333333 !important;
  border-color: #333333 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  cursor: default !important;
}

.tp-pagination-group button:disabled {
  background: #f4f4f4 !important;
  color: #999999 !important;
  border-color: #dddddd !important;
  cursor: not-allowed !important;
}

/* Tabs */
.tp-tab-btn {
  background: #ffffff !important;
  border: 1px solid #cccccc !important;
  border-radius: 3px !important;
  padding: 6px 16px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #444444 !important;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tp-tab-btn:hover:not(.active) {
  background: #e6e6e6 !important;
}

.tp-tab-btn.active {
  background: #0284c7 !important;
  border-color: #0284c7 !important;
  color: #ffffff !important;
}

/* Split Button */
.tp-split-btn-group {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  border-radius: 3px;
}

.tp-split-btn-main {
  background: #ffffff !important;
  border: 1px solid #cccccc !important;
  border-right: 1px solid #e5e5e5 !important;
  border-radius: 3px 0 0 3px !important;
  padding: 4px 12px !important;
  font-size: 12px !important;
  color: #333333 !important;
  font-weight: 500 !important;
  cursor: pointer;
}

.tp-split-btn-main:hover {
  background: #e6e6e6 !important;
}

.tp-split-btn-arrow {
  background: #ffffff !important;
  border: 1px solid #cccccc !important;
  border-left: none !important;
  border-radius: 0 3px 3px 0 !important;
  padding: 4px 8px !important;
  font-size: 10px !important;
  color: #555555 !important;
  cursor: pointer;
}

.tp-split-btn-arrow:hover {
  background: #e6e6e6 !important;
}

.tp-download-popup {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 4px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15) !important;
  z-index: 1000;
  width: 230px;
  padding: 14px 16px;
  box-sizing: border-box;
  color: #1e293b !important;
}

.tp-download-popup select {
  width: 100%;
  padding: 6px 24px 6px 8px;
  font-size: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #ffffff !important;
  color: #1e293b !important;
  cursor: pointer;
  outline: none;
}

/* ====================================================================
   STX 3D Virtual Payout Card & Interactive Scene
   ==================================================================== */
.stx-card-3d-scene {
  perspective: 1000px;
  transform-style: preserve-3d;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

.stx-virtual-card {
  position: relative;
  transform-style: preserve-3d;
  will-change: transform, box-shadow;
  transition: transform 0.12s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s ease;
  user-select: none;
  -webkit-user-select: none;
}

.stx-virtual-card:hover {
  cursor: pointer;
}

@media (max-width: 480px) {
  .stx-virtual-card {
    height: 210px !important;
    padding: 16px !important;
  }
}

/* ====================================================================
   PERMANENT LIGHT MODE ENFORCEMENT & REMOVAL OF THEME TOGGLES
   ==================================================================== */
#top-bar-theme-btn,
#auth-theme-toggle,
[id^="auth-theme-toggle"],
.theme-toggle-btn,
.auth-theme-toggle {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Force light background for auth pages and cards if any rogue dark styling exists */
.auth-page {
  background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 50%, #f8fafc 100%) !important;
  color: #0f172a !important;
}

.auth-card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.07), 0 0 0 1px rgba(0, 0, 0, 0.04) !important;
  color: #0f172a !important;
}

/* ====================================================================
   SMS Test Panel Two-Column Layout matching Reference
   ==================================================================== */
.tp-grid-two-col {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 16px !important;
  align-items: start !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

@media (max-width: 1024px) {
  .tp-grid-two-col {
    grid-template-columns: 1fr !important;
  }
}

.tp-breadcrumb-bar {
  background: linear-gradient(to bottom, #fcfcfc 0%, #f1f1f1 50%, #e8e8e8 51%, #f6f6f6 100%) !important;
  border: 1px solid #d5d5d5 !important;
  border-radius: 4px !important;
  padding: 7px 14px !important;
  font-size: 12px !important;
  color: #666666 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

/* ====================================================================
   GLOBAL CROSS-DEVICE RESPONSIVENESS ENHANCEMENTS
   (MOBILES 320px-480px, TABLETS 768px-1024px, DESKTOPS)
   ==================================================================== */

/* Auth Screen Responsiveness */
@media (max-width: 600px) {
  .auth-page.auth-login-page {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 16px 16px 40px 16px !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
  }

  .auth-top-actions-bar {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    width: 100% !important;
    max-width: 380px !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    margin-bottom: 14px !important;
    padding: 0 4px !important;
    box-sizing: border-box !important;
    z-index: 9999 !important;
  }

  .auth-card-modern {
    margin: 0 !important;
    width: 100% !important;
    max-width: 380px !important;
  }

  #auth-lang-wrapper {
    position: relative !important;
    top: auto !important;
    right: auto !important;
  }
}

@media (max-width: 480px) {
  .auth-page.auth-login-page {
    padding: 14px 12px 36px 12px !important;
  }
  .auth-card-modern {
    padding: 44px 20px 48px 20px !important;
    min-height: auto !important;
    border-radius: 18px !important;
    max-width: 100% !important;
  }
  .auth-card-modern #to-test-panel {
    top: 14px !important;
    right: 14px !important;
    padding: 3px 10px !important;
    font-size: 10px !important;
  }
  .auth-card-modern input {
    font-size: 15px !important;
    height: 46px !important;
  }
  .auth-card-modern button[type="submit"] {
    height: 46px !important;
  }
}

/* Public SMS Test Panel Mobile / Tablet Responsive */
@media (max-width: 768px) {
  .public-test-panel-page header.top-bar {
    padding: 0 12px !important;
  }
  .public-test-panel-page > div {
    padding: 12px 10px 32px 10px !important;
  }
  .tp-filter-box > div {
    gap: 12px !important;
  }
  .tp-filter-box > div > div {
    width: 100% !important;
    min-width: 0 !important;
  }
  .tp-card-header {
    padding: 8px 10px !important;
  }
  .tp-card-header-title {
    font-size: 12px !important;
  }
  .tp-table-wrapper {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    width: 100% !important;
    border-radius: 0 !important;
  }
  .tp-table {
    min-width: 580px !important;
  }
  .tp-pagination-footer {
    padding: 8px 10px !important;
    flex-direction: column !important;
    gap: 10px !important;
    align-items: center !important;
    text-align: center !important;
  }
  .tp-pagination-group {
    flex-wrap: wrap !important;
    justify-content: center !important;
  }
}

@media (max-width: 480px) {
  .tp-split-btn-main {
    padding: 4px 8px !important;
    font-size: 11px !important;
  }
  .tp-export-btn {
    padding: 3px 7px !important;
    font-size: 11px !important;
  }
  .tp-tab-btn {
    padding: 5px 12px !important;
    font-size: 12px !important;
  }
}

/* ====================================================================
   Dashboard Top Bar & Compact User Dropdown Popover Mobile Optimization
   ==================================================================== */
@media (max-width: 768px) {
  .top-bar {
    padding-left: 12px !important;
    padding-right: 12px !important;
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  .top-bar-brand {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    gap: 8px !important;
    display: flex !important;
    align-items: center !important;
  }

  .top-bar-brand-name {
    white-space: nowrap !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    display: inline-block !important;
  }

  .top-bar-user {
    padding: 4px 8px !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    gap: 5px !important;
    flex-shrink: 0 !important;
    position: relative !important;
  }

  .top-bar-username-text {
    max-width: 85px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 12px !important;
    display: inline-block !important;
  }

  .top-bar-actions {
    gap: 6px !important;
    flex-shrink: 0 !important;
  }

  .top-bar-utility-actions {
    gap: 6px !important;
  }

  .top-bar-action-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
  }

  .user-dropdown-menu {
    position: absolute !important;
    top: calc(100% + 6px) !important;
    right: 0 !important;
    left: auto !important;
    width: 190px !important;
    min-width: 180px !important;
    max-width: 220px !important;
    background: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid #e2e8f0 !important;
    z-index: 2000 !important;
    overflow: hidden !important;
    animation: dropdownPop 0.15s ease !important;
  }

  .user-dropdown-body {
    padding: 6px 0 !important;
    background: #ffffff !important;
  }

  .user-dropdown-item {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 9px 14px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #334155 !important;
    text-decoration: none !important;
    cursor: pointer !important;
  }

  .user-dropdown-item:hover,
  .user-dropdown-item:active {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
  }
}

@media (max-width: 420px) {
  .top-bar {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
  .top-bar-brand {
    gap: 6px !important;
  }
  .top-bar-brand-name {
    font-size: 13.5px !important;
  }
  .top-bar-username-text {
    max-width: 70px !important;
  }
  .top-bar-actions {
    gap: 4px !important;
  }
  .top-bar-utility-actions {
    gap: 4px !important;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   MASTER PLATFORM-WIDE MOBILE OVERHAUL (100% RESPONSIVE - ALL PAGES WITHOUT EXCEPTION)
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* 1. Global Viewport, Layout & Body Reset */
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
    position: relative !important;
    -webkit-text-size-adjust: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #app, .dashboard-layout {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
  }

  .main-content {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
    margin-left: 0 !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    padding: 0 !important;
  }

  .page-content, main.page-content, #page-content {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
    padding: 10px 8px 36px 8px !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
  }

  /* 2. Universal Data Tables Touch Scroll Container */
  .table-wrapper,
  .stx-table-wrapper,
  .data-table-wrapper,
  .table-responsive,
  .tp-table-wrapper,
  .stx-tc-card > .table-wrapper,
  .stx-card > .stx-table-wrapper,
  .card > .table-wrapper,
  div:has(> table) {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    display: block !important;
    box-sizing: border-box !important;
    overscroll-behavior-x: contain !important;
    position: relative !important;
    margin-bottom: 0 !important;
    scrollbar-width: thin !important;
  }

  /* Table layout preservation so content never collapes vertically */
  table.stx-table,
  table.fly-table,
  table.data-table,
  table.stx-tc-table,
  table.tp-table,
  .table-wrapper > table,
  .table-responsive > table {
    display: table !important;
    width: 100% !important;
    min-width: 580px !important;
    border-collapse: collapse !important;
  }

  /* Compact table cells on mobile */
  table.stx-table th, table.stx-table td,
  table.fly-table th, table.fly-table td,
  table.data-table th, table.data-table td,
  table.stx-tc-table th, table.stx-tc-table td,
  table.tp-table th, table.tp-table td {
    padding: 6px 8px !important;
    font-size: 11.5px !important;
    white-space: nowrap !important;
    letter-spacing: 0 !important;
  }

  /* Specific cell wrapping rules */
  .cell-nowrap,
  .badge, .stx-badge, .status-badge, .pill,
  .action-btn, .fly-btn-sm, .stx-btn-sm,
  .btn-group, .action-buttons {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  /* 3. iOS Auto-Zoom Prevention (16px minimum on touch inputs) */
  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="number"],
  input[type="tel"],
  input[type="search"],
  select,
  textarea,
  .fly-input,
  .stx-input,
  .stx-tc-input,
  .stx-tc-select,
  .search-input,
  .searchable-select-input {
    font-size: 16px !important;
    min-height: 40px !important;
    box-sizing: border-box !important;
    border-radius: 6px !important;
  }

  /* Universal Single-Column Form Grid on Mobile */
  .form-grid,
  .grid-2,
  .grid-3,
  .grid-4,
  .form-row,
  .stx-form-grid,
  .stx-two-col,
  .row {
    grid-template-columns: 1fr !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .form-group, .field-group, .stx-tc-field-group {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  /* 4. Universal Full-Responsive Mobile Modals */
  .modal-overlay {
    padding: 8px !important;
    align-items: center !important;
    justify-content: center !important;
    display: flex !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 10000 !important;
    background: rgba(15, 23, 42, 0.7) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
  }

  .modal,
  .modal-dialog,
  .modal-content,
  .stx-modal,
  .success-modal,
  .swal2-popup {
    width: 95vw !important;
    max-width: 95vw !important;
    min-width: 0 !important;
    margin: auto !important;
    max-height: 90vh !important;
    max-height: 90dvh !important;
    border-radius: 14px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 16px 14px !important;
    box-sizing: border-box !important;
  }

  .modal-header {
    padding: 0 0 10px 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  .modal-title {
    font-size: 14px !important;
    font-weight: 700 !important;
  }

  .modal-body {
    max-height: 68vh !important;
    max-height: 68dvh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 8px 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .modal-footer {
    display: flex !important;
    flex-direction: column-reverse !important;
    gap: 8px !important;
    padding-top: 12px !important;
    width: 100% !important;
    border-top: 1px solid #e2e8f0 !important;
  }

  .modal-footer button,
  .modal-footer .fly-btn,
  .modal-footer .stx-btn {
    width: 100% !important;
    min-height: 40px !important;
    margin: 0 !important;
    justify-content: center !important;
    display: flex !important;
    align-items: center !important;
    font-size: 13px !important;
  }

  /* 5. Universal Filter Bars, Toolbars & Actions Rows */
  .filter-bar,
  .table-toolbar,
  .search-bar,
  .actions-bar,
  .stx-toolbar,
  .tp-filter-box,
  .card-header:has(input),
  .card-header:has(button) {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 10px 12px !important;
  }

  .filter-bar > *,
  .table-toolbar > *,
  .search-bar > *,
  .stx-toolbar > * {
    width: 100% !important;
    min-width: 0 !important;
  }

  /* Universal Action & Button Groups */
  .btn-group,
  .export-btn-group,
  .actions-row,
  .toolbar-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    width: 100% !important;
  }

  .btn-group > button,
  .btn-group > .fly-btn,
  .btn-group > .stx-btn,
  .export-btn-group > button {
    flex: 1 1 auto !important;
    min-height: 34px !important;
    font-size: 11.5px !important;
    text-align: center !important;
    justify-content: center !important;
  }

  /* 6. Dashboard Page Overhaul (All Roles) */
  .flip-clock-frame {
    padding: 6px 8px !important;
    gap: 2px !important;
    border-radius: 8px !important;
  }
  .digit-box {
    width: 24px !important;
    height: 34px !important;
    font-size: 20px !important;
    border-radius: 4px !important;
  }
  .digit-colon {
    font-size: 18px !important;
    width: 6px !important;
    margin: 0 !important;
  }
  .flip-clock-sub {
    font-size: 10.5px !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
  }

  /* Quick Access 6-grid & Client 5-grid */
  .quick-access-grid,
  .client-quick-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    margin-bottom: 14px !important;
    width: 100% !important;
  }

  .quick-card,
  .client-quick-card {
    padding: 10px 6px !important;
    min-height: 64px !important;
    border-radius: 6px !important;
  }
  .quick-card-icon,
  .client-quick-card > div:first-child {
    width: 32px !important;
    height: 32px !important;
    margin-bottom: 4px !important;
  }
  .quick-card-icon svg,
  .client-quick-card svg {
    width: 28px !important;
    height: 28px !important;
  }
  .quick-card-label,
  .client-quick-card span {
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
  }

  /* KPI Stat Cards */
  .kpi-grid-ps,
  .client-kpi-grid,
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    margin-bottom: 14px !important;
    width: 100% !important;
  }

  .kpi-card-ps,
  .client-kpi-grid > div {
    padding: 10px 10px !important;
    min-height: 62px !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
  }
  .kpi-icon-box,
  .client-kpi-grid svg {
    width: 28px !important;
    height: 28px !important;
    font-size: 14px !important;
  }
  .kpi-info-ps .kpi-value-ps,
  .client-kpi-grid [data-count] {
    font-size: 16px !important;
  }
  .kpi-info-ps .kpi-label-ps,
  .client-kpi-grid div > div:first-child {
    font-size: 9.5px !important;
  }

  /* Main Chart + Stats Split */
  .dashboard-main-split,
  .client-chart-split {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    margin-bottom: 14px !important;
    width: 100% !important;
  }
  .chart-card-ps,
  .client-chart-split > div:first-child {
    padding: 12px 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .chart-card-ps canvas,
  .client-chart-split canvas,
  #weekly-sms-chart,
  #client-7day-chart {
    height: 220px !important;
    max-height: 240px !important;
    width: 100% !important;
  }
  .side-stats-card,
  .client-chart-split > div:last-child {
    padding: 10px 12px !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .side-stat-row {
    gap: 8px !important;
  }
  .side-stat-circle {
    width: 26px !important;
    height: 26px !important;
    font-size: 12px !important;
  }
  .side-stat-num {
    font-size: 14px !important;
  }
  .side-stat-lbl {
    font-size: 9px !important;
  }

  /* Bottom 2 Tables on Dashboard */
  .dashboard-bottom-grid,
  .client-bottom-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    margin-bottom: 16px !important;
    width: 100% !important;
  }

  /* 7. Numbers Module Overhaul */
  .stx-tc-breadcrumb {
    font-size: 11px !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    margin-bottom: 6px !important;
  }
  .stx-tc-subtitle {
    font-size: 11px !important;
    margin-bottom: 10px !important;
    line-height: 1.4 !important;
  }

  .stx-tc-filter-box {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 12px 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .stx-tc-field-group {
    width: 100% !important;
    min-width: 0 !important;
  }
  .stx-tc-input,
  .stx-tc-select,
  .stx-tc-filter-box .searchable-select-picker,
  .stx-tc-filter-box .searchable-select-input {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 38px !important;
    font-size: 16px !important;
    box-sizing: border-box !important;
  }

  .stx-tc-filter-box > div:last-child {
    margin-left: 0 !important;
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
  .stx-tc-btn-filter,
  .stx-tc-btn-reset {
    flex: 1 1 70px !important;
    height: 38px !important;
    font-size: 13px !important;
    text-align: center !important;
  }
  .stx-tc-split-btn-wrap {
    flex: 2 1 150px !important;
    width: 100% !important;
    display: flex !important;
  }
  .stx-tc-split-main {
    flex: 1 !important;
    height: 38px !important;
    font-size: 12px !important;
  }
  .stx-tc-split-caret {
    height: 38px !important;
    padding: 0 12px !important;
    font-size: 14px !important;
  }

  .stx-tc-card {
    width: 100% !important;
    box-sizing: border-box !important;
    border-radius: 6px !important;
    overflow: hidden !important;
  }
  .stx-tc-card-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
    padding: 10px 12px !important;
  }
  .stx-tc-card-header-actions {
    width: 100% !important;
    justify-content: space-between !important;
    display: flex !important;
  }
  .stx-tc-actions-row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    padding: 8px 10px !important;
  }
  .stx-tc-btn-assign,
  .stx-tc-btn-unassign,
  .stx-tc-btn-return {
    flex: 1 1 85px !important;
    height: 36px !important;
    font-size: 12px !important;
    padding: 0 6px !important;
    text-align: center !important;
  }

  .stx-tc-controls-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 8px 10px !important;
  }
  .stx-tc-controls-row > div:first-child {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    width: 100% !important;
    justify-content: space-between !important;
    align-items: center !important;
  }
  .stx-tc-export-btn {
    flex: 1 1 auto !important;
    height: 30px !important;
    min-width: 44px !important;
    font-size: 11px !important;
    text-align: center !important;
  }
  .stx-tc-segmented-wrap {
    margin: 4px 0 !important;
    width: 100% !important;
    display: flex !important;
    height: 32px !important;
  }
  .stx-tc-seg-btn {
    flex: 1 !important;
    text-align: center !important;
    font-size: 12px !important;
  }
  #sms-records-container {
    width: 100% !important;
    justify-content: space-between !important;
    display: flex !important;
    margin-top: 4px !important;
  }

  /* 8. SMS Module Overhaul */
  .stx-card:has(#sms-date-from),
  .stx-card:has(#sms-cdr-table) {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .stx-card [style*="grid-template-columns:repeat(auto-fit"] {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .stx-card [style*="grid-column: span 2"] {
    grid-column: 1 / -1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }
  #sms-date-from,
  #sms-date-to,
  #sms-range-filter,
  #sms-client-filter,
  #sms-number-filter,
  #sms-cli-filter {
    font-size: 16px !important;
    height: 38px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .stx-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 10px 12px !important;
  }
  .stx-toolbar > div {
    width: 100% !important;
    justify-content: space-between !important;
  }
  .stx-toolbar [style*="display:flex;gap:6px"] {
    display: flex !important;
    flex-wrap: wrap !important;
    width: 100% !important;
  }
  .stx-btn-export {
    flex: 1 1 45px !important;
    height: 32px !important;
    font-size: 11px !important;
    text-align: center !important;
  }
  #sms-search {
    width: 100% !important;
    font-size: 16px !important;
    height: 38px !important;
    box-sizing: border-box !important;
  }

  /* 9. Users, Ranges, Financials, Support, Test Panel & Profile */
  #users-table {
    min-width: 650px !important;
  }
  .filter-field {
    width: 100% !important;
    min-width: 0 !important;
  }

  #ranges-table {
    min-width: 850px !important;
  }
  .input-wrapper:has(#search-ranges) {
    width: 100% !important;
  }
  #search-ranges {
    width: 100% !important;
    height: 38px !important;
    font-size: 16px !important;
  }

  .test-panel-container {
    flex-direction: column !important;
    gap: 12px !important;
  }
  .test-panel-left,
  .test-panel-right {
    width: 100% !important;
    flex: 1 1 100% !important;
    max-width: 100% !important;
  }

  .support-message-bubble,
  .chat-bubble {
    max-width: 88% !important;
    word-break: break-word !important;
    font-size: 13px !important;
  }
  .support-reply-box textarea {
    font-size: 16px !important;
    min-height: 80px !important;
    width: 100% !important;
  }

  /* Tabs across platform */
  .nav-tabs,
  .tabs,
  .stx-tabs,
  .tp-tabs,
  .filter-tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    width: 100% !important;
    padding-bottom: 4px !important;
  }
  .nav-tabs::-webkit-scrollbar,
  .tabs::-webkit-scrollbar,
  .stx-tabs::-webkit-scrollbar {
    display: none !important;
  }
  .nav-tabs > *,
  .tabs > *,
  .stx-tabs > *,
  .tp-tabs > * {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }

  /* Floating UI Elements */
  #stx-back-to-top-btn {
    bottom: 16px !important;
    right: 16px !important;
    width: 38px !important;
    height: 38px !important;
    z-index: 999 !important;
  }
  #toast-container {
    top: 10px !important;
    left: 10px !important;
    right: 10px !important;
    max-width: calc(100vw - 20px) !important;
  }
}

/* Extra Compact Tweaks for Very Narrow Screens (< 360px) */
@media (max-width: 360px) {
  .digit-box {
    width: 20px !important;
    height: 30px !important;
    font-size: 17px !important;
  }
  .digit-colon {
    font-size: 15px !important;
    width: 4px !important;
  }
  .quick-access-grid,
  .client-quick-grid,
  .kpi-grid-ps,
  .client-kpi-grid {
    grid-template-columns: 1fr !important;
  }
}




