/* ============================================================
   Callston design system
   Palette: light purple / green / white / black
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
  --purple-50:  #f5f3ff;
  --purple-100: #ede9fe;
  --purple-200: #ddd6fe;
  --purple-300: #c4b5fd;
  --purple-400: #a78bfa;
  --purple-500: #8b5cf6;
  --purple-600: #7c3aed;
  --purple-700: #6d28d9;
  --green-100:  #dcfce7;
  --green-300:  #86efac;
  --green-500:  #22c55e;
  --green-600:  #16a34a;
  --ink:        #14121f;
  --ink-soft:   #3f3b52;
  --muted:      #6f6a85;
  --line:       #e8e5f4;
  --bg:         #faf9fe;
  --white:      #ffffff;
  --danger:     #ef4444;
  --warning:    #f59e0b;
  --radius:     14px;
  --shadow-sm:  0 1px 3px rgba(20, 18, 31, .07);
  --shadow-md:  0 6px 24px rgba(124, 58, 237, .10);
  --shadow-lg:  0 16px 48px rgba(124, 58, 237, .16);
  --grad:       linear-gradient(135deg, var(--purple-500), var(--green-500));
  --grad-soft:  linear-gradient(135deg, var(--purple-100), var(--green-100));
  --font:       "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
[dir="rtl"] body { text-align: right; }
a { color: var(--purple-600); text-decoration: none; }
a:hover { color: var(--purple-700); }
img { max-width: 100%; }

h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; color: var(--ink); }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 10px; border: 0; cursor: pointer;
  font: 600 15px var(--font); transition: all .22s ease; text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: var(--shadow-md); position: relative; overflow: hidden; }
.btn-primary::after {
  content: ""; position: absolute; top: 0; height: 100%; width: 40%; left: -60%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.45), transparent);
  transform: skewX(-20deg); transition: left .5s ease;
}
.btn-primary:hover::after { left: 130%; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); color: #fff; }
.btn-outline { background: transparent; color: var(--purple-600); border: 2px solid var(--purple-300); }
.btn-outline:hover { border-color: var(--purple-500); background: var(--purple-50); }
.btn-ghost { background: transparent; color: var(--ink-soft); }
.btn-ghost:hover { background: var(--purple-50); color: var(--purple-700); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; color: #fff; }
.btn-green { background: var(--green-500); color: #fff; }
.btn-green:hover { background: var(--green-600); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 15px 34px; font-size: 17px; border-radius: 12px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none !important; }
.btn-block { width: 100%; }

/* ---------- Forms ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.input, select.input, textarea.input {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 10px;
  font: 15px var(--font); color: var(--ink); background: var(--white); transition: border .2s, box-shadow .2s;
}
.input:focus { outline: none; border-color: var(--purple-400); box-shadow: 0 0 0 4px var(--purple-100); }
textarea.input { min-height: 120px; resize: vertical; }
.input-group { display: flex; gap: 10px; }
.input-group .input { flex: 1; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
/* Toggle switch (.tgl — class renamed so stale cached stylesheets can
   never mis-style it; knob lives INSIDE the track, text in its own span) */
.tgl { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.tgl input { position: absolute; opacity: 0; width: 0; height: 0; }
.tgl .tgl-track {
  position: relative; display: inline-block; flex: none; align-self: center; top: 2px;
  width: 38px; height: 22px; box-sizing: border-box;
  background: #a7a1c4; border: 2px solid #8d86b3; border-radius: 999px;
  transition: background .2s ease, border-color .2s ease;
}
.tgl .tgl-track::after {
  content: ""; position: absolute; top: 1px; inset-inline-start: 1px; width: 16px; height: 16px;
  background: #ffffff; border-radius: 50%; box-shadow: 0 1px 3px rgba(20,18,31,.4);
  transition: transform .22s ease;
}
.tgl input:checked + .tgl-track { background: var(--green-500); border-color: var(--green-600); }
.tgl input:checked + .tgl-track::after { transform: translateX(16px); }
[dir="rtl"] .tgl input:checked + .tgl-track::after { transform: translateX(-16px); }
.tgl input:focus-visible + .tgl-track { box-shadow: 0 0 0 4px var(--purple-100); }
.tgl .tgl-text { font-weight: 600; color: var(--ink-soft); line-height: 1.2; }
/* Text-first variant: label before the switch, both on one line.
   The hidden input is position:absolute so only text + track are flex
   items; align-items:center keeps them level, and RTL mirrors the row
   automatically (text on the right, switch on the left). */
.tgl.tgl-after { align-items: center; }
.tgl.tgl-after .tgl-text { order: 0; }
.tgl.tgl-after .tgl-track { order: 1; }

/* ---------- Cards / panels ---------- */
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm);
}
.card-hover { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.card-hover:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--purple-300); }
.card h3 { margin-bottom: 8px; }

