@layer tokens, base, components, public, portal, responsive;

@layer tokens {
  :root {
    color-scheme: dark;
    --bg: #090a0d;
    --panel: #151519;
    --soft: #1c1c20;
    --field: #101014;
    --line: #333338;
    --text: #f8f5f6;
    --muted: #b5afb9;
    --accent: #ff5571;
    --action: #ed0033;
    --positive: #d6d6e5;
    --positive-soft: #24242d;
    --action-hover: #d90030;
    --accent-ink: #fff;
    --accent-soft: #27131c;
    --danger: #ffada7;
    --danger-soft: #382025;
    --warn: #f3cd8a;
    --warn-soft: #3c3223;
    --shadow: 0 20px 50px #0004;
    --radius: 20px;
    --mono: ui-monospace, Consolas, monospace;
    --body: Inter, system-ui, sans-serif;
    --signal-accent: #ff5571;
    --signal-ink: #fbf4f6;
    --signal-muted: #c9b9c0;
    --signal-line: #49313b;
  }

  :root[lang="ar"] { --body: Tajawal, Inter, system-ui, sans-serif; }
}

@layer base {
  *, *::before, *::after { box-sizing: border-box; }
  html { min-inline-size: 0; scroll-padding-block-start: 5rem; overflow-x: clip; max-width: 100%; }
  body { margin: 0; background: var(--bg); color: var(--text); font: 400 1rem/1.6 var(--body); overflow-x: clip; width: 100%; max-width: 100%; }
  h1, h2, h3, p, dl, dd, figure { margin: 0; }
  h1, h2, h3 { line-height: 1.2; overflow-wrap: anywhere; }
  h2 { font-size: clamp(1.15rem, 2vw, 1.45rem); }
  h3 { font-size: 1.07rem; }
  p { color: var(--muted); }
  a { color: inherit; text-decoration: none; }
  button, input, select, textarea { font: inherit; }
  button, summary { cursor: pointer; }
  img, audio { display: block; max-inline-size: 100%; }
  audio { inline-size: min(100%, 36rem); }
  strong, p, dt, dd, bdi { overflow-wrap: anywhere; }
  :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
  ::selection { background: var(--action); color: var(--accent-ink); }
  ::-webkit-scrollbar { width: 9px; height: 9px; }
  ::-webkit-scrollbar-track { background: var(--bg); }
  ::-webkit-scrollbar-thumb { background: #26262e; border-radius: 999px; border: 2px solid var(--bg); }
  ::-webkit-scrollbar-thumb:hover { background: var(--accent); }
  [hidden] { display: none !important; }
}

@layer components {
  .wrap { width: min(100% - clamp(1.6rem, 5vw, 7rem), 76rem); margin-inline: auto; max-width: 100%; box-sizing: border-box; }
  .skip-link { position: fixed; top: -999px; inset-inline-start: 1rem; z-index: 9999; padding: .75rem 1rem; background: var(--panel); border: 1px solid var(--accent); border-radius: 8px; color: var(--text); transition: top .2s ease; }
  .skip-link:focus { top: 1rem; }
  .visually-hidden:where(:not(:focus-within, :active)) {
    position: absolute !important;
    clip-path: inset(50%) !important;
    overflow: hidden !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    border: 0 !important;
    white-space: nowrap !important;
  }
  .phone-number, [data-phone] { direction: ltr !important; unicode-bidi: isolate !important; text-align: left; display: inline-block; white-space: nowrap; font-variant-numeric: tabular-nums; }
  .call-duration { direction: ltr !important; unicode-bidi: isolate !important; display: inline-block; font-variant-numeric: tabular-nums; }
  .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
  .muted { color: var(--muted); }
  .stack { display: grid; gap: 1.1rem; min-inline-size: 0; }
  .stack.compact { gap: .35rem; }
  .actions, .split, .header-actions { display: flex; align-items: center; gap: .65rem; min-inline-size: 0; }
  .actions, .split { flex-wrap: wrap; }
  .split { justify-content: space-between; }
  .split > *, .item-row > * { min-inline-size: 0; }
  .header-actions form, .actions form { display: flex; }
  .brand { display: inline-flex; align-items: center; width: max-content; }
  .brand img, .brand .brand-logo { height: 80px; width: auto; max-width: 180px; object-fit: contain; display: block; }
  .brand-dot { color: var(--accent); }

  .btn, .icon-btn {
    display: inline-flex; justify-content: center; align-items: center; gap: .55rem;
    min-block-size: 44px; max-inline-size: 100%; border: 1px solid transparent; border-radius: 11px;
    background: transparent; color: var(--text); padding: .53rem .85rem;
    line-height: 1.25; text-align: center; font-weight: 700; overflow-wrap: anywhere;
    transition: background-color .15s, border-color .15s, color .15s;
  }
  .btn i, .icon-btn i { flex: none; font-size: 1.14em; }
  .icon-btn { inline-size: 44px; padding: 0; background: var(--soft); border-color: var(--line); }
  .btn-primary { background: var(--action); border-color: var(--action); color: var(--accent-ink); }
  .btn-primary:hover { background: var(--action-hover); border-color: var(--action-hover); }
  .btn-secondary { background: var(--panel); border-color: var(--line); }
  .btn-secondary:hover, .icon-btn:hover { background: var(--accent-soft); border-color: var(--accent); }
  .btn-danger { color: var(--danger); background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 30%, var(--line)); }
  .btn-danger:hover { border-color: var(--danger); }
  .btn-large { min-block-size: 51px; padding-inline: 1.1rem; }
  .btn-small { font-size: .89rem; }
  .language { font-size: .89rem; white-space: nowrap !important; min-inline-size: max-content !important; padding-inline: .75rem; }

  .card, .inset, .metric { min-inline-size: 0; border: 1px solid var(--line); }
  .card { padding: clamp(1rem, 2.8vw, 1.65rem); border-radius: var(--radius); background: var(--panel); }
  .inset { background: var(--soft); padding: clamp(.8rem, 2vw, 1.15rem); border-radius: 13px; }
  .section-title { display: flex; align-items: center; gap: .7rem; }
  .tile {
    display: inline-grid; place-items: center; flex: none; inline-size: 41px; block-size: 41px;
    border-radius: 11px; color: var(--accent); background: var(--accent-soft); font-size: 1.25rem;
  }
  .empty { display: grid; justify-items: center; align-content: center; gap: .7rem; min-block-size: 9rem; padding: 1rem; border: 1px dashed var(--line); border-radius: 13px; text-align: center; }
  .notice { display: flex; align-items: baseline; gap: .5rem; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: 11px; }
  .notice.success { color: var(--positive); background: var(--positive-soft); }
  .notice.error { color: var(--danger); background: var(--danger-soft); }
  .notice.warning { color: var(--warn); background: var(--warn-soft); }

  .badge {
    display: inline-flex; align-items: center; gap: .35rem; padding: .22rem .6rem; border: 1px solid var(--line);
    border-radius: 999px; background: var(--panel); color: var(--muted); font-size: .82rem; font-weight: 700; line-height: 1.35;
  }
  .badge[data-state]::before { content: ""; width: .42rem; height: .42rem; border-radius: 50%; background: currentColor; flex: none; }
  .badge:is([data-state="connected"], [data-state="synced"]) { background: var(--positive-soft); color: var(--positive); }
  .badge[data-state="waiting"] { background: var(--warn-soft); color: var(--warn); }
  .badge[data-state="blocked"] { background: var(--danger-soft); color: var(--danger); }
  .chips, .row-list { list-style: none; margin: 0; padding: 0; }
  .chips { display: flex; flex-wrap: wrap; gap: .5rem; }
  .row-list:empty { display: none; }
  .item-row {
    display: grid; grid-template-columns: auto minmax(0, 1fr) repeat(2, auto); align-items: center; gap: .75rem;
    padding: .8rem 0; border-block-start: 1px solid var(--line);
  }
  .bot-list .item-row{border-block-start: 0}
  .item-row p { font-size: .88rem; }
  .call-meta { display: grid; color: var(--muted); font-size: .86rem; }
  .call-meta bdi { color: var(--text); font-weight: 700; }
  .call-summary { white-space: pre-wrap; }
  .tabs {
    display: flex; flex-wrap: wrap; gap: .25rem; justify-self: start; padding: .28rem;
    border: 1px solid var(--line); border-radius: 13px; background: var(--soft);
  }
  .tabs a { display: inline-flex; align-items: center; gap: .4rem; min-block-size: 44px; padding: .45rem .72rem; border-radius: 9px; color: var(--muted); font-weight: 700; line-height: 1.25; }
  .tabs a:hover { color: var(--text); }
  .tabs a[aria-current] { color: var(--accent); background: var(--panel); box-shadow: 0 1px 3px #0002; }

  .form-stack { display: grid; min-inline-size: 0; gap: 1rem; }
  .form-row { display: flex; flex-wrap: wrap; align-items: end; gap: .7rem; }
  .form-row > label { flex: 1 1 16rem; }
  .form-grid, .field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: .9rem; }
  .field-grid dt { color: var(--muted); font-size: .88rem; }
  .field-grid dd { margin-block-start: .25rem; white-space: pre-wrap; }
  :root[dir="rtl"] .field-grid dd[dir="ltr"] { text-align: right; unicode-bidi: isolate; }
  label { display: grid; gap: .3rem; min-inline-size: 0; font-weight: 700; }
  :is(input:not([type="checkbox"], [type="radio"], [type="hidden"]), textarea) { display: block; }
  :is(input:not([type="checkbox"], [type="hidden"]), select, textarea) {
    inline-size: 100%; max-inline-size: 100%; min-inline-size: 0; min-block-size: 45px; padding: .55rem .75rem;
    background: var(--field); color: var(--text); border: 1px solid var(--line); border-radius: 10px; font-weight: 400;
  }
  input::placeholder, textarea::placeholder { color: var(--muted); opacity: .85; }
  textarea { resize: vertical; }

  /* Bidirectional Form Controls (RTL in Arabic, LTR in English) */
  :root[dir="rtl"] :is(input:not([type="checkbox"], [type="hidden"]), select, textarea) {
    direction: rtl;
    text-align: right;
  }
  :root[dir="rtl"] :is(input:not([type="checkbox"], [type="hidden"]), textarea)::placeholder {
    direction: rtl;
    text-align: right;
  }
  :root[dir="ltr"] :is(input:not([type="checkbox"], [type="hidden"]), select, textarea) {
    direction: ltr;
    text-align: left;
  }
  :root[dir="ltr"] :is(input:not([type="checkbox"], [type="hidden"]), textarea)::placeholder {
    direction: ltr;
    text-align: left;
  }

  /* Strict LTR for Emails, Phones, Passwords, and explicit LTR fields in BOTH languages */
  :is(
    input[type="email"],
    input[type="tel"],
    input[type="url"],
    input[type="password"],
    input[dir="ltr"],
    textarea[dir="ltr"],
    input[name*="mobile"],
    input[name*="phone"],
    input[name*="email"],
    .phone-input,
    .phone-number
  ) {
    direction: ltr !important;
    text-align: left !important;
    unicode-bidi: isolate !important;
  }
  :is(
    input[type="email"],
    input[type="tel"],
    input[type="url"],
    input[type="password"],
    input[dir="ltr"],
    textarea[dir="ltr"],
    input[name*="mobile"],
    input[name*="phone"],
    input[name*="email"],
    .phone-input
  )::placeholder {
    direction: ltr !important;
    text-align: left !important;
  }
  .check-label { display: flex; align-items: center; gap: .65rem; width: fit-content; min-block-size: 44px; cursor: pointer; }
  .check-label input { flex: none; inline-size: 1.17rem; block-size: 1.17rem; accent-color: var(--accent); margin: 0; }
  .form-hint { font-size: .88rem; font-weight: 400; color: var(--muted); }
  details > summary { color: var(--accent); font-weight: 700; }
  details > summary i { margin-inline: .3rem; }
  details[open] > summary ~ * { margin-block-start: 1rem; }
  .inline-details { border-block-start: 1px solid var(--line); padding-block-start: .65rem; }
  .danger-card summary { color: var(--danger); }
  .pagination { justify-self: start; }
  .history-delete { padding: .65rem .8rem; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); }
  .history-select { display: inline-grid; place-items: center; inline-size: 44px; block-size: 44px; cursor: pointer; }
  .history-select input { inline-size: 1.05rem; block-size: 1.05rem; margin: 0; accent-color: var(--accent); }
  .confirm-dialog {
    inline-size: min(29rem, calc(100% - 2rem));
    max-block-size: calc(100dvh - 2rem);
    color: var(--text);
    box-shadow: var(--shadow);
  }
  .confirm-dialog::backdrop { background: #000a; backdrop-filter: blur(3px); }
}

