    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0
    }

    :root {
      --bg1: #041320;
      --bg2: #052033;
      --bg3: #08324d;
      --accent: #34f2d2;
      --accent2: #0aa88a;
      --accent-soft: rgba(52, 242, 210, .13);
      --glow: 0 0 30px rgba(52, 242, 210, .3);
      --txt: #e9fbf7;
      --txt-dim: #bde0ee;
      --txt-faint: #7da8bc;
      --card: rgba(12, 31, 49, .95);
      --border: rgba(52, 242, 210, .18);
      --border2: rgba(52, 242, 210, .08);
      --r: 14px;
      --shadow: 0 20px 60px rgba(0, 0, 0, .5);
      --red: #E24B4A;
      --red-soft: rgba(226, 75, 74, .1);
      --green: #1D9E75;
      --green-soft: rgba(29, 158, 117, .1);
    }

    html {
      scroll-behavior: smooth
    }

    body {
      background: var(--bg1);
      color: var(--txt);
      font-family: 'Outfit', sans-serif;
      min-height: 100vh;
      line-height: 1.6
    }

    /* ── NAV ── */
    nav {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 1000;
      height: 64px;
      display: flex;
      align-items: center;
      padding: 0 24px;
      background: rgba(4, 19, 32, .92);
      backdrop-filter: blur(20px);
      border-bottom: 1px solid var(--border2)
    }

    .nav-inner {
      max-width: 1200px;
      margin: 0 auto;
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: space-between
    }

    .nav-logo {
      display: flex;
      align-items: center;
      gap: 12px;
      text-decoration: none;
      cursor: pointer
    }

    .nav-logo-mark {
      width: 36px;
      height: 36px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0
    }

    .nav-logo-mark img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      display: block;
      filter: drop-shadow(0 0 14px rgba(52, 242, 210, .25))
    }

    .nav-logo span {
      font-weight: 800;
      font-size: 1.1rem;
      color: #fff
    }

    .nav-back {
      color: var(--txt-faint);
      text-decoration: none;
      font-size: .875rem;
      padding: 12px 18px;
      min-height: 44px;
      display: inline-flex;
      align-items: center;
      border-radius: 8px;
      border: 1px solid var(--border);
      transition: .2s;
      cursor: pointer;
      background: none;
    }

    .nav-back:hover {
      border-color: var(--accent);
      color: var(--accent)
    }

    /* ── PAGE SYSTEM ── */
    .page {
      display: none;
      min-height: 100vh;
      padding-top: 64px
    }

    .page.active {
      display: flex;
      flex-direction: column
    }

    /* ── AUTH PAGES (login + signup) ── */
    .auth-wrap {
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 40px 24px;
      background: radial-gradient(1000px 600px at 50% 30%, rgba(52, 242, 210, .08), transparent), linear-gradient(180deg, var(--bg1), var(--bg2))
    }

    .auth-box {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 18px;
      box-shadow: var(--shadow);
      padding: 40px 36px;
      width: 100%;
      max-width: 440px
    }

    @media(max-width:500px) {
      .auth-box {
        padding: 28px 20px
      }
    }

    .auth-logo {
      text-align: center;
      margin-bottom: 28px
    }

    .auth-logo-mark {
      width: 68px;
      height: 68px;
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0 auto 14px
    }

    .auth-logo-mark img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      display: block;
      filter: drop-shadow(0 0 18px rgba(52, 242, 210, .3))
    }

    .auth-title {
      font-size: 1.6rem;
      font-weight: 800;
      color: #fff;
      text-align: center;
      margin-bottom: 4px
    }

    .auth-sub {
      font-size: .9rem;
      color: var(--txt-faint);
      text-align: center;
      margin-bottom: 28px
    }

    .form-group {
      margin-bottom: 16px
    }

    .form-label {
      display: block;
      font-size: .85rem;
      font-weight: 600;
      color: var(--txt);
      margin-bottom: 6px
    }

    .form-input,
    .form-select,
    .form-textarea {
      width: 100%;
      padding: 11px 14px;
      background: rgba(4, 19, 32, .7);
      border: 1px solid var(--border);
      border-radius: 10px;
      color: var(--txt);
      font-size: .9rem;
      font-family: 'Outfit', sans-serif;
      transition: .2s;
      outline: none
    }

    .form-input:focus,
    .form-select:focus,
    .form-textarea:focus {
      border-color: var(--accent);
      box-shadow: 0 0 0 3px rgba(52, 242, 210, .1)
    }

    .form-input::placeholder,
    .form-textarea::placeholder {
      color: var(--txt-faint)
    }

    .form-select {
      appearance: none;
      cursor: pointer
    }

    .form-select option {
      background: #041320
    }

    .form-textarea {
      resize: vertical;
      min-height: 100px
    }

    .form-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px
    }

    @media(max-width:480px) {
      .form-row {
        grid-template-columns: 1fr
      }
    }

    .btn-main {
      width: 100%;
      padding: 13px;
      background: linear-gradient(90deg, #52f5e0, #34f2d2);
      color: #032420;
      border: none;
      border-radius: 10px;
      font-weight: 800;
      font-size: 1rem;
      cursor: pointer;
      font-family: 'Outfit', sans-serif;
      transition: .2s;
      margin-top: 4px
    }

    .btn-main:hover {
      transform: translateY(-1px);
      box-shadow: 0 0 24px rgba(52, 242, 210, .45)
    }

    .btn-main:disabled {
      opacity: .6;
      cursor: not-allowed;
      transform: none
    }

    .auth-switch {
      text-align: center;
      margin-top: 20px;
      font-size: .875rem;
      color: var(--txt-faint)
    }

    .auth-switch a {
      color: var(--accent);
      text-decoration: none;
      font-weight: 600;
      cursor: pointer
    }

    .auth-switch a:hover {
      text-decoration: underline
    }

    .divider {
      display: flex;
      align-items: center;
      gap: 12px;
      margin: 20px 0;
      color: var(--txt-faint);
      font-size: .8rem
    }

    .divider::before,
    .divider::after {
      content: '';
      flex: 1;
      height: 1px;
      background: var(--border)
    }

    .alert {
      padding: 11px 14px;
      border-radius: 8px;
      font-size: .875rem;
      margin-bottom: 14px;
      display: none
    }

    .alert.error {
      background: var(--red-soft);
      border: 1px solid rgba(226, 75, 74, .3);
      color: #f09595;
      display: block
    }

    .alert.success {
      background: var(--green-soft);
      border: 1px solid rgba(29, 158, 117, .3);
      color: #9FE1CB;
      display: block
    }

    .plan-cards {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 10px;
      margin-bottom: 4px
    }

    @media(max-width:400px) {
      .plan-cards {
        grid-template-columns: 1fr
      }
    }

    .plan-option {
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 12px 10px;
      text-align: center;
      cursor: pointer;
      transition: .2s;
      position: relative
    }

    .plan-option:hover {
      border-color: rgba(52, 242, 210, .4)
    }

    .plan-option.selected {
      border: 1.5px solid var(--accent);
      background: var(--accent-soft)
    }

    .plan-option input {
      position: absolute;
      opacity: 0;
      width: 0
    }

    .plan-name {
      font-size: .85rem;
      font-weight: 700;
      color: #fff;
      margin-bottom: 2px
    }

    .plan-price-sm {
      font-size: .75rem;
      color: var(--accent);
      font-weight: 600
    }

    .plan-desc-sm {
      font-size: .7rem;
      color: var(--txt-faint);
      margin-top: 2px
    }

    /* ── ONBOARDING ── */
    .ob-wrap {
      flex: 1;
      display: flex;
      align-items: flex-start;
      justify-content: center;
      padding: 40px 24px;
      background: radial-gradient(1200px 600px at 50% -10%, rgba(52, 242, 210, .08), transparent), linear-gradient(180deg, var(--bg1), var(--bg2))
    }

    .ob-box {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 18px;
      box-shadow: var(--shadow);
      width: 100%;
      max-width: 700px
    }

    .ob-progress {
      padding: 28px 36px 0
    }

    .ob-steps {
      display: flex;
      gap: 0;
      margin-bottom: 28px
    }

    .ob-step {
      flex: 1;
      position: relative
    }

    .ob-step::after {
      content: '';
      position: absolute;
      top: 14px;
      left: 50%;
      right: -50%;
      height: 2px;
      background: var(--border);
      z-index: 0
    }

    .ob-step:last-child::after {
      display: none
    }

    .ob-step-dot {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      border: 2px solid var(--border);
      background: var(--bg2);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: .7rem;
      font-weight: 700;
      color: var(--txt-faint);
      margin: 0 auto 6px;
      position: relative;
      z-index: 1;
      transition: .3s
    }

    .ob-step.done .ob-step-dot {
      background: var(--accent);
      border-color: var(--accent);
      color: #032420
    }

    .ob-step.active .ob-step-dot {
      border-color: var(--accent);
      color: var(--accent);
      background: var(--accent-soft)
    }

    .ob-step-label {
      text-align: center;
      font-size: max(0.78rem, 12.5px);
      color: var(--txt-faint);
      display: block
    }

    .ob-step.active .ob-step-label {
      color: var(--accent)
    }

    .ob-step.done .ob-step-label {
      color: var(--txt-dim)
    }

    .ob-body {
      padding: 0 36px 36px
    }

    @media(max-width:500px) {
      .ob-progress {
        padding: 20px 16px 0
      }

      .ob-body {
        padding: 0 16px 24px
      }
    }

    .ob-section-title {
      font-size: 1.3rem;
      font-weight: 800;
      color: #fff;
      margin-bottom: 4px
    }

    .ob-section-sub {
      font-size: .875rem;
      color: var(--txt-faint);
      margin-bottom: 24px
    }

    .ob-nav {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-top: 24px;
      padding-top: 20px;
      border-top: 1px solid var(--border2)
    }

    .ob-nav-actions {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
      justify-content: flex-end
    }

    .btn-back-sm {
      padding: 10px 20px;
      background: transparent;
      border: 1px solid var(--border);
      color: var(--txt-dim);
      border-radius: 9px;
      font-family: 'Outfit', sans-serif;
      font-size: .9rem;
      cursor: pointer;
      transition: .2s
    }

    .btn-back-sm:hover {
      border-color: var(--accent);
      color: var(--accent)
    }

    .btn-save-sm {
      padding: 10px 18px;
      background: rgba(255, 255, 255, .03);
      border: 1px solid var(--border);
      color: var(--txt-dim);
      border-radius: 9px;
      font-family: 'Outfit', sans-serif;
      font-size: .9rem;
      cursor: pointer;
      transition: .2s
    }

    .btn-save-sm:hover {
      border-color: var(--accent);
      color: var(--accent)
    }

    .btn-next {
      padding: 10px 24px;
      background: linear-gradient(90deg, #52f5e0, #34f2d2);
      color: #032420;
      border: none;
      border-radius: 9px;
      font-weight: 700;
      font-size: .9rem;
      cursor: pointer;
      font-family: 'Outfit', sans-serif;
      transition: .2s
    }

    .btn-next:hover {
      box-shadow: 0 0 20px rgba(52, 242, 210, .4)
    }

    .btn-next:disabled {
      opacity: .6;
      cursor: not-allowed
    }

    .tag-list {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 8px
    }

    .tag-opt {
      padding: 6px 14px;
      border: 1px solid var(--border);
      border-radius: 999px;
      font-size: .8rem;
      color: var(--txt-dim);
      cursor: pointer;
      transition: .2s;
      user-select: none
    }

    .tag-opt:hover {
      border-color: rgba(52, 242, 210, .4)
    }

    .tag-opt.sel {
      border-color: var(--accent);
      background: var(--accent-soft);
      color: var(--accent)
    }

    .upload-area {
      border: 1.5px dashed var(--border);
      border-radius: 10px;
      padding: 28px;
      text-align: center;
      cursor: pointer;
      transition: .2s;
      margin-top: 8px
    }

    .upload-area:hover {
      border-color: var(--accent);
      background: var(--accent-soft)
    }

    .upload-icon {
      font-size: 2rem;
      margin-bottom: 8px
    }

    .upload-text {
      font-size: .875rem;
      color: var(--txt-dim)
    }

    .upload-sub {
      font-size: .75rem;
      color: var(--txt-faint);
      margin-top: 4px
    }

    .file-list {
      margin-top: 10px;
      display: flex;
      flex-direction: column;
      gap: 6px
    }

    .file-item {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 7px 12px;
      background: rgba(52, 242, 210, .05);
      border: 1px solid rgba(52, 242, 210, .15);
      border-radius: 8px;
      font-size: .8rem;
      color: var(--txt-dim)
    }

    .file-item button {
      margin-left: auto;
      background: none;
      border: none;
      color: var(--red);
      cursor: pointer;
      font-size: 1rem;
      line-height: 1
    }

    .char-count {
      text-align: right;
      font-size: .72rem;
      color: var(--txt-faint);
      margin-top: 3px
    }

    .ob-success {
      text-align: center;
      padding: 40px 20px
    }

    .ob-success-icon {
      font-size: 3rem;
      margin-bottom: 16px
    }

    .ob-success h2 {
      font-size: 1.6rem;
      font-weight: 800;
      color: #fff;
      margin-bottom: 8px
    }

    .ob-success p {
      color: var(--txt-dim);
      margin-bottom: 24px
    }

    /* ── DASHBOARD ── */
    .dash-wrap {
      flex: 1;
      padding: 32px 24px;
      background: linear-gradient(180deg, var(--bg1), var(--bg2));
      max-width: 1200px;
      margin: 0 auto;
      width: 100%
    }

    .dash-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 12px;
      margin-bottom: 28px
    }

    .dash-greeting {
      font-size: 1.4rem;
      font-weight: 800;
      color: #fff
    }

    .dash-sub {
      font-size: .875rem;
      color: var(--txt-faint);
      margin-top: 2px
    }

    .btn-logout {
      padding: 7px 16px;
      background: transparent;
      border: 1px solid var(--border);
      color: var(--txt-faint);
      border-radius: 8px;
      font-family: 'Outfit', sans-serif;
      font-size: .825rem;
      cursor: pointer;
      transition: .2s
    }

    .btn-logout:hover {
      border-color: var(--red);
      color: var(--red)
    }

    .dash-section {
      margin-bottom: 28px
    }

    .dash-section-title {
      font-size: .7rem;
      font-weight: 700;
      color: var(--txt-faint);
      letter-spacing: .1em;
      text-transform: uppercase;
      margin-bottom: 12px
    }

    .metrics-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 12px
    }

    @media(max-width:900px) {
      .metrics-grid {
        grid-template-columns: repeat(2, 1fr)
      }
    }

    @media(max-width:500px) {
      .metrics-grid {
        grid-template-columns: 1fr 1fr
      }
    }

    .metric-card {
      background: var(--card);
      border: 1px solid var(--border2);
      border-radius: 12px;
      padding: 16px
    }

    .metric-card:hover {
      border-color: var(--border)
    }

    .metric-label {
      font-size: .75rem;
      color: var(--txt-faint);
      margin-bottom: 6px
    }

    .metric-value {
      font-size: 1.6rem;
      font-weight: 800;
      color: #fff;
      line-height: 1
    }

    .metric-sub {
      font-size: .72rem;
      color: var(--txt-faint);
      margin-top: 4px
    }

    .metric-value.accent {
      color: var(--accent)
    }

    .metric-value.green {
      color: #1D9E75
    }

    .metric-value.blue {
      color: #378ADD
    }

    .dash-grid-2 {
      display: grid;
      grid-template-columns: 1.4fr 1fr;
      gap: 16px
    }

    @media(max-width:800px) {
      .dash-grid-2 {
        grid-template-columns: 1fr
      }
    }

    .dash-card {
      background: var(--card);
      border: 1px solid var(--border2);
      border-radius: 12px;
      padding: 20px
    }

    .dash-card-title {
      font-size: .875rem;
      font-weight: 700;
      color: #fff;
      margin-bottom: 14px;
      display: flex;
      align-items: center;
      justify-content: space-between
    }

    .usage-bar-wrap {
      margin-bottom: 12px
    }

    .usage-bar-label {
      display: flex;
      justify-content: space-between;
      font-size: .78rem;
      color: var(--txt-dim);
      margin-bottom: 5px
    }

    .usage-bar {
      height: 7px;
      background: rgba(255, 255, 255, .08);
      border-radius: 4px;
      overflow: hidden
    }

    .usage-bar-fill {
      height: 100%;
      border-radius: 4px;
      transition: width .5s
    }

    .usage-bar-sub {
      font-size: .72rem;
      color: var(--txt-dim);
      margin-top: 5px;
      opacity: .75
    }

    .acc-channels-more {
      margin-top: 16px;
      border-top: 1px solid rgba(255,255,255,.06);
      padding-top: 14px;
    }
    .acc-channels-more > summary {
      cursor: pointer;
      color: var(--txt-dim);
      font-size: .85rem;
      list-style: none;
      padding: 6px 0;
      transition: color .15s;
    }
    .acc-channels-more > summary::-webkit-details-marker { display: none; }
    .acc-channels-more > summary:hover { color: #34f2d2; }
    .acc-channels-more[open] > summary { color: #34f2d2; margin-bottom: 8px; }

    /* Phase R8: tooltip helper for the 'Your plan' card and similar.
       Hover to reveal a popover with plan details. */
    .acc-tooltip {
      position: relative;
      display: inline-block;
      margin-left: 6px;
    }
    .acc-tooltip-icon {
      cursor: help;
      color: var(--txt-dim);
      font-size: .82rem;
      opacity: .55;
      transition: opacity .15s;
    }
    .acc-tooltip:hover .acc-tooltip-icon { opacity: 1; color: #34f2d2; }
    .acc-tooltip-content {
      position: absolute;
      bottom: calc(100% + 8px);
      left: 50%;
      transform: translateX(-50%);
      min-width: 220px;
      max-width: 320px;
      padding: 12px 14px;
      background: rgba(4,19,32,0.97);
      border: 1px solid rgba(52,242,210,0.25);
      border-radius: 8px;
      font-size: .78rem;
      font-weight: normal;
      color: var(--txt);
      line-height: 1.5;
      opacity: 0;
      pointer-events: none;
      transition: opacity .18s ease-out;
      z-index: 100;
      white-space: normal;
      box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    }
    .acc-tooltip-content::after {
      content: '';
      position: absolute;
      top: 100%;
      left: 50%;
      transform: translateX(-50%);
      border: 6px solid transparent;
      border-top-color: rgba(4,19,32,0.97);
    }
    .acc-tooltip:hover .acc-tooltip-content {
      opacity: 1;
    }

    .usage-alert-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
      margin-top: 14px
    }

    .quick-links {
      display: flex;
      flex-direction: column;
      gap: 8px
    }

    .quick-link {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 12px;
      background: rgba(52, 242, 210, .04);
      border: 1px solid var(--border2);
      border-radius: 8px;
      text-decoration: none;
      color: var(--txt-dim);
      font-size: .85rem;
      transition: .2s;
      cursor: pointer
    }

    .quick-link:hover {
      border-color: var(--accent);
      color: var(--accent);
      background: var(--accent-soft)
    }

    .quick-link-icon {
      font-size: 1rem;
      flex-shrink: 0
    }

    .status-pill {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      font-size: max(0.78rem, 12.5px);
      font-weight: 600;
      padding: 3px 8px;
      border-radius: 999px
    }

    .status-pill.live {
      background: rgba(29, 158, 117, .15);
      color: #1D9E75
    }

    .status-pill.pending {
      background: rgba(239, 159, 39, .15);
      color: #EF9F27
    }

    .status-pill.failed {
      background: rgba(233, 89, 89, .14);
      color: #E95959
    }

    .status-pill.idle {
      background: rgba(255, 255, 255, .08);
      color: var(--txt-faint)
    }

    .status-pill::before {
      content: '';
      width: 5px;
      height: 5px;
      border-radius: 50%;
      background: currentColor
    }

    .activity-list {
      display: flex;
      flex-direction: column;
      gap: 8px
    }

    .activity-item {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      font-size: .825rem;
      color: var(--txt-dim);
      padding: 8px 0;
      border-bottom: 1px solid var(--border2)
    }

    .activity-item:last-child {
      border-bottom: none
    }

    .activity-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      flex-shrink: 0;
      margin-top: 4px
    }

    .metric-value.red {
      color: #E95959
    }

    .setup-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px
    }

    @media(max-width:640px) {
      .setup-grid {
        grid-template-columns: 1fr
      }
    }

    .setup-item {
      border: 1px solid var(--border2);
      border-radius: 10px;
      padding: 12px;
      background: rgba(255, 255, 255, .02)
    }

    .setup-label {
      font-size: .72rem;
      color: var(--txt-faint);
      text-transform: uppercase;
      letter-spacing: .08em;
      margin-bottom: 6px
    }

    .setup-value {
      font-size: .95rem;
      font-weight: 700;
      color: #fff
    }

    .setup-meta {
      margin-top: 5px;
      font-size: .76rem;
      line-height: 1.45;
      color: var(--txt-dim)
    }

    .dashboard-note {
      margin-top: 14px;
      padding: 12px 14px;
      border-radius: 10px;
      border: 1px solid rgba(52, 242, 210, .14);
      background: rgba(52, 242, 210, .04);
      color: var(--txt-dim);
      font-size: .8rem;
      line-height: 1.5
    }

    .workspace-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
      margin-bottom: 14px
    }

    .workspace-title {
      font-size: 1.15rem;
      font-weight: 700;
      color: #fff
    }

    .workspace-subtitle {
      margin-top: 4px;
      font-size: .82rem;
      color: var(--txt-dim)
    }

    .workspace-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 14px
    }

    .workspace-panel,
    .workspace-meta-card {
      border: 1px solid var(--border2);
      border-radius: 12px;
      padding: 14px;
      background:
        linear-gradient(180deg, rgba(52, 242, 210, .05), rgba(255, 255, 255, .02));
    }

    .workspace-panel-title {
      font-size: .78rem;
      letter-spacing: .08em;
      text-transform: uppercase;
      color: var(--txt-faint);
      margin-bottom: 10px
    }

    .workspace-team-list,
    .workspace-rule-list,
    .workspace-chip-list {
      display: flex;
      flex-direction: column;
      gap: 8px
    }

    .workspace-team-item,
    .workspace-rule-item {
      border: 1px solid rgba(255, 255, 255, .06);
      border-radius: 10px;
      padding: 10px 12px;
      background: rgba(255, 255, 255, .03)
    }

    .workspace-team-head,
    .workspace-rule-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 6px
    }

    .workspace-team-name,
    .workspace-rule-trigger {
      font-size: .92rem;
      font-weight: 700;
      color: #fff
    }

    .workspace-team-desc,
    .workspace-rule-notes {
      font-size: .78rem;
      line-height: 1.45;
      color: var(--txt-dim)
    }

    .workspace-chip {
      display: inline-flex;
      align-items: center;
      padding: 7px 10px;
      border-radius: 999px;
      background: rgba(52, 242, 210, .08);
      border: 1px solid rgba(52, 242, 210, .16);
      color: #D9FFFA;
      font-size: .78rem;
      font-weight: 600;
      width: fit-content;
      max-width: 100%
    }

    .workspace-meta-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 12px;
      margin-top: 14px
    }

    .desk-toolbar,
    .desk-summary {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      flex-wrap: wrap
    }

    .desk-filter-row,
    .desk-action-row {
      display: flex;
      flex-wrap: wrap;
      gap: 8px
    }

    .desk-filter-btn,
    .desk-action-btn {
      border: 1px solid var(--border2);
      border-radius: 999px;
      background: rgba(255, 255, 255, .04);
      color: var(--txt-dim);
      padding: 8px 12px;
      font: inherit;
      font-size: .78rem;
      font-weight: 600;
      cursor: pointer
    }

    .desk-filter-btn.active,
    .desk-action-btn:hover {
      border-color: var(--accent);
      color: var(--accent);
      background: rgba(52, 242, 210, .08)
    }

    .desk-layout {
      display: grid;
      grid-template-columns: minmax(300px, 38%) minmax(0, 1fr);
      gap: 16px;
      margin-top: 14px
    }

    .desk-column {
      border: 1px solid var(--border2);
      border-radius: 12px;
      background: rgba(255, 255, 255, .02);
      min-height: 420px;
      overflow: hidden
    }

    .desk-column-head {
      padding: 14px 16px;
      border-bottom: 1px solid var(--border2);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px
    }

    .desk-queue-list {
      display: flex;
      flex-direction: column;
      max-height: 620px;
      overflow: auto
    }

    .desk-queue-item {
      padding: 14px 16px;
      border-bottom: 1px solid var(--border2);
      cursor: pointer;
      transition: .2s
    }

    .desk-queue-item:hover,
    .desk-queue-item.active {
      background: rgba(52, 242, 210, .06)
    }

    .desk-queue-top,
    .desk-detail-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px
    }

    .desk-contact-name {
      font-size: .92rem;
      font-weight: 700;
      color: #fff
    }

    .desk-queue-preview,
    .desk-muted {
      margin-top: 6px;
      font-size: .78rem;
      color: var(--txt-dim);
      line-height: 1.45
    }

    .desk-detail {
      padding: 16px;
      display: flex;
      flex-direction: column;
      gap: 14px
    }

    .desk-detail-card {
      border: 1px solid var(--border2);
      border-radius: 12px;
      background: rgba(255, 255, 255, .02);
      padding: 14px
    }

    .desk-message-list {
      display: flex;
      flex-direction: column;
      gap: 10px;
      max-height: 260px;
      overflow: auto
    }

    .desk-message {
      border-radius: 12px;
      padding: 10px 12px;
      background: rgba(255, 255, 255, .04);
      border: 1px solid rgba(255, 255, 255, .05)
    }

    .desk-message.private {
      background: rgba(239, 159, 39, .08);
      border-color: rgba(239, 159, 39, .18)
    }

    .desk-message-meta {
      font-size: .72rem;
      color: var(--txt-faint);
      margin-bottom: 6px
    }

    .desk-form-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px
    }

    .desk-form-grid .form-group {
      margin: 0
    }

    .desk-input,
    .desk-select,
    .desk-textarea {
      width: 100%;
      border-radius: 10px;
      border: 1px solid var(--border2);
      background: rgba(255, 255, 255, .04);
      color: #fff;
      font: inherit;
      padding: 11px 12px
    }

    .desk-textarea {
      min-height: 96px;
      resize: vertical
    }

    .desk-chip-row {
      display: flex;
      flex-wrap: wrap;
      gap: 8px
    }

    @media(max-width:980px) {
      .desk-layout,
      .desk-form-grid {
        grid-template-columns: 1fr
      }
    }

    @media(max-width:900px) {
      .workspace-grid,
      .workspace-meta-grid {
        grid-template-columns: 1fr
      }
    }

    .plan-banner {
      background: rgba(52, 242, 210, .06);
      border: 1px solid rgba(52, 242, 210, .2);
      border-radius: 12px;
      padding: 16px 20px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 12px;
      margin-bottom: 20px
    }

    .plan-banner-info {
      font-size: .85rem;
      color: var(--txt-dim)
    }

    .plan-banner-name {
      font-size: 1rem;
      font-weight: 700;
      color: var(--accent);
      margin-bottom: 2px
    }

    .btn-upgrade {
      padding: 7px 16px;
      background: var(--accent);
      color: #032420;
      border: none;
      border-radius: 8px;
      font-weight: 700;
      font-size: .825rem;
      cursor: pointer;
      font-family: 'Outfit', sans-serif;
      transition: .2s
    }

    .btn-upgrade:hover {
      box-shadow: var(--glow)
    }

    .onboarding-banner {
      background: rgba(239, 159, 39, .08);
      border: 1px solid rgba(239, 159, 39, .25);
      border-radius: 12px;
      padding: 14px 18px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 10px;
      margin-bottom: 20px
    }

    .ob-banner-text {
      font-size: .875rem;
      color: #EF9F27
    }

    .btn-complete-ob {
      padding: 7px 14px;
      background: rgba(239, 159, 39, .2);
      color: #EF9F27;
      border: 1px solid rgba(239, 159, 39, .4);
      border-radius: 7px;
      font-size: .8rem;
      font-weight: 600;
      cursor: pointer;
      font-family: 'Outfit', sans-serif;
      transition: .2s
    }

    .btn-complete-ob:hover {
      background: rgba(239, 159, 39, .3)
    }

    /* ── LOADING ── */
    .loading-screen {
      position: fixed;
      inset: 0;
      background: var(--bg1);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 9999;
      flex-direction: column;
      gap: 14px
    }

    .loading-spinner {
      width: 36px;
      height: 36px;
      border: 3px solid var(--border);
      border-top-color: var(--accent);
      border-radius: 50%;
      animation: spin .7s linear infinite
    }

    @keyframes spin {
      to {
        transform: rotate(360deg)
      }
    }

    .loading-screen.hidden {
      display: none
    }

    /* ── TOAST ── */
    .toast {
      position: fixed;
      bottom: 24px;
      left: 50%;
      transform: translateX(-50%) translateY(20px);
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 12px 20px;
      font-size: .875rem;
      color: var(--txt);
      box-shadow: var(--shadow);
      z-index: 9998;
      opacity: 0;
      transition: .3s;
      white-space: nowrap
    }

    .toast.show {
      opacity: 1;
      transform: translateX(-50%) translateY(0)
    }

    .toast.success {
      border-color: rgba(29, 158, 117, .4);
      color: #9FE1CB
    }

    .toast.error {
      border-color: rgba(226, 75, 74, .4);
      color: #f09595
    }

    /* ── INACTIVITY WARNING MODAL ── */
    .inactivity-overlay {
      position: fixed;
      inset: 0;
      background: rgba(4, 19, 32, .85);
      backdrop-filter: blur(8px);
      z-index: 10000;
      display: none;
      align-items: center;
      justify-content: center;
      animation: fadeIn .3s ease
    }

    .inactivity-overlay.show {
      display: flex
    }

    @keyframes fadeIn {
      from { opacity: 0 }
      to { opacity: 1 }
    }

    .inactivity-box {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 18px;
      box-shadow: var(--shadow), 0 0 60px rgba(226, 75, 74, .15);
      padding: 36px 32px;
      max-width: 400px;
      width: 90%;
      text-align: center;
      animation: modalPop .3s ease
    }

    @keyframes modalPop {
      from { transform: scale(.92); opacity: 0 }
      to { transform: scale(1); opacity: 1 }
    }

    .inactivity-icon {
      font-size: 2.5rem;
      margin-bottom: 14px
    }

    .inactivity-title {
      font-size: 1.3rem;
      font-weight: 800;
      color: #fff;
      margin-bottom: 6px
    }

    .inactivity-msg {
      font-size: .9rem;
      color: var(--txt-dim);
      margin-bottom: 20px;
      line-height: 1.6
    }

    .inactivity-countdown {
      font-size: 2.2rem;
      font-weight: 800;
      color: var(--red);
      margin-bottom: 20px;
      font-variant-numeric: tabular-nums
    }

    .inactivity-bar {
      height: 4px;
      background: rgba(255, 255, 255, .08);
      border-radius: 2px;
      margin-bottom: 22px;
      overflow: hidden
    }

    .inactivity-bar-fill {
      height: 100%;
      background: linear-gradient(90deg, var(--red), #f59595);
      border-radius: 2px;
      transition: width 1s linear
    }

    .inactivity-btns {
      display: flex;
      gap: 10px
    }

    .btn-stay {
      flex: 1;
      padding: 12px;
      background: linear-gradient(90deg, #52f5e0, #34f2d2);
      color: #032420;
      border: none;
      border-radius: 10px;
      font-weight: 700;
      font-size: .9rem;
      cursor: pointer;
      font-family: 'Outfit', sans-serif;
      transition: .2s
    }

    .btn-stay:hover {
      box-shadow: 0 0 24px rgba(52, 242, 210, .45)
    }

    .btn-logout-now {
      padding: 12px 18px;
      background: transparent;
      border: 1px solid var(--border);
      color: var(--txt-faint);
      border-radius: 10px;
      font-size: .9rem;
      cursor: pointer;
      font-family: 'Outfit', sans-serif;
      transition: .2s
    }

    .btn-logout-now:hover {
      border-color: var(--red);
      color: var(--red)
    }
    /* ── TURNSTILE WIDGET CONTAINER ── */
    .turnstile-wrap {
      margin: 14px 0;
      display: flex;
      justify-content: center;
      min-height: 65px;
    }

/* Portal inline-style cleanup */
.acc-loading-mark-wrap{width:56px;height:56px;display:flex;align-items:center;justify-content:center;margin-bottom:4px}
.acc-loading-mark-img{width:100%;height:100%;object-fit:contain;display:block;filter:drop-shadow(0 0 20px rgba(52,242,210,.32))}
.acc-text-faint-sm{font-size:.8rem;color:var(--txt-faint)}
.acc-w-full{width:100%}
.acc-mt-14{margin-top:14px}
.acc-note-copy{margin-top:10px;font-size:.78rem;color:var(--txt-faint);line-height:1.55}
.acc-legal-copy{margin-top:12px;font-size:.72rem;color:var(--txt-faint);text-align:center}
.acc-link-accent{color:var(--accent)}
.acc-mt-16{margin-top:16px}
.acc-text-center{text-align:center}
.acc-emoji-xl{font-size:3rem;margin-bottom:16px}
.acc-mb-24{margin-bottom:24px}
.acc-help-copy{font-size:.825rem;color:var(--txt-faint);margin-bottom:16px}
.acc-mt-20{margin-top:20px}
.acc-btn-center-sm{max-width:240px;margin:0 auto}
.acc-w-zero{width:0%}
.acc-mb-28{margin-bottom:28px}
.acc-progress-0{width:0%}
.acc-progress-5{width:5%}
.acc-progress-10{width:10%}
.acc-progress-15{width:15%}
.acc-progress-20{width:20%}
.acc-progress-25{width:25%}
.acc-progress-30{width:30%}
.acc-progress-35{width:35%}
.acc-progress-40{width:40%}
.acc-progress-45{width:45%}
.acc-progress-50{width:50%}
.acc-progress-55{width:55%}
.acc-progress-60{width:60%}
.acc-progress-65{width:65%}
.acc-progress-70{width:70%}
.acc-progress-75{width:75%}
.acc-progress-80{width:80%}
.acc-progress-85{width:85%}
.acc-progress-90{width:90%}
.acc-progress-95{width:95%}
.acc-progress-100{width:100%}
.acc-dashboard-shell{max-width:1200px;margin:0 auto;width:100%;padding:32px 24px}
.acc-inline-actions{display:flex;gap:10px;align-items:center}
.acc-display-none{display:none}
.acc-display-flex{display:flex}
.acc-banner-kicker{font-weight:600;color:#EF9F27;margin-bottom:2px}
.acc-text-sm{font-size:.8rem}
.acc-bg-accent{background:#34F2D2}
.acc-bg-blue{background:#378ADD}
.acc-bg-mint{background:linear-gradient(90deg, #34F2D2 0%, #5fb8a3 100%)}
.acc-bg-warning{background:#EF9F27}
.acc-bg-live{background:#1D9E75}
.acc-bg-failed{background:#E95959}
.acc-metrics-grid-3{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.acc-mt-12{margin-top:12px}
.acc-mt-8{margin-top:8px}
.acc-row-between{display:flex;justify-content:space-between;gap:12px;align-items:center}
.acc-wrap-actions-top{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:14px}
.acc-wrap-between-top{display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between;margin-top:12px}
.acc-mini-help{font-size:.78rem;color:var(--txt-faint);line-height:1.6}
.acc-grid-gap-10{display:grid;gap:10px}
.acc-option-card{display:flex;align-items:flex-start;gap:10px;padding:12px 14px;border:1px solid rgba(52,242,210,.16);border-radius:12px;background:rgba(255,255,255,.02);cursor:pointer}
.acc-checkbox-offset{margin-top:3px}
.acc-display-block{display:block}
.acc-subtle-copy{font-size:.82rem;color:var(--txt-faint)}
.acc-textarea-sm{min-height:84px}
.acc-wrap-between{display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between}
.acc-mb-4{margin-bottom:4px}
.acc-text-main{color:var(--txt)}
.acc-bg-text{background:var(--txt)}
.acc-mt-10{margin-top:10px}
.acc-inline-check{display:flex;align-items:center;gap:8px;margin-top:10px}
.acc-help-copy-inline{font-size:.825rem;color:var(--txt-faint)}
.acc-language-help{margin-top:6px;font-size:12px;line-height:1.5;color:rgba(230,238,246,0.72)}
.acc-textarea-faq{min-height:130px}
.acc-textarea-products{min-height:100px}
.acc-textarea-md{min-height:110px}
.acc-textarea-lg{min-height:140px}
.acc-textarea-sm2{min-height:90px}
.acc-step-meta{font-size:.8rem;color:var(--txt-faint);margin-right:6px}
.acc-btn-next-lg{padding:12px 32px;font-size:1rem}
.acc-link-inline-view{margin-left:8px;color:var(--accent);text-decoration:none}
.acc-file-size{font-size:.7rem;color:var(--txt-faint);margin-left:4px}
.acc-invisible-disabled{opacity:0;pointer-events:none}


/* ============================================================== */
/* Phase R5 — mobile / responsive accessibility floors.            */
/* ============================================================== */
.btn-main,
.btn-outline,
.btn,
.plan-cta,
button[type="submit"],
input[type="submit"],
input[type="button"],
.metric-card button,
.dash-card button,
.activity-item button {
  min-height: 44px;
}

@media (max-width: 768px) {
  body, p, li, td, th { font-size: max(1em, 14px); }
  .acc-tooltip-content { max-width: calc(100vw - 64px); left: 8px; transform: none; }
  .acc-tooltip-content::after { left: 24px; }
}


/* ============================================================== */
/* Phase R-onboard-v2: Widget Install + Manage KB cards.            */
/* ============================================================== */

.widget-snippet-wrap {
  display: flex;
  gap: 12px;
  align-items: stretch;
  flex-wrap: wrap;
}
.widget-snippet {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(52, 242, 210, 0.18);
  border-radius: 8px;
  color: #cbd5e1;
  font-family: 'DM Mono', 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre;
  -webkit-text-size-adjust: 100%;
}
.widget-snippet code {
  color: #e2e8f0;
  background: transparent;
  padding: 0;
  font-family: inherit;
}

.kb-upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 28px 20px;
  border: 2px dashed rgba(52, 242, 210, 0.25);
  border-radius: 12px;
  background: rgba(52, 242, 210, 0.03);
  cursor: pointer;
  transition: 0.18s ease-out;
  text-align: center;
  margin-bottom: 16px;
}
.kb-upload-zone:hover,
.kb-upload-zone.acc-drag-active {
  border-color: rgba(52, 242, 210, 0.6);
  background: rgba(52, 242, 210, 0.07);
}
.kb-upload-icon {
  font-size: 2rem;
  margin-bottom: 4px;
}
.kb-upload-title {
  color: var(--txt);
  font-weight: 600;
  font-size: 0.95rem;
}
.kb-upload-hint {
  color: var(--txt-faint);
  font-size: 0.82rem;
}

.kb-doc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.kb-doc-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  transition: border-color 0.15s;
}
.kb-doc-row:hover {
  border-color: rgba(52, 242, 210, 0.25);
}
.kb-doc-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  width: 32px;
  text-align: center;
}
.kb-doc-info {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.kb-doc-name {
  color: var(--txt);
  font-weight: 600;
  font-size: 0.92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kb-doc-meta {
  color: var(--txt-faint);
  font-size: 0.78rem;
}
.kb-doc-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.kb-doc-action {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--txt-dim);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: 0.15s;
  min-height: 32px;
}
.kb-doc-action:hover {
  border-color: rgba(52, 242, 210, 0.4);
  color: #34f2d2;
}
.kb-doc-action.danger:hover {
  border-color: rgba(239, 68, 68, 0.5);
  color: #f87171;
}
.kb-doc-empty {
  padding: 24px;
  color: var(--txt-faint);
  font-size: 0.88rem;
  text-align: center;
}

.acc-row-flex { display: flex; }
.acc-gap-12 { gap: 12px; }
.acc-mb-12 { margin-bottom: 12px; }

@media (max-width: 600px) {
  .widget-snippet-wrap { flex-direction: column; }
  .widget-snippet-wrap button { width: 100%; }
  .kb-doc-row { flex-wrap: wrap; }
  .kb-doc-actions { width: 100%; justify-content: flex-end; margin-top: 4px; }
}


/* ============================================================== */
/* Phase R-onboard-v3: Manage team form                             */
/* ============================================================== */

.acc-team-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
}

.acc-flex-end {
  display: flex;
  align-items: flex-end;
}

.acc-form-hint {
  color: var(--txt-faint);
  font-size: 0.78rem;
  margin-top: 4px;
}

.acc-info-box {
  background: rgba(52, 242, 210, 0.08);
  border: 1px solid rgba(52, 242, 210, 0.3);
  border-radius: 10px;
  padding: 16px;
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--txt);
  line-height: 1.55;
}
.acc-info-box a {
  color: #34f2d2;
  text-decoration: underline;
}
.acc-temp-pw {
  font-family: 'DM Mono', monospace;
  font-size: 1rem;
  font-weight: 700;
  color: #34f2d2;
  background: rgba(0, 0, 0, 0.4);
  padding: 10px 14px;
  border-radius: 6px;
  margin: 10px 0;
  letter-spacing: 0.05em;
  user-select: all;
}
