:root {
  --bg-base: #070b12;
  --bg-sidebar: #0b101b;
  --bg-card: #0f1624;
  --bg-card-elevated: #141d2f;
  --bg-input: #0a0f1a;
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.14);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --brand-amber: #f59e0b;
  --brand-amber-soft: rgba(245, 158, 11, 0.14);
  --brand-emerald: #10b981;
  --brand-emerald-hover: #059669;
  --brand-emerald-soft: rgba(16, 185, 129, 0.14);
  --brand-purple: #a855f7;
  --brand-purple-soft: rgba(168, 85, 247, 0.15);
  --brand-cyan: #0ea5e9;
  --brand-cyan-soft: rgba(14, 165, 233, 0.15);
  --brand-rose: #f43f5e;
  --brand-rose-soft: rgba(244, 63, 94, 0.15);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Plus Jakarta Sans', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 7px;
}

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

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* ==================== LOGIN VIEW (IMS STYLE) ==================== */
.login-view {
  min-height: 100vh;
  width: 100vw;
  background:
    radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.22) 0%, transparent 44%),
    radial-gradient(circle at 80% 80%, rgba(6, 182, 212, 0.18) 0%, transparent 46%),
    radial-gradient(circle at 50% 0%, #0f1b38 0%, #070d1d 65%, #040814 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 28px 16px;
  overflow-y: auto;
}
.login-view::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(56, 189, 248, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.03) 1px, transparent 1px);
  background-size: 42px 42px;
  pointer-events: none;
}

html.light .login-view {
  background:
    radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.14) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(6, 182, 212, 0.14) 0%, transparent 45%),
    linear-gradient(135deg, #f0f7ff 0%, #e0f2fe 100%);
}

.login-top-actions {
  position: absolute;
  top: 20px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2;
}
[dir="rtl"] .login-top-actions {
  right: auto;
  left: 24px;
}

.login-lang-btn, .login-theme-btn {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f8fafc;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.login-lang-btn:hover, .login-theme-btn:hover {
  background: rgba(37, 99, 235, 0.22);
  border-color: rgba(56, 189, 248, 0.45);
}
html.light .login-lang-btn, html.light .login-theme-btn {
  background: rgba(255, 255, 255, 0.85);
  border-color: #cbd5e1;
  color: #1e293b;
}

.login-shell {
  width: 100%;
  max-width: 1020px;
  display: grid;
  grid-template-columns: 1.05fr 430px;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.login-hero {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 12px 4px;
}

.login-hero-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.28);
  color: #34d399;
  font-size: 12px;
  font-weight: 700;
}

.login-hero-title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  line-height: 1.22;
  color: #f8fafc;
  margin: 0;
  letter-spacing: -0.02em;
}
html.light .login-hero-title {
  color: #0f172a;
}

.login-hero-desc {
  font-size: 14.5px;
  line-height: 1.65;
  color: #94a3b8;
  margin: 0;
  max-width: 480px;
}
html.light .login-hero-desc {
  color: #475569;
}

.login-feature-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 6px;
}

.login-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  transition: transform 0.2s, border-color 0.2s;
}
.login-feature-item:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.4);
}
html.light .login-feature-item {
  background: rgba(255, 255, 255, 0.85);
  border-color: #e2e8f0;
}

.login-feature-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.32);
  color: #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.login-feature-name {
  font-size: 14px;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 2px;
}
html.light .login-feature-name {
  color: #0f172a;
}

.login-feature-sub {
  font-size: 12.5px;
  color: #94a3b8;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
    max-width: 440px;
    gap: 24px;
  }
  .login-hero {
    display: none;
  }
}

.login-card {
  width: 100%;
  max-width: 430px;
  background: rgba(11, 19, 38, 0.9);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(56, 189, 248, 0.16);
  border-top: 2px solid rgba(14, 165, 233, 0.85);
  border-radius: 20px;
  padding: 36px 34px 32px;
  box-shadow: 0 28px 75px rgba(0, 0, 0, 0.65), 0 0 48px rgba(37, 99, 235, 0.22);
  color: #f1f5f9;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.35s ease;
}
html.light .login-shell {
  width: 100%;
  max-width: 1020px;
  display: grid;
  grid-template-columns: 1.05fr 430px;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.login-hero {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 12px 4px;
}

.login-hero-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.28);
  color: #34d399;
  font-size: 12px;
  font-weight: 700;
}

.login-hero-title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  line-height: 1.22;
  color: #f8fafc;
  margin: 0;
  letter-spacing: -0.02em;
}
html.light .login-hero-title {
  color: #0f172a;
}

.login-hero-desc {
  font-size: 14.5px;
  line-height: 1.65;
  color: #94a3b8;
  margin: 0;
  max-width: 480px;
}
html.light .login-hero-desc {
  color: #475569;
}

.login-feature-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 6px;
}

.login-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  transition: transform 0.2s, border-color 0.2s;
}
.login-feature-item:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.4);
}
html.light .login-feature-item {
  background: rgba(255, 255, 255, 0.85);
  border-color: #e2e8f0;
}

.login-feature-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.32);
  color: #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.login-feature-name {
  font-size: 14px;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 2px;
}
html.light .login-feature-name {
  color: #0f172a;
}

