/* ==========================================================
   QR Menu SaaS — Design system
   Logical properties are used everywhere so RTL & LTR both work.
   ========================================================== */
:root {
  --primary: #ff6b35;
  --primary-600: #f05a22;
  --primary-50: #fff3ee;
  --primary-100: #ffe3d6;
  --accent: #7c3aed;
  --ink: #141a2e;
  --ink-2: #2e3650;
  --muted: #6b7390;
  --line: #e8eaf2;
  --line-2: #f1f2f7;
  --bg: #f6f7fb;
  --card: #ffffff;
  --green: #16a34a; --green-50: #e9f9ef;
  --red: #e11d48; --red-50: #ffeef2;
  --amber: #d97706; --amber-50: #fff6e5;
  --blue: #2563eb; --blue-50: #ebf2ff;
  --violet: #7c3aed; --violet-50: #f3edff;
  --teal: #0d9488; --teal-50: #e6f8f6;
  --gray-50: #f1f2f6;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(20, 26, 46, .05), 0 1px 3px rgba(20, 26, 46, .04);
  --shadow: 0 6px 24px -6px rgba(20, 26, 46, .10), 0 2px 6px rgba(20, 26, 46, .04);
  --shadow-lg: 0 24px 60px -12px rgba(20, 26, 46, .22);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --font: "Plus Jakarta Sans", "Cairo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sidebar: 268px;
  color-scheme: light;
}
[dir="rtl"] { --font: "Cairo", "Plus Jakarta Sans", system-ui, sans-serif; }
[data-theme="dark"] {
  --ink: #eef0f8; --ink-2: #cdd2e3; --muted: #8e96b2; --line: #262c42; --line-2: #1d2235;
  --bg: #0d1120; --card: #141a2c; --gray-50: #1b2133;
  --primary-50: rgba(255, 107, 53, .12); --primary-100: rgba(255, 107, 53, .2);
  --green-50: rgba(22, 163, 74, .15); --red-50: rgba(225, 29, 72, .15); --amber-50: rgba(217, 119, 6, .15);
  --blue-50: rgba(37, 99, 235, .15); --violet-50: rgba(124, 58, 237, .15); --teal-50: rgba(13, 148, 136, .15);
  --shadow: 0 6px 24px -6px rgba(0, 0, 0, .5); --shadow-lg: 0 24px 60px -12px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 15px; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-600); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { letter-spacing: 0; }
p { margin: 0 0 1em; }
code { background: var(--gray-50); padding: 2px 6px; border-radius: 6px; font-size: .88em; direction: ltr; unicode-bidi: embed; }
pre { background: #0f1424; color: #d9e1ff; padding: 16px; border-radius: 12px; overflow: auto; font-size: 13px; direction: ltr; text-align: left; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
::selection { background: var(--primary); color: #fff; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, Consolas, monospace; direction: ltr; unicode-bidi: embed; }
.ltr { direction: ltr; unicode-bidi: embed; }
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0 } .mt-1 { margin-top: 8px } .mt-2 { margin-top: 16px } .mt-3 { margin-top: 24px } .mb-0 { margin-bottom: 0 } .mb-2 { margin-bottom: 16px } .mb-3 { margin-bottom: 24px }
.flex { display: flex; gap: 12px; align-items: center; } .flex-wrap { flex-wrap: wrap; } .between { justify-content: space-between; } .grow { flex: 1; }
.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 20px; }