/* ---------- Alerts / badges ---------- */
.alert { padding: 13px 18px; border-radius: 10px; margin-bottom: 18px; font-size: 14.5px; }
.alert-error { background: #fee2e2; color: #991b1b; }
.alert-success { background: var(--green-100); color: #166534; }
.alert-info { background: var(--purple-100); color: var(--purple-700); }
.alert-warning { background: #fef3c7; color: #92400e; }
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
}
.badge-green { background: var(--green-100); color: var(--green-600); }
.badge-purple { background: var(--purple-100); color: var(--purple-600); }
.badge-gray { background: #f1f0f7; color: var(--muted); }
.badge-red { background: #fee2e2; color: #b91c1c; }
.badge-yellow { background: #fef3c7; color: #92400e; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--white); }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th {
  text-align: start; padding: 12px 16px; background: var(--purple-50); color: var(--ink-soft);
  font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap;
}
table.data td { padding: 12px 16px; border-top: 1px solid var(--line); vertical-align: middle; }
table.data tr:hover td { background: var(--purple-50); }
.table-empty { text-align: center; color: var(--muted); padding: 40px !important; }

/* ---------- Public site ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60; backdrop-filter: blur(12px);
  background: rgba(255,255,255,.85); border-bottom: 1px solid var(--line);
}
.site-header .inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }

/* ---------- Brand logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark { display: inline-flex; flex: none; filter: drop-shadow(0 4px 10px rgba(124,58,237,.35)); transition: transform .3s ease; }
.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.06); }
.logo-word {
  font-weight: 800; font-size: 22px; letter-spacing: -.03em; color: var(--ink); line-height: 1;
  direction: ltr; unicode-bidi: isolate;
}
.logo-word.on-dark { color: #fff; }
.logo-grad {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  background-size: 200% 200%; animation: grad-shift 5s ease infinite;
}
.logo-dot { color: var(--green-500); }
@keyframes grad-shift { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

.site-nav { display: flex; align-items: center; gap: 8px; }
.site-nav .nav-links { display: flex; align-items: center; gap: 4px; }
.site-nav .nav-links a {
  color: var(--ink-soft); font-weight: 600; font-size: 14.5px; padding: 9px 14px; border-radius: 999px;
  transition: all .2s;
}
.site-nav .nav-links a:hover { color: var(--purple-700); background: var(--purple-50); }
.lang-select {
  border: 1.5px solid var(--line); border-radius: 999px; padding: 7px 12px; font: 600 13.5px var(--font);
  background: var(--white); color: var(--ink-soft); cursor: pointer;
}

/* ---------- Flag-only language menu (hover/tap dropdown) ---------- */
.lang-menu { position: relative; }
.lang-menu .lang-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: 999px; background: var(--white); transition: all .2s;
}
.lang-menu .lang-btn:hover { border-color: var(--purple-300); box-shadow: var(--shadow-sm); }
.lang-menu .lang-btn img { width: 22px; height: 16.5px; border-radius: 3px; display: block; }
.lang-menu .lang-btn .caret { font-size: 10px; color: var(--muted); }
.lang-menu .lang-list {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0; min-width: 190px; z-index: 90;
  background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 6px;
  box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: all .22s ease;
}
.lang-menu:hover .lang-list, .lang-menu.open .lang-list, .lang-menu:focus-within .lang-list {
  opacity: 1; visibility: visible; transform: none;
}
.lang-menu .lang-list a {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px;
  font-weight: 600; font-size: 14px; color: var(--ink-soft);
}
.lang-menu .lang-list a img { width: 22px; height: 16.5px; border-radius: 3px; }
.lang-menu .lang-list a:hover { background: var(--purple-50); color: var(--purple-700); }
.lang-menu .lang-list a.on { background: var(--grad-soft); color: var(--purple-700); }

/* Language grid inside the mobile drawer */
.drawer .lang-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.drawer .lang-grid a {
  display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 10px;
  font-weight: 600; font-size: 13.5px; color: var(--ink-soft); border: 1px solid var(--line);
}
.drawer .lang-grid a img { width: 20px; height: 15px; border-radius: 3px; }
.drawer .lang-grid a.on { border-color: var(--purple-400); background: var(--purple-50); color: var(--purple-700); }

/* ---------- Mobile drawer (burger menu) ---------- */
.burger {
  display: none; position: relative; width: 42px; height: 42px; border: 1.5px solid var(--line);
  border-radius: 12px; background: var(--white); cursor: pointer; z-index: 96;
}
.burger span, .burger::before, .burger::after {
  content: ""; position: absolute; left: 11px; right: 11px; height: 2.5px; border-radius: 2px;
  background: var(--ink); transition: all .3s cubic-bezier(.65,.05,.36,1);
}
.burger::before { top: 13px; }
.burger span { top: 19px; }
.burger::after { top: 25px; }
body.drawer-open .burger::before { top: 19px; transform: rotate(45deg); }
body.drawer-open .burger span { opacity: 0; transform: translateX(8px); }
body.drawer-open .burger::after { top: 19px; transform: rotate(-45deg); }

.drawer-overlay {
  position: fixed; inset: 0; background: rgba(20,18,31,.5); backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity .3s ease; z-index: 94;
}
body.drawer-open .drawer-overlay { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; bottom: 0; inset-inline-end: 0; width: min(320px, 86vw); z-index: 95;
  background: var(--white); box-shadow: -12px 0 50px rgba(20,18,31,.18);
  transform: translateX(110%); transition: transform .38s cubic-bezier(.32,.72,.28,1);
  display: flex; flex-direction: column; padding: 20px;
  border-start-start-radius: 20px; border-end-start-radius: 20px;
}
[dir="rtl"] .drawer { transform: translateX(-110%); box-shadow: 12px 0 50px rgba(20,18,31,.18); }
body.drawer-open .drawer { transform: none; }
.drawer .drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.drawer nav { display: flex; flex-direction: column; gap: 4px; }
.drawer nav a {
  padding: 13px 16px; border-radius: 12px; font-weight: 600; font-size: 16px; color: var(--ink-soft);
  transition: all .2s; opacity: 0; transform: translateX(18px);
}
[dir="rtl"] .drawer nav a { transform: translateX(-18px); }
body.drawer-open .drawer nav a { opacity: 1; transform: none; }
.drawer nav a:nth-child(1) { transition: all .3s ease .08s; }
.drawer nav a:nth-child(2) { transition: all .3s ease .14s; }
.drawer nav a:nth-child(3) { transition: all .3s ease .20s; }
.drawer nav a:nth-child(4) { transition: all .3s ease .26s; }
.drawer nav a:nth-child(5) { transition: all .3s ease .32s; }
.drawer nav a:hover { background: var(--purple-50); color: var(--purple-700); }
.drawer .drawer-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.drawer .lang-select { width: 100%; padding: 12px 14px; border-radius: 12px; }

.hero {
  position: relative; overflow: hidden; padding: 100px 0 90px;
  background:
    radial-gradient(700px 380px at 12% -10%, var(--purple-200), transparent 65%),
    radial-gradient(640px 360px at 95% 8%, var(--green-100), transparent 60%),
    var(--bg);
}
.hero .blob {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; pointer-events: none;
  animation: drift 14s ease-in-out infinite alternate;
}
.hero .blob-1 { width: 380px; height: 380px; background: var(--purple-300); top: -120px; inset-inline-start: -80px; }
.hero .blob-2 { width: 300px; height: 300px; background: var(--green-300); bottom: -100px; inset-inline-end: 8%; animation-delay: 3s; }
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(50px, 34px) scale(1.15); }
}
.hero .container { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 60px; align-items: center; }
.hero h1 {
  font-size: clamp(36px, 5.4vw, 62px); letter-spacing: -.035em; margin-bottom: 22px; font-weight: 800;
}
.hero h1 .grad {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  background-size: 200% 200%; animation: grad-shift 6s ease infinite;
}
.hero p.lead { font-size: 19px; color: var(--ink-soft); margin-bottom: 34px; max-width: 540px; }
.hero .cta-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero .badge-note { margin-top: 18px; color: var(--muted); font-size: 14px; }

/* Entrance animation for hero content */
.fu { opacity: 0; transform: translateY(24px); animation: fade-up .7s ease forwards; }
.fu-1 { animation-delay: .05s; } .fu-2 { animation-delay: .18s; }
.fu-3 { animation-delay: .32s; } .fu-4 { animation-delay: .46s; }
@keyframes fade-up { to { opacity: 1; transform: none; } }

/* Hero stats strip */
.hero-stats {
  display: flex; gap: 36px; flex-wrap: wrap; margin-top: 40px; padding-top: 26px;
  border-top: 1px solid var(--line);
}
.hero-stats .hs .num {
  font-size: 26px; font-weight: 800; letter-spacing: -.02em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-stats .hs .lbl { font-size: 13px; color: var(--muted); font-weight: 600; }

/* Eyebrow label above section titles */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase; color: var(--purple-600);
  background: var(--purple-50); border: 1px solid var(--purple-200);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 16px;
}

/* Gradient CTA band */
.cta-band {
  position: relative; overflow: hidden; border-radius: 24px; padding: 64px 30px; text-align: center;
  background: linear-gradient(120deg, var(--purple-600), var(--purple-500) 40%, var(--green-500));
  background-size: 180% 180%; animation: grad-shift 10s ease infinite; color: #fff;
  box-shadow: var(--shadow-lg);
}
.cta-band h2 { color: #fff; font-size: clamp(26px, 3.6vw, 40px); margin-bottom: 12px; letter-spacing: -.02em; }
.cta-band p { opacity: .92; font-size: 17px; max-width: 520px; margin: 0 auto 28px; }
.cta-band .btn { background: #fff; color: var(--purple-700); font-weight: 700; }
.cta-band .btn:hover { transform: translateY(-2px) scale(1.02); }

/* Floating phone mock */
.phone-mock {
  position: relative; width: 300px; margin: 0 auto; background: var(--ink); border-radius: 36px;
  padding: 16px 12px; box-shadow: var(--shadow-lg); animation: float 6s ease-in-out infinite;
}
.phone-mock .screen { background: var(--white); border-radius: 26px; padding: 22px 16px; min-height: 430px; }
@keyframes float { 0%,100% { transform: translateY(0) rotate(-1.5deg);} 50% { transform: translateY(-16px) rotate(1deg);} }
.mock-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.mock-pad span {
  display: flex; align-items: center; justify-content: center; height: 52px; border-radius: 14px;
  background: var(--purple-50); font-weight: 700; font-size: 18px; color: var(--ink-soft);
}
.mock-call {
  margin-top: 18px; height: 54px; border-radius: 999px; background: var(--grad); display: flex;
  align-items: center; justify-content: center; color: #fff; font-size: 22px;
  animation: pulse-soft 2.2s infinite;
}
@keyframes pulse-soft {
  0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,.45); }
  55%     { box-shadow: 0 0 0 16px rgba(34,197,94,0); }
}
.float-chip {
  position: absolute; background: var(--white); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-md); padding: 10px 14px; font-size: 13px; font-weight: 600;
  display: flex; gap: 8px; align-items: center; animation: float 7s ease-in-out infinite;
}
.float-chip.chip-1 { top: 40px; inset-inline-start: -60px; animation-delay: .8s; }
.float-chip.chip-2 { bottom: 70px; inset-inline-end: -50px; animation-delay: 1.6s; }