.login-feature-sub {
  font-size: 12.5px;
  color: #94a3b8;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
    max-width: 440px;
    gap: 24px;
  }
  .login-hero {
    display: none;
  }
}

html.light .login-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-top: 3px solid #ef4444;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  color: #1e293b;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-badge-wrap {
  position: absolute;
  top: 16px;
  right: 18px;
}
[dir="rtl"] .login-badge-wrap {
  right: auto;
  left: 18px;
}

.login-test-badge {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.login-test-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}
.login-test-badge:hover {
  background: rgba(16, 185, 129, 0.22);
  transform: translateY(-1px);
}
html.light .login-test-badge {
  color: #059669;
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.login-logo-wrap {
  text-align: center;
  margin-top: 8px;
  margin-bottom: 20px;
}

.login-brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ims-text {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #f8fafc;
  line-height: 1.1;
}
html.light .ims-text {
  color: #0f172a;
}
.ims-text span {
  color: #38bdf8;
}

.x-brand-mark {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #ffffff 0%, #e0f2fe 44%, #38bdf8 60%, #2563eb 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.55));
  padding-right: 2px;
}
html.light .x-brand-mark {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 44%, #0284c7 60%, #2563eb 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==================== LOGIN SPLASH OVERLAY ==================== */
.x-splash-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background:
    radial-gradient(circle at 50% 45%, rgba(14, 165, 233, 0.24) 0%, transparent 48%),
    radial-gradient(circle at 20% 80%, rgba(37, 99, 235, 0.18) 0%, transparent 45%),
    linear-gradient(160deg, #070e20 0%, #0b1630 60%, #040814 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  transition: opacity 0.4s ease;
}
.x-splash-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

.x-splash-orb {
  position: relative;
  width: 132px;
  height: 132px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.x-splash-ring-outer {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.06);
  border-top-color: #06b6d4;
  border-right-color: rgba(37, 99, 235, 0.65);
  box-shadow: 0 0 32px rgba(14, 165, 233, 0.4);
  animation: xSpinCW 1.2s linear infinite;
}

.x-splash-ring-inner {
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  border: 2px dashed rgba(224, 242, 254, 0.24);
  border-bottom-color: #38bdf8;
  animation: xSpinCCW 1.8s linear infinite;
}

.x-splash-x {
  font-family: var(--font-display);
  font-size: 62px;
  font-weight: 900;
  font-style: italic;
  line-height: 1;
  background: linear-gradient(135deg, #ffffff 0%, #e0f2fe 44%, #38bdf8 55%, #2563eb 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 18px rgba(56, 189, 248, 0.7));
  animation: xSpin3D 2.2s ease-in-out infinite;
}

.x-splash-brand {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #f8fafc;
}
.x-splash-brand span {
  color: #38bdf8;
}

.x-splash-bar-wrap {
  width: 220px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.x-splash-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #0ea5e9, #22d3ee);
  box-shadow: 0 0 14px rgba(14, 165, 233, 0.75);
  animation: xSplashProgress 3s linear forwards;
}

.x-splash-text {
  font-size: 13px;
  color: #94a3b8;
  font-weight: 600;
  letter-spacing: 0.03em;
}

@keyframes xSpinCW {
  to { transform: rotate(360deg); }
}
@keyframes xSpinCCW {
  to { transform: rotate(-360deg); }
}
@keyframes xSpin3D {
  0% { transform: rotateY(0deg) scale(1); }
  50% { transform: rotateY(180deg) scale(1.1); }
  100% { transform: rotateY(360deg) scale(1); }
}
@keyframes xSplashProgress {
  from { width: 0%; }
  to { width: 100%; }
}

.login-subtitle {
  font-size: 11px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 6px;
  font-weight: 600;
}

.login-title {
  text-align: center;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 20px;
}
html.light .login-title {
  color: #334155;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-icon {
  position: absolute;
  left: 14px;
  color: #64748b;
  display: flex;
  align-items: center;
  pointer-events: none;
  transition: color 0.2s;
}
[dir="rtl"] .login-input-icon {
  left: auto;
  right: 14px;
}

.login-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 13.5px 42px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  color: #f8fafc;
  outline: none;
  transition: all 0.2s;
}
.login-input::placeholder {
  color: #64748b;
}
.login-input:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}
.login-input:-webkit-autofill,
.login-input:-webkit-autofill:hover,
.login-input:-webkit-autofill:focus,
.login-input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #141826 inset !important;
  box-shadow: 0 0 0 1000px #141826 inset !important;
  -webkit-text-fill-color: #f8fafc !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
  caret-color: #f8fafc;
  transition: background-color 9999s ease-in-out 0s;
}
html.light .login-input {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #0f172a;
}
html.light .login-input:focus {
  background: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.login-pw-toggle {
  position: absolute;
  right: 14px;
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
}
[dir="rtl"] .login-pw-toggle {
  right: auto;
  left: 14px;
}
.login-pw-toggle:hover {
  color: #cbd5e1;
}

.login-submit-btn {
  width: 100%;
  background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 13.5px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.22s;
  margin-top: 6px;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
}
.login-submit-btn:hover {
  background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(14, 165, 233, 0.45);
}

.login-view input[type="checkbox"] {
  accent-color: #0ea5e9;
}

.login-links {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.login-link {
  font-size: 12.5px;
  color: #64748b;
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.15s;
}
.login-link:hover {
  color: #0284c7;
}

.login-socials {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.social-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
  text-decoration: none;
}
.social-icon-btn:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}
.social-wa {
  background: #22c55e;
}
.social-tg {
  background: #0ea5e9;
}

/* ==================== PORTAL STYLES (MODERN DARK) ==================== */
/* Top Header Bar */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(11, 16, 27, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  z-index: 100;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--text-primary);
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: radial-gradient(circle at 30% 30%, rgba(245, 158, 11, 0.25), #05080f 75%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2.5px;
  padding: 7px 6px;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.18);
}