@layer public {
  .home-page {
    background:
      radial-gradient(ellipse at 15% 5%, color-mix(in srgb, var(--bg) 18%, transparent), transparent 42rem),
      radial-gradient(ellipse at 85% 25%, color-mix(in srgb, var(--accent-soft) 45%, transparent), transparent 38rem),
      var(--bg);
  }
  .top-announcement-bar {
    position: relative; z-index: 101;
    background: linear-gradient(90deg, #16080f 0%, #220b17 50%, #16080f 100%);
    border-block-end: 1px solid rgba(255, 85, 113, 0.22);
    height: 38px; display: flex; align-items: center; overflow: hidden;
    white-space: nowrap; font-size: .83rem;
  }
  .announcement-ticker-track {
    display: inline-flex; width: max-content; align-items: center;
    white-space: nowrap; will-change: transform;
  }
  :root[dir="rtl"] .announcement-ticker-track {
    animation: ticker-rtl 32s linear infinite;
  }
  :root[dir="ltr"] .announcement-ticker-track {
    animation: ticker-ltr 32s linear infinite;
  }
  .top-announcement-bar:hover .announcement-ticker-track,
  .top-announcement-bar:focus-within .announcement-ticker-track {
    animation-play-state: paused;
  }
  @keyframes ticker-rtl {
    0% { transform: translateX(0); }
    100% { transform: translateX(50%); }
  }
  @keyframes ticker-ltr {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
  }
  .ticker-content {
    display: inline-flex; align-items: center; gap: 1.25rem; padding-inline: 1.25rem;
  }
  .announcement-pill {
    display: inline-flex; align-items: center; gap: .3rem;
    background: var(--action); color: #fff; font-size: .72rem; font-weight: 800;
    padding: .15rem .55rem; border-radius: 999px; letter-spacing: .05em;
    box-shadow: 0 0 10px rgba(237, 0, 51, 0.45); flex: none;
  }
  .announcement-pill i { font-size: .85rem; }
  .announcement-text { color: var(--text); font-weight: 600; white-space: nowrap; }
  .announcement-link {
    display: inline-flex; align-items: center; gap: .3rem; color: var(--accent);
    font-weight: 700; transition: color .15s; white-space: nowrap;
  }
  .announcement-link:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
  .ticker-dot { color: var(--accent); opacity: 0.5; font-size: 1rem; }
  .ticker-item {
    display: inline-flex; align-items: center; gap: .4rem; color: #e5e5ea;
    font-weight: 600; white-space: nowrap; font-size: .82rem;
  }
  .ticker-item i { color: var(--accent); }

  .public-header {
    position: sticky; inset-block-start: 0; z-index: 100;
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    border-block-end: 1px solid rgba(255, 255, 255, 0.08);
    transition: border-color .2s, background-color .2s;
  }
  .public-nav { min-height: 72px; display: flex; justify-content: space-between; align-items: center; gap: .75rem; position: relative; }
  .public-links { display: flex; flex-wrap: nowrap; align-items: center; gap: clamp(.25rem, .75vw, .65rem); color: var(--muted); font-weight: 700; font-size: .86rem; }
  .public-links a { display: inline-flex; align-items: center; min-block-size: 38px; padding-inline: .25rem; white-space: nowrap; transition: color .15s ease; }
  .public-links a:hover, .public-footer a:hover { color: var(--accent); }
  .nav-cta-btn { min-block-size: 40px; padding-inline: 1rem; font-size: .88rem; }
  .login-btn { min-block-size: 40px; font-size: .88rem; }
  .nav-secondary-desktop { display: none !important; }
  .mobile-only-icon { display: none; }
  .mobile-nav-footer { display: none; }
  .mobile-menu-btn { display: none; }
  .desktop-only { display: inline-flex; }

  .hero {
    display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.05fr); align-items: center;
    gap: clamp(2rem, 5vw, 4.5rem); padding-block: clamp(3rem, 7vw, 6.5rem) clamp(2.5rem, 5vw, 4.5rem);
  }
  .hero-copy { min-inline-size: 0; }
  .hero-badge {
    display: inline-flex; align-items: center; gap: .6rem;
    padding: .35rem .95rem; border-radius: 999px;
    background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
    color: var(--accent); font-size: .84rem; font-weight: 700; width: fit-content;
    margin-block-end: 1rem; box-shadow: 0 4px 14px rgba(237, 0, 51, 0.1);
  }
  .pulse-dot {
    width: 8px; height: 8px; border-radius: 50%; background: var(--action);
    box-shadow: 0 0 0 0 rgba(237, 0, 51, 0.7);
    animation: pulse-dot 1.8s infinite; flex: none;
  }
  .eyebrow { display: flex; align-items: center; gap: .55rem; color: var(--accent); font-size: .82rem; font-weight: 700; letter-spacing: .07em; }
  .eyebrow span { width: .48rem; height: .48rem; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px var(--accent-soft); }
  .hero h1 { margin-block: .65rem 1rem; font-size: clamp(2.9rem, 5.2vw, 5.2rem); font-weight: 900; line-height: 1.05; letter-spacing: -.05em; }
  :root[lang="ar"] .hero h1 { font-size: clamp(2.7rem, 4.5vw, 4.7rem); line-height: 1.15; letter-spacing: 0; }
  .hero-accent-text, :is(.hero h1, .auth-line) em {
    color: var(--accent); font-style: normal;
    background: linear-gradient(135deg, #ffffff 10%, #ff5571 60%, #ed0033 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  }
  .hero-intro { max-inline-size: 38ch; font-size: clamp(1.05rem, 1.8vw, 1.24rem); line-height: 1.65; color: var(--muted); }
  .hero .actions { margin-block-start: 1.8rem; gap: .8rem; }
  :root[dir="rtl"] .mirrored { transform: scaleX(-1); }

  .hero-feature-pills {
    display: flex; flex-wrap: wrap; gap: .55rem; margin-block-start: 1.3rem;
  }
  .hero-pill {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .35rem .8rem; border-radius: 999px;
    background: rgba(22, 21, 27, 0.85); border: 1px solid rgba(255, 85, 113, 0.22);
    color: var(--text); font-size: .82rem; font-weight: 600;
    backdrop-filter: blur(8px);
    transition: border-color .2s, transform .2s;
  }
  .hero-pill:hover {
    border-color: var(--accent); transform: translateY(-2px);
  }
  .hero-pill i { color: var(--accent); font-size: .95rem; }

  .btn-glow {
    box-shadow: 0 6px 22px rgba(237, 0, 51, 0.35);
    transition: transform .2s ease, box-shadow .2s ease, background-color .15s ease;
  }
  .btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(237, 0, 51, 0.45);
  }

  .hero-trust {
    display: flex; align-items: center; gap: 1rem; margin-block-start: 2rem;
    padding-block-start: 1.4rem; border-block-start: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
  }
  .avatar-stack { display: flex; align-items: center; }
  .avatar-stack img {
    width: 38px; height: 38px; border-radius: 50%; object-fit: cover;
    border: 2px solid var(--bg); margin-inline-start: -10px;
    box-shadow: 0 2px 8px #0004; background: var(--soft);
  }
  .avatar-stack img:first-child { margin-inline-start: 0; }
  .trust-meta { display: grid; gap: .2rem; }
  .trust-meta .stars { display: flex; gap: 2px; color: #f59e0b; font-size: .92rem; }
  .trust-meta p { color: var(--muted); font-size: .84rem; font-weight: 600; margin: 0; line-height: 1.3; }

  /* Hero Visual & Product Card */
  .hero-visual {
    position: relative; isolation: isolate; display: flex; justify-content: center; align-items: center; overflow: hidden; max-width: 100%;
  }
  .hero-glow-aura {
    position: absolute; inset: 0; border-radius: 50%;
    background: radial-gradient(circle, rgba(237, 0, 51, 0.24) 0%, rgba(75, 20, 41, 0.12) 55%, transparent 75%);
    filter: blur(40px); z-index: -1; pointer-events: none; max-width: 100%;
  }

  .signal, .auth-aside {
    position: relative; isolation: isolate; min-inline-size: 0; width: 100%; overflow: hidden; color: var(--signal-ink);
    background: radial-gradient(ellipse at 50% 35%, #4b1429 0, transparent 65%), linear-gradient(150deg, #25131d, #120e14 78%);
    border: 1px solid var(--signal-line); border-radius: 25px; box-shadow: 0 28px 75px #0007, 0 0 35px rgba(237, 0, 51, 0.14);
  }
  .signal::before, .auth-aside::before {
    content: ""; position: absolute; z-index: -1; inset: 0;
    background: radial-gradient(circle, #ffafb237 1px, transparent 1.35px) 0 0 / 17px 17px;
    mask-image: linear-gradient(180deg, #0004, #000 50%, #0002);
  }
  .signal { padding: clamp(1.1rem, 2.7vw, 1.75rem); }
  .signal-head { display: flex; justify-content: space-between; align-items: center; gap: .65rem; }
  .signal-title-wrap { display: flex; align-items: center; gap: .7rem; }
  .signal-icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; color: #fff; background: var(--action); border-radius: 12px; font-size: 1.25rem; }
  .signal-head strong, .signal-head small { display: block; line-height: 1.35; }
  .signal-head small { color: var(--signal-muted); margin-block-start: .2rem; }

  .pod-artwork-wrapper {
    display: flex; justify-content: center; align-items: center;
    margin-block: .8rem .4rem; perspective: 1000px;
  }
  .pod-artwork {
    width: 100%; max-width: 480px; height: auto; display: block;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.65)) drop-shadow(0 0 25px rgba(237, 0, 51, 0.18));
    transition: transform .4s cubic-bezier(0.16, 1, 0.3, 1), filter .4s ease;
    animation: float-pod 6s ease-in-out infinite;
  }
  .pod-artwork:hover {
    transform: scale(1.03) translateY(-4px);
    filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 35px rgba(237, 0, 51, 0.35));
  }

  .signal-display {
    position: relative; display: grid; align-content: center;
    padding: .85rem 1rem; border-radius: 16px;
    background: #140b12bf; border: 1px solid #4a2736;
    margin-block: .8rem;
  }
  .wave-header {
    display: flex; justify-content: space-between; align-items: center;
    font-size: .8rem; font-weight: 700; color: var(--signal-muted); margin-block-end: .6rem;
  }
  .live-tag { display: inline-flex; align-items: center; gap: .35rem; color: var(--accent); }
  .voice-quality-tag {
    background: var(--accent-soft); color: var(--accent);
    padding: .15rem .55rem; border-radius: 6px; font-size: .75rem; border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  }
  .signal-display::before { content: ""; position: absolute; inset: 50% 0 auto; border-block-start: 1px dashed #fb8fa438; }
  .wave { position: relative; display: flex; justify-content: center; align-items: center; gap: clamp(2px, .52vw, 7px); height: 58px; }
  .wave span {
    flex: 0 1 .54rem; min-width: 2px; height: var(--amplitude); border-radius: 999px;
    background: linear-gradient(180deg, #ffb1bb, #ff526f 53%, #a51243);
    box-shadow: 0 0 13px #ff305a50;
  }
  .signal-route {
    display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); align-items: center;
    gap: .35rem; padding: .75rem .6rem; border: 1px solid var(--signal-line); border-radius: 13px; background: #1a0e16e6;
  }
  .signal-route div { display: grid; justify-items: center; gap: .2rem; text-align: center; font-size: .82rem; line-height: 1.25; }
  .signal-route div i { color: var(--signal-accent); font-size: 1.15rem; }
  .route-arrow { color: var(--signal-muted); }

  /* Stats Strip */
  .stats-strip { margin-block: clamp(1.8rem, 4vw, 3.5rem); }
  .stats-grid {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem;
  }
  .stat-card {
    display: grid; gap: .4rem; padding: clamp(1.1rem, 2.5vw, 1.65rem);
    background: linear-gradient(160deg, #18171e 0%, #111116 100%);
    border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    position: relative; overflow: hidden;
    transition: transform .3s cubic-bezier(0.16, 1, 0.3, 1), border-color .3s ease, box-shadow .3s ease;
  }
  .stat-card::before {
    content: ""; position: absolute; inset-block-start: 0; inset-inline: 15%; height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0; transition: opacity .3s ease;
  }
  .stat-card:hover {
    transform: translateY(-5px); border-color: rgba(255, 85, 113, 0.5);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4), 0 0 24px rgba(237, 0, 51, 0.16);
  }
  .stat-card:hover::before { opacity: 1; }
  .stat-icon {
    font-size: 1.45rem; color: var(--accent); width: 42px; height: 42px;
    border-radius: 11px; background: var(--accent-soft); display: grid; place-items: center;
    margin-block-end: .4rem;
  }
  .stat-num { font-size: clamp(1.9rem, 3.3vw, 2.6rem); font-weight: 900; line-height: 1.05; color: var(--text); }
  .stat-label { font-size: .88rem; font-weight: 600; color: var(--muted); }

  /* Interactive Demo Section */
  .demo-section { padding-block: clamp(2.5rem, 5vw, 5rem); }
  .text-center { text-align: center; margin-inline: auto; }
  .justify-center { justify-content: center; }
  .demo-box {
    max-width: 54rem; margin: 2rem auto 0;
    background: var(--panel); border: 1px solid var(--line);
    border-radius: 25px; padding: clamp(1.2rem, 3.5vw, 2.4rem);
    box-shadow: 0 25px 65px rgba(0, 0, 0, 0.45);
  }
  .demo-tabs {
    display: flex; gap: .65rem; justify-content: center; flex-wrap: wrap;
    margin-block-end: 1.8rem;
  }
  .demo-tab {
    display: inline-flex; align-items: center; gap: .55rem;
    padding: .65rem 1.25rem; border-radius: 12px;
    border: 1px solid var(--line); background: var(--soft);
    color: var(--muted); font-weight: 700; font-size: .93rem;
    cursor: pointer; transition: all .2s ease;
  }
  .demo-tab i { font-size: 1.15rem; }
  .demo-tab:hover { color: var(--text); border-color: var(--accent); }
  .demo-tab.active {
    background: var(--action); color: #fff; border-color: var(--action);
    box-shadow: 0 4px 18px rgba(237, 0, 51, 0.4);
  }
  .demo-screen {
    background: var(--field); border: 1px solid var(--line);
    border-radius: 18px; padding: clamp(1rem, 2.5vw, 1.8rem);
    display: grid; gap: 1.3rem;
  }
  .call-simulator-bar {
    display: flex; justify-content: space-between; align-items: center;
    padding-block-end: .9rem; border-block-end: 1px solid var(--line);
  }
  .sim-status { display: flex; align-items: center; gap: .65rem; font-size: .93rem; font-weight: 700; }
  .sim-dot {
    width: 9px; height: 9px; border-radius: 50%; background: #10b981;
    box-shadow: 0 0 10px #10b981;
  }
  .sim-timer { font-size: .95rem; font-weight: 700; color: var(--accent); }
  .chat-stream {
    display: grid; gap: 1rem; min-height: 150px;
    transition: opacity .15s ease;
  }
  .chat-stream.switching { opacity: 0.25; }
  .chat-bubble {
    display: flex; gap: .85rem; align-items: flex-start; max-width: 90%;
  }
  .bubble-avatar {
    flex: none; width: 40px; height: 40px; border-radius: 50%;
    display: grid; place-items: center; font-size: 1.15rem;
  }
  .caller-bubble { align-self: flex-start; }
  .caller-bubble .bubble-avatar { background: var(--soft); color: var(--muted); }
  .caller-bubble .bubble-content {
    background: var(--soft); border: 1px solid var(--line);
    border-radius: 16px; border-start-start-radius: 4px; padding: .85rem 1.15rem;
  }
  .ai-bubble { align-self: flex-end; flex-direction: row-reverse; }
  .ai-bubble .bubble-avatar { background: var(--accent-soft); color: var(--accent); }
  .ai-bubble .bubble-content {
    background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
    border-radius: 16px; border-start-end-radius: 4px; padding: .85rem 1.15rem;
  }
  .bubble-sender { font-size: .78rem; font-weight: 700; color: var(--accent); display: block; margin-block-end: .25rem; }
  .bubble-ai-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin-block-end: .25rem; }
  .bubble-content p { color: var(--text); font-size: .95rem; line-height: 1.55; margin: 0; }
  .mini-eq { display: inline-flex; align-items: center; gap: 2.5px; height: 14px; }
  .mini-eq span {
    width: 3px; border-radius: 2px; background: var(--accent);
    animation: eq-bar 1s ease-in-out infinite alternate;
  }
  .mini-eq span:nth-child(1) { height: 5px; animation-delay: 0.1s; }
  .mini-eq span:nth-child(2) { height: 12px; animation-delay: 0.25s; }
  .mini-eq span:nth-child(3) { height: 14px; animation-delay: 0.4s; }
  .mini-eq span:nth-child(4) { height: 8px; animation-delay: 0.15s; }
  .mini-eq span:nth-child(5) { height: 13px; animation-delay: 0.3s; }
  .demo-output-card {
    background: var(--panel); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
    border-radius: 14px; padding: .9rem 1.15rem; display: grid; gap: .6rem;
  }
  .output-head { display: flex; align-items: center; gap: .65rem; }
  .output-result {
    display: flex; align-items: center; gap: .75rem; font-size: .94rem; font-weight: 700;
    color: var(--text); background: var(--soft); padding: .8rem 1.1rem; border-radius: 11px;
  }
  .text-accent { color: var(--accent); font-size: 1.25rem; }

  /* How It Works Section with Generated AI Pipeline Background */
  .how-section-outer {
    position: relative;
    isolation: isolate;
    padding-block: clamp(3.5rem, 7vw, 6.5rem);
    border-block: 1px solid rgba(255, 85, 113, 0.18);
    background-color: #090a0d;
    background-image: 
      linear-gradient(180deg, #090a0d 0%, rgba(9, 10, 13, 0.72) 15%, rgba(9, 10, 13, 0.68) 85%, #090a0d 100%),
      url('/img/how-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
  }
  .how-section-outer::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 50% 50%, rgba(237, 0, 51, 0.08), transparent 60%);
    z-index: 0;
  }
  .how-section-outer .how-layout {
    position: relative;
    z-index: 1;
  }

  /* Flow Diagram & Steps (RTL / LTR Responsive Component) */
  .flow-diagram-container {
    background: rgba(18, 19, 25, 0.78);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 85, 113, 0.22);
    border-radius: 20px;
    padding: clamp(1.2rem, 3vw, 2.2rem) clamp(1rem, 2.5vw, 1.8rem); margin-block: 1.5rem 2.2rem;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(237, 0, 51, 0.06);
    overflow-x: auto; max-width: 100%;
    -webkit-overflow-scrolling: touch;
  }
  .flow-steps-chain {
    display: flex; align-items: center; justify-content: space-between;
    gap: clamp(.5rem, 1.5vw, 1rem); min-width: 680px; width: 100%;
    position: relative;
  }
  .flow-steps-chain::before {
    content: ""; position: absolute; inset-block: 50%; inset-inline: 45px;
    height: 2px;
    background: repeating-linear-gradient(90deg, #333338 0 8px, transparent 8px 16px);
    z-index: 1; pointer-events: none;
  }
  .flow-card {
    position: relative; z-index: 2; flex: 1 1 0; min-width: 140px;
    background: rgba(21, 21, 25, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1.5px solid #333338; border-radius: 18px;
    padding: 1.3rem .9rem; display: flex; flex-direction: column; align-items: center;
    text-align: center; gap: .45rem; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
  }
  .flow-card:hover {
    transform: translateY(-4px); border-color: rgba(255, 85, 113, 0.4);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4);
  }
  .flow-card.flow-card-active {
    background: rgba(28, 19, 26, 0.92); border-color: #ed0033;
    box-shadow: 0 0 25px rgba(237, 0, 51, 0.25), 0 8px 24px rgba(0, 0, 0, 0.3);
  }
  .flow-card.flow-card-active:hover {
    border-color: #ff5571;
    box-shadow: 0 0 32px rgba(237, 0, 51, 0.4), 0 14px 30px rgba(0, 0, 0, 0.45);
  }
  .flow-icon-circle {
    width: 48px; height: 48px; border-radius: 50%;
    background: #27131c; color: var(--accent); font-size: 1.35rem;
    display: grid; place-items: center; margin-block-end: .3rem;
  }
  .flow-icon-circle.pod-glow {
    background: #ed0033; color: #fff;
    box-shadow: 0 0 16px rgba(237, 0, 51, 0.6);
  }
  .flow-card-cyan .flow-icon-circle {
    background: #14232c; color: #38bdf8;
  }
  .flow-card h4 {
    margin: 0; font-size: 1rem; font-weight: 800; color: var(--text);
  }
  .flow-card p {
    margin: 0; font-size: .8rem; color: var(--muted); font-weight: 600;
  }
  .flow-card-active h4 { color: #fff; }
  .flow-card-active p { color: #ff5571; font-weight: 700; }
  .flow-card-cyan p { color: #38bdf8; }

  .flow-arrow-pill {
    position: relative; z-index: 2; flex: none;
    width: 32px; height: 32px; border-radius: 50%;
    background: #27131c; border: 1.5px solid var(--accent);
    color: var(--accent); display: grid; place-items: center;
    font-size: 1.15rem; font-weight: 700;
    box-shadow: 0 0 10px rgba(237, 0, 51, 0.3);
  }
  .flow-arrow-pill.flow-arrow-cyan {
    background: #14232c; border-color: #38bdf8; color: #38bdf8;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
  }
  .step-card {
    display: grid; gap: .65rem; padding: clamp(1.2rem, 3vw, 1.8rem);
    background: linear-gradient(160deg, rgba(24, 23, 30, 0.88) 0%, rgba(17, 17, 22, 0.92) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08); border-radius: var(--radius);
    position: relative; overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    transition: transform .3s cubic-bezier(0.16, 1, 0.3, 1), border-color .3s ease, box-shadow .3s ease;
  }
  .step-card:hover {
    transform: translateY(-5px); border-color: rgba(255, 85, 113, 0.5);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4), 0 0 24px rgba(237, 0, 51, 0.16);
  }
  .step-top { display: flex; justify-content: space-between; align-items: center; }
  .step-num { font-size: 1.5rem; font-weight: 900; color: color-mix(in srgb, var(--accent) 70%, var(--muted)); }

  /* Video Showcase (YouTube embed) */
  .video-showcase-container {
    margin-block: clamp(2rem, 4vw, 3.5rem);
    max-width: 880px;
    margin-inline: auto;
    width: 100%;
  }
  .video-responsive-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid rgba(255, 85, 113, 0.22);
    background: #0d0e12;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(237, 0, 51, 0.1);
  }
  .video-responsive-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 19px;
  }

  /* Voice Personas Showcase */
  .personas-section {
    padding-block: clamp(2.5rem, 5vw, 5rem);
  }
  .personas-grid {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.15rem; margin-block-start: 2rem;
  }
  .persona-card {
    background: linear-gradient(160deg, #18171e 0%, #111116 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px; padding: 1.35rem;
    display: flex; flex-direction: column; gap: 1rem;
    position: relative; overflow: hidden; cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    transition: transform .3s cubic-bezier(0.16, 1, 0.3, 1), border-color .3s ease, box-shadow .3s ease;
  }
  .persona-card::before {
    content: ""; position: absolute; inset-block-start: 0; inset-inline: 0; height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0; transition: opacity .3s ease;
  }
  .persona-card:hover, .persona-card.selected {
    transform: translateY(-6px);
    border-color: rgba(255, 85, 113, 0.55);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45), 0 0 28px rgba(237, 0, 51, 0.2);
  }
  .persona-card:hover::before, .persona-card.selected::before {
    opacity: 1;
  }
  .persona-top {
    display: flex; align-items: center; gap: .9rem;
  }
  .persona-avatar-wrap {
    position: relative; width: 68px; height: 68px; flex: none;
    border-radius: 50%; padding: 3px;
    background: linear-gradient(135deg, rgba(255, 85, 113, 0.6) 0%, rgba(51, 51, 56, 0.8) 100%);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    transition: background .3s ease;
  }
  .persona-card:hover .persona-avatar-wrap, .persona-card.selected .persona-avatar-wrap {
    background: linear-gradient(135deg, #ff5571 0%, #ed0033 100%);
    box-shadow: 0 0 18px rgba(237, 0, 51, 0.4);
  }
  .persona-img {
    width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
    background: #19181f; display: block;
  }
  .persona-online-dot {
    position: absolute; inset-block-end: 2px; inset-inline-end: 2px;
    width: 12px; height: 12px; border-radius: 50%;
    background: #10b981; border: 2px solid #18171e;
    box-shadow: 0 0 8px #10b981;
  }
  .persona-meta {
    display: flex; flex-direction: column; gap: .3rem; min-inline-size: 0;
  }
  .persona-name-col {
    display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; min-inline-size: 0;
  }
  .persona-name-col h3 {
    margin: 0; font-size: 1.25rem; font-weight: 800; color: var(--text);
    white-space: nowrap !important; overflow-wrap: normal !important; word-break: keep-all !important;
  }
  .persona-dialect-badge {
    font-size: .72rem; font-weight: 700; color: var(--accent);
    background: var(--accent-soft); padding: .2rem .55rem; border-radius: 6px;
    border: 1px solid rgba(255, 85, 113, 0.25); white-space: nowrap;
    align-self: flex-start;
  }
  .persona-role {
    font-size: .82rem; color: var(--muted); font-weight: 600; line-height: 1.35;
  }
  .persona-desc {
    font-size: .87rem; color: var(--muted); line-height: 1.55; margin: 0;
  }
  .persona-audio-preview {
    display: flex; align-items: center; justify-content: space-between; gap: .6rem;
    padding: .5rem .75rem; border-radius: 10px; background: rgba(16, 16, 20, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.05); font-size: .78rem; font-weight: 700;
  }
  .persona-waveform {
    display: inline-flex; align-items: center; gap: 2.5px; height: 16px;
  }
  .persona-waveform span {
    width: 3px; border-radius: 2px; background: var(--accent);
    animation: bar-dance 1.2s ease-in-out infinite alternate;
  }
  .persona-waveform span:nth-child(1) { height: 6px; animation-delay: 0.1s; }
  .persona-waveform span:nth-child(2) { height: 14px; animation-delay: 0.25s; }
  .persona-waveform span:nth-child(3) { height: 9px; animation-delay: 0.4s; }
  .persona-waveform span:nth-child(4) { height: 16px; animation-delay: 0.15s; }
  .persona-waveform span:nth-child(5) { height: 7px; animation-delay: 0.3s; }
  .persona-waveform span:nth-child(6) { height: 13px; animation-delay: 0.45s; }
  .persona-waveform span:nth-child(7) { height: 15px; animation-delay: 0.2s; }
  .persona-waveform span:nth-child(8) { height: 8px; animation-delay: 0.35s; }
  .persona-waveform span:nth-child(9) { height: 12px; animation-delay: 0.5s; }
  .persona-waveform span:nth-child(10) { height: 5px; animation-delay: 0.18s; }
  .persona-voice-type {
    display: inline-flex; align-items: center; gap: .35rem; color: var(--signal-muted);
  }
  .persona-quote-bubble {
    background: var(--field); border: 1px solid var(--line);
    border-radius: 14px; padding: .75rem .95rem; display: flex; gap: .55rem;
    align-items: flex-start; margin-block-start: auto;
  }
  .quote-icon {
    color: var(--accent); font-size: 1.15rem; flex: none; margin-block-start: .1rem;
  }
  .persona-quote-bubble p {
    font-size: .84rem; color: var(--text); line-height: 1.5; margin: 0; font-style: italic;
  }

  /* Hardware Grid */
  .features-grid {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem;
    margin-block-start: 1.8rem;
  }
  .feature-box {
    padding: clamp(1.2rem, 3vw, 1.8rem);
    background: linear-gradient(160deg, #18171e 0%, #111116 100%);
    border: 1px solid rgba(255, 255, 255, 0.08); border-radius: var(--radius);
    position: relative; overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    transition: transform .3s cubic-bezier(0.16, 1, 0.3, 1), border-color .3s ease, box-shadow .3s ease;
  }
  .feature-box::before {
    content: ""; position: absolute; inset-block-start: 0; inset-inline: 15%; height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0; transition: opacity .3s ease;
  }
  .feature-box:hover {
    transform: translateY(-5px); border-color: rgba(255, 85, 113, 0.5);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4), 0 0 24px rgba(237, 0, 51, 0.16);
  }
  .feature-box:hover::before { opacity: 1; }
  .feat-icon {
    width: 48px; height: 48px; border-radius: 12px; background: var(--accent-soft);
    color: var(--accent); font-size: 1.4rem; display: grid; place-items: center;
    margin-block-end: .9rem;
  }
  .feature-box h3 { font-size: 1.18rem; margin-block-end: .45rem; }
  .feature-box p { font-size: .94rem; line-height: 1.6; }

  /* General Home Section */
  .home-section { padding-block: clamp(2.5rem, 5vw, 5rem); border-block-start: 1px solid var(--line); }
  .section-heading { max-width: 38rem; }
  .section-heading h2 { font-size: clamp(2rem, 4.2vw, 3.45rem); font-weight: 900; letter-spacing: -.045em; margin-block-start: .4rem; }
  :root[lang="ar"] .section-heading h2 { letter-spacing: 0; }
  .section-heading p { margin-block-start: .55rem; font-size: clamp(1rem, 1.6vw, 1.12rem); }
  .steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 1.4rem 0 0; padding: 0; list-style: none; }
  .steps li { border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1rem, 2.7vw, 1.6rem); background: var(--panel); }
  .steps h3 { margin-block: 1rem .25rem; font-size: 1.18rem; }
  .steps p { font-size: .94rem; }

  .workspace-feature {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: center;
    padding: clamp(1.4rem, 5vw, 3.8rem); border: 1px solid var(--line); border-radius: 25px;
    background: radial-gradient(ellipse at 15% 15%, var(--accent-soft), transparent 70%), var(--panel);
  }
  .text-link-btn { margin-block-start: 1.2rem; display: inline-flex; width: fit-content; }
  .text-link, .back-link { display: inline-flex; align-items: center; gap: .35rem; color: var(--accent); font-weight: 700; width: fit-content; }
  .text-link { margin-block-start: .9rem; }
  .text-link:hover, .back-link:hover { text-decoration: underline; text-underline-offset: .2em; }

  /* Activity Preview */
  .activity-preview-wrapper { width: 100%; min-inline-size: 0; }
  .activity-preview {
    min-inline-size: 0; border: 1px solid var(--line); border-radius: 18px;
    padding: 1.1rem 1.3rem; background: var(--field); box-shadow: var(--shadow);
  }
  .preview-header {
    display: flex; justify-content: space-between; align-items: center;
    padding-block-end: .8rem; border-block-end: 1px solid var(--line); margin-block-end: .8rem;
  }
  .preview-caption { font-size: .84rem; font-weight: 700; color: var(--muted); }
  .preview-item {
    padding: .85rem 0; border-block-start: 1px solid var(--line);
    display: grid; gap: .45rem;
  }
  .preview-item:first-of-type { border-block-start: none; }
  .preview-item-top { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .75rem; }
  .preview-item-body { font-size: .9rem; color: var(--text); padding-inline-start: 3.2rem; }
  .preview-item.highlight {
    background: var(--accent-soft); padding: .9rem; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
    margin-block-start: .4rem;
  }
  .preview-item.highlight .preview-item-body { padding-inline-start: 0; }
  .badge-success {
    display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; font-weight: 700;
    background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.3);
    padding: .2rem .55rem; border-radius: 999px;
  }

  /* Reviews */
  .reviews-grid {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem;
    margin-block-start: 1.8rem;
  }
  .review-card {
    display: grid; grid-template-rows: auto 1fr auto; gap: 1rem; padding: clamp(1.2rem, 3vw, 1.8rem);
    border: 1px solid var(--line); border-radius: var(--radius);
    background: linear-gradient(145deg, var(--panel), var(--bg));
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  }
  .review-card-top { display: flex; justify-content: space-between; align-items: center; }
  .review-stars { display: flex; gap: 2px; color: #f59e0b; font-size: .95rem; }
  .quote-mark { color: var(--accent); font-size: 1.8rem; line-height: 1; }
  .review-card blockquote { margin: 0; }
  .review-card blockquote p { color: var(--text); font-size: .95rem; line-height: 1.6; }
  .review-card figcaption {
    display: flex; align-items: center; gap: .75rem; padding-block-start: .9rem;
    border-block-start: 1px solid var(--line); font-size: .9rem; font-weight: 700;
  }
  .review-avatar {
    width: 48px; height: 48px; border-radius: 50%; object-fit: cover;
    border: 2px solid var(--accent); flex: none; background: var(--soft);
  }
  .reviews-footer { margin-block-start: 1.5rem; }

  /* FAQ */
  .faq-layout, .contact-layout {
    display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.35fr);
    align-items: start; gap: clamp(1.4rem, 5vw, 4.5rem);
  }
  .faq-list { border-block-start: 1px solid var(--line); }
  .faq-item { border-block-end: 1px solid var(--line); }
  .faq-item summary {
    display: flex; justify-content: space-between; align-items: center; gap: .65rem;
    min-block-size: 60px; padding: .8rem .25rem; list-style: none; color: var(--text); font-size: 1.03rem;
  }
  .faq-item summary::-webkit-details-marker { display: none; }
  .faq-item summary i { display: inline-grid; place-items: center; flex: none; margin: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
  .faq-item[open] summary i { transform: rotate(45deg); }
  .faq-item summary:hover, .faq-item[open] summary { color: var(--accent); }
  .faq-item[open] > p { margin-block-start: 0; padding: 0 .25rem 1.1rem; line-height: 1.65; font-size: .95rem; }

  /* Start Banner */
  .start-banner {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 1.25rem 2.25rem; min-block-size: 13rem; padding: clamp(1.6rem, 5vw, 3.8rem);
    border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); border-radius: 25px;
    background: radial-gradient(ellipse at 30% 100%, var(--accent-soft), transparent 70%), var(--panel);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  }
  .start-banner .section-heading { flex: 1 1 23rem; }
  /* Contact Section with Generated Soundwave Background */
  .contact-section-outer {
    position: relative;
    isolation: isolate;
    padding-block: clamp(3.5rem, 7vw, 6.5rem);
    margin-block-start: clamp(2.5rem, 5vw, 4.5rem);
    border-block: 1px solid rgba(255, 85, 113, 0.2);
    background-color: #090a0d;
    background-image: 
      linear-gradient(180deg, #090a0d 0%, rgba(9, 10, 13, 0.72) 15%, rgba(9, 10, 13, 0.65) 85%, #090a0d 100%),
      url('/img/contact-bg.jpg');
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    overflow: hidden;
  }
  .contact-section-outer::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 85% 15%, rgba(237, 0, 51, 0.14), transparent 50%),
                radial-gradient(circle at 15% 85%, rgba(255, 85, 113, 0.1), transparent 45%);
    z-index: 0;
  }
  .contact-section-outer .contact-layout {
    position: relative;
    z-index: 1;
  }
  .contact-tile {
    margin-block-end: .75rem;
    background: rgba(237, 0, 51, 0.15);
    border: 1px solid rgba(255, 85, 113, 0.35);
    color: var(--accent);
    box-shadow: 0 0 20px rgba(237, 0, 51, 0.25);
  }
  .contact-card {
    background: rgba(18, 19, 25, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 85, 113, 0.25);
    border-radius: 24px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65), 0 0 40px rgba(237, 0, 51, 0.08);
    transition: border-color .3s ease, box-shadow .3s ease;
  }
  .contact-card:hover {
    border-color: rgba(255, 85, 113, 0.45);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.75), 0 0 50px rgba(237, 0, 51, 0.14);
  }
  .contact-card textarea { min-block-size: 7.5rem; }

  /* Footer */
  .public-footer {
    min-block-size: 85px; border-block-start: 1px solid var(--line);
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.2rem;
    color: var(--muted); padding-block: 1.5rem;
  }
  .footer-links-inline { display: flex; flex-wrap: wrap; gap: clamp(.8rem, 2vw, 1.8rem); font-weight: 600; font-size: .9rem; }
  .footer-links-inline a:hover { color: var(--accent); }
  .back-to-top { display: flex; gap: .35rem; align-items: center; font-size: .9rem; font-weight: 700; color: var(--accent); }
  .back-to-top:hover { text-decoration: underline; }

  .auth-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); width: min(100% - 2rem, 61rem); align-items: stretch; gap: 1rem; margin-block: clamp(1.75rem, 7vw, 6rem); }
  .auth-aside { display: flex; flex-direction: column; justify-content: center; gap: 1.2rem; padding: clamp(1.5rem, 5vw, 3rem); }
  .auth-aside .wave { height: 6rem; }
  .auth-line { color: var(--signal-ink); font-size: clamp(2rem, 4.5vw, 3.65rem); font-weight: 900; letter-spacing: -.05em; line-height: 1.07; }
  .auth-line em { color: var(--signal-accent); }
  .auth-card { display: grid; align-content: center; gap: 1rem; min-inline-size: 0; padding: clamp(1rem, 4vw, 2.25rem); background: var(--panel); border: 1px solid var(--line); border-radius: 25px; box-shadow: var(--shadow); }
  .auth-tabs { display: grid; grid-template-columns: 1fr 1fr; justify-self: stretch; }
  .auth-tabs a { justify-content: center; text-align: center; }
  .auth-heading h1 { font-size: clamp(1.65rem, 3vw, 2.25rem); font-weight: 900; }
  .auth-heading p { margin-block-start: .25rem; }
  .password-field { position: relative; display: block; }
  .password-control { display: grid; gap: .3rem; }
  .password-field input { padding-right: 3.25rem; }
  .password-field button { position: absolute; right: 1px; top: 1px; height: calc(100% - 2px); min-height: 0; border-color: transparent; background: transparent; }
  .error-layout { min-block-size: 65vh; display: grid; place-items: center; padding-block: 2rem; }
  .error-card { display: grid; justify-items: center; gap: 1rem; width: min(100%, 34rem); text-align: center; padding-block: clamp(2rem, 5vw, 4rem); }
  .error-code { font-size: clamp(3rem, 10vw, 6rem); color: var(--accent); font-weight: 700; line-height: 1; }
}

