/* PDA-ET website · shared styles */
:root {
  --navy: #0a1730;
  --navy-2: #102449;
  --teal: #14b8a6;
  --blue: #2563eb;
  --amber: #f59e0b;
  --ink: #0f172a;
  --text: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f6f8fb;
  --card: #ffffff;
  --ok: #059669;
  --warn: #d97706;
  --bad: #dc2626;
  --grad: linear-gradient(120deg, var(--teal), var(--blue));
  --radius: 16px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px rgba(15, 23, 42, .07);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, .15);
  --font: "Manrope", system-ui, "Segoe UI", sans-serif;
  --font-ar: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 16px/1.65 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
html[lang=ar] body { font-family: var(--font-ar); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
html[lang=ar] h1, html[lang=ar] h2, html[lang=ar] h3 { letter-spacing: 0; line-height: 1.35; }
p { margin: 0 0 1em; }
a { color: var(--blue); text-decoration: none; }
img, svg { max-width: 100%; }
.container { width: min(1160px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.center { text-align: center; }
[hidden] { display: none !important; }

/* Show only the active language */
html[lang=ar] [data-lang=en], html:not([lang=ar]) [data-lang=ar] { display: none !important; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 12px; border: 0; font: inherit; font-weight: 700; cursor: pointer;
  transition: transform .15s, box-shadow .2s, background-color .2s, opacity .2s; text-decoration: none; line-height: 1.2;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary { color: #fff; background: var(--grad); box-shadow: 0 8px 22px rgba(37, 99, 235, .28); }
.btn-primary:hover { box-shadow: 0 12px 28px rgba(37, 99, 235, .36); }
.btn-ghost { color: var(--ink); background: #fff; border: 1px solid var(--line); }
.btn-light { color: var(--navy); background: #fff; }
.btn-outline-light { color: #fff; border: 1px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .06); }
.btn-ok { color: #fff; background: var(--ok); }
.btn-bad { color: #fff; background: var(--bad); }
.btn-sm { padding: 8px 14px; font-size: 14px; border-radius: 10px; }
.btn[disabled], .btn.busy { opacity: .6; pointer-events: none; }
.btn.busy::after { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.link-btn { background: none; border: 0; color: var(--blue); font: inherit; font-weight: 600; cursor: pointer; padding: 0; }
.link-btn.bad { color: var(--bad); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .82); backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.site-header.scrolled { border-color: var(--line); box-shadow: 0 4px 20px rgba(15, 23, 42, .06); }
.nav-wrap { display: flex; align-items: center; gap: 24px; height: 70px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.logo-mark { width: 44px; height: auto; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text b { font-size: 18px; letter-spacing: .5px; }
.brand-text small { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.brand.light, .brand.light b { color: #fff; }
.brand.light small { color: #94a3b8; }
.main-nav { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.main-nav > a, .dd-btn { padding: 8px 12px; border-radius: 10px; color: var(--ink); font-weight: 600; font-size: 15px; background: none; border: 0; font-family: inherit; cursor: pointer; }
.main-nav a:hover, .dd-btn:hover, .main-nav a.active { background: #eef4ff; color: var(--blue); }
.dropdown { position: relative; }
.chev { font-size: 11px; }
.dd-menu { position: absolute; top: calc(100% + 8px); inset-inline-start: 0; min-width: 250px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 8px; box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(6px); transition: .18s; }
.dropdown.open .dd-menu, .dropdown:hover .dd-menu { opacity: 1; visibility: visible; transform: none; }
.dd-menu a { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--ink); font-weight: 600; font-size: 15px; }
.dd-menu a:hover { background: #f1f5f9; }
.soon { font-style: normal; font-size: 11px; font-weight: 700; color: var(--warn); background: #fef3c7; padding: 2px 8px; border-radius: 999px; margin-inline-start: 6px; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.lang-toggle { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-weight: 800; cursor: pointer; color: var(--ink); font-family: var(--font-ar); }
.burger { display: none; width: 40px; height: 40px; border: 0; background: none; cursor: pointer; padding: 9px; }
.burger span { display: block; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: .25s; }
body.nav-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .burger span:nth-child(2) { opacity: 0; }
body.nav-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 920px) {
  .burger { display: block; }
  .nav-actions .btn { display: none; }
  .main-nav { position: fixed; inset: 70px 0 auto 0; flex-direction: column; align-items: stretch; background: #fff; padding: 12px 16px 20px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg); transform: translateY(-120%); transition: transform .3s; margin: 0; max-height: calc(100vh - 70px); overflow: auto; }
  body.nav-open .main-nav { transform: none; }
  .dd-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 12px; display: none; }
  .dropdown.open .dd-menu { display: block; }
  .dd-btn { width: 100%; text-align: start; }
  .nav-wrap { gap: 12px; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; color: #cbd5e1; background: var(--navy); padding: 96px 0 110px; }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; animation: float 14s ease-in-out infinite alternate; }
.hero::before { width: 520px; height: 520px; background: var(--teal); top: -180px; inset-inline-end: -120px; }
.hero::after { width: 460px; height: 460px; background: var(--blue); bottom: -220px; inset-inline-start: -140px; animation-delay: -6s; }
.hero .grid-bg { position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%); }
.hero .container { position: relative; z-index: 1; }
.hero h1 { color: #fff; font-size: clamp(36px, 5.4vw, 64px); font-weight: 800; max-width: 900px; }
.hero h1 .grad { background: linear-gradient(90deg, #5eead4, #93c5fd); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: clamp(17px, 1.6vw, 20px); max-width: 680px; color: #cbd5e1; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #99f6e4; background: rgba(20, 184, 166, .12); border: 1px solid rgba(94, 234, 212, .25); margin-bottom: 18px; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: #5eead4; box-shadow: 0 0 0 0 rgba(94, 234, 212, .7); animation: pulse 2s infinite; }
.hero-stats { display: flex; gap: 40px; flex-wrap: wrap; margin-top: 56px; }
.hero-stats b { display: block; font-size: 30px; color: #fff; }
.hero-stats span { font-size: 14px; }
.page-hero { padding: 72px 0 80px; }
.page-hero h1 { font-size: clamp(32px, 4.4vw, 52px); }

/* ---------- Sections ---------- */
section.block { padding: 88px 0; }
section.alt { background: #fff; }
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head.center { margin-inline: auto; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; }
.kicker { display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); margin-bottom: 10px; }
html[lang=ar] .kicker { letter-spacing: 0; }
.grid { display: grid; gap: 22px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .g3, .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } section.block { padding: 64px 0; } }
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 36px; } }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s, border-color .25s; }
.card.hover:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: #c7d7fe; }
.icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; margin-bottom: 16px; color: #fff; background: var(--grad); box-shadow: 0 8px 18px rgba(37, 99, 235, .25); }
.icon.amber { background: linear-gradient(135deg, #fbbf24, #f97316); box-shadow: 0 8px 18px rgba(249, 115, 22, .25); }
.icon.violet { background: linear-gradient(135deg, #a78bfa, #7c3aed); box-shadow: 0 8px 18px rgba(124, 58, 237, .25); }
.icon.pink { background: linear-gradient(135deg, #f472b6, #e11d48); box-shadow: 0 8px 18px rgba(225, 29, 72, .25); }
.card h3 { font-size: 20px; }
.card .more { font-weight: 700; display: inline-flex; gap: 6px; align-items: center; margin-top: 6px; }
.card .more::after { content: "→"; transition: transform .2s; }
html[lang=ar] .card .more::after { content: "←"; }
.card.hover:hover .more::after { transform: translateX(4px); }
html[lang=ar] .card.hover:hover .more::after { transform: translateX(-4px); }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.badge.ok { color: var(--ok); background: #d1fae5; }
.badge.warn { color: #b45309; background: #fef3c7; }
.badge.bad { color: var(--bad); background: #fee2e2; }
.badge.info { color: var(--blue); background: #dbeafe; }
.badge.muted { color: var(--muted); background: #f1f5f9; }
.division { position: relative; display: flex; flex-direction: column; }
.division .badge { position: absolute; top: 22px; inset-inline-end: 22px; }
.division.inactive { background: linear-gradient(180deg, #fff, #f8fafc); }

.checks { list-style: none; padding: 0; margin: 0 0 1em; display: grid; gap: 10px; }
.checks li { position: relative; padding-inline-start: 30px; }
.checks li::before { content: "✓"; position: absolute; inset-inline-start: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; background: var(--teal); }

.steps { counter-reset: step; }
.step-card { position: relative; padding-top: 34px; }
.step-card::before { counter-increment: step; content: counter(step); position: absolute; top: -18px; inset-inline-start: 24px; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--grad); }

/* ---------- Pricing ---------- */
.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 340px)); justify-content: center; gap: 24px; }
.price-card { text-align: center; position: relative; }
.price-card.featured { border: 2px solid var(--blue); box-shadow: 0 20px 50px rgba(37, 99, 235, .18); }
.price-card .ribbon { position: absolute; top: -13px; inset-inline-start: 50%; transform: translateX(-50%); }
html[lang=ar] .price-card .ribbon { transform: translateX(50%); }
.price { font-size: 42px; font-weight: 800; color: var(--ink); margin: 8px 0 2px; }
.price small { font-size: 15px; color: var(--muted); font-weight: 600; }
.price-card .seats { font-weight: 700; color: var(--ink); margin: 0 0 6px; }
.pricing-switches { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 0 0 28px; }
.seg-switch { display: inline-flex; background: #e8edf5; border-radius: 999px; padding: 4px; }
.seg-switch button { border: 0; background: none; font: inherit; font-weight: 700; color: var(--muted); padding: 8px 20px; border-radius: 999px; cursor: pointer; }
.seg-switch button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.promo-banner { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; max-width: 760px; margin: 0 auto 22px; padding: 12px 18px; border-radius: 14px; background: linear-gradient(120deg, #fef3c7, #fde68a); color: #78350f; text-align: center; }
.promo-banner .promo-code { background: #fff; padding: 2px 10px; border-radius: 8px; letter-spacing: .05em; }
.promo-banner .muted { color: #92400e; }
.promo-gift { font-size: 22px; }
.price-strike { text-decoration: line-through; color: var(--muted); font-weight: 600; font-size: .55em; margin-inline-end: 8px; }
.promo-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 0 0 20px; max-width: 520px; }
.promo-row input { flex: 1; min-width: 160px; text-transform: uppercase; }
.guide-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 18px; }
.guide-tabs button { border: 1px solid var(--line); background: #fff; font: inherit; font-weight: 700; color: var(--muted); padding: 9px 20px; border-radius: 999px; cursor: pointer; }
.guide-tabs button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.guide-frame { max-width: 960px; margin: 0 auto; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-lg); background: #fff; }
.guide-frame img { display: block; width: 100%; height: auto; }
.guide-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 20px; }

/* ---------- Product showcase ---------- */
.showcase { position: relative; border-radius: 22px; padding: 28px; background: linear-gradient(160deg, #04302a, #021c19); box-shadow: var(--shadow-lg); overflow: hidden; }
.showcase img { display: block; border-radius: 14px; width: 100%; }
.cta-band { position: relative; overflow: hidden; border-radius: 24px; padding: 56px; color: #dbeafe; background: linear-gradient(120deg, var(--navy), var(--navy-2)); }
.cta-band::after { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%; background: var(--teal); filter: blur(90px); opacity: .35; top: -200px; inset-inline-end: -100px; }
.cta-band h2 { color: #fff; }
.cta-band > * { position: relative; z-index: 1; }
@media (max-width: 640px) { .cta-band { padding: 32px 22px; } }

/* ---------- FAQ ---------- */
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px; margin-bottom: 12px; }
.faq summary { cursor: pointer; font-weight: 700; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--blue); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 12px 0 0; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 14px; }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .form .row2 { grid-template-columns: 1fr; } }
label.field { display: grid; gap: 6px; font-weight: 600; font-size: 14px; color: var(--ink); }
input, select, textarea { width: 100%; font: inherit; font-size: 15px; color: var(--ink); background: #fff; padding: 12px 14px; border: 1px solid #cbd5e1; border-radius: 12px; transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(37, 99, 235, .14); }
textarea { resize: vertical; min-height: 120px; }
.hint { font-size: 13px; color: var(--muted); font-weight: 500; }
.form-msg { padding: 12px 14px; border-radius: 12px; font-weight: 600; }
.form-msg.ok { background: #d1fae5; color: #065f46; }
.form-msg.bad { background: #fee2e2; color: #991b1b; }
.hp { position: absolute; left: -9999px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #94a3b8; padding: 64px 0 0; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 36px; }
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.site-footer a { display: block; color: #cbd5e1; margin-bottom: 8px; }
.site-footer a:hover { color: #5eead4; }
.site-footer a.brand { display: inline-flex; margin-bottom: 14px; }
.site-footer .muted { color: #94a3b8; margin-top: 14px; }
.social { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); margin-top: 40px; padding: 20px 0; font-size: 14px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

.wa-float { position: fixed; bottom: 22px; inset-inline-end: 22px; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: #25d366; box-shadow: 0 10px 26px rgba(37, 211, 102, .45); z-index: 40; transition: transform .2s; }
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; height: 30px; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; bottom: 24px; inset-inline-start: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 100; }
html[lang=ar] .toasts { transform: translateX(50%); }
.toast { padding: 12px 18px; border-radius: 12px; color: #fff; background: var(--ink); font-weight: 600; box-shadow: var(--shadow-lg); animation: rise .3s both; }
.toast.bad { background: var(--bad); }
.toast.ok { background: #065f46; }
.toast.out { opacity: 0; transform: translateY(8px); transition: .4s; }

/* ---------- App shell (portal + admin) ---------- */
.app { display: grid; grid-template-columns: 250px 1fr; min-height: calc(100vh - 70px); }
.app-side { background: #fff; border-inline-end: 1px solid var(--line); padding: 22px 14px; }
.app-side .who { padding: 4px 10px 16px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.app-side .who b { display: block; color: var(--ink); }
.app-side .who span { font-size: 13px; color: var(--muted); word-break: break-all; }
.tabs { display: grid; gap: 4px; }
.tab { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 0; background: none; font: inherit; font-weight: 600; color: var(--text); cursor: pointer; text-align: start; }
.tab:hover { background: #f1f5f9; }
.tab.active { background: #eef4ff; color: var(--blue); }
.tab .count { font-size: 12px; font-weight: 800; color: #fff; background: var(--bad); padding: 1px 8px; border-radius: 999px; }
.app-main { padding: 28px clamp(16px, 3vw, 40px) 60px; min-width: 0; }
.app-main h1 { font-size: 26px; }
.panel { animation: rise .3s both; }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .app-side { border-inline-end: 0; border-bottom: 1px solid var(--line); padding: 12px; }
  .app-side .who { display: none; }
  .tabs { display: flex; overflow-x: auto; }
  .tab { white-space: nowrap; }
}
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.stat b { display: block; font-size: 28px; color: var(--ink); }
.stat span { font-size: 13px; color: var(--muted); font-weight: 600; }

.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 14px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: #f8fafc; font-weight: 700; }
html[lang=ar] th { letter-spacing: 0; }
tr:last-child td { border-bottom: 0; }
td .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mono { font-family: Consolas, "SFMono-Regular", monospace; direction: ltr; unicode-bidi: embed; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar input, .toolbar select { width: auto; flex: 1 1 200px; padding: 9px 12px; }

.license-card { display: grid; gap: 14px; }
.key-box { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: #f1f5f9; border: 1px dashed #cbd5e1; }
.key-box .mono { flex: 1; font-size: 15px; font-weight: 700; color: var(--ink); word-break: break-all; }

.pay-box { border-radius: 16px; padding: 22px; background: linear-gradient(135deg, #eff6ff, #f0fdfa); border: 1px solid #bfdbfe; }
.pay-box .big { font-size: 26px; font-weight: 800; color: var(--ink); }
.copy-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; background: #fff; border-radius: 10px; border: 1px solid var(--line); margin-top: 8px; }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(15, 23, 42, .55); display: grid; place-items: center; padding: 16px; z-index: 90; animation: fade .2s both; }
.modal { width: min(560px, 100%); max-height: 90vh; overflow: auto; background: #fff; border-radius: 18px; padding: 26px; box-shadow: var(--shadow-lg); animation: rise .25s both; }
.modal img { border-radius: 12px; border: 1px solid var(--line); }

/* Auth page */
.auth-wrap { min-height: calc(100vh - 70px); display: grid; place-items: center; padding: 40px 16px; background: radial-gradient(circle at 20% 10%, #dbeafe, transparent 40%), radial-gradient(circle at 90% 90%, #ccfbf1, transparent 40%), var(--bg); }
.auth-card { width: min(440px, 100%); }
.auth-switch { display: flex; background: #f1f5f9; border-radius: 12px; padding: 4px; margin-bottom: 20px; }
.auth-switch button { flex: 1; border: 0; background: none; padding: 9px; border-radius: 9px; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; }
.auth-switch button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }

/* ---------- Motion ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; }
@keyframes float { to { transform: translate(40px, 30px) scale(1.08); } }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(94, 234, 212, 0); } 100% { box-shadow: 0 0 0 0 rgba(94, 234, 212, 0); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Admin → Promotions → Social posts */
.social-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; margin-top: 14px; }
.social-card { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.social-thumb { border-radius: 12px; overflow: hidden; background: #e8edf5; }
.social-thumb img, .social-thumb canvas { display: block; width: 100%; height: auto; border: 0; border-radius: 0; }
.social-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.social-meta .hint { width: 100%; margin: 0; }
.social-meta .hint:nth-child(2) { width: auto; }
.social-cap { margin: 0; font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.modal.modal-wide { width: min(1100px, 100%); }
.social-editor { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 22px; align-items: start; }
.social-editor .social-preview { width: 100%; height: auto; border-radius: 14px; box-shadow: var(--shadow); position: sticky; top: 0; }
.social-editor .form { display: grid; gap: 10px; }
.setup-steps ol { padding-inline-start: 20px; display: grid; gap: 10px; }
.setup-steps code { background: #eef2f7; padding: 1px 6px; border-radius: 6px; font-size: .9em; word-break: break-all; }
@media (max-width: 820px) { .social-editor { grid-template-columns: 1fr; } }

/* Admin → Overview dashboard (colours: dataviz reference palette, light) */
.dash { --viz-1: #2a78d6; --viz-ord-1: #86b6ef; --viz-ord-2: #3987e5; --viz-ord-3: #1c5cab; --viz-grid: #e8ecf2; display: grid; gap: 18px; }
.dash-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.dash-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.dash-tools .seg-switch button { padding: 7px 14px; font-size: 14px; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 1500px) { .kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 700px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: start; font: inherit; color: inherit; cursor: pointer; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow); transition: border-color .2s, transform .2s; min-width: 0; }
.kpi:hover, .kpi:focus-visible { border-color: #b7d3f6; transform: translateY(-1px); }
.kpi-label { font-size: 13px; font-weight: 700; color: var(--muted); }
.kpi-value { font-size: 28px; font-weight: 800; color: var(--ink); line-height: 1.15; letter-spacing: -.01em; }
.kpi-sub { font-size: 12.5px; color: var(--muted); }
.kpi-trend { font-size: 12.5px; font-weight: 700; }
.kpi-trend.up { color: var(--ok); } .kpi-trend.down { color: var(--bad); } .kpi-trend.flat { color: var(--muted); }
.kpi-vs { font-weight: 500; color: var(--muted); }
.spark { width: 100%; height: 30px; margin: 2px 0; }
.spark-empty { height: 30px; }
.dash-grid { display: grid; gap: 18px; }
.dash-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dash-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .dash-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) { .dash-grid.two, .dash-grid.three { grid-template-columns: 1fr; } }
.dash-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; box-shadow: var(--shadow); min-width: 0; }
.dash-card h3 { font-size: 16px; margin: 0 0 12px; }
.alerts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.alert { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #f8fafc; border-inline-start: 4px solid var(--muted); font-size: 14px; }
.alert.critical { border-color: var(--bad); background: #fef2f2; } .alert.warning { border-color: var(--warn); background: #fffbeb; } .alert.info { border-color: #2a78d6; background: #f0f6fe; }
.alert.good { border-color: var(--ok); background: #ecfdf5; margin: 0; }
.alert-icon { font-size: 16px; flex: none; } .alert-text { flex: 1; min-width: 0; } .alert .btn { flex: none; white-space: nowrap; }
.insights { margin: 0; padding-inline-start: 18px; display: grid; gap: 8px; font-size: 14px; color: var(--ink); }
.viz { width: 100%; height: auto; display: block; overflow: visible; }
.viz-grid { stroke: var(--viz-grid); stroke-width: 1; } .viz-base { stroke: #cbd5e1; stroke-width: 1; }
.viz-bar { fill: var(--viz-1); } .viz-bar.partial { fill: #86b6ef; }
.viz-axis { font-size: 12px; fill: var(--muted); font-family: inherit; } .viz-label { font-size: 12px; font-weight: 700; fill: var(--ink); font-family: inherit; }
.viz-hit { cursor: default; outline: none; } .viz-hit:focus .viz-bar, .viz-hit:hover .viz-bar { opacity: .85; }
.barlist { display: grid; gap: 10px; }
.barrow { display: grid; grid-template-columns: minmax(80px, 34%) 1fr auto; align-items: center; gap: 10px; font-size: 13.5px; outline: none; }
.bar-label { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 12px; background: #f1f5f9; border-radius: 4px; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 4px; min-width: 2px; }
.bar-value { font-weight: 700; color: var(--ink); text-align: end; min-width: 2.5em; }
.bar-value small { display: block; font-weight: 500; color: var(--muted); font-size: 11.5px; }
.viz-details { margin-top: 10px; font-size: 13px; } .viz-details summary { cursor: pointer; color: var(--muted); }
.viz-table { width: 100%; margin-top: 8px; border-collapse: collapse; } .viz-table th, .viz-table td { padding: 5px 8px; border-bottom: 1px solid var(--line); text-align: start; }
.viz-tip { position: fixed; z-index: 100; display: none; pointer-events: none; background: #0f172a; color: #fff; padding: 8px 10px; border-radius: 8px; font-size: 13px; box-shadow: 0 6px 20px rgba(15,23,42,.25); max-width: 240px; }
.viz-tip .hint { color: #cbd5e1; }
.promo-stat { display: grid; gap: 10px; } .promo-stat + .promo-stat { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.promo-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.progress { height: 8px; background: #f1f5f9; border-radius: 999px; overflow: hidden; } .progress span { display: block; height: 100%; background: var(--viz-1); border-radius: 999px; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; } .mini-stats b { display: block; font-size: 15px; color: var(--ink); } .mini-stats span { font-size: 12px; color: var(--muted); }
.cal { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cal li { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 10px; }
.cal img { width: 44px; height: 55px; object-fit: cover; border-radius: 8px; border: 0; }
.cal li > div { display: grid; min-width: 0; } .cal li .hint { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.last-post { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 12px; font-size: 13px; }