.logo-mark .bar {
  width: 3.5px;
  background: linear-gradient(180deg, #fbbf24, #d97706);
  border-radius: 2px;
}
.logo-mark .b1 { height: 6px; }
.logo-mark .b2 { height: 10px; }
.logo-mark .b3 { height: 14px; }
.logo-mark .b4 { height: 18px; }

.brand-text {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}
.brand-text span {
  color: var(--brand-amber);
}

.barq-wordmark {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1;
  padding-top: 2px;
}
.barq-wordmark .barq-name {
  font-size: 23px;
  letter-spacing: -0.02em;
  background: linear-gradient(100deg, #3b82f6 0%, #0ea5e9 55%, #22d3ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.barq-wordmark .barq-sms-pill {
  position: absolute;
  top: -3px;
  right: 1px;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  padding: 2.5px 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, #22d3ee, #0ea5e9);
  color: #061224;
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.55);
  -webkit-text-fill-color: #061224;
}
.barq-wordmark.barq-lg .barq-name {
  font-size: 34px;
}
.barq-wordmark.barq-lg .barq-sms-pill {
  top: -4px;
  right: 2px;
  font-size: 10px;
  padding: 3px 8px;
}

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

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-amber);
  box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
  animation: pulse 2s infinite;
}
.pulse-dot.emerald {
  background: var(--brand-emerald);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.icon-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}
.icon-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: var(--bg-card-elevated);
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 5px 12px 5px 6px;
  border-radius: 11px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.user-pill:hover {
  border-color: var(--border-hover);
}
.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #042f2e;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.user-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
}
.user-role {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--brand-amber);
}

/* Main Shell */
.layout-shell {
  display: flex;
  padding-top: 60px;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 245px;
  flex-shrink: 0;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  position: fixed;
  top: 60px;
  bottom: 0;
  left: 0;
  overflow-y: auto;
  padding: 18px 12px 32px;
  z-index: 60;
  transition: transform 0.24s ease;
}

.sidebar-welcome {
  padding: 4px 10px 16px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 14px;
}
.welcome-line {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 7px;
}
.welcome-line strong {
  color: var(--text-primary);
}
.owner-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3.5px 10px;
  border-radius: 999px;
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.28);
  color: #fda4af;
  margin-bottom: 8px;
}
.owner-badge.test-badge-purple {
  background: rgba(168, 85, 247, 0.15) !important;
  border: 1px solid rgba(168, 85, 247, 0.35) !important;
  color: #c084fc !important;
}
.owner-badge.test-badge-purple .dot {
  background: #a855f7 !important;
  box-shadow: 0 0 8px #a855f7 !important;
}
.owner-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fb7185;
}
.utc-clock {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 13.5px;
  transition: all 0.15s;
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}
.nav-item.active {
  background: #172135;
  color: #fff;
  box-shadow: inset 3px 0 0 var(--brand-emerald);
}

.nav-group {
  margin-top: 6px;
}
.nav-group-header {
  width: 100%;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  border-radius: 9px;
}
.nav-group-header:hover {
  background: rgba(255, 255, 255, 0.03);
}
.nav-group-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-group .chevron {
  color: var(--text-muted);
  transition: transform 0.2s ease;
}
.nav-group:not(.open) .chevron {
  transform: rotate(180deg);
}
.nav-group:not(.open) .nav-group-items {
  display: none;
}

.nav-group-items {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 3px 0 4px 16px;
  margin-left: 16px;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-subitem {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
}
.nav-subitem .sub-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand-amber);
  opacity: 0.75;
}
.nav-subitem:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.035);
}
.nav-subitem.active {
  background: #172135;
  color: #fff;
  font-weight: 600;
  box-shadow: inset 2.5px 0 0 var(--brand-emerald);
}
.nav-subitem.active .sub-dot {
  background: var(--brand-emerald);
  opacity: 1;
}

/* Main Content Area */
.main-content {
  flex: 1;
  margin-left: 245px;
  padding: 24px 28px 64px;
  max-width: 100%;
  width: 100%;
  transition: margin 0.24s ease;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 60px 0 0 0;
  background: rgba(2, 6, 23, 0.58);
  backdrop-filter: blur(2px);
  z-index: 55;
}

/* Desktop Collapsible Sidebar */
@media (min-width: 901px) {
  body.sidebar-collapsed .sidebar {
    transform: translateX(-260px);
  }
  html[dir="rtl"] body.sidebar-collapsed .sidebar {
    transform: translateX(260px);
  }
  body.sidebar-collapsed .main-content,
  html[dir="rtl"] body.sidebar-collapsed .main-content {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
  }
}

