/* AT-MEDIA platform design system */
:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f1f3f9;
  --ink: #0b1324;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e4e7ef;
  --primary: #2b59ff;
  --primary-ink: #ffffff;
  --primary-soft: #eaf0ff;
  --green: #12805c; --green-soft: #e3f6ee;
  --amber: #a15c00; --amber-soft: #fff3dc;
  --red: #c02a2a;   --red-soft: #fde8e8;
  --blue: #1d4ed8;  --blue-soft: #e6eeff;
  --gray-soft: #eef0f4;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(11,19,36,.04), 0 8px 24px rgba(11,19,36,.06);
  --shadow-lg: 0 24px 60px -20px rgba(11,19,36,.25);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.55; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.02em; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.icon { flex-shrink: 0; vertical-align: middle; }
.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.hidden { display: none !important; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 12px; border: 1px solid transparent; font: 600 15px/1.2 var(--font); cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s; white-space: nowrap; text-decoration: none !important; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: var(--primary-ink); box-shadow: 0 6px 18px -6px rgba(43,89,255,.6); }
.btn-primary:hover { background: #1f47e0; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-light { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-light:hover { background: var(--surface-2); }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-success { background: var(--green); color: #fff; }
.btn-sm { padding: 8px 14px; font-size: 14px; border-radius: 10px; }
.btn-lg { padding: 15px 26px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.link-btn { background: none; border: 0; padding: 0; color: var(--primary); font: inherit; cursor: pointer; }

/* Forms */
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--ink-2); }
.field { margin-bottom: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
input:not([type]), input[type=search], input[type=time], input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=url], input[type=date], input[type=datetime-local], select, textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 11px; font: 500 15px var(--font); color: var(--ink); background: var(--surface); transition: border .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
input[type=file] { font: inherit; width: 100%; padding: 10px; border: 1px dashed var(--line); border-radius: 11px; background: var(--surface-2); }
textarea { min-height: 90px; resize: vertical; }
.hint { font-size: 13px; color: var(--muted); margin-top: 5px; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }

/* Alerts & badges */
.alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-weight: 500; font-size: 14px; border: 1px solid transparent; }
.alert-success { background: var(--green-soft); color: var(--green); }
.alert-error { background: var(--red-soft); color: var(--red); }
.alert-info { background: var(--blue-soft); color: var(--blue); }
.alert-warning { background: var(--amber-soft); color: var(--amber); }
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-gray { background: var(--gray-soft); color: var(--muted); }