/* ---------- Buttons ---------- */
.btn { --b: var(--primary); display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 12px; border: 1px solid transparent; font: 600 14.5px/1.2 var(--font); cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s, color .2s, border-color .2s; white-space: nowrap; position: relative; overflow: hidden; user-select: none; text-decoration: none; }
.btn i { font-size: 1.15em; }
.btn:active { transform: scale(.97); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-600)); color: #fff; box-shadow: 0 8px 20px -6px color-mix(in srgb, var(--primary) 60%, transparent); }
.btn-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 14px 28px -8px color-mix(in srgb, var(--primary) 70%, transparent); }
.btn-dark { background: var(--ink); color: var(--card); }
.btn-dark:hover { color: var(--card); transform: translateY(-2px); }
.btn-light { background: var(--card); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-light:hover { color: var(--ink); border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--gray-50); color: var(--ink); }
.btn-soft { background: var(--primary-50); color: var(--primary-600); }
.btn-soft:hover { background: var(--primary-100); color: var(--primary-600); }
.btn-success { background: var(--green); color: #fff; } .btn-success:hover { color: #fff; filter: brightness(1.05); transform: translateY(-1px); }
.btn-danger { background: var(--red); color: #fff; } .btn-danger:hover { color: #fff; filter: brightness(1.05); transform: translateY(-1px); }
.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: 10px; }
.btn-lg { padding: 15px 28px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.loading { opacity: .7; pointer-events: none; }
.btn.loading::after { content: ""; width: 16px; height: 16px; border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn-icon { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); cursor: pointer; transition: all .2s var(--ease); font-size: 17px; }
.btn-icon:hover { background: var(--primary-50); color: var(--primary); border-color: var(--primary-100); transform: translateY(-1px); }
.btn-icon.danger:hover { background: var(--red-50); color: var(--red); border-color: transparent; }
.ripple { position: absolute; border-radius: 50%; transform: scale(0); background: rgba(255, 255, 255, .45); animation: ripple .6s linear; pointer-events: none; }
.inline-form { display: inline; margin: 0; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .ml-head label { font-weight: 600; font-size: 13.5px; color: var(--ink-2); }
.req { color: var(--red); }
.help { color: var(--muted); font-size: 12.5px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=tel], input[type=search], input[type=date], input[type=datetime-local], input[type=color], select, textarea {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: 14.5px/1.4 var(--font); transition: border-color .2s, box-shadow .2s, background .2s; outline: none; }
input[type=color] { padding: 4px; height: 44px; cursor: pointer; }
textarea { resize: vertical; min-height: 90px; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-50); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%236b7390' stroke-width='2'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-inline-end: 36px; }
[dir="rtl"] select { background-position: left 14px center; }
select[multiple] { background-image: none; min-height: 110px; padding: 8px; }
.input-icon { position: relative; }
.input-icon i { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 18px; pointer-events: none; }
.input-icon input { padding-inline-start: 42px; }
.ml-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ml-tabs { display: inline-flex; background: var(--gray-50); border-radius: 8px; padding: 2px; }
.ml-tab { border: 0; background: transparent; padding: 3px 9px; font: 700 11px var(--font); color: var(--muted); border-radius: 6px; cursor: pointer; transition: all .2s; }
.ml-tab.active { background: var(--card); color: var(--primary); box-shadow: var(--shadow-sm); }
.ml-pane { display: none; } .ml-pane.active { display: block; animation: fadeIn .3s var(--ease); }
.toggle { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; padding: 4px 0; }
.toggle input[type=checkbox] { position: absolute; opacity: 0; pointer-events: none; }
.toggle .track { flex: 0 0 auto; width: 44px; height: 25px; border-radius: 30px; background: var(--line); position: relative; transition: background .25s var(--ease); margin-top: 1px; }
.toggle .thumb { position: absolute; top: 3px; inset-inline-start: 3px; width: 19px; height: 19px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); transition: transform .3s var(--ease); }
.toggle input:checked + .track { background: var(--primary); }
.toggle input:checked + .track .thumb { transform: translateX(19px); }
[dir="rtl"] .toggle input:checked + .track .thumb { transform: translateX(-19px); }
.toggle-text { display: flex; flex-direction: column; } .toggle-text b { font-weight: 600; font-size: 14px; } .toggle-text small { color: var(--muted); font-size: 12.5px; }
.check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 14px; user-select: none; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check .box { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line); display: grid; place-items: center; transition: all .2s var(--ease); background: var(--card); flex: 0 0 auto; }
.check .box i { color: #fff; font-size: 14px; transform: scale(0); transition: transform .2s var(--ease); }
.check input:checked + .box { background: var(--primary); border-color: var(--primary); }
.check input:checked + .box i { transform: scale(1); }
.check.small { font-size: 12.5px; color: var(--muted); }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px 16px; }
.dropzone { position: relative; display: grid; place-items: center; min-height: 140px; border: 2px dashed var(--line); border-radius: 14px; background: var(--gray-50); cursor: pointer; overflow: hidden; transition: border-color .2s, background .2s; }
.dropzone:hover, .dropzone.drag { border-color: var(--primary); background: var(--primary-50); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone .dz-preview { display: none; max-height: 180px; object-fit: contain; }
.dropzone.has-image .dz-preview { display: block; }
.dropzone.has-image .dz-empty { display: none; }
.dz-empty { display: flex; flex-direction: column; align-items: center; color: var(--muted); text-align: center; padding: 16px; }
.dz-empty i { font-size: 30px; color: var(--primary); }
.dz-empty b { color: var(--ink-2); font-size: 14px; }
.dz-empty small { font-size: 12px; }

/* ---------- Alerts / badges ---------- */
.alert { padding: 13px 16px; border-radius: 12px; font-size: 14px; margin-bottom: 16px; display: flex; gap: 10px; align-items: flex-start; border: 1px solid transparent; animation: slideDown .4s var(--ease); }
.alert i { font-size: 18px; line-height: 1.3; }
.alert-error { background: var(--red-50); color: var(--red); }
.alert-success { background: var(--green-50); color: var(--green); }
.alert-info { background: var(--blue-50); color: var(--blue); }
.alert-warning { background: var(--amber-50); color: var(--amber); }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 30px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-green { background: var(--green-50); color: var(--green); }
.badge-red { background: var(--red-50); color: var(--red); }
.badge-amber { background: var(--amber-50); color: var(--amber); }
.badge-blue { background: var(--blue-50); color: var(--blue); }
.badge-violet { background: var(--violet-50); color: var(--violet); }
.badge-teal { background: var(--teal-50); color: var(--teal); }
.badge-gray { background: var(--gray-50); color: var(--muted); }
.badge-primary { background: var(--primary-50); color: var(--primary-600); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 8px; background: var(--gray-50); font-size: 12.5px; font-weight: 600; color: var(--ink-2); }

/* ---------- Cards / tables ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: box-shadow .3s var(--ease), transform .3s var(--ease); }
.card-pad { padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { font-size: 16px; margin: 0; display: flex; gap: 8px; align-items: center; }
.card-head h2 i, .card-head h3 i { color: var(--primary); }
.card-body { padding: 22px; }
.card-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.card.hover:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.span-2 { grid-column: span 2; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: start; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 12px 16px; background: var(--line-2); white-space: nowrap; }
.table td { padding: 13px 16px; border-top: 1px solid var(--line); vertical-align: middle; }
.table tbody tr { transition: background .2s; }
.table tbody tr:hover { background: color-mix(in srgb, var(--primary) 3%, transparent); }
.table .actions { display: flex; gap: 6px; justify-content: flex-end; white-space: nowrap; }
.thumb { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; background: var(--gray-50); flex: 0 0 auto; }
.thumb-ph { width: 46px; height: 46px; border-radius: 12px; background: linear-gradient(135deg, var(--primary-50), var(--primary-100)); display: grid; place-items: center; color: var(--primary); font-size: 20px; flex: 0 0 auto; }
.cell-main { display: flex; align-items: center; gap: 12px; min-width: 180px; }
.cell-main b { display: block; font-weight: 700; }
.cell-main small { color: var(--muted); font-size: 12.5px; }
.pagination { display: flex; gap: 6px; justify-content: center; padding: 18px; flex-wrap: wrap; }
.pagination a { min-width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); color: var(--ink-2); font-weight: 600; font-size: 13px; transition: all .2s; padding: 0 8px; }
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination a.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .dots { align-self: center; color: var(--muted); }
.empty-state { text-align: center; padding: 56px 20px; }
.empty-icon { width: 84px; height: 84px; margin: 0 auto 16px; border-radius: 26px; background: linear-gradient(135deg, var(--primary-50), var(--primary-100)); display: grid; place-items: center; font-size: 38px; color: var(--primary); animation: float 4s ease-in-out infinite; }
.empty-state h3 { font-size: 18px; } .empty-state p { color: var(--muted); max-width: 420px; margin: 0 auto 18px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; margin-bottom: 20px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button { padding: 11px 16px; border: 0; background: none; font: 600 14px var(--font); color: var(--muted); border-bottom: 2.5px solid transparent; cursor: pointer; white-space: nowrap; transition: color .2s, border-color .2s; display: inline-flex; gap: 7px; align-items: center; }
.tabs a:hover, .tabs button:hover { color: var(--ink); }
.tabs .active { color: var(--primary); border-bottom-color: var(--primary); }
.tabs .count { background: var(--gray-50); color: var(--ink-2); border-radius: 20px; padding: 0 7px; font-size: 11.5px; }
.tab-pane { display: none; } .tab-pane.active { display: block; animation: fadeUp .4s var(--ease); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 14px 22px; border-bottom: 1px solid var(--line); }
.filters input, .filters select { width: auto; min-width: 160px; padding: 9px 12px; }
.filters select { padding-inline-end: 34px; }

/* ---------- Modal / toast / drawer ---------- */
.modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; visibility: hidden; opacity: 0; transition: opacity .3s var(--ease), visibility .3s; }
.modal.open { visibility: visible; opacity: 1; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(13, 17, 32, .55); backdrop-filter: blur(4px); }
.modal-dialog { position: relative; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow: auto; background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); transform: translateY(24px) scale(.97); transition: transform .4s var(--ease); }
.modal.open .modal-dialog { transform: none; }
.modal-dialog.lg { max-width: 820px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); z-index: 2; }
.modal-head h3 { margin: 0; font-size: 17px; }
.modal-body { padding: 22px; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
.toasts { position: fixed; z-index: 2000; bottom: 20px; inset-inline-end: 20px; display: flex; flex-direction: column; gap: 10px; max-width: calc(100vw - 40px); }
.toast { display: flex; gap: 10px; align-items: center; background: var(--ink); color: var(--card); padding: 13px 16px; border-radius: 14px; box-shadow: var(--shadow-lg); font-size: 14px; min-width: 260px; animation: toastIn .5s var(--ease); }
.toast i { font-size: 20px; }
.toast.success i { color: #4ade80; } .toast.error i { color: #fb7185; } .toast.info i { color: #60a5fa; }
.toast.hide { animation: toastOut .4s var(--ease) forwards; }

/* ---------- Animations ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px) scale(.95); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes blob { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(30px, -40px) scale(1.08); } 66% { transform: translate(-25px, 20px) scale(.95); } }
@keyframes shimmer { 100% { transform: translateX(100%); } }
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary) 50%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
@keyframes gradient-x { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: .08s; } .reveal-delay-2 { transition-delay: .16s; } .reveal-delay-3 { transition-delay: .24s; } .reveal-delay-4 { transition-delay: .32s; }
img.lazy { opacity: 0; filter: blur(8px); transition: opacity .6s var(--ease), filter .6s var(--ease); }
img.lazy.loaded { opacity: 1; filter: none; }
.skeleton { position: relative; overflow: hidden; background: var(--gray-50); border-radius: 8px; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .5), transparent); animation: shimmer 1.4s infinite; }
.page-fade { animation: fadeUp .6s var(--ease); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } .reveal { opacity: 1; transform: none; } }

/* ---------- Panel layout ---------- */
.panel { display: flex; min-height: 100vh; }
.sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; width: var(--sidebar); background: var(--card); border-inline-end: 1px solid var(--line); display: flex; flex-direction: column; z-index: 50; transition: transform .4s var(--ease); }
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 20px 22px; font-weight: 800; font-size: 18px; color: var(--ink); }
.logo-mark { width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, var(--primary), var(--accent)); display: grid; place-items: center; color: #fff; font-size: 21px; box-shadow: 0 8px 18px -6px color-mix(in srgb, var(--primary) 70%, transparent); flex: 0 0 auto; }
.logo-img { max-height: 38px; width: auto; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 6px 14px 20px; scrollbar-width: thin; }
.nav-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 16px 10px 6px; opacity: .8; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--ink-2); font-weight: 600; font-size: 14px; transition: background .2s, color .2s, transform .2s var(--ease); position: relative; margin-bottom: 2px; }
.nav-link i { font-size: 19px; color: var(--muted); transition: color .2s, transform .3s var(--ease); }
.nav-link:hover { background: var(--gray-50); color: var(--ink); }
.nav-link:hover i { transform: scale(1.12); color: var(--primary); }
.nav-link.active { background: var(--primary-50); color: var(--primary-600); }
.nav-link.active i { color: var(--primary); }
.nav-link.active::before { content: ""; position: absolute; inset-inline-start: -14px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--primary); }
[dir="rtl"] .nav-link.active::before { border-radius: 4px 0 0 4px; }
.nav-link .nav-badge { margin-inline-start: auto; background: var(--primary); color: #fff; font-size: 11px; border-radius: 20px; padding: 1px 8px; font-weight: 700; }
.sidebar-foot { padding: 14px; border-top: 1px solid var(--line); }
.plan-pill { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: linear-gradient(135deg, var(--primary-50), color-mix(in srgb, var(--accent) 10%, transparent)); font-size: 13px; }
.plan-pill i { font-size: 22px; color: var(--primary); }
.plan-pill b { display: block; }
.main { flex: 1; margin-inline-start: var(--sidebar); min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px; padding: 12px 28px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s; }
.topbar.scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
.topbar .menu-toggle { display: none; }
.topbar-search { flex: 1; max-width: 360px; }
.topbar-actions { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; }
.content { padding: 24px 28px 48px; flex: 1; animation: fadeUp .5s var(--ease); }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; margin: 0 0 4px; font-weight: 800; }
.page-head p { color: var(--muted); margin: 0; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.dropdown { position: relative; }
.dropdown-menu { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; min-width: 220px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 8px; opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.98); transform-origin: top; transition: all .25s var(--ease); z-index: 60; }
.dropdown.open .dropdown-menu { opacity: 1; visibility: visible; transform: none; }
.dropdown-menu a, .dropdown-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 9px; color: var(--ink-2); font: 500 14px var(--font); border: 0; background: none; cursor: pointer; text-align: start; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--gray-50); color: var(--ink); }
.dropdown-menu .sep { height: 1px; background: var(--line); margin: 6px 0; }
.avatar { width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 15px; overflow: hidden; flex: 0 0 auto; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-btn { display: flex; align-items: center; gap: 10px; border: 0; background: none; cursor: pointer; padding: 4px; border-radius: 12px; font: 600 14px var(--font); color: var(--ink); }
.user-btn:hover { background: var(--gray-50); }
.user-btn .u-meta { text-align: start; line-height: 1.2; } .user-btn small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; }
.overlay { position: fixed; inset: 0; background: rgba(13, 17, 32, .5); z-index: 45; opacity: 0; visibility: hidden; transition: all .3s; }
.impersonate-bar { background: linear-gradient(90deg, var(--accent), var(--primary)); color: #fff; text-align: center; padding: 8px 16px; font-size: 13.5px; font-weight: 600; }
.impersonate-bar button { background: rgba(255, 255, 255, .2); border: 0; color: #fff; border-radius: 8px; padding: 3px 10px; margin-inline-start: 8px; cursor: pointer; font: 600 12.5px var(--font); }

/* stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-bottom: 24px; }
.stat-card { --c: var(--primary); --c50: var(--primary-50); display: flex; gap: 16px; align-items: center; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: transform .35s var(--ease), box-shadow .35s var(--ease); position: relative; overflow: hidden; }
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.stat-card::after { content: ""; position: absolute; width: 120px; height: 120px; border-radius: 50%; background: var(--c50); inset-inline-end: -40px; top: -40px; transition: transform .5s var(--ease); }
.stat-card:hover::after { transform: scale(1.3); }
.stat-icon { width: 52px; height: 52px; border-radius: 15px; background: var(--c50); color: var(--c); display: grid; place-items: center; font-size: 25px; flex: 0 0 auto; position: relative; z-index: 1; }
.stat-label { display: block; color: var(--muted); font-size: 13px; font-weight: 600; }
.stat-value { display: block; font-size: 25px; font-weight: 800; line-height: 1.2; }
.stat-card small { color: var(--muted); font-size: 12px; }
.stat-green { --c: var(--green); --c50: var(--green-50); } .stat-blue { --c: var(--blue); --c50: var(--blue-50); } .stat-violet { --c: var(--violet); --c50: var(--violet-50); } .stat-amber { --c: var(--amber); --c50: var(--amber-50); } .stat-teal { --c: var(--teal); --c50: var(--teal-50); }
.usage-bar { font-size: 12.5px; color: var(--muted); min-width: 180px; }
.usage-bar .bar { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; margin-top: 5px; }
.usage-bar .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 6px; transition: width 1s var(--ease); }
.upgrade-box { display: flex; gap: 18px; align-items: center; padding: 22px; border-radius: var(--radius); background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 12%, var(--card)), color-mix(in srgb, var(--accent) 10%, var(--card))); border: 1px solid var(--primary-100); margin-bottom: 20px; flex-wrap: wrap; }
.upgrade-box > div:nth-child(2) { flex: 1; min-width: 200px; }
.upgrade-box h3 { margin: 0 0 4px; font-size: 17px; }
.upgrade-box p { margin: 0; color: var(--muted); }
.up-icon { width: 54px; height: 54px; border-radius: 16px; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; display: grid; place-items: center; font-size: 26px; animation: float 3s ease-in-out infinite; }
.list-clean { list-style: none; margin: 0; padding: 0; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding-inline-start: 30px; padding-bottom: 18px; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 7px; top: 6px; bottom: -6px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ""; position: absolute; inset-inline-start: 1px; top: 5px; width: 14px; height: 14px; border-radius: 50%; background: var(--card); border: 3px solid var(--primary); }
.timeline small { color: var(--muted); display: block; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 600; word-break: break-word; }
.repeater-row { display: grid; grid-template-columns: 1fr 140px 40px; gap: 10px; align-items: end; padding: 12px; border: 1px dashed var(--line); border-radius: 12px; margin-bottom: 10px; animation: fadeUp .35s var(--ease); background: var(--line-2); }
.repeater-row.no-price { grid-template-columns: 1fr 40px; }
.code-box { display: flex; gap: 8px; align-items: center; background: var(--gray-50); border-radius: 12px; padding: 10px 12px; font-family: ui-monospace, Consolas, monospace; font-size: 13px; direction: ltr; word-break: break-all; }
.code-box span { flex: 1; }
.chart-box { position: relative; height: 290px; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); display: inline-block; animation: pulse-ring 1.6s infinite; --primary: var(--green); }

/* ---------- Public site ---------- */
.site-header { position: fixed; top: 0; inset-inline: 0; z-index: 100; transition: background .3s, box-shadow .3s, padding .3s; padding: 18px 0; }
.site-header.scrolled { background: color-mix(in srgb, var(--card) 85%, transparent); backdrop-filter: blur(16px); box-shadow: 0 1px 0 var(--line); padding: 10px 0; }
.site-header .container { display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.site-nav { display: flex; gap: 4px; margin-inline-start: auto; }
.site-nav a { padding: 8px 14px; border-radius: 10px; color: var(--ink-2); font-weight: 600; font-size: 14.5px; transition: all .2s; }
.site-nav a:hover { color: var(--primary); background: var(--primary-50); }
.header-actions { display: flex; gap: 8px; align-items: center; }
.nav-burger { display: none; }
.hero { position: relative; padding: 150px 0 90px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; animation: blob 14s ease-in-out infinite; }
.blob-1 { width: 480px; height: 480px; background: color-mix(in srgb, var(--primary) 55%, transparent); top: -120px; inset-inline-end: -80px; }
.blob-2 { width: 420px; height: 420px; background: color-mix(in srgb, var(--accent) 40%, transparent); bottom: -160px; inset-inline-start: -120px; animation-delay: -5s; }
.blob-3 { width: 260px; height: 260px; background: color-mix(in srgb, #fbbf24 45%, transparent); top: 40%; inset-inline-start: 40%; animation-delay: -9s; }
.grid-bg { position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 46px 46px; mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%); opacity: .5; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 30px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm); font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 20px; }
[dir="rtl"] .eyebrow { padding: 6px 6px 6px 14px; }
.eyebrow b { background: var(--primary); color: #fff; padding: 2px 10px; border-radius: 20px; font-size: 12px; }
.hero h1 { font-size: clamp(34px, 5.4vw, 60px); font-weight: 800; line-height: 1.1; margin-bottom: 20px; }
[dir="rtl"] .hero h1 { line-height: 1.3; }
.grad-text { background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary)); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: gradient-x 6s ease infinite; }
.hero p.lead { font-size: 18px; color: var(--muted); max-width: 560px; margin-bottom: 30px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-trust { display: flex; gap: 22px; margin-top: 32px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.hero-trust span { display: flex; gap: 6px; align-items: center; } .hero-trust i { color: var(--green); font-size: 18px; }
.phone { position: relative; width: 300px; height: 610px; margin-inline: auto; border-radius: 46px; background: #0d1120; padding: 12px; box-shadow: var(--shadow-lg), inset 0 0 0 2px #2a3150; animation: float 6s ease-in-out infinite; }
.phone-screen { width: 100%; height: 100%; border-radius: 36px; overflow: hidden; background: #fff; position: relative; }
.phone-notch { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 110px; height: 26px; background: #0d1120; border-radius: 0 0 16px 16px; z-index: 3; }
.mock-cover { height: 150px; background: linear-gradient(135deg, var(--primary), #fbbf24); position: relative; }
.mock-logo { position: absolute; bottom: -26px; inset-inline-start: 18px; width: 58px; height: 58px; border-radius: 18px; background: #fff; display: grid; place-items: center; font-size: 28px; box-shadow: var(--shadow); }
.mock-body { padding: 36px 16px 16px; color: #141a2e; }
.mock-body h4 { margin: 0; font-size: 16px; }
.mock-chips { display: flex; gap: 6px; margin: 12px 0; }
.mock-chips span { padding: 5px 12px; border-radius: 20px; background: #f1f2f6; font-size: 11px; font-weight: 700; }
.mock-chips span:first-child { background: var(--primary); color: #fff; }
.mock-item { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 16px; background: #f8f9fc; margin-bottom: 8px; }
.mock-item .im { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; background: #fff3ee; }
.mock-item b { font-size: 12.5px; display: block; } .mock-item small { font-size: 11px; color: var(--primary); font-weight: 800; }
.mock-item .add { margin-inline-start: auto; width: 28px; height: 28px; border-radius: 9px; background: var(--primary); color: #fff; display: grid; place-items: center; }
.float-card { position: absolute; background: var(--card); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: center; font-size: 13px; animation: float 5s ease-in-out infinite; z-index: 2; color: var(--ink); }
.float-card i { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-size: 19px; }
.float-card b { display: block; }
.fc-1 { top: 70px; inset-inline-start: -30px; animation-delay: -1s; } .fc-1 i { background: var(--green-50); color: var(--green); }
.fc-2 { bottom: 110px; inset-inline-end: -36px; animation-delay: -3s; } .fc-2 i { background: var(--primary-50); color: var(--primary); }
.section { padding: 90px 0; position: relative; }
.section-alt { background: var(--card); border-block: 1px solid var(--line); }
.section-head { text-align: center; max-width: 660px; margin: 0 auto 50px; }
.section-head .tag { display: inline-block; color: var(--primary); font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 10px; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; }
.section-head p { color: var(--muted); font-size: 17px; }
.feature-card { padding: 28px; border-radius: var(--radius-lg); background: var(--card); border: 1px solid var(--line); transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s; position: relative; overflow: hidden; }
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--primary-100); }
.feature-card .f-icon { width: 56px; height: 56px; border-radius: 17px; display: grid; place-items: center; font-size: 26px; margin-bottom: 18px; background: var(--primary-50); color: var(--primary); transition: transform .5s var(--ease); }
.feature-card:hover .f-icon { transform: rotate(-8deg) scale(1.1); }
.feature-card h3 { font-size: 18px; }
.feature-card p { color: var(--muted); margin: 0; font-size: 14.5px; }
.steps { counter-reset: step; }
.step { text-align: center; padding: 20px; }
.step-num { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; font-weight: 800; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; box-shadow: 0 12px 26px -8px color-mix(in srgb, var(--primary) 70%, transparent); }
.billing-switch { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 4px; margin: 0 auto 36px; position: relative; }
.billing-switch button { border: 0; background: none; padding: 9px 20px; border-radius: 10px; font: 700 14px var(--font); color: var(--muted); cursor: pointer; position: relative; z-index: 1; transition: color .3s; }
.billing-switch button.active { color: #fff; }
.billing-switch .pill { position: absolute; top: 4px; bottom: 4px; border-radius: 10px; background: var(--primary); transition: all .4s var(--ease); }
.save-tag { background: var(--green-50); color: var(--green); border-radius: 20px; padding: 1px 8px; font-size: 11px; margin-inline-start: 6px; }
.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px; align-items: stretch; }
.price-card { --pc: var(--primary); padding: 30px 26px; border-radius: var(--radius-lg); background: var(--card); border: 1.5px solid var(--line); display: flex; flex-direction: column; transition: transform .4s var(--ease), box-shadow .4s var(--ease); position: relative; }
.price-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.price-card.featured { border-color: var(--pc); box-shadow: 0 30px 60px -20px color-mix(in srgb, var(--pc) 45%, transparent); }
.price-card .ribbon { position: absolute; top: -13px; inset-inline-start: 50%; transform: translateX(-50%); background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; padding: 4px 14px; border-radius: 20px; font-size: 12px; font-weight: 800; white-space: nowrap; }
[dir="rtl"] .price-card .ribbon { transform: translateX(50%); }
.price-card h3 { font-size: 20px; margin-bottom: 4px; color: var(--pc); }
.price-card .desc { color: var(--muted); font-size: 14px; min-height: 42px; }
.price { font-size: 42px; font-weight: 800; margin: 14px 0 4px; line-height: 1; }
.price small { font-size: 15px; color: var(--muted); font-weight: 600; }
.price-card ul { list-style: none; padding: 0; margin: 22px 0 26px; display: grid; gap: 10px; flex: 1; }
.price-card li { display: flex; gap: 9px; font-size: 14px; align-items: flex-start; }
.price-card li i { color: var(--green); font-size: 18px; line-height: 1.2; }
.price-card li.off { color: var(--muted); text-decoration: line-through; opacity: .7; }
.price-card li.off i { color: var(--muted); }
.faq-item { border: 1px solid var(--line); border-radius: 16px; background: var(--card); margin-bottom: 12px; overflow: hidden; transition: box-shadow .3s; }
.faq-item[open] { box-shadow: var(--shadow); }
.faq-item summary { padding: 18px 22px; cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary i { transition: transform .3s var(--ease); color: var(--primary); font-size: 20px; }
.faq-item[open] summary i { transform: rotate(45deg); }
.faq-item .faq-a { padding: 0 22px 18px; color: var(--muted); animation: fadeUp .4s var(--ease); }
.cta-band { border-radius: 32px; padding: 60px 40px; text-align: center; color: #fff; background: linear-gradient(135deg, var(--primary), var(--accent)); position: relative; overflow: hidden; }
.cta-band::before, .cta-band::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.cta-band::before { width: 300px; height: 300px; top: -120px; inset-inline-start: -80px; animation: blob 12s infinite; }
.cta-band::after { width: 220px; height: 220px; bottom: -100px; inset-inline-end: -40px; animation: blob 10s infinite reverse; }
.cta-band h2 { font-size: clamp(26px, 3.4vw, 38px); position: relative; }
.cta-band p { opacity: .9; position: relative; font-size: 17px; }
.cta-band .btn { position: relative; background: #fff; color: var(--primary-600); }
.site-footer { padding: 60px 0 30px; background: var(--card); border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; }
.site-footer h4 { font-size: 15px; margin-bottom: 14px; }
.site-footer a { color: var(--muted); display: block; padding: 4px 0; font-size: 14px; }
.site-footer a:hover { color: var(--primary); }
.socials { display: flex; gap: 8px; margin-top: 14px; }
.socials a { width: 38px; height: 38px; border-radius: 12px; background: var(--gray-50); display: grid; place-items: center; font-size: 18px; padding: 0; color: var(--ink-2); transition: all .25s var(--ease); }
.socials a:hover { background: var(--primary); color: #fff; transform: translateY(-3px); }
.footer-bottom { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; color: var(--muted); font-size: 13.5px; flex-wrap: wrap; gap: 10px; }
.lang-switch { display: inline-flex; gap: 4px; }
.lang-switch a { padding: 6px 10px; border-radius: 9px; font-weight: 700; font-size: 13px; color: var(--ink-2); border: 1px solid var(--line); background: var(--card); display: inline-block; }
.lang-switch a.active { background: var(--ink); color: var(--card); border-color: var(--ink); }
.page-hero { padding: 140px 0 50px; text-align: center; position: relative; overflow: hidden; }
.prose { max-width: 820px; margin: 0 auto; font-size: 16px; }
.prose h2 { margin-top: 1.6em; }

/* ---------- Auth ---------- */
.auth-body { min-height: 100vh; background: var(--bg); }
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-wrap.single { grid-template-columns: 1fr; place-items: center; padding: 30px 16px; }
.auth-side { position: relative; background: linear-gradient(145deg, var(--primary), var(--accent)); color: #fff; padding: 60px; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.auth-side .blob { background: rgba(255, 255, 255, .22); }
.auth-side h2 { font-size: 36px; position: relative; }
.auth-side p { opacity: .9; font-size: 17px; position: relative; max-width: 440px; }
.auth-side ul { list-style: none; padding: 0; position: relative; display: grid; gap: 12px; margin-top: 24px; }
.auth-side li { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.auth-side li i { width: 32px; height: 32px; border-radius: 10px; background: rgba(255, 255, 255, .18); display: grid; place-items: center; }
.auth-main { display: grid; place-items: center; padding: 40px 20px; }
.auth-card { width: 100%; max-width: 440px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 36px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 26px; font-weight: 800; }
.auth-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; margin-bottom: 24px; color: var(--ink); }
.auth-links { display: flex; justify-content: space-between; font-size: 14px; margin-top: 8px; flex-wrap: wrap; gap: 8px; }
.divider-text { text-align: center; color: var(--muted); font-size: 13px; margin: 18px 0; position: relative; }
.demo-box { margin-top: 20px; padding: 14px; border-radius: 14px; background: var(--gray-50); font-size: 13px; }
.demo-box button { margin-top: 6px; }
.pass-toggle { position: relative; }
.pass-toggle .eye { position: absolute; inset-inline-end: 10px; bottom: 9px; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 18px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); visibility: hidden; transition: transform .4s var(--ease), visibility 0s linear .4s; }
  body.nav-open .sidebar { visibility: visible; transition: transform .4s var(--ease), visibility 0s; }
  [dir="rtl"] .sidebar { transform: translateX(100%); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .overlay { opacity: 1; visibility: visible; }
  .main { margin-inline-start: 0; }
  .topbar .menu-toggle { display: inline-grid; }
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero p.lead { margin-inline: auto; }
  .hero-cta, .hero-trust { justify-content: center; }
  .hero-visual { margin-top: 30px; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .site-nav { position: fixed; top: 0; inset-inline-end: 0; height: 100vh; width: min(300px, 85vw); background: var(--card); flex-direction: column; padding: 80px 20px 20px; box-shadow: var(--shadow-lg); transform: translateX(110%); transition: transform .4s var(--ease), visibility 0s linear .4s; visibility: hidden; z-index: 101; }
  body.nav-open .site-nav { visibility: visible; transition: transform .4s var(--ease), visibility 0s; }
  [dir="rtl"] .site-nav { transform: translateX(-110%); }
  body.nav-open .site-nav { transform: none; }
  .site-nav a { padding: 12px 14px; font-size: 16px; }
  .nav-burger { display: inline-grid; z-index: 102; }
  .header-actions .btn-ghost { display: none; }
  .span-2 { grid-column: auto; }
}
@media (max-width: 680px) {
  body { font-size: 14.5px; }
  .content { padding: 18px 14px 40px; }
  .topbar { padding: 10px 14px; }
  .topbar-search { display: none; }
  .grid-2, .grid-3, .grid-4, .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 22px; }
  .card-body, .card-pad { padding: 16px; }
  .card-head { padding: 14px 16px; }
  .hero { padding: 120px 0 60px; }
  .section { padding: 64px 0; }
  .phone { width: 260px; height: 530px; }
  .float-card { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 26px 20px; }
  .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: 8px; }
  .user-btn .u-meta { display: none; }
  .cta-band { padding: 44px 22px; border-radius: 24px; }
  .repeater-row { grid-template-columns: 1fr 100px 40px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-card { padding: 14px; gap: 10px; flex-direction: column; align-items: flex-start; }
  .stat-value { font-size: 20px; }
  .filters input, .filters select { min-width: 0; flex: 1 1 140px; }
  .table th, .table td { padding: 11px 12px; }
  .header-actions .btn-sm.btn-primary span { display: none; }
}

/* ---------- Mobile hardening ---------- */
.grid > *, .form-grid > *, .form-grid-3 > *, .pricing > *, .stats > * { min-width: 0; }
.card-head { flex-wrap: wrap; }
.card-head h2, .card-head h3 { min-width: 0; overflow-wrap: anywhere; }
.chart-box canvas { max-width: 100%; }
img, video, canvas, svg { max-width: 100%; }
.page-head > div:first-child { min-width: 0; }
.dropdown-menu { max-width: calc(100vw - 24px); }
@media (max-width: 680px) {
  .topbar-actions { gap: 6px; }
  .topbar-actions .btn-light.btn-sm { padding: 7px 10px; }
  .topbar-actions .btn-light.btn-sm .hide-sm, .hide-sm { display: none; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1 1 auto; }
  .page-actions .usage-bar { width: 100%; }
  .card-foot .btn { flex: 1 1 auto; }
  .upgrade-box { flex-direction: column; text-align: center; }
  .upgrade-box .btn { width: 100%; }
  .chart-box { height: 230px; }
  .tabs a, .tabs button { padding: 10px 12px; font-size: 13.5px; }
  .modal-dialog { border-radius: 20px; }
  .kv { grid-template-columns: 1fr !important; }
  #qrMain { padding: 10px !important; }
  #qrMain svg, #qrMain canvas { width: 240px !important; height: 240px !important; }
  .pricing { grid-template-columns: 1fr; }
}