/* Mobile Drawer Sidebar */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-260px);
  }
  html[dir="rtl"] .sidebar {
    transform: translateX(260px);
  }
  body.sidebar-open .sidebar,
  html[dir="rtl"] body.sidebar-open .sidebar {
    transform: translateX(0);
  }
  body.sidebar-open .sidebar-backdrop {
    display: block;
  }
  .main-content,
  html[dir="rtl"] .main-content {
    margin-left: 0;
    margin-right: 0;
    padding: 20px 16px 52px;
  }
}

/* Breadcrumbs & Page Titles */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.breadcrumbs a {
  color: var(--text-secondary);
  text-decoration: none;
}
.breadcrumbs a:hover {
  color: var(--text-primary);
}
.breadcrumbs .current {
  color: var(--text-primary);
  font-weight: 600;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.page-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.page-title {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  line-height: 1.15;
}
.page-title .accent-italic {
  color: var(--brand-amber);
  font-weight: 800;
}
.page-subtitle {
  color: var(--text-secondary);
  font-size: 13.5px;
  margin-top: 6px;
  max-width: 780px;
}

.live-tps-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 7px 14px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #cbd5e1;
}

/* Dashboard KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.kpi-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}
.kpi-card:hover {
  border-color: var(--border-hover);
}
.kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20px;
  width: 36px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--brand-amber);
}
.kpi-card.emerald-top::before {
  background: var(--brand-emerald);
}

.kpi-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.kpi-big-number {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 12px;
}

.kpi-currency-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}
.kpi-currency-line {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.02em;
}

.kpi-subtext {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Pending / Cleared Dual Card */
.settlement-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.dual-balance-card {
  grid-column: span 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.balance-col {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.balance-col:first-child {
  border-right: 1px solid var(--border-subtle);
  padding-right: 14px;
}
.balance-col-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--brand-amber);
  margin-bottom: 4px;
}
.balance-col-title.emerald {
  color: var(--brand-emerald);
}
.balance-val {
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 700;
  color: var(--brand-amber);
}
.balance-val.emerald {
  color: #34d399;
}

/* Chart Card */
.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 18px;
}
.chart-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}
.chart-total {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: #fff;
}
.chart-total span {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-left: 6px;
}

/* Bottom Ranking Grid */
.ranking-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.ranking-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
}
.ranking-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 14px;
}
.ranking-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}
.count-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}
.rank-item {
  padding: 10px 0;
}
.rank-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}
.rank-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.rank-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}
.rank-name {
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank-right {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  flex-shrink: 0;
}
.rank-vol {
  font-weight: 700;
  color: #fff;
}
.rank-rev {
  color: var(--text-secondary);
}
.rank-bar-bg {
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}
.rank-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  border-radius: 999px;
}

/* Action Toolbar & Buttons */
.action-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 9px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  text-decoration: none;
}
.btn-emerald {
  background: #2563eb;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}
.btn-emerald:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--bg-card);
  border-color: var(--border-hover);
  color: var(--text-primary);
}
.btn-secondary:hover {
  background: var(--bg-card-elevated);
}
.btn-amber {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}
.btn-amber:hover {
  background: rgba(245, 158, 11, 0.25);
}
.btn-danger {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.35);
  color: #fda4af;
}
.btn-danger:hover {
  background: rgba(244, 63, 94, 0.26);
}
.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 7px;
}

/* Filter Panel Card */
.filter-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 18px;
}
.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  align-items: end;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}
.form-input, .form-select, .form-textarea {
  background: var(--bg-input);
  border: 1px solid var(--border-hover);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--brand-emerald);
}
.form-textarea {
  min-height: 84px;
  resize: vertical;
  font-family: var(--font-mono);
}

/* Data Table Card */
.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.table-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: 12px;
}
.table-card-title {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 700;
  color: #fff;
}
.table-meta {
  font-size: 12.5px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}
.modern-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.modern-table th {
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.015);
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}
.modern-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 13.5px;
  color: var(--text-primary);
  vertical-align: middle;
}
.modern-table tr:last-child td {
  border-bottom: none;
}
.modern-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

.mono {
  font-family: var(--font-mono);
  font-size: 12.5px;
}

/* Badges & Pills */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-smpp, .badge-exclusive {
  background: var(--brand-purple-soft);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}
.badge-http {
  background: var(--brand-cyan-soft);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.35);
}
.badge-connected, .badge-active, .badge-cleared, .badge-paid {
  background: var(--brand-emerald-soft);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.badge-pending {
  background: var(--brand-amber-soft);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.badge-failed {
  background: var(--brand-rose-soft);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.35);
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 20px;
  border-top: 1px solid var(--border-subtle);
  font-size: 12.5px;
  color: var(--text-secondary);
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 12, 0.78);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}
.modal-backdrop.hidden {
  display: none;
}
.modal-card {
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-hover);
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-subtle);
}
.modal-header h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
}
.modal-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
}
.modal-body {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: #131c2e;
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #f8fafc;
  padding: 12px 16px;
  border-radius: 11px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 1024px) {
  .kpi-grid, .settlement-row, .ranking-grid {
    grid-template-columns: 1fr;
  }
}