@layer portal {
  .portal {
    display: grid;
    grid-template: "sidebar topbar" 68px "sidebar workspace" 1fr "sidebar footer" auto / clamp(245px, 18vw, 275px) minmax(0, 1fr);
    min-height: 100vh;
    background: #090a0d;
  }
  .topbar {
    grid-area: topbar;
    position: sticky;
    inset-block-start: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    min-height: 68px;
    padding-inline: clamp(1rem, 3.5vw, 2.5rem);
    background: rgba(9, 10, 13, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-block-end: 1px solid rgba(255, 255, 255, 0.06);
  }
  .topbar-context {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-inline-size: 0;
  }
  .topbar-breadcrumbs {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .88rem;
    font-weight: 700;
  }
  .crumb-root {
    color: var(--muted);
  }
  .crumb-slash {
    color: rgba(255, 255, 255, 0.2);
    font-size: .8rem;
  }
  .current-crumb {
    color: var(--text);
  }
  .visit-site-btn {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    font-weight: 700;
    gap: .4rem;
    padding-inline: .85rem;
    border-radius: 9px;
    transition: all .2s ease;
  }
  .visit-site-btn:hover {
    background: rgba(237, 0, 51, 0.12);
    border-color: rgba(237, 0, 51, 0.4);
    color: var(--accent);
  }
  .menu-button, .topbar-brand, .sidebar-close { display: none; }

  .sidebar {
    grid-area: sidebar;
    position: sticky;
    inset-block-start: 0;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: .85rem;
    background: #0d0e13;
    border-inline-end: 1px solid rgba(255, 255, 255, 0.06);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
  }
  .sidebar-brand {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    padding-block: .15rem .65rem;
    border-block-end: 1px solid rgba(255, 255, 255, 0.08);
  }
  .sidebar-brand img, .sidebar-brand .brand-logo {
    height: 56px;
  }
  .topbar-brand img, .topbar-brand .brand-logo {
    height: 42px;
  }
  .sidebar-section-title {
    display: block;
    font-size: .74rem;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: .06em;
    padding-inline: .8rem;
    margin-block: 1rem .35rem;
    text-transform: uppercase;
  }
  :root[lang="ar"] .sidebar-section-title {
    letter-spacing: 0;
  }
  .sidebar-nav {
    display: grid;
    gap: .25rem;
  }
  .nav-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-height: 44px;
    padding: .85rem .75rem;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--muted);
    font-weight: 700;
    font-size: .92rem;
    line-height: 1.25;
    transition: color .18s ease, background-color .18s ease, border-color .18s ease;
    text-decoration: none;
  }
  .nav-item i {
    display: grid;
    place-items: center;
    flex: none;
    inline-size: 1.35rem;
    font-size: 1.2rem;
    color: var(--muted);
    transition: color .18s ease;
  }
  .nav-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
  }
  .nav-item:hover i {
    color: var(--accent);
  }
  .nav-item.active {
    background: linear-gradient(135deg, rgba(237, 0, 51, 0.16), rgba(39, 19, 28, 0.9));
    border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
    color: var(--text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 4px 16px rgba(237, 0, 51, 0.12);
  }
  .nav-item.active i {
    color: var(--accent);
  }

  .sidebar-bottom {
    margin-block-start: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: .65rem;
    padding-block-start: 1rem;
  }
  .sidebar-status-card {
    background: rgba(21, 22, 28, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: .75rem .85rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
  .status-indicator {
    display: flex;
    align-items: center;
    gap: .55rem;
  }
  .status-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
    animation: radar-ping 2.2s infinite ease-in-out;
    flex: none;
  }
  .status-indicator strong {
    font-size: .82rem;
    color: #fff;
    font-weight: 700;
  }
  .sidebar-status-card small {
    display: block;
    margin-block-start: .2rem;
    font-size: .72rem;
    color: var(--muted);
    line-height: 1.35;
    padding-inline-start: calc(8px + .55rem);
  }

  .sidebar-user {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding-block-start: .65rem;
    border-block-start: 1px solid rgba(255, 255, 255, 0.06);
  }
  .sidebar-user-logout { flex: none; }
  .avatar {
    display: grid;
    place-items: center;
    flex: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #ff5571);
    color: #fff;
    font-weight: 800;
    font-size: .95rem;
    box-shadow: 0 0 12px rgba(237, 0, 51, 0.35);
  }
  .user-meta {
    min-inline-size: 0;
    flex: 1;
  }
  .user-meta > * {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .user-meta strong {
    font-size: .88rem;
    color: #fff;
    font-weight: 700;
  }
  .user-meta small {
    color: var(--muted);
    font-size: .75rem;
  }
  .logout-mini-btn {
    border-radius: 8px;
    color: var(--muted);
    border-color: transparent;
    transition: all .18s ease;
  }
  .logout-mini-btn:hover {
    color: var(--accent);
    background: rgba(237, 0, 51, 0.12);
  }

  .workspace {
    grid-area: workspace;
    align-content: start;
    width: min(100%, 82rem);
    margin-inline: auto;
    padding: clamp(1.2rem, 3.5vw, 2.5rem);
    gap: 1.55rem;
  }
  .workspace search { display: block; }

  .portal-footer {
    grid-area: footer;
    display: grid;
    gap: 1rem;
    width: min(100%, 82rem);
    margin-inline: auto;
    padding-block: 1.35rem 1.75rem;
    padding-inline: clamp(1.2rem, 3.5vw, 2.5rem);
    border-block-start: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--muted);
  }
  .portal-footer-main {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem 2rem;
  }
  .portal-footer-brand {
    display: grid;
    gap: .4rem;
    max-inline-size: 27rem;
  }
  .portal-footer-brand .brand-logo {
    block-size: 32px;
    inline-size: auto;
  }
  .portal-footer-note {
    font-size: .85rem;
    line-height: 1.5;
    color: var(--muted);
  }
  .portal-footer-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .3rem 1.15rem;
    font-size: .88rem;
    font-weight: 600;
  }
  .portal-footer-nav a {
    display: inline-flex;
    align-items: center;
    min-block-size: 36px;
    color: var(--muted);
    transition: color .16s ease;
  }
  .portal-footer-nav a:hover,
  .portal-footer-nav a:focus-visible {
    color: var(--accent);
  }
  .portal-footer-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem 1.25rem;
    padding-block-start: .9rem;
    border-block-start: 1px solid rgba(255, 255, 255, 0.05);
  }
  .portal-footer-copy {
    font-size: .82rem;
    color: var(--muted);
  }

  /* Unified Portal Surfaces, Controls, Badges & Tabs */
  .portal .card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(165deg, #171720 0%, #111217 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 12px 32px rgba(0, 0, 0, 0.32);
  }
  .portal .inset {
    background: rgba(13, 14, 19, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
  }
  .portal .danger-card {
    border-color: rgba(255, 173, 167, 0.24);
    background: linear-gradient(165deg, rgba(56, 32, 37, 0.34) 0%, #111217 65%);
  }
  .portal .danger-card .tile {
    background: var(--danger-soft);
    color: var(--danger);
  }
  .portal .notice {
    border-radius: 13px;
    padding: .8rem 1rem;
    font-weight: 700;
  }
  .portal .notice.success {
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.35);
  }
  .portal .badge:is([data-state="connected"], [data-state="synced"], [data-state="ready"]) {
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(16, 185, 129, 0.35);
    color: #34d399;
  }
  .portal .badge[data-state="online"] {
    background: rgba(255, 85, 113, 0.14);
    border-color: rgba(255, 85, 113, 0.36);
    color: #ff7a91;
  }
  .portal .badge[data-state="waiting"] {
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.35);
    color: #fbbf24;
  }
  .portal .badge[data-state="blocked"] {
    background: var(--danger-soft);
    border-color: rgba(255, 173, 167, 0.38);
    color: var(--danger);
  }
  .portal .badge:is([data-state="offline"], [data-state="unknown"], [data-state="unset"]) {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--line);
    color: var(--muted);
  }
  .portal .badge:is([data-state="offline"], [data-state="unknown"], [data-state="unset"])::before {
    background: transparent;
    border: 1.5px solid currentColor;
  }
  .portal .badge[data-state="waiting"]::before {
    border-radius: 1.5px;
    transform: rotate(45deg);
  }
  .portal .badge[data-state="blocked"]::before {
    border-radius: 2px;
  }
  .portal .tabs {
    padding: .35rem;
    gap: .3rem;
    background: #101116;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
  }
  .portal .tabs a {
    min-block-size: 42px;
    padding: .48rem .9rem;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: .92rem;
    transition: color .18s ease, background-color .18s ease, border-color .18s ease;
  }
  .portal .tabs a:hover {
    background: rgba(255, 255, 255, 0.04);
  }
  .portal .tabs a[aria-current] {
    color: #fff;
    background: linear-gradient(135deg, rgba(237, 0, 51, 0.2), rgba(255, 85, 113, 0.08));
    border-color: rgba(255, 85, 113, 0.4);
    box-shadow: 0 4px 14px rgba(237, 0, 51, 0.16);
  }
  .portal .tabs a[aria-current] i { color: var(--accent); }
  .portal :is(input:not([type="checkbox"], [type="radio"], [type="hidden"]), select, textarea) {
    font-size: max(1rem, 1em);
    min-block-size: 46px;
    background-color: #0d0e13;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 11px;
    transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
  }
  .portal :is(input:not([type="checkbox"], [type="radio"], [type="hidden"]), select, textarea):hover {
    border-color: rgba(255, 255, 255, 0.22);
  }
  .portal :is(input:not([type="checkbox"], [type="radio"], [type="hidden"]), select, textarea):focus {
    outline: none;
    border-color: rgba(255, 85, 113, 0.65);
    box-shadow: 0 0 0 3px rgba(255, 85, 113, 0.15);
  }
  .portal :is(input:not([type="checkbox"], [type="radio"], [type="hidden"]), select, textarea):user-invalid {
    border-color: rgba(255, 173, 167, 0.72);
  }
  .portal select {
    cursor: pointer;
  }
  @supports (appearance: base-select) {
    .portal select,
    .portal select::picker(select) {
      appearance: base-select;
    }
    .portal select {
      display: inline-flex;
      align-items: center;
      justify-content: space-between;
      gap: .6rem;
      line-height: 1.4;
    }
    .portal select::picker-icon {
      color: var(--muted);
      transition: transform .18s ease, color .18s ease;
    }
    .portal select:open::picker-icon {
      transform: rotate(180deg);
      color: var(--accent);
    }
    .portal select::picker(select) {
      background: #14151c;
      color: var(--text);
      border: 1px solid rgba(255, 255, 255, 0.14);
      border-radius: 12px;
      padding: .35rem;
      margin-block: 4px;
      box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
    }
    .portal select option {
      padding: .5rem .75rem;
      border-radius: 8px;
    }
    .portal select option:checked {
      background: var(--accent-soft);
      color: #fff;
      font-weight: 700;
    }
    .portal select option:hover {
      background: rgba(255, 255, 255, 0.06);
    }
  }
  .portal .check-label {
    padding: .5rem .95rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.09);
    transition: background-color .18s ease, border-color .18s ease;
  }
  .portal .check-label:hover {
    border-color: rgba(255, 255, 255, 0.18);
  }
  .portal .check-label:has(input:checked) {
    background: var(--accent-soft);
    border-color: rgba(255, 85, 113, 0.42);
  }
  .portal .row-list {
    display: grid;
    gap: .6rem;
  }
  .portal .item-row {
    padding: .85rem .95rem;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    background: rgba(13, 14, 19, 0.7);
    transition: border-color .18s ease, background-color .18s ease;
  }
  .portal .item-row:hover {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(19, 20, 27, 0.85);
  }
  .portal .history-delete {
    padding: .72rem .95rem;
    border-radius: 14px;
    background: rgba(16, 17, 23, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
  }
  .portal .confirm-dialog {
    border-radius: 20px;
    border: 1px solid rgba(255, 85, 113, 0.3);
    background: linear-gradient(165deg, #1a1821 0%, #111217 100%);
  }
  .portal .tile-sm {
    inline-size: 32px;
    block-size: 32px;
    border-radius: 9px;
    font-size: 1rem;
  }
  .portal audio {
    inline-size: 100%;
    border-radius: 10px;
  }

  /* Page Heading Redesign */
  .page-heading {
    display: grid;
    gap: .75rem;
    padding-block: .2rem .4rem;
  }
  .page-heading-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
  }
  .page-heading-text {
    display: grid;
    gap: .3rem;
  }
  .page-heading-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: var(--accent);
    font-size: .82rem;
    font-weight: 700;
  }
  .eyebrow-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    animation: pulse-dot 2s infinite ease-in-out;
  }
  .page-heading h1 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 900;
    line-height: 1.12;
    letter-spacing: -.03em;
    color: #fff;
    margin: 0;
    text-wrap: balance;
  }
  :root[lang="ar"] .page-heading h1 {
    letter-spacing: 0;
  }
  .page-heading-desc {
    color: var(--muted);
    font-size: .94rem;
    margin: 0;
    max-inline-size: 65ch;
    text-wrap: pretty;
  }
  .page-heading-tag {
    padding: .38rem .85rem;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.14);
    color: var(--text);
    font-size: .88rem;
  }
  .page-heading-cta .btn-primary {
    padding: .75rem 1.4rem;
    font-size: .95rem;
    font-weight: 800;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(237, 0, 51, 0.4);
  }
  .page-heading-cta .btn-primary:hover {
    box-shadow: 0 6px 26px rgba(237, 0, 51, 0.6);
    transform: translateY(-1px);
  }

  /* Dashboard 4-Stats Grid */
  .dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
  }

  .activity-layout, .profile-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 25rem), 1fr));
    align-items: start;
    gap: 1.15rem;
  }
  .report-filters .form-row > label { flex: 1 1 10rem; }
  .report-dates {
    display: grid;
    flex: 2 1 21rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
    gap: .7rem;
  }
  .report-date-summary {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    width: fit-content;
    padding: .28rem .72rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.07);
    font-size: .84rem;
    font-weight: 600;
  }
  .report-date-summary i { color: var(--accent); }
  .chart-rows { display: grid; gap: .45rem; margin: 0; padding: 0; list-style: none; }
  .chart-row {
    display: grid;
    grid-template-columns: minmax(4.6rem, max-content) minmax(0, 1fr) minmax(2.5rem, max-content);
    align-items: center;
    gap: .75rem;
    padding: .32rem .5rem;
    border-radius: 9px;
    font-size: .84rem;
    font-variant-numeric: tabular-nums;
    transition: background-color .15s ease;
  }
  .chart-row.has-value:hover { background: rgba(255, 255, 255, 0.03); }
  .chart-interval { color: var(--muted); }
  .chart-row strong { text-align: end; color: var(--text); }
  .chart-bar {
    appearance: none;
    display: block;
    inline-size: 100%;
    min-inline-size: 0;
    block-size: .72rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    --chart-fill: linear-gradient(90deg, var(--action), var(--accent));
  }
  .chart-requests { --chart-fill: linear-gradient(90deg, #0284c7, #38bdf8); }
  .chart-bar::-webkit-meter-bar { background: rgba(255, 255, 255, 0.05); border: 0; border-radius: inherit; }
  .chart-bar::-webkit-meter-optimum-value { background: var(--chart-fill); border-radius: inherit; }
  .chart-bar::-moz-meter-bar { background: var(--chart-fill); border-radius: inherit; }
  .chart-total-badge {
    font-size: .86rem;
    padding: .28rem .68rem;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--text);
  }

  .stat-banner-card {
    position: relative;
    background: linear-gradient(160deg, #16171f 0%, #111217 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.15rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  }
  .stat-banner-card:hover { 
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4);
  }
  .stat-banner-card[data-stat-kind="requests"] .stat-banner-icon {
    background: rgba(56, 189, 248, 0.14);
    color: #38bdf8;
  }
  .stat-banner-card[data-stat-kind="devices"] .stat-banner-icon {
    background: rgba(16, 185, 129, 0.14);
    color: #34d399;
  }
  .stat-banner-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
  }
  .stat-banner-label {
    font-size: .86rem;
    color: var(--muted);
    font-weight: 700;
  }
  .stat-banner-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(237, 0, 51, 0.14);
    color: var(--accent);
    display: grid;
    place-items: center;
    font-size: 1.15rem;
    flex: none;
  }
  .stat-banner-value {
    font-size: clamp(1.75rem, 2.8vw, 2.35rem);
    font-weight: 900;
    color: #fff;
    line-height: 1.1;
    margin-block: .35rem .1rem;
    font-variant-numeric: tabular-nums;
  }
  .stat-banner-value small {
    font-size: .78rem;
    color: var(--muted);
    font-weight: 700;
  }
  .stat-banner-caption {
    font-size: .78rem;
    color: var(--muted);
    margin-block-start: auto;
  }
  .text-accent {
    color: #ff3355 !important;
  }
  .highlight-card {
    background: linear-gradient(160deg, rgba(237, 0, 51, 0.1) 0%, #111217 65%);
    border-color: rgba(237, 0, 51, 0.25);
  }
  .highlight-card:hover {
    border-color: rgba(237, 0, 51, 0.55);
    box-shadow: 0 10px 30px rgba(237, 0, 51, 0.2);
  }

  .back-link { font-size: .9rem; }
  .metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .95rem; }
  .metrics-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metric {
    padding: clamp(.9rem, 2.4vw, 1.35rem);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(160deg, #16171f 0%, #101116 100%);
  }
  .metric-primary {
    background: linear-gradient(160deg, rgba(237, 0, 51, 0.11) 0%, #111217 70%);
    border-color: rgba(237, 0, 51, 0.25);
  }
  .metric dt { display: flex; align-items: center; gap: .45rem; color: var(--muted); font-size: .86rem; font-weight: 700; line-height: 1.35; }
  .metric dt i { color: var(--accent); font-size: 1.05rem; }
  .metric dd { margin-block-start: .4rem; font-size: clamp(1.25rem, 2.8vw, 2rem); font-weight: 900; line-height: 1.2; font-variant-numeric: tabular-nums; color: #fff; }
  .metric small { font-size: .62em; color: var(--muted); font-weight: 700; }
  .call-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .45rem;
  }
  .call-meta > * {
    padding: .22rem .6rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    font-size: .82rem;
    font-weight: 700;
    color: var(--text);
  }
  .request-card-head {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
    min-inline-size: 0;
  }
  .request-card-head .tile { margin-block-start: .15rem; }
  .connect-card { width: min(100%, 36rem); background: linear-gradient(155deg, rgba(237, 0, 51, 0.1), #111217 68%); }

  .device-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 11.5rem), 1fr));
    gap: .85rem;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .device-summary-card {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .9rem 1.05rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    background: linear-gradient(160deg, #16171e 0%, #101116 100%);
  }
  .device-summary-icon {
    display: grid;
    place-items: center;
    flex: none;
    inline-size: 40px;
    block-size: 40px;
    border-radius: 11px;
    font-size: 1.2rem;
    background: rgba(237, 0, 51, 0.12);
    color: var(--accent);
  }
  .device-summary-card[data-summary-card="online"] .device-summary-icon {
    background: rgba(16, 185, 129, 0.14);
    color: #34d399;
  }
  .device-summary-card[data-summary-card="phone"] .device-summary-icon {
    background: rgba(56, 189, 248, 0.14);
    color: #38bdf8;
  }
  .device-summary-card[data-summary-card="ready"] .device-summary-icon {
    background: rgba(16, 185, 129, 0.16);
    color: #34d399;
  }
  .device-summary-text {
    display: grid;
    gap: .1rem;
    min-inline-size: 0;
  }
  .device-summary-label {
    color: var(--muted);
    font-size: .8rem;
    font-weight: 700;
  }
  .device-summary-value {
    color: var(--text);
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1.15;
  }

  .device-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
    align-items: stretch;
  }
  .device-card {
    container: device-card / inline-size;
    position: relative;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 1rem;
    padding: clamp(1rem, 2.5vw, 1.4rem);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: linear-gradient(165deg, #181820 0%, #111217 100%);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    transition: border-color .22s ease, box-shadow .22s ease;
  }
  .device-card::before {
    content: "";
    position: absolute;
    inset-block-start: 0;
    inset-inline: 14%;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, var(--device-glow, rgba(255, 255, 255, 0.2)), transparent);
    pointer-events: none;
  }
  .device-card[data-device-state="ready"] {
    --device-glow: #10b981;
    border-color: rgba(16, 185, 129, 0.3);
  }
  .device-card[data-device-state="online"] {
    --device-glow: var(--accent);
    border-color: rgba(255, 85, 113, 0.25);
  }
  .device-card[data-device-state="offline"] {
    --device-glow: rgba(181, 175, 185, 0.26);
  }
  .device-card[data-device-state="blocked"] {
    --device-glow: var(--danger);
    border-color: rgba(255, 173, 167, 0.34);
  }

  .device-card-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: .95rem;
  }
  .device-pod-visual {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: .3rem;
    flex: none;
    inline-size: 90px;
    block-size: 58px;
    padding: .42rem .42rem .58rem;
    border-radius: 13px;
    background: linear-gradient(155deg, #272530 0%, #14131a 55%, #0c0c10 100%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 8px 18px rgba(0, 0, 0, 0.45);
  }
  .device-pod-visual-lg {
    inline-size: 136px;
    block-size: 86px;
    padding: .62rem .65rem .8rem;
    border-radius: 18px;
    gap: .45rem;
  }
  .pod-grille {
    display: grid;
    grid-template-columns: repeat(2, 2.5px);
    gap: 3px;
  }
  .pod-grille i {
    display: block;
    inline-size: 2.5px;
    block-size: 2.5px;
    border-radius: 50%;
    background: #353340;
  }
  .pod-oled {
    display: grid;
    align-content: space-between;
    justify-items: center;
    block-size: 100%;
    padding: .22rem .25rem;
    border-radius: 6px;
    background: linear-gradient(180deg, #040609 0%, #0b1017 100%);
    border: 1px solid #262936;
  }
  .pod-oled-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    inline-size: 100%;
    font-size: .62rem;
    line-height: 1;
    color: #4b5565;
  }
  .device-card[data-wifi-state="connected"] .pod-oled-wifi { color: #34d399; }
  .device-card[data-phone-state="connected"] .pod-oled-bt { color: #38bdf8; }
  .device-card[data-device-state="blocked"] .pod-oled-top { color: rgba(255, 173, 167, 0.55); }
  .pod-oled-bars {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    inline-size: 100%;
    block-size: 12px;
  }
  .pod-oled-bars i {
    display: block;
    inline-size: 2.5px;
    block-size: 3px;
    border-radius: 999px;
    background: #323947;
    transform-origin: center;
  }
  .device-card[data-device-state="online"] .pod-oled-bars i { background: var(--accent); opacity: .85; }
  .device-card[data-device-state="online"] .pod-oled-bars i:nth-child(1) { block-size: 5px; }
  .device-card[data-device-state="online"] .pod-oled-bars i:nth-child(2) { block-size: 8px; }
  .device-card[data-device-state="online"] .pod-oled-bars i:nth-child(3) { block-size: 10px; }
  .device-card[data-device-state="online"] .pod-oled-bars i:nth-child(4) { block-size: 7px; }
  .device-card[data-device-state="online"] .pod-oled-bars i:nth-child(5) { block-size: 5px; }
  .device-card[data-device-state="ready"] .pod-oled-bars i { background: #34d399; }
  .device-card[data-device-state="ready"] .pod-oled-bars i:nth-child(1) { block-size: 6px; }
  .device-card[data-device-state="ready"] .pod-oled-bars i:nth-child(2) { block-size: 11px; background: #38bdf8; }
  .device-card[data-device-state="ready"] .pod-oled-bars i:nth-child(3) { block-size: 12px; background: #ff5571; }
  .device-card[data-device-state="ready"] .pod-oled-bars i:nth-child(4) { block-size: 10px; background: #38bdf8; }
  .device-card[data-device-state="ready"] .pod-oled-bars i:nth-child(5) { block-size: 6px; }
  .device-card[data-device-state="blocked"] .pod-oled-bars i { background: var(--danger); opacity: .65; block-size: 3px; }
  .pod-led-strip {
    position: absolute;
    inset-block-end: 4px;
    inset-inline: 14px;
    block-size: 3px;
    border-radius: 999px;
    background: #2b2b34;
    transition: background-color .2s ease, box-shadow .2s ease;
  }
  .device-card[data-device-state="ready"] .pod-led-strip {
    background: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.85);
  }
  .device-card[data-device-state="online"] .pod-led-strip {
    background: var(--accent);
    box-shadow: 0 0 10px rgba(255, 85, 113, 0.75);
  }
  .device-card[data-device-state="blocked"] .pod-led-strip {
    background: var(--danger);
    box-shadow: 0 0 8px rgba(255, 173, 167, 0.55);
  }

  .device-identity {
    display: grid;
    gap: .35rem;
    min-inline-size: 0;
  }
  .device-identity-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .4rem .6rem;
  }
  .device-model {
    display: inline-flex;
    align-items: center;
    gap: .32rem;
    color: var(--muted);
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .02em;
  }
  .device-model i { color: var(--accent); font-size: .9rem; }
  .device-serial-row {
    display: flex;
    align-items: center;
    gap: .4rem;
    min-inline-size: 0;
  }
  .device-serial {
    font-size: clamp(.98rem, 4.4cqi, 1.15rem);
    font-weight: 800;
    letter-spacing: .02em;
    color: var(--text);
    line-height: 1.25;
  }
  .copy-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: none;
  }
  .device-copy-btn {
    min-inline-size: 32px;
    min-block-size: 32px;
    inline-size: auto;
    block-size: auto;
    padding: .3rem;
    border-radius: 8px;
    font-size: .92rem;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.03);
  }
  .device-copy-btn[data-copied] {
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.45);
    background: rgba(16, 185, 129, 0.14);
  }
  .device-copy-btn[data-failed] {
    color: var(--danger);
    border-color: rgba(255, 173, 167, 0.45);
    background: var(--danger-soft);
  }
  .copy-tip {
    position: absolute;
    inset-block-start: calc(100% + 6px);
    inset-inline-end: 0;
    z-index: 6;
    padding: .25rem .55rem;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #101218;
    color: var(--text);
    font-size: .75rem;
    font-weight: 700;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity .15s ease, transform .15s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  }
  .device-copy-btn:is([data-copied], [data-failed]) + .copy-tip {
    opacity: 1;
    transform: translateY(0);
  }

  .device-card-body {
    display: grid;
    gap: .85rem;
    align-content: start;
  }
  .device-states {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: .5rem;
  }
  .device-telemetry-item {
    min-inline-size: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    padding: .62rem .78rem;
    border-radius: 13px;
    background: rgba(14, 15, 20, 0.84);
    border: 1px solid rgba(255, 255, 255, 0.07);
    transition: border-color .2s ease;
  }
  .device-telemetry-item dt {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
    min-inline-size: 0;
  }
  .telemetry-icon {
    display: inline-grid;
    place-items: center;
    flex: none;
    inline-size: 26px;
    block-size: 26px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
    font-size: .92rem;
  }
  .device-telemetry-item:has(:is([data-state="connected"], [data-state="synced"])) {
    border-color: rgba(16, 185, 129, 0.25);
  }
  .device-telemetry-item:has(:is([data-state="connected"], [data-state="synced"])) .telemetry-icon {
    background: rgba(16, 185, 129, 0.14);
    color: #34d399;
  }
  .device-telemetry-item:has([data-state="waiting"]) {
    border-color: rgba(245, 158, 11, 0.28);
  }
  .device-telemetry-item:has([data-state="waiting"]) .telemetry-icon {
    background: rgba(245, 158, 11, 0.14);
    color: #fbbf24;
  }
  .device-telemetry-item:has([data-state="blocked"]) {
    border-color: rgba(255, 173, 167, 0.3);
  }
  .device-telemetry-item:has([data-state="blocked"]) .telemetry-icon {
    background: var(--danger-soft);
    color: var(--danger);
  }

  .device-card .badge:is([data-state="connected"], [data-state="synced"], [data-state="ready"]) {
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(16, 185, 129, 0.35);
    color: #34d399;
  }
  .device-card .badge[data-state="online"] {
    background: rgba(255, 85, 113, 0.14);
    border-color: rgba(255, 85, 113, 0.36);
    color: #ff7a91;
  }
  .device-card .badge[data-state="waiting"] {
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.35);
    color: #fbbf24;
  }
  .device-card .badge[data-state="blocked"] {
    background: var(--danger-soft);
    border-color: rgba(255, 173, 167, 0.38);
    color: var(--danger);
  }
  .device-card .badge:is([data-state="offline"], [data-state="unknown"], [data-state="unset"]) {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--line);
    color: var(--muted);
  }
  .device-card .badge:is([data-state="offline"], [data-state="unknown"], [data-state="unset"])::before {
    background: transparent;
    border: 1.5px solid currentColor;
  }
  .device-card .badge[data-state="waiting"]::before {
    border-radius: 1.5px;
    transform: rotate(45deg);
  }
  .device-card .badge[data-state="blocked"]::before {
    border-radius: 2px;
  }

  .device-bot-panel {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: .4rem .78rem;
    padding: .78rem .88rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.07);
  }
  .device-bot-panel[data-has-bot="false"] {
    border-style: dashed;
    border-color: var(--line);
  }
  .device-bot-avatar {
    grid-row: span 2;
    display: grid;
    place-items: center;
    inline-size: 44px;
    block-size: 44px;
    flex: none;
  }
  .device-bot-avatar img {
    inline-size: 44px;
    block-size: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid rgba(255, 85, 113, 0.5);
    background: var(--soft);
  }
  .device-bot-fallback {
    inline-size: 44px;
    block-size: 44px;
    border-radius: 12px;
  }
  .device-bot-panel[data-has-bot="false"] .device-bot-fallback {
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
  }
  .device-bot-info {
    display: grid;
    gap: .08rem;
    min-inline-size: 0;
  }
  .device-bot-label {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 700;
  }
  .device-bot-name {
    color: var(--text);
    font-size: .97rem;
    font-weight: 800;
    line-height: 1.3;
  }
  .device-bot-meta {
    grid-column: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
  }
  .device-auto-badge {
    font-size: .76rem;
    padding: .18rem .52rem;
  }
  .device-rings-chip {
    display: inline-flex;
    align-items: center;
    gap: .28rem;
    padding: .18rem .55rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--field);
    color: var(--muted);
    font-size: .76rem;
    font-weight: 700;
  }
  .device-rings-chip i { color: var(--accent); font-size: .88rem; }
  .device-rings-chip strong { color: var(--text); }

  .device-card-footer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: .75rem;
    padding-block-start: .85rem;
    border-block-start: 1px solid rgba(255, 255, 255, 0.07);
  }
  .device-hint {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-size: .83rem;
    line-height: 1.45;
    min-inline-size: 0;
    color: var(--muted);
  }
  .device-hint i { flex: none; font-size: 1rem; }
  .device-hint[data-tone="ready"] { color: #34d399; }
  .device-hint[data-tone="online"] { color: #dcd6e0; }
  .device-hint[data-tone="online"] i { color: var(--accent); }
  .device-hint[data-tone="blocked"] { color: var(--danger); }
  .device-settings-btn { white-space: nowrap; }

  .device-empty {
    display: grid;
    justify-items: center;
    gap: .85rem;
    padding: clamp(2rem, 5vw, 3.25rem) 1.5rem;
    text-align: center;
  }
  .device-empty h2 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }
  .device-empty p { max-inline-size: 46ch; }

  @container device-card (min-width: 410px) {
    .device-pod-visual {
      inline-size: 102px;
      block-size: 64px;
    }
    .device-states {
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: .55rem;
    }
    .device-telemetry-item {
      display: grid;
      justify-items: start;
      align-content: space-between;
      gap: .55rem;
      padding: .72rem .75rem;
    }
    .device-card-footer {
      flex-direction: row;
      align-items: center;
      justify-content: space-between;
    }
  }

  @media (pointer: coarse) {
    .device-copy-btn {
      min-inline-size: 44px;
      min-block-size: 44px;
    }
    .portal :is(input:not([type="checkbox"], [type="radio"], [type="hidden"]), select) {
      min-block-size: 50px;
    }
  }

  @media (forced-colors: active) {
    .device-card,
    .device-summary-card,
    .device-telemetry-item,
    .device-bot-panel,
    .bot-card,
    .bot-spec-item,
    .bot-goal-box,
    .portal .card,
    .portal .metric,
    .portal .tabs a[aria-current],
    .portal .badge {
      border-color: CanvasText;
      box-shadow: none;
      background: Canvas;
      color: CanvasText;
    }
  }
  .bot-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
    align-items: stretch;
  }
  .bot-card {
    container: bot-card / inline-size;
    position: relative;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 1rem;
    padding: clamp(1rem, 2.5vw, 1.4rem);
    border-radius: 20px;
    transition: border-color .2s ease, box-shadow .2s ease;
  }
  .bot-card::before {
    content: "";
    position: absolute;
    inset-block-start: 0;
    inset-inline: 14%;
    block-size: 2px;
    border-radius: 999px;
    --device-glow: rgba(181, 175, 185, 0.26);
    pointer-events: none;
  }
 
  .bot-card-head {
    display: flex;
    align-items: center;
    gap: .95rem;
    min-inline-size: 0;
  }
  .bot-card-avatar {
    position: relative;
    flex: none;
    inline-size: 62px;
    block-size: 62px;
    display: grid;
    place-items: center;
  }
  .bot-card-avatar img {
    inline-size: 62px;
    block-size: 62px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 85, 113, 0.5);
    background: var(--soft);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.42);
  }
  .bot-card[data-linked="true"] .bot-card-avatar img {
    border-color: rgba(16, 185, 129, 0.68);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.14), 0 6px 18px rgba(0, 0, 0, 0.42);
  }
  .bot-card-avatar .tile {
    inline-size: 62px;
    block-size: 62px;
    border-radius: 16px;
    font-size: 1.55rem;
  }
  .bot-avatar-badge {
    position: absolute;
    inset-block-end: -2px;
    inset-inline-end: -2px;
    display: grid;
    place-items: center;
    inline-size: 24px;
    block-size: 24px;
    border-radius: 50%;
    background: #14151c;
    border: 1.5px solid rgba(255, 255, 255, 0.16);
    color: var(--accent);
    font-size: .78rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
  }
  .bot-card[data-linked="true"] .bot-avatar-badge {
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.55);
  }
  .bot-card-title {
    flex: 1;
    display: grid;
    gap: .28rem;
    min-inline-size: 0;
  }
  .bot-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .35rem .6rem;
  }
  .bot-persona-label {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 700;
  }
  .bot-persona-label i {
    color: var(--accent);
    font-size: .9rem;
  }
  .bot-link-badge {
    display: inline-flex;
    align-items: center;
    gap: .32rem;
    font-size: .76rem;
    padding: .24rem .62rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
  }
  .bot-link-badge[data-linked="true"] {
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(16, 185, 129, 0.38);
    color: #6ee7b7;
  }
  .bot-card-title h2 {
    font-size: 1.18rem;
    font-weight: 800;
    color: var(--text);
    text-wrap: balance;
  }
  .bot-card-business {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .85rem;
    color: var(--muted);
  }
  .bot-card-business i { color: var(--accent); flex: none; }
  .bot-card-body {
    display: grid;
    align-content: start;
    gap: .75rem;
  }
  .bot-spec-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
  }
  .bot-spec-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    min-inline-size: 0;
    padding: .62rem .75rem;
    border-radius: 13px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(13, 14, 19, 0.72);
  }
  .bot-spec-icon {
    display: grid;
    place-items: center;
    flex: none;
    inline-size: 32px;
    block-size: 32px;
    border-radius: 9px;
    background: rgba(255, 85, 113, 0.1);
    color: var(--accent);
    font-size: 1rem;
  }
  .bot-spec-text {
    display: grid;
    gap: .05rem;
    min-inline-size: 0;
  }
  .bot-spec-label {
    color: var(--muted);
    font-size: .74rem;
    font-weight: 700;
    line-height: 1.2;
  }
  .bot-spec-value {
    color: var(--text);
    font-size: .87rem;
    font-weight: 700;
    line-height: 1.3;
  }
  .bot-section-label {
    display: inline-flex;
    align-items: center;
    gap: .32rem;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 700;
  }
  .bot-section-label i { color: var(--accent); font-size: .92rem; }
  .bot-goal-box {
    display: grid;
    gap: .3rem;
    padding: .75rem .9rem;
  }
  .bot-goal-text {
    font-size: .88rem;
    line-height: 1.5;
    color: #e4dfe9;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .bot-goal-text.is-empty {
    color: var(--muted);
  }
  .bot-fields-box {
    display: grid;
    gap: .45rem;
  }
  .bot-fields-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
  }
  .bot-fields-count {
    font-size: .76rem;
    font-weight: 700;
    color: var(--muted);
    padding: .1rem .5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
  }
  .bot-field-chips {
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .bot-field-chip {
    background: rgba(255, 255, 255, 0.035);
    border-color: rgba(255, 255, 255, 0.09);
    color: #e2dce7;
    font-size: .78rem;
    font-weight: 600;
  }
  .bot-field-chip[data-required="true"] {
    border-color: rgba(255, 85, 113, 0.34);
    background: rgba(255, 85, 113, 0.08);
  }
  .bot-field-req {
    color: var(--accent);
    font-weight: 900;
  }
  .bot-fields-empty {
    font-size: .83rem;
    color: var(--muted);
  }
  .bot-card-footer {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    padding-block-start: .85rem;
    border-block-start: 1px solid rgba(255, 255, 255, 0.07);
  }
  .bot-card-footer .btn { flex: 1 1 auto; }
  @container bot-card (max-width: 340px) {
    .bot-spec-grid {
      grid-template-columns: minmax(0, 1fr);
    }
    .bot-card-head {
      align-items: flex-start;
    }
  }
  .empty-state-card {
    display: grid;
    justify-items: center;
    gap: .85rem;
    padding: clamp(2rem, 5vw, 3.25rem) 1.5rem;
    text-align: center;
  }
  .empty-state-card h2 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }
  .empty-state-card p { max-inline-size: 46ch; }

  .bot-step-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .35rem;
    margin: 0;
    padding: 1rem .65rem;
    list-style: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: rgba(16, 17, 23, 0.85);
  }
  .bot-step-list li {
    position: relative;
    display: grid;
    justify-items: center;
    align-content: start;
    gap: .45rem;
    color: var(--muted);
    font-size: clamp(.73rem, 2.6vw, .92rem);
    line-height: 1.25;
    text-align: center;
  }
  .bot-step-list li:not(:last-child)::after {
    content: "";
    position: absolute;
    inset-block-start: 1rem;
    inset-inline-start: calc(50% + 1.35rem);
    inline-size: calc(100% - 2.35rem);
    block-size: 2px;
    background: var(--line);
    pointer-events: none;
  }
  .bot-step-list li.is-complete:not(:last-child)::after {
    background: rgba(255, 85, 113, 0.5);
  }
  .bot-step-number {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    inline-size: 2rem;
    block-size: 2rem;
    border: 1.5px solid var(--line);
    border-radius: 50%;
    background: #101116;
    font-weight: 800;
  }
  .bot-step-list [aria-current="step"] { color: #fff; font-weight: 800; }
  .bot-step-list [aria-current="step"] .bot-step-number {
    color: #fff;
    border-color: var(--accent);
    background: var(--action);
    box-shadow: 0 0 14px rgba(237, 0, 51, 0.45);
  }
  .bot-step-list .is-complete .bot-step-number {
    color: var(--accent);
    border-color: rgba(255, 85, 113, 0.45);
    background: var(--accent-soft);
  }
  .bot-voices { min-inline-size: 0; border: 0; padding: 0; margin: 0; }
  .bot-voices legend { padding: 0; margin-block-end: .5rem; font-weight: 700; }
  .bot-voice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, max(7.3rem, calc((100% - 3.25rem) / 6))), 1fr));
    gap: .65rem;
  }
  .bot-voice-card, .bot-voice-default {
    padding: .72rem;
    background: rgba(13, 14, 19, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    cursor: pointer;
    transition: border-color .18s ease, background-color .18s ease;
  }
 
  .bot-voice-default {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: .65rem;
    margin-block-end: .65rem;
  }
  .bot-voice-card {
    position: relative;
    justify-items: center;
    align-content: start;
    gap: .5rem;
    text-align: center;
  }
  :is(.bot-voice-card, .bot-voice-default):has(input:checked) { background: var(--accent-soft); border-color: var(--accent); }
  :is(.bot-voice-card, .bot-voice-default) input {
    inline-size: 1.05rem;
    block-size: 1.05rem;
    min-block-size: 0;
    margin: 0;
    padding: 0;
    accent-color: var(--accent);
  }
  .bot-voice-card input { position: absolute; inset-block-start: .55rem; inset-inline-start: .55rem; }
  .bot-voice-card img { inline-size: 68px; block-size: 68px; margin-block-start: .2rem; object-fit: cover; border-radius: 50%; border: 2px solid var(--line); background: var(--soft); }
  .bot-voice-card:has(input:checked) img { border-color: var(--accent); }
  :is(.bot-voice-card, .bot-voice-default) small { display: block; color: var(--muted); font-size: .77rem; font-weight: 400; line-height: 1.35; }
  .bot-voice-preview { display: grid; gap: .5rem; margin-block-start: .65rem; }
  .bot-voice-preview > span { color: var(--muted); font-size: .88rem; }
  .bot-voice-preview i { color: var(--accent); }
  .collection-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: end;
    gap: .65rem;
  }
  .collection-row .check-label { min-block-size: 46px; white-space: nowrap; }
  .collection-remove { color: var(--danger); }
  [data-collection-editor] .btn:disabled { opacity: .5; cursor: default; }
  .bot-form-actions { display: flex; flex-wrap: wrap; gap: .65rem; }
  .bot-form-actions [data-bot-next], .bot-form-actions [data-bot-submit] { margin-inline-start: auto; }
  .bot-review > div {
    border-block-start: 0;
    padding: .75rem .9rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(13, 14, 19, 0.72);
    min-inline-size: 0;
  }
  .bot-list .item-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .activation-card { justify-self: center; justify-items: center; text-align: center; width: min(100%, 36rem); }
  .activation-card .notice { justify-self: stretch; text-align: start; }
  .activation-card form { width: min(100%, 22rem); text-align: start; }
  .large-tile { width: 56px; height: 56px; font-size: 1.7rem; }
  input.code-input { font: 700 1.6rem/1.3 var(--mono); text-align: center; letter-spacing: .23em; }
  .print-label { justify-self: start; display: grid; justify-items: center; gap: .8rem; width: min(100%, 28rem); color: #211820; background: #fff; text-align: center; }
  .print-label a { color: #b9002a; text-decoration: underline; }
  .print-brand { font: 900 1.2rem/1 Inter, sans-serif; }
  .contact-sender { width: fit-content; color: var(--accent); }
  .contact-sender:hover { text-decoration: underline; }
  .sidebar-backdrop { display: none; }
}

@layer responsive {
  @media (max-width: 1050px) {
    .portal {
      display: flex;
      flex-direction: column;
      min-height: 100vh;
    }
    .topbar {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
      width: 100%;
      position: sticky;
      top: 0;
      z-index: 90;
      padding-inline: 1rem;
    }
    .topbar-context { display: contents; }
    .topbar-breadcrumbs { display: none; }
    .visit-site-btn { display: none; }
    .menu-button { display: inline-flex; justify-self: start; }
    .topbar-brand { display: block; }
    .topbar .header-actions { justify-self: end; }

    .sidebar {
      position: fixed;
      inset-block: 0;
      inset-inline-start: 0;
      inset-inline-end: auto;
      z-index: 100;
      width: min(84vw, 300px);
      height: 100dvh;
      background: #0d0e13;
      border: none;
      box-shadow: 0 0 50px rgba(0, 0, 0, 0.85);
      display: none;
    }
    .sidebar.is-open {
      display: flex;
      opacity: 1;
      transform: translateX(0);
      transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
    }
    @starting-style {
      .sidebar.is-open {
        opacity: 0;
        transform: translateX(-24px);
      }
      :root[dir="rtl"] .sidebar.is-open {
        opacity: 0;
        transform: translateX(24px);
      }
    }
    .sidebar-brand { justify-content: space-between; }
    .sidebar-close { display: inline-flex; flex: none; }

    .sidebar-backdrop {
      display: block;
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.7);
      backdrop-filter: blur(6px);
      -webkit-backdrop-filter: blur(6px);
      z-index: 95;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.25s ease;
    }
    .sidebar-backdrop.is-open {
      opacity: 1;
      pointer-events: auto;
    }

    .workspace { flex: 1 0 auto; padding-inline: 1.3rem; padding-block: 1.5rem; }
    .portal-footer { padding-inline: 1.3rem; padding-block: 1.25rem 1.5rem; }
    .dashboard-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .personas-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }

  @media (max-width: 780px) {
    .device-grid,
    .bot-grid {
      grid-template-columns: minmax(0, 1fr);
    }
  }

  @media (max-width: 580px) {
    .portal-footer-main { gap: .9rem; }
    .portal-footer-nav { gap: .25rem .9rem; }
    .dashboard-stats-grid { gap: .7rem; }
    .stat-banner-card { padding: .85rem; }
    .stat-banner-icon { inline-size: 30px; block-size: 30px; }
    .page-heading-main { flex-direction: column; align-items: stretch; }
    .page-heading-cta .btn-primary { width: 100%; justify-content: center; }
    .filter-submit-btn { width: 100%; }
    .collection-row { grid-template-columns: minmax(0, 1fr) auto; }
    .collection-label { grid-column: 1 / -1; }
    .collection-remove { justify-self: end; }
  }

  @media (max-width: 820px) {
    .hero { grid-template-columns: minmax(0, 1fr); gap: 2rem; padding-block: 2.2rem 2.8rem; max-width: 100%; overflow: hidden; }
    .hero-copy { display: grid; justify-items: center; text-align: center; max-width: 100%; overflow: hidden; }
    .hero-badge { max-width: 100%; white-space: normal; text-align: center; font-size: .8rem; line-height: 1.35; padding: .35rem .75rem; margin-block-end: .85rem; }
    .hero-intro { max-inline-size: 45ch; font-size: clamp(1rem, 3.8vw, 1.15rem); }
    .hero .actions { justify-content: center; width: 100%; }
    .hero-trust { justify-content: center; }
    .hero h1 { max-inline-size: none; font-size: clamp(2.2rem, 7.5vw, 3.4rem); }
    :root[lang="ar"] .hero h1 { max-inline-size: none; font-size: clamp(2.1rem, 7.5vw, 3.2rem); }
    .hero-visual { max-width: 100%; overflow: hidden; }
    .hero-glow-aura { inset: 0; max-width: 100%; }
    .signal { width: 100%; max-width: 100%; box-sizing: border-box; }
    .signal-display { height: auto; }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .features-grid { grid-template-columns: minmax(0, 1fr); }

    .public-header {
      background: rgba(9, 10, 13, 0.94);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
    }
    .public-nav {
      min-height: 60px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      position: relative;
    }
    .desktop-only { display: none !important; }
    .mobile-menu-btn { display: inline-flex; }
    .public-links {
      display: none;
    }
    .public-links.is-open {
      display: flex;
      flex-direction: column;
      align-items: stretch;
      text-align: start;
      position: fixed;
      inset-block-start: 57px;
      inset-inline: 0;
      width: 100vw;
      width: 100%;
      height: calc(100dvh - 57px);
      max-height: calc(100dvh - 57px);
      background: rgba(14, 14, 18, 0.98);
      backdrop-filter: blur(24px);
      -webkit-backdrop-filter: blur(24px);
      border-block-end: 1px solid rgba(255, 85, 113, 0.25);
      border-block-start: 1px solid var(--line);
      padding: 1.2rem 1.4rem 2.5rem;
      gap: .35rem;
      box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85);
      animation: slideDown .25s ease-out both;
      overflow-y: auto;
      overscroll-behavior: contain;
      -webkit-overflow-scrolling: touch;
      z-index: 99999;
    }
    .public-links.is-open .nav-link,
    .public-links.is-open .nav-secondary-desktop {
      display: flex !important;
      align-items: center;
      justify-content: flex-start;
      text-align: start;
      width: 100%;
      gap: .85rem;
      min-block-size: 46px;
      padding: .65rem 1rem;
      border-radius: 12px;
      color: var(--text);
      font-size: 1rem;
      font-weight: 700;
      transition: background .15s ease, color .15s ease;
    }
    .public-links.is-open .nav-link:hover,
    .public-links.is-open .nav-link:active {
      background: var(--accent-soft);
      color: var(--accent);
    }
    .public-links.is-open .mobile-only-icon {
      display: inline-flex;
      font-size: 1.25rem;
      color: var(--accent);
    }
    .public-links.is-open .mobile-nav-footer {
      display: flex;
      flex-direction: column;
      gap: .75rem;
      margin-block-start: 1rem;
      padding-block-start: 1rem;
      border-block-start: 1px solid var(--line);
    }
    .public-links.is-open .mobile-nav-footer .btn {
      width: 100%;
      justify-content: center;
      min-block-size: 48px;
    }

    
  }

  @media (max-width: 640px) {
    .wrap { width: calc(100% - 1.8rem); margin-inline: auto; max-width: 100%; }
    .top-announcement-bar { padding: .4rem .6rem; }
    .announcement-wrap { gap: .4rem; }
    .announcement-text {
      font-size: .78rem;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
      line-height: 1.35;
    }
    .announcement-link { font-size: .78rem; }
    .public-nav { min-height: 56px; gap: .4rem; }
    .brand img, .brand .brand-logo { height: 50px; width: auto; max-width: 160px; }
    .topbar-brand img, .topbar-brand .brand-logo { height: 40px; }
    .topbar { gap: .35rem; padding-inline: clamp(.5rem, 3vw, 1rem); }
    .topbar form.topbar-logout { display: none; }
    .header-actions { gap: .35rem; }
    .header-actions .btn { padding-inline: .48rem; font-size: .83rem; }
    .hero-feature-pills { justify-content: center; gap: .4rem; }
    .hero-pill { font-size: .78rem; padding: .28rem .65rem; }
    .hero .actions { flex-direction: column; width: 100%; }
    .hero .actions .btn { width: 100%; }
    .hero-trust { flex-direction: column; align-items: center; text-align: center; gap: .6rem; }
    .signal { padding: 1rem; border-radius: 18px; }
    .signal-route { gap: .2rem; padding: .6rem .35rem; }
    .signal-route div { font-size: .72rem; }
    .signal-route div i { font-size: 1rem; }
    .route-arrow { font-size: .75rem; }
    .pod-artwork { max-width: 350px; }
    .pod-artwork-wrapper { margin-block: .4rem .2rem; }
    .stats-grid { grid-template-columns: minmax(0, 1fr); }
    .personas-grid { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
    .persona-card { padding: 1.15rem; }
    .demo-tabs { flex-direction: column; width: 100%; }
    .demo-tab { justify-content: center; width: 100%; }
    .demo-box { padding: 1rem .85rem; border-radius: 18px; }
    .demo-screen { padding: .85rem .75rem; border-radius: 14px; }
    .call-simulator-bar { font-size: .85rem; }
    .chat-bubble { max-width: 100%; gap: .55rem; }
    .bubble-avatar { width: 34px; height: 34px; font-size: 1rem; }
    .bubble-content { padding: .7rem .9rem; border-radius: 14px; }
    .bubble-content p { font-size: .88rem; }
    .demo-output-card { padding: .75rem .9rem; }
    .output-result { font-size: .84rem; padding: .65rem .85rem; }
    .flow-diagram-container { padding: .85rem; margin-block: 1rem 1.5rem; border-radius: 16px; }
    .step-card { padding: 1.15rem; border-radius: 16px; }
    .feature-box { padding: 1.15rem; border-radius: 16px; }
    .workspace-feature { padding: 1.25rem 1rem; border-radius: 18px; }
    .activity-preview { padding: .9rem; border-radius: 14px; }
    .preview-item-top { grid-template-columns: auto 1fr; }
    .preview-item-top > .badge, .preview-item-top > .badge-success { grid-column: 2; justify-self: start; }
    .preview-item-body { padding-inline-start: 0; font-size: .86rem; }
    .review-card { padding: 1.15rem; border-radius: 16px; }
    .start-banner { padding: 1.4rem 1.1rem; border-radius: 18px; }
    .start-banner .actions { width: 100%; }
    .start-banner .actions .btn { width: 100%; }
    .how-section-outer,
    .contact-section-outer { padding-block: 2.8rem 3.5rem; }
    .contact-card { padding: 1.25rem 1.15rem; border-radius: 18px; }
    .public-footer { flex-direction: column; text-align: center; gap: 1rem; padding-block: 1.2rem; }
    .footer-links-inline { justify-content: center; gap: .7rem 1.2rem; }
    .steps, .workspace-feature, .reviews-grid, .faq-layout, .contact-layout { grid-template-columns: minmax(0, 1fr); }
    .auth-aside { display: none; }
    .auth-layout { grid-template-columns: minmax(0, 1fr); max-width: 32rem; }
    .workspace { padding: 1rem; }
    .portal .item-row { grid-template-columns: auto minmax(0, 1fr); }
    .portal .item-row > :nth-child(3) { grid-column: 2; }
    .portal .item-row > .btn { grid-column: 2; justify-self: start; }
    .call-rows .item-row > .actions { grid-column: 2; }
    .bot-list .item-row { grid-template-columns: auto minmax(0, 1fr); }
    .call-meta { display: flex; flex-wrap: wrap; gap: .5rem; }
    .metrics-three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr)); }
  }

  @media (max-width: 420px) {
    .auth-card, .signal { border-radius: 17px; }
    .demo-box { padding: .85rem .75rem; }
    .pod-artwork { max-width: 290px; }
  }

  @media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
    .hero-copy { animation: enter .55s ease-out both; }
    .signal { animation: enter .65s .08s ease-out both; }
    .signal .wave span { animation: signal-beat 1.15s ease-in-out infinite alternate; }
    .signal .wave span:nth-child(3n + 1) { animation-delay: .13s; }
    .signal .wave span:nth-child(3n + 2) { animation-delay: .24s; }
    .signal .wave span:nth-child(7n + 3) { animation-delay: .34s; }
    .device-card[data-device-state="ready"] .pod-oled-bars i { animation: bar-dance 1.15s ease-in-out infinite alternate; }
    .device-card[data-device-state="ready"] .pod-oled-bars i:nth-child(2) { animation-delay: .18s; }
    .device-card[data-device-state="ready"] .pod-oled-bars i:nth-child(3) { animation-delay: .32s; }
    .device-card[data-device-state="ready"] .pod-oled-bars i:nth-child(4) { animation-delay: .12s; }
    .device-card[data-device-state="ready"] .pod-oled-bars i:nth-child(5) { animation-delay: .26s; }
    .hero-glow-aura { animation: float-slow 7s ease-in-out infinite alternate, glow-pulse 4s ease-in-out infinite alternate; }
    .section-entered { animation: enter .46s ease-out both; }
    .review-card, .steps li, .feature-box, .stat-card, .persona-card { transition: border-color .25s, transform .25s, box-shadow .25s; }
    .faq-item summary i { transition: transform .2s; }
    .faq-item[open] > p { animation: enter .22s ease-out both; }
  }

  @media (prefers-reduced-motion: no-preference) and (hover: hover) {
    .review-card:hover, .steps li:hover, .feature-box:hover, .stat-card:hover, .persona-card:hover {
      transform: translateY(-5px); border-color: var(--accent);
      box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
    }
    .device-card:hover, .bot-card:hover {
      transform: translateY(-3px); 
      box-shadow: 0 18px 40px rgba(0, 0, 0, 0.48);
    }
  }

  @keyframes pulse-dot {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(237, 0, 51, 0.7); }
    50% { transform: scale(1.18); box-shadow: 0 0 0 8px rgba(237, 0, 51, 0); }
  }

  @keyframes pulse-red {
    0%, 100% { box-shadow: 0 0 0 0 rgba(237, 0, 51, 0.55); }
    50% { box-shadow: 0 0 0 9px rgba(237, 0, 51, 0); }
  }

  @keyframes float-slow {
    0% { transform: translateY(0px) scale(1); }
    100% { transform: translateY(-10px) scale(1.03); }
  }

  @keyframes float-pod {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(0.4deg); }
  }

  @keyframes glow-pulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 0.95; transform: scale(1.06); }
  }

  @keyframes radar-ping {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
  }

  @keyframes bar-dance {
    0% { transform: scaleY(0.4); }
    100% { transform: scaleY(1.1); }
  }

  @keyframes eq-bar {
    0% { height: 4px; }
    100% { height: 14px; }
  }

  @keyframes enter {
    from { opacity: .55; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
  }

  @keyframes signal-beat {
    0%, 100% { transform: scaleY(1); }
    40% { transform: scaleY(.53); }
    74% { transform: scaleY(.86); }
  }

  @media (prefers-reduced-motion: reduce) {
    .btn, .icon-btn, .sidebar { transition: none; }
    .copy-tip { transition: opacity .15s ease; transform: none; }
  }

  @media print {
    .label-page { background: #fff; color: #000; }
    .label-page :is(.portal, .workspace) { display: block; width: auto; padding: 0; min-height: 0; }
    .label-page :is(.topbar, .sidebar, .portal-footer, .skip-link, .workspace > :not(.print-label)) { display: none !important; }
    .print-label { width: max-content; max-width: 100%; border: 0; border-radius: 0; break-inside: avoid; }
  }
}
.workspace , .portal-footer{width: 100%;}