/* Sections */
.section { padding: 90px 0; }
.section.alt { background: var(--white); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 54px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 38px); margin-bottom: 14px; }
.section-head p { color: var(--muted); font-size: 17px; }

.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card .icon {
  width: 52px; height: 52px; border-radius: 14px; background: var(--grad-soft); display: flex;
  align-items: center; justify-content: center; font-size: 24px; margin-bottom: 16px;
}
.feature-card p { color: var(--muted); font-size: 14.5px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step { position: relative; padding: 30px 26px 26px; }
.step .num {
  width: 42px; height: 42px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 800;
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px; font-size: 18px;
}
.step p { color: var(--muted); font-size: 14.5px; }

/* Pricing search */
.pricing-box { max-width: 860px; margin: 0 auto; }
.pricing-search { position: relative; margin-bottom: 22px; }
.pricing-search .input { padding-inline-start: 44px; height: 52px; font-size: 16px; }
.pricing-search .ico { position: absolute; inset-inline-start: 16px; top: 15px; color: var(--muted); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 46px; align-items: start; }

/* Footer */
.site-footer { position: relative; background: var(--ink); color: #cfcbe4; padding: 60px 0 30px; }
.site-footer::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--grad); }
.site-footer h4 { color: #fff; margin-bottom: 14px; font-size: 15px; }
.site-footer a { color: #b6b0d6; display: block; margin-bottom: 8px; font-size: 14px; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 34px; margin-bottom: 40px; }
.footer-bottom { border-top: 1px solid #2c2840; padding-top: 22px; font-size: 13px; color: #8d87ab; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* Scroll-reveal animation */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Auth pages ---------- */
.auth-wrap { min-height: calc(100vh - 70px); display: flex; align-items: center; justify-content: center; padding: 48px 20px;
  background: radial-gradient(600px 400px at 80% 0%, var(--purple-100), transparent 60%), var(--bg); }
.auth-card { width: 100%; max-width: 430px; padding: 38px 34px; animation: rise .5s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.auth-card h1 { font-size: 26px; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); margin-bottom: 26px; font-size: 14.5px; }
.auth-foot { text-align: center; margin-top: 20px; font-size: 14px; color: var(--muted); }

/* ---------- App shell (user + admin) ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 250px; flex: none; background: var(--white); border-inline-end: 1px solid var(--line);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar .logo { padding: 22px 22px 16px; font-size: 19px; }
.sidebar nav { padding: 8px 12px; flex: 1; overflow-y: auto; }
.sidebar nav a {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 10px;
  color: var(--ink-soft); font-weight: 500; font-size: 14.5px; margin-bottom: 3px; transition: all .18s;
}
.sidebar nav a .ico { width: 22px; text-align: center; font-size: 17px; }
.sidebar nav a:hover { background: var(--purple-50); color: var(--purple-700); }
.sidebar nav a.active { background: var(--grad-soft); color: var(--purple-700); font-weight: 600; }
.sidebar .side-foot { padding: 16px 22px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.sidebar .balance-chip {
  margin: 10px 12px; padding: 14px 16px; border-radius: 12px; background: var(--grad); color: #fff;
}
.sidebar .balance-chip .lbl { font-size: 12px; opacity: .85; }
.sidebar .balance-chip .amt { font-size: 22px; font-weight: 800; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 64px; background: rgba(255,255,255,.82); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line); display: flex;
  align-items: center; justify-content: space-between; padding: 0 26px; position: sticky; top: 0; z-index: 40;
}
/* Overlay behind the app sidebar on mobile */
.side-overlay {
  position: fixed; inset: 0; background: rgba(20,18,31,.45); backdrop-filter: blur(2px);
  z-index: 70; opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
body.side-open .side-overlay { opacity: 1; pointer-events: auto; }
.topbar .page-title { font-size: 17px; font-weight: 700; }
.topbar .right { display: flex; align-items: center; gap: 16px; }
.bell { position: relative; font-size: 19px; color: var(--ink-soft); }
.bell .count {
  position: absolute; top: -6px; inset-inline-end: -8px; background: var(--danger); color: #fff;
  border-radius: 999px; font-size: 10.5px; font-weight: 700; padding: 1px 5.5px;
  animation: pulse-soft 2s infinite;
}
.avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--grad); color: #fff; display: flex;
  align-items: center; justify-content: center; font-weight: 700; font-size: 14px;
}
.content { padding: 30px 26px; max-width: 1280px; width: 100%; }
.page-h { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-h h1 { font-size: 24px; }

/* Stat tiles */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 26px; }
.stat { padding: 20px 22px; }
.stat .lbl { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.stat .val { font-size: 26px; font-weight: 800; letter-spacing: -.01em; }
.stat .val.green { color: var(--green-600); }
.stat .val.purple { color: var(--purple-600); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.mt { margin-top: 22px; } .mb { margin-bottom: 22px; }

/* ---------- Dialer ---------- */
.dialer-wrap { display: grid; grid-template-columns: 380px 1fr; gap: 26px; align-items: start; }
.dialer { text-align: center; }
.dialer .display {
  font-size: 26px; font-weight: 700; letter-spacing: .02em; min-height: 44px; margin-bottom: 6px;
  direction: ltr;
}
.dialer .status { color: var(--muted); font-size: 14px; min-height: 22px; margin-bottom: 14px; }
.dialer .status.on { color: var(--green-600); font-weight: 600; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0; }
.keypad button {
  height: 62px; border-radius: 16px; border: 1px solid var(--line); background: var(--white);
  font: 700 21px var(--font); color: var(--ink); cursor: pointer; transition: all .15s;
}
.keypad button span { display: block; font-size: 10px; font-weight: 500; color: var(--muted); letter-spacing: .12em; }
.keypad button:hover { background: var(--purple-50); border-color: var(--purple-300); transform: translateY(-2px); }
.keypad button:active { transform: scale(.96); }
.call-btn {
  width: 74px; height: 74px; border-radius: 50%; border: 0; background: var(--green-500); color: #fff;
  font-size: 28px; cursor: pointer; transition: all .2s; box-shadow: 0 8px 24px rgba(34,197,94,.4);
}
.call-btn:hover { transform: scale(1.06); }
.call-btn.hangup { background: var(--danger); box-shadow: 0 8px 24px rgba(239,68,68,.4); }
.call-timer { font-size: 30px; font-weight: 800; color: var(--green-600); font-variant-numeric: tabular-nums; }

/* SMS chat bubbles */
.sms-thread { max-height: 480px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 8px 2px; }
.bubble { max-width: 75%; padding: 10px 14px; border-radius: 16px; font-size: 14px; }
.bubble.out { align-self: flex-end; background: var(--grad); color: #fff; border-end-end-radius: 4px; }
.bubble.in { align-self: flex-start; background: var(--purple-50); border-end-start-radius: 4px; }
.bubble .meta { font-size: 11px; opacity: .75; margin-top: 4px; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 24px; flex-wrap: wrap; }
.tabs a {
  padding: 11px 18px; font-weight: 600; font-size: 14.5px; color: var(--muted);
  border-bottom: 2.5px solid transparent; margin-bottom: -2px;
}
.tabs a.active { color: var(--purple-600); border-color: var(--purple-500); }

/* Toasts */
#toasts { position: fixed; bottom: 24px; inset-inline-end: 24px; z-index: 100; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--ink); color: #fff; padding: 13px 20px; border-radius: 12px; font-size: 14px;
  box-shadow: var(--shadow-lg); animation: rise .3s ease; max-width: 380px;
}
.toast.success { background: var(--green-600); }
.toast.error { background: var(--danger); }

/* Modal */
.modal-back {
  position: fixed; inset: 0; background: rgba(20,18,31,.55); z-index: 90; display: flex;
  align-items: center; justify-content: center; padding: 20px; animation: fade .2s ease;
}
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; animation: rise .3s ease; }

/* Pagination */
.pager { display: flex; gap: 6px; margin-top: 18px; align-items: center; font-size: 14px; color: var(--muted); }
.pager a { padding: 7px 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.pager a.on { background: var(--grad); color: #fff; border: 0; }

/* Simple bar chart */
.chart { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: 10px; }
.chart .bar-g { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; height: 100%; }
.chart .bar { border-radius: 4px 4px 0 0; min-height: 2px; transition: height .6s ease; }
.chart .bar.income { background: var(--green-500); }
.chart .bar.cost { background: var(--purple-400); }
.legend { display: flex; gap: 18px; font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 6px; }
.legend .l-income::before { background: var(--green-500); }
.legend .l-cost::before { background: var(--purple-400); }

/* Country picker with flags (numbers page) */
.cp { position: relative; }
.cp-selected {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--line); border-radius: 10px; background: var(--white);
  font: 15px var(--font); color: var(--ink); cursor: pointer; text-align: start;
}
.cp-selected:hover { border-color: var(--purple-300); }
.cp-selected img { width: 24px; height: 18px; border-radius: 3px; box-shadow: var(--shadow-sm); flex: none; }
.cp-selected .caret { margin-inline-start: auto; color: var(--muted); }
.cp-panel {
  position: absolute; top: calc(100% + 6px); inset-inline-start: 0; width: 100%; min-width: 260px;
  background: var(--white); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-lg); z-index: 50; display: none; overflow: hidden;
}
.cp.open .cp-panel { display: block; }
.cp-search { padding: 10px; border-bottom: 1px solid var(--line); }
.cp-list { max-height: 300px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.cp-list button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 14px;
  border: 0; background: none; font: 14px var(--font); color: var(--ink); cursor: pointer; text-align: start;
}
.cp-list button:hover, .cp-list button.hl { background: var(--purple-50); }
.cp-list img { width: 24px; height: 18px; border-radius: 3px; flex: none; }
.cp-list .price { margin-inline-start: auto; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.flag-sm { width: 20px; height: 15px; border-radius: 2px; vertical-align: -2px; margin-inline-end: 6px; }

/* Setup guides (admin settings) */
.guide { background: var(--purple-50); border: 1px solid var(--purple-200); border-radius: var(--radius); margin-bottom: 22px; }
.guide summary {
  cursor: pointer; padding: 15px 20px; font-weight: 700; color: var(--purple-700); font-size: 15px;
  list-style: none; display: flex; align-items: center; gap: 10px;
}
.guide summary::-webkit-details-marker { display: none; }
.guide summary::after { content: "▾"; margin-inline-start: auto; transition: transform .2s; color: var(--purple-400); }
.guide[open] summary::after { transform: rotate(180deg); }
.guide .guide-body { padding: 0 20px 18px; font-size: 14px; color: var(--ink-soft); }
.guide ol { padding-inline-start: 22px; margin: 8px 0; }
.guide ol li { margin-bottom: 10px; line-height: 1.55; }
.guide code {
  background: #fff; border: 1px solid var(--purple-200); border-radius: 6px; padding: 1px 7px;
  font-size: 12.5px; color: var(--purple-700); word-break: break-all;
}
.guide a { font-weight: 600; }
.guide .guide-tip { background: var(--green-100); border-radius: 8px; padding: 10px 14px; margin-top: 10px; font-size: 13px; color: #166534; }

/* Visual email template editor */
.tpl-editor { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; background: var(--white); }
.tpl-editor > summary {
  cursor: pointer; padding: 15px 20px; font-weight: 600; list-style: none;
  display: flex; align-items: center; gap: 10px;
}
.tpl-editor > summary::-webkit-details-marker { display: none; }
.tpl-editor > summary::after { content: "✎"; margin-inline-start: auto; color: var(--purple-400); }
.tpl-editor .tpl-inner { padding: 0 20px 20px; }
.tpl-toolbar {
  display: flex; gap: 4px; flex-wrap: wrap; align-items: center; padding: 8px;
  border: 1.5px solid var(--line); border-bottom: 0; border-radius: 10px 10px 0 0; background: var(--purple-50);
  position: sticky; top: 64px; z-index: 5;
}
.tpl-toolbar button, .tpl-toolbar select, .tpl-toolbar label.color-wrap {
  border: 1px solid transparent; background: transparent; border-radius: 7px; min-width: 32px; height: 32px;
  font: 600 14px var(--font); color: var(--ink-soft); cursor: pointer; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center;
}
.tpl-toolbar button:hover, .tpl-toolbar label.color-wrap:hover { background: var(--purple-100); border-color: var(--purple-200); }
.tpl-toolbar .sep { width: 1px; height: 20px; background: var(--purple-200); margin: 0 4px; }
.tpl-toolbar select { border: 1px solid var(--purple-200); background: #fff; font-weight: 500; font-size: 13px; max-width: 170px; }
.tpl-toolbar input[type="color"] { width: 0; height: 0; padding: 0; border: 0; visibility: hidden; position: absolute; }
.tpl-frame {
  border: 1.5px solid var(--line); border-radius: 0 0 10px 10px; background: #f5f3ff; padding: 26px 18px;
}
.tpl-frame .tpl-mail { max-width: 560px; margin: 0 auto; }
.tpl-frame .tpl-mail-head {
  background: linear-gradient(135deg, #8b5cf6, #22c55e); border-radius: 14px 14px 0 0;
  padding: 20px 26px; text-align: center; color: #fff; font-weight: 800; font-size: 19px;
}
.tpl-canvas {
  background: #fff; border-radius: 0 0 14px 14px; padding: 30px 28px; min-height: 220px;
  font-size: 15px; line-height: 1.65; color: #3f3b52; outline: none;
}
.tpl-canvas:focus { box-shadow: inset 0 0 0 2px var(--purple-300); }
.tpl-canvas a { color: #8b5cf6; }
.tpl-html { min-height: 260px; font-family: monospace; font-size: 13px; border-radius: 0 0 10px 10px !important; }
.tpl-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; align-items: center; }
.ph-chip {
  display: inline-block; background: var(--purple-100); color: var(--purple-700); border-radius: 6px;
  padding: 2px 8px; font-size: 12px; font-weight: 600; cursor: pointer; margin: 2px;
}
.ph-chip:hover { background: var(--purple-200); }

/* Install wizard */
.wizard { max-width: 640px; margin: 60px auto; }
.wizard .steps-bar { display: flex; gap: 8px; margin-bottom: 26px; }
.wizard .steps-bar span { flex: 1; height: 6px; border-radius: 999px; background: var(--line); }
.wizard .steps-bar span.on { background: var(--grad); }
.check-list { list-style: none; }
.check-list li { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }

/* Mobile */
.menu-toggle { display: none; background: none; border: 0; font-size: 24px; cursor: pointer; color: var(--ink); }
@media (max-width: 980px) {
  .hero .container, .contact-grid, .dialer-wrap, .grid-2 { grid-template-columns: 1fr; }
  .features-grid, .steps, .grid-3 { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .phone-mock { display: none; }
  .site-nav .nav-links, .site-nav .nav-cta, .site-nav .lang-select { display: none; }
  .burger { display: block; }
  .hero-stats { gap: 22px; }
  .menu-toggle { display: block; }
  .sidebar { position: fixed; z-index: 80; transform: translateX(-105%); transition: transform .3s cubic-bezier(.32,.72,.28,1); }
  [dir="rtl"] .sidebar { transform: translateX(105%); }
  body.side-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
}
@media (max-width: 620px) {
  .features-grid, .steps, .stats, .grid-3, .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .hero { padding: 70px 0 50px; }
}