/* ==================== LIGHT THEME (SKY BLUE) ==================== */
body.theme-light {
  --bg-base: #eaf4ff;
  --bg-sidebar: #f5faff;
  --bg-card: #ffffff;
  --bg-card-elevated: #f0f7ff;
  --bg-input: #ffffff;
  --border-subtle: #d3e5fa;
  --border-hover: #93c5fd;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  background: linear-gradient(180deg, #e7f3ff 0%, #f2f8ff 100%) !important;
}

body.theme-light .topbar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #d3e5fa;
}

body.theme-light .brand-text,
body.theme-light .page-title,
body.theme-light .kpi-value,
body.theme-light .table-card-title,
body.theme-light .user-name,
body.theme-light .modal-header h3 {
  color: #0f172a !important;
}

body.theme-light .icon-btn,
body.theme-light .user-pill,
body.theme-light .btn-secondary {
  background: #f0f7ff;
  border-color: #bfdbfe;
  color: #1e3a8a;
}

body.theme-light .icon-btn:hover,
body.theme-light .user-pill:hover,
body.theme-light .btn-secondary:hover {
  background: #dbeafe;
  color: #1e3a8a;
}

body.theme-light .form-input,
body.theme-light .form-select,
body.theme-light .form-textarea {
  background: #ffffff;
  color: #0f172a;
  border-color: #bfdbfe;
}

body.theme-light .form-input:focus,
body.theme-light .form-select:focus,
body.theme-light .form-textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

body.theme-light .modern-table th {
  background: #eff6ff;
  color: #1e40af;
  border-bottom: 1px solid #dbeafe;
}

body.theme-light .modern-table td {
  color: #1e293b;
  border-bottom: 1px solid #eff6ff;
}

body.theme-light .modern-table tbody tr:hover {
  background: #f4f9ff;
}

body.theme-light .modern-table td[style*="color:#fff"],
body.theme-light .modern-table td .mono[style*="color:#fff"] {
  color: #0f172a !important;
}

body.theme-light .kpi-card,
body.theme-light .table-card,
body.theme-light .filter-card,
body.theme-light .modal-card {
  background: #ffffff;
  color: #0f172a;
  border-color: #d3e5fa;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.06);
}

body.theme-light .nav-item.active,
body.theme-light .nav-subitem.active {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

body.theme-light .toast {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.15);
}

/* ==================== RTL ARABIC SUPPORT ==================== */
html[dir="rtl"] body {
  font-family: 'Cairo', 'Inter', sans-serif;
}

html[dir="rtl"] .sidebar {
  left: auto;
  right: 0;
  border-right: none;
  border-left: 1px solid var(--border-subtle);
}

html[dir="rtl"] .main-content {
  margin-left: 0;
  margin-right: 245px;
}

html[dir="rtl"] .login-badge-wrap {
  right: auto;
  left: 20px;
}

html[dir="rtl"] .login-top-actions {
  right: auto;
  left: 24px;
}

html[dir="rtl"] .login-input-icon {
  left: auto;
  right: 14px;
}

html[dir="rtl"] .login-input {
  padding: 13px 42px 13px 40px;
}

html[dir="rtl"] .login-pw-toggle {
  right: auto;
  left: 14px;
}

html[dir="rtl"] .toast-container {
  right: auto;
  left: 22px;
}

@media (max-width: 900px) {
  html[dir="rtl"] .main-content {
    margin-right: 0;
  }
}

/* ==================== iMS-STYLE GRADIENT DASHBOARD ==================== */
.dash-grad-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 1100px) {
  .dash-grad-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .dash-grad-grid {
    grid-template-columns: 1fr;
  }
}

.dash-grad-card {
  position: relative;
  border-radius: 14px;
  padding: 20px 22px;
  color: #ffffff;
  overflow: hidden;
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.45);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.dash-grad-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -8px rgba(0, 0, 0, 0.55);
}

