@font-face {
  font-family: 'Unbounded';
  src: url('fonts/unbounded-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}


  :root { color-scheme: dark; --bg:#0f1115; --card:#171a21; --line:#252a34; --txt:#e6e9ef; --dim:#8b93a3;
          --ok:#3ecf8e; --warn:#f0b429; --err:#f0616d; --acc:#ff6e14; --sheet:#0f1115; }
  * { box-sizing:border-box; }
  html, body { height:100%; }
  html { -webkit-text-size-adjust:100%; }
  body { margin:0; overflow:hidden; background:var(--bg); color:var(--txt); font:14px/1.45 -apple-system,Segoe UI,Roboto,sans-serif; }
  /* ── тема «свечение»: мягкий тёмно-серый свет сверху, очень плавный ── */
  body[data-theme="graphite"] {
    --bg:#0a0b0d; --sheet:transparent; --card:#191c21; --line:#2f333b;
    background:
      radial-gradient(1500px 1000px at 50% -16%, rgba(172,178,190,.60) 0%, rgba(150,156,168,.34) 24%,
                      rgba(122,128,140,.16) 46%, rgba(92,98,108,.05) 66%, rgba(70,75,84,0) 82%),
      linear-gradient(180deg, #3a3e46 0%, #33373e 8%, #2b2f36 18%, #24272d 30%,
                      #1d2025 42%, #17191e 54%, #121417 66%, #0d0e11 78%, #0a0b0d 90%, #090a0b 100%);
    background-attachment:fixed, fixed;
  }
  body[data-theme="graphite"] .content {
    background:transparent;
    border-color:rgba(255,255,255,.09);
    box-shadow:0 24px 70px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.045);
  }
  body[data-theme="graphite"] .auth-wrap {
    background:radial-gradient(1100px 620px at 50% -20%, #4a4f58 0%, #0b0c0e 68%);
  }
  .theme-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:10px; }
  .theme-opt { display:flex; flex-direction:column; align-items:flex-start; gap:4px; padding:10px;
               background:#12141a; border:1px solid var(--line); border-radius:12px; cursor:pointer;
               color:inherit; font:inherit; text-align:left; }
  .theme-opt:hover { border-color:rgba(255,255,255,.25); }
  .theme-opt.on { border-color:rgba(255,255,255,.5); background:rgba(255,255,255,.05); }
  .theme-prev { display:block; width:100%; height:52px; border-radius:8px; border:1px solid rgba(255,255,255,.08); }
  .theme-prev-dark { background:#0f1115; }
  .theme-prev-neon { background:
      linear-gradient(90deg, transparent 0 18%, rgba(255,140,40,.75) 18.5% 19.5%, transparent 20% 48%,
                      rgba(255,140,40,.75) 48.5% 49.5%, transparent 50% 80%, rgba(255,140,40,.55) 80.5% 81.5%, transparent 82%),
      radial-gradient(70% 120% at 18% 50%, rgba(255,140,40,.22), transparent 55%),
      radial-gradient(70% 120% at 50% 50%, rgba(255,140,40,.16), transparent 55%),
      #0d1014;
      box-shadow:inset 0 0 0 1px rgba(255,150,70,.25), 0 0 16px rgba(255,140,40,.18); }

  .theme-prev-splash { background:
      radial-gradient(60% 90% at 18% 30%, rgba(255,120,20,.65), transparent 62%),
      radial-gradient(55% 85% at 78% 72%, rgba(70,130,255,.55), transparent 65%),
      radial-gradient(45% 60% at 52% 45%, rgba(255,40,120,.30), transparent 70%),
      #08090c; }
  .theme-prev-graphite { background:
      radial-gradient(150% 110% at 50% -35%, rgba(150,156,168,.92) 0%, rgba(110,116,128,.35) 42%,
                      rgba(40,43,49,0) 82%),
      linear-gradient(180deg, #16181c 0%, #0b0c0e 65%, #090a0b 100%); }
  .theme-name { font-weight:600; font-size:13px; }
  /* плашка «просмотр чужого аккаунта» */
  #view-banner { position:fixed; top:10px; left:50%; transform:translateX(-50%); z-index:9999;
    display:flex; align-items:center; gap:10px; padding:6px 8px 6px 14px; border-radius:999px;
    background:rgba(36,30,21,.96); border:1px solid rgba(240,180,41,.5); color:#f3e6c8;
    font-size:12px; white-space:nowrap; box-shadow:0 10px 30px rgba(0,0,0,.5); }
  #view-banner button { padding:4px 10px; border-radius:999px; font-size:12px; }
  .view-frame-card { width:min(96vw, 1560px); height:92vh; background:#0f1115; border:1px solid var(--line);
    border-radius:14px; display:flex; flex-direction:column; overflow:hidden; box-shadow:0 30px 80px rgba(0,0,0,.6); }
  .view-frame-head { display:flex; align-items:center; justify-content:space-between; gap:12px;
    padding:8px 12px; border-bottom:1px solid var(--line); font-size:12px; }
  #view-frame-iframe { flex:1; width:100%; border:0; background:#0f1115; display:block; }
  /* тонкая полоска-рамка вокруг всего приложения */
  body::after { content:''; position:fixed; inset:6px 0 6px 6px; border:1px solid rgba(255,255,255,.13);
                border-right:0; border-top-right-radius:0; border-bottom-right-radius:0;
                pointer-events:none; z-index:9000; }
  .layout { display:grid; grid-template-columns:224px 1fr; height:100vh; overflow:hidden;
            transition:grid-template-columns .38s ease; }
  .layout.sb-collapsed { grid-template-columns:54px 1fr; }
    /* контент — единый «лист» со скруглением слева, сайдбар уходит за него */
  #s-accounts:not(.hidden), #s-goods:not(.hidden), #s-publish:not(.hidden), #s-messages:not(.hidden),
  #s-mail:not(.hidden), #s-settings:not(.hidden), #s-admin:not(.hidden), #s-general:not(.hidden),
  #s-ref:not(.hidden), #s-shop:not(.hidden) { animation: secIn .16s ease both; }
  [data-pane]:not(.hidden) { animation: paneIn .14s ease both; }
  @keyframes secIn { from { opacity:.55; transform:translateY(3px); } to { opacity:1; transform:none; } }
  @keyframes paneIn { from { opacity:.5; } to { opacity:1; } }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration:.01ms !important; transition-duration:.01ms !important; }
  }
  .content { padding:14px 20px 14px; min-width:0; height:calc(100vh - 24px); margin:12px 0 12px 10px;
             overflow:hidden; display:flex; flex-direction:column; background:var(--sheet);
             border:1px solid rgba(255,255,255,.08); border-right:0; border-radius:28px 0 0 28px;
             box-shadow:0 20px 60px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.03); }
  #s-accounts, #s-goods, #s-publish, #s-settings { flex:1; min-height:0; overflow-y:auto; padding-right:6px; }
  .side { background:transparent; padding:18px 14px 12px; margin:0; height:100vh;
          border:0; border-radius:0; overflow:visible; display:flex; flex-direction:column; position:relative;
          font-family:'Outfit',-apple-system,Segoe UI,Roboto,sans-serif; transition:padding .38s ease; }
  .side.collapsed { padding:18px 6px 12px; }
  .sb-nav { flex:1 1 auto; min-height:0; overflow-y:auto; overflow-x:hidden; scrollbar-width:none; }
  .sb-nav::-webkit-scrollbar { width:0; }
  .sb-section-label { font-size:9px; font-weight:500; letter-spacing:1.4px; text-transform:uppercase;
          color:rgba(255,255,255,.4); padding:0 8px; margin:16px 0 2px; white-space:nowrap; overflow:hidden;
          transition:opacity .2s ease, max-height .38s ease; max-height:24px; }
  .sb-section:first-child .sb-section-label { margin-top:0; }
  .side.collapsed .sb-section-label { opacity:0; max-height:0; margin:0; }
  .sb-item { display:flex; align-items:center; gap:9px; padding:8px; margin:0; min-height:0; width:100%;
          border:0; border-radius:9px; background:none; color:#fff; cursor:pointer; position:relative;
          user-select:none; text-align:left; font:inherit; transition:background .15s ease; }
  .sb-item:hover { background:rgba(255,255,255,.07); }
  .sb-item.active { background:rgba(255,255,255,.10); box-shadow:0 0 24px rgba(255,255,255,.07); }
  .sb-icon { width:15px; height:15px; display:flex; align-items:center; justify-content:center; flex-shrink:0;
          transition:transform .2s cubic-bezier(.34,1.4,.64,1), filter .2s ease; }
  .sb-icon svg { width:15px; height:15px; display:block; }
  .sb-item.active .sb-icon { filter:drop-shadow(0 0 4px rgba(255,255,255,.75)); }
  .sb-text { font-size:13px; font-weight:400; color:#fff; flex:1; white-space:nowrap; overflow:hidden;
          transition:opacity .22s ease; }
  .sb-item.active .sb-text { font-weight:500; }
  .sb-badge { font-size:10px; font-weight:500; color:#fff; background:rgba(255,255,255,.12);
          border:1px solid rgba(255,255,255,.18); border-radius:5px; padding:1px 6px; white-space:nowrap; flex-shrink:0; }
  .sb-item.active .sb-badge { background:rgba(255,255,255,.2); border-color:rgba(255,255,255,.28); }
  .sb-divider { height:1px; background:rgba(255,255,255,.06); margin:5px 8px; }
  .side.collapsed .sb-divider { margin:4px; }
  .side.collapsed .sb-item { padding:8px 0; justify-content:center; gap:0; }
  .side.collapsed .sb-item:hover { background:rgba(255,255,255,.06); }
  .side.collapsed .sb-text, .side.collapsed .sb-badge { opacity:0; width:0; flex:0; min-width:0; padding:0; border:0; overflow:hidden; }
  .sb-collab { flex:0 0 auto; margin:8px 0 2px; padding:12px 8px 10px;
               border-top:1px solid rgba(255,255,255,.05); }
  .sb-collab-line { font-size:7.5px; font-weight:400; letter-spacing:.22em; text-transform:uppercase;
                    color:rgba(255,255,255,.26); line-height:1; white-space:nowrap; }
  .sb-collab-brand { font-family:'Unbounded','Outfit',sans-serif; font-weight:600; font-size:12px;
                     letter-spacing:.03em; text-transform:uppercase; margin-top:6px; line-height:1.1;
                     background:linear-gradient(90deg,#ff7a18 0%,#ffd0a3 48%,#ff7a18 100%);
                     -webkit-background-clip:text; background-clip:text; color:transparent;
                     white-space:nowrap; }
  .sb-collab-mark { width:16px; height:16px; margin-right:6px; display:inline-block;
                    vertical-align:-3px; border-radius:50%;
                    box-shadow:0 0 0 1px rgba(255,255,255,.14), 0 0 12px rgba(255,255,255,.12); }
  .sb-collab-mini { display:none; }
  .sb-collab-mini-mark { width:20px; height:20px; display:block; border-radius:50%;
                         box-shadow:0 0 0 1px rgba(255,255,255,.14), 0 0 12px rgba(255,255,255,.12); }
  .sb-collab-mini-text { font-family:'Unbounded','Outfit',sans-serif; font-weight:600; font-size:10px;
                         letter-spacing:0; text-transform:uppercase; color:#ffb066;
                         width:1.25ch; word-break:break-all; text-align:center;
                         line-height:1.28; }
  .side.collapsed .sb-collab { opacity:1; height:auto; padding:10px 0 8px; margin:6px 0 2px;
                               border-top:1px solid rgba(255,255,255,.05); overflow:visible; }
  .side.collapsed .sb-collab-full { display:none; }
  .side.collapsed .sb-collab-mini { display:flex; flex-direction:column; align-items:center; gap:7px; }
  .sb-profile-wrap { margin-top:12px; padding-top:10px; border-top:1px solid rgba(255,255,255,.07); flex:0 0 auto; }
  .sb-profile { display:flex; align-items:center; gap:9px; padding:8px; border-radius:12px; cursor:pointer;
          transition:background .18s ease; }
  .sb-profile:hover { background:rgba(255,255,255,.07); }
  .sb-profile.on { background:transparent; box-shadow:none; }
  .sb-avatar { width:34px; height:34px; border-radius:50%; flex-shrink:0; overflow:hidden;
          background:rgba(255,255,255,.10); border:0; padding:0; margin:0; display:flex;
          align-items:center; justify-content:center; line-height:1;
          font-size:11px; font-weight:600; color:#fff;
          transition:transform .2s cubic-bezier(.34,1.4,.64,1); }
  .sb-profile:hover .sb-avatar { transform:scale(1.06); }
  .sb-avatar img { width:100%; height:100%; object-fit:cover; display:block; border:0; border-radius:50%; }
  .sb-profile-info { flex:1; overflow:hidden; transition:opacity .22s ease; }
  .sb-profile-name { font-size:12px; font-weight:500; color:rgba(255,255,255,.9); white-space:nowrap; line-height:1.3; }
  .sb-profile-balance { font-size:10px; color:rgba(255,255,255,.45); display:flex; align-items:center; gap:4px; margin-top:1px; }
  .sb-balance-dot { width:5px; height:5px; border-radius:50%; background:#4ade80;
          box-shadow:0 0 5px rgba(74,222,128,.7); flex-shrink:0; }
  .sb-deposit-btn { background:rgba(74,222,128,.15); border:1px solid rgba(74,222,128,.3); border-radius:4px;
          color:rgba(74,222,128,.9); font-size:9px; line-height:1.2; padding:1px 6px; margin-left:4px;
          cursor:pointer; font-family:inherit; min-height:0; }
  .sb-logout { display:flex; align-items:center; gap:7px; padding:7px 8px; margin-top:6px; min-height:0;
          border:0; border-radius:8px; background:none; width:100%; cursor:pointer; font-family:inherit;
          font-size:11px; color:rgba(255,255,255,.3); transition:background .15s, color .15s; }
  .sb-logout:hover { background:rgba(255,255,255,.06); color:rgba(255,255,255,.5); }
  .side.collapsed .sb-profile { justify-content:center; padding:8px 0; gap:0; width:100%; }
  .side.collapsed .sb-profile-wrap { width:100%; }
  .side.collapsed .sb-avatar { width:40px; height:40px; margin-left:auto; margin-right:auto; }
  .side.collapsed .sb-profile-info { display:none; opacity:0; width:0; flex:0; min-width:0; }
  .side.collapsed .sb-logout span { opacity:0; width:0; overflow:hidden; }
  .sb-head { display:flex; justify-content:flex-end; padding:0 2px 4px; flex:0 0 auto; }
  .side.collapsed .sb-head { justify-content:center; }
  .sb-collapse { width:26px; height:24px; padding:0; min-height:0; display:flex; align-items:center; justify-content:center;
          background:transparent; border:0; border-radius:7px; color:rgba(255,255,255,.32); cursor:pointer;
          transition:background .18s ease, color .18s ease; }
  .sb-collapse:hover { background:rgba(255,255,255,.07); color:#fff; }
  .sb-collapse svg { width:9px; height:14px; transition:transform .38s ease; }
  .side.collapsed .sb-collapse svg { transform:rotate(180deg); }
  .side h1 { font-size:15px; margin:0 0 4px; }
  .side .hint { color:var(--dim); font-size:11.5px; display:block; margin-bottom:14px; white-space:pre-line; }
  .nav button { display:block; width:100%; text-align:left; margin-bottom:6px; }
  .nav button.active { background:var(--acc); border-color:var(--acc); color:#141414; font-weight:600; }
  /* под-вкладки внутри «Кабинета» и «Настроек» */
  .subnav { display:flex; gap:8px; flex-wrap:wrap; margin:0 0 14px; }
  .subnav button { background:transparent; border:1px solid var(--line); color:rgba(255,255,255,.72);
                   border-radius:9px; padding:7px 13px; font-size:12.5px; cursor:pointer; }
  .subnav button:hover { border-color:rgba(255,255,255,.28); color:#fff; }
  .subnav button.on { background:var(--acc); border-color:var(--acc); color:#141414; font-weight:600; }
  .card { background:var(--card); border:1px solid rgba(255,255,255,.06); border-radius:12px; padding:15px 16px; margin-bottom:16px; }
  .card h2 { margin:0 0 10px; font-size:15px; display:flex; gap:9px; align-items:center; flex-wrap:wrap; }
  .grid2 { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
  @media (max-width:1000px){ body::after { display:none; } .grid2 { grid-template-columns:1fr; } .layout { grid-template-columns:1fr; height:auto; }
    .side { height:auto; margin:12px; } .content { height:auto; margin:0; border:0; border-radius:0; box-shadow:none; } }
  .badge { font-size:11px; padding:2px 8px; border-radius:99px; border:1px solid var(--line); color:var(--dim); }
  .badge.test { color:var(--acc); border-color:#5a3113; }
  .badge.on { color:var(--ok); border-color:#1d5a41; }
  .badge.off { color:var(--err); border-color:#5a1d24; }
  .tag { display:inline-block; font-size:10.5px; padding:2px 7px; border-radius:7px; margin:0 4px 4px 0;
         border:1px solid #3a4252; color:#c9d2de; background:#1b2029; cursor:pointer; line-height:1.35; }
  .tag.on { border-color:#5a3113; color:var(--acc); background:rgba(255,109,0,.10); }
  .tag .x { opacity:.6; margin-left:3px; }
  .tag .x:hover { opacity:1; }
  .modal-overlay { position:fixed; inset:0; background:rgba(8,10,14,.82); display:flex; align-items:center;
                   justify-content:center; z-index:9998; padding:20px; }
  .modal-overlay .card { width:100%; max-width:460px; max-height:88vh; overflow-y:auto; margin:0; }
  .modal-overlay .card h2 { margin-top:0; }
  .nv-scope { margin-top:10px; padding-top:8px; border-top:1px solid var(--line); }
  .nv-scope:first-of-type { border-top:0; padding-top:0; }
  .nv-title { font-size:12px; color:var(--dim); text-transform:uppercase; letter-spacing:.03em; margin-bottom:6px; }
  .nv-row { display:flex; align-items:center; gap:12px; padding:4px 0; font-size:12.5px; }
  .nv-label { flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; }
  .nv-opt { display:inline-flex; align-items:center; gap:5px; color:var(--dim); font-size:12px; white-space:nowrap; }
  .nv-opt input { width:auto; margin:0; }
  .tags-wrap { position:relative; display:inline-block; }
  .tags-menu { position:absolute; right:0; top:calc(100% + 6px); z-index:40; width:272px; max-height:70vh;
               overflow-y:auto; background:var(--card); border:1px solid var(--line); border-radius:12px;
               padding:10px 10px 12px; box-shadow:0 16px 40px rgba(0,0,0,.55); }
  .tags-menu .tags-title { color:var(--dim); font-size:11px; letter-spacing:.03em; text-transform:uppercase;
                           padding:2px 4px 8px; }
  .tags-item { display:flex; align-items:center; gap:9px; padding:5px 6px; border-radius:7px;
               font-size:12.5px; cursor:pointer; line-height:1.3; }
  .tags-item:hover { background:#1b2029; }
  .tags-item input[type=checkbox] { width:15px; height:15px; margin:0; flex:0 0 auto; accent-color:var(--acc); }
  .tags-item span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .tags-item.custom { justify-content:space-between; color:var(--acc); }
  .tags-item .x { cursor:pointer; opacity:.6; flex:0 0 auto; padding:0 2px; }
  .tags-item .x:hover { opacity:1; }
  .tags-sep { height:1px; background:var(--line); margin:8px 2px; }
  .tags-menu .tags-add { display:flex; gap:7px; align-items:center; margin-top:8px; }
  .tags-menu .tags-add input { flex:1 1 auto; min-width:0; padding:6px 8px; }
  .tags-menu .tags-add button { flex:0 0 auto; padding:6px 10px; }
  .row { display:flex; gap:9px; flex-wrap:wrap; align-items:center; margin-top:9px; }
  .kv { color:var(--dim); font-size:12.5px; }
  label.f { display:block; margin:8px 0 3px; color:var(--dim); font-size:12.5px; }
  button { background:#20252f; color:var(--txt); border:1px solid var(--line); border-radius:8px; padding:7px 11px; cursor:pointer; font-size:13px; }
  button:hover { border-color:#3a4252; background:#262c38; }
  button.primary { background:var(--acc); border-color:var(--acc); color:#141414; font-weight:600; }
  button.danger { border-color:#5a1d24; color:var(--err); }
  input, select, textarea { background:#101318; color:var(--txt); border:1px solid var(--line); border-radius:8px; padding:7px 9px; font:inherit; width:100%; }
  /* нативные выпадающие списки — тёмные, без белого системного окна */
  select { color-scheme: dark; }
  select option, select optgroup { background:#12151b; color:var(--txt); }
  input:focus, select:focus, textarea:focus, button:focus { outline:none; }
  input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus,
  textarea:-webkit-autofill, select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #101318 inset !important;
    box-shadow: 0 0 0 1000px #101318 inset !important;
    -webkit-text-fill-color: var(--txt) !important;
    caret-color: var(--txt);
  }
  input[type=checkbox] { width:auto; }
  textarea { min-height:70px; }
  pre { background:#0c0e12; border:1px solid var(--line); border-radius:9px; padding:11px; overflow:auto; max-height:320px; font-size:12px; }
  table { width:100%; border-collapse:collapse; font-size:12.5px; }
  th, td { text-align:left; padding:6px 8px; border-bottom:1px solid var(--line); }
  th { color:var(--dim); font-weight:500; }
  .note { font-size:12.5px; color:var(--warn); margin-top:8px; word-break:break-all; }
  .note:empty { display:none; }
  .thread { min-width:0; }
  .toast { position:fixed; right:18px; bottom:18px; background:#20252f; border:1px solid var(--line); border-left:3px solid var(--acc);
           padding:11px 14px; border-radius:9px; max-width:420px; font-size:13px; display:none; white-space:pre-wrap; z-index:9; }

  /* ── вход в панель ── */
  .auth-wrap { position:fixed; inset:0; z-index:30; display:flex; align-items:center; justify-content:center;
               background:radial-gradient(900px 500px at 50% -10%, #1c2230 0%, var(--bg) 60%); }
  .auth-card { width:min(380px, 92vw); background:var(--card); border:1px solid var(--line); border-radius:14px;
               padding:22px 22px 18px; box-shadow:0 24px 60px rgba(0,0,0,.45); }
  .auth-card h1 { font-size:17px; margin:0 0 3px; }
  .auth-tabs { display:flex; gap:6px; margin:15px 0 4px; }
  .auth-tabs button { flex:1; }
  .auth-tabs button.active { background:var(--acc); border-color:var(--acc); color:#141414; font-weight:600; }
  .auth-err { color:var(--err); font-size:12.5px; min-height:17px; margin-top:9px; white-space:pre-wrap; }
  .auth-ok { color:var(--ok); }
  .userbox { margin-top:14px; padding-top:12px; border-top:1px solid var(--line); font-size:12.5px; color:var(--dim); }
  .userbox b { color:var(--txt); }
  .userbox .row { margin-top:8px; }
  .userbox button { font-size:12px; padding:5px 9px; }
  .tag { display:inline-block; font-size:10.5px; padding:1px 7px; border-radius:99px; border:1px solid var(--line); color:var(--dim); vertical-align:middle; }
  .tag.admin { color:var(--acc); border-color:#5a3113; }
  .tag.mine { color:var(--ok); border-color:#1d5a41; }
  .conv .who { font-size:9.5px; line-height:1.5; padding:0 5px; border-radius:6px; margin-right:5px;
    border:1px solid var(--line); color:var(--dim); white-space:nowrap; }
  .conv .who.them { color:#ffb27a; border-color:#5a3a22; background:rgba(255,110,20,.08); }
  .conv .who.me { color:#8f98a8; }
  .conv .p.mine-last { color:var(--dim); }
  .tag.owner { color:var(--warn); border-color:#5a4a13; }

  #s-messages { flex:1; min-height:0; overflow:hidden; display:flex; flex-direction:column; }
  /* ── почта: слева ящики, справа письма ── */
  #s-mail { flex:1; min-height:0; overflow:hidden; display:flex; flex-direction:column; }
  .mail-split { flex:1; min-height:0; display:grid; grid-template-columns:290px minmax(0,1fr); gap:14px; }
  .mail-side { overflow-y:auto; min-width:0; padding-right:4px; }
  .mail-pane { overflow-y:auto; min-width:0; padding-right:6px; }
  .mail-side .conv { margin-bottom:4px; }
  .mail-side .conv .t { overflow-wrap:anywhere; }
  .mail-msg { padding:11px 0; border-top:1px solid var(--line); }
  .mail-msg .h { display:flex; gap:10px; justify-content:space-between; align-items:baseline; }
  .mail-msg .s { font-weight:600; font-size:13.5px; min-width:0; overflow-wrap:anywhere; }
  #mail-preview { max-height:170px; overflow:auto; }
  .mail-head { margin-bottom:10px; padding:11px 14px; }
  .mail-title { display:flex; gap:8px; align-items:center; flex-wrap:wrap; min-width:0; }
  .mail-title b { font-size:15px; min-width:0; overflow-wrap:anywhere; }
  .mail-title .spacer { margin-left:auto; }
  .mail-meta { margin-top:7px; }
  .mail-meta summary { cursor:pointer; color:var(--dim); font-size:12px; }
  .mail-meta .body { margin-top:8px; display:grid; gap:4px; }
  .alerts { border:1px solid rgba(255,90,90,.45); background:rgba(255,90,90,.07); border-radius:10px;
            padding:9px 11px; display:flex; flex-direction:column; gap:6px; margin-bottom:10px; }
  .alerts.hidden { display:none; }
  .alerts-h { font-size:12px; font-weight:600; color:#ff8f8f; }
  .alerts-row { display:flex; align-items:baseline; gap:8px; flex-wrap:wrap; font-size:12.5px; }
  .alerts-t { font-weight:600; color:rgba(255,255,255,.85); }
  .alerts-row button { margin-left:auto; }
  .mail-chips { display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; }
  .mail-chip { display:inline-flex; align-items:center; gap:6px; font-size:11.5px; line-height:1.5;
               padding:2px 9px; border-radius:99px; border:1px solid rgba(255,255,255,.12);
               background:rgba(255,255,255,.04); color:rgba(255,255,255,.8); cursor:pointer;
               text-decoration:none; font-family:inherit; }
  .mail-chip:hover { border-color:rgba(255,255,255,.3); color:#fff; background:rgba(255,255,255,.07); }
  .mail-chip.link { border-color:rgba(91,140,255,.35); color:#9db4ff; }
  .mail-chip.link:hover { border-color:rgba(91,140,255,.6); color:#c3d2ff; }
  .mail-chip .chip-ico { opacity:.55; font-size:10.5px; }
  .mail-group { font-size:10px; letter-spacing:1px; text-transform:uppercase;
                color:rgba(255,255,255,.25); margin:12px 0 6px; }
  .add-imap { margin-top:14px; padding-top:13px; border-top:1px solid rgba(255,255,255,.05); }
  .add-imap-row { display:flex; gap:10px; align-items:center; }
  .add-imap-row input { flex:1 1 auto; min-width:0; background:rgba(255,255,255,.04);
                        border:1px solid rgba(255,255,255,.08); border-radius:9px;
                        color:rgba(255,255,255,.85); padding:9px 11px; font-size:12.5px; }
  .add-imap-row button { flex:0 0 auto; min-height:38px; }   /* та же высота, что у поля */
  @media (max-width:900px){ .add-imap-row { flex-direction:column; align-items:stretch; } }
  .mail-add summary { cursor:pointer; font-weight:600; font-size:14px; }
  .mail-msg { cursor:pointer; border-radius:8px; padding:10px 8px; margin:0 -8px; }
  .mail-msg:hover { background:#1b2029; }
  .pool-modal { position:fixed; inset:0; z-index:45; background:rgba(0,0,0,.62); display:none;
                align-items:center; justify-content:center; padding:24px; }
  .pool-modal.open { display:flex; }
  .pool-box { width:min(720px,96vw); max-height:88vh; background:var(--card); border:1px solid var(--line);
              border-radius:14px; padding:16px 18px 18px; display:flex; flex-direction:column; gap:10px; overflow:auto; }
  .pool-box h2 { margin:0; font-size:16px; display:flex; align-items:center; gap:10px; }
  .pool-box h2 button { margin-left:auto; }
  .pool-box textarea { min-height:180px; font-family:ui-monospace,Menlo,monospace; font-size:12.5px; }
  .mail-modal { position:fixed; inset:0; z-index:40; background:rgba(0,0,0,.62); display:none;
                align-items:center; justify-content:center; padding:28px; }
  .mail-modal.open { display:flex; }
  .mail-modal-box { width:min(940px,96vw); height:min(82vh,900px); background:var(--card);
                    border:1px solid var(--line); border-radius:12px; display:flex; flex-direction:column; overflow:hidden; }
  .mail-modal-head { display:flex; gap:12px; align-items:flex-start; padding:13px 16px; border-bottom:1px solid var(--line); }
  .mail-modal-head .t { font-weight:600; font-size:14.5px; overflow-wrap:anywhere; }
  .mail-modal-head .kv { margin-top:3px; overflow-wrap:anywhere; }
  .mail-modal-head button { margin-left:auto; flex:0 0 auto; }
  .mail-body { position:relative; flex:1; min-height:0; display:flex; }
  #mail-frame { flex:1; width:100%; border:0; background:#fff; }
  #mail-loading { position:absolute; inset:0; z-index:1; display:flex; align-items:center; justify-content:center;
                  background:#fff; color:#666; font:14px -apple-system,Segoe UI,Roboto,sans-serif; }
  @media (max-width:1100px){ .mail-split { grid-template-columns:1fr; } .mail-side { max-height:200px; } }
  .chat-card { flex:1; min-height:0; overflow:hidden; display:flex; flex-direction:column; margin-bottom:0; padding-top:12px; }
  .drop { border:1.5px dashed var(--line); border-radius:12px; padding:16px; text-align:center;
          color:var(--dim); cursor:pointer; font-size:13px; display:flex; flex-direction:column; gap:12px; }
  .drop:hover, .drop.over { border-color:var(--acc); color:var(--txt); }
  .drop b { color:var(--txt); }
  .ai-reply { border:1px solid var(--line); border-radius:10px; padding:9px 10px; margin-bottom:8px; background:#12151b; }
  .ai-reply .fr { font-size:12.5px; margin-bottom:5px; }
  .ai-reply button { margin-top:6px; font-size:12px; padding:5px 9px; }
  .tr-box { background:#12151b; border:1px solid var(--line); border-radius:9px; padding:9px 11px;
            font-size:12.5px; white-space:pre-wrap; max-height:130px; overflow:auto; margin:7px 0; }
  .tr-dst { border-left:3px solid var(--acc); }
  .badge.test { }
  .out-ok { border-left:3px solid var(--ok) !important; color:var(--ok); font-size:13.5px; }
  .out-err { border-left:3px solid var(--err) !important; color:var(--err); font-size:13.5px; }
  .acc-info { display:grid; grid-template-columns:1fr 1fr; gap:3px 16px; margin:9px 0 4px; font-size:12.5px; }
  @media (max-width:1300px){ .acc-info { grid-template-columns:1fr; } }
  .acc-info .row3 { display:flex; gap:7px; align-items:baseline; min-width:0; }
  .acc-info .k { color:var(--dim); flex:0 0 84px; }
  .acc-info .v { min-width:0; }
  .unread-dot { position:absolute; right:9px; top:50%; transform:translateY(-50%); background:#e9ecf1;
                color:#141414; border-radius:99px; font-size:11px; font-weight:700; padding:1px 7px;
                min-width:18px; text-align:center; }
  .nav-badge { float:right; background:var(--acc); color:#141414; border-radius:99px; font-size:11px;
               font-weight:700; padding:1px 7px; margin-left:6px; }
  .chip { background:#1b2029; border:1px solid var(--line); border-radius:99px; padding:1px 8px; font-size:11px; }
  .acc-info .ok { color:var(--ok); }
  .acc-info .warn { color:var(--warn); }
  .profile { margin:7px 0 2px; font-size:12.5px; }
  .profile .kv { font-size:12px; }
    .thumbs { display:flex; flex-wrap:wrap; gap:10px; justify-content:flex-start; }
  .thumb { position:relative; width:96px; height:96px; cursor:grab; }
  .thumb.dragging { opacity:.35; }
  .thumb.over { box-shadow:0 0 0 2px var(--acc); border-radius:10px; }
  .thumb-main { position:absolute; left:5px; bottom:5px; font-size:9.5px; padding:1px 6px; border-radius:6px;
                background:rgba(0,0,0,.65); color:var(--txt); }
  .thumb img { width:100%; height:100%; object-fit:cover; border-radius:9px; border:1px solid var(--line); }
  .thumb.pending { border:1px dashed var(--line); border-radius:9px; display:grid; place-items:center; cursor:default; }
  .spin { width:15px; height:15px; border:2px solid rgba(240,180,41,.25); border-top-color:#f0b429;
          border-radius:50%; display:inline-block; animation:spin .8s linear infinite; }
  .thumb .spin { width:20px; height:20px; border-width:2.5px; }
  @keyframes spin { to { transform:rotate(360deg); } }
  .btn-busy { opacity:.85; cursor:default; }
  .need { border-color:#e0574a !important; box-shadow:0 0 0 1px rgba(224,87,74,.35); }
  .thumb-x { position:absolute; top:-7px; right:-7px; width:22px; height:22px; padding:0; border-radius:50%;
             background:#20252f; line-height:1; font-size:13px; }
  input[type=file] { padding:6px; color:var(--dim); }
  input[type=file]::file-selector-button { background:#20252f; color:var(--txt); border:1px solid var(--line);
    border-radius:8px; padding:7px 11px; margin-right:10px; cursor:pointer; font:inherit; }
  input[type=file]::file-selector-button:hover { border-color:#3a4252; background:#262c38; }
  .step { border-top:1px solid var(--line); padding:13px 0 3px; }
  .step:first-child { border-top:0; padding-top:0; }
  .step-h { font-weight:600; font-size:13.5px; margin-bottom:9px; }
  .step-h .kv { font-weight:400; }
  .photo-preview { max-width:150px; max-height:150px; border-radius:10px; border:1px solid var(--line); margin-top:10px; }
  details.more { margin-top:14px; border-top:1px solid var(--line); padding-top:10px; }
  details.more summary { cursor:pointer; color:var(--dim); font-size:12.5px; }
  details.more[open] summary { margin-bottom:10px; }
  .two-col { display:grid; grid-template-columns:198px minmax(0,1fr); gap:16px; align-items:start; }
  /* «Мои объявления» — один блок, без карточки в карточке */
  #s-goods > .card { background:transparent; border:0; border-radius:0; box-shadow:none; padding:0; margin:0; }
  @media (max-width:1100px){ .two-col { grid-template-columns:1fr; } .two-col .acct-col { border-right:0; border-bottom:1px solid var(--line); padding:0 0 10px; } }
  .acct-list { display:flex; flex-direction:column; gap:6px; margin:8px 0 4px; }
  .flash-ok { position:fixed; inset:0; z-index:60; display:flex; flex-direction:column; align-items:center;
              justify-content:center; gap:14px; pointer-events:none; background:rgba(8,10,14,.55);
              color:#fff; font-size:22px; font-weight:700; letter-spacing:.2px; opacity:1;
              transition:opacity .35s ease; backdrop-filter:blur(2px); }
  .flash-ok.out { opacity:0; }
  .flash-ok .flash-ico { display:flex; align-items:center; justify-content:center; width:56px; height:56px;
              border-radius:50%; background:#37d07a; color:#08210f; font-size:30px; font-weight:800;
              box-shadow:0 0 0 10px rgba(55,208,122,.16); }
  .pill-dot { animation: dotPulse 2.4s ease-in-out infinite; }
  .pill-amber .pill-dot { animation-duration: 1.5s; }
  .pill-red .pill-dot { animation-duration: 0.9s; }
  .acct .dot { width:7px; height:7px; border-radius:50%; flex:0 0 7px; margin-right:8px;
               background:rgba(255,255,255,.25); animation:dotPulse 2.4s ease-in-out infinite; }
  .acct .dot.ok { background:#37d07a; box-shadow:0 0 6px rgba(55,208,122,.55); }
  .acct .dot.warn { background:#f0b429; box-shadow:0 0 6px rgba(240,180,41,.45); animation-duration:1.5s; }
  .acct .dot.dead { background:#ff5a5a; box-shadow:0 0 6px rgba(255,90,90,.5); animation-duration:0.9s; }
  @keyframes dotPulse { 0%,100% { opacity:1; } 50% { opacity:.3; } }
  .acct { position:relative; display:flex; justify-content:flex-start; align-items:center; gap:8px; cursor:pointer;
          padding:8px 36px 8px 10px; border:1px solid var(--line); border-radius:9px; font-size:12.5px; background:#12151b; }
  .acct:hover { border-color:#3a4252; }
  .acct.active { border-color:rgba(255,255,255,.45); background:#1b2029; }
  .acct .nm { font-weight:600; font-size:12px; word-break:break-all; line-height:1.25; }
  /* ── публикация: аккуратные шаги ── */
  .pub-card { padding: 16px 18px 14px; }
  .pub-head { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:14px; }
  .pub-head h2 { margin:0; }
  .pub-step { background:rgba(255,255,255,.025); border:1px solid rgba(255,255,255,.06);
              border-radius:12px; padding:14px 16px; margin-bottom:12px; }
  .pub-step-ebay { background:rgba(255,255,255,.015); }
  .pub-step-h { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:10px;
                font-size:13px; font-weight:600; color:#fff; }
  .pub-step-h .kv { font-weight:400; }
  .pub-num { width:20px; height:20px; border-radius:6px; display:inline-flex; align-items:center; justify-content:center;
             font-size:11px; font-weight:600; color:rgba(255,255,255,.8);
             background:rgba(255,255,255,.07); border:1px solid rgba(255,255,255,.12); }
  .pub-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
  .pub-grid-title { grid-template-columns:1fr 130px; }
  .pub-grid-4 { grid-template-columns:1.3fr .7fr .7fr 1.3fr; }
  .pub-cat-row { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
  .pub-id { display:inline-flex; align-items:center; gap:6px; font-size:11.5px; color:var(--dim); }
  .pub-id summary { cursor:pointer; list-style:none; }
  .pub-id summary::-webkit-details-marker { display:none; }
  .pub-id input { max-width:78px; }
  .pub-actions { display:flex; align-items:center; gap:10px; margin-top:8px; flex-wrap:wrap; }
  .pub-attrs { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:12px; }
  .pub-foot { display:flex; align-items:center; gap:12px; margin-top:4px; padding-top:14px;
              border-top:1px solid rgba(255,255,255,.06); }
  .pub-clear { width:100%; margin-top:8px; }
  .pub-submit { padding:12px 26px; font-size:15px; }
  @media (max-width:1100px) { .pub-grid-4, .pub-grid-title { grid-template-columns:1fr 1fr; } }

  .ctx-fold { background:#12151b; border:1px solid var(--line); border-radius:12px; padding:10px 13px; }
  .ctx-fold + .ctx-fold { margin-top:10px; }
  .ctx-fold > summary { list-style:none; cursor:pointer; display:flex; align-items:center; gap:7px;
                        font-size:10px; font-weight:600; letter-spacing:.08em; text-transform:uppercase;
                        color:var(--dim); }
  .ctx-fold > summary::-webkit-details-marker { display:none; }
  .ctx-fold > summary:before { content:'▸'; font-size:10px; color:rgba(255,255,255,.35); }
  .ctx-fold[open] > summary:before { content:'▾'; }
  .ctx-fold[open] > summary { margin-bottom:10px; color:rgba(255,255,255,.55); }
  .ctx-fold[open] > summary + * { margin-top:0; }
  .ctx-fold > summary .fold-dot { margin-left:auto; flex:0 0 auto; width:9px; height:9px; border-radius:50%;
                                  background:#4b5563; transition:background .15s, box-shadow .15s; }
  .ctx-fold > summary .fold-dot.on { background:#22c55e; box-shadow:0 0 7px rgba(34,197,94,.6); }
  .ctx-fold > summary .fold-count { margin-left:auto; font-size:10px; letter-spacing:.04em;
                                    color:rgba(255,255,255,.45); text-transform:none; }
  .ref-code-box { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;
                  margin-top:12px; padding:12px 14px; background:#12151b; border:1px solid var(--line); border-radius:12px; }
  .ref-code { font-family:monospace; font-size:20px; letter-spacing:.12em; color:#f97316; margin-top:2px; }
  .ref-stats { display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:12px; }
  .ref-stat { background:#12151b; border:1px solid var(--line); border-radius:12px; padding:12px 14px; }
  .ref-stat .n { font-size:22px; font-weight:600; }
  .ref-table { display:flex; flex-direction:column; }
  .ref-tr { display:grid; grid-template-columns: minmax(180px,1.6fr) 120px 130px 130px 62px 100px 100px;
            gap:10px; align-items:center; padding:9px 8px; border-top:1px solid var(--line);
            cursor:pointer; border-radius:8px; }
  .ref-table .ref-tr:first-child { border-top:0; }
  .ref-tr:hover { background:rgba(255,255,255,.03); }
  .ref-tr.head { cursor:default; font-size:10px; letter-spacing:.06em; text-transform:uppercase;
                 color:rgba(255,255,255,.35); padding-bottom:6px; }
  .ref-tr.head:hover { background:none; }
  .ref-td { min-width:0; font-size:13px; }
  .ref-td.num { text-align:right; font-variant-numeric:tabular-nums; }
  .ref-td.ok { color:#22c55e; }
  .ref-td.dim { color:rgba(255,255,255,.4); }
  .ref-td.earn { color:#f97316; }
  .ref-td.main { display:flex; align-items:center; gap:6px; }
  .ref-td.main .caret { font-size:10px; color:rgba(255,255,255,.4); width:10px; }
  .ref-detail { display:flex; gap:24px; flex-wrap:wrap; padding:10px 12px 12px 24px;
                background:#0f1218; border-top:1px solid var(--line); margin-left:14px; }
  .ref-detail-col { min-width:200px; display:flex; flex-direction:column; gap:3px; }
  .ref-pay { display:grid; grid-template-columns:130px 1fr 80px; gap:8px; font-size:12px;
             color:rgba(255,255,255,.65); }
  .ref-pay b { text-align:right; color:#fff; }
  .ref-list { display:flex; flex-direction:column; }
  .ref-row { display:grid; grid-template-columns:minmax(160px,1.4fr) minmax(140px,1fr) 110px 120px;
             gap:10px; align-items:center; padding:10px 0; border-top:1px solid var(--line); }
  .ref-row:first-child { border-top:0; }
  .ref-row .t { font-weight:600; }
  .ref-sub { font-size:12px; color:rgba(255,255,255,.35); }
  .ref-sub.ok { color:#22c55e; }
  .ref-money { text-align:right; font-variant-numeric:tabular-nums; }
  .notes-card { margin-top:10px; padding:8px 10px; }
  .notes-card .notes-box { margin:0; border:0; padding:0; }
  .ai-hint-box { margin:8px 0 4px; font-size:12px; color:var(--dim); }
  .ai-hint-box summary { cursor:pointer; list-style:none; }
  .ai-hint-box summary::-webkit-details-marker { display:none; }
  .ai-hint-box summary:before { content:'▸ '; }
  .ai-hint-box[open] summary:before { content:'▾ '; }
  /* ── варианты ответа ИИ: плоский список ── */
  .rp-list { border:1px solid rgba(255,255,255,.07); border-radius:12px; overflow:hidden;
             background:rgba(255,255,255,.02); }
  .rp-row { display:flex; gap:10px; padding:10px 12px; cursor:pointer;
            transition:background .15s, transform .12s; border-bottom:1px solid rgba(255,255,255,.05); }
  .rp-row:last-child { border-bottom:0; }
  .rp-row:hover { background:rgba(255,140,40,.08); }
  .rp-row:active { transform:scale(.995); }
  .rp-idx { color:rgba(255,255,255,.25); font-size:11px; min-width:14px; padding-top:2px; }
  .rp-body { min-width:0; }
  .rp-fr { font-size:12.5px; color:rgba(255,255,255,.9); line-height:1.45; white-space:pre-wrap; }
  .rp-ru { font-size:11.5px; color:var(--dim); margin-top:4px; line-height:1.4; }
  .rp-sep { height:1px; background:rgba(255,255,255,.16); }
  .ai-hint { margin-top:6px; }

  /* ── выбор категории ── */
  .cat-pick-cols { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:12px; max-height:52vh; }
  .cat-pick-col { overflow:auto; display:flex; flex-direction:column; gap:4px; padding-right:4px; min-height:60px; }
  .cat-item { text-align:left; background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.08);
              border-radius:9px; padding:8px 10px; font-size:12.5px; color:rgba(255,255,255,.85);
              cursor:pointer; font-family:inherit; }
  .cat-item:hover { background:rgba(255,255,255,.09); }
  .cat-item.on { border-color:var(--acc); background:rgba(255,140,40,.14); color:#fff; }
  .cat-item .kv { font-weight:400; }
  @media (max-width:760px){ .cat-pick-cols { grid-template-columns:1fr; } }
  /* ── публикация: как в klein (карточки в три колонки) ── */
  #s-publish:not(.hidden) { display:flex; flex-direction:column; gap:12px; min-height:0; flex:1; }
  .pub-layout { display:grid; grid-template-columns:252px 1fr; gap:14px; flex:1; min-height:0; }
  .form-card { background:var(--card); border:1px solid rgba(255,255,255,.06);
               border-radius:14px; padding:18px 20px; }
  .pub-side { overflow-y:auto; min-height:0; background:transparent; border:0; border-radius:0;
              padding:6px 4px; }
  .pub-side-h { display:flex; align-items:baseline; justify-content:space-between; gap:8px;
                font-size:13.5px; font-weight:600; color:#fff; margin-bottom:12px; }
  .pub-main { display:flex; flex-direction:column; min-height:0; }
  .pub-acc-list { display:flex; flex-direction:column; gap:2px; }
  .pub-acc { display:flex; align-items:center; gap:10px; padding:8px 8px; border-radius:10px; cursor:pointer; transition:.12s; }
  .pub-acc:hover { background:rgba(255,255,255,.05); }
  .pub-acc.active { background:rgba(255,255,255,.09); }
  .pub-acc-ava { width:36px; height:36px; flex:0 0 36px; border-radius:10px; display:flex; align-items:center;
                 justify-content:center; background:rgba(255,255,255,.07); color:rgba(255,255,255,.75);
                 font-size:11px; font-weight:600; letter-spacing:.03em; }
  .pub-acc.active .pub-acc-ava { background:rgba(255,140,40,.18); color:#ffb066; }
  .pub-acc-body { min-width:0; }
  .pub-acc-mail { font-size:12px; color:rgba(255,255,255,.88); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .pub-acc-sub { font-size:10.5px; color:var(--dim); margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .pub-acc-sub.dead { color:#f5a524; }
  /* мини-список товаров выбранного аккаунта */
  .pub-ads { margin:2px 0 8px 10px; padding:4px 0 4px 10px; border-left:1px solid rgba(255,255,255,.07);
             display:flex; flex-direction:column; gap:3px; }
  .pub-ads-h { font-size:9px; font-weight:500; letter-spacing:1.1px; text-transform:uppercase;
               color:rgba(255,255,255,.28); margin:0 0 4px; }
  .pub-ad { display:flex; gap:9px; align-items:center; padding:4px 6px; border-radius:8px; }
  .pub-ad:hover { background:rgba(255,255,255,.04); }
  .pub-ad-img { width:32px; height:32px; flex:0 0 32px; border-radius:7px; overflow:hidden;
                background:rgba(255,255,255,.05); display:flex; align-items:center; justify-content:center;
                font-size:10px; font-weight:600; color:rgba(255,255,255,.45); }
  .pub-ad-img img { width:100%; height:100%; object-fit:cover; display:block; }
  .pub-ad-txt { min-width:0; }
  .pub-ad-sub { font-size:11.5px; color:rgba(255,255,255,.78); white-space:nowrap; overflow:hidden;
                text-overflow:ellipsis; }
  .pub-ad-price { font-size:10.5px; color:rgba(255,255,255,.38); margin-top:1px; white-space:nowrap;
                  overflow:hidden; text-overflow:ellipsis; }
  .pub-ad-load { font-size:10.5px; color:rgba(255,255,255,.3); padding:2px 6px; }
  .pub-ad-pending .pub-ad-sub { color:rgba(255,255,255,.62); }
  .pub-ad-status { display:flex; align-items:center; gap:5px; color:rgba(255,255,255,.5); }
  .pub-ad-spin { width:9px; height:9px; border-width:1.5px; flex:0 0 9px; }
  /* без второй рамки: колонки — это и есть карточки на листе контента */
  .pub-panel { display:flex; flex-direction:column; flex:1; min-height:0; background:transparent;
               border:0; border-radius:0; padding:0; overflow:hidden; }

  .pub-x { background:none; border:0; color:var(--dim); font-size:15px; cursor:pointer; padding:4px 8px; border-radius:8px; }
  .pub-x:hover { background:rgba(255,255,255,.07); color:#fff; }
  .pub-panel-cols { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.35fr) 320px; gap:14px; flex:1; min-height:0; }
  .pub-panel-cols > .form-card { overflow-y:auto; min-height:0; }
  .pub-panel-cols > .form-card::-webkit-scrollbar { width:3px; }
  .pub-panel-cols > .form-card::-webkit-scrollbar-thumb { background:rgba(255,255,255,.08); border-radius:3px; }
  .pub-lab { font-size:9.5px; font-weight:500; letter-spacing:1.3px; text-transform:uppercase;
             color:rgba(255,255,255,.32); margin-bottom:12px; display:block; }
  .pub-h3 { font-size:9.5px; font-weight:500; letter-spacing:1.3px; text-transform:uppercase;
            color:rgba(255,255,255,.32); margin:18px 0 14px; padding-top:12px;
            border-top:1px solid rgba(255,255,255,.06); }
  .pub-panel-cols .f { font-size:11px; color:rgba(255,255,255,.55); margin-bottom:6px; }
  .pub-panel-cols input, .pub-panel-cols select, .pub-panel-cols textarea {
    background:#101318; border:1px solid rgba(255,255,255,.08); border-radius:10px;
    color:#fff; font-size:13px; padding:11px 13px; width:100%; }
  .pub-panel-cols input:focus, .pub-panel-cols select:focus, .pub-panel-cols textarea:focus {
    outline:none; border-color:rgba(255,255,255,.22); }
  .pub-panel-cols textarea { min-height:96px; resize:vertical; }
  .nice-select { position:relative; }
  .nice-native { position:absolute !important; opacity:0 !important; pointer-events:none !important;
                 width:1px !important; height:1px !important; overflow:hidden !important; }
  .nice-select-btn { width:100%; text-align:left; padding:11px 34px 11px 13px; border-radius:10px;
                     background:#101318; border:1px solid rgba(255,255,255,.08);
                     color:#fff; font-size:13px; cursor:pointer; white-space:nowrap; overflow:hidden;
                     text-overflow:ellipsis; position:relative; }
  .nice-select-btn:after { content:'▾'; position:absolute; right:12px; top:50%; transform:translateY(-50%);
                           color:rgba(255,255,255,.4); font-size:11px; }
  .nice-select-btn:hover { border-color:rgba(255,255,255,.22); }
  .nice-select-btn.is-placeholder { color:rgba(255,255,255,.45); }
  .nice-list { position:absolute; left:0; right:0; top:calc(100% + 6px); z-index:60;
               background:#141821; border:1px solid rgba(255,255,255,.12); border-radius:12px;
               padding:5px; max-height:260px; overflow-y:auto; box-shadow:0 20px 50px rgba(0,0,0,.6); }
  .nice-item { padding:9px 11px; border-radius:8px; font-size:12.5px; color:rgba(255,255,255,.82); cursor:pointer; }
  .nice-item:hover { background:rgba(255,255,255,.08); color:#fff; }
  .nice-item.on { background:rgba(255,140,40,.16); color:#ffb066; }
  .price-range { display:inline-block; margin-top:6px; font-size:11.5px; color:rgba(255,255,255,.55);
                 background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.1);
                 border-radius:999px; padding:2px 10px; }
  .zip-chips { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
  .zip-chips:empty { display:none; }
  .zip-chips button { font-size:10.5px; padding:2px 8px; border-radius:999px; background:rgba(255,255,255,.05);
                      border:1px solid rgba(255,255,255,.1); color:rgba(255,255,255,.75); cursor:pointer; }
  .zip-chips button:hover { border-color:var(--acc); color:#ffb066; }
  .pub-cats { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
  .pub-cats:empty { display:none; }
  .pub-cats .kv { font-size:10.5px; color:rgba(255,255,255,.32); align-self:center; }
  .pub-cats button { font-size:11px; padding:4px 10px; border-radius:999px; background:rgba(255,255,255,.05);
                     border:1px solid rgba(255,255,255,.1); color:rgba(255,255,255,.75); cursor:pointer; }
  .pub-cats button:hover { border-color:rgba(255,255,255,.25); color:#fff; }
  .pub-cats button.primary { background:rgba(255,140,40,.16); border-color:rgba(255,140,40,.5); color:#ffb066; }
  .pub-autofill { display:flex; gap:10px; align-items:stretch; }
  .pub-autofill input { height:46px; border-radius:12px; flex:1; min-width:0;
                        padding:0 14px; font-size:13px; line-height:46px; }
  .pub-fill { height:46px; flex:0 0 auto; padding:0 20px; font-size:12.5px; border-radius:12px;
              white-space:nowrap; display:inline-flex; align-items:center; justify-content:center; min-width:128px; }
  .pub-fill:disabled { opacity:.7; cursor:default; }
  .pub-price { display:flex; align-items:center; background:#101318;
               border:1px solid rgba(255,255,255,.08); border-radius:10px; overflow:hidden; }
  .pub-price input { border:0; background:transparent; border-radius:0; }
  .pub-price span { padding:0 13px; font-size:12px; color:rgba(255,255,255,.35); border-left:1px solid rgba(255,255,255,.08); }
  .pub-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; align-items:start; }
  .pub-grid > div { min-width:0; }
  .pub-grid label.f { display:flex; align-items:baseline; gap:6px; min-height:18px; line-height:18px;
                      margin:0 0 6px; white-space:nowrap; overflow:hidden; }
  .pub-grid label.f .kv { font-size:11px; overflow:hidden; text-overflow:ellipsis; }
  .pub-grid .pub-price, .pub-grid input { margin:0; }
  .pub-versand { display:flex; align-items:center; gap:10px; }
  .pub-toggle { width:46px; height:24px; border-radius:99px; border:1px solid rgba(255,255,255,.12);
                background:rgba(255,255,255,.08); position:relative; cursor:pointer; transition:.18s; }
  .pub-toggle .knob { position:absolute; left:2px; top:2px; width:18px; height:18px; border-radius:50%;
                      background:#8b93a3; transition:.18s; }
  .pub-toggle.on { background:#1f7a4d; border-color:#2b9c63; }
  .pub-toggle.on .knob { left:24px; background:#fff; }
  .f-body-wrap { position:relative; }
  .field-loading { position:absolute; inset:1px; border-radius:10px; background:rgba(16,19,24,.78);
                   display:flex; align-items:center; justify-content:center; gap:9px;
                   font-size:12px; color:rgba(255,255,255,.6); pointer-events:none;
                   backdrop-filter:blur(2px); -webkit-backdrop-filter:blur(2px); }
  .field-loading.hidden { display:none; }
  .pub-photo-grid { display:flex; flex-wrap:wrap; gap:10px; align-content:flex-start; min-height:110px;
                    max-height:220px; overflow-y:auto; padding-right:2px; }
  .pub-photo-grid .thumbs { display:contents; }
  .pub-photo-grid .thumb { width:96px; height:96px; transition:box-shadow .18s ease, opacity .18s ease, transform .18s ease; }
  .pub-photo-grid .thumb.dragging { opacity:.35; transform:scale(.94); box-shadow:0 0 0 2px rgba(255,110,20,.55); }
  .pub-photo-grid .thumb.over { box-shadow:0 0 0 2px var(--acc); }
  .pub-photo-grid .thumb.flip { will-change:transform; }
  .pub-photo-grid .thumb-num { position:absolute; left:5px; top:5px; background:rgba(0,0,0,.65);
                               color:#fff; font-size:9.5px; padding:1px 5px; border-radius:5px; }
  .pub-add-photo { width:96px; height:96px; border:1px dashed rgba(255,255,255,.18); border-radius:12px;
                   display:flex; align-items:center; justify-content:center; font-size:24px;
                   color:rgba(255,255,255,.3); cursor:pointer; transition:.15s; }
  .pub-add-photo:hover { border-color:rgba(255,255,255,.4); color:#fff; }
  .pub-prev-col { display:flex; flex-direction:column; align-self:stretch; height:100%; max-height:100%; padding:0; overflow-y:auto; overflow-x:hidden; min-height:0; background:#141820; }
  .pub-tr { margin-top:2px; padding:0 20px; }
  .pub-tr textarea { min-height:64px; }
  .pub-tr .tr-box { margin-top:8px; font-size:11.5px; }
  .pub-prev { width:100%; border:0; border-radius:0; overflow:hidden;
              background:transparent; flex:0 0 auto; box-shadow:none; }
  .pub-prev-col .pub-submit { width:calc(100% - 40px); margin:14px 20px 18px; }
  .pub-prev-media { position:relative; }
  .pub-prev-img { width:100%; height:auto; aspect-ratio:4/3; background:#101318; display:flex; align-items:center;
                  justify-content:center; color:rgba(255,255,255,.22); font-size:11px; overflow:hidden; }
  .pub-prev-img img { width:100%; height:100%; object-fit:cover; display:block; }
  .pp-count { position:absolute; right:10px; bottom:10px; background:rgba(10,12,16,.72); color:#fff;
              font-size:10.5px; padding:3px 8px; border-radius:99px; border:1px solid rgba(255,255,255,.1);
              backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px); }
  .pub-prev-body { padding:15px 16px 14px; }
  .pub-prev-title { font-size:16.5px; color:#fff; font-weight:650; line-height:1.3; letter-spacing:-.15px;
                    display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
  .pub-prev-price { font-size:24px; color:var(--acc); font-weight:800; margin-top:9px; letter-spacing:-.4px; }
  .pub-prev-desc { font-size:12px; color:rgba(255,255,255,.45); margin-top:9px; line-height:1.55;
                   display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
  .pp-chips { display:flex; flex-wrap:wrap; gap:6px; margin-top:12px; }
  .pp-chip { font-size:10.5px; color:rgba(255,255,255,.58); background:rgba(255,255,255,.05);
             border:1px solid rgba(255,255,255,.07); border-radius:99px; padding:3px 9px;
             max-width:100%; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .pp-chip.pp-ship { color:#7fe0b0; border-color:rgba(62,207,142,.25); background:rgba(62,207,142,.08); }
  .pp-foot { display:flex; justify-content:space-between; gap:10px; margin-top:12px; padding-top:10px;
             border-top:1px solid rgba(255,255,255,.06); font-size:11px; color:rgba(255,255,255,.4); }
  .pub-submit { width:100%; margin-top:14px; padding:12px; font-size:13.5px; border-radius:10px; }
  @media (max-width:1200px) {
    .pub-layout { grid-template-columns:1fr; }
    .pub-panel-cols { grid-template-columns:1fr; overflow-y:auto; }
  }
  /* ── сводка в админке ── */
  /* ── шапка объявлений ── */
  .ads-toolbar { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:10px; }
  .ads-tabs { display:flex; gap:6px; flex-wrap:wrap; }
  .ads-tabs button { display:inline-flex; align-items:center; gap:7px; padding:7px 13px; border-radius:10px;
                     background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.08);
                     color:rgba(255,255,255,.75); font-size:12.5px; cursor:pointer; transition:.15s; }
  .ads-tabs button:hover { border-color:rgba(255,255,255,.22); color:#fff; }
  .ads-tabs button.primary { background:var(--acc); border-color:var(--acc); color:#0b0d10; font-weight:600; }
  .ads-tabs .n { font-size:10.5px; font-weight:600; padding:1px 6px; border-radius:999px; background:rgba(255,255,255,.1); }
  .ads-tabs button.primary .n { background:rgba(0,0,0,.22); }
  .ads-actions { margin-left:auto; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
  .ads-refresh { padding:6px 11px; }
  .ads-stats { display:flex; align-items:center; gap:16px; flex-wrap:wrap; font-size:11.5px;
               color:var(--dim); margin-bottom:12px; }
  .ads-stat { display:inline-flex; align-items:center; gap:6px; }
  .ads-stat b { color:#fff; font-weight:600; }
  .ads-stat .dot { width:6px; height:6px; border-radius:50%; background:#6b7280; margin:0; }
  .ads-stat .dot.ok { background:#3ecf8e; } .ads-stat .dot.warn { background:#f0b429; }
  .ads-stat .dot.err { background:#f0616d; }
  .stat-grid { display:grid; grid-template-columns:repeat(4, 1fr); gap:10px; margin-top:12px; }
  .stat-card { background:rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.07); border-radius:12px; padding:12px 14px; }
  .stat-title { font-size:10px; letter-spacing:.1em; text-transform:uppercase; color:var(--dim); }
  .stat-big { font-size:30px; font-weight:700; color:#fff; line-height:1.15; margin-top:6px; }
  .stat-sub { font-size:11px; color:var(--dim); margin-bottom:8px; }
  .stat-rows { display:flex; flex-direction:column; gap:3px; font-size:11.5px; color:rgba(255,255,255,.7); }
  .stat-rows b { color:#fff; }
  .stat-total { display:flex; flex-wrap:wrap; gap:16px; margin-top:12px; padding-top:12px;
                border-top:1px solid rgba(255,255,255,.07); font-size:12px; color:var(--dim); }
  .stat-total b { color:#fff; }
  .dot { width:6px; height:6px; border-radius:50%; display:inline-block; margin-right:6px; vertical-align:middle; }
  .dot.ok { background:#3ecf8e; }
  .dot.warn { background:#f0b429; }
  .dot.err { background:#f0616d; }
  @media (max-width:900px) { .stat-grid { grid-template-columns:1fr 1fr; } }

  /* ── магазин: витрина из klein внутри панели ── */
  #s-shop { flex:1; min-height:0; display:flex; }
  .shop-frame-wrap { flex:1; min-height:0; display:flex; border-radius:0; overflow:hidden; background:#0a0a0a;
                     border:0; }
  .shop-frame-wrap iframe { display:block; width:100%; height:100%; border:0; background:#0a0a0a; }
  @media (max-width:1000px) {
    /* на телефоне контент не фиксирован по высоте — даём iframe свою высоту */
    #s-shop { flex:0 0 auto; }
    .shop-frame-wrap { height:calc(100dvh - 108px); }
  }
  /* ── таблица аккаунтов: 1:1 из klein (dashboard.css) ── */
  .table-wrap { background:var(--card); border:1px solid rgba(255,255,255,.06); border-radius:16px;
                overflow:hidden; display:flex; flex-direction:column; }
  .acc-cols { grid-template-columns:2fr .8fr .75fr .35fr .9fr; }
  .table-head { display:grid; padding:11px 20px; border-bottom:1px solid rgba(255,255,255,.06);
                background:transparent; }
  .th { font-size:9px; font-weight:500; letter-spacing:1.2px; text-transform:uppercase; color:rgba(255,255,255,.22); }
  .table-body { overflow-y:auto; }
  .table-row { display:grid; grid-template-columns:2fr .8fr .75fr .35fr .9fr; padding:0 20px; align-items:center;
               border-bottom:1px solid rgba(255,255,255,.04); transition:background .15s; cursor:pointer;
               height:56px; position:relative; }
  .table-row::after { content:''; position:absolute; left:0; top:10px; bottom:10px; width:2px; background:transparent;
                      border-radius:0 2px 2px 0; transition:background .2s; }
  /* таблицы админки: подсветка строки под курсором */
  #s-admin table tbody tr { transition: background .12s ease; }
  #s-admin table tbody tr:hover { background:rgba(255,255,255,.055); }
  #s-admin table tbody tr:hover td:first-child { box-shadow:inset 2px 0 0 rgba(255,255,255,.3); }
  #s-admin table tbody tr:hover td { color:#fff; }
  .table-row:hover { background:rgba(255,255,255,.04); }
  .table-row:hover::after { background:rgba(255,255,255,.28); }
  .table-row.open { background:rgba(255,255,255,.05); }
  .table-row.open::after { background:rgba(255,255,255,.3); }
  .td-wallet { font-variant-numeric:tabular-nums; }
  .td-escrow { font-size:10px; }
  .td { font-size:12px; color:rgba(255,255,255,.6); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; padding-right:10px; }
  .td-email { display:flex; align-items:center; gap:10px; }
  .td-ava { width:30px; height:30px; border-radius:50%; display:flex; align-items:center; justify-content:center;
            font-size:9px; font-weight:600; flex-shrink:0; border:1px solid rgba(255,255,255,.1);
            background:rgba(255,255,255,.06); color:rgba(255,255,255,.45); }
  .td-email-addr { font-size:12px; color:rgba(255,255,255,.75); }
  .td-sub { font-size:10px; color:rgba(255,255,255,.28); margin-top:2px; }
  /* добавление аккаунта — в стиле самой таблицы */
  .add-acc { padding:16px 20px 15px; border-bottom:1px solid rgba(255,255,255,.07);
             background:rgba(255,255,255,.015); }
  .add-acc-title { font-size:9px; font-weight:500; letter-spacing:1.2px; text-transform:uppercase;
                   color:rgba(255,255,255,.22); margin-bottom:12px; }
  .add-acc-grid { display:grid; grid-template-columns:190px minmax(0,1fr); gap:14px 20px; align-items:start; }
  .add-lbl { font-size:9px; font-weight:500; letter-spacing:1.1px; text-transform:uppercase;
             color:rgba(255,255,255,.22); margin-bottom:6px; }
  .add-hint { letter-spacing:0; text-transform:none; font-size:10px; color:rgba(255,255,255,.16); }
  .add-acc input, .add-acc select, .add-acc textarea {
    width:100%; background:#101318; border:1px solid rgba(255,255,255,.08);
    border-radius:9px; color:rgba(255,255,255,.85); padding:9px 11px; font-size:12.5px; font-family:inherit; }
  .add-acc textarea { min-height:76px; resize:vertical; }
  .add-acc input:focus, .add-acc select:focus, .add-acc textarea:focus {
    outline:none; border-color:rgba(255,255,255,.18); background:#12161d; }
  .add-acc .row { align-items:center; }
  .add-acc-foot { display:flex; gap:10px; align-items:center; margin-top:16px; padding-top:13px;
                  border-top:1px solid rgba(255,255,255,.05); }
  @media (max-width:900px){ .add-acc-grid { grid-template-columns:1fr; } }
  .pill { display:inline-flex; align-items:center; gap:4px; padding:3px 9px; border-radius:99px; font-size:10px; font-weight:500; }
  .pill-green { background:rgba(74,222,128,.1); color:#4ade80; border:1px solid rgba(74,222,128,.2); }
  .pill-amber { background:rgba(251,191,36,.1); color:#fbbf24; border:1px solid rgba(251,191,36,.2); }
  .pill-red { background:rgba(248,113,113,.1); color:#f87171; border:1px solid rgba(248,113,113,.2); }
  .pill-yellow { background:rgba(240,180,41,.1); color:#f0b429; border:1px solid rgba(240,180,41,.22); }
  .pill-pro { background:rgba(139,123,255,.12); color:#b8aeff; border:1px solid rgba(139,123,255,.28); }
  .pill-private { background:rgba(255,255,255,.045); color:rgba(255,255,255,.55); border:1px solid rgba(255,255,255,.12); }
  .dot-yellow { color:#f0b429; }
  .pill-gray { background:rgba(255,255,255,.05); color:rgba(255,255,255,.3); border:1px solid rgba(255,255,255,.08); }
  .pill-dot { width:5px; height:5px; border-radius:50%; flex-shrink:0; animation:pill-pulse 2s ease-in-out infinite; }
  @keyframes pill-pulse { 0%,100% { box-shadow:0 0 2px currentColor; } 50% { box-shadow:0 0 6px currentColor, 0 0 12px currentColor; } }
  .dot-green { background:#4ade80; box-shadow:0 0 4px rgba(74,222,128,.8); }
  .dot-amber { background:#fbbf24; }
  .dot-red { background:#f87171; }
  .acc-actions { display:flex; gap:4px; justify-content:flex-end; }
  .acc-actions button { background:none; border:0; padding:5px; border-radius:6px; color:rgba(255,255,255,.35); cursor:pointer; min-height:0; }
  .acc-actions button:hover { background:rgba(255,255,255,.08); color:#fff; }
  .acc-actions svg { width:15px; height:15px; display:block; }
  .acc-expand { background:rgba(255,255,255,.015); border-bottom:1px solid rgba(255,255,255,.06);
                padding:18px 24px; animation:acc-expand-in .25s ease; }
  @keyframes acc-expand-in { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }
  .acc-expand-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:14px; }
  .acc-expand-grid > div { background:rgba(255,255,255,.025); border:1px solid rgba(255,255,255,.05);
                           border-radius:10px; padding:12px 14px; min-width:0; }
  .acc-expand-section-title { font-size:9px; font-weight:600; letter-spacing:1.2px; text-transform:uppercase;
                              color:rgba(255,255,255,.25); margin-bottom:8px; display:flex; align-items:center; gap:6px; }
  .acc-expand-section-title::before { content:''; width:4px; height:4px; border-radius:50%; background:rgba(255,255,255,.2); }
  .acc-expand-row { display:flex; justify-content:space-between; align-items:center; gap:10px;
                    padding:4px 0; border-bottom:1px solid rgba(255,255,255,.03); }
  .acc-expand-row:last-child { border-bottom:none; }
  .acc-expand-label { font-size:11px; color:rgba(255,255,255,.3); flex:0 0 auto; }
  .acc-expand-val { font-size:11px; color:rgba(255,255,255,.7); font-weight:500; max-width:62%;
                    overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .acc-expand-actions { display:flex; gap:8px; margin-top:14px; padding-top:12px;
                        border-top:1px solid rgba(255,255,255,.04); flex-wrap:wrap; }
  .acc-expand-actions button { padding:7px 14px; font-size:11px; background:rgba(255,255,255,.05);
                               border:1px solid rgba(255,255,255,.08); border-radius:8px;
                               color:rgba(255,255,255,.6); cursor:pointer; min-height:0; }
  .acc-expand-actions button:hover { background:rgba(255,255,255,.1); color:#fff; }
  .acc-expand-actions button.danger { color:rgba(240,97,109,.75); border-color:rgba(240,97,109,.2); }
  .acc-expand-actions button.danger:hover { color:#ff8b94; background:rgba(240,97,109,.1); }
  .acc-expand-actions button.resting { color:#facc15; border-color:rgba(250,204,21,.4); background:rgba(250,204,21,.1); }
  .rest-dot { display:inline-block; width:8px; height:8px; border-radius:50%; background:#facc15;
              box-shadow:0 0 6px rgba(250,204,21,.65); margin-left:6px; vertical-align:1px; flex:0 0 auto; }
  .rest-btn { padding:5px 7px !important; display:inline-flex; align-items:center; justify-content:center; }
  .rest-btn .rest-dot { margin:0; background:#4b5563; box-shadow:none; }
  .rest-btn.on .rest-dot { background:#facc15; box-shadow:0 0 7px rgba(250,204,21,.7); }
  .pill.pill-rest { color:#facc15; border-color:rgba(250,204,21,.45); background:rgba(250,204,21,.1); }
  .pill.pill-red, .dot-red { color:#e0574a; }
  .pill.pill-red { border-color:rgba(224,87,74,.5); background:rgba(224,87,74,.12); }
  .pill-dot.dot-red { background:#e0574a; }
  .proxy-alert { color:#e0574a !important; border-color:rgba(224,87,74,.5) !important;
                 background:rgba(224,87,74,.12) !important; }
  .proxy-banner { margin:10px 0 12px; padding:10px 12px; border-radius:12px;
                  background:rgba(224,87,74,.08); border:1px solid rgba(224,87,74,.35); }
  .pb-title { color:#e0574a; font-size:12.5px; font-weight:600; margin-bottom:6px; }
  .pb-row { display:flex; align-items:center; gap:10px; padding:4px 0; font-size:12px; }
  .pb-mail { min-width:180px; color:rgba(255,255,255,.85); }
  .pb-err { flex:1; color:rgba(255,255,255,.5); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .dot-rest { background:#facc15; }
  .acc-expand pre { margin:10px 0 0; max-height:170px; }
  .acc-expand pre:empty { display:none; }
  @media (max-width:1100px){
    .acc-cols, .table-row { grid-template-columns:minmax(0,1fr) 100px 90px; }
    .table-head > :nth-child(3), .table-row > :nth-child(3),
    .table-head > :nth-child(4), .table-row > :nth-child(4) { display:none; }
    .table-head > :nth-child(2), .table-row > :nth-child(2) { grid-column:2; }
    .table-head > :nth-child(5), .table-row > :nth-child(5) { grid-column:3; }
    .acc-expand-grid { grid-template-columns:1fr 1fr; }
  }
  /* карточка объявления — 1:1 как в klein-панели (.pc-*) */
  .listing-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(230px, 280px)); gap:16px; margin-top:12px; }
  .pc-pending { border-style:dashed; border-color:rgba(240,180,41,.45); opacity:.95; }
  .pc-card { width:100%; background:#141414; border:1px solid #303030; border-radius:16px; overflow:hidden;
             box-shadow:0 0 0 1px rgba(255,255,255,.06) inset, 0 32px 80px rgba(0,0,0,.7);
             transition:border-color .15s; font-family:'Outfit',-apple-system,Segoe UI,Roboto,sans-serif; }
  .pc-card:hover { border-color:#444; }
  .pc-img { position:relative; aspect-ratio:1/1; background:#0e0e0e; display:flex; align-items:center; justify-content:center;
            border-bottom:1px solid #2a2a2a; overflow:hidden; }
  .pc-img img { width:100%; height:100%; object-fit:cover; }
  .pc-placeholder { display:flex; flex-direction:column; align-items:center; gap:10px; color:#303030; }
  .pc-placeholder span { font-size:11px; font-weight:500; letter-spacing:.08em; text-transform:uppercase; }
  .pc-badges { position:absolute; top:8px; left:8px; right:8px; display:flex; justify-content:space-between;
               align-items:flex-start; z-index:3; }
  .pc-badge-status { display:flex; align-items:center; gap:6px; background:rgba(12,12,12,.88); border:1px solid #404040;
                     -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px); border-radius:7px; padding:5px 11px;
                     font-size:11px; font-weight:600; color:#e8e8e8; letter-spacing:.05em; text-transform:uppercase; }
  .pc-dot { width:6px; height:6px; border-radius:50%; }
  .pc-dot-green { background:#4ade80; box-shadow:0 0 10px rgba(74,222,128,1), 0 0 20px rgba(74,222,128,.5); }
  .pc-dot-red { background:#f87171; box-shadow:0 0 10px rgba(248,113,113,.8); }
  .pc-dot-amber { background:#fbbf24; box-shadow:0 0 10px rgba(251,191,36,.8); }
  .pc-dot-gray { background:#8b93a3; box-shadow:0 0 10px rgba(139,147,163,.6); }
  .pc-badge-date { font-size:10px; font-weight:500; color:rgba(255,255,255,.8); background:rgba(0,0,0,.5);
                   padding:2px 6px; border-radius:4px; -webkit-backdrop-filter:blur(4px); backdrop-filter:blur(4px); }
  .pc-price-overlay { position:absolute; bottom:0; left:0; right:0; z-index:3; padding:50px 16px 14px;
                      background:linear-gradient(to top, rgba(10,10,10,1) 0%, transparent 100%);
                      display:flex; justify-content:flex-end; align-items:flex-end; }
  .pc-price { font-size:30px; font-weight:700; color:#fff; letter-spacing:-.04em; line-height:1;
              text-shadow:0 0 20px rgba(255,255,255,.5), 0 0 60px rgba(255,255,255,.15); }
  .pc-body { padding:16px; }
  .pc-title { font-size:16px; font-weight:600; color:#f5f5f5; letter-spacing:-.02em; margin-bottom:8px;
              white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .pc-info { display:flex; align-items:center; gap:8px; margin-bottom:16px; }
  .pc-tag { display:inline-flex; align-items:center; gap:5px; background:#1e1e1e; border:1px solid #303030;
            border-radius:6px; padding:3px 9px; font-size:11px; font-weight:500; color:#888;
            max-width:62%; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
  .pc-spacer { flex:1; }
  .pc-stat { display:flex; align-items:center; gap:4px; font-size:12px; color:#606060; }
  .pc-stat + .pc-stat { margin-left:8px; }
  .pc-stat svg { width:14px; height:14px; }
  .pc-div { height:1px; background:#222; margin:0 0 16px; }
  .pc-seller { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; padding:0; gap:8px; }
  .pc-seller span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .pc-actions { display:flex; gap:6px; }
  .pc-btn { flex:1; height:38px; padding:0 10px; border-radius:9px; font-family:inherit; font-size:12px; font-weight:500;
            cursor:pointer; display:flex; align-items:center; justify-content:center; gap:6px; white-space:nowrap;
            transition:all .15s; background:#1e1e1e; border:1px solid #2e2e2e; color:#888; text-decoration:none; }
  .pc-btn:hover { background:#252525; border-color:#444; color:#ddd; }
  .pc-btn:active { transform:scale(.96); }
  .pc-btn svg { width:14px; height:14px; flex:0 0 auto; }
  .pc-btn.pc-delete:hover { color:#f87171; border-color:#4a2222; }
  .msg-layout { flex:1; min-height:0; overflow:hidden; display:grid; grid-template-columns:minmax(0,1fr) 330px; gap:14px; }
  /* сообщения — один блок: без карточки в карточке */
  #s-messages .chat-card, #s-messages .ctx-card { background:transparent; border:0; border-radius:0;
                                                  box-shadow:none; padding:0; }
  #s-messages .chat-card { padding-top:0; }
  .notify-box { margin-top:12px; padding-top:10px; border-top:1px solid var(--line); }
  .notify-modes { display:flex; gap:4px; margin-top:6px; }
  .notify-modes button { flex:1; padding:4px 4px; font-size:10px; background:rgba(255,255,255,.04);
                         border:1px solid rgba(255,255,255,.08); color:var(--dim);
                         border-radius:7px; cursor:pointer; }
  .notify-modes button.on { border-color:var(--acc); color:#ffb066; background:rgba(255,140,40,.12); }
  .th-copy.on { color:#ffb066; border-color:rgba(255,140,40,.35); }
  .ctx-card { display:flex; flex-direction:column; min-height:0; overflow:hidden; margin-bottom:0; }
  /* такой же разделитель, как у колонки аккаунтов и списка диалогов */
  #s-messages .ctx-card { border-left:1px solid rgba(255,255,255,.08); padding-left:12px; }

  /* ── сообщения: та же стилистика, что у левой панели ── */
  .chat-card, .ctx-card {
    background:rgba(255,255,255,.055);
    border:1px solid rgba(255,255,255,.10); border-top-color:rgba(255,255,255,.16);
    border-radius:14px; backdrop-filter:blur(24px); -webkit-backdrop-filter:blur(24px);
    box-shadow:0 0 0 1px rgba(255,255,255,.02), 0 18px 44px rgba(0,0,0,.30);
    padding:12px 12px 10px;
  }
  .chat { gap:0; }
  .acct-col { border-right:1px solid rgba(255,255,255,.08); padding:0 11px 0 0; }
  .chat-list { border-right:1px solid rgba(255,255,255,.08); padding:0 11px; }
  .thread { padding-left:10px; }
  .acct { background:rgba(255,255,255,.04); border-color:rgba(255,255,255,.09); border-radius:10px; }
  .acct:hover { background:rgba(255,255,255,.08); border-color:rgba(255,255,255,.14); }
  .acct.active { background:rgba(255,255,255,.08); border-color:rgba(255,255,255,.45); color:#fff; }
  .thread-head { background:rgba(255,255,255,.05); border-color:rgba(255,255,255,.09); border-radius:10px; }
  .ctx-panel { background:rgba(255,255,255,.035); border-color:rgba(255,255,255,.08); border-radius:12px; }
  .chat-list .dlg, .chat-list .conv { border-radius:10px; }
  .chat { flex:1; min-height:0; display:grid; grid-template-columns:198px 220px minmax(0,1fr); gap:12px; }
  .acct-col { min-height:0; overflow:auto; border-right:1px solid var(--line); padding-right:11px; }
  @media (max-width:1500px){ .msg-layout { grid-template-columns:minmax(0,1fr) 300px; } .chat { grid-template-columns:170px 200px minmax(0,1fr); } }
  @media (max-width:1150px){ .msg-layout { grid-template-columns:1fr; } }
  @media (max-width:1200px){ .chat { grid-template-columns:220px minmax(0,1fr); } .ctx { grid-column:1/-1; max-height:260px; } }
  .ctx { overflow-y:auto; overflow-x:hidden; min-height:0; flex:1; display:flex; flex-direction:column; gap:12px; padding-right:6px; }
  .ctx > * { flex:0 0 auto; }          /* иначе панели сжимаются и контент наезжает */
  #chat-ctx { min-height: 96px; }
  #chat-ctx.loading { opacity:.6; }
  .ctx-panel { background:#12151b; border:1px solid var(--line); border-radius:12px; padding:12px 13px; }
  .ctx-panel h3:first-child { margin-top:0; }
  .ctx .ad { display:flex; gap:10px; align-items:center; margin-bottom:10px; }
  .ctx .ad img { width:58px; height:58px; object-fit:cover; border-radius:9px; border:1px solid var(--line); }
  .ctx .ad .s { font-weight:600; font-size:13px; }
  .ctx .ad .p { color:var(--acc); font-weight:600; }
  .ctx h3 { font-size:12.5px; color:var(--dim); margin:14px 0 7px; font-weight:500; text-transform:uppercase; letter-spacing:.04em; }
  .ctx .row2 { display:flex; gap:8px; align-items:center; margin:6px 0; font-size:12.5px; color:var(--txt); }
  .ctx .row2 .ico { width:16px; text-align:center; color:var(--dim); }
  .stars { color:var(--warn); }
  .chat-list { border-right:1px solid var(--line); padding-right:12px; overflow:auto; min-height:0; }
  .nchip { display:inline-block; font-size:10px; line-height:1.6; padding:0 7px; border-radius:99px;
           border:1px solid var(--c, var(--dim)); color:var(--c, var(--dim)); margin-left:6px;
           vertical-align:middle; white-space:nowrap; }
  .support-box { margin-top:10px; border-top:1px solid var(--line); padding-top:8px; }
  .support-box h3 { font-size:10px; color:var(--dim); text-transform:uppercase; letter-spacing:.06em;
                    margin:0 4px 6px; font-weight:600; display:flex; gap:6px; align-items:center;
                    white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .sup-open, .sup-mini { display:flex; align-items:center; justify-content:space-between; gap:8px;
                         padding:7px 9px; border-radius:9px; background:rgba(255,255,255,.04);
                         border:1px solid var(--line); cursor:pointer; margin-top:6px; font-size:12px; }
  .sup-open:hover, .sup-mini:hover { background:rgba(255,255,255,.08); }
  .tg-msg { display:flex; gap:8px; align-items:flex-end; max-width:78%; }
  .tg-msg.mine { align-self:flex-end; flex-direction:row-reverse; }
  .tg-msg.them { align-self:flex-start; }
  .tg-ava { width:32px; height:32px; flex:0 0 32px; border-radius:50%; display:flex; align-items:center;
            justify-content:center; font-weight:700; font-size:14px; color:#0b0e13;
            align-self:flex-end; margin-bottom:2px; }
  .tg-body { min-width:0; display:flex; flex-direction:column; }
  .tg-name { font-size:12px; font-weight:600; margin-bottom:2px; }
  .tg-bubble { background:#182031; border:1px solid rgba(255,255,255,.06); border-radius:12px;
               padding:7px 10px; position:relative; }
  .tg-msg.mine .tg-bubble { background:rgba(249,115,22,.18); border-color:rgba(249,115,22,.35); }
  .tg-text { font-size:13.5px; white-space:pre-wrap; word-break:break-word; }
  .tg-meta { display:flex; justify-content:flex-end; gap:6px; font-size:10px; color:rgba(255,255,255,.4); margin-top:2px; }
  .tg-reply { cursor:pointer; opacity:.5; }
  .tg-reply:hover { opacity:1; color:#f97316; }
  .tg-del:hover { color:#e0574a; }
  .tg-quote { border-left:3px solid #f97316; background:rgba(255,255,255,.05); border-radius:6px;
              padding:4px 8px; margin-bottom:5px; cursor:pointer; }
  .tg-qname { font-size:11px; font-weight:600; }
  .tg-tome { color:#f97316; font-weight:500; }
  .tg-qtext { font-size:11.5px; color:rgba(255,255,255,.6); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .tg-replybox { display:flex; align-items:center; gap:8px; padding:6px 10px; margin-bottom:6px;
                 border-left:3px solid #f97316; background:rgba(255,255,255,.04); border-radius:8px; }
  .tg-qx { margin-left:auto; cursor:pointer; opacity:.6; }
  .tg-msg.flash .tg-bubble { box-shadow:0 0 0 2px rgba(249,115,22,.55); }
  .tg-reacts { display:flex; gap:4px; margin-top:3px; opacity:0; transition:opacity .12s; }
  .tg-msg:hover .tg-reacts, .tg-reacts.has { opacity:1; }
  .tg-react { font-size:11px; padding:1px 6px; border-radius:20px; cursor:pointer;
              background:rgba(255,255,255,.06); border:1px solid transparent; opacity:.55; }
  .tg-react:hover { opacity:1; background:rgba(255,255,255,.12); }
  .tg-react.on { opacity:1; border-color:rgba(249,115,22,.6); background:rgba(249,115,22,.16); }
  .tg-imgs { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:4px; margin-bottom:5px; }
  .tg-imgs .sup-img { width:100%; max-width:160px; max-height:160px; object-fit:cover; }
  .gen-files { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:8px; }
  .gen-files.hidden { display:none; }
  .gen-file { position:relative; width:74px; height:74px; border-radius:10px; overflow:hidden; border:1px solid var(--line); }
  .gen-file img { width:100%; height:100%; object-fit:cover; }
  .gen-file-x { position:absolute; top:2px; right:2px; width:18px; height:18px; border-radius:50%;
                background:rgba(0,0,0,.65); color:#fff; font-size:11px; display:flex; align-items:center;
                justify-content:center; cursor:pointer; }
  .tg-pinbar { display:flex; align-items:center; gap:10px; margin-top:8px; padding:7px 12px;
               background:#141a26; border:1px solid var(--line); border-radius:10px; cursor:pointer; }
  .tg-pinbar.hidden { display:none; }
  .tg-pin-ico { font-size:14px; }
  .tg-pin-body { min-width:0; flex:1; }
  .tg-pin-title { font-size:10px; text-transform:uppercase; letter-spacing:.06em; color:#f97316; }
  .tg-pin-text { font-size:12px; color:rgba(255,255,255,.75); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .gen-card { display:flex; flex-direction:column; height:calc(100vh - 150px); min-height:420px; }
  .gen-log { flex:1 1 auto; max-height:none !important; margin-top:10px; }
  .gen-composer { margin-top:10px; flex:0 0 auto; }
  .gen-composer textarea { width:100%; min-height:64px; }
  .sup-log { max-height:320px; overflow:auto; display:flex; flex-direction:column; gap:8px; margin-top:10px;
             padding:8px; background:#0f1218; border-radius:10px; border:1px solid var(--line); }
  .sup-msg { display:flex; flex-direction:column; gap:2px; max-width:80%; }
  .sup-msg.user { align-self:flex-start; }
  .sup-msg.admin { align-self:flex-end; align-items:flex-end; }
  .sup-msg .b { background:rgba(255,255,255,.07); padding:7px 10px; border-radius:10px; font-size:12.5px; }
  .sup-msg.admin .b { background:rgba(249,115,22,.16); }
  .sup-img { max-width:220px; max-height:220px; border-radius:10px; cursor:zoom-in; display:block;
             border:1px solid var(--line); }
  .ar-box { padding:0; }
  #ar-fold, #notes-fold { margin-top:10px; }
  .ar-box h3 { display:none; }
  .ar-row { display:flex; align-items:center; gap:8px; justify-content:space-between; }
  .ar-switch { position:relative; width:38px; height:20px; flex:0 0 auto; display:inline-block; }
  .ar-switch input { opacity:0; width:0; height:0; position:absolute; }
  .ar-switch span { position:absolute; inset:0; background:#3a3a3a; border-radius:20px; cursor:pointer;
                    transition:background .15s; }
  .ar-switch span:before { content:''; position:absolute; top:2px; left:2px; width:16px; height:16px;
                           border-radius:50%; background:#ddd; transition:transform .15s; }
  .ar-switch input:checked + span { background:#f97316; }
  .ar-switch input:checked + span:before { transform:translateX(18px); background:#fff; }
  .ar-state { font-size:12px; color:var(--dim); margin-top:6px; line-height:1.35; }
  .notes-box { margin-top:10px; border-top:1px solid var(--line); padding-top:8px; }
  .notes-box h3 { font-size:11px; color:var(--dim); text-transform:uppercase; letter-spacing:.04em;
                  margin:0 0 6px; font-weight:500; }
  .note-row { display:flex; gap:6px; align-items:flex-start; padding:5px 6px; border-radius:8px; cursor:pointer; position:relative; }
  .note-row:hover { background:#1b2029; }
  .note-row .note-x { position:absolute; right:6px; top:4px; width:16px; height:16px; display:none;
                      align-items:center; justify-content:center; border-radius:4px; font-size:13px; line-height:1;
                      color:var(--dim); }
  .note-row:hover .note-x { display:flex; }
  .note-row .note-x:hover { background:rgba(240,97,109,.15); color:var(--err); }
  .note-row .t { font-size:12px; line-height:1.35; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .note-row .n { font-size:11px; color:var(--dim); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .conv { display:flex; gap:9px; align-items:center; padding:8px 9px; border:1px solid transparent; border-radius:10px; cursor:pointer; margin-bottom:5px; }
  .conv-pic { width:44px; height:44px; flex:0 0 44px; border-radius:50%; object-fit:cover; border:1px solid var(--line); background:#0c0e12; }
  .conv-who-line { display:flex; align-items:center; gap:5px; min-width:0; margin-top:1px; }
  .who-dot { width:7px; height:7px; flex:0 0 7px; border-radius:50%; }
  .who-dot.them { background:#f97316; }
  .who-dot.me { background:#4b9dfd; }
  .conv-who { font-size:12.5px; font-weight:600; color:#e6ebf5; min-width:0;
              overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .conv-prev { font-size:11.5px; color:var(--dim); margin-top:1px; min-width:0;
               overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .conv.unread .conv-who { color:#fff; }
  .conv-ini { display:flex; align-items:center; justify-content:center; color:var(--dim); font-weight:600; font-size:15px; }
  .conv-txt { min-width:0; }
  .conv { position:relative; }
  .conv .t { padding-right:46px; }
  .conv-time { position:absolute; top:8px; right:10px; font-size:10.5px; color:var(--dim);
               font-variant-numeric:tabular-nums; pointer-events:none; }
  .conv .t { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
  .conv:hover { background:#1b2029; }
  .conv.active { border-color:rgba(255,255,255,.24); background:rgba(255,255,255,.07); }
  .conv .t { font-weight:600; font-size:13px; }
  .conv .p { color:var(--dim); font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .thread { display:flex; flex-direction:column; min-height:0; }
  .thread-head { display:flex; align-items:center; gap:8px; flex:0 0 auto; min-width:0;
                 margin:0 0 10px; padding:8px 10px 8px 12px; font-size:12px; color:var(--txt);
                 background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.07);
                 border-radius:10px; container-type:inline-size; }
  .thread-head:empty { display:none; }
  .thread-head .th-info { display:flex; align-items:center; gap:5px; min-width:0; flex:1 1 auto;
                 flex-wrap:nowrap; overflow:hidden; white-space:nowrap; }
  .thread-head .th-info > * { flex:0 0 auto; }
  .thread-head .th-more { display:flex; align-items:center; gap:5px; min-width:0; overflow:hidden; }
  .thread-head .th-actions { display:flex; align-items:center; gap:6px; margin-left:auto; flex:0 1 auto; min-width:0; }
  .thread-head .th-copy { flex:0 0 auto; display:flex; align-items:center; gap:5px;
                 padding:4px 8px; min-height:0; border:1px solid rgba(255,255,255,.08);
                 background:rgba(255,255,255,.03); color:var(--dim); border-radius:7px;
                 font-size:11px; font-family:inherit; cursor:pointer;
                 transition:background .15s, color .15s, border-color .15s; }
  .thread-head .th-copy:hover { background:rgba(255,255,255,.08); border-color:rgba(255,255,255,.14); color:var(--txt); }
  .thread-head .th-copy svg { width:12px; height:12px; flex:0 0 auto; }
  .thread-head .th-copy.is-blocked { color:var(--err); border-color:rgba(240,97,109,.35); background:rgba(240,97,109,.08); }
  .thread-head .th-copy.is-blocked:hover { background:rgba(240,97,109,.14); border-color:rgba(240,97,109,.5); color:#ff8b94; }
  .thread-head .th-copy.th-danger { color:rgba(240,97,109,.8); }
  .thread-head .th-copy.th-danger:hover { background:rgba(240,97,109,.14); border-color:rgba(240,97,109,.5); color:#ff8b94; }
  .thread-head .th-blocked { color:var(--err); border:1px solid rgba(240,97,109,.35); background:rgba(240,97,109,.10);
                 border-radius:5px; padding:1px 6px; font-size:10.5px; white-space:nowrap; }
  /* шапка не должна растягиваться в высоту: лишнее прячем, а не переносим */
  .thread-head .th-name { font-weight:600; max-width:45%; overflow:hidden; text-overflow:ellipsis; }
  .thread-head .th-stars { color:#f5b301; font-size:11px; letter-spacing:.5px; }
  .thread-head .th-dim { color:var(--dim); }
  .thread-head .th-link { cursor:pointer; border-bottom:1px dashed rgba(255,255,255,.25); }
  .thread-head .th-link:hover { color:#fff; border-bottom-color:rgba(255,255,255,.55); }
  .thread-head .th-reviews { color:var(--dim); font-size:11.5px; white-space:nowrap; }
  .partner-info { margin:8px 2px 0; padding:10px 12px; border:1px solid var(--line); border-radius:12px;
                  background:rgba(255,255,255,.03); font-size:12px; display:flex; flex-direction:column; gap:5px; }
  .partner-info .pi-row { display:flex; gap:10px; align-items:baseline; }
  .partner-info .pi-k { color:var(--dim); min-width:96px; }
  .partner-info .pi-v { color:rgba(255,255,255,.9); }
  .partner-info a { color:#ffb066; }
  .err-code { font-family:ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.06em;
              padding:1px 7px; border-radius:6px; background:rgba(240,97,109,.14);
              border:1px solid rgba(240,97,109,.45); color:#ff8b94; cursor:pointer; }
  .err-code:hover { background:rgba(240,97,109,.24); }
  .thread-head .th-sep { color:rgba(255,255,255,.18); }
  @container (max-width: 640px){ .thread-head .th-more, .thread-head .th-sep-more { display:none; } }
  @container (max-width: 720px){ .thread-head .th-copy span { display:none; } }
  /* запасной вариант для браузеров без container queries */
  @media (max-width:1750px){ .thread-head .th-copy span { display:none; } }
  @media (max-width:1280px){ .thread-head .th-more, .thread-head .th-sep-more { display:none; } }
  .bubbles { flex:1; min-height:0; overflow:auto; padding:6px 4px; display:flex; flex-direction:column; gap:8px; }
  .b { max-width:70%; padding:7px 10px; border-radius:12px; font-size:13px; line-height:1.35; white-space:pre-wrap; word-break:break-word; }
  .b.sys { align-self:center; max-width:76%; background:rgba(120,140,170,.10);
           border:1px solid rgba(140,160,190,.22); border-radius:14px; padding:8px 12px 7px;
           color:rgba(255,255,255,.7); font-size:12.5px; text-align:left; white-space:normal; cursor:default; }
  .b.sys.long { cursor:pointer; }
  .b.sys .b-sys-head { display:flex; align-items:center; gap:6px; font-size:9px; letter-spacing:.14em;
                       text-transform:uppercase; color:rgba(160,190,230,.75); margin-bottom:4px; }
  .b.sys .b-sys-dot { width:5px; height:5px; border-radius:50%; background:#7dd3fc; opacity:.8; }
  .b.sys .b-sys-text { display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical;
                       overflow:hidden; line-height:1.45; }
  .b.sys.open .b-sys-text { display:block; -webkit-line-clamp:unset; }
  .b.sys .b-sys-more { display:inline-block; margin-top:4px; font-size:11px; color:#7dd3fc; opacity:.9; }
  .b.sys .b-meta { display:flex; justify-content:flex-end; margin-top:3px; }
  .b.sys .b-tr { color:rgba(255,255,255,.38); font-size:11.5px; margin-top:5px;
                 border-top:1px dashed rgba(255,255,255,.12); padding-top:5px; }

  .b.mine { align-self:flex-end; background:#2a3a2f; border:1px solid #355744; }
  .b.theirs { align-self:flex-start; background:#1d222b; border:1px solid var(--line); }
  .b-meta { display:flex; align-items:center; justify-content:flex-end; gap:6px; margin-top:2px; }
  .b-meta time { color:var(--dim); font-size:10.5px; line-height:1.2; }
  .b time { display:block; color:var(--dim); font-size:10.5px; margin-top:2px; line-height:1.2; }
  .b.pending { opacity:.55; }
  .conv.unread .t { font-weight:700; }
  .conv.unread { background: rgba(255,255,255,.035); }
  .b.failed { box-shadow: inset 0 0 0 1px rgba(224,87,74,.55); }
  .b-fail { color:#e0574a; font-weight:700; margin-left:6px; font-size:12px; }
  .b-att { color:#8fb3d9; font-size:11.5px; margin-left:6px; }
  .b-img { display:block; max-width:220px; max-height:220px; border-radius:8px; margin:4px 0; cursor:zoom-in; }
  .admin-grid { display:grid; align-items:center; gap:10px; padding:9px 6px; border-bottom:1px solid var(--line);
                transition:background .12s ease; border-radius:6px; }
  .admin-grid:not(.head):hover { background:rgba(255,255,255,.06); box-shadow:inset 2px 0 0 rgba(255,255,255,.3); }
  .admin-grid:not(.head):hover b, .admin-grid:not(.head):hover .kv { color:#fff; }
  .admin-grid:last-child { border-bottom:none; }
  .admin-grid.head { color:var(--dim); font-size:11px; letter-spacing:.03em; text-transform:uppercase;
                     border-bottom:1px solid var(--line); padding-bottom:8px; }
  .admin-grid.users { grid-template-columns: minmax(150px,1fr) 110px 100px 70px 58px 140px 125px minmax(340px,auto); }
  .badge.ref { color:#38bdf8; border-color:rgba(56,189,248,.45); background:rgba(56,189,248,.1); }
  .admin-grid .num { text-align:right; font-variant-numeric:tabular-nums; }
  .admin-grid.head .num { text-align:right; }
  .admin-grid.accs  { grid-template-columns: minmax(190px,1.3fr) 150px minmax(150px,1fr) 70px 190px 150px; }
  .admin-grid.accs .flag { text-align:center; }
  .admin-grid > div { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .admin-grid .acts { display:flex; gap:6px; flex-wrap:nowrap; justify-content:flex-end; overflow:visible; }
  .admin-grid .acts button { padding:5px 8px; font-size:11.5px; white-space:nowrap; }
  .admin-grid select { max-width:150px; }
  @media (max-width: 1100px) {
    .admin-grid.users, .admin-grid.accs { grid-template-columns: 1fr; gap:4px; }
    .admin-grid.head { display:none; }
    .admin-grid .acts { justify-content:flex-start; }
  }
  .img-zoom { position:fixed; inset:0; background:rgba(8,10,14,.92); display:flex; align-items:center; justify-content:center;
              z-index:9999; cursor:zoom-out; padding:24px; }
  .img-zoom img { max-width:92vw; max-height:88vh; border-radius:10px; box-shadow:0 10px 40px rgba(0,0,0,.6); }
  .img-zoom .x { position:absolute; top:14px; right:18px; font-size:26px; color:#fff; opacity:.75; }
  .bubbles { overflow-anchor: none; }        /* якорь держим вручную: при переводах не прыгаем */
  .b-tr { color:#9fb3c8; font-size:11.5px; margin-top:3px; padding-top:3px; border-top:1px dashed #2a3140;
          line-height:1.3; white-space:pre-wrap; }
  .b-tr:empty { display:none; }
  .hide-tr .b-tr { display:none; }
  .b-tr.waiting { color:#5b6675; }
  .chat-sug { margin:6px 0 0; display:flex; flex-direction:column; gap:4px; }
  .chat-sug.hidden { display:none; }
  .chat-sug-item { display:flex; align-items:baseline; gap:8px; padding:5px 9px; cursor:pointer;
                   border-radius:8px; background:rgba(255,255,255,.04); border:1px solid var(--line);
                   font-size:12px; text-align:left; color:inherit; }
  .chat-sug-item:hover, .chat-sug-item.on { background:rgba(255,255,255,.07); border-color:rgba(255,255,255,.18); }
  .chat-sug-ru { color:rgba(255,255,255,.9); }
  .chat-sug-fr { color:rgba(255,255,255,.45); font-size:11.5px; overflow:hidden;
                 text-overflow:ellipsis; white-space:nowrap; }
  .chat-tr { margin:8px 0 0; padding:7px 11px; border-radius:10px; background:rgba(255,255,255,.035);
             border:1px solid rgba(255,255,255,.11); font-size:12.5px; line-height:1.35; }
  .chat-tr.hidden { display:none; }
  .chat-tr-lbl { font-size:10px; text-transform:uppercase; letter-spacing:.06em; color:rgba(255,255,255,.45); margin-bottom:2px; }
  .chat-tr-txt { color:rgba(255,255,255,.85); white-space:pre-wrap; }
  .chat-tr-busy { color:rgba(255,255,255,.42); font-size:12px; }
  .quick-bar { display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
  .quick-bar:empty { display:none; }
  .quick-btn { padding:5px 11px; border-radius:999px; font-size:12px; line-height:1.2;
               background:#1b2029; border:1px solid var(--line); color:var(--txt); cursor:pointer; }
  .quick-btn:hover { border-color:rgba(255,255,255,.28); color:#fff; }
  .b-read { font-size:11px; letter-spacing:-1px; color:var(--acc); line-height:1.2; }
  .b-sent { color:var(--dim); }
  .who.lbc { color:#f97316; border-color:rgba(249,115,22,.4); background:rgba(249,115,22,.08); }
  #nav-general.has-news .sb-text { color:#f97316; }
  #nav-general.has-news .sb-text:after { content:' •'; }
  #nav-accounts.has-alert .sb-text { color:#e0574a; }
  #nav-accounts.has-alert .sb-text:after { content:' ⚠'; }
  .composer { display:flex; gap:8px; margin-top:10px; align-items:flex-end; }
  .composer textarea { min-height:44px; max-height:120px; }
  .composer-input { position:relative; flex:1 1 auto; min-width:0; display:flex;
                    background:#12151b; border:1px solid var(--line); border-radius:8px; }
  .composer-input textarea { background:transparent; border:0; position:relative; z-index:2; }
  .chat-ghost { position:absolute; inset:0; z-index:1; pointer-events:none; overflow:hidden;
                padding:7px 9px; font:inherit; line-height:1.4; white-space:pre-wrap; word-break:break-word; }
  .chat-ghost .g-typed { color:transparent; }
  .chat-ghost .g-rest { color:rgba(255,255,255,.32); }
  .chat-sug-pre { color:rgba(255,255,255,.38); }
  .empty { color:var(--dim); font-size:12.5px; padding:14px 4px; }
  /* миниатюрная, еле заметная прокрутка */
  * { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.10) transparent; }
  ::-webkit-scrollbar { width: 6px; height: 6px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: rgba(255,255,255,.10); border-radius: 3px; }
  ::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.22); }
  ::-webkit-scrollbar-corner { background: transparent; }
  .bubbles { padding-right: 8px; }        /* текст не заезжает под полосу */
  .chat-list, .ctx, #chat-ctx { padding-right: 6px; }
  .hidden { display:none !important; }

  /* ───────────── мобильная вёрстка ───────────── */
  .mbar { display:none; }
  .mscrim { display:none; }
  @supports (height: 100dvh) {
    .layout { height: 100dvh; }
    .content { height: calc(100dvh - 24px); }
    .side { height: 100dvh; }
  }
  @media (max-width:1000px) {
    .layout { grid-template-columns: 1fr; }
    .sb-head { display:none; }
    .side { background:#181b21; backdrop-filter:none; -webkit-backdrop-filter:none; }
    /* на телефоне меню всегда в развёрнутом виде, даже если свернули на десктопе */
    .side.collapsed { padding:18px 10px 14px; }
    .side.collapsed .sb-item { padding:8px; justify-content:flex-start; gap:9px; }
    .side.collapsed .sb-text { opacity:1; width:auto; flex:1 1 auto; min-width:0; }
    .side.collapsed .sb-badge { opacity:1; width:auto; min-width:0; padding:1px 6px; border:1px solid rgba(255,255,255,.18); }
    .side.collapsed .sb-section-label { opacity:1; max-height:24px; margin:16px 0 2px; }
    .side.collapsed .sb-divider { margin:5px 8px; }
    .side.collapsed .sb-profile { justify-content:flex-start; padding:7px 8px; gap:9px; }
    .side.collapsed .sb-avatar { width:32px; height:32px; margin:0; }
    .side.collapsed .sb-collab { opacity:1; height:auto; padding:12px 8px 10px; margin:8px 0 2px; }
    .side.collapsed .sb-collab-full { display:block; }
    .side.collapsed .sb-collab-mini { display:none; }
    .side.collapsed .sb-profile-info { display:block; opacity:1; width:auto; flex:1; }
    .side.collapsed .sb-logout span { opacity:1; width:auto; }
    .content { padding: 8px 10px 10px; margin:6px 0 6px 4px; border-right:0; border-radius:18px 0 0 18px; }
    .side { position:fixed; top:0; left:0; height:100vh; height:100dvh; width:284px; max-width:86vw;
            z-index:51; transform:translateX(-100%); transition:transform .22s ease; overflow-y:auto;
            border-right:1px solid var(--line); box-shadow:0 24px 60px rgba(0,0,0,.55); }
    .side.open { transform:none; }
    .mscrim { position:fixed; inset:0; z-index:50; background:rgba(0,0,0,.55); display:none; }
    .mscrim.open { display:block; }
    .mbar { display:flex; align-items:center; gap:10px; padding:0 0 10px; flex:0 0 auto; }
    .mbar .burger { min-width:42px; min-height:42px; font-size:17px; line-height:1; padding:0 12px; }
  .m-badge { background:var(--acc); color:#141414; font-size:12px; font-weight:700; border-radius:99px;
             padding:2px 9px; margin-left:6px; cursor:pointer; }
    .mbar .t { font-weight:600; font-size:13.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    .mbar .who { margin-left:auto; font-size:11.5px; color:var(--dim); white-space:nowrap; }

    .card { padding:12px 13px; margin-bottom:12px; }
    .grid2 { grid-template-columns:1fr; }
    input, select, textarea { font-size:16px; }          /* iOS не зумит при фокусе */
    button { min-height:38px; }
    .row { gap:7px; }
    .acc-info { grid-template-columns:1fr; }
    table { display:block; overflow-x:auto; -webkit-overflow-scrolling:touch; }

    /* сообщения: одна колонка, список аккаунтов заменён селектом */
    #s-messages { display:block; overflow-y:auto; }
    .msg-layout { display:block; overflow:visible; }
    .chat-card { height:auto; margin-bottom:12px; }
    .chat { display:flex; flex-direction:column; gap:10px; }
    #s-messages .acct-col { border-right:0; padding-right:0; overflow:visible;
                            display:flex; flex-direction:column; gap:6px; }
    #s-messages .acct-col .row { margin-top:0; }
    #s-messages .acct-col .acct-list { display:none; }   /* вместо карточек — селект */
    #msg-acc { display:block !important; }
    .chat-list { border-right:0; border-bottom:1px solid var(--line); padding:0 0 8px; max-height:32vh; }
    .thread { min-height:52vh; }
    .bubbles { min-height:190px; }
    .ctx-card { height:auto; }
    #s-messages .ctx-card { border-left:0; padding-left:0; }
    .ctx { max-height:none; }
    #chat-ctx { min-height:150px; }

    /* почта */
    .mail-split { grid-template-columns:1fr; grid-template-rows:min-content minmax(0,1fr); align-content:start; gap:10px; }
    .mail-side { max-height:150px; border-bottom:1px solid var(--line); padding-bottom:8px; }
    .mail-title .spacer { margin-left:0; flex-basis:100%; }
    .mail-msg .h { flex-wrap:wrap; }
    .mail-msg .h > .kv { white-space:normal !important; }
    .mail-title button { flex:1; }

    /* окно письма на весь экран */
    .mail-modal { padding:0; }
    .mail-modal-box { width:100%; height:100%; max-height:none; border:0; border-radius:0; }
  }
  @media (max-width:420px) {
    .content { padding:6px 8px 8px; }
    .card { padding:11px 11px; }
    .b { max-width:86%; }
    .thread { min-height:56vh; }
  }

  /* ────────── подписка и баланс ────────── */
  #s-billing, #s-shop { flex:1; min-height:0; overflow-y:auto; padding-right:6px; }
  /* админка и кабинет тоже должны прокручиваться: иначе нижние строки таблиц срезаются */
  #s-admin { flex:1; min-height:0; overflow-y:auto; padding-right:6px; }
  .bill-hero { display:flex; gap:18px; align-items:center; flex-wrap:wrap; }
  .bill-bal { font-size:28px; font-weight:700; letter-spacing:-.5px; }
  .bill-bal small { font-size:12px; font-weight:400; color:var(--dim); margin-left:6px; }
  .bill-plans { display:grid; grid-template-columns:repeat(auto-fill,minmax(170px,1fr)); gap:10px; margin-top:12px; }
  .bill-plan { border:1px solid var(--line); border-radius:11px; padding:12px; background:rgba(255,255,255,.02); }
  .bill-plan .nm { font-weight:600; font-size:13px; }
  .bill-plan .pr { font-size:19px; font-weight:700; margin:4px 0 8px; }
  .bill-plan .pr small { font-size:11px; color:var(--dim); font-weight:400; }
  .bill-plan button { width:100%; }
  .bill-inv { border:1px dashed var(--line); border-radius:11px; padding:12px; margin-top:12px; }
  .bill-inv .link { font-size:11.5px; word-break:break-all; color:#8fc3ff; }
  .bill-st { display:inline-flex; align-items:center; gap:6px; }
  .bill-st .dot { width:7px; height:7px; border-radius:50%; display:inline-block; flex:0 0 auto; }
  .bill-inv a.go { display:inline-block; padding:6px 12px; border-radius:8px; background:var(--acc);
        color:#fff; text-decoration:none; font-weight:600; font-size:12.5px; }
  .bill-table { width:100%; border-collapse:collapse; font-size:12px; }
  .bill-table td, .bill-table th { padding:5px 6px; border-bottom:1px solid var(--line); text-align:left; white-space:nowrap; }
  .bill-table th { color:var(--dim); font-weight:500; font-size:11px; }
  .bill-table.tight td, .bill-table.tight th { padding:3px 6px; }
  .bill-plus { color:var(--ok); } .bill-minus { color:var(--err); }
  .bill-amt-chips { display:flex; gap:7px; flex-wrap:wrap; margin:8px 0; }
  .bill-amt-chips button.on { border-color:var(--acc); color:#fff; }
  .pay-ok { position:fixed; right:18px; bottom:18px; z-index:10002; display:flex; gap:10px; align-items:flex-start;
    background:#14251c; border:1px solid rgba(62,207,142,.45); border-radius:12px; padding:12px 14px;
    box-shadow:0 18px 50px rgba(0,0,0,.6); max-width:min(380px,92vw); animation:payIn .25s ease; }
  .pay-ok-ico { width:22px; height:22px; border-radius:50%; background:var(--ok); color:#08130c; font-weight:700;
    display:flex; align-items:center; justify-content:center; flex:0 0 auto; font-size:13px; }
  .pay-ok-t { font-weight:600; font-size:13.5px; margin-bottom:2px; }
  .pay-ok button { background:none; border:0; color:var(--dim); cursor:pointer; font-size:15px; padding:0 2px; }
  .bill-inv.ok { border-color:rgba(62,207,142,.5); background:rgba(62,207,142,.07); }
  @keyframes payIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:none; } }
  #bulk-results .bill-table { table-layout:fixed; width:100%; }
  #bulk-results .bill-table td, #bulk-results .bill-table th { white-space:normal; overflow-wrap:anywhere;
    vertical-align:top; }
  #bulk-results .bill-table td:first-child, #bulk-results .bill-table th:first-child { width:34px; }
  #bulk-results .bill-table td:nth-child(2), #bulk-results .bill-table th:nth-child(2) { width:32%; }
  .lock-screen { position:fixed; inset:0; z-index:9000; background:rgba(10,12,16,.975); display:flex;
    align-items:center; justify-content:center; padding:20px; backdrop-filter:blur(6px); }
  .lock-card { width:100%; max-width:540px; max-height:92vh; overflow-y:auto; }
  .lock-ico { font-size:26px; margin-bottom:4px; }
  .lock-bal { margin:12px 0 2px; font-size:15px; }
  .lock-card .bill-plans { margin-top:14px; }
  .lock-card .row { margin-top:14px; }

/* ── MFA: второй фактор и «Безопасность» ── */
.auth-mfa-recovery-label { display:block; margin-top:10px; }
.mfa-box { border:1px solid var(--line); border-radius:10px; padding:12px; margin-top:12px; background:rgba(255,255,255,.02); }
.mfa-box h3 { margin:0 0 8px; font-size:13px; display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.mfa-secret { font-family:ui-monospace,Menlo,monospace; font-size:13px; letter-spacing:.06em; word-break:break-all;
  background:#101318; border:1px solid var(--line); border-radius:8px; padding:8px 10px; }
.mfa-uri { display:block; font-family:ui-monospace,Menlo,monospace; font-size:10.5px; color:var(--dim);
  overflow-wrap:anywhere; background:#101318; border:1px solid var(--line); border-radius:8px; padding:7px 9px; }
.mfa-codes { font-family:ui-monospace,Menlo,monospace; font-size:13px; line-height:1.6; letter-spacing:.04em;
  background:#101318; border:1px solid var(--line); border-radius:8px; padding:10px 12px; white-space:pre-wrap;
  user-select:all; }


.chat-tzbar { display:flex; align-items:center; gap:6px; flex:0 0 auto; padding:0 2px 6px; }
.chat-tzbar .kv { font-size:10.5px; white-space:nowrap; }
.chat-tzbar select { width:auto; max-width:190px; padding:4px 8px; font-size:11px; border-radius:8px;
  background:#101318; border:1px solid rgba(255,255,255,.08); color:rgba(255,255,255,.7); }

  .u-table-scroll { overflow-x:auto; margin:0 -2px; }
  .u-table { width:100%; min-width:980px; table-layout:auto; border-collapse:collapse; }
  .u-table th { font-size:10px; font-weight:500; letter-spacing:.06em; text-transform:uppercase;
                color:rgba(255,255,255,.35); text-align:left; padding:8px 8px 7px; white-space:nowrap;
                border-right:1px solid rgba(255,255,255,.045); }
  .u-table tr:first-child th { background:rgba(255,255,255,.018); border-bottom:1px solid rgba(255,255,255,.06); }
  .u-table th:last-child, .u-table td:last-child { border-right:0; }
  .u-table th.right { text-align:right; }
  .u-table th.center { text-align:center; }
  .u-bonus { color:#ffb066; font-size:10px; white-space:nowrap; }
  .u-table td { padding:9px 8px; border-top:1px solid rgba(255,255,255,.055);
                border-right:1px solid rgba(255,255,255,.045); vertical-align:middle; }
  .u-table tr:hover td { background:rgba(255,255,255,.025); }
  .u-avatar-cell { padding-right:2px !important; }
  .u-avatar { width:34px; height:34px; border-radius:50%; overflow:hidden; display:flex; align-items:center;
              justify-content:center; background:linear-gradient(135deg,rgba(255,255,255,.22),rgba(255,255,255,.06));
              border:1px solid rgba(255,255,255,.18); color:#fff; font-size:12px; font-weight:600; }
  .u-avatar img { width:100%; height:100%; object-fit:cover; display:block; }
  .u-user b { font-size:12.5px; color:rgba(255,255,255,.92); font-weight:600; }
  .u-sub { font-size:10.5px; color:rgba(255,255,255,.38); line-height:1.35; margin-top:1px; }
  .u-accs { font-size:11px; color:rgba(255,255,255,.58); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .u-num { text-align:center; font-variant-numeric:tabular-nums; color:rgba(255,255,255,.7); }
  .u-role { width:128px; max-width:128px; padding:5px 18px 5px 7px; font-size:10.5px; }
  .u-actions { display:flex; gap:5px; justify-content:flex-end; flex-wrap:nowrap; }
  .u-actions button { padding:4px 7px; font-size:10.5px; min-height:0; white-space:nowrap; }
  .u-add { display:grid; grid-template-columns:180px 180px 1fr; gap:10px; align-items:end; margin-top:14px; }
  .u-add .f { margin-bottom:3px; }
  .u-add-btn { display:flex; gap:8px; align-items:center; justify-content:flex-start; }
  @media (max-width:700px) { .u-add { grid-template-columns:1fr; } }

  .r-table-scroll { overflow-x:auto; margin-top:10px; }
  .r-table { width:100%; min-width:900px; border-collapse:collapse; table-layout:auto; }
  .r-table th { font-size:9.5px; text-transform:uppercase; letter-spacing:.06em; color:rgba(255,255,255,.35);
                text-align:left; padding:7px 8px; border-bottom:1px solid rgba(255,255,255,.07); white-space:nowrap; }
  .r-table td { padding:8px; border-top:1px solid rgba(255,255,255,.055); font-size:11.5px; vertical-align:middle; }
  .r-table .num { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
  .r-table th.num { text-align:right; }
  .r-table .due { color:#ffb066; font-weight:600; }
  .r-table tr:hover td { background:rgba(255,255,255,.025); }
  .ref-code { font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:10px; color:rgba(255,255,255,.62); }

  .adm-subnav { display:flex; gap:6px; flex-wrap:wrap; margin:0 0 14px; }
  .adm-subnav button { background:transparent; border:1px solid var(--line); color:rgba(255,255,255,.68);
                       border-radius:8px; padding:6px 11px; font-size:11.5px; cursor:pointer; min-height:0; }
  .adm-subnav button:hover { border-color:rgba(255,255,255,.26); color:#fff; }
  .adm-subnav button.active { background:var(--acc); border-color:var(--acc); color:#141414; font-weight:600; }
  .adm-pane > .card:last-child { margin-bottom:6px; }

/* ── мобильная полировка ── */
.td-email > div:last-child { min-width: 0; }
.td-email-addr { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1100px) {
  .acc-cols, .table-row { grid-template-columns: minmax(0,1fr) 98px 44px; padding-left:10px; padding-right:8px; }
  .table-row .acc-actions button[title="профиль"],
  .table-row .acc-actions button[title="изменить профиль"],
  .table-row .acc-actions .rest-btn { display:none; }
  .table-row .pill { font-size:10px; padding-left:5px; padding-right:6px; }
  .table-row .td-email { gap:8px; }
}
@media (max-width: 760px) {
  .pub-side { max-height: 265px; overflow-y: auto; }
  #s-messages .acct-col .support-box,
  #s-messages .acct-col .notify-box,
  #s-messages .acct-col .notes-card,
  #s-messages #support-box,
  #s-messages #notes-fold { display: none !important; }
  #s-messages .chat-list { max-height: 40vh; }
  #s-messages .thread { min-height: 46vh; }
}

/* на телефоне публикация — обычный длинный скролл, без вложенных обрезанных колонок */
@media (max-width: 1200px) {
  .pub-layout { display: block; }
  .pub-panel { overflow: visible; }
  .pub-panel-cols { display: flex; flex-direction: column; gap: 12px; height: auto; overflow: visible; }
  .pub-panel-cols > .form-card { height: auto; max-height: none; overflow: visible; }
  .pub-prev-col { height: auto; max-height: none; overflow: visible; }
}
@media (max-width: 1000px) {
  .acc-actions button { min-width: 32px; min-height: 32px; }
}

  .ref-codes { margin-top:8px; }
  .ref-code-row { display:flex; justify-content:space-between; align-items:center; gap:12px;
                  padding:10px 0; border-top:1px solid rgba(255,255,255,.06); flex-wrap:wrap; }
  .ref-code-row:first-child { border-top:0; }
  .ref-code-row .badge { font-size:9px; }

/* мобильное меню: не оставляем тёмную полосу от margin за краем экрана */
@media (max-width: 1000px) {
  .side { margin: 0; }
  .mbar { padding-bottom: 8px; }
  .mbar .burger { min-width: 38px; min-height: 38px; padding: 0 9px; font-size: 16px; border-radius: 10px; }
}

/* публикация: без правой линии/скругления, но без наезда на соседние панели */
.pub-prev-col { margin-right: 0; border-right: 0; border-radius: 14px 0 0 14px; }
@media (min-width: 1201px) {
  /* убираем только пустой padding справа, чтобы колонка дошла до края, не вылезая за content */
  .content:has(#s-publish:not(.hidden)) { padding-right: 0; }
}

/* публикация: убираем 6px служебного padding, иначе справа остаётся вертикальный обрыв */
#s-publish { padding-right: 0; }

/* у правой колонки публикации не должно быть вертикальной границы/фона-обрыва справа */
#s-publish .pub-prev-col {
  background: transparent;
  border-right: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  box-shadow: none;
  scrollbar-width: none;
}
#s-publish .pub-prev-col::-webkit-scrollbar { width: 0; height: 0; }

/* в сообщениях у правой панели нет правой границы и правого скругления */
#s-messages .ctx-card {
  border-right: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

/* сообщения: правая панель без фона-обрыва и вплотную к краю */
@media (min-width: 1001px) {
  .content:has(#s-messages:not(.hidden)) { padding-right: 0; }
}
#s-messages .ctx-card { background: transparent; border-right: 0; }

/* сообщения: без вертикальных границ между блоками */
#s-messages .chat-card,
#s-messages .ctx-card { border: 0; }
#s-messages .acct-col,
#s-messages .chat-list { border-right: 0; }

/* почта: у карточек нет правого скругления и правой границы */
@media (min-width: 1001px) {
  .content:has(#s-mail:not(.hidden)) { padding-right: 0; }
}
#s-mail .card,
#s-mail .mail-head {
  border-right: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

/* верхний правый угол основного листа — всегда прямой */
.content {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

/* внешняя рамка вокруг всего приложения не нужна */
body::after { display: none !important; }

/* магазин — во весь экран, без внешнего «листа» вокруг iframe */
.content:has(#s-shop:not(.hidden)) {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.content:has(#s-shop:not(.hidden)) #s-shop { flex: 1; min-height: 0; }

/* вернуть внутренние разделители колонок сообщений, но не правый внешний край */
#s-messages .acct-col { border-right: 1px solid rgba(255,255,255,.08); }
#s-messages .chat-list { border-right: 1px solid rgba(255,255,255,.08); }
#s-messages .ctx-card { border-left: 1px solid rgba(255,255,255,.08); border-right: 0; }

/* статусы заметок: не разноцветные, а белая подсветка */
.nchip {
  color: #fff !important;
  border-color: rgba(255,255,255,.55) !important;
  background: rgba(255,255,255,.07) !important;
  box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 0 10px rgba(255,255,255,.10);
}

/* пузыри: монохромная схема — свои светлее, собеседник темнее */
.b.mine {
  background: #272d34;
  border-color: #39414a;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}
.b.theirs {
  background: #15191f;
  border-color: #252b33;
}

  /* сообщения: по умолчанию обычные разделители, без неона */
  #s-messages .msg-layout { position:relative; }
  #s-messages .acct-col { position:relative; border-right:1px solid rgba(255,255,255,.10); }
  #s-messages .chat-list { position:relative; border-right:1px solid rgba(255,255,255,.10); }
  #s-messages .ctx-card { position:relative; border-left:1px solid rgba(255,255,255,.075); }
  #s-messages .acct-col::after, #s-messages .chat-list::after,
  #s-messages .ctx-card::before { content:none; display:none; }

  /* тема «Неоновая рамка» — только она включает подсветку */
  body[data-theme="neon"] .content.messages-active {
    border-color:rgba(255,150,70,.68);
    border-right:1px solid rgba(255,150,70,.40);
    box-shadow:0 0 3px rgba(255,235,210,.42),
               0 0 24px rgba(255,140,40,.28),
               0 20px 60px rgba(0,0,0,.35),
               inset 0 1px 0 rgba(255,255,255,.03);
  }
  body[data-theme="neon"] #s-messages .acct-col,
  body[data-theme="neon"] #s-messages .chat-list { border-right:0; box-shadow:none; }
  body[data-theme="neon"] #s-messages .acct-col::after,
  body[data-theme="neon"] #s-messages .chat-list::after,
  body[data-theme="neon"] #s-messages .ctx-card::before {
    content:""; display:block; position:absolute; top:14px; bottom:14px; width:2px;
    border-radius:0; pointer-events:none; z-index:5;
    background:linear-gradient(180deg,#ff7a18 0%,#ffe3c2 50%,#ff7a18 100%);
    box-shadow:0 0 3px rgba(255,235,210,.9), 0 0 12px rgba(255,140,40,.75),
               0 0 28px rgba(255,140,40,.30);
  }
  body[data-theme="neon"] #s-messages .acct-col::after,
  body[data-theme="neon"] #s-messages .chat-list::after { right:-1px; }
  body[data-theme="neon"] #s-messages .ctx-card { border-left:0; box-shadow:none; }
  body[data-theme="neon"] #s-messages .ctx-card::before { left:-1px; }
  @media (max-width:1150px) {
    body[data-theme="neon"] .content.messages-active { border-color:rgba(255,255,255,.08); border-right:0;
      box-shadow:0 20px 60px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.03); }
    body[data-theme="neon"] #s-messages .acct-col::after,
    body[data-theme="neon"] #s-messages .chat-list::after,
    body[data-theme="neon"] #s-messages .ctx-card::before { display:none; }
  }

  .lbc-price-check { margin-top:10px; }
  .lbc-price-card { background:rgba(255,255,255,.025); border:1px solid rgba(255,255,255,.08);
                    border-radius:11px; padding:11px 12px; margin:0; }
  .lbc-price-stats { display:flex; flex-wrap:wrap; gap:7px; margin-top:9px; }
  .lbc-price-stats span { font-size:11px; color:var(--dim); background:rgba(255,255,255,.035);
                          border:1px solid rgba(255,255,255,.06); border-radius:7px; padding:4px 8px; }
  .lbc-price-stats b { color:#fff; font-weight:600; }
  .lbc-delta { font-size:11px; font-weight:600; white-space:nowrap; padding:4px 8px; border-radius:7px; }
  .lbc-delta.over { color:#ff9b8a; background:rgba(255,90,70,.10); border:1px solid rgba(255,90,70,.22); }
  .lbc-delta.under { color:#72e0a3; background:rgba(60,210,120,.10); border:1px solid rgba(60,210,120,.22); }
  .lbc-delta.same { color:#ffb066; background:rgba(255,140,40,.10); border:1px solid rgba(255,140,40,.22); }
  .lbc-ad-list { margin-top:8px; max-height:230px; overflow:auto; border-top:1px solid rgba(255,255,255,.06); }
  .lbc-ad { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:9px; align-items:center;
            padding:6px 2px; border-bottom:1px solid rgba(255,255,255,.045); font-size:11.5px; }
  .lbc-ad a { color:rgba(255,255,255,.78); text-decoration:none; overflow:hidden; text-overflow:ellipsis;
              white-space:nowrap; }
  .lbc-ad a:hover { color:#ffb066; }
  .lbc-ad b { color:#ffb066; font-weight:600; white-space:nowrap; }
  .lbc-ad .kv { white-space:nowrap; }

  .escrow-th { display:flex; align-items:center; gap:6px; }
  .escrow-help-btn { width:15px; height:15px; min-height:0; padding:0; border-radius:50%;
                     border:1px solid rgba(255,255,255,.22); background:rgba(255,255,255,.04);
                     color:rgba(255,255,255,.55); font:600 10px/1 sans-serif; cursor:pointer;
                     display:inline-flex; align-items:center; justify-content:center; }
  .escrow-help-btn:hover { border-color:var(--acc); color:var(--acc2); }
  .escrow-help-modal { position:fixed; inset:0; z-index:9999; background:rgba(0,0,0,.42);
                       display:flex; align-items:center; justify-content:center; padding:20px; }
  .escrow-help-card { width:min(460px,94vw); max-height:80vh; overflow:auto; background:#171b22;
                      border:1px solid rgba(255,255,255,.12); border-radius:14px; padding:16px 17px;
                      box-shadow:0 24px 70px rgba(0,0,0,.55); }
  .escrow-help-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:10px; }
  .escrow-help-head b { font-size:14px; }
  .escrow-help-head button { padding:2px 8px; font-size:16px; }
  .escrow-help-row { display:flex; gap:8px; align-items:flex-start; font-size:11.5px; line-height:1.5;
                     color:rgba(255,255,255,.62); padding:7px 0; border-top:1px solid rgba(255,255,255,.055); }
  .escrow-help-row .pill { flex:0 0 auto; }

/* PDF в чате */
.pdf-ico { display:block; flex:0 0 auto; }
.pdf-btn { display:inline-flex; align-items:center; justify-content:center; padding:7px 9px; }
.pdf-btn .pdf-ico { width:21px; height:21px; }
.b-file { display:inline-flex; align-items:center; gap:8px; margin-top:5px; max-width:100%;
          padding:7px 9px; border:1px solid rgba(229,72,77,.28); border-radius:9px;
          background:rgba(229,72,77,.07); color:#ffd7d8; text-decoration:none; vertical-align:top; }
.b-file:hover { border-color:rgba(229,72,77,.55); background:rgba(229,72,77,.12); color:#fff; }
.b-file .pdf-ico { width:24px; height:24px; }
.b-file-name { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
               color:rgba(255,255,255,.88); font-size:12px; }
.b-file-type { flex:0 0 auto; font-size:9px; font-weight:700; letter-spacing:.08em;
               color:#ff9b9e; border:1px solid rgba(229,72,77,.35); border-radius:4px; padding:2px 4px; }
.b-file-pending { display:inline-flex; align-items:center; gap:6px; color:#ff9b9e; }
.b-file-pending .pdf-ico { width:22px; height:22px; }
.photo-btn { display:inline-flex; align-items:center; justify-content:center; padding:7px 9px; }
.photo-btn .photo-ico { width:21px; height:21px; display:block; }
.b-img-pending { opacity:.72; filter:saturate(.85); }
.b-uploading { display:flex; align-items:center; gap:5px; font-size:10px; color:rgba(255,255,255,.48);
                margin-top:5px; }
.b-uploading .spin { width:11px; height:11px; border-width:1.5px; }

/* тема «жидкий фон»: WebGL-слой за интерфейсом */
#theme-splash-frame {
  position: fixed; inset: 0; width: 100vw; height: 100vh;
  border: 0; z-index: -1; pointer-events: none; background: #07080a;
  filter: saturate(1.25) brightness(1.25);
}
body[data-theme="splash"] { background: transparent; }
body[data-theme="splash"] .content {
  background: transparent; border-color: rgba(255,255,255,.07);
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
}
body[data-theme="splash"] .card {
  background: rgba(23,26,33,.84);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
body[data-theme="splash"] .layout { background: transparent; }

/* всплывающее объявление сайта */
.site-notice-overlay {
  position: fixed; inset: 0; z-index: 10050; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(0,0,0,.74); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px);
  animation: noticeIn .18s ease both;
}
@keyframes noticeIn { from { opacity:0; } to { opacity:1; } }
.site-notice-card {
  position: relative; width: min(1180px, 96vw); max-height: 92vh; overflow-y: auto;
  background: #14181f; border: 1px solid rgba(255,255,255,.12); border-radius: 20px;
  padding: 28px 30px 24px; box-shadow: 0 30px 100px rgba(0,0,0,.7);
}
.site-notice-x {
  position: absolute; top: 12px; right: 14px; width: 34px; height: 34px; border-radius: 9px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); color: rgba(255,255,255,.6);
  font-size: 17px; line-height: 1; cursor: pointer;
}
.site-notice-x:hover { color: #fff; background: rgba(255,255,255,.1); }
.site-notice-kicker { font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.site-notice-head h2 { margin: 8px 0 16px; font-size: 26px; line-height: 1.2; letter-spacing: -.02em; color: #fff; }
.site-notice-img { display: block; width: 100%; max-height: 44vh; object-fit: contain; margin: 0 0 18px;
  border-radius: 12px; background: #0d1015; }
.site-notice-body { font-size: 15px; line-height: 1.55; color: rgba(255,255,255,.82); white-space: pre-wrap;
  overflow-wrap: anywhere; }
.site-notice-foot { display: flex; justify-content: flex-end; margin-top: 24px; padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.07); }
@media (max-width: 700px) {
  .site-notice-overlay { padding: 10px; }
  .site-notice-card { width: 96vw; max-height: 94vh; padding: 22px 18px 18px; border-radius: 16px; }
  .site-notice-head h2 { font-size: 21px; }
  .site-notice-body { font-size: 14px; }
}

/* Архив товаров / Все товары */
.archive-head { display:flex; align-items:flex-start; justify-content:space-between; gap:18px;
                flex-wrap:wrap; margin:4px 0 14px; }
.archive-head h1 { margin:0; font-size:28px; letter-spacing:-.03em; }
.archive-sub { margin-top:5px; color:var(--dim); font-size:12px; }
.archive-tools { display:flex; align-items:center; gap:8px; flex-wrap:wrap; min-width:0; flex:1 1 520px;
                 justify-content:flex-end; }
.archive-tools select { width:auto; min-width:150px; max-width:240px; }
.archive-tools input { flex:1 1 240px; min-width:180px; max-width:420px; }
.archive-tools button { flex:0 0 auto; }
.archive-stats { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin:10px 0 16px;
                 color:var(--dim); font-size:11px; }
.archive-stat { display:inline-flex; align-items:center; gap:5px; padding:5px 9px; border-radius:999px;
                background:rgba(255,255,255,.035); border:1px solid rgba(255,255,255,.07); white-space:nowrap; }
.archive-stat b { color:#fff; font-weight:600; }
.arch-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:16px; }
.arch-card { min-width:0; }
.arch-meta { display:flex; align-items:center; gap:6px; min-width:0; margin-bottom:9px;
             color:var(--dim); font-size:11px; }
.arch-meta > span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.arch-acc { max-width:70%; }
.arch-date { flex:0 0 auto; }
.archive-empty { padding:34px 18px; text-align:center; color:var(--dim); font-size:12px;
                 border:1px dashed rgba(255,255,255,.12); border-radius:14px; }
@media (max-width: 900px) {
  .archive-head { display:block; }
  .archive-tools { justify-content:flex-start; margin-top:12px; }
  .archive-tools select, .archive-tools input { max-width:none; flex:1 1 100%; width:100%; }
  .archive-tools button { flex:1 1 auto; }
  .arch-grid { grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:10px; }
}

/* страницы архива/всех товаров должны скроллиться внутри .content */
#s-archive:not(.hidden),
#s-allads:not(.hidden) {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  padding-bottom: 18px;
}
.arch-send { margin: 8px 0 2px; font-size: 11px; color: var(--dim); }
.arch-send b { color: #fff; font-weight: 600; }
.arch-send { margin: 8px 0 2px; font-size: 11px; color: var(--dim); }
.arch-send b { color: #fff; font-weight: 600; }

/* чаты по товару — только архивные карточки */
.ad-chats-box { width:min(760px,96vw); max-height:88vh; display:flex; flex-direction:column;
  background:var(--card); border:1px solid var(--line); border-radius:18px; overflow:hidden; }
.ad-chats-head { display:flex; align-items:flex-start; gap:12px; padding:14px 16px;
  border-bottom:1px solid var(--line); }
.ad-chats-head h2 { font-size:16px; overflow-wrap:anywhere; }
.ad-chats-head button { margin-left:auto; flex:0 0 auto; }
.ad-chats-body { overflow-y:auto; padding:12px 14px 16px; min-height:80px; }
.ad-chat { border:1px solid var(--line); border-radius:12px; margin-bottom:10px; overflow:hidden; }
.ad-chat-head { display:flex; align-items:center; justify-content:space-between; gap:8px;
  padding:9px 11px; background:rgba(255,255,255,.025); }
.ad-chat-head .kv { margin-left:7px; font-size:10px; }
.ad-chat-msgs { padding:8px 10px 10px; display:flex; flex-direction:column; gap:5px; max-height:300px;
  overflow-y:auto; }
.ad-msg { padding:6px 8px; border-radius:9px; max-width:88%; font-size:12px; line-height:1.4; }
.ad-msg.in { background:rgba(255,255,255,.055); align-self:flex-start; }
.ad-msg.out { background:rgba(255,122,0,.14); align-self:flex-end; }
.ad-msg-text { white-space:pre-wrap; overflow-wrap:anywhere; }
.ad-msg-date { color:var(--dim); font-size:9.5px; margin-top:2px; }
@media (max-width:700px) { .ad-chats-box { width:100%; max-height:100%; border-radius:0; } }
.ad-atts { display:flex; flex-wrap:wrap; gap:6px; margin-top:5px; }
.ad-att-img { max-width:180px; max-height:180px; border-radius:8px; border:1px solid var(--line); object-fit:cover; cursor:zoom-in; }
.ad-att-file { display:inline-flex; align-items:center; gap:4px; font-size:11px; color:#ffb06b;
  border:1px solid rgba(255,140,40,.25); padding:4px 7px; border-radius:7px; text-decoration:none; }
.orders-box { width:min(640px,96vw); max-height:88vh; overflow-y:auto; }
.orders-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:10px; }
.orders-row { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 0;
  border-top:1px solid var(--line); }
.orders-row:first-child { border-top:0; }
.orders-row .kv { margin-top:4px; }

/* ── мобильный чат: список → полноэкранный диалог ── */
.mobile-thread-back { display:none; }
@media (max-width: 760px) {
  #s-messages { display:flex; flex-direction:column; overflow:hidden; }
  #s-messages .msg-layout { display:flex; flex-direction:column; flex:1 1 auto; min-height:0; overflow:hidden; gap:0; }
  #s-messages .chat-card { flex:1 1 auto; min-height:0; display:flex; flex-direction:column;
    margin:0; padding:0; border:0; background:transparent; }
  #s-messages .chat { flex:1 1 auto; min-height:0; display:flex; flex-direction:column; gap:0; }
  #s-messages .acct-col { flex:0 0 auto; padding:0 0 8px; gap:6px; border:0; overflow:visible; }
  #s-messages .acct-col .row { display:grid; grid-template-columns:1fr; gap:6px; margin:0; }
  #s-messages .acct-col .row button { width:100%; min-height:36px; font-size:12px; padding:6px 8px; }
  #s-messages .acct-col > .ctx-fold { margin:0; }
  #s-messages .chat-list { flex:1 1 auto; max-height:none; min-height:0; overflow-y:auto;
    border:0; padding:0 0 10px; }
  #s-messages .thread { display:none; }
  #s-messages .ctx-card { display:none; }

  #s-messages.thread-open .acct-col,
  #s-messages.thread-open .chat-list,
  #s-messages.thread-open .ctx-card { display:none !important; }
  #s-messages.thread-open .thread { display:flex; flex:1 1 auto; min-height:0; min-width:0;
    padding:0; border:0; }
  #s-messages.thread-open .thread .chat-tzbar { display:none; }
  #s-messages.thread-open .mobile-thread-back { display:inline-flex; align-items:center; align-self:flex-start;
    gap:4px; min-height:32px; padding:4px 9px; margin:0 0 7px; border-radius:8px;
    border:1px solid var(--line); background:rgba(255,255,255,.04); color:var(--dim);
    font-size:12px; }
  #s-messages.thread-open .thread-head { flex:0 0 auto; overflow-x:auto; scrollbar-width:none; }
  #s-messages.thread-open .thread-head::-webkit-scrollbar { display:none; }
  #s-messages.thread-open .bubbles { flex:1 1 auto; min-height:0; overflow-y:auto;
    padding-bottom:6px; }
  #s-messages.thread-open .composer { flex:0 0 auto; position:sticky; bottom:0; z-index:5;
    background:var(--card); padding-bottom:calc(6px + env(safe-area-inset-bottom, 0px)); }
  #s-messages.thread-open .quick-bar { flex:0 0 auto; overflow-x:auto; flex-wrap:nowrap; }
  #s-messages.thread-open .quick-bar > * { flex:0 0 auto; }
  #s-messages.thread-open .chat-tr { flex:0 0 auto; }
}

/* мобильный composer */
@media (max-width: 760px) {
  #s-messages.thread-open .composer {
    display:flex; flex-wrap:wrap; align-items:flex-end; gap:6px;
  }
  #s-messages.thread-open .composer-input { flex:1 1 100%; width:100%; min-width:0; }
  #s-messages.thread-open .composer .primary { flex:1 1 auto; min-width:120px; min-height:40px; padding:6px 12px; }
  #s-messages.thread-open .composer .photo-btn,
  #s-messages.thread-open .composer .pdf-btn { flex:0 0 40px; width:40px; min-width:40px; padding:6px; }
}
@media (max-width: 760px) {
  .toast { z-index:60; left:10px; right:10px; bottom:calc(16px + env(safe-area-inset-bottom, 0px));
    max-width:none; font-size:12.5px; padding:10px 12px; }
  body:has(#s-messages.thread-open) .toast { bottom:calc(170px + env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 760px) {
  .mobile-tools-btn { display:none; align-self:flex-start; align-items:center; gap:4px;
    min-height:32px; padding:4px 9px; margin:0 0 7px 4px; border-radius:8px;
    border:1px solid var(--line); background:rgba(255,255,255,.04); color:var(--dim); font-size:12px; }
  #s-messages.thread-open .mobile-tools-btn { display:inline-flex; }
  #s-messages.thread-open .mobile-thread-back { margin-bottom:7px; }
  /* карточка «Диалог» остаётся доступной ниже чата: там ИИ, перевод, статус */
  #s-messages.thread-open .ctx-card { display:block !important; margin:12px 0 0; }
  #s-messages.thread-open .ctx-card .ctx { max-height:none; }
  #s-messages.thread-open { overflow-y:auto; display:block; }
  #s-messages.thread-open .chat-card { flex:0 0 auto; height:calc(100dvh - 90px); }
  #s-messages.thread-open .msg-layout { overflow:visible; min-height:0; }
}

/* компактная шапка мобильного диалога */
.mobile-thread-top { display: contents; }
@media (max-width: 760px) {
  body:has(#s-messages.thread-open) .mbar { display: none; }
  #s-messages.thread-open .mobile-thread-top {
    display: flex; align-items: center; gap: 6px; flex: 0 0 auto;
    position: sticky; top: 0; z-index: 8; background: var(--card);
    padding: 2px 0 6px; min-width: 0;
  }
  #s-messages.thread-open .mobile-thread-back,
  #s-messages.thread-open .mobile-tools-btn {
    flex: 0 0 36px; width: 36px; min-width: 36px; height: 36px; min-height: 36px;
    padding: 0; margin: 0; justify-content: center; align-items: center;
    border-radius: 9px; font-size: 16px; line-height: 1;
  }
  #s-messages.thread-open .mobile-tools-btn { font-size: 15px; }
  #s-messages.thread-open .mt-label { display: none; }
  #s-messages.thread-open .thread-head {
    flex: 1 1 auto; min-width: 0; width: auto; margin: 0; padding: 0;
    border: 0; background: transparent; border-radius: 0; overflow: hidden;
    display: flex; align-items: center; min-height: 36px;
  }
  #s-messages.thread-open .thread-head .th-actions,
  #s-messages.thread-open .thread-head .th-more,
  #s-messages.thread-open .thread-head .th-sep-more { display: none; }
  #s-messages.thread-open .thread-head .th-info { flex: 1 1 auto; min-width: 0; overflow: hidden; }
  #s-messages.thread-open .thread-head .th-name { max-width: 100%; display: block; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
  #s-messages.thread-open .thread-head .th-reviews,
  #s-messages.thread-open .thread-head .th-dim { font-size: 10px; }
  #s-messages.thread-open .chat-card { height: calc(100dvh - 42px); }
}

/* мобильные инструменты ИИ — поверх чата, сам чат не растягивается */
@media (max-width: 760px) {
  #s-messages .ctx-card,
  #s-messages.thread-open .ctx-card { display:none !important; }
  .mobile-tools-overlay { align-items:flex-end; padding:0; z-index:80; }
  .mobile-tools-sheet { width:100%; max-height:88dvh; display:flex; flex-direction:column;
    background:var(--card); border:1px solid var(--line); border-radius:18px 18px 0 0;
    box-shadow:0 -20px 60px rgba(0,0,0,.65); overflow:hidden; }
  .mobile-tools-head { display:flex; align-items:center; justify-content:space-between; gap:10px;
    padding:12px 14px; border-bottom:1px solid var(--line); flex:0 0 auto; }
  .mobile-tools-head b { font-size:14px; }
  .mobile-tools-body { overflow-y:auto; padding:10px 12px calc(18px + env(safe-area-inset-bottom, 0px)); }
  .mobile-tools-body .ctx-card { display:block !important; margin:0; padding:0; border:0;
    background:transparent; border-radius:0; }
  .mobile-tools-body .ctx-card > h2 { display:none; }
  .mobile-tools-body .ctx { max-height:none; }
}

@media (max-width: 760px) {
  body:has(#s-messages.thread-open) .content {
    height: 100dvh; margin: 0; border-radius: 0;
    padding: 6px 8px calc(4px + env(safe-area-inset-bottom, 0px));
  }
  body:has(#s-messages.thread-open) #s-messages { height: calc(100dvh - 10px); }
  #s-messages.thread-open .chat-card { height: calc(100dvh - 10px); }
}

/* компактный выбор чата */
.acct-actions { display:flex; flex-direction:column; gap:6px; }
.acct-actions button { width:100%; }
.ma-ico { display:none; }
.conv-search { width:100%; margin-top:6px; height:38px; font-size:12.5px; }
@media (max-width: 760px) {
  #s-messages .acct-col > label.f { display:none; }
  #s-messages .acct-col .acct-actions {
    display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:6px; margin:0;
  }
  #s-messages .acct-col .acct-actions button {
    min-height:40px; height:40px; padding:0 4px; font-size:16px; border-radius:10px;
  }
  #s-messages .acct-col .ma-txt { display:none; }
  #s-messages .acct-col .ma-ico { display:inline-flex; align-items:center; justify-content:center; }
  #s-messages .conv-search { margin-top:0; height:40px; font-size:16px; }
  #s-messages .chat-list { padding-top:4px; }
  #s-messages .chat-list .conv {
    padding:10px 7px; margin:0 0 2px; border-radius:10px;
    border-bottom:1px solid rgba(255,255,255,.055);
  }
  #s-messages .chat-list .conv:last-child { border-bottom:0; }
  #s-messages .chat-list .conv-pic { width:46px; height:46px; flex-basis:46px; }
  #s-messages .chat-list .conv-time { top:10px; right:8px; }
  #s-messages .chat-list .conv .t { font-size:13.5px; padding-right:48px; }
  #s-messages .chat-list .conv-prev { font-size:12px; margin-top:2px; }
}

/* действия аккаунта — одна кнопка на телефоне */
.acct-select-row { display:flex; align-items:center; gap:6px; width:100%; }
.acct-select-row #msg-acc { flex:1 1 auto; min-width:0; }
.acct-menu-btn { display:none; flex:0 0 40px; width:40px; height:40px; min-height:40px;
  padding:0; border-radius:10px; font-size:20px; line-height:1; }
@media (max-width: 760px) {
  #s-messages .acct-col .acct-actions,
  #s-messages .acct-col #ar-fold,
  #s-messages .acct-col #support-box,
  #s-messages .acct-col #msg-notify-box,
  #s-messages .acct-col #notes-fold { display:none !important; }
  .acct-menu-btn { display:inline-flex; align-items:center; justify-content:center; }
  .chat-actions-sheet { max-height:88dvh; }
  .chat-actions-body { display:flex; flex-direction:column; gap:8px; }
  .chat-actions-body .acct-actions { display:flex; flex-direction:column; gap:8px; }
  .chat-actions-body .acct-actions button { width:100%; min-height:42px; }
  .chat-actions-body .ctx-fold { margin:0; }
  .chat-actions-body .ar-box { margin-top:6px; }
}

/* админ-таблицы: горизонтальный скролл на телефоне */
.admin-table-scroll { width:100%; max-width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch;
  touch-action:pan-x pan-y; padding-bottom:3px; }
#s-admin .admin-table-scroll > table { display:table; width:max-content; min-width:720px;
  table-layout:auto; overflow:visible; }

/* платёжная аналитика создателя */
.pay-kpis { display:grid; grid-template-columns:repeat(auto-fit, minmax(170px, 1fr)); gap:10px; margin-bottom:14px; }
.pay-kpi { background:rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.07); border-radius:10px; padding:10px 12px; }
.pay-kpi .n { font-size:20px; font-weight:700; margin:3px 0 2px; }
.pay-chart { display:flex; align-items:flex-end; gap:4px; height:120px; padding:8px 4px 0; border-bottom:1px solid rgba(255,255,255,.08); overflow-x:auto; }
.pay-col { display:flex; flex-direction:column; align-items:center; justify-content:flex-end; gap:3px; min-width:16px; flex:1 0 16px; }
.pay-col span { font-size:9px; color:var(--dim); white-space:nowrap; transform:rotate(-45deg); transform-origin:top left; height:16px; }
.pay-stack { display:flex; flex-direction:column-reverse; width:100%; max-width:22px; border-radius:3px 3px 0 0; overflow:hidden; }
.pay-stack i { display:block; width:100%; }

/* реферальная программа: карточки и ссылка */
.ref-hero { padding:18px 20px; }
.ref-hero-top { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.ref-hero-sub { color:var(--dim); font-size:13px; }
.ref-hero-sub b { color:var(--txt); }
.ref-kpis { display:grid; grid-template-columns:repeat(auto-fit, minmax(150px, 1fr)); gap:10px; margin:14px 0; }
.ref-kpi { background:rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.07); border-radius:10px; padding:10px 12px; }
.ref-kpi.main { border-color:rgba(255,140,40,.35); background:rgba(255,140,40,.06); }
.ref-kpi .n { font-size:22px; font-weight:700; margin-top:2px; }
.ref-invite-box { background:rgba(255,255,255,.025); border:1px solid rgba(255,255,255,.07); border-radius:10px; padding:12px; }
.ref-link-row { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.ref-link-row input { flex:1 1 320px; min-width:200px; font-family:ui-monospace, SFMono-Regular, Menlo, monospace; font-size:12px; }
.ref-code-meta { color:var(--dim); font-size:12px; margin-top:7px; }
.ref-progress { margin-top:12px; font-size:13px; color:#ffb15c; }
.ref-levels { display:flex; gap:6px; flex-wrap:wrap; margin-top:8px; }
.ref-chip { font-size:11px; border:1px solid rgba(255,255,255,.1); border-radius:99px; padding:3px 9px; color:var(--dim); }
.ref-chip.on { color:#ffb15c; border-color:rgba(255,140,40,.45); background:rgba(255,140,40,.08); }
.ref-people .ref-table { margin-top:4px; }
.ref-money-top { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.ref-extra .ref-code-row { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:8px 0; border-top:1px solid rgba(255,255,255,.06); }
.ref-extra .ref-code-row:first-of-type { border-top:0; }

/* платёжная аналитика — читаемая витрина */
.pay-hero { display:grid; grid-template-columns:1.25fr 1fr; gap:12px; margin-bottom:12px; }
.pay-hero-main, .pay-hero-side { border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.025); }
.pay-hero-main { padding:16px 18px; background:linear-gradient(140deg,rgba(255,140,40,.10),rgba(255,255,255,.02) 55%); }
.pay-eyebrow { color:var(--dim); font-size:10px; letter-spacing:.09em; text-transform:uppercase; font-weight:600; }
.pay-big { font-size:38px; line-height:1.05; letter-spacing:-.04em; font-weight:700; margin:6px 0 3px; }
.pay-hero-sub { color:var(--dim); font-size:12px; }
.pay-hero-live { color:var(--dim); font-size:11px; margin-top:10px; }
.pay-hero-live b { color:#fff; }
.pay-hero-side { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); overflow:hidden; }
.pay-hero-side > div { padding:13px 12px; border-left:1px solid var(--line); min-width:0; }
.pay-hero-side > div:first-child { border-left:0; }
.pay-hero-side span { display:block; color:var(--dim); font-size:10px; text-transform:uppercase; letter-spacing:.05em; }
.pay-hero-side b { display:block; font-size:17px; margin-top:4px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pay-hero-side small { display:block; color:var(--dim); font-size:10px; margin-top:2px; white-space:nowrap; }
.pay-kpis { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; margin-bottom:12px; }
.pay-kpi { background:rgba(255,255,255,.025); border:1px solid var(--line); border-radius:11px; padding:10px 11px; min-width:0; }
.pay-kpi .n { font-size:17px; font-weight:700; margin:3px 0 2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pay-block { border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.018); padding:13px 14px; margin-bottom:12px; min-width:0; }
.pay-block-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:8px; }
.pay-block-head h3 { margin:0; font-size:13px; font-weight:600; }
.pay-legend { display:flex; gap:11px; color:var(--dim); font-size:10.5px; white-space:nowrap; }
.pay-legend span::before { content:''; display:inline-block; width:7px; height:7px; border-radius:2px; margin-right:4px; vertical-align:0; }
.pay-legend .rev::before { background:#ff8c28; }
.pay-legend .dep::before { background:#3fb950; }
.pay-chart-scroll { width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; }
.pay-chart-svg { display:block; width:100%; min-width:560px; height:auto; }
.pay-footnote { color:var(--dim); font-size:10.5px; margin-top:7px; line-height:1.4; }
.pay-empty { color:var(--dim); font-size:12px; padding:16px 2px; }
.pay-table-wrap { width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; }
.pay-table { width:100%; border-collapse:collapse; font-size:12px; min-width:0; }
.pay-table th { text-align:left; color:var(--dim); font-size:9.5px; font-weight:500; text-transform:uppercase;
  letter-spacing:.05em; padding:6px 7px; border-bottom:1px solid var(--line); white-space:nowrap; }
.pay-table td { padding:7px; border-bottom:1px solid rgba(255,255,255,.055); vertical-align:middle; }
.pay-table tr:last-child td { border-bottom:0; }
.pay-table .num { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.pay-table .pos { color:#3fb950; }
.pay-table .neg { color:#f0616d; }
.pay-rank { display:inline-flex; align-items:center; justify-content:center; width:18px; height:18px;
  border-radius:50%; background:rgba(255,255,255,.07); color:var(--dim); font-size:10px; }
.pay-two-col { display:grid; grid-template-columns:1fr 1fr; gap:12px; align-items:start; }
.pay-two-col > .pay-block { margin-bottom:0; }
.pay-recent { min-width:560px; }
@media (max-width: 900px) {
  .pay-hero { grid-template-columns:1fr; }
  .pay-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .pay-two-col { grid-template-columns:1fr; }
  .pay-big { font-size:32px; }
}
@media (max-width: 520px) {
  .pay-hero-side { grid-template-columns:1fr 1fr; }
  .pay-hero-side > div:nth-child(3) { grid-column:1/-1; border-left:0; border-top:1px solid var(--line); }
  .pay-kpis { gap:7px; }
  .pay-kpi { padding:9px; }
  .pay-kpi .n { font-size:15px; }
  .pay-block { padding:11px 10px; }
  .pay-big { font-size:29px; }
}
#pay-stats-days { width:auto; min-width:140px; max-width:190px; }
@media (max-width: 760px) {
  #pay-stats-days { width:100%; max-width:none; }
}
@media (max-width: 760px) {
  .adm-subnav, #s-settings .subnav { flex-wrap:nowrap; overflow-x:auto; -webkit-overflow-scrolling:touch;
    scrollbar-width:none; padding-bottom:3px; }
  .adm-subnav::-webkit-scrollbar, #s-settings .subnav::-webkit-scrollbar { display:none; }
  .adm-subnav button, #s-settings .subnav button { flex:0 0 auto; white-space:nowrap; }
}
.pay-exclude { margin:0 0 10px; padding:8px 11px; border:1px solid rgba(255,255,255,.1);
  border-radius:9px; color:var(--dim); font-size:11px; background:rgba(255,255,255,.025); }
.pay-exclude b { color:#fff; font-weight:600; }
.pay-hero-main { display:flex; align-items:stretch; justify-content:space-between; gap:18px; flex-wrap:wrap; }
.pay-hero-primary { min-width:220px; flex:1 1 240px; }
.pay-hero-net { display:flex; flex-direction:column; justify-content:center; gap:9px; min-width:210px;
  flex:0 1 280px; padding-left:18px; border-left:1px solid rgba(255,255,255,.12); }
.pay-net-row { display:grid; grid-template-columns:1fr auto; gap:0 10px; align-items:baseline; }
.pay-net-row span { color:var(--dim); font-size:10px; text-transform:uppercase; letter-spacing:.05em; grid-column:1; }
.pay-net-row small { color:var(--dim); font-size:10px; grid-column:1; margin-top:1px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pay-net-row b { grid-column:2; grid-row:1 / span 2; font-size:23px; line-height:1.1; letter-spacing:-.03em; white-space:nowrap; }
.pay-net-row b.neg { color:#f0616d; }
.pay-net-row.net b { color:#3fb950; }
@media (max-width: 700px) {
  .pay-hero-net { border-left:0; border-top:1px solid var(--line); padding-left:0; padding-top:10px;
    display:grid; grid-template-columns:1fr 1fr; gap:10px; flex-basis:100%; }
  .pay-net-row { display:flex; flex-direction:column; gap:2px; }
  .pay-net-row b { font-size:20px; }
  .pay-net-row small { white-space:normal; }
}

/* приёмка / реквизиты */
#s-reception:not(.hidden) { flex:1 1 auto; min-height:0; overflow-y:auto; overflow-x:hidden; padding-right:6px; padding-bottom:18px; }
.reception-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; align-items:start; }
.reception-grid .card { margin-bottom:12px; }
.rec-account-card { border-color:rgba(62,207,142,.28); }
.rec-details { display:grid; gap:7px; margin-top:10px; }
.rec-details > div { display:grid; grid-template-columns:110px minmax(0,1fr); gap:8px; align-items:baseline; }
.rec-details span { color:var(--dim); font-size:10px; text-transform:uppercase; letter-spacing:.04em; }
.rec-details b { font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:12.5px; overflow-wrap:anywhere; }
.reception-form { display:grid; grid-template-columns:1fr 1fr; gap:9px; margin:12px 0 14px;
  padding:12px; border:1px dashed var(--line); border-radius:11px; }
.reception-form .f { margin:0; }
.reception-form textarea { min-height:58px; }
.reception-list { display:flex; flex-direction:column; gap:0; }
.reception-row { display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:10px 0; border-top:1px solid var(--line); }
.reception-row:first-child { border-top:0; }
.reception-row .row select { max-width:190px; }
@media (max-width: 800px) {
  .reception-grid { grid-template-columns:1fr; gap:0; }
  .reception-form { grid-template-columns:1fr; }
  .reception-row { align-items:flex-start; flex-direction:column; }
  .reception-row .row { width:100%; flex-wrap:wrap; }
  .reception-row .row select { flex:1 1 150px; max-width:none; }
  .rec-details > div { grid-template-columns:90px minmax(0,1fr); }
}

/* генератор фото с запиской */
#s-imagenote:not(.hidden) { flex:1 1 auto; min-height:0; overflow-y:auto; padding-right:6px; padding-bottom:18px; }
.imagenote-grid { display:grid; grid-template-columns:minmax(0,0.9fr) minmax(0,1.1fr); gap:14px; align-items:start; }
.imagenote-grid .card { margin-bottom:0; }
.imagenote-preview { margin:10px 0 12px; border:1px dashed var(--line); border-radius:12px; overflow:hidden;
  aspect-ratio:4/3; display:flex; align-items:center; justify-content:center; background:rgba(255,255,255,.025); }
.imagenote-preview img { width:100%; height:100%; object-fit:contain; }
.imagenote-empty { color:var(--dim); font-size:12px; text-align:center; padding:20px; }
.imagenote-result { min-height:320px; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.imagenote-result img { width:100%; max-height:68vh; object-fit:contain; border-radius:10px; }
.imagenote-download { display:inline-flex; align-items:center; gap:5px; padding:8px 12px; border-radius:9px;
  background:var(--acc); color:#141414; font-weight:600; text-decoration:none; font-size:12px; }
.imagenote-field input[type=file] { margin-bottom:4px; }
@media (max-width: 850px) {
  .imagenote-grid { grid-template-columns:1fr; }
  .imagenote-result { min-height:180px; }
}

/* свёрнутые блоки в раскрытой карточке аккаунта */
.acc-fold { margin-top:10px; border:1px solid rgba(255,255,255,.06); border-radius:10px;
            background:rgba(255,255,255,.02); overflow:hidden; }
.acc-fold > summary { cursor:pointer; padding:10px 14px; font-size:12px; color:var(--dim);
                      list-style:none; display:flex; align-items:center; gap:8px; user-select:none; }
.acc-fold > summary::-webkit-details-marker { display:none; }
.acc-fold > summary::before { content:'▸'; font-size:10px; color:var(--acc); }
.acc-fold[open] > summary::before { content:'▾'; }
.acc-fold > summary:hover { color:var(--txt); background:rgba(255,255,255,.03); }
.acc-fold-body { padding:4px 14px 12px; }
.acc-fold-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:12px; }
.acc-fold-grid > div { min-width:0; }

/* реф-уровни: без прогнозов и двусмысленных подписей */
.ref-tier-box { margin-top:12px; padding:12px 13px; border:1px solid rgba(255,255,255,.08);
  border-radius:11px; background:rgba(255,255,255,.025); }
.ref-tier-head { display:flex; align-items:baseline; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.ref-tier-title { font-size:12px; font-weight:600; letter-spacing:.02em; }
.ref-tier-box .ref-progress { margin-top:7px; color:#ffb15c; font-size:12.5px; line-height:1.45; }
.ref-tier-box .ref-levels { margin-top:9px; }
.ref-tier-note { margin-top:9px; color:var(--dim); font-size:11px; line-height:1.45; }
@media (max-width:600px) {
  .ref-tier-head { display:block; }
  .ref-tier-head .kv { margin-top:3px; }
}

/* реф-уровни: визуальная лестница */
.ref-tier-head { align-items:flex-end; }
.ref-tier-caption { color:var(--dim); font-size:11px; margin-top:4px; }
.ref-tier-current { display:flex; align-items:baseline; gap:6px; white-space:nowrap; }
.ref-tier-current span { color:var(--dim); font-size:11px; }
.ref-tier-current b { font-size:24px; letter-spacing:-.03em; }
.ref-tier-bar { height:7px; margin-top:12px; border-radius:99px; background:rgba(255,255,255,.07); overflow:hidden; }
.ref-tier-bar i { display:block; height:100%; border-radius:99px; background:linear-gradient(90deg,#ff8a2a,#ffb15c); transition:width .3s ease; }
.ref-tier-next { margin-top:9px; color:#ffb15c; font-size:12.5px; }
.ref-tier-next b { color:#ffd19b; }
.ref-tier-steps { display:grid; grid-template-columns:repeat(auto-fit,minmax(145px,1fr)); gap:8px; margin-top:12px; }
.ref-step { padding:9px 10px; border:1px solid rgba(255,255,255,.08); border-radius:9px;
  background:rgba(255,255,255,.025); min-width:0; }
.ref-step-top { display:flex; align-items:baseline; justify-content:space-between; gap:8px; }
.ref-step-top span { color:var(--dim); font-size:10.5px; }
.ref-step-top b { font-size:16px; }
.ref-step-state { color:var(--dim); font-size:10.5px; margin-top:4px; }
.ref-step.next { border-color:rgba(255,140,40,.45); background:rgba(255,140,40,.07); }
.ref-step.next .ref-step-top b { color:#ffb15c; }
.ref-step.done { border-color:rgba(62,207,142,.32); background:rgba(62,207,142,.055); }
.ref-step.done .ref-step-top b { color:#3ecf8e; }
.ref-step.done .ref-step-state { color:#3ecf8e; }
.ref-tier-box .ref-tier-note { margin-top:11px; }
@media (max-width:600px) {
  .ref-tier-current { margin-top:4px; }
  .ref-tier-steps { grid-template-columns:1fr; }
}
