/*
 * MegaSender brand layer.
 *
 * Loaded after argon.css / custom.css / rtl.css, so it re-points the theme's
 * "primary" from Argon's stock indigo to the MegaSender signal green without
 * forking the theme. Everything is expressed through the tokens below — change
 * a token here and the whole panel follows.
 *
 * Identity: "one message becomes many" — deep navy ground, one vivid signal
 * green, used sparingly so it always means "this is the action".
 */

:root {
  /* ---- brand tokens ---- */
  --ms-navy:        #0a1128;   /* ground, sidebar, footers */
  --ms-navy-lift:   #162142;   /* raised navy surfaces */
  --ms-ink:         #101935;   /* headings on light */
  --ms-green:       #10d67a;   /* the signal — primary action */
  --ms-green-deep:  #06996f;   /* pressed / gradient end */
  --ms-mint:        #7df0bc;   /* highlight on dark */
  --ms-slate:       #6b7a99;   /* secondary text */
  --ms-line:        #e6eaf2;   /* hairlines */
  --ms-surface:     #f6f8fb;   /* page background */

  --ms-shadow:      0 4px 14px rgba(10, 17, 40, .10);
  --ms-shadow-lg:   0 12px 32px rgba(10, 17, 40, .16);
  --ms-radius:      .625rem;

  /* One family for Arabic and Latin, so mixed strings ("رصيد 1,240 رسالة")
     keep a single rhythm instead of visibly switching typeface mid-line. */
  --ms-font: "IBM Plex Sans Arabic", "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* ---- typography ------------------------------------------------------
 * Icon fonts are deliberately absent from these selectors. FontAwesome,
 * Nucleo and uicons each set font-family on their own <i> element, which is
 * more specific than inheritance — so the glyphs keep working untouched.
 */

body { font-family: var(--ms-font); }

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
p, a, li, td, th, label, small, strong, blockquote,
button, .btn, .badge, .alert,
input, select, textarea, .form-control, .custom-select,
.nav-link, .navbar-heading, .nav-link-text,
.card-title, .card-header, .modal-title,
.table, .dropdown-item, .toastify, .swal2-popup {
  font-family: var(--ms-font) !important;
}

/* Arabic sits lower and needs a little more line height than Latin defaults. */
html[dir="rtl"] body { line-height: 1.75; }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3,
html[dir="rtl"] h4, html[dir="rtl"] h5 { line-height: 1.45; }

/* Latin caps inside Arabic UI (plan names, API, ID) read better slightly tracked. */
.text-uppercase, th, .navbar-heading { letter-spacing: .015em; }

/* Tabular figures so numbers in tables and counters line up column to column. */
td, th, .stat, .counter, .badge { font-variant-numeric: tabular-nums; }

/* ---- primary: buttons, links, accents ------------------------------- */

.btn-primary,
.bg-primary,
.badge-primary {
  background-color: var(--ms-green) !important;
  border-color: var(--ms-green) !important;
  color: #04231a !important;                 /* dark ink on green reads better than white */
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:not(:disabled):not(.disabled):active {
  background-color: var(--ms-green-deep) !important;
  border-color: var(--ms-green-deep) !important;
  color: #fff !important;
  box-shadow: var(--ms-shadow) !important;
}

.bg-gradient-primary {
  background: linear-gradient(135deg, var(--ms-green) 0%, var(--ms-green-deep) 100%) !important;
}

.text-primary { color: var(--ms-green-deep) !important; }

.btn-outline-primary {
  color: var(--ms-green-deep) !important;
  border-color: var(--ms-green) !important;
}
.btn-outline-primary:hover {
  background-color: var(--ms-green) !important;
  color: #04231a !important;
}

a { color: var(--ms-green-deep); }
a:hover { color: var(--ms-navy); }

/* Focus ring — keyboard users need to see it, and it should be the brand colour. */
.form-control:focus,
.custom-select:focus {
  border-color: var(--ms-green) !important;
  box-shadow: 0 0 0 .18rem rgba(16, 214, 122, .22) !important;
}

/* ---- sidebar -------------------------------------------------------- */

.sidenav .navbar-nav .nav-link.active {
  color: var(--ms-green-deep) !important;
  font-weight: 600;
}
.sidenav .navbar-nav .nav-link.active > i { color: var(--ms-green-deep) !important; }

/* An edge marker instead of a full highlight block — quieter, and it works in
   both directions because it is anchored to the inline start. */
.sidenav .navbar-nav .nav-link.active::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 22px;
  border-radius: 0 3px 3px 0;
  background: var(--ms-green);
}
.sidenav .navbar-nav .nav-link { position: relative; }

.navbar-brand-img { max-height: 44px; width: auto; }

/* ---- surfaces ------------------------------------------------------- */

body { background-color: var(--ms-surface); }

.card {
  border: 1px solid var(--ms-line);
  border-radius: var(--ms-radius);
  box-shadow: var(--ms-shadow);
}
.card-header { background: transparent; border-bottom: 1px solid var(--ms-line); }

/* Argon's header band — navy instead of the stock indigo. */
.header.bg-gradient-primary,
.main-content .header.bg-primary {
  background: linear-gradient(135deg, var(--ms-navy-lift) 0%, var(--ms-navy) 100%) !important;
}

.table thead th {
  background: var(--ms-surface);
  color: var(--ms-slate);
  border-bottom: 1px solid var(--ms-line);
  letter-spacing: .02em;
}

h1, h2, h3, h4, h5, .h1, .h2, .h3, .h4, .h5 { color: var(--ms-ink); }

/* WhatsApp-status greens stay semantic, not decorative. */
.badge-success, .bg-success { background-color: var(--ms-green) !important; color: #04231a !important; }

/* ---- public site footer ---------------------------------------------
 * The stock theme paints the footer in its own blue-violet (#141774), which
 * belongs to no part of this identity. Re-ground it in brand navy.
 *
 * The link colour also has to change here: --ms-green-deep on that dark ground
 * measured 4.13:1, under the 4.5:1 WCAG AA needs. Mint on navy clears 10:1.
 */

footer .tp-footer__area,
footer .theme-bg,
.tp-footer__area.theme-bg {
  background: linear-gradient(180deg, var(--ms-navy-lift) 0%, var(--ms-navy) 100%) !important;
}

footer a,
footer .tp-footer__link a,
footer li a {
  color: #e8eefc !important;
}
footer a:hover,
footer li a:hover {
  color: var(--ms-mint) !important;
}

footer p,
footer .tp-footer__text p,
footer .tp-footer__contact-text a { color: #b9c4dc !important; }

footer h1, footer h2, footer h3, footer h4, footer h5,
footer .tp-footer__widget-title { color: #fff !important; }

/* Copyright strip: one shade lighter than the ground so the seam still reads. */
footer .tp-copyright__area,
footer .tp-footer__copyright {
  background: var(--ms-navy) !important;
  border-top: 1px solid rgba(255, 255, 255, .08);
}
footer .tp-copyright__area p { color: #93a2c0 !important; }

/* Social buttons: outlined on navy, filled brand green on hover. */
footer .tp-footer__social a {
  border: 1px solid rgba(255, 255, 255, .18) !important;
  color: #e8eefc !important;
}
footer .tp-footer__social a:hover {
  background: var(--ms-green) !important;
  border-color: var(--ms-green) !important;
  color: #04231a !important;
}

/* The language select is a white box on navy — soften it so it stops shouting. */
footer .nice-select,
footer select.language-switch {
  background: rgba(255, 255, 255, .08) !important;
  border: 1px solid rgba(255, 255, 255, .18) !important;
  color: #e8eefc !important;
}
footer .nice-select .list { background: #fff !important; }
footer .nice-select .option { color: var(--ms-ink) !important; }

/* Back-to-top button: the theme ships it in a stock blue that belongs to no part
   of this palette, and at a size that covers content on a phone. */
.scroll-top {
  background: var(--ms-navy) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, .14) !important;
  width: 42px !important;
  height: 42px !important;
  line-height: 42px !important;
  border-radius: 50% !important;
  box-shadow: var(--ms-shadow-lg) !important;
  opacity: .9;
}
.scroll-top:hover { background: var(--ms-green) !important; color: #04231a !important; opacity: 1; }