.dash-grad-card.grad-blue {
  background: linear-gradient(135deg, #4338ca 0%, #6366f1 55%, #7c3aed 100%);
}

.dash-grad-card.grad-rose {
  background: linear-gradient(135deg, #0f766e 0%, #0891b2 55%, #06b6d4 100%);
}

.dash-grad-card.grad-emerald {
  background: linear-gradient(135deg, #047857 0%, #059669 55%, #10b981 100%);
}

.dash-grad-card.grad-amber {
  background: linear-gradient(135deg, #b45309 0%, #d97706 55%, #f59e0b 100%);
}

.dash-grad-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.9;
  margin-bottom: 8px;
}

.dash-grad-val {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 6px;
}

.dash-grad-sub {
  font-size: 12px;
  opacity: 0.88;
}

.dash-grad-icon {
  position: absolute;
  bottom: 14px;
  right: 16px;
  opacity: 0.25;
}

html[dir="rtl"] .dash-grad-icon {
  right: auto;
  left: 16px;
}

.chart-summary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin: 12px 0 18px;
}

.chart-summary-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.chart-summary-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
}

.chart-summary-lbl {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.legend-dot.blue { background: #6366f1; }
.legend-dot.rose { background: #06b6d4; }
.legend-dot.emerald { background: #f59e0b; }

.dash-tables-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
}

@media (max-width: 960px) {
  .dash-tables-grid {
    grid-template-columns: 1fr;
  }
}

/* ==================== FULL MOBILE & TABLET RESPONSIVE ==================== */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

.main-content,
.table-card,
.filter-card,
.chart-card,
.ranking-card,
.kpi-card {
  min-width: 0;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
  .topbar {
    padding: 0 14px;
  }
  .topbar-right {
    gap: 8px;
  }
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .page-title {
    font-size: 22px;
  }
  .action-bar {
    flex-wrap: wrap;
    gap: 8px;
  }
  .table-card-header {
    flex-wrap: wrap;
    gap: 8px;
  }
  .dual-balance-card {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .modal-card {
    width: calc(100vw - 24px);
    max-width: none;
    max-height: 88vh;
    overflow-y: auto;
    padding: 18px;
  }
}

@media (max-width: 640px) {
  .filter-grid {
    grid-template-columns: 1fr !important;
  }
  .chart-summary-row {
    gap: 16px;
  }
  .chart-summary-num {
    font-size: 18px;
  }
  .dash-grad-val {
    font-size: 24px;
  }
  .action-bar .btn {
    padding: 7px 11px;
    font-size: 12.5px;
  }
  .toast-container {
    left: 12px !important;
    right: 12px !important;
    bottom: 14px;
  }
}

@media (max-width: 480px) {
  .topbar {
    padding: 0 10px;
  }
  .brand-text {
    font-size: 16px;
  }
  .icon-btn {
    width: 34px;
    height: 34px;
  }
  .user-pill {
    padding: 4px 8px;
  }
  .user-pill .user-info {
    display: none;
  }
  .login-shell {
  width: 100%;
  max-width: 1020px;
  display: grid;
  grid-template-columns: 1.05fr 430px;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.login-hero {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 12px 4px;
}

.login-hero-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.28);
  color: #34d399;
  font-size: 12px;
  font-weight: 700;
}

.login-hero-title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  line-height: 1.22;
  color: #f8fafc;
  margin: 0;
  letter-spacing: -0.02em;
}
html.light .login-hero-title {
  color: #0f172a;
}

.login-hero-desc {
  font-size: 14.5px;
  line-height: 1.65;
  color: #94a3b8;
  margin: 0;
  max-width: 480px;
}
html.light .login-hero-desc {
  color: #475569;
}

.login-feature-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 6px;
}

.login-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  transition: transform 0.2s, border-color 0.2s;
}
.login-feature-item:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.4);
}
html.light .login-feature-item {
  background: rgba(255, 255, 255, 0.85);
  border-color: #e2e8f0;
}

.login-feature-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.32);
  color: #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.login-feature-name {
  font-size: 14px;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 2px;
}
html.light .login-feature-name {
  color: #0f172a;
}

.login-feature-sub {
  font-size: 12.5px;
  color: #94a3b8;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
    max-width: 440px;
    gap: 24px;
  }
  .login-hero {
    display: none;
  }
}

.login-card {
    width: calc(100vw - 28px);
    padding: 26px 18px;
  }
  #topbarExitTestBtn {
    padding: 5px 9px !important;
    font-size: 11.5px !important;
  }
}

/* ==================== ANNOUNCEMENTS 2x2 GRID + SCROLL ==================== */
.announcements-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px 18px;
  max-height: 235px;
  overflow-y: auto;
}

@media (max-width: 768px) {
  .announcements-grid {
    grid-template-columns: 1fr;
    max-height: 260px;
  }
}

.announcements-grid::-webkit-scrollbar {
  width: 6px;
}
.announcements-grid::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.28);
  border-radius: 999px;
}

.announcement-card {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  min-height: 145px;
  transition: border-color 0.16s ease;
}

.announcement-card:hover {
  border-color: var(--border-hover);
}

.announcement-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.announcement-card-title {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 13.5px;
  line-height: 1.4;
}

.announcement-card-body {
  color: var(--text-secondary);
  font-size: 12.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  unicode-bidi: plaintext;
  max-height: 110px;
  overflow-y: auto;
}

.announcement-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

/* Full-screen Live Chat mode */
body.chat-fullscreen aside.sidebar,
body.chat-fullscreen .sidebar-backdrop {
  display: none !important;
}
body.chat-fullscreen .main-content {
  margin-left: 0 !important;
  padding: 12px 16px !important;
  max-width: 100% !important;
  width: 100% !important;
}

.chat-mobile-only {
  display: none !important;
}

@media (max-width: 900px) {
  .chat-mobile-only {
    display: inline-flex !important;
  }
  .chat-pane-assign > .chat-mobile-only {
    display: flex !important;
  }
  .chat-shell {
    grid-template-columns: 1fr !important;
    height: calc(100vh - 76px) !important;
  }
  .chat-shell.mobile-list .chat-pane-messages,
  .chat-shell.mobile-list .chat-pane-assign {
    display: none !important;
  }
  .chat-shell.mobile-chat .chat-pane-contacts,
  .chat-shell.mobile-chat .chat-pane-assign {
    display: none !important;
  }
  .chat-shell.mobile-assign .chat-pane-contacts,
  .chat-shell.mobile-assign .chat-pane-messages {
    display: none !important;
  }
}

/* WhatsApp-style Live Chat Feed & Bubbles */
.wa-feed {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background-color: #0b141a;
  background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 20px 20px;
}
body.theme-light .wa-feed {
  background-color: #efeae2;
  background-image: radial-gradient(rgba(17, 27, 33, 0.06) 1px, transparent 1px);
  background-size: 20px 20px;
}
.wa-date-pill {
  align-self: center;
  background: rgba(17, 27, 33, 0.85);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  margin: 6px 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}
