.account-page-heading.page-heading{margin-bottom:15px;gap:14px;align-items:center}
.account-page-heading h1{font-size:clamp(23px,1.7vw,28px);font-weight:600;letter-spacing:-.4px;margin-bottom:4px}
.account-page-heading p{font-size:12px;line-height:1.4;color:#b9c2cd}
.account-page-heading .heading-actions{align-items:center;flex-shrink:0;gap:11px}
.account-page-heading .heading-actions .btn{height:36px;min-height:36px;padding:6px 12px;gap:7px;font-size:12px;border-radius:8px;white-space:nowrap}
.account-page-heading .heading-actions .btn-primary{background:#1675ec;border-color:#287eea;color:#fff}
.account-page-heading .heading-actions .btn-primary:hover{background:#2887ff}
.account-page-heading .heading-actions .btn-ghost{background:#171b20;border-color:#30353c;color:#e1e6ec}
.account-page-heading .heading-actions .btn-ghost:hover{background:#242a31;border-color:#424c57}
.account-icon{display:inline-block;vertical-align:middle;width:16px;height:16px;flex:0 0 auto;color:inherit}
.account-filters.panel{display:flex;flex-wrap:wrap;gap:9px clamp(10px,1.45vw,23px);padding:11px 14px;margin:0 0 10px;align-items:end;background:#191d21;border-color:#30353c;overflow:visible}
.account-filters .field{flex:1 1 125px;min-width:0;max-width:clamp(200px,19vw,340px);gap:5px}
.account-filter-field>span{font-size:11px;color:#c5cdd6;line-height:1.3}
.account-filter-control{position:relative;display:block;min-width:0;width:100%}
.account-filter-control>.account-icon{position:absolute;left:10px;top:50%;transform:translateY(-50%);width:15px;height:15px;color:#b6c0cd;pointer-events:none;z-index:1}
.account-filters .field select,.account-filters .field input{height:34px;min-height:34px;min-width:0;width:100%;max-width:100%;font-size:12px;border-radius:7px;padding:6px 10px;background:#15191d;border-color:#30363d;text-overflow:ellipsis}
.account-filters .account-filter-control select,.account-filters .account-filter-control input{padding-left:32px}
.account-filters .field select:hover,.account-filters .field input:hover{border-color:#434b55}
.account-filters .field select:focus,.account-filters .field input:focus{border-color:#5b93c9}
.account-table-wrap{overflow:visible;min-width:0;max-width:100%;width:100%;background:#15191d;border-color:#2d333a}
/* Fixed proportional colgroups supplied by each account view. Contents may
   truncate their labels, not the actual resource counts or currency amounts. */
.account-table{table-layout:fixed;width:100%;max-width:100%;min-width:0;border-collapse:separate;border-spacing:0;text-align:left;white-space:nowrap;font-variant-numeric:tabular-nums}
.account-table th,.account-table td,.account-table col{min-width:0}
.account-table th{font-size:clamp(10px,.85vw,12px);font-weight:500;letter-spacing:0;color:#c1c9d3;text-transform:uppercase;background:#1a1e22;padding:10px clamp(7px,.85vw,16px);line-height:1.25;height:34px;border-bottom:1px solid #2e3339;white-space:normal;overflow-wrap:anywhere}
.account-table thead th:first-child{border-top-left-radius:var(--radius)}
.account-table thead th:last-child{border-top-right-radius:var(--radius);text-align:right}
.account-table tbody tr{height:50px;background:#15191d}
.account-table tbody tr:not(.empty-row):hover{background:#1b2025}
.account-table tbody td{padding:6px clamp(7px,.85vw,16px);font-size:clamp(11px,.97vw,14px);vertical-align:middle;line-height:1.3;color:#e3e8ee;border-bottom:1px solid #282d33;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.account-table tbody tr:last-child td{border-bottom:0}
.account-table tbody tr:last-child td:first-child{border-bottom-left-radius:var(--radius)}
.account-table tbody tr:last-child td:last-child{border-bottom-right-radius:var(--radius)}
.account-table .actions-cell{min-width:0;width:auto;overflow:visible;text-align:right;position:relative}
.account-table .actions-cell:has(.account-menu[open]){z-index:160}
.account-table td[data-label="Ресурсы"],.account-table td[data-label="Daily Spend"],.account-table td[data-label="Расходы"],.account-table td[data-label="Статус профиля"],.account-table td[data-label="Статус кабинета"],.account-table td[data-label="Статус"],.account-table td[data-label="Дата обновления"]{white-space:normal;overflow:visible;overflow-wrap:anywhere}
.account-table td[data-label="Тег"]{min-width:0}
.account-cell-text{display:block;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.account-table td[data-label="Daily Spend"] .account-cell-text,.account-table td[data-label="Дата обновления"] .account-cell-text{white-space:normal;overflow:visible;overflow-wrap:anywhere}
.account-identity{width:100%;min-width:0;display:flex;gap:clamp(7px,.85vw,14px);align-items:center}
.account-identity-icon{display:grid;place-items:center;width:clamp(30px,2.6vw,39px);height:clamp(30px,2.6vw,39px);flex:0 0 auto;border:1px solid #30363e;border-radius:8px;background:#22272d;color:#1887f5}
.account-identity-icon>.account-icon,.account-identity-icon svg{width:74%;height:74%}
.account-identity-copy{flex:1 1 0;min-width:0;overflow:hidden}
.account-title{font-size:clamp(12px,1vw,15px);font-weight:600;color:#f0f3f7;line-height:1.25;overflow-wrap:anywhere}
.account-secondary{font-size:11px;color:#aab5c2;line-height:1.35;margin-top:3px;overflow-wrap:anywhere}
.account-identity-copy .account-title,.account-identity-copy .account-secondary{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.account-identity-copy .account-secondary{font-size:clamp(10px,.9vw,12px)}
.account-resource-counters{--account-resource-gap:clamp(7px,.93vw,15px);display:flex;align-items:center;gap:var(--account-resource-gap);min-width:0;max-width:100%;flex-wrap:nowrap}
.account-resource-counter{display:inline-flex;align-items:center;justify-content:center;gap:clamp(3px,.5vw,6px);max-width:100%;min-width:0;flex:0 1 auto;position:relative;padding:5px clamp(5px,.65vw,11px);border:1px solid #31373f;border-radius:7px;background:#1e2328;color:#dbe3ec;line-height:1.1;font-variant-numeric:tabular-nums}
.account-resource-counter+.account-resource-counter::before{content:"";position:absolute;left:calc(-1 * var(--account-resource-gap) / 2);top:50%;height:12px;width:1px;background:#535f6b;transform:translate(-50%,-50%);pointer-events:none}
.account-resource-counter .account-icon,.account-resource-counter svg{width:clamp(12px,1.1vw,16px);height:clamp(12px,1.1vw,16px);color:#c7d1dc;flex:none}
.account-resource-counter strong{min-width:0;font-size:clamp(10px,1vw,14px);font-weight:500;line-height:1.2;white-space:normal;overflow-wrap:anywhere;word-break:normal;text-align:center;color:#edf1f6}
.account-state{display:flex;flex-direction:column;align-items:flex-start;min-width:0;max-width:100%;gap:3px}
.account-state>.account-secondary{display:flex;align-items:center;gap:5px;max-width:100%;margin:0;font-size:clamp(10px,.88vw,12px);line-height:1.2;color:#aeb9c6;white-space:normal;overflow-wrap:anywhere}
.account-state>.account-secondary .account-icon{width:13px;height:13px;color:#9eabb9;flex:none}
.account-state:has(.account-status.bad)>.account-secondary .account-icon{color:#bd6970}
.account-metrics{display:flex;flex-wrap:wrap;gap:5px;margin:8px 0}
.account-status{display:inline-flex;align-items:center;gap:6px;max-width:100%;border:1px solid #3c434b;background:#262b31;padding:3px 7px;border-radius:6px;font-size:clamp(10px,.89vw,12px);font-weight:500;color:#aab5c2;line-height:1.1;white-space:normal;overflow-wrap:anywhere}
.account-status::before{content:"";width:8px;height:8px;flex:0 0 8px;border-radius:50%;background:currentColor}
.account-status.good{color:#3ee38d;border-color:#214a34;background:#123824}
.account-status.warn{color:#e5b971;border-color:#614c2d;background:#3b3022}
.account-status.bad{color:#ff5965;border-color:#652d35;background:#421d22}
.account-menu{display:inline-block;width:min(52px,100%);max-width:100%;text-align:center;position:relative}
.account-menu-trigger{display:grid;place-items:center;list-style:none;height:29px;min-height:29px;width:100%;min-width:0;padding:0;background:#171b20;color:#dce4ec;border:1px solid #333a43;border-radius:7px;cursor:pointer;line-height:1}
.account-menu-trigger::-webkit-details-marker{display:none}
.account-menu-trigger .account-icon{width:18px;height:18px}
.account-menu[open] .account-menu-trigger,.account-menu-trigger:hover{background:#282e36;border-color:#465260}
.account-menu-trigger:focus-visible,.account-menu-action:focus-visible{outline:1px solid #71b6ff;outline-offset:1px}
.account-menu-items{position:fixed;width:min(236px,calc(100vw - 16px));max-width:calc(100vw - 16px);max-height:min(70dvh,500px);overflow:auto;z-index:180;background:#252a31;padding:6px;border:1px solid #444e5a;border-radius:9px;box-shadow:0 16px 42px #0008;text-align:left;white-space:normal}
.account-menu:not([open]) .account-menu-items{display:none}
.account-menu-items .account-menu-action,.account-menu-items .account-action,.account-menu-items button,.account-menu-items a{display:flex;align-items:center;justify-content:flex-start;width:100%;min-height:32px;margin:0;padding:7px 9px;border:1px solid transparent;border-radius:5px;background:transparent;color:#dce4ee;text-align:left;font-size:12px;font-weight:400;line-height:1.35;white-space:normal;overflow-wrap:anywhere;gap:8px}
.account-menu-items .account-menu-action:hover,.account-menu-items .account-action:hover,.account-menu-items button:hover,.account-menu-items a:hover{background:#343c46;border-color:#424d5b;color:#fff}
.account-menu-items .account-secondary,.account-menu-context{display:block;color:#a8b3c1;font-size:11px;line-height:1.4;white-space:pre-line;overflow-wrap:anywhere;margin:0 0 5px;padding:6px 8px 8px;border-bottom:1px solid #3b444e}
.account-table tbody tr.empty-row td.empty-state{height:85px;padding:18px 10px;text-align:center;white-space:normal;overflow-wrap:anywhere}
.account-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:wrap}
.account-action{font-size:11px;min-height:31px;line-height:1.25;white-space:normal;text-align:center;padding:6px 9px}
.account-profile-details{margin-top:8px;color:var(--muted);font-size:11px}
.account-profile-details summary{cursor:pointer;color:#8ec8f9}
.account-profile-child{border:1px solid var(--line);border-radius:7px;margin-top:8px;padding:10px;background:var(--surface-2)}
.account-profile-child .account-status{margin:5px 0 8px}
.account-profile-child .account-actions{justify-content:flex-start}
.account-hint{color:var(--subtle);font-size:12px;line-height:1.6;margin:0 0 14px}
.account-dialog{position:fixed;max-width:min(510px,calc(100vw - 24px));width:100%;max-height:90dvh;padding:0;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--text);overflow:auto}
.account-dialog::backdrop{background:#101113a6}
.account-dialog .dialog-header{display:flex;align-items:center;justify-content:space-between}
.account-dialog-content{padding:18px}
.account-profile-form.ad-form{padding:0;margin:0;display:grid;gap:13px}
.account-profile-form textarea.profile-agency-input{resize:none;overflow:hidden;width:100%;min-width:0;height:37px;min-height:37px;line-height:19px;padding:8px 11px;border:1px solid #3d4146;border-radius:7px;background:#1c1e21;color:var(--text);font-family:inherit}
.account-dialog .account-check{display:flex;align-items:center;gap:10px;color:var(--text)}
.account-dialog .account-check input{width:16px;height:16px;accent-color:var(--blue)}
.account-error{color:var(--red);font-size:12px;line-height:1.5;margin:0}
.account-error:empty{display:none}
.account-dialog .account-actions{justify-content:flex-end}
.account-billing-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0}
.account-billing-grid dt{color:var(--muted)}
.account-billing-grid dd{margin:0;text-align:right}
@media(max-width:820px){
  .account-page-heading.page-heading{flex-wrap:wrap;align-items:flex-start;gap:10px;margin-bottom:13px}
  .account-page-heading .heading-actions{margin-left:auto;flex-wrap:wrap;gap:7px}
  .account-page-heading h1{font-size:22px}
  .account-page-heading p{font-size:11px}
  .account-page-heading .heading-actions .btn{min-height:34px;height:34px;font-size:11px;padding:6px 9px}
  .account-filters.panel{padding:10px;gap:9px}
  .account-filters .field{max-width:none;flex:1 1 calc(50% - 9px);min-width:0}
  .account-table,.account-table tbody,.account-table tbody tr{display:block;width:100%;max-width:100%;min-width:0;white-space:normal}
  .account-table colgroup,.account-table thead{display:none}
  .account-table tbody{display:grid;gap:10px;padding:10px}
  .account-table tbody tr:not(.empty-row){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px 13px;padding:12px;border:1px solid #313943;border-radius:8px;height:auto;background:#1a1f24}
  .account-table tbody td{display:block;width:auto;max-width:100%;min-width:0;padding:0;border:0;overflow:visible;white-space:normal;overflow-wrap:anywhere;color:#e1e6ec;font-size:12px}
  .account-cell-text{white-space:normal;overflow:visible;overflow-wrap:anywhere}
  .account-table tbody td:first-child{grid-column:1/-1}
  .account-table tbody td:first-child::before,.account-table tbody td.actions-cell::before{display:none}
  .account-table tbody td[data-label="Ресурсы"]{grid-column:1/-1}
  .account-identity{gap:9px}
  .account-identity-icon{width:40px;height:40px}
  .account-identity-copy .account-title{font-size:14px;white-space:normal;overflow-wrap:anywhere}
  .account-identity-copy .account-secondary{font-size:11px;white-space:normal;overflow-wrap:anywhere}
  .account-resource-counters{--account-resource-gap:8px;flex-wrap:wrap;gap:8px}
  .account-resource-counter{padding:5px 9px;max-width:100%;flex:0 1 auto}
  .account-resource-counter+.account-resource-counter::before{display:none}
  .account-resource-counter strong{font-size:12px}
  .account-status{font-size:11px}
  .account-state>.account-secondary{font-size:11px}
  .account-table .actions-cell{grid-column:1/-1;text-align:right;border:0;border-top:1px solid #303841;padding-top:9px;min-width:0;overflow:visible}
  .account-menu{width:52px;max-width:100%}
  .account-menu-trigger{height:33px;min-height:33px}
  .account-table .account-actions{justify-content:flex-start}
  .account-table-wrap{overflow:visible}
  .account-table tbody tr.empty-row{padding:0;border:0;background:transparent;height:auto}
  .account-table tbody tr.empty-row td{width:100%;padding:20px 10px}
}

.account-profile-form [hidden]{display:none!important}
.account-identity-tiktok{color:#e9f0f3}

/* Profiles share the graphite controls and compact rows of the payments list. */
.account-profiles-heading.page-heading{align-items:center;flex-wrap:nowrap;margin-bottom:18px}
.account-profiles-heading h1{display:flex;align-items:center;gap:9px;margin:0}
.profile-count{padding:2px 8px;border:1px solid var(--line-soft);border-radius:6px;background:var(--surface-2);color:#d8e0e9;font-size:12px;line-height:18px;font-weight:500;letter-spacing:0;font-variant-numeric:tabular-nums}
.account-profiles-heading .heading-actions{flex-wrap:nowrap;gap:8px}
.account-profiles-heading .account-refresh-button{display:grid;place-items:center;width:36px;padding:0}
.account-profiles-heading .account-refresh-button>span{display:none}
.profile-filter-toggle{display:none}
.account-filters-profiles.panel{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:12px;padding:0;margin:0 0 18px;border:0;border-radius:0;background:none}
.account-filters-profiles .account-filter-field{display:grid;grid-template-columns:16px auto minmax(0,1fr);align-items:center;gap:8px;max-width:none;min-height:38px;padding:0 9px;border:1px solid #353a40;border-radius:8px;background:#1c1f22;cursor:pointer}
.account-filters-profiles .account-filter-field:hover,.account-filters-profiles .account-filter-field:focus-within{border-color:#586673}
.account-filters-profiles .account-filter-label{grid-area:1/2;color:#bac4cf;white-space:nowrap}
.account-filters-profiles .account-filter-control{display:contents}
.account-filters-profiles .account-filter-control>.account-icon{grid-area:1/1;position:static;transform:none;width:15px;height:15px}
.account-filters-profiles .account-filter-control select{grid-area:1/3;min-height:34px;width:100%;height:34px;padding:0 2px 0 4px;box-shadow:none;border:0;background:transparent;color:#e5eaf0;cursor:pointer}
.account-filters-profiles .profile-source-picker{grid-area:1/3;min-width:0;width:100%}
.account-filters-profiles select option{background:#202429;color:var(--text)}
.account-table-wrap-profiles{background:#1b1e21;border-color:#34383e}
.account-table-profiles th{padding-block:10px;background:#1d2125;font-size:clamp(10px,.75vw,12px);white-space:nowrap;overflow-wrap:normal}
.account-table-profiles tbody tr:not(.empty-row){height:60px;background:#1c2023}
.account-table-profiles tbody tr:not(.empty-row):hover{background:#22272c}
.account-table-profiles tbody td{border-color:#34383e}
.account-table-profiles col:last-child{width:108px!important}
.account-table-profiles .account-identity{gap:9px}
.account-table-profiles .account-identity-icon{border:0;border-radius:0;background:none;width:28px;height:28px}
.account-table-profiles .account-identity-icon svg,.profile-menu-source .stat-icon{width:20px;height:20px}
.account-table-profiles .profile-details-trigger{padding:0;border:0;background:transparent;color:#68b8ff;text-align:left;text-decoration:underline;text-underline-offset:2px;font-size:clamp(12px,1vw,15px);font-weight:550;cursor:pointer}
.account-table-profiles .profile-details-trigger:hover{color:#a1d4ff}
.account-table-profiles .profile-details-trigger:focus-visible{outline:1px solid #89c7ff;outline-offset:-1px;border-radius:2px}
.account-table-profiles .account-identity-copy .account-secondary{margin-top:3px;color:#acb7c4}
.account-table-profiles .account-resource-counters{--account-resource-gap:clamp(8px,1.4vw,22px);gap:var(--account-resource-gap)}
.account-table-profiles .account-resource-counter{padding:3px 0;border:0;border-radius:3px;background:none;flex:0 1 auto;gap:clamp(3px,.48vw,7px)}
.account-table-profiles .account-resource-counter strong{font-size:clamp(10px,.99vw,14px);font-weight:500;white-space:nowrap;overflow-wrap:normal}
.account-table-profiles .account-resource-counter+.account-resource-counter::before{background:#4c555e}
.account-table-profiles .account-resource-counter:focus-visible{outline:2px solid #8ac2ff;outline-offset:2px}
.profile-resource-tooltip{display:none;position:absolute;z-index:10;left:50%;bottom:calc(100% + 5px);transform:translateX(-50%);width:max-content;max-width:180px;padding:5px 8px;border:1px solid #4b525b;border-radius:5px;background:#292f35;box-shadow:0 3px 10px #0006;color:#edf1f5;text-align:left;line-height:1.4;font-size:11px;white-space:normal;pointer-events:none}
.account-resource-counter:hover>.profile-resource-tooltip,.account-resource-counter:focus>.profile-resource-tooltip{display:block}
.account-table-profiles .account-status{font-size:clamp(10px,.88vw,12px);white-space:nowrap;overflow-wrap:normal}
.account-table-profiles .account-state{gap:4px}
.profile-row-actions{display:flex;align-items:center;justify-content:flex-end}
.profile-row-actions .account-menu{margin-left:6px}
.account-table-profiles .account-menu,.account-table-profiles .profile-stats-button{width:38px;min-width:0;flex:0 1 38px}
.account-table-profiles .account-menu-trigger,.account-table-profiles .profile-stats-button{display:grid;place-items:center;height:32px;min-height:32px;padding:0;border:1px solid #343c45;border-radius:7px;background:#20252a;color:#dce4ec;cursor:pointer}
.profile-stats-button svg{width:17px;height:17px}
.account-table-profiles .account-menu[open] .account-menu-trigger,.account-table-profiles .account-menu-trigger:hover,.account-table-profiles .profile-stats-button:hover{border-color:#465260;background:#282e36}
.account-table-profiles .profile-stats-button:focus-visible,.account-table-profiles .account-menu-items button:focus-visible{outline:1px solid #89c7ff;outline-offset:-2px}
.account-table-profiles .account-menu-items{width:min(216px,calc(100vw - 16px));max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px);padding:5px;border-color:#3b444c;background:#22272d;overscroll-behavior:contain}
.account-table-profiles .account-menu-items .account-action{min-height:36px;padding:7px 10px;gap:0;margin:0;font-size:13px}
.account-table-profiles .account-menu-items .account-action>svg{margin-right:10px}
.account-table-profiles .account-menu-items .account-action>.account-icon{color:#cbd4dd}
.account-table-profiles .account-menu-items .account-action:disabled{opacity:.5;cursor:default;background:transparent;border-color:transparent}
.profile-menu-separator{height:1px;margin:4px 5px;border:0;background:#3f4852}
.account-dialog.profile-info-dialog{top:50%;left:50%;right:auto;bottom:auto;transform:translate(-50%,-50%);margin:0;max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px)}
.profile-info{display:grid;justify-items:start;gap:14px}
.profile-menu-source{display:inline-flex;gap:5px;align-items:center}
.profile-menu-details{display:grid;grid-template-columns:auto minmax(0,1fr);gap:6px 16px;width:100%;margin:0;line-height:1.4}
.profile-menu-details dt,.profile-menu-details dd{margin:0}
.profile-menu-details dt{color:var(--muted)}
.profile-menu-details dd{color:#d8e0e8;overflow-wrap:anywhere}
@media (min-width:821px) and (max-width:1240px){
  .account-filters-profiles .account-filter-field{grid-template-columns:15px minmax(0,1fr);gap:0 5px;padding:5px 7px}
  .account-filters-profiles .profile-source-picker{grid-area:2/1/3/3}
  .account-filters-profiles .account-filter-control select{grid-area:2/1/3/3;height:24px;min-height:24px;padding:0}
  .account-table-profiles td,.account-table-profiles th{padding-inline:6px}
  .account-table-profiles .account-resource-counters{--account-resource-gap:8px}
  .account-table-profiles .account-resource-counter svg{width:12px;height:12px}
  .account-table-profiles .account-identity{gap:5px}
  .account-table-profiles .account-identity-icon{width:22px;height:24px}
}
@media (min-width:821px) and (max-width:1000px){
  .account-table-profiles th{font-size:10px}
  .account-table-profiles col:nth-child(1){width:22%!important}
  .account-table-profiles col:nth-child(2){width:10%!important}
  .account-table-profiles col:nth-child(3){width:11%!important}
  .account-table-profiles col:nth-child(4){width:25%!important}
  .account-table-profiles col:nth-child(5){width:19%!important}
  .account-table-profiles col:nth-child(6){width:94px!important}
  .account-table-profiles .account-resource-counters{--account-resource-gap:6px}
}
@media (max-width:820px){
  .account-profiles-heading.page-heading{gap:7px;margin-bottom:12px}
  .account-profiles-heading h1{gap:5px}
  .account-profiles-heading .heading-actions{gap:5px}
  .account-profiles-heading .account-refresh-button{width:34px}
  .profile-filter-toggle{display:inline-flex;align-items:center;gap:6px;margin:0 0 10px}
  .account-filters-profiles.panel{display:none}
  .account-filters-profiles[data-open=true]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-flow:row;gap:7px;margin-bottom:12px}
  .account-filters-profiles .account-filter-field{grid-template-columns:16px minmax(0,1fr);gap:0 5px;padding:6px 7px}
  .account-filters-profiles .profile-source-picker{grid-area:2/1/3/3}
  .account-filters-profiles .account-filter-control select{grid-area:2/1/3/3;height:26px;min-height:26px;padding:0}
  .account-table-profiles tbody{display:block;padding:0}
  .account-table-profiles tbody tr:not(.empty-row){display:grid;grid-template-columns:minmax(0,1fr) auto auto;grid-template-areas:"profile status actions" "resources resources resources";align-items:center;gap:3px 6px;padding:7px 10px;height:auto;min-height:61px;border:0;border-bottom:1px solid #34383e;border-radius:0}
  .account-table-profiles tbody tr:last-child{border-bottom:0}
  .account-table-profiles tbody td[data-label]::before,.account-table-profiles td[data-label="Группа"],.account-table-profiles td[data-label="Агентство"],.account-table-profiles .account-identity-copy .account-secondary,.account-table-profiles .account-token-expiry{display:none}
  .account-table-profiles tbody td:first-child{grid-area:profile}
  .account-table-profiles td[data-label="Статус профиля"]{grid-area:status}
  .account-table-profiles tbody td[data-label="Ресурсы"]{grid-area:resources}
  .account-table-profiles tbody .actions-cell{grid-area:actions;justify-self:end;border:0;padding:0;width:auto}
  .account-table-profiles .account-identity{gap:7px}
  .account-table-profiles .account-identity-icon{width:22px;height:22px}
  .account-table-profiles .account-identity-copy .account-title{font-size:13px;white-space:nowrap;overflow-wrap:normal}
  .account-table-profiles .account-resource-counters{flex-wrap:nowrap;--account-resource-gap:18px;gap:var(--account-resource-gap);padding-left:29px}
  .account-table-profiles .account-resource-counter{padding:1px 0;gap:5px}
  .account-table-profiles .account-resource-counter strong{font-size:12px}
  .account-table-profiles .account-resource-counter svg{width:13px;height:13px}
  .account-table-profiles .account-resource-counter+.account-resource-counter::before{display:block;height:10px}
  .account-table-profiles .account-resource-counter:first-child .profile-resource-tooltip{left:0;transform:none}
  .account-table-profiles .account-status{font-size:11px}
  .profile-row-actions .account-menu{margin-left:5px}
  .account-table-profiles .account-menu,.account-table-profiles .profile-stats-button{width:36px;flex-basis:36px}
  .account-table-profiles .account-menu-trigger,.account-table-profiles .profile-stats-button{height:36px;min-height:36px}
}

/* Profile connection */
.account-dialog.profile-create-dialog{width:min(480px,calc(100% - 24px));padding:0}
.profile-create-dialog::backdrop{background:rgba(12,14,16,.69);backdrop-filter:blur(4px)}
.profile-create-dialog .dialog-header{align-items:center}
.profile-create-dialog .profile-create-close{display:grid;place-items:center;width:34px;height:34px;padding:0}
.profile-create-close svg{width:17px;height:17px}
.profile-create-form .profile-source-field{min-width:0;margin:0;padding:0;border:0}
.profile-create-form .profile-source-field legend{padding:0 0 10px;color:var(--muted)}
.profile-create-form .profile-source-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.profile-create-form .profile-source-choice{
  --source-border:#368dcf;display:flex;align-items:center;justify-content:center;gap:12px;min-width:0;min-height:48px;
  padding:8px;border:1px solid var(--source-border);border-radius:8px;background:#1d1f21;color:var(--text);font:inherit;font-weight:570;cursor:pointer
}
.profile-create-form .profile-source-choice[data-source=tiktok]{--source-border:#32c2c1}
.profile-create-form .profile-source-choice:hover,.profile-create-form .profile-source-choice:focus-visible{background:#28323a;outline:1px solid var(--source-border)}
.profile-create-form .profile-source-choice .stat-icon{flex:none;width:23px;height:23px}
.profile-create-form .profile-source-field:disabled .profile-source-choice{opacity:.55;cursor:wait}
.profile-create-form .profile-link-notice{color:var(--muted)}
.profile-create-form p:empty{display:none}

/* The account list uses a number for identity; the provider symbol and the
   profile/user subtitle keep repeated IDs distinct across connections. */
.ad-accounts-heading.page-heading{align-items:center;flex-wrap:nowrap;margin-bottom:22px}
.ad-accounts-heading h1{margin:0;font-size:clamp(22px,1.85vw,32px)}
.ad-accounts-heading .account-refresh-button{height:38px;min-height:38px}
.account-filter-toggle{display:none}
.account-filters-ad_accounts.panel{
  display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);
  align-items:end;gap:clamp(6px,.9vw,16px);margin:0 0 18px;padding:12px 14px;
  background:#191d21;border-color:#2c3238;border-radius:9px;
}
.account-filters-ad_accounts .account-filter-field{width:100%;max-width:none}
.account-filters-ad_accounts .account-filter-label{color:#d9dfe5;font-size:clamp(11px,.85vw,14px)}
.account-filters-ad_accounts .account-filter-control input,
.account-filters-ad_accounts .account-filter-control select,
.account-filters-ad_accounts .profile-source-trigger{
  width:100%;height:37px;min-height:37px;font-size:clamp(11px,.86vw,14px);
  border:1px solid #30363d;border-radius:7px;background:#171b1f;color:#e4e9ee;
}
.account-filters-ad_accounts .profile-source-trigger{padding:5px 10px 5px 32px}
.account-filters-ad_accounts .profile-source-control:has(.profile-source-trigger .stat-icon)>.account-icon{visibility:hidden}
.account-filters-ad_accounts .profile-source-trigger:has(.stat-icon){padding-left:8px}
.account-filters-ad_accounts .profile-source-trigger:hover,.account-filters-ad_accounts .profile-source-trigger[aria-expanded=true]{border-color:#536170}
.account-table-wrap-ad_accounts{background:#15191d;border:1px solid #2c3238;border-radius:9px}
.account-table-ad_accounts th{
  height:45px;padding:10px clamp(8px,.9vw,16px);background:#1b1f23;
  color:#e2e7ed;font-size:clamp(10px,.83vw,14px);letter-spacing:0;white-space:nowrap;
}
.account-table-ad_accounts th:first-child{border-top-left-radius:8px}
.account-table-ad_accounts th:last-child{border-top-right-radius:8px}
.account-table-ad_accounts tbody tr:not(.empty-row){height:60px;background:#15191d}
.account-table-ad_accounts tbody td{font-size:clamp(12px,.96vw,16px);padding:6px clamp(8px,.9vw,16px);border-color:#292f35}
.account-table-ad_accounts tbody tr:not(.empty-row):hover,.account-table-ad_accounts tbody tr.account-row-selected{background:#182c3a}
.account-table-ad_accounts tbody tr.account-row-selected:hover{background:#182c3a}
.account-table-ad_accounts .account-identity-icon{
  display:grid;place-items:center;flex:none;width:clamp(24px,2vw,34px);height:30px;
  border:0;background:transparent;
}
.account-table-ad_accounts .account-identity-icon svg{width:24px;height:24px}
.account-table-ad_accounts .account-identity{gap:0}
.account-table-ad_accounts .account-identity-icon+.account-identity-copy{margin-left:clamp(8px,1.35vw,24px)}
.account-table-ad_accounts .account-identity-copy .account-secondary{margin-top:3px;color:#b5c2cf;font-size:clamp(11px,.83vw,14px)}
.account-table-ad_accounts .account-id-disclosure{display:block;width:auto;max-width:100%;text-align:left}
.account-table-ad_accounts .account-id-trigger{
  display:block;max-width:100%;width:max-content;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  list-style:none;cursor:pointer;color:#edf1f5;font-size:clamp(12px,1.09vw,18px);font-weight:600;
}
.account-id-trigger::-webkit-details-marker{display:none}
.account-table-ad_accounts .account-id-trigger:hover,.account-table-ad_accounts .account-id-trigger:focus-visible,
.account-table-ad_accounts .account-row-selected .account-id-trigger{color:#97dfef;text-decoration:underline;text-underline-offset:2px}
.account-table-ad_accounts .account-id-trigger:focus-visible{outline:1px solid #7bbde2;outline-offset:-1px;border-radius:2px}
.account-table-ad_accounts .account-daily-spend,.account-table-ad_accounts th:nth-child(5){text-align:right}
.account-table-ad_accounts .account-daily-spend .account-title{font:inherit;font-weight:550;line-height:1.3}
.account-table-ad_accounts .account-status{padding:5px 8px;font-size:clamp(11px,.81vw,13px);white-space:normal}
.account-table-ad_accounts .account-status.good{border-color:#133b30;background:#0e3328;color:#43e893}
.account-table-ad_accounts .account-menu-cell>.account-menu{width:44px}
.account-table-ad_accounts .account-menu-trigger{height:30px;min-height:30px;background:#1d2227;border-color:#383f47}
.account-table-ad_accounts .account-menu[open]>.account-menu-trigger{border-color:#89bdd6;background:#243747}
.account-table-ad_accounts .account-menu-cell .account-menu-items{
  width:min(238px,calc(100vw - 16px));max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px);
  padding:5px;background:#202428;border-color:#434b53;overscroll-behavior:contain;
}
.account-table-ad_accounts .account-menu-cell .account-action{min-height:36px;margin:0;padding:7px 10px;gap:0;font-size:13px}
.account-table-ad_accounts .account-menu-cell .account-action svg{flex:none;width:17px;height:17px;margin-right:12px}
.account-table-ad_accounts .account-menu-cell .account-action:focus-visible{outline:1px solid #91c7ef;outline-offset:-2px}
.account-table-ad_accounts .ad-account-info{
  position:fixed;z-index:180;width:min(352px,calc(100vw - 16px));max-width:calc(100vw - 16px);
  max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px);overflow:auto;overscroll-behavior:contain;
  padding:14px 16px 16px;background:#1f2327;border:1px solid #434b53;border-radius:9px;
  color:#eaf0f5;text-align:left;white-space:normal;box-shadow:0 10px 34px #0007;
}
.ad-account-info h3{margin:0 0 15px;font-size:17px;font-weight:600;line-height:1.3}
.ad-account-info dl{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:baseline;gap:7px 12px;margin:0;font-size:13px;line-height:1.45}
.ad-account-info dt,.ad-account-info dd{min-width:0;margin:0;overflow-wrap:anywhere}
.ad-account-info dt{color:#b8c4cf}
.ad-account-info dd{color:#edf1f6}
.account-zone-offset{display:inline-block;margin-left:5px;padding:1px 5px;border:1px solid #3c454e;border-radius:4px;color:#c5d2df;background:#293139;font-size:.9em;white-space:nowrap}
.account-id-disclosure .account-info-caret{
  display:none;position:fixed;z-index:181;width:12px;height:12px;pointer-events:none;
  background:#1f2327;border-top:1px solid #434b53;border-left:1px solid #434b53;transform:translate(-50%,-50%) rotate(45deg);
}
.account-id-disclosure[open]>.account-info-caret{display:block}
.account-info-caret[data-side=above]{transform:translate(-50%,-50%) rotate(225deg)}
@media(min-width:821px) and (max-width:1150px){
  .account-filters-ad_accounts.panel{gap:5px;padding:10px 7px}
  .account-filters-ad_accounts .account-filter-control>.account-icon{left:6px;width:12px;height:12px}
  .account-filters-ad_accounts .account-filter-control input,
  .account-filters-ad_accounts .account-filter-control select,
  .account-filters-ad_accounts .profile-source-trigger{padding-left:22px;padding-right:3px}
  .account-table-ad_accounts th,.account-table-ad_accounts tbody td{padding-inline:6px}
  .account-table-ad_accounts .account-identity-icon+.account-identity-copy{margin-left:4px}
  .account-table-ad_accounts .account-identity-icon svg{width:20px;height:20px}
  .account-table-ad_accounts .account-menu-cell>.account-menu{width:35px}
}
@media(min-width:821px) and (max-width:959px){
  /* With the sidebar open, reserve enough space for the three longest headings. */
  .account-table-ad_accounts col:nth-child(3){width:13.5%!important}
  .account-table-ad_accounts col:nth-child(4){width:6%!important}
  .account-table-ad_accounts col:nth-child(6){width:15%!important}
  .account-table-ad_accounts col:nth-child(7){width:12.5%!important}
  .account-table-ad_accounts th{padding-inline:4px;white-space:normal;overflow-wrap:normal}
}
@media(max-width:820px){
  .ad-accounts-heading.page-heading{gap:5px;margin-bottom:12px}
  .ad-accounts-heading h1{font-size:clamp(18px,4.9vw,24px)}
  .ad-accounts-heading .heading-actions{margin-left:auto}
  .ad-accounts-heading .account-refresh-button{width:38px;padding:0}
  .ad-accounts-heading .account-refresh-button>span{display:none}
  .account-filter-toggle{display:inline-flex;align-items:center;gap:6px;margin:0 0 10px}
  .account-filters-ad_accounts.panel{display:none}
  .account-filters-ad_accounts[data-open=true]{display:grid;grid-auto-flow:row;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:10px;margin-bottom:12px}
  .account-filters-ad_accounts .account-filter-field-query{grid-column:1/-1}
  .account-filters-ad_accounts .account-filter-control input,
  .account-filters-ad_accounts .account-filter-control select,
  .account-filters-ad_accounts .profile-source-trigger{height:38px;min-height:38px;font-size:13px}
  .account-table-ad_accounts tbody{display:block;padding:0}
  .account-table-ad_accounts tbody tr:not(.empty-row){
    grid-template-columns:repeat(3,minmax(0,1fr));gap:7px 12px;height:auto;margin:0;padding:10px 12px;
    border:0;border-bottom:1px solid #2e343b;border-radius:0;
    grid-template-areas:"identity identity actions" "group agency tag" "spend status status";
  }
  .account-table-ad_accounts tbody tr:last-child{border-bottom:0}
  .account-table-ad_accounts tbody td{padding:0}
  .account-table-ad_accounts tbody td[data-label]::before{margin:0 0 1px;color:#a4afb9}
  .account-table-ad_accounts tbody td:first-child{grid-area:identity;align-self:center}
  .account-table-ad_accounts tbody td[data-label="Группа"]{grid-area:group}
  .account-table-ad_accounts tbody td[data-label="Агентство"]{grid-area:agency}
  .account-table-ad_accounts tbody td[data-label="Тег"]{grid-area:tag}
  .account-table-ad_accounts tbody td[data-label="Daily Spend"]{grid-area:spend}
  .account-table-ad_accounts tbody td[data-label="Статус"]{grid-area:status}
  .account-table-ad_accounts tbody .actions-cell{grid-area:actions;justify-self:end;align-self:center;padding:0;border:0;width:auto}
  .account-table-ad_accounts .account-daily-spend{text-align:left}
  .account-table-ad_accounts .account-identity-icon{width:20px}
  .account-table-ad_accounts .account-identity-icon svg{width:20px;height:20px}
  .account-table-ad_accounts .account-identity-icon+.account-identity-copy{margin-left:6px}
  .account-table-ad_accounts .account-id-trigger{font-size:14px}
  .account-table-ad_accounts .account-menu-trigger{height:36px;min-height:36px}
  .account-table-ad_accounts .account-status{padding:3px 6px}
  .account-table-ad_accounts .ad-account-info{padding:12px}
  .ad-account-info dl{gap:6px 10px}
}

.account-dialog.tiktok-report-dialog{max-width:min(760px,calc(100vw - 24px))}
.tiktok-report-filters{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:10px;margin-bottom:12px}
.tiktok-report-filters .field,.tiktok-report-filters select,.tiktok-report-filters input{min-width:0;max-width:100%}
.tiktok-report-dialog .account-actions{display:flex;gap:8px;margin-top:8px}
.tiktok-report-table{width:100%;min-width:0;table-layout:fixed;margin-top:12px;font-variant-numeric:tabular-nums}
.tiktok-report-table th,.tiktok-report-table td{white-space:normal;overflow-wrap:anywhere;text-align:right}
.tiktok-report-table th:first-child,.tiktok-report-table td:first-child{width:52%;text-align:left}
@media(max-width:500px){.tiktok-report-filters{grid-template-columns:1fr}.tiktok-report-table td,.tiktok-report-table th{padding:7px 4px}}

.profile-pending-transfers{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.profile-pending-transfers{margin:0 0 12px}
.profile-pending-transfers[hidden],.profile-transfer-dialog [hidden]{display:none}
.profile-transfer-dialog .account-dialog-content{display:grid;gap:12px}
.profile-transfer-dialog p{margin:0;line-height:1.5}
.profile-transfer-dialog .transfer-copy{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.profile-transfer-dialog .transfer-copy input{grid-column:1/-1}
.profile-transfer-dialog .transfer-copy a{text-align:center;text-decoration:none}
.profile-transfer-dialog .account-error:empty,.profile-transfer-dialog .transfer-copy-notice:empty{display:none}
.profile-transfer-dialog .transfer-copy input{min-width:0;width:100%;color:var(--text);border:1px solid var(--line);border-radius:6px;background:var(--bg);padding:8px}
.profile-transfer-dialog .transfer-copy-notice{grid-column:1/-1;font-size:12px;color:var(--muted)}

.fp-comments-dialog{max-width:min(640px,calc(100vw - 24px))}
.fp-comments-dialog [hidden]{display:none}
.fp-comments-dialog .account-dialog-content{display:grid;gap:10px;min-width:0}
.fp-comments-dialog .fp-comment-identity{margin:0;color:var(--muted);overflow-wrap:anywhere}
.fp-comment-controls{display:flex;gap:10px;align-items:flex-end}
.fp-comment-controls .field{flex:1;min-width:0;margin:0}
.fp-comment-controls .btn{flex:none}
.fp-comments-dialog .account-hint{margin:0}
.fp-comment-history-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-top:14px;margin-top:5px;border-top:1px solid var(--line)}
.fp-comment-history-heading h3,.fp-comments-dialog .account-secondary,.fp-comment-text,.fp-comment-notice{margin:0}
.fp-comment-history-heading h3{font-size:15px}
.fp-comment-notice{font-size:13px;color:var(--muted);overflow-wrap:anywhere}
.fp-comment-notice:empty,.fp-comment-list:empty{display:none}
.fp-comment-list{list-style:none;margin:0;padding:0}
.fp-comment{display:grid;min-width:0;gap:6px;padding:12px 0;border-top:1px solid var(--line);overflow-wrap:anywhere}
.fp-comment-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}
.fp-comment-heading .account-status{flex:none}
.fp-comment-text{white-space:pre-wrap;line-height:1.4}
@media(max-width:480px){
  .fp-comments-dialog .account-dialog-content{padding:12px}
  .fp-comment-controls{flex-wrap:wrap}
  .fp-comment-controls .field{flex-basis:100%}
}