/* Cards & tables */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow); }
.card + .card { margin-top: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; font-size: 18px; }
.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)); }
.table-wrap { overflow-x: auto; margin: 0 -24px; padding: 0 24px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td .sub { display: block; color: var(--muted); font-size: 13px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.stat { padding: 20px; }
.stat .label { color: var(--muted); font-size: 13px; font-weight: 600; }
.stat .value { font-size: 28px; font-weight: 800; letter-spacing: -.03em; margin-top: 4px; }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0; font-size: 14px; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; font-weight: 600; }

/* ---------- Public site ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(246,247,251,.85); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid rgba(228,231,239,.7); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; letter-spacing: -.02em; text-decoration: none !important; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #2b59ff, #7b3bff); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.brand-name { font-size: 17px; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a:not(.btn) { color: var(--ink-2); font-weight: 600; font-size: 15px; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--ink); }

.hero { padding: 80px 0 60px; text-align: center; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: -40% -20% auto; height: 640px; background: radial-gradient(closest-side, rgba(43,89,255,.16), transparent), radial-gradient(closest-side at 70% 40%, rgba(123,59,255,.12), transparent); z-index: -1; }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 22px; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 4px #dcfce7; }
.hero h1 { font-size: clamp(36px, 6vw, 64px); font-weight: 800; letter-spacing: -.045em; max-width: 880px; margin: 0 auto 18px; }
.hero h1 .grad { background: linear-gradient(90deg, #2b59ff, #7b3bff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: clamp(16px, 2vw, 19px); color: var(--muted); max-width: 640px; margin: 0 auto 30px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.trust { display: flex; justify-content: center; gap: 28px; margin-top: 30px; flex-wrap: wrap; color: var(--muted); font-size: 14px; font-weight: 600; }
.trust span { display: inline-flex; gap: 6px; align-items: center; }
.trust .icon { color: var(--green); }

.section { padding: 70px 0; }
.section-head { text-align: center; max-width: 660px; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -.035em; }
.section-head p { color: var(--muted); font-size: 17px; }

.service-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; box-shadow: var(--shadow); }
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.service-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; color: #fff; margin-bottom: 18px; }
.service-card h3 { font-size: 21px; }
.service-card ul { list-style: none; padding: 0; margin: 4px 0 22px; flex: 1; }
.service-card li { display: flex; gap: 10px; padding: 5px 0; font-size: 14.5px; color: var(--ink-2); }
.service-card li .icon { color: var(--green); margin-top: 2px; }
.from-price { font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.from-price strong { color: var(--ink); font-size: 22px; }

.steps { counter-reset: step; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); font-weight: 800; margin-bottom: 14px; }
.step h3 { font-size: 18px; }
.step p { color: var(--muted); margin: 0; }

.bundle-banner { background: linear-gradient(120deg, #0b1324, #1e2a5a 60%, #3b2a8a); color: #fff; border-radius: 28px; padding: 44px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px; align-items: center; }
.bundle-banner p { color: rgba(255,255,255,.75); }
.bundle-banner .price { font-size: 44px; font-weight: 800; letter-spacing: -.03em; }
.bundle-banner .price small { font-size: 16px; font-weight: 600; opacity: .7; }

.cta-band { text-align: center; padding: 70px 16px; }
.cta-band h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -.035em; }

/* Pricing */
.cycle-toggle { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin-bottom: 34px; }
.cycle-toggle button { border: 0; background: none; padding: 9px 18px; border-radius: 999px; font: 700 14px var(--font); color: var(--muted); cursor: pointer; }
.cycle-toggle button.on { background: var(--ink); color: #fff; }
.cycle-toggle .save { color: var(--green); font-size: 12px; margin-left: 4px; }
.cycle-toggle button.on .save { color: #86efac; }
.tabs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 18px; }
.tab { display: inline-flex; gap: 8px; align-items: center; padding: 10px 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; color: var(--ink-2); cursor: pointer; font-family: var(--font); font-size: 14.5px; }
.tab.on { border-color: var(--ink); background: var(--ink); color: #fff; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; align-items: stretch; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; display: flex; flex-direction: column; position: relative; box-shadow: var(--shadow); }
.plan.featured { border: 2px solid var(--primary); box-shadow: 0 30px 60px -30px rgba(43,89,255,.5); }
.plan .ribbon { position: absolute; top: -12px; left: 24px; background: var(--primary); color: #fff; font-size: 12px; font-weight: 800; padding: 4px 12px; border-radius: 999px; }
.plan h3 { font-size: 20px; margin-bottom: 4px; }
.plan .desc { color: var(--muted); font-size: 14px; min-height: 42px; }
.plan .price { font-size: 42px; font-weight: 800; letter-spacing: -.04em; margin: 10px 0 2px; }
.plan .price small { font-size: 15px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.plan .billed { font-size: 13px; color: var(--muted); min-height: 20px; margin-bottom: 18px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 24px; flex: 1; }
.plan li { display: flex; gap: 10px; padding: 6px 0; font-size: 14.5px; color: var(--ink-2); }
.plan li .icon { color: var(--green); margin-top: 2px; }
.plan .includes { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.plan .saving { font-size: 13px; font-weight: 700; color: var(--green); margin: -10px 0 18px; }
.plan .saving s { color: var(--muted); font-weight: 600; }
.plans-bundles { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.plans-bundles .plan.featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1.1fr 1fr; column-gap: 40px; align-items: start; background: radial-gradient(80% 120% at 100% 0%, rgba(43,89,255,.10), transparent 60%), var(--surface); }
.plans-bundles .plan.featured > * { grid-column: 1; }
.plans-bundles .plan.featured ul, .plans-bundles .plan.featured .btn { grid-column: 2; }
.plans-bundles .plan.featured ul { grid-row: 1 / span 6; margin-top: 8px; }
.plans-bundles .plan.featured .btn { grid-row: 7; }
.plans-bundles .plan.featured .includes .chip { font-size: 12px; padding: 4px 9px; }
@media (max-width: 800px) { .plans-bundles .plan.featured { display: flex; } }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--surface-2); color: var(--ink-2); }
.faq { max-width: 760px; margin: 0 auto; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 10px; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq details p { margin: 10px 0 0; color: var(--muted); }

.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 50px 0 24px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr 1fr 1fr; gap: 28px; }
.footer-grid h4 { font-size: 14px; margin-bottom: 12px; }
.footer-grid a:not(.brand) { display: block; color: var(--muted); font-size: 14px; padding: 3px 0; }
.footer-grid p { margin-top: 12px; font-size: 14px; max-width: 320px; }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 34px; padding-top: 20px; font-size: 13px; }

/* ---------- Auth ---------- */
.auth { background: radial-gradient(1200px 600px at 20% -10%, rgba(43,89,255,.12), transparent), radial-gradient(900px 500px at 100% 100%, rgba(123,59,255,.1), transparent), var(--bg); }
.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; }
.auth-card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 34px; box-shadow: var(--shadow-lg); }
.auth-card.wide { max-width: 560px; }
.auth-card .brand { margin-bottom: 24px; }
.auth-card h1 { font-size: 24px; margin-bottom: 4px; }
.auth-card .sub { color: var(--muted); margin-bottom: 24px; }
.auth-foot { margin-top: 18px; font-size: 14px; }
.auth-switch { text-align: center; margin-top: 18px; font-size: 14px; color: var(--muted); }

/* ---------- App shell ---------- */
.app { background: var(--bg); }
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 260px; flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 20px 14px; position: sticky; top: 0; height: 100vh; }
.is-admin .sidebar { background: #0b1324; border-color: #0b1324; }
.is-admin .sidebar .brand, .is-admin .side-nav a, .is-admin .sidebar-bottom a, .is-admin .sidebar-bottom button { color: #cbd5e1; }
.is-admin .side-nav a.active, .is-admin .side-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.is-admin .sidebar-bottom { border-color: rgba(255,255,255,.1); }
.sidebar-top { display: flex; justify-content: space-between; align-items: center; padding: 0 8px 18px; }
.sidebar-label { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #64748b; padding: 0 12px 10px; }
.sidebar-account { display: flex; gap: 10px; align-items: center; padding: 12px; margin-bottom: 14px; border-radius: 14px; background: var(--surface-2); }
.sidebar-account strong { display: block; font-size: 14px; line-height: 1.2; }
.sidebar-account span { font-size: 12px; color: var(--muted); }
.avatar { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, #2b59ff, #7b3bff); color: #fff; display: grid; place-items: center; font-weight: 800; flex-shrink: 0; }
.avatar.sm { width: 32px; height: 32px; font-size: 13px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side-nav a, .sidebar-bottom a, .sidebar-bottom button { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 600; font-size: 14.5px; text-decoration: none !important; }
.side-nav a:hover { background: var(--surface-2); }
.side-nav a.active { background: var(--primary-soft); color: var(--primary); }
.side-nav .count { margin-left: auto; font-style: normal; background: #ef4444; color: #fff; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 999px; }
.sidebar-bottom { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 2px; }
.sidebar-bottom form { margin: 0; }
.sidebar-bottom button { width: 100%; background: none; border: 0; cursor: pointer; font-family: var(--font); }
.sidebar-bottom a:hover, .sidebar-bottom button:hover { background: var(--surface-2); }
.is-admin .sidebar-bottom a:hover, .is-admin .sidebar-bottom button:hover { background: rgba(255,255,255,.08); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 18px 32px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 20; }
.topbar h1 { font-size: 20px; margin: 0; flex: 1; }
.topbar-user { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.content { padding: 28px 32px 60px; max-width: 1200px; width: 100%; }
.scrim { display: none; }

/* Customer service tiles */
.svc-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); }
.svc-tile-head { display: flex; gap: 14px; align-items: center; }
.svc-tile-head .service-icon { margin: 0; width: 46px; height: 46px; }
.svc-tile-head h3 { margin: 0; font-size: 18px; }
.svc-tile-head .muted { font-size: 13px; }
.svc-tile .meta { font-size: 14px; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; }
.svc-tile .meta strong { color: var(--ink); }
.svc-tile .actions { margin-top: auto; }
.svc-tile.locked { background: linear-gradient(180deg, var(--surface), var(--surface-2)); }

.choice-list { display: grid; gap: 10px; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; background: var(--surface); font-weight: 500; margin: 0; }
.choice input { margin-top: 3px; accent-color: var(--primary); width: 18px; height: 18px; }
.choice strong { display: block; color: var(--ink); }
.choice span { color: var(--muted); font-size: 13.5px; }
.choice:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.summary-box { background: var(--surface-2); border-radius: 16px; padding: 18px; }
.summary-box .row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14.5px; }
.summary-box .total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; font-weight: 800; font-size: 17px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filters a { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-weight: 600; font-size: 13.5px; text-decoration: none; }
.filters a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.inline-form { display: inline; margin: 0; }
.proof-thumb { max-width: 100%; max-height: 420px; border-radius: 12px; border: 1px solid var(--line); }
.code { font-family: ui-monospace, Consolas, monospace; font-size: 13px; background: var(--surface-2); padding: 3px 8px; border-radius: 6px; word-break: break-all; }

/* Responsive */
@media (max-width: 980px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .bundle-banner { grid-template-columns: 1fr; padding: 32px; }
}
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--surface); flex-direction: column; align-items: stretch; gap: 0; padding: 10px 16px 18px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav-links a { padding: 12px 4px; }
  .nav-links .btn { margin-top: 8px; }
  .nav-open .nav-links { display: flex; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 60; transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow-lg); }
  .nav-open .sidebar { transform: none; }
  .nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(11,19,36,.4); z-index: 55; }
  .topbar { padding: 14px 16px; }
  .content { padding: 20px 16px 50px; }
  .is-admin .sidebar-top .nav-toggle { color: #fff; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4, .field-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .card { padding: 18px; }
  .table-wrap { margin: 0 -18px; padding: 0 18px; }
  .auth-card { padding: 24px; }
  .hero { padding: 54px 0 40px; }
  .section { padding: 50px 0; }
  .topbar-user span { display: none; }
}

/* ---------- Service page: hero with screenshot, tour, comparison, trust ---------- */
.svc-hero { padding: 64px 0 40px; position: relative; overflow: hidden; }
.svc-hero::before { content: ''; position: absolute; inset: -30% -10% auto 30%; height: 620px; background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 18%, transparent), transparent); pointer-events: none; }
.svc-hero-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 48px; align-items: center; position: relative; }
.svc-hero h1 { font-size: clamp(32px, 4.4vw, 52px); font-weight: 800; letter-spacing: -.04em; line-height: 1.08; margin: 18px 0 16px; }
.svc-hero .lead { font-size: 17px; color: var(--muted); margin: 0 0 26px; }
.service-icon.sm { width: 24px; height: 24px; border-radius: 7px; margin: 0; }
.browser { display: block; border-radius: 16px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-lg); overflow: hidden; padding: 0; cursor: zoom-in; position: relative; width: 100%; text-align: left; font: inherit; }
.browser img { display: block; width: 100%; height: auto; }
.browser-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #f3f5f9; border-bottom: 1px solid var(--line); }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: #d7dbe3; }
.browser-bar i:nth-child(1) { background: #ff6159; } .browser-bar i:nth-child(2) { background: #ffbd2e; } .browser-bar i:nth-child(3) { background: #28c941; }
.browser-url { margin-left: 10px; flex: 1; max-width: 320px; background: #fff; border-radius: 7px; padding: 4px 10px; font-size: 12px; color: var(--muted); border: 1px solid var(--line); }
.hero-shot { transform: perspective(1600px) rotateY(-6deg) rotateX(2deg); transition: transform .4s ease; }
.hero-shot:hover { transform: none; }
.feature-pill { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; font-weight: 600; box-shadow: var(--shadow); }
.feature-pill span:first-child { flex: none; margin-top: 1px; }

.tour-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 14px; margin-bottom: 18px; scrollbar-width: thin; }
.tour-tabs button { flex: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font: inherit; font-weight: 700; font-size: 14px; padding: 10px 16px; border-radius: 999px; cursor: pointer; transition: all .15s; }
.tour-tabs button:hover { border-color: var(--c); color: var(--ink); }
.tour-tabs button.on { background: var(--c); border-color: var(--c); color: #fff; box-shadow: 0 8px 20px -8px var(--c); }
.tour-panel { display: none; grid-template-columns: minmax(0, .55fr) minmax(0, 1.45fr); gap: 36px; align-items: center; }
.tour-panel.on { display: grid; animation: tourIn .35s ease; }
@keyframes tourIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tour-step { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--c); }
.tour-text h3 { font-size: 26px; letter-spacing: -.02em; margin: 8px 0 10px; }
.tour-text p { color: var(--muted); margin: 0 0 16px; }
.tour-text ul { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 10px; }
.tour-text li { display: flex; gap: 10px; font-weight: 600; } .tour-text li .icon { color: var(--c); flex: none; margin-top: 2px; }
.tour-nav { display: flex; gap: 8px; } .tour-nav button[disabled] { opacity: .4; cursor: default; }
.zoom-hint { position: absolute; right: 14px; bottom: 14px; display: inline-flex; gap: 6px; align-items: center; background: rgba(11,19,36,.78); color: #fff; font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 999px; opacity: 0; transition: opacity .2s; }
.tour-shot:hover .zoom-hint { opacity: 1; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(11,19,36,.86); display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(1500px, 100%); max-height: 92vh; border-radius: 12px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.lb-close { position: absolute; top: 14px; right: 18px; background: none; border: 0; color: #fff; font-size: 36px; cursor: pointer; line-height: 1; }

.mobile-band { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: center; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 10%, #fff), #fff); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 40px 48px; overflow: hidden; }
.mobile-band h2 { font-size: clamp(24px, 3vw, 34px); letter-spacing: -.03em; margin: 14px 0 10px; }
.phone { width: 250px; border-radius: 34px; border: 9px solid #0b1324; overflow: hidden; box-shadow: var(--shadow-lg); background: #0b1324; max-height: 470px; }
.phone img { display: block; width: 100%; height: auto; }
.who-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.who { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; font-weight: 700; }
.who .icon { color: var(--c); flex: none; }

.compare-card { margin-top: 26px; }
table.compare { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.compare th, table.compare td { padding: 13px 12px; border-bottom: 1px solid var(--line); text-align: center; }
table.compare th:first-child, table.compare td:first-child { text-align: left; font-weight: 600; }
table.compare th { font-size: 15px; } table.compare th span { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; }
table.compare tbody tr:hover { background: var(--surface-2); }
table.compare .yes .icon { color: var(--green); } table.compare .no { color: #c3c9d4; }

.trust-section { background: #0b1324; color: #fff; margin: 20px 0 60px; }
.trust-section .section-head h2 { color: #fff; } .trust-section .section-head p { color: #94a3b8; }
.trust-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.trust-item { display: flex; gap: 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius); padding: 20px; }
.trust-item h3 { margin: 0 0 6px; font-size: 16px; color: #fff; } .trust-item p { margin: 0; color: #a7b2c4; font-size: 14px; line-height: 1.55; }
.trust-ic { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(43,89,255,.18); color: #8fb0ff; }

/* Home: "see inside" strip */
.inside-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.inside-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); color: inherit; text-decoration: none; transition: transform .2s, box-shadow .2s; }
.inside-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.inside-card img { display: block; width: 100%; aspect-ratio: 1366/854; object-fit: cover; object-position: top left; border-bottom: 1px solid var(--line); }
.inside-card .bd { padding: 16px 18px; display: flex; gap: 12px; align-items: center; }
.inside-card .bd .service-icon { width: 38px; height: 38px; border-radius: 11px; margin: 0; flex: none; }
.inside-card h3 { margin: 0; font-size: 16px; } .inside-card p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }

@media (max-width: 980px) {
  .svc-hero-grid, .tour-panel, .mobile-band { grid-template-columns: 1fr; }
  .hero-shot { transform: none; }
  .tour-panel.on { gap: 18px; }
  .tour-text { order: 2; }
  .trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mobile-band { padding: 28px; } .phone { margin: 0 auto; }
}
@media (max-width: 640px) {
  .svc-hero { padding: 36px 0 20px; }
  .trust-grid { grid-template-columns: 1fr; }
  .browser-bar { padding: 7px 10px; } .browser-url { display: none; }
  table.compare { font-size: 13px; } table.compare th, table.compare td { padding: 10px 6px; }
  .zoom-hint { display: none; }
}
.tour-tabs { justify-content: safe center; }
.inside-card img { height: auto; }

/* ---------- Top bar, WhatsApp ---------- */
.topbar { background: #0b1324; color: #cbd5e1; font-size: 13px; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 36px; }
.topbar .tb-links { display: flex; gap: 18px; }
.topbar a { color: #fff; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.btn-wa { background: #25d366; color: #fff !important; border-color: #25d366; box-shadow: 0 6px 18px -6px rgba(37,211,102,.6); }
.btn-wa:hover { background: #1fb457; text-decoration: none; }
.wa-float { position: fixed; z-index: 60; bottom: 20px; inset-inline-end: 20px; display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px 12px 14px; border-radius: 999px; background: #25d366; color: #fff !important; font-weight: 800; box-shadow: 0 14px 30px -10px rgba(37,211,102,.7); text-decoration: none !important; transition: transform .2s; }
.wa-float:hover { transform: translateY(-2px); }

/* ---------- Home ---------- */
.hm-hero { position: relative; overflow: hidden; padding: 64px 0 40px; }
.hm-hero::before { content: ''; position: absolute; inset: -30% -10% auto; height: 720px; background: radial-gradient(closest-side at 30% 40%, rgba(43,89,255,.18), transparent), radial-gradient(closest-side at 80% 30%, rgba(123,59,255,.14), transparent), radial-gradient(closest-side at 60% 80%, rgba(37,211,102,.10), transparent); pointer-events: none; }
.hm-hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px; align-items: center; }
.hm-hero h1 { font-size: clamp(34px, 5vw, 58px); font-weight: 800; letter-spacing: -.045em; line-height: 1.05; margin: 18px 0 18px; }
.hm-hero h1 .grad { background: linear-gradient(90deg, #ef3b3b 0%, #2b59ff 55%, #16a34a 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hm-hero .lead { font-size: clamp(16px, 1.8vw, 18.5px); color: var(--ink-2); margin: 0 0 26px; max-width: 560px; }
.hm-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hm-points { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 8px 22px; color: var(--ink-2); font-weight: 600; font-size: 14px; }
.hm-points li { display: flex; gap: 7px; align-items: center; } .hm-points .icon { color: var(--green); }
.hm-show { position: relative; }
.hm-browser { transform: perspective(1800px) rotateY(-7deg) rotateX(3deg); transition: transform .5s ease; }
.hm-show:hover .hm-browser { transform: none; }
.hm-slides { position: relative; aspect-ratio: 1366/854; background: #f1f3f9; }
.hm-slides img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top left; opacity: 0; transition: opacity .7s ease; }
.hm-slides img.on { opacity: 1; }
.hm-badge { position: absolute; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 10px 14px; font-weight: 800; display: flex; align-items: center; gap: 8px; animation: hm-float 5s ease-in-out infinite; }
.hm-badge small { display: block; color: var(--muted); font-weight: 700; font-size: 12px; }
.hm-badge-1 { top: 18%; inset-inline-start: -26px; flex-direction: column; align-items: flex-start; gap: 0; } .hm-badge-1 span { font-size: 20px; color: var(--green); }
.hm-badge-2 { bottom: 22%; inset-inline-end: -18px; font-size: 13.5px; animation-delay: -2.5s; } .hm-badge-2 .icon { color: #25d366; }
@keyframes hm-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.hm-dots { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.hm-dots button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.hm-dots button .icon { color: var(--c); }
.hm-dots button.on { background: var(--c); border-color: var(--c); color: #fff; } .hm-dots button.on .icon { color: #fff; }
.hm-stats { padding: 10px 0 20px; }
.hm-stats-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow); }
.hm-stats-grid div { text-align: center; } .hm-stats-grid b { display: block; font-size: 28px; font-weight: 800; letter-spacing: -.03em; }
.hm-stats-grid span { color: var(--muted); font-size: 13.5px; font-weight: 600; }
.hm-filter { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: -18px 0 28px; }
.hm-filter button { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 9px 15px; font: inherit; font-size: 14px; font-weight: 700; color: var(--ink-2); cursor: pointer; transition: all .15s; }
.hm-filter button:hover { border-color: var(--primary); color: var(--primary); }
.hm-filter button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.hm-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.hm-app { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; color: var(--ink); text-decoration: none !important; transition: transform .2s, box-shadow .2s, border-color .2s; overflow: hidden; }
.hm-app::after { content: ''; position: absolute; inset: 0 0 auto; height: 4px; background: var(--c); opacity: 0; transition: opacity .2s; }
.hm-app:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; } .hm-app:hover::after { opacity: 1; }
.hm-app[hidden] { display: none; }
.hm-app-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.hm-app .service-icon { width: 48px; height: 48px; border-radius: 14px; margin: 0; }
.hm-price { font-size: 13px; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 4px 10px; } .hm-price b { color: var(--ink); }
.hm-app h3 { font-size: 19px; margin: 16px 0 4px; } .hm-app > p { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.hm-app ul { list-style: none; padding: 0; margin: 0 0 16px; flex: 1; } .hm-app li { display: flex; gap: 8px; font-size: 13.5px; color: var(--ink-2); padding: 3px 0; } .hm-app li .icon { color: var(--green); flex: none; margin-top: 3px; }
.hm-more { font-weight: 800; font-size: 14px; color: var(--c); display: inline-flex; gap: 6px; align-items: center; }
.hm-why { background: linear-gradient(180deg, transparent, rgba(43,89,255,.05) 30%, transparent); }
.hm-why-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.hm-why-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; }
.hm-why-item h3 { font-size: 17px; margin: 14px 0 6px; } .hm-why-item p { margin: 0; color: var(--muted); font-size: 14.5px; }
.hm-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.hm-inside { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 22px; align-items: start; }
.hm-inside-tabs { display: flex; flex-direction: column; gap: 6px; }
.hm-inside-tabs button { display: flex; align-items: center; gap: 10px; border: 1px solid transparent; background: transparent; border-radius: 12px; padding: 8px 10px; font: inherit; font-weight: 700; font-size: 14.5px; color: var(--ink-2); cursor: pointer; text-align: start; }
.hm-inside-tabs button .service-icon { width: 30px; height: 30px; border-radius: 9px; margin: 0; flex: none; }
.hm-inside-tabs button:hover { background: var(--surface); }
.hm-inside-tabs button.on { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow); color: var(--ink); }
.hm-inside-panel { display: none; margin: 0; } .hm-inside-panel.on { display: block; animation: hm-fade .35s ease; }
.hm-inside-panel img { display: block; width: 100%; height: auto; }
.hm-inside-panel figcaption { margin-top: 14px; color: var(--ink-2); font-size: 15px; }
@keyframes hm-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.hm-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; counter-reset: s; }
.hm-steps > div { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; }
.hm-steps b { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 18px; }
.hm-steps h3 { margin: 14px 0 6px; font-size: 18px; } .hm-steps p { margin: 0; color: var(--muted); }
.hm-sol { display: flex; gap: 14px; align-items: flex-start; text-decoration: none !important; color: inherit; }
.hm-sol .service-icon { width: 44px; height: 44px; margin: 0; flex-shrink: 0; }
.hm-sol strong { display: block; font-size: 16px; color: var(--ink); } .hm-sol-price { display: block; margin-top: 6px; color: var(--ink-2); }
.hm-ar-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 32px; font-family: 'Noto Kufi Arabic', 'Segoe UI', Tahoma, sans-serif; }
.hm-ar-box h2 { font-size: clamp(24px, 3vw, 32px); margin: 0 0 10px; } .hm-ar-box p { color: var(--ink-2); font-size: 16px; line-height: 1.9; }
.hm-ar-box ul { columns: 2; column-gap: 28px; padding-inline-start: 20px; margin: 10px 0 22px; line-height: 2; color: var(--ink-2); }
.hm-final { background: linear-gradient(120deg, #0b1324, #1e2a5a 60%, #3b2a8a); color: #fff; border-radius: 28px; margin: 0 16px 60px; }
.hm-final h2 { color: #fff; } .hm-final p { color: rgba(255,255,255,.75); font-size: 17px; }
@media (max-width: 980px) {
  .hm-hero-grid { grid-template-columns: 1fr; gap: 34px; } .hm-browser { transform: none; }
  .hm-stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .hm-why-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hm-inside { grid-template-columns: 1fr; } .hm-inside-tabs { flex-direction: row; overflow-x: auto; padding-bottom: 6px; } .hm-inside-tabs button { flex: none; }
}
@media (max-width: 640px) {
  .topbar .container > span:first-child { display: none; } .topbar .container { justify-content: center; }
  .hm-hero { padding: 34px 0 24px; } .hm-points { grid-template-columns: 1fr; } .hm-cta .btn { width: 100%; }
  .hm-badge { display: none; } .hm-dots button span { display: none; } .hm-dots button { padding: 8px; }
  .hm-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 16px; } .hm-stats-grid b { font-size: 22px; }
  .hm-filter { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; margin: -24px -16px 22px; padding: 0 16px 6px; } .hm-filter button { flex: none; }
  .hm-why-grid, .hm-steps { grid-template-columns: 1fr; } .hm-ar-box { padding: 22px; } .hm-ar-box ul { columns: 1; }
  .wa-float span { display: none; } .wa-float { padding: 14px; }
  .hm-final { margin: 0 0 40px; border-radius: 0; }
}
/* ---------- Smart tips (customer dashboard) ---------- */
.tips { display: grid; gap: 10px; margin-bottom: 20px; }
.tip { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--blue); box-shadow: 0 1px 2px rgba(15,23,42,.04); animation: tip-in .45s cubic-bezier(.16,1,.3,1) both; }
.tip:nth-child(2) { animation-delay: .06s; } .tip:nth-child(3) { animation-delay: .12s; } .tip:nth-child(4) { animation-delay: .18s; }
@keyframes tip-in { from { opacity: 0; transform: translateY(8px); } }
.tip-ic { flex: none; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); }
.tip-b { flex: 1; min-width: 0; } .tip-b b { display: block; font-size: 14.5px; } .tip-b span { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.tip-warn { border-left-color: var(--amber); } .tip-warn .tip-ic { background: var(--amber-soft); color: var(--amber); }
.tip-good { border-left-color: var(--green); } .tip-good .tip-ic { background: var(--green-soft); color: var(--green); }
.tip-bad { border-left-color: var(--red); } .tip-bad .tip-ic { background: var(--red-soft); color: var(--red); }
@media (max-width: 640px) { .tip { flex-wrap: wrap; } .tip .btn { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .tip { animation: none; } }