body.theme-light .wa-date-pill {
  background: rgba(255, 255, 255, 0.92);
  color: #54656f;
}
.wa-msg-row {
  display: flex;
  flex-direction: column;
  max-width: 78%;
  position: relative;
}
.wa-msg-row.mine {
  align-self: flex-end;
  align-items: flex-end;
}
.wa-msg-row.theirs {
  align-self: flex-start;
  align-items: flex-start;
}
.wa-bubble {
  position: relative;
  padding: 9px 24px 8px 13px;
  border-radius: 16px;
  min-width: 74px;
  word-break: break-word;
}
.wa-bubble.mine {
  background: linear-gradient(145deg, #2563eb, #1e40af);
  color: #ffffff;
  border: 1px solid rgba(125,211,252,0.25);
  border-bottom-right-radius: 4px;
  box-shadow: 0 6px 16px rgba(37,99,235,0.30), 0 2px 4px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.25);
}
.wa-bubble.mine .wa-meta-inline {
  color: rgba(255,255,255,0.78);
}
.wa-bubble.theirs {
  background: linear-gradient(145deg, #1b283f, #131d30);
  color: #f8fafc;
  border: 1px solid rgba(255,255,255,0.08);
  border-bottom-left-radius: 4px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.32), inset 0 1px 0 rgba(255,255,255,0.08);
}
body.theme-light .wa-bubble.mine {
  background: linear-gradient(145deg, #2563eb, #1d4ed8);
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.22);
  box-shadow: 0 6px 16px rgba(37,99,235,0.30), 0 2px 4px rgba(15,23,42,0.12), inset 0 1px 0 rgba(255,255,255,0.28);
}
body.theme-light .wa-bubble.theirs {
  background: linear-gradient(145deg, #ffffff, #f8fafc);
  color: #0f172a;
  border: 1px solid rgba(15,23,42,0.08);
  box-shadow: 0 6px 16px rgba(15,23,42,0.10), 0 2px 4px rgba(15,23,42,0.06), inset 0 1px 0 rgba(255,255,255,0.85);
}
.wa-msg-body {
  font-size: 13.5px;
  line-height: 1.42;
}
.wa-meta-inline {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  float: right;
  margin: 4px -12px -2px 10px;
  font-size: 10.5px;
  opacity: 0.72;
  user-select: none;
}
.wa-tick {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -1.5px;
}
.wa-tick.sent {
  color: #94a3b8;
}
.wa-tick.seen {
  color: #38bdf8;
}
body.theme-light .wa-tick.sent {
  color: #667781;
}
body.theme-light .wa-tick.seen {
  color: #0284c7;
}
.wa-menu-btn {
  position: absolute;
  top: 2px;
  right: 5px;
  background: transparent;
  border: none;
  color: inherit;
  opacity: 0.45;
  cursor: pointer;
  font-size: 12px;
  padding: 2px 4px;
}
.wa-bubble:hover .wa-menu-btn {
  opacity: 0.9;
}
.wa-menu-pop {
  position: absolute;
  top: 24px;
  z-index: 50;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  min-width: 165px;
}
.wa-reply-quote {
  font-size: 11px;
  border-left: 3px solid #10b981;
  background: rgba(0, 0, 0, 0.14);
  border-radius: 4px;
  padding: 4px 7px;
  margin-bottom: 5px;
  opacity: 0.85;
}
body.theme-light .wa-reply-quote {
  background: rgba(0, 0, 0, 0.05);
}
.wa-rx-pill {
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1px 6px;
  font-size: 11px;
  cursor: pointer;
  color: var(--text-primary);
}
.wa-composer {
  padding: 8px 12px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}
body.theme-light .wa-composer {
  background: #f0f2f5;
}
.wa-input-pill {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  padding: 4px 10px;
  min-height: 40px;
}
body.theme-light .wa-input-pill {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
}
.wa-text-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 13.5px;
  min-width: 0;
}
.wa-icon-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 17px;
  padding: 4px;
  opacity: 0.85;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.wa-icon-btn:hover {
  opacity: 1;
}
.wa-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #00a884;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 168, 132, 0.35);
}
.wa-send-btn:hover {
  background: #059669;
}

