/* ============================================================
   SEARCH MODULE styles — extends the Sophos design system
   ============================================================ */

.search-root { flex: 1; display: flex; flex-direction: column; overflow: hidden; height: 100%; }

/* --- Platform nav (collapsible secondary sidebar inside a module) --- */
.platform-shell { flex: 1; display: grid; grid-template-columns: 220px 1fr; overflow: hidden; height: 100%; }
.platform-shell.nav-collapsed { grid-template-columns: 56px 1fr; }
.platform-shell.no-nav { grid-template-columns: 1fr; }
.platform-nav { background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; overflow: hidden; }
.platform-nav .pnav-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 10px; }
.platform-nav.collapsed .pnav-head { justify-content: center; }
.pnav-title { font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); }
.pnav-toggle { border: 1px solid var(--line); background: #fff; border-radius: 2px; width: 24px; height: 24px; cursor: pointer; color: var(--ink-2); font-size: 13px; line-height: 1; flex: 0 0 auto; }
.pnav-toggle:hover { background: var(--surface-hover); }
.pnav-list { flex: 1; overflow-y: auto; padding: 4px 10px 16px; }
.pnav-group { font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); padding: 14px 8px 6px; }
.pnav-divider { height: 1px; background: var(--line-soft); margin: 8px 6px; }
.pnav-item { display: flex; align-items: center; gap: 11px; width: 100%; border: 0; background: transparent; color: var(--ink-2); text-align: left; padding: 9px 10px; border-radius: 2px; font-size: 13.5px; font-weight: 500; cursor: pointer; transition: background 0.13s ease, color 0.13s ease; }
.pnav-item:hover { background: var(--surface-hover); color: var(--ink); }
.pnav-item.active { background: var(--blue-soft); color: var(--blue); font-weight: 600; }
.platform-nav.collapsed .pnav-item { justify-content: center; padding: 9px 0; }
.pnav-ico { flex: 0 0 auto; display: flex; }
.pnav-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pnav-count { font-size: 11.5px; color: var(--ink-3); background: var(--bg-soft); padding: 1px 7px; border-radius: 2px; font-variant-numeric: tabular-nums; }
.pnav-item.active .pnav-count { background: #fff; color: var(--blue); }
.platform-body { display: flex; flex-direction: column; overflow: hidden; height: 100%; min-width: 0; }

/* --- Context bar (MCC / Account selectors + sub-nav) --- */
.context-bar {
    flex: 0 0 auto;
    background: rgba(255,255,255,0.78);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    border-bottom: 1px solid var(--line);
    padding: 14px 44px;
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.ctx-select {
    display: flex; align-items: center; gap: 8px;
    background: #fff; border: 1px solid var(--line);
    border-radius: 2px; padding: 7px 10px 7px 13px;
    min-width: 0;
}
.ctx-select .ctx-k { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.ctx-select select {
    border: 0; background: transparent; outline: none; font-size: 14px; font-weight: 400;
    color: var(--ink); cursor: pointer; max-width: 230px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 12 8'%3E%3Cpath fill='%236e6e73' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right center; padding-right: 18px;
}
.ctx-arrow { color: var(--ink-3); flex: 0 0 auto; }

.subnav {
    display: inline-flex; background: var(--bg-soft); border: 1px solid var(--line-soft);
    border-radius: 2px; padding: 3px; gap: 2px; margin-left: auto;
}
.subnav button {
    border: 0; background: transparent; cursor: pointer;
    padding: 7px 16px; border-radius: 2px; font-size: 13.5px; font-weight: 550;
    color: var(--ink-2); transition: all 0.15s ease;
}
.subnav button.active { background: var(--blue-soft); color: var(--ink); box-shadow: var(--sh-1); }

/* --- Breadcrumb drill trail --- */
.crumb-link { background: 0; border: 0; padding: 0; cursor: pointer; color: var(--ink-2); font: inherit; }
.crumb-link:hover { color: var(--blue); }
.crumb-mod { font-weight: 400; }
.topbar-crumbs .tc-current { color: var(--ink); font-size: 14px; }
.crumbs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 14px; }
.crumbs .cr {
    background: none; border: 0; cursor: pointer; color: var(--blue);
    font-size: 14px; font-weight: 550; padding: 4px 6px; border-radius: 2px;
}
.crumbs .cr:hover { background: var(--blue-soft); }
.crumbs .cr.current { color: var(--ink); cursor: default; }
.crumbs .cr.current:hover { background: none; }
.crumbs .sep { color: var(--ink); }

/* --- Data table --- */
.dtable-wrap { background: #fff; border: 1px solid var(--line-soft); border-radius: var(--r-lg); box-shadow: var(--sh-1); overflow-x: auto; overflow-y: hidden; }
.dtable { width: 100%; border-collapse: collapse; font-size: 13px; }
.type-plain { font-size: 13px; }
.fs-th { display: flex; align-items: center; gap: 4px; }
.fs-arr { border: 0; background: transparent; cursor: pointer; color: var(--ink-3); font-size: 11px; padding: 0 2px; line-height: 1; }
.fs-arr.on { color: var(--blue); }
.dtable thead th {
    text-align: left; font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
    text-transform: uppercase; color: var(--ink-3);
    padding: 13px 16px; border-bottom: 1px solid var(--line); background: var(--bg-soft-2);
    white-space: nowrap;
}
.dtable th.num, .dtable td.num { text-align: right; font-variant-numeric: tabular-nums; }
.dtable tbody td { padding: 0 16px; height: 52px; border-bottom: 1px solid var(--line-soft); color: var(--ink); vertical-align: middle; }
.dtable tbody tr:last-child td { border-bottom: 0; }
.dtable tbody tr.clickable { cursor: pointer; }
.dtable tbody tr.clickable:hover { background: var(--surface-hover); }
.dtable tbody tr.sel { background: var(--blue-soft); }
.dtable .name-cell { display: flex; align-items: center; gap: 10px; }
.dtable .name-cell .nm { font-weight: 550; }
.dtable tbody tr.clickable .name-cell .nm { color: var(--blue); }
.dtable tbody tr.clickable:hover .name-cell .nm { text-decoration: underline; }
.dtable .name-cell .drill-pencil { color: var(--blue); opacity: 0; transition: opacity 0.15s ease; margin-left: auto; }
.dtable tbody tr:hover .name-cell .drill-pencil { opacity: 1; }
.tc-crumb.tc-mode { color: var(--ink-2); }
.mode-bar .rep-daterange { background: #fff; }
.mode-bar .rep-date-sel { font-size: 14px; font-weight: 400; color: var(--ink-2); white-space: pre; }

/* core toolbar — search + date selector aligned at top, matched styling */
.ba-toolbar.core-toolbar { margin: 0 0 16px; align-items: center; flex-wrap: nowrap; }
/* checkbox + star selection columns */
.dtable .sel-col { width: 36px; text-align: center; }
.dtable .fav-col { width: 32px; text-align: center; }
.dtable .sel-col input { width: 15px; height: 15px; accent-color: var(--blue); cursor: pointer; vertical-align: middle; }
.fav-star { border: 0; background: transparent; cursor: pointer; font-size: 16px; line-height: 1; color: var(--ink-3); padding: 2px; }
.fav-star.on { color: #000; }
.fav-star:hover { color: #000; }
.fav-star.hdr { color: var(--ink-3); font-size: 14px; cursor: default; }
/* stacked sort carets in column headers */
.sort-carets { display: inline-flex; flex-direction: column; margin-left: 5px; vertical-align: middle; line-height: 1; gap: 1px; }
.sort-carets span { font-size: 6.5px; color: #000; }
.sort-carets.asc .c-up { color: var(--blue); }
.sort-carets.desc .c-dn { color: var(--blue); }

/* fixed (non-scrolling) tools row above the table — aligns with the pnav head */
.pbody-tools { flex: 0 0 auto; }
.pbody-tools .page { padding-bottom: 0; }
.pbody-tools-row { display: flex; align-items: center; padding: 0 0 0 18px; height: 40px; margin-top: 5px; margin-bottom: 37px; }
.pbody-tools-row .be-input { font-size: 14px; color: var(--ink-2); }
.pbody-tools-row .be-input::placeholder { color: var(--ink-2); }
.pbody-tools-row .rep-daterange { flex: 0 1 260px; width: 260px; min-width: 0; background: #fff; box-sizing: border-box; justify-content: space-between; }
.pbody-tools-row .rep-date-sel { font-size: 14px; font-weight: 400; color: var(--ink-2); white-space: pre; text-align: right; text-align-last: right; flex: 1; }
.core-toolbar .be-input { width: 300px; background: #fff; font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.core-toolbar .be-input::placeholder { color: var(--ink-3); }
.core-toolbar .rep-daterange { width: 300px; background: #fff; box-sizing: border-box; justify-content: space-between; }
.core-toolbar .rep-date-sel { font-size: 13.5px; font-weight: 500; color: var(--ink-2); text-align: right; text-align-last: right; white-space: pre; flex: 1; }
.plat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 16px; }
.mini-toggle { width: 40px; height: 22px; border-radius: 2px; border: 0; background: var(--line); position: relative; cursor: pointer; flex: 0 0 auto; transition: background 0.15s ease; }
.mini-toggle.on { background: var(--blue); }
.mini-toggle .mt-knob { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 0.15s ease; }
.mini-toggle.on .mt-knob { transform: translateX(18px); }
/* Off/On row toggle (leftmost column in entity tables) */
.dtable th.onoff-col, .dtable td.onoff-col { width: 78px; text-align: left; }
.row-toggle { width: 40px; height: 22px; border-radius: 99px; border: 0; background: var(--line); position: relative; cursor: pointer; flex: 0 0 auto; transition: background 0.15s ease; padding: 0; }
.row-toggle.on { background: var(--blue); }
.row-toggle .rt-knob { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 0.15s ease; }
.row-toggle.on .rt-knob { transform: translateX(18px); }
.edit-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.28); z-index: 60; display: flex; justify-content: flex-end; }
.edit-slideover { width: 460px; max-width: 92vw; height: 100%; background: #fff; box-shadow: -8px 0 30px rgba(0,0,0,0.15); display: flex; flex-direction: column; animation: eoIn 0.18s ease; }
@keyframes eoIn { from { transform: translateX(30px); opacity: 1; } to { transform: none; opacity: 1; } }
.eo-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 20px 24px 16px; border-bottom: 1px solid var(--line); }
.eo-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--blue); }
.eo-title { font-size: 17px; font-weight: 600; margin-top: 4px; }
.eo-x { border: 0; background: none; font-size: 16px; color: var(--ink-3); cursor: pointer; }
.eo-body { flex: 1; overflow-y: auto; padding: 20px 24px; }
.eo-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px; border-top: 1px solid var(--line); }
.dtable .name-cell .drill { color: var(--ink-3); opacity: 0; transition: opacity 0.15s ease; margin-left: auto; }
.dtable tbody tr:hover .name-cell .drill { opacity: 1; }
.dtable .sub { font-size: 12px; color: var(--ink-3); }
.dtable .ch { width: 42px; text-align: center; }

.tbl-title { font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 12px 2px; }

/* sortable headers */
.dtable th.sortable { cursor: pointer; user-select: none; transition: color 0.12s ease; }
.dtable th.sortable:hover { color: var(--ink); }
.dtable th.sortable.active { color: var(--ink); }
.dtable th .th-sort { display: inline-flex; align-items: center; gap: 5px; }
.dtable th .arr { font-size: 11px; line-height: 1; opacity: 0; transition: opacity 0.12s ease; }
.dtable th.sortable:hover .arr { opacity: 1; }
.dtable th .arr.on { opacity: 1; color: var(--blue); }

/* header filter dropdowns (Type / Status) */
.dtable th .th-filter {
    appearance: none; border: 0; background: transparent; cursor: pointer; outline: none;
    font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
    color: var(--ink-3); padding: 2px 16px 2px 0; margin: -2px 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='6' viewBox='0 0 12 8'%3E%3Cpath fill='%2386868b' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right center;
}
.dtable th .th-filter:hover { color: var(--ink); }
.dtable th .th-filter.active { color: var(--blue); }
.dtable th .th-filter option { text-transform: none; color: var(--ink); font-weight: 500; letter-spacing: 0; }

/* checkbox in table */
.ck { width: 18px; height: 18px; border-radius: 2px; border: 1.5px solid var(--line); background: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; vertical-align: middle; transition: all 0.12s ease; }
.ck.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.ck svg { opacity: 0; }
.ck.on svg { opacity: 1; }

/* --- Status & performance pills --- */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 550; padding: 3px 10px; border-radius: 2px; white-space: nowrap; }
.pill .d { width: 6px; height: 6px; border-radius: 50%; }
.pill.enabled { background: #f2f2f2; color: var(--ink); }
.pill.enabled .d { background: var(--green); }
.pill.paused { background: var(--surface-muted); color: var(--ink-2); }
.pill.paused .d { background: var(--ink-3); }
.pill.review { background: var(--blue-soft); color: var(--blue); }
.pill.review .d { background: var(--blue); }
.pill.type { background: #eef1f6; color: #000; }
.perf { font-size: 12.5px; font-weight: 600; }
.perf.Best { color: var(--ink); }
.perf.Good { color: var(--blue); }
.perf.Low { color: var(--ink); }

/* serving status (Google Ads-style) */
.serv .s-label { font-size: 13.5px; font-weight: 550; }
.serv .s-note { font-size: 11.5px; color: var(--ink-3); border-bottom: 1px dotted var(--line); display: inline-block; padding-bottom: 1px; }
.limit-badge { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 2px; border: 1px solid #d5d5d5; color: var(--ink); background: #f7f7f7; white-space: nowrap; }
.limit-badge.red { color: var(--ink); border-color: #cbcbcb; background: #efefef; }

/* Assets tab chips */
.asset-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.asset-chip { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 2px; padding: 9px 15px; font-size: 14px; font-weight: 500; color: var(--ink); cursor: pointer; transition: all 0.13s ease; }
.asset-chip:hover { border-color: #b9b9c0; }
.asset-chip.on { background: var(--blue-soft); border-color: var(--blue); color: var(--blue); font-weight: 600; }
.asset-chip .ac-ic { color: var(--ink-3); font-size: 13px; }
.asset-chip.on .ac-ic { color: var(--blue); }

/* campaign table totals row */
.camptype-sel { display: inline-flex; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 2px; padding: 7px 34px 7px 16px; font-size: 13px; font-weight: 550; color: var(--ink); height: auto; min-height: 0; background-position: right 14px center; }
.level-toggle { display: inline-flex; background: var(--bg-soft); border: 1px solid var(--line-soft); border-radius: 2px; padding: 3px; gap: 2px; }
.level-toggle button { border: 0; background: transparent; cursor: pointer; padding: 7px 15px; border-radius: 2px; font-size: 13px; font-weight: 550; color: var(--ink-2); transition: all 0.15s ease; white-space: nowrap; }
.level-toggle button:hover { color: var(--ink); }
.level-toggle button.on { background: var(--blue-soft); color: var(--ink); box-shadow: var(--sh-1); }
.dtable tfoot .totals-row td { border-top: 2px solid var(--line); background: var(--bg-soft-2); font-weight: 700; color: var(--ink); padding: 13px 16px; }
.dtable tfoot .totals-row td.num { font-variant-numeric: tabular-nums; }

/* dealer URL feed */
.dtable.urls .u-link { color: var(--blue); font-size: 12.5px; display: block; max-width: 210px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* bid strategy cell */
.bid-cell { font-size: 13px; font-weight: 500; white-space: nowrap; }
.bid-cell.inherit { color: var(--ink-3); font-weight: 400; }
.bid-select {
    appearance: none; border: 1px solid transparent; background: transparent;
    font-size: 13px; font-weight: 500; color: var(--ink);
    padding: 4px 24px 4px 7px; margin-left: -7px; border-radius: 2px; cursor: pointer; outline: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.5 5.5l4 4M4 20l1-4L16 5a2.1 2.1 0 0 1 3 3L8 19l-4 1Z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 6px center;
    max-width: 190px; text-overflow: ellipsis;
    transition: all 0.13s ease;
}
.dtable tbody tr:not(:hover) .bid-select { background-image: none; padding-right: 7px; }
.bid-select:hover { border-color: var(--line); background-color: #fff; }
.bid-select:focus { border-color: var(--blue); background-color: #fff; box-shadow: 0 0 0 4px var(--blue-ring); }

/* --- Budget cell --- */
.budget-cell { display: inline-flex; align-items: center; gap: 7px; }
.budget-cell .amt { font-weight: 600; font-variant-numeric: tabular-nums; }
.budget-cell .per { color: var(--ink-3); font-size: 12px; }
.budget-cell .pen { opacity: 0; color: var(--blue); background: none; border: 0; cursor: pointer; padding: 2px; display: inline-flex; }
.dtable tbody tr:hover .budget-cell .pen { opacity: 1; }
.budget-edit { display: inline-flex; align-items: center; gap: 6px; }
.budget-edit .dol { color: var(--ink-3); font-weight: 600; }
.budget-edit input {
    width: 78px; border: 1px solid var(--blue); border-radius: 2px; padding: 6px 8px;
    font-size: 14px; font-variant-numeric: tabular-nums; outline: none; box-shadow: 0 0 0 4px var(--blue-ring);
}
.budget-edit .mini { border: 0; background: var(--blue); color: #fff; border-radius: 2px; padding: 6px 9px; font-size: 12px; font-weight: 600; cursor: pointer; }
.budget-edit .mini.ghost { background: var(--bg-soft); color: var(--ink-2); }

/* --- Bulk action bar --- */
.bulkbar {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    background: var(--ink); color: #fff; border-radius: var(--r-md);
    padding: 12px 18px; margin-bottom: 16px;
}
.bulkbar .bb-count { font-weight: 600; font-size: 14px; }
.bulkbar .bb-sep { width: 1px; height: 20px; background: rgba(255,255,255,0.2); }
.bulkbar select, .bulkbar input {
    border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.08); color: #fff;
    border-radius: 2px; padding: 7px 10px; font-size: 13.5px; outline: none;
}
.bulkbar select option { color: var(--ink); }
.bulkbar input { width: 80px; font-variant-numeric: tabular-nums; }
.bulkbar .spacer { flex: 1; }
.bulkbar input::placeholder { color: #fff; opacity: 1; }
.bulkbar .bb-clear { background: none; border: 0; color: #fff; cursor: pointer; font-size: 13.5px; }

/* --- Summary stat strip --- */
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: var(--r-lg); overflow: hidden; margin-bottom: 20px; }
.stat-strip .st { background: #fff; padding: 16px 20px; }
.stat-strip .st .k { font-size: 12px; color: var(--ink-2); font-weight: 500; }
.stat-strip .st .v { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; margin-top: 3px; font-variant-numeric: tabular-nums; }

/* --- Scripts view --- */
.scripts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.script-card { background: #fff; border: 1px solid var(--line-soft); border-radius: var(--r-lg); box-shadow: var(--sh-1); padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.script-card .sc-top { display: flex; align-items: flex-start; gap: 12px; }
.script-card .sc-ic { width: 40px; height: 40px; border-radius: 2px; background: var(--blue-soft); color: var(--blue); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.script-card .sc-name { font-size: 16.5px; font-weight: 600; letter-spacing: -0.01em; }
.script-card .sc-cat { font-size: 12px; color: var(--ink-3); }
.script-card .sc-desc { font-size: 13.5px; color: var(--ink-2); line-height: 1.5; flex: 1 0 auto; }
.script-card .sc-last { font-size: 12.5px; color: var(--ink-3); display: flex; align-items: flex-start; gap: 7px; padding-top: 10px; border-top: 1px solid var(--line-soft); margin-top: auto; }
.script-card .sc-last svg { margin-top: 2px; flex: 0 0 auto; }
.script-card .sc-last-txt { line-height: 1.45; flex: 1; min-width: 0; }
.script-card .sc-last-txt > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.script-card .sc-last-res { color: var(--ink-2); font-weight: 600; }
.script-card .sc-last b { color: var(--ink-2); font-weight: 600; }

.seg-label { font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 7px; }
.seg { display: inline-flex; background: var(--bg-soft); border: 1px solid var(--line-soft); border-radius: 2px; padding: 3px; gap: 2px; width: 100%; }
.seg button { flex: 1; border: 0; background: transparent; cursor: pointer; padding: 7px 6px; border-radius: 2px; font-size: 13px; font-weight: 550; color: var(--ink-2); transition: all 0.15s ease; }
.seg button.on { background: var(--blue-soft); color: var(--blue); box-shadow: var(--sh-1); }

.run-btn { width: 100%; }
.run-btn:disabled { opacity: 1; }

/* progress + log */
.run-prog { height: 6px; border-radius: 2px; background: var(--surface-muted); overflow: hidden; }
.run-prog .bar { height: 100%; background: var(--blue); border-radius: 2px; transition: width 0.2s ease; }

.activity { background: #fff; border: 1px solid var(--line-soft); border-radius: var(--r-lg); box-shadow: var(--sh-1); overflow: hidden; }
.activity .act-row { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.activity .act-row:last-child { border-bottom: 0; }
.activity .act-row .a-ic { width: 30px; height: 30px; border-radius: 2px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; background: #f2f2f2; color: var(--ink); }
.activity .act-row .a-main { flex: 1; }
.activity .act-row .a-main .a-t { font-weight: 550; }
.activity .act-row .a-main .a-s { font-size: 12.5px; color: var(--ink-3); }
.activity .act-row .a-time { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }

/* --- Toast --- */
.toast-wrap { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 50; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 2px; font-size: 14px; font-weight: 500; box-shadow: var(--sh-3); display: flex; align-items: center; gap: 10px; animation: toastIn 0.25s ease; }
.toast .t-ic { color: #fff; display: flex; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@container (max-width: 880px) {
    .scripts-grid { grid-template-columns: 1fr; }
    .stat-strip { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .platform-shell, .platform-shell.nav-collapsed { grid-template-columns: minmax(0, 1fr); }
    .platform-nav { border-right: 0; border-bottom: 1px solid var(--line); max-height: 150px; }
    .platform-nav .pnav-head { padding: 8px 14px; }
    .pnav-list { display: flex; align-items: center; overflow-x: auto; padding: 6px 10px; gap: 4px; }
    .pnav-item { width: auto; flex: 0 0 auto; }
    .pnav-group { padding: 6px; flex: 0 0 auto; }
    .context-bar { padding: 14px 20px; }
    .mode-bar { padding: 12px 20px; }
}
@media (max-width: 600px) {
    .context-bar, .mode-bar { padding: 12px 16px; gap: 10px; }
    .ctx-select { max-width: 100%; }
    .ctx-select select { max-width: min(230px, 60vw); }
    .subnav { margin-left: 0; flex-wrap: wrap; }
    .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bulkbar { padding: 12px; }
    .ba-toolbar.core-toolbar { flex-wrap: wrap; }
    .pbody-tools-row { height: auto; min-height: 40px; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; padding-left: 0; }
    .pbody-tools-row .enr-month > span { margin-left: 0; padding-left: 0; }
    .mode-bar .mode-right { min-width: 0; width: 100%; justify-content: flex-start; }
    .edit-slideover { max-width: 100vw; width: 100%; }
}