.wa-system-card {
  align-self: center;
  max-width: 88%;
  width: 340px;
  background: #202c33;
  color: #e9edef;
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  text-align: left;
}
body.theme-light .wa-system-card {
  background: #e9edef;
  color: #111b21;
}
.wa-system-dl {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
body.theme-light .wa-system-dl {
  background: #ffffff;
  color: #111b21;
  border-color: rgba(0, 0, 0, 0.08);
}

.wa-sender-name {
  font-size: 11.5px;
  font-weight: 700;
  color: #fbbf24;
  margin-bottom: 2px;
  line-height: 1.2;
}
body.theme-light .wa-sender-name {
  color: #b45309;
}

/* Force Western/English digits everywhere */
input[type="number"],
.mono,
.kpi-value {
  direction: ltr;
  unicode-bidi: isolate;
  font-variant-numeric: lining-nums;
}

/* Premium Chat Polish Overrides */
.wa-feed {
  background-color: #0b141a;
  background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.04' stroke-width='1.2'%3E%3Cpath d='M14 18h14a3 3 0 0 1 3 3v8a3 3 0 0 1-3 3H19l-5 4v-4h0a3 3 0 0 1-3-3v-8a3 3 0 0 1 3-3z'/%3E%3Ccircle cx='58' cy='22' r='6'/%3E%3Cpath d='M48 56l5-5 4 4 8-8'/%3E%3Crect x='14' y='52' width='12' height='16' rx='2'/%3E%3C/g%3E%3C/svg%3E");
}
body.theme-light .wa-feed {
  background-color: #eef5fc;
  background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%232563eb' stroke-opacity='0.06' stroke-width='1.2'%3E%3Cpath d='M14 18h14a3 3 0 0 1 3 3v8a3 3 0 0 1-3 3H19l-5 4v-4h0a3 3 0 0 1-3-3v-8a3 3 0 0 1 3-3z'/%3E%3Ccircle cx='58' cy='22' r='6'/%3E%3Cpath d='M48 56l5-5 4 4 8-8'/%3E%3Crect x='14' y='52' width='12' height='16' rx='2'/%3E%3C/g%3E%3C/svg%3E");
}
.wa-menu-btn {
  opacity: 0;
  transition: opacity 0.15s;
}
.wa-bubble:hover .wa-menu-btn {
  opacity: 0.9;
}
.wa-bubble {
  border-radius: 13px;
  padding: 8px 13px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.wa-meta-inline {
  margin: 4px 0 -2px 10px;
}
.wa-send-btn {
  background: #2563eb;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.35);
}
.wa-send-btn:hover {
  background: #1d4ed8;
}
.wa-system-card {
  border-left: 3px solid #2563eb;
}
.wa-scroll-btn {
  position: absolute;
  right: 18px;
  bottom: 70px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 20;
}
.wa-em-cell:hover {
  background: rgba(37, 99, 235, 0.14);
}
@media (max-width: 900px) {
  body.chat-fullscreen .main-content {
    padding: 0 !important;
  }
  body.chat-fullscreen .chat-shell {
    border-radius: 0 !important;
    border: none !important;
    height: calc(100vh - 58px) !important;
  }
}

/* Diagonal Top-Left to Bottom-Right Animated Login Ribbons */
.login-view {
  position: relative;
  width: 100%;
  max-width: 100vw;
  overflow: hidden;
  box-sizing: border-box;
}
.login-shell {
  position: relative;
  z-index: 2;
}
.login-top-actions {
  z-index: 10;
}
@media (max-width: 900px) {
  .login-view {
    padding: 18px 14px !important;
  }
  .login-shell {
    width: 100% !important;
    max-width: 420px !important;
    margin: 0 auto !important;
  }
  .login-card {
    width: 100% !important;
    max-width: 100% !important;
    padding: 28px 20px 24px !important;
    box-sizing: border-box !important;
  }
}
.sahm-diag-ribbon-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
.sahm-diag-ribbon {
  position: absolute;
  top: 26%;
  left: 50%;
  width: 240vmax;
  padding: 22px 0;
  transform: translate(-50%, -50%) rotate(26deg);
  background: linear-gradient(90deg, rgba(15, 32, 68, 0.84), rgba(14, 165, 233, 0.22), rgba(15, 32, 68, 0.84));
  border-top: 2px solid rgba(56, 189, 248, 0.65);
  border-bottom: 2px solid rgba(245, 158, 11, 0.6);
  box-shadow: 0 0 32px rgba(14, 165, 233, 0.20);
  backdrop-filter: blur(4px);
  white-space: nowrap;
}
.sahm-diag-ribbon.ribbon-two {
  top: 74%;
  transform: translate(-50%, -50%) rotate(26deg);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.78), rgba(245, 158, 11, 0.18), rgba(15, 23, 42, 0.78));
  border-top: 2px solid rgba(245, 158, 11, 0.6);
  border-bottom: 2px solid rgba(56, 189, 248, 0.55);
}
body.theme-light .sahm-diag-ribbon {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.12), rgba(14, 165, 233, 0.18), rgba(37, 99, 235, 0.12));
  border-top: 2px solid rgba(37, 99, 235, 0.4);
  border-bottom: 2px solid rgba(245, 158, 11, 0.5);
  box-shadow: none;
}
body.theme-light .sahm-diag-ribbon.ribbon-two {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.12), rgba(37, 99, 235, 0.14), rgba(245, 158, 11, 0.12));
}
.sahm-diag-track {
  display: inline-flex;
  align-items: center;
  gap: 34px;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 2.2px;
  color: rgba(224, 242, 254, 0.90);
  animation: sahmMarqueeScroll 13s linear infinite;
}
.sahm-diag-ribbon.ribbon-two .sahm-diag-track {
  animation: sahmMarqueeScrollRev 16s linear infinite;
  color: rgba(254, 243, 199, 0.88);
}
body.theme-light .sahm-diag-track {
  color: rgba(30, 58, 138, 0.75);
}
body.theme-light .sahm-diag-ribbon.ribbon-two .sahm-diag-track {
  color: rgba(146, 64, 14, 0.75);
}
.sahm-diag-dot {
  color: #f59e0b;
}
@keyframes sahmMarqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes sahmMarqueeScrollRev {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}
