
/* Working screens share a compact, predictable layout across web and Telegram. */
html[data-theme] .portal-page{font-family:'Segoe UI',Roboto,Arial,sans-serif;font-size:14px;letter-spacing:0}
html[data-theme] .portal-page :is(button,input,select,textarea){font-family:inherit;font-size:14px}
html[data-theme] .portal-page .app-main{min-height:100dvh;background:var(--bg)}
html[data-theme] .portal-page .dashboard{padding:24px 28px;max-width:1600px;margin:0 auto}
html[data-theme] .portal-page .dashboard-heading,html[data-theme] .portal-page .welcome-banner{display:none}
html[data-theme] .portal-page .app-topbar{height:72px;min-height:72px;padding:12px 28px;border-bottom:1px solid var(--line);gap:16px;display:flex;align-items:center;background:var(--bg)}
html[data-theme] .portal-page .topbar-title{flex:1;min-width:0;display:block}
html[data-theme] .portal-page #page-title{font:650 24px/1.25 'Segoe UI',Roboto,Arial,sans-serif;letter-spacing:-.5px;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html[data-theme] .portal-page .topbar-actions{display:flex;align-items:center;gap:12px;flex:none}
.autopilot-status{display:inline-flex;align-items:center;gap:7px;min-height:34px;padding:7px 11px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--muted);white-space:nowrap;font-size:12px;cursor:pointer}
.autopilot-status:before{content:'';width:6px;height:6px;flex:none;border-radius:50%;background:var(--muted)}
.autopilot-status.is-running:before{background:var(--accent)}.autopilot-status.is-warning{color:var(--warning)}.autopilot-status.is-warning:before{background:var(--warning)}
html[data-theme] .portal-page .topbar-actions .icon-button{width:36px;min-width:36px;height:36px;min-height:36px;border:1px solid var(--line);background:transparent;border-radius:8px;padding:7px;color:var(--muted)}
html[data-theme] .portal-page .panel{padding:22px;border-radius:14px;box-shadow:none;min-width:0}
html[data-theme] .portal-page .panel h2{font-size:18px;line-height:1.35;letter-spacing:-.3px}
html[data-theme] .portal-page .panel>p{margin-bottom:16px;font-size:13px;line-height:1.65}
html[data-theme] .portal-page .panel-head{gap:12px;margin-bottom:18px}
html[data-theme] .portal-page .app-sidebar{padding:20px 16px;overflow-y:auto;scrollbar-width:thin;gap:12px;display:flex;flex-direction:column}.app-sidebar>*{flex-shrink:0}
html[data-theme] .portal-page .app-sidebar .brand{font-size:20px;margin:0 0 8px;white-space:nowrap}
html[data-theme] .portal-page .workspace-card{padding:11px 10px;margin:0 0 4px;border-radius:10px}
html[data-theme] .portal-page #app-nav{display:flex;flex:0 0 auto;flex-direction:column;gap:2px;overflow:visible;margin:0}
html[data-theme] .portal-page #app-nav a{display:flex;align-items:center;gap:10px;margin:0;padding:9px 11px;min-height:39px;font:500 13px/1.3 'Segoe UI',Roboto,Arial,sans-serif;letter-spacing:0;white-space:nowrap;border-radius:8px}
html[data-theme] .portal-page #app-nav a .ui-icon{width:18px;height:18px;flex:none}
.nav-group-label{display:block;padding:16px 11px 5px;font:600 10px/1.4 'Segoe UI',Roboto,Arial,sans-serif;letter-spacing:1.3px;color:var(--muted)}
#app-nav>.nav-group-label:first-child{padding-top:4px}
.profile-links{flex:0 0 auto!important;display:flex;flex-wrap:wrap;gap:10px 16px;border-top:1px solid var(--line);padding:14px 10px 0;margin-top:8px}
html[data-theme] .portal-page .profile-links a{display:inline-flex;padding:3px 0;min-height:24px;flex:none;width:auto;align-items:center;gap:7px;font-size:12px;color:var(--muted);line-height:1.5}
.profile-links .ui-icon{width:15px;height:15px}
.sidebar-preferences .nav-group-label{padding-top:8px}.sidebar-preferences .theme-controls{margin:0 8px;display:flex;max-width:100%}.sidebar-preferences .theme-picker{width:100%;display:flex;justify-content:space-between}.sidebar-preferences .theme-name{display:none}.sidebar-preferences .theme-option{flex:1;padding:7px;justify-content:center}
html[data-theme] .portal-page .sidebar-user{margin-top:auto;padding-top:16px;min-width:0}.sidebar-user>div{min-width:0}.sidebar-user strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.menu-toggle,.workspace-bottom-nav{display:none}.mobile-drawer:not([open]){display:none}
.autopilot-status>.ui-icon{display:none}
html[data-theme] .portal-page #shop-health{padding:20px;margin:0 0 20px;background:var(--surface);border-radius:14px;display:block}
html[data-theme] .portal-page #shop-health h2{font-size:17px}.health-metrics{display:flex;flex-wrap:wrap;gap:16px}
html[data-theme] .portal-page #shop-health .health-metrics{display:flex;margin:14px 0}.health-stat{display:flex;gap:8px;align-items:baseline;padding:0;background:none;border:0}.health-stat strong{font-size:20px}.health-stat span{font-size:12px}
html[data-theme] .portal-page #shop-health.health-compact :is(.health-metrics,.footnote,.compact-actions,details){display:flex}
html[data-theme] .portal-page #shop-health .compact-actions{display:flex}
html[data-theme] .portal-page .metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;align-items:stretch;margin:0 0 20px}
html[data-theme] .portal-page .metric-card{padding:18px;min-height:142px;height:auto;display:flex;flex-direction:column;min-width:0;grid-column:auto;overflow:hidden;border-radius:14px}
html[data-theme] .portal-page .metric-card:first-child:after{display:none}
html[data-theme] .portal-page .metric-card>span{font-size:12px;line-height:1.45;min-height:34px;color:var(--muted)}
html[data-theme] .portal-page .metric-card>strong,html[data-theme] .portal-page .metric-card:first-child>strong{font-size:27px;line-height:1.3;letter-spacing:-.6px;white-space:normal;overflow-wrap:anywhere;margin:6px 0;font-variant-numeric:tabular-nums}
html[data-theme] .portal-page .metric-card>small{margin-top:auto;line-height:1.4;font-size:11px}
html[data-theme] .portal-page .overview-grid{grid-template-columns:minmax(0,1.45fr) minmax(0,1fr);gap:18px;align-items:start}.overview-side{display:grid;gap:18px;min-width:0}html[data-theme] .portal-page .activity-grid{display:block}html[data-theme] .portal-page .activity-grid>.panel{width:100%}
html[data-theme] .portal-page .distribution-panel{display:grid;grid-template-columns:120px minmax(0,1fr);gap:12px;align-items:center}.distribution-panel>.panel-head{grid-column:1/-1}
html[data-theme] .portal-page .distribution-visual{width:min(130px,100%);height:auto;margin:0 auto}
html[data-theme] .portal-page .distribution-legend{width:100%;margin:0;gap:10px}
html[data-theme] .portal-page .donut-label{fill:var(--muted);font:600 18px 'Segoe UI',sans-serif}
html[data-theme] .portal-page .events-panel .empty-state{min-height:130px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;margin:auto}
html[data-theme] .portal-page .events-panel .empty-state>span{font-size:28px;color:var(--muted)}
html[data-theme] .portal-page .chart-period button{min-height:32px;padding:5px 9px;font-size:12px;white-space:nowrap}
html[data-theme] .portal-page .sales-panel .panel-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
html[data-theme] .portal-page .sales-panel .panel-head h2{white-space:nowrap}
html[data-theme] .portal-page .sales-panel .panel-head p{font-size:11px;margin:5px 0 0}
html[data-theme] .portal-page .chart-summary{margin-top:8px;margin-bottom:12px}
html[data-theme] .portal-page .chart-toolbar{display:flex;gap:12px;align-items:center;margin:0 0 12px;padding:0;border:0;background:none;min-height:32px}
html[data-theme] .portal-page .chart-toolbar select{font-size:12px;min-height:34px;padding:6px 9px;width:auto;max-width:70%}
html[data-theme] .portal-page .chart-modes{display:flex;gap:4px;margin-left:auto}.chart-mode{min-height:32px}
html[data-theme] .portal-page .section-toolbar{display:flex;align-items:center;justify-content:flex-start;gap:10px;flex-wrap:wrap;margin:0 0 16px;height:auto}
html[data-theme] .portal-page .section-toolbar .search-box{flex:1 1 220px;max-width:440px;margin:0}
html[data-theme] .portal-page .section-toolbar>select{width:190px;min-width:0;margin:0;font-size:12px}
html[data-theme] .portal-page .section-toolbar>.button{width:auto;min-height:42px;white-space:nowrap;margin:0;padding:10px 14px;flex:0 0 auto;font-size:12px}
.review-warning{padding:12px 15px;background:var(--warning-soft);color:var(--warning);border:1px solid color-mix(in srgb,var(--warning) 30%,transparent);border-radius:10px;line-height:1.55;font-size:13px;margin:0 0 16px}
html[data-theme] .portal-page .products-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
html[data-theme] .portal-page .product-card{display:flex;align-items:flex-start;gap:14px;padding:18px;border-radius:14px;min-width:0;height:auto;overflow:hidden}
html[data-theme] .portal-page .product-art{display:block;width:48px;min-width:48px;height:48px;min-height:0;max-height:48px;padding:0;background:none;flex:none;border:0;border-radius:10px;overflow:hidden}
html[data-theme] .portal-page .product-art:after{display:none}
html[data-theme] .portal-page .product-art .sale-cover{width:48px;height:48px;min-width:0;border-radius:10px}
html[data-theme] .portal-page .product-content{min-width:0;flex:1;padding:0}
html[data-theme] .portal-page .product-content h2{font-size:15px;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin:5px 0 4px}
html[data-theme] .portal-page .product-content>p{font-size:12px;margin:0 0 8px;line-height:1.5}
.product-meta{display:flex;align-items:center;gap:5px;color:var(--muted);font-size:11px}.product-meta .ui-icon{width:14px;height:14px}
html[data-theme] .portal-page .product-bottom{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin:10px 0 0;padding:0;border:0}
html[data-theme] .portal-page .product-bottom .button{min-height:34px;width:auto;margin:0;padding:6px 9px;border:1px solid var(--strong-line);border-radius:7px;line-height:1.4;white-space:nowrap;font-size:12px}
.status-badge,.neutral-badge{display:inline-flex;align-items:center;gap:6px;padding:5px 8px;border-radius:6px;border:0;background:var(--surface-raised,var(--raised));color:var(--muted);font-size:11px;line-height:1.4;white-space:nowrap}
.status-badge:before{content:'';width:5px;height:5px;flex:none;border-radius:50%;background:currentColor}.status-badge.review-pill{background:var(--warning-soft);color:var(--warning)}
html[data-theme] .portal-page #view-guard .two-columns{display:grid;grid-template-columns:minmax(260px,.8fr) minmax(0,1.2fr);gap:18px;align-items:start}
.binding-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:16px}
.binding-card{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 32px;gap:7px 8px;align-items:center;padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--surface);min-width:0}
.binding-meta{display:flex;align-items:center;gap:6px;color:var(--muted);grid-column:1;min-width:0;font-size:11px}.binding-meta>svg{width:16px;height:16px;flex:none}.binding-card>strong{grid-column:1/-1;font-size:13px;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.binding-card>.status-badge{grid-column:1;width:max-content;max-width:100%;font-size:11px}
html[data-theme] .portal-page .binding-card>.unlink-guard{grid-column:2;grid-row:3;display:grid;place-items:center;background:none;border:0;color:var(--muted);width:32px;min-width:32px;min-height:32px;height:32px;padding:6px;margin:0;border-radius:6px}.unlink-guard:hover{color:var(--danger);background:var(--danger-soft)}
html[data-theme] .portal-page .guard-instruction{padding:16px;margin-top:16px;border:1px solid var(--line);border-radius:10px;background:none;text-align:left;display:block}
.guard-instruction h3{font-size:14px}.guard-instruction code{display:inline-block;font-size:18px;margin:8px 0}.guard-instruction p{font-size:12px;line-height:1.6}.guard-instruction .card-tag{display:none}
html[data-theme] .portal-page .compact-actions,.form-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:14px 0;grid-column:1/-1}
html[data-theme] .portal-page .form-actions>.button{margin:0;min-height:42px;width:auto;white-space:nowrap;font-size:13px}
html[data-theme] .portal-page .settings-grid{gap:16px}
.promo-editor{display:grid;width:100%;max-width:none!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
html[data-theme] .portal-page .coupon-panel>h2{margin-bottom:16px}.coupon-instructions{font-size:13px;margin-bottom:20px;line-height:1.6;color:var(--muted)}.coupon-instructions summary{cursor:pointer}.coupon-instructions p{margin-top:10px;max-width:85ch}
html[data-theme] .portal-page .setting-switch{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:11px 0;border-bottom:1px solid var(--line);grid-column:1/-1;font-size:14px;line-height:1.5}
html[data-theme] .portal-page .setting-switch input{appearance:none;flex:0 0 36px;width:36px;height:22px;min-height:22px;border:1px solid var(--strong-line);border-radius:15px;background:var(--surface-raised);padding:2px;margin:0;cursor:pointer}
html[data-theme] .portal-page .setting-switch input:before{content:'';display:block;width:16px;height:16px;border-radius:50%;background:var(--muted);transition:transform .15s}
html[data-theme] .portal-page .setting-switch input:checked{background:var(--accent);border-color:var(--accent)}
html[data-theme] .portal-page .setting-switch input:checked:before{transform:translateX(14px);background:var(--bg)}
html[data-theme] .portal-page .inbox-layout{display:grid;grid-template-columns:minmax(280px,360px) minmax(0,1fr);gap:16px;align-items:stretch;min-height:560px}
html[data-theme] .portal-page .inbox-layout>.panel{padding:18px;margin:0;min-width:0;background:var(--surface)}
html[data-theme] .portal-page .inbox-layout>.panel:first-child>select{margin:0 0 12px}
html[data-theme] .portal-page .inbox-layout .search-box{max-width:none;margin:0 0 14px}
html[data-theme] .portal-page .chat-list{display:flex;flex-direction:column;gap:8px;max-height:none;overflow:visible}
html[data-theme] .portal-page .chat-choice{display:flex;align-items:center;gap:10px;width:100%;min-width:0;min-height:88px;padding:12px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink);text-align:left}
html[data-theme] .portal-page .chat-choice.selected{border-color:var(--accent);background:var(--accent-soft)}
.chat-choice-info{display:flex;flex-direction:column;gap:6px;flex:1;min-width:0}
.chat-choice-top{display:flex;align-items:center;gap:7px;justify-content:space-between;min-width:0}.chat-choice-top strong{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.reply-badge{background:var(--warning-soft);color:var(--warning);padding:4px 6px;border-radius:5px;white-space:nowrap;flex:none;font-size:10px;font-weight:600}.chat-state{font-size:10px;color:var(--muted)}
.chat-preview{font-size:12px;color:var(--ink);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.chat-choice-info small{color:var(--muted);font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-choice .sale-cover{width:36px;height:36px;flex-basis:36px;border-radius:8px}
.conversation-placeholder{display:flex;align-items:center;justify-content:center;text-align:center;min-height:400px;max-width:320px;margin:auto;color:var(--muted);line-height:1.7;font-size:15px}
.conversation-placeholder:before{content:none}
html[data-theme] .portal-page #conversation .message-thread{max-height:440px;min-height:160px;padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--bg)}
.chat-back{display:none}.conversation-tools{font-size:12px;color:var(--muted);padding-top:16px}.conversation-tools summary{cursor:pointer;padding:10px 0}
.list-pager{display:flex;justify-content:space-between;align-items:center;gap:10px;padding-top:14px;width:100%;grid-column:1/-1;font-size:12px;color:var(--muted)}.list-pager .button{width:auto;min-height:36px;margin:0;font-size:12px}.list-pager button:disabled{opacity:.35;cursor:default}
.order-row{cursor:pointer}.order-row:focus-visible{outline:2px solid var(--accent);outline-offset:-3px}
html[data-theme] .portal-page #all-orders .table-wrap{max-height:none;overflow:visible}
html[data-theme] .portal-page .order-row:hover td{background:var(--accent-soft)}
html[data-theme] .portal-page td.order-actions{white-space:nowrap;min-width:80px}
html[data-theme] .portal-page .order-actions .icon-button{display:inline-grid;place-items:center;width:32px;min-width:32px;height:32px;min-height:32px;margin:0 2px;padding:7px;border:1px solid var(--line);border-radius:7px;background:none;color:var(--muted)}
.order-notice{display:flex;align-items:center;justify-content:space-between;gap:16px;border:1px solid var(--line);background:var(--surface);border-radius:12px;padding:14px 18px;margin:0 0 18px;color:var(--ink,var(--text))}.order-notice strong{font-size:14px}.order-notice p{font-size:12px;margin-top:4px}.order-notice .button{width:auto;white-space:nowrap;min-height:38px;padding:8px 12px;font-size:12px}
.order-import{font-size:12px;color:var(--muted)}.order-import summary{cursor:pointer;min-height:40px;padding:10px 0}.order-import .compact-form{margin-top:12px}
.technical-logs{margin:20px 0;color:var(--muted);font-size:12px}.technical-logs summary{cursor:pointer;padding:12px}
html[data-theme] .portal-page .setup-guide.setup-complete{display:none}
html[data-theme] .portal-page .dashboard-footer{display:flex;flex-wrap:wrap;justify-content:space-between;gap:12px;padding:18px 0;margin-top:26px;border-top:1px solid var(--line);font-size:11px;line-height:1.7}
.shop-list{display:flex;flex-direction:column;gap:8px;margin:0 0 24px}.shop-list-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px;border:1px solid var(--line);border-radius:10px}.shop-list-row .button{margin:0;width:auto;font-size:12px}
.upload-zone{position:relative;display:flex!important;flex-wrap:wrap;align-items:center;justify-content:center;gap:9px!important;margin-top:8px;padding:22px 14px!important;border:1px dashed var(--strong-line)!important;border-radius:12px;background:var(--surface-raised,var(--raised));color:var(--ink,var(--text));cursor:pointer;text-align:center;font-size:13px;min-width:0}
.upload-zone>svg{width:22px;height:22px;flex:none;color:var(--muted)}.upload-zone>strong{font-size:13px;line-height:1.5;overflow-wrap:anywhere;min-width:0;max-width:100%}.upload-hint{flex:1 1 100%;font-size:11px;color:var(--muted);line-height:1.6}.upload-zone:focus-visible,.upload-zone:hover,.upload-zone.drag-over{border-color:var(--accent)!important;background:var(--accent-soft)}
html[data-theme] .upload-zone .upload-input{display:none;position:absolute;opacity:0;width:1px;height:1px;min-height:0;margin:0;padding:0;pointer-events:none}
.search-select{display:flex;flex-direction:column;gap:5px;min-width:0;margin-top:8px}.search-select input{margin:0!important;min-height:32px!important;height:32px;padding:6px 10px!important;font-size:12px!important;background:var(--surface-raised)!important}.search-select select{margin:0!important;width:100%;min-width:0;text-overflow:ellipsis}
.picker-field{min-width:0}.bulk-table{margin-top:16px}.bulk-table table{width:100%;table-layout:fixed}.bulk-table th:first-child{width:65px}.bulk-table th:nth-child(3){width:120px}.bulk-table th:last-child{width:145px}.bulk-table input[type=number]{width:100%;margin:0;min-height:38px}.bulk-table small{display:block;color:var(--muted);font-size:11px;margin-top:4px}.bulk-table strong{font-size:13px}.bulk-table .form-actions label{margin:0}.bulk-preview{font-size:13px;color:var(--muted)}
html[data-theme] .portal-page #view-catalog>article{margin-bottom:20px}html[data-theme] .portal-page #view-catalog h3{margin:28px 0 16px}
html[data-theme] textarea{resize:none;scrollbar-width:none}html[data-theme] textarea::-webkit-scrollbar{display:none}
html[data-theme] :is(button,a,input,select,textarea){touch-action:manipulation}
/* Telegram first screen: shop, revenue, then daily work. */
body:has(.mini-shell){scrollbar-width:none}body:has(.mini-shell)::-webkit-scrollbar,html:has(.mini-shell)::-webkit-scrollbar{width:0;display:none}
.mini-shell .app-header{margin-bottom:14px;min-height:30px}.mini-shell .app-header.is-connected .brand{display:none}.mini-shell .app-header.is-connected{justify-content:flex-end;min-height:0;height:0;margin:0;position:relative;top:18px;right:8px;z-index:2}.mini-shell .app-header.is-connected #refresh{background:var(--surface);width:32px;height:32px;min-width:32px}
.mini-shell .shop-selector{min-height:58px;margin-bottom:12px;padding:10px 48px 10px 12px;border-radius:12px}.mini-shell .shop-selector .shop-info small{font-size:11px}
.mini-shell .page-heading{padding:0;border:0;border-radius:0;background:none;margin:20px 0 16px}.mini-shell .page-heading h1{font-size:25px;line-height:1.3}
.mini-shell .bottom-nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:2px;padding-inline:6px}.mini-shell .nav-button{font-size:11px;min-width:0;position:relative}
.mini-shell .nav-counter{position:absolute;top:3px;left:calc(50% + 5px);width:16px;height:16px;min-width:16px;min-height:16px;display:grid;place-items:center;padding:0;border-radius:50%;background:var(--accent);color:var(--accent-ink);font-size:10px;line-height:1;font-weight:750;border:0;box-shadow:0 0 0 2px var(--bg)}
.mini-shell .nav-counter:before{content:none}.mini-shell .pill{background:var(--raised);color:var(--muted);border:0;padding:4px 7px;font-size:11px;line-height:1.4;white-space:nowrap}.mini-shell .pill.warning{color:var(--amber);background:color-mix(in srgb,var(--amber) 13%,transparent)}.mini-shell .pill.danger{color:var(--red)}.mini-shell .pill:before{content:none}
.mini-shell .paged-list,.mini-shell .collection-list{max-height:none;overflow:visible}.mini-shell .list-pager{margin-bottom:12px}
.mini-shell .sort-control{width:100%;padding:10px;border:1px solid var(--line);border-radius:9px;color:var(--text);background:var(--surface);margin:6px 0 12px}
.collection-search{display:block;width:100%;padding:11px;margin:12px 0;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--text);font:inherit;font-size:14px}
.mini-binding-grid{display:grid;grid-template-columns:1fr;gap:10px}.mini-binding-card{display:grid;grid-template-columns:1fr auto;gap:7px;padding:13px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}.mini-binding-card>strong{grid-column:1/-1;font-size:14px;line-height:1.4}.mini-binding-card>.pill{grid-column:2;grid-row:1}.mini-binding-card .binding-meta{grid-column:1;grid-row:1}.mini-binding-card small{color:var(--muted)}
.mini-shell .chat-row .row-main{min-width:0;width:100%}.chat-row-top{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}.chat-row-top strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mini-shell .chat-row .row-main p{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mini-shell .chat-row .row-main>small{font-size:11px;color:var(--muted);display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-top:4px}.mini-shell .chat-row .sale-cover{width:36px;height:36px;flex-basis:36px}.mini-shell .row-main{min-width:0}
.mini-shell .order-notice{padding:12px;gap:10px;margin-top:12px}.mini-shell .order-notice strong{font-size:12px}.mini-shell .order-notice p{font-size:11px}.sheet .order-notice{display:none}.mini-shell .subscription-plan .button{margin-top:12px}
.theme-option>svg{width:19px;height:19px;flex-shrink:0}
@media(min-width:1500px){html[data-theme] .portal-page .distribution-panel{display:grid;grid-template-columns:minmax(130px,.8fr) minmax(0,1.2fr);align-content:start;align-items:center;gap:16px}.distribution-panel>.panel-head{grid-column:1/-1}}
@media(max-width:1150px) and (min-width:901px){html[data-theme] .portal-page .metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}html[data-theme] .portal-page .overview-grid{grid-template-columns:1fr}html[data-theme] .portal-page #view-guard .two-columns{grid-template-columns:1fr}html[data-theme] .portal-page .products-grid{grid-template-columns:1fr}}
@media(max-width:900px){
 html[data-theme] .portal-page #app-screen>.app-sidebar{display:none}
 html[data-theme] .portal-page .app-topbar{position:sticky;top:0;z-index:20;height:64px;min-height:64px;padding:10px 16px;gap:10px;background:var(--glass);backdrop-filter:blur(12px)}
 html[data-theme] .portal-page #page-title{font-size:18px;letter-spacing:-.25px}
 html[data-theme] .portal-page .topbar-actions{gap:6px}
 html[data-theme] .portal-page .autopilot-status{font-size:0;width:28px;min-height:32px;padding:0;justify-content:center;border:0;background:none}.autopilot-status:before{width:7px;height:7px}
 html[data-theme] .portal-page .menu-toggle{display:grid;place-items:center;flex:none;width:32px;min-width:32px;height:36px;min-height:36px;border:0;padding:0;font-size:24px;border-radius:8px;background:none;color:var(--ink)}
 html[data-theme] .portal-page .dashboard{padding:18px 16px calc(88px + env(safe-area-inset-bottom,0px));max-width:100%}
 html[data-theme] .portal-page .workspace-bottom-nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));position:fixed;z-index:30;bottom:0;left:0;right:0;padding:7px 10px calc(7px + env(safe-area-inset-bottom,0px));border-top:1px solid var(--line);background:var(--glass);backdrop-filter:blur(16px);min-height:64px}
 .workspace-bottom-nav>a,.workspace-bottom-nav>button{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:48px;font-size:11px!important;color:var(--muted);background:none;border:0;text-decoration:none}.workspace-bottom-nav .ui-icon{width:21px;height:21px}.workspace-bottom-nav a.active{color:var(--accent)}
 .workspace-bottom-nav .tab-counter{position:absolute;top:0;left:calc(50% + 5px);width:16px;height:16px;display:grid;place-items:center;border-radius:50%;background:var(--accent);color:var(--accent-ink);font-size:10px;line-height:1;font-weight:700}
 html[data-theme] .portal-page #mobile-drawer{position:fixed;inset:0;width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;padding:0;border:0;border-radius:0;background:var(--sidebar);color:var(--ink);overflow-y:auto;overscroll-behavior:contain}
 html[data-theme] .portal-page #mobile-drawer .drawer-close{position:absolute;left:16px;top:13px;width:32px;height:36px;min-height:36px;padding:0;border:0;background:none;color:var(--ink);font-size:29px;z-index:2;display:grid;place-items:center}
 html[data-theme] .portal-page #mobile-drawer .app-sidebar{display:flex;position:static;flex-direction:column;width:100%;height:auto;min-height:100dvh;padding:17px 20px 25px;border:0;gap:10px;overflow:visible}
 html[data-theme] .portal-page #mobile-drawer .brand{margin:0 0 12px 48px;font-size:19px;min-height:34px}
 html[data-theme] .portal-page #mobile-drawer #app-nav{display:flex;flex-direction:column;gap:2px;overflow:visible}
 html[data-theme] .portal-page #mobile-drawer #app-nav a{min-height:38px;padding:8px 12px;font-size:14px}
 #mobile-drawer .nav-group-label{padding-top:10px;padding-bottom:4px}
 html[data-theme] .portal-page #mobile-drawer :is(.workspace-card,.sidebar-user){display:flex}
 html[data-theme] .portal-page #mobile-drawer .mobile-logout{display:none}
 html[data-theme] .portal-page .inbox-layout{grid-template-columns:1fr;min-height:0;gap:0}
 html[data-theme] .portal-page .inbox-layout>.panel{padding:0;border:0;background:none;border-radius:0;box-shadow:none}
 html[data-theme] .portal-page .inbox-layout:not(.chat-selected)>#conversation{display:none}
 html[data-theme] .portal-page .inbox-layout.chat-selected>.panel:first-child{display:none}
 html[data-theme] .portal-page #conversation>.chat-back{display:inline-flex;min-height:38px;align-items:center;margin-bottom:12px}
 html[data-theme] .portal-page #view-orders>.panel{padding:0;border:0;background:none;box-shadow:none}
 html[data-theme] .portal-page #view-guard .two-columns{display:flex;flex-direction:column;gap:16px}
 html[data-theme] .portal-page #view-guard .two-columns>.panel{width:100%;order:0}
 html[data-theme] .portal-page #view-guard .two-columns>.panel:last-child{order:-1;padding:0;border:0;background:none}
 html[data-theme] .portal-page .metric-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 html[data-theme] .portal-page .overview-grid{grid-template-columns:1fr;gap:16px}
 html[data-theme] .portal-page .dashboard-footer{display:none}
 html[data-theme] .portal-page .distribution-panel{display:grid;grid-template-columns:130px minmax(0,1fr);gap:12px;align-items:center}
 html[data-theme] .portal-page .distribution-panel>.panel-head{grid-column:1/-1;margin:0}
 html[data-theme] .portal-page .distribution-visual{width:130px;margin:0}
 .inbox-layout .chat-choice .sale-cover{width:40px;height:40px;flex-basis:40px}
}
@media(max-width:600px){
 html[data-theme] .portal-page .panel{padding:17px;border-radius:12px}
 html[data-theme] .portal-page .metric-card{padding:13px;min-height:129px;grid-column:auto!important}
 html[data-theme] .portal-page .metric-card>strong,html[data-theme] .portal-page .metric-card:first-child>strong{font-size:25px}
 html[data-theme] .portal-page .metric-card>span{font-size:11px;min-height:30px}
 html[data-theme] .portal-page .metric-card>small{font-size:10px}
 html[data-theme] .portal-page .products-grid,.binding-grid{grid-template-columns:minmax(0,1fr);gap:10px}
 html[data-theme] .portal-page .product-card{padding:13px;gap:11px}
 html[data-theme] .portal-page .product-content h2{font-size:14px;-webkit-line-clamp:1}
 html[data-theme] .portal-page .product-content>p{font-size:11px;margin-bottom:5px}
 html[data-theme] .portal-page .product-bottom{gap:6px;margin-top:7px;flex-wrap:wrap}
 html[data-theme] .portal-page .product-bottom .button{min-height:32px;font-size:11px;padding:6px 8px}
 html[data-theme] .portal-page .product-bottom>.status-badge{font-size:10px;padding:4px 6px}
 html[data-theme] .portal-page .product-bottom>.button:last-child:not(.edit-product){font-size:0;width:32px;padding:4px}.product-bottom>.button:last-child:not(.edit-product):after{content:'Ⅱ';font-size:13px}
 html[data-theme] .portal-page .section-toolbar .search-box{max-width:none;flex-basis:100%}
 html[data-theme] .portal-page .section-toolbar>select{flex:1;min-width:0;width:130px;font-size:11px;min-height:38px}
 html[data-theme] .portal-page .section-toolbar>.button{flex:1 1 auto;font-size:11px;min-height:38px;padding:8px}
 html[data-theme] .portal-page .sales-panel .panel-head{flex-direction:row;flex-wrap:nowrap;align-items:center}
 html[data-theme] .portal-page .sales-panel .panel-head h2{font-size:16px;letter-spacing:-.4px}
 html[data-theme] .portal-page .sales-panel .panel-head p{display:none}
 html[data-theme] .portal-page .chart-period{display:flex;gap:2px;width:auto;flex:none;align-items:center;margin:0}
 html[data-theme] .portal-page .chart-period button{padding:4px 6px;font-size:11px;min-height:30px;min-width:0}
 html[data-theme] .portal-page .chart-summary{display:flex;gap:7px;align-items:baseline;flex-wrap:wrap;margin:6px 0 12px}
 html[data-theme] .portal-page .chart-summary>strong{font-size:26px}
 html[data-theme] .portal-page .chart-toolbar{flex-direction:row;gap:8px}
 html[data-theme] .portal-page .chart-footer{font-size:10px;line-height:1.5;gap:6px;flex-wrap:wrap}
 html[data-theme] .portal-page .activity-grid{grid-template-columns:1fr;gap:16px}
 html[data-theme] .portal-page .table-wrap table{min-width:0;width:100%}
 html[data-theme] .portal-page .table-wrap:not(.bulk-table) thead{display:none}
 html[data-theme] .portal-page .table-wrap:not(.bulk-table) tr{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px 10px;padding:12px 0;border-bottom:1px solid var(--line)}
 html[data-theme] .portal-page .table-wrap:not(.bulk-table) td{padding:0;border:0;min-width:0;font-size:11px;background:none}
 html[data-theme] .portal-page .table-wrap:not(.bulk-table) td:first-child{grid-column:1/-1}
 html[data-theme] .portal-page .table-wrap:not(.bulk-table) td:first-child strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;font-size:13px}
 html[data-theme] .portal-page .table-wrap:not(.bulk-table) td:nth-child(2){grid-row:3;grid-column:1;color:var(--muted)}
 html[data-theme] .portal-page .table-wrap:not(.bulk-table) td:nth-child(3){grid-row:2;grid-column:1;font-weight:650;font-size:13px}
 html[data-theme] .portal-page .table-wrap:not(.bulk-table) td:nth-child(4){grid-row:2;grid-column:2}
 html[data-theme] .portal-page .table-wrap:not(.bulk-table) td.order-actions{grid-row:3;grid-column:2;min-width:0;text-align:right}
 .promo-editor{grid-template-columns:1fr;gap:14px}.form-actions{gap:8px}.form-actions>.button{font-size:12px!important;flex:1;min-width:0;white-space:normal!important}
 .bulk-table table{table-layout:fixed}.bulk-table th:first-child{width:35px;font-size:0}.bulk-table th:nth-child(3){display:none}.bulk-table td:nth-child(3){display:none}.bulk-table th:last-child{width:95px}.bulk-table th{font-size:10px!important;padding:9px 4px!important}.bulk-table td{padding:9px 4px!important}.bulk-table strong{font-size:12px;overflow-wrap:anywhere}.bulk-table input[type=number]{min-height:36px;font-size:13px!important;padding:6px!important}.bulk-table input[type=checkbox]{width:18px;height:18px}
 .order-notice{padding:12px;gap:10px}.order-notice strong{font-size:12px}.order-notice p{font-size:11px}
 .binding-card{padding:12px 14px;gap:6px}.binding-card>strong{-webkit-line-clamp:1;font-size:14px}.binding-card>.status-badge{font-size:11px}
 .shop-list-row{font-size:13px}.mini-shell .compact-actions .button{width:auto;font-size:12px}.upload-zone{padding:18px 12px!important}
}
@media(prefers-reduced-motion:reduce){.setting-switch input:before{transition:none}}

.service-disclosure{margin:14px 0;border:1px solid var(--line);border-radius:12px;padding:14px;font-size:12px}.service-disclosure summary{cursor:pointer;font-weight:600}.service-long-text{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.8;max-height:45dvh;overflow:auto;margin-top:15px;color:var(--muted)}

.sale-product{display:flex;align-items:center;gap:14px;min-width:0}.sale-product-info{display:flex;flex-direction:column;min-width:0;gap:4px}.sale-product-info>strong{white-space:normal;line-height:1.5}.sale-cover{display:inline-grid;place-items:center;flex:0 0 52px;width:52px;height:52px;overflow:hidden;border:1px solid var(--line);border-radius:12px;background:var(--surface-raised,var(--raised));color:var(--accent);font-size:16px;font-weight:750;letter-spacing:.04em}.sale-cover img{display:block;width:100%;height:100%;object-fit:cover}.message-attachment{display:grid;gap:10px;margin-top:12px;max-width:100%;overflow-wrap:anywhere}.message-attachment img{display:block;width:auto;max-width:100%;max-height:340px;object-fit:contain;border-radius:12px;border:1px solid var(--line);background:var(--surface)}.message-attachment a{color:var(--accent);font-size:14px;text-decoration:underline;text-underline-offset:3px}.message-attachment>span{font-size:13px;color:var(--muted)}.chat-file-picker{display:flex;flex-wrap:wrap;align-items:center;gap:9px;padding:14px;border:1px dashed var(--strong-line,var(--line));border-radius:12px;background:var(--surface-raised,var(--raised));margin-block:14px}.chat-file-picker label{display:flex;flex-direction:column;gap:8px;width:100%;font-size:14px}.chat-file-picker input{width:100%;min-width:0;font-size:14px}.chat-file-name{font-size:13px;color:var(--muted);overflow-wrap:anywhere}.chat-file-picker .text-link{font-size:13px}.mini-shell .message-attachment img{max-height:280px}.mini-shell .sale-cover{flex-basis:48px;width:48px;height:48px}.mini-shell .chat-file-picker input{font-size:14px}


.upload-field{font-size:13px;color:var(--muted);min-width:0}.upload-field>span{display:block;margin-bottom:8px}html[data-theme] .portal-page .analytics-chart{min-height:0}html[data-theme] .portal-page .events-panel{margin:0}html[data-theme] .portal-page .distribution-panel .distribution-visual{margin:0}

@media(max-width:600px){html[data-theme] .portal-page .analytics-chart{height:200px}.portal-page .sales-svg{height:200px}html[data-theme] .portal-page .demo-banner{padding:10px 12px;font-size:11px;margin-bottom:16px}.portal-page .demo-banner>span{max-width:100%}.upload-field{font-size:12px}}

html[data-theme] .portal-page .product-review .edit-product{background:transparent;color:var(--ink);border-color:var(--strong-line)}
html[data-theme] .portal-page .product-meta .product-toggle{margin:0 0 0 auto;padding:4px;width:26px;min-width:26px;height:26px;min-height:26px;border:0;background:none;color:var(--muted);border-radius:5px}
.product-toggle svg{width:15px;height:15px}.product-toggle:hover{background:var(--surface-hover)!important}
html[data-theme] .portal-page #promo-list{display:grid;gap:10px;margin-top:16px;margin-bottom:0}
html[data-theme] .portal-page #promo-list .list-item{display:flex;flex-direction:row;align-items:center;flex-wrap:wrap;gap:8px 12px;min-height:0;padding:12px;height:auto;border-radius:10px;font-size:13px;line-height:1.5}
html[data-theme] .portal-page #promo-list .list-item small{margin:0;flex:1;font-size:12px}
html[data-theme] .portal-page #promo-list .list-item .button{width:auto;min-height:34px;padding:7px 10px;margin:0;font-size:12px}
html[data-theme] .portal-page .workspace-card>div{min-width:0}html[data-theme] .portal-page .workspace-card :is(strong,small){display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;font-size:11px}
@media(max-width:600px){html[data-theme] .portal-page .section-toolbar #product-filter{flex:1 1 100%;width:100%}html[data-theme] .portal-page #promo-list .list-item strong{flex-basis:100%}html[data-theme] .portal-page #promo-list .list-item small{flex-basis:100%;margin:0}html[data-theme] .portal-page .product-card{padding:12px}}

html[data-theme] .portal-page .overview-side>.panel{margin:0;min-height:0;height:auto}html[data-theme] .portal-page .distribution-panel{grid-template-rows:auto auto;grid-auto-rows:max-content;align-content:start;min-height:0;height:auto}html[data-theme] .portal-page .distribution-panel>.panel-head{margin:0}html[data-theme] .portal-page .activity-grid{margin-top:20px}

/* Final workspace alignment and touch controls. */
*{-webkit-tap-highlight-color:transparent}
:is(button,.button,.product-card,.chat-choice,.binding-card,.metric-card,.stat-tile,.list-row,.panel,.shop-selector,.autopilot-card){-webkit-user-select:none;user-select:none}
:is(input,textarea,[contenteditable],.message-thread,.message-thread *,.preview-text,.test-result){-webkit-user-select:text;user-select:text}
html[data-theme] .portal-page .bulk-table th:first-child{width:46px;padding:6px;text-align:center}
.bulk-select-control{display:grid!important;place-items:center;min-height:32px;min-width:32px;margin:0!important;padding:0!important}
html[data-theme] .portal-page .bulk-select-control input{display:block;width:18px;height:18px;min-height:18px;margin:0;padding:0}
html[data-theme] .portal-page .bulk-table :is(th,td):nth-child(2){text-align:left;padding-left:10px;padding-right:10px}
html[data-theme] .portal-page .bulk-table input[type=number]::placeholder{color:var(--muted);opacity:1}
.chat-choice-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0;width:100%;color:var(--muted)}
.chat-choice-footer>small{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.chat-choice-footer>time{flex:none;white-space:nowrap;font-size:10px;color:var(--muted);font-variant-numeric:tabular-nums}
html[data-theme] .portal-page .reply-badge{color:var(--warning);background:color-mix(in srgb,var(--warning) 15%,transparent);border:1px solid color-mix(in srgb,var(--warning) 25%,transparent);padding:3px 6px;font-size:10px;font-weight:600}
.mini-shell .chat-choice-footer>small{font-size:11px}.mini-shell .chat-choice-footer{margin-top:4px}
html[data-theme] .portal-page .sales-panel .panel-head{display:flex;flex-flow:row nowrap;justify-content:space-between;align-items:center;text-align:left}
html[data-theme] .portal-page .sales-panel .panel-head>div:first-child{flex:1;min-width:0;text-align:left}
html[data-theme] .portal-page .sales-panel .panel-head :is(h2,p){text-align:left;margin-left:0}
html[data-theme] .portal-page .sales-panel .panel-head>.chart-period{flex:0 0 auto;width:auto;margin-left:auto}
.orders-tools{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:16px}
.order-filters{display:grid;grid-template-columns:1fr 1fr;gap:8px;min-width:0}
.order-quick-actions{display:flex;flex-wrap:wrap;align-items:flex-start;gap:8px}
html[data-theme] .portal-page .order-filters select{width:100%;min-width:0;margin:0;min-height:40px;font-size:12px}
html[data-theme] .portal-page .order-quick-actions>.button{width:auto;margin:0;min-height:40px;padding:10px 13px;font-size:12px}
html[data-theme] .portal-page .order-import>summary{display:flex;align-items:center;justify-content:center;min-height:40px;padding:9px 13px;list-style:none;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);font-size:12px;line-height:1.5}
.order-import>summary::-webkit-details-marker{display:none}.order-import[open]>summary{border-color:var(--strong-line)}
html[data-theme] .portal-page .product-meta .product-toggle{display:grid;place-items:center;width:32px;min-width:32px;height:32px;min-height:32px;border:1px solid var(--strong-line);border-radius:8px;background:var(--surface-raised);padding:7px}
html[data-theme] .portal-page .product-meta{min-height:32px;height:auto}
html[data-theme] .portal-page .search-select{display:flex;gap:0;border:1px solid var(--line);border-radius:10px;overflow:hidden;background:var(--surface);padding:0}
html[data-theme] .portal-page .search-select:focus-within{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-soft)}
html[data-theme] .portal-page .search-select>input{border:0!important;border-bottom:1px solid var(--line)!important;border-radius:0!important;box-shadow:none!important;margin:0!important}
html[data-theme] .portal-page .search-select>select{border:0!important;border-radius:0!important;box-shadow:none!important;margin:0!important;min-height:40px}
html[data-theme] .portal-page select{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.price-adjustment{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;align-items:end;grid-column:1/-1;min-width:0}
.price-adjustment>label{min-width:0}
@media(max-width:900px){
 html[data-theme] .portal-page #mobile-drawer .app-sidebar{align-items:stretch;text-align:left;padding-left:20px;padding-right:20px}
 html[data-theme] .portal-page #mobile-drawer .app-sidebar>*{align-self:stretch;max-width:none}
 html[data-theme] .portal-page #mobile-drawer :is(#app-nav,.workspace-card,.sidebar-user,.sidebar-preferences,.profile-links){width:100%;max-width:none;margin-left:0;margin-right:0;text-align:left}
 html[data-theme] .portal-page #mobile-drawer #app-nav{align-items:stretch}
 html[data-theme] .portal-page #mobile-drawer .brand{justify-content:flex-start}
 html[data-theme] .portal-page #mobile-drawer .nav-group-label{padding-left:0;text-align:left}
 html[data-theme] .portal-page #mobile-drawer .profile-links{align-items:flex-start;justify-content:flex-start;padding-left:0;padding-right:0;gap:8px 16px}
 html[data-theme] .portal-page #mobile-drawer .sidebar-preferences .theme-controls{margin-left:0;margin-right:0;justify-content:flex-start;width:max-content}
 html[data-theme] .portal-page #mobile-drawer .sidebar-preferences .theme-picker{width:auto;justify-content:flex-start}
 html[data-theme] .portal-page #mobile-drawer .sidebar-preferences .theme-option{flex:0 0 38px}
 html[data-theme] .portal-page #mobile-drawer .sidebar-user{justify-content:flex-start;gap:10px}
 html[data-theme] .portal-page #view-orders>.panel>.panel-head{display:none}
 html[data-theme] .portal-page #view-orders .orders-tools{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}
 html[data-theme] .portal-page #view-orders .order-filters{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;width:100%}
 html[data-theme] .portal-page #view-orders .order-quick-actions{width:100%;gap:8px}
 html[data-theme] .portal-page #view-orders .order-quick-actions>:is(.button,details){flex:1 1 0;min-width:0}
 html[data-theme] .portal-page #view-orders .order-quick-actions>details[open]{flex-basis:100%}
}
@media(max-width:600px){
 html[data-theme] .portal-page .bulk-table th:first-child{width:42px;padding:5px}
 html[data-theme] .portal-page .bulk-table :is(th,td):nth-child(2){padding-left:8px!important;padding-right:8px!important}
 html[data-theme] .portal-page .product-meta .product-toggle{width:44px;height:44px;min-height:44px;min-width:44px}
 html[data-theme] .portal-page .product-meta{min-height:44px;height:auto}
 .chat-choice-footer>time{font-size:10px}
}

/* Shared select: themed controls, searchable top-layer menus, native form values. */
.custom-select{position:relative;display:inline-flex;flex-direction:column;width:100%;min-width:0;max-width:100%;vertical-align:middle}
.custom-select[hidden]{display:none!important}
select.custom-select-native{display:none!important}
html[data-theme] :is(.portal-page,.mini-shell) .custom-select-trigger{display:flex;align-items:center;gap:12px;width:100%;min-width:0;min-height:44px;margin:0;padding:10px 13px;border:1px solid var(--line);border-radius:10px;background:var(--bg,var(--surface));color:var(--ink,var(--text));font:inherit;font-size:13px;font-weight:500;line-height:1.5;text-align:left;cursor:pointer;box-shadow:none;transition:border-color .15s,background-color .15s}
.custom-select-value{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.custom-select-trigger:after{content:'';flex:0 0 6px;width:6px;height:6px;margin:0 2px 3px 3px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg);opacity:.7}
html[data-theme] :is(.portal-page,.mini-shell) .custom-select-trigger:hover{border-color:var(--strong-line,var(--accent));background:var(--surface-raised,var(--surface))}
html[data-theme] :is(.portal-page,.mini-shell) .custom-select-trigger[aria-expanded=true]{border-color:var(--accent);background:var(--accent-soft,var(--surface))}
.custom-select-trigger[aria-expanded=true]:after{transform:rotate(225deg);margin-top:5px}
html[data-theme] :is(.portal-page,.mini-shell) .custom-select-trigger:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
html[data-theme] :is(.portal-page,.mini-shell) .custom-select-trigger:disabled{opacity:.45;cursor:not-allowed}
html[data-theme] :is(.portal-page,.mini-shell) .custom-select-trigger[aria-invalid=true]{border-color:#df8077}
.custom-select-menu{position:fixed;inset:auto;z-index:10000;display:flex;flex-direction:column;gap:6px;box-sizing:border-box;margin:0;padding:6px;border:1px solid var(--strong-line,var(--line));border-radius:12px;background:var(--surface,#15171b);color:var(--ink,var(--text,#edf1f3));box-shadow:0 16px 44px #0004,0 3px 10px #0002;font-family:Manrope,sans-serif;font-size:13px;font-weight:500;line-height:1.5;text-align:left;overflow:hidden;isolation:isolate}
.custom-select-menu[hidden],.custom-select-menu [hidden]{display:none!important}
html[data-theme] :is(.portal-page,.mini-shell) .custom-select-search{flex:none;width:100%;min-height:40px;height:40px;margin:0;padding:9px 11px;border:1px solid var(--line);border-radius:8px;background:var(--bg,var(--surface));color:var(--ink,var(--text));font:inherit;font-size:16px;box-sizing:border-box;outline-offset:-2px}
.custom-select-options{display:block;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scroll-padding:4px}
.custom-select-option{position:relative;display:flex;align-items:center;min-height:40px;box-sizing:border-box;margin:2px 0;padding:10px 36px 10px 12px;border-radius:7px;color:var(--muted);cursor:pointer;overflow-wrap:anywhere;white-space:normal;touch-action:manipulation}
.custom-select-option.is-active{background:var(--surface-raised,var(--raised,#24282d));color:var(--ink,var(--text))}
.custom-select-option[aria-selected=true]{background:var(--accent-soft,#a5ebc51a);color:var(--accent,#a5ebc5)}
.custom-select-option[aria-selected=true]:after{content:'';position:absolute;right:15px;width:5px;height:10px;border-right:1.8px solid currentColor;border-bottom:1.8px solid currentColor;transform:rotate(45deg)}
.custom-select-option[aria-disabled=true]{opacity:.4;cursor:not-allowed}
.custom-select-empty{padding:14px 12px;color:var(--muted);font-size:13px}
.custom-select-error{margin-top:5px;color:#df8077;font-size:12px}
html[data-theme] .portal-page .chart-toolbar>.custom-select{width:245px;max-width:calc(100% - 90px)}
html[data-theme] .portal-page .chart-toolbar .custom-select-trigger{min-height:36px;padding:7px 10px;font-size:12px}
html[data-theme] .portal-page .section-toolbar>.custom-select{width:190px;margin:0}
html[data-theme] .portal-page .order-filters>.custom-select{width:100%}
html[data-theme] .portal-page .order-filters .custom-select-trigger{min-height:40px;font-size:12px}
html[data-theme] .portal-page .inbox-layout>.panel:first-child>.custom-select{margin-bottom:12px}
html[data-theme] .portal-page #shop-health .custom-select{width:auto;min-width:160px;max-width:100%}
html[data-theme] .portal-page .search-select{border:0;overflow:visible;background:transparent}
.mini-shell .custom-select.sort-control{width:100%;max-width:none;margin:6px 0 12px;padding:0;border:0;border-radius:0;background:transparent}
.mini-shell .custom-select.currency-select{width:110px}
@media(max-width:600px){html[data-theme] .portal-page .section-toolbar>.custom-select{flex:1;min-width:0;width:130px}html[data-theme] .portal-page .custom-select-trigger,.mini-shell .custom-select-trigger{min-height:44px}html[data-theme] .portal-page #shop-health .custom-select{width:100%}html[data-theme] .portal-page .chart-toolbar .custom-select-trigger{min-height:40px}}
html[data-theme] .portal-page .distribution-visual{aspect-ratio:1;flex-shrink:0}
html[data-theme] .portal-page .distribution-visual svg{width:100%;height:100%;aspect-ratio:1}
html[data-theme] .portal-page .distribution-item>span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:normal;overflow-wrap:anywhere}

/* Primary automation tools: visible summaries, editors opened on demand. */
.automation-feature-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:18px 0 24px;align-items:stretch}
html[data-theme] .portal-page .automation-feature-grid>.panel,.mini-shell .automation-feature-grid>.panel{margin:0;padding:22px;min-width:0;border:1px solid var(--line);border-radius:18px;background:var(--surface)}
.automation-feature-head{display:flex;align-items:center;gap:12px;min-height:44px}
.automation-feature-icon{display:grid;place-items:center;flex:0 0 40px;width:40px;height:40px;border-radius:12px;border:1px solid var(--accent-line,var(--line));background:var(--accent-soft,var(--raised));color:var(--accent);font-size:23px;font-weight:650}
.automation-feature-eyebrow{display:block;font-size:10px;letter-spacing:1.2px;color:var(--muted);margin-bottom:4px}
html[data-theme] .portal-page .automation-feature h2,.mini-shell .automation-feature h2{font-size:18px;line-height:1.3;letter-spacing:-.35px;margin:0}
html[data-theme] .portal-page .automation-feature>.automation-feature-description,.mini-shell .automation-feature>.automation-feature-description{font-size:13px;line-height:1.6;margin:14px 0;color:var(--muted)}
.automation-feature-status{font-size:12px;line-height:1.5;color:var(--accent);margin:12px 0}
.automation-feature-controls{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between;margin-top:4px}
html[data-theme] .portal-page .automation-feature-controls>.button{width:auto;min-height:36px;padding:7px 10px;margin:0;font-size:12px}
.automation-feature-editor{border-top:1px solid var(--line);margin-top:18px;padding-top:14px}
.automation-feature-editor>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:36px;list-style:none;cursor:pointer;font-size:13px;font-weight:600;color:var(--ink,var(--text));text-align:left}
.automation-feature-editor>summary::-webkit-details-marker{display:none}
.automation-feature-editor>summary:after{content:'+';font-size:22px;line-height:1;color:var(--accent)}
.automation-feature-editor[open]>summary:after{content:'−'}
.automation-feature-editor[open]>summary{margin-bottom:16px}
.automation-feature-editor .coupon-instructions{margin-bottom:16px}
.automation-feature-editor form{margin-top:0}
.automation-command-list{display:grid;gap:0;max-height:240px;overflow-y:auto;overscroll-behavior:contain}
.automation-command-row{display:flex;align-items:center;gap:12px;justify-content:space-between;min-width:0;padding:12px 0;border-bottom:1px solid var(--line)}
.automation-command-row:last-child{border-bottom:0}
.automation-command-row>div:first-child{min-width:0;flex:1}
.automation-command-row code{font-size:13px;font-weight:600;color:var(--accent);overflow-wrap:anywhere}
.automation-command-row p{font-size:12px;line-height:1.6;color:var(--muted);margin:5px 0 0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.automation-command-row button{flex-shrink:0;font-size:12px;min-height:36px}
.automation-row-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:4px;max-width:45%}
.automation-feature-empty{font-size:12px;line-height:1.6;color:var(--muted);padding:8px 0;margin:0}
html[data-theme] .portal-page .automation-feature #promo-list{margin-top:12px;max-height:240px;overflow-y:auto}
html[data-theme] .portal-page .automation-feature #promo-list .list-item{padding:10px 0;border-radius:0;border-width:0 0 1px;background:transparent;gap:6px 10px;content-visibility:visible;contain-intrinsic-size:none}
html[data-theme] .portal-page .automation-feature #promo-list .list-item:last-child{border-bottom:0}
html[data-theme] .portal-page .automation-feature #promo-list .list-item strong{font-family:monospace;color:var(--accent);font-size:13px}
.mini-shell .automation-feature-grid{grid-template-columns:1fr;gap:12px;margin:16px 0 24px}
.mini-shell .automation-feature-grid>.panel{padding:18px}
.mini-shell .automation-feature .button{margin-top:12px;min-height:42px;font-size:13px}
.mini-shell .automation-feature-status{font-size:12px}
.mini-shell .automation-feature-head h2{font-size:17px}
@media(max-width:1100px){.portal-page .automation-feature-grid{grid-template-columns:1fr}}

/* Compact settings share one spacing rhythm; multiline fields grow with content. */
html[data-theme] .portal-page .app-view .panel form{gap:14px;margin-top:16px;align-content:start}
html[data-theme] .portal-page .app-view .panel form label{margin:0;min-width:0;line-height:1.5}
html[data-theme] .portal-page .app-view .panel form label :is(input,select,textarea,.custom-select,.search-select){margin-top:6px}
html[data-theme] .portal-page .app-view .panel form label>:is(input:not([type=checkbox]):not([type=hidden]),textarea){display:block;width:100%;min-width:0;max-width:100%}
html[data-theme] .portal-page .app-view .panel form .custom-select :is(select,button){margin:0}
html[data-theme] .portal-page .app-view .panel form :is(input:not([type=checkbox]):not([type=file]):not([type=hidden]),select,.custom-select-trigger){min-height:42px;font-size:14px}
html[data-theme] .portal-page .app-view textarea{field-sizing:content;min-height:76px;max-height:280px;height:auto;resize:vertical;overflow-y:auto;scrollbar-width:thin;font-size:14px;line-height:1.6;padding:10px 12px}
html[data-theme] .portal-page .app-view textarea::-webkit-scrollbar{display:block;width:7px}
html[data-theme] .portal-page .app-view textarea::-webkit-scrollbar-thumb{background:var(--strong-line);border-radius:4px}
html[data-theme] .portal-page .app-view .panel form>.button{margin:0;justify-self:start;align-self:end;width:auto;min-height:42px}
html[data-theme] .portal-page .app-view .panel form>.form-actions{margin:2px 0 0}
html[data-theme] .portal-page .app-view .form-actions>.button{flex:0 0 auto;max-width:100%;white-space:normal}
html[data-theme] .portal-page .app-view .panel form>.footnote{margin:0}
html[data-theme] .portal-page .settings-grid{gap:12px 24px;align-items:start}
html[data-theme] .portal-page .settings-grid>.setting-switch{grid-column:auto;min-height:48px;padding:10px 0;margin:0;align-self:stretch;font-size:13px}
html[data-theme] .portal-page .settings-grid>.setting-switch input{margin:0}
html[data-theme] .portal-page .settings-grid>.setting-switch:has(input[name=include_history]){grid-column:1/-1}
html[data-theme] .portal-page .settings-grid>label:has(input[type=number]) input{max-width:220px}
html[data-theme] .portal-page .automation-symbol{display:grid;place-items:center;flex:0 0 48px;width:48px;height:48px;border:1px solid var(--accent-line);border-radius:13px;font-size:20px;line-height:1;padding:0}
.portal-page .automation-symbol>.ui-icon{display:block;width:26px;height:26px;margin:0;flex:none}
html[data-theme] .portal-page .automation-banner{padding:20px;gap:16px}
html[data-theme] .portal-page .automation-banner p{font-size:13px;line-height:1.6;margin-top:6px}
html[data-theme] .portal-page .scenario{display:flex;flex-direction:column}
html[data-theme] .portal-page .scenario p{min-height:0;margin:12px 0 16px}
html[data-theme] .portal-page .scenario :is(.text-link,.pill){align-self:flex-start;margin-top:auto}
html[data-theme] .portal-page .app-view .two-columns{align-items:start}
html[data-theme] .portal-page #view-guard .guard-layout{grid-template-columns:minmax(0,1fr);gap:16px}
html[data-theme] .portal-page .guard-layout>.panel{margin:0}
html[data-theme] .portal-page .guard-layout .panel-head{margin-bottom:6px}
html[data-theme] .portal-page .guard-layout .panel-head h2{margin:0}
html[data-theme] .portal-page .guard-layout .search-box{max-width:480px;margin:14px 0 0}
.portal-page .guard-layout .binding-grid{grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch}
.portal-page .binding-card{grid-template-rows:20px minmax(40px,auto) 32px;align-content:start}
.portal-page .binding-card>strong{min-height:40px;margin:0}
.portal-page .binding-card>.status-badge{align-self:center}
html[data-theme] .portal-page .guard-layout .guard-instruction{display:flex;align-items:center;gap:14px;padding:14px 0 0;margin-top:16px;border:0;border-top:1px solid var(--line);border-radius:0}
html[data-theme] .portal-page .guard-instruction code{flex:none;padding:6px 12px;margin:0;font-size:15px}
html[data-theme] .portal-page .guard-instruction p{margin:0;font-size:13px;line-height:1.6}
.portal-page .guard-setup{border:1px solid var(--line);border-radius:14px;background:var(--surface);overflow:hidden;min-width:0}
.portal-page .guard-setup>summary{display:flex;align-items:center;gap:12px;list-style:none;padding:18px 20px;cursor:pointer;color:var(--ink);font-size:14px}
.portal-page .guard-setup>summary::-webkit-details-marker{display:none}
.portal-page .guard-setup>summary>svg{color:var(--accent);flex:none}
.portal-page .guard-setup>summary>span:not(.guard-setup-toggle){font-size:13px;color:var(--muted)}
.portal-page .guard-setup-toggle{margin-left:auto;color:var(--accent);font-size:24px;line-height:1;transition:transform .18s}
.portal-page .guard-setup[open] .guard-setup-toggle{transform:none}
.portal-page .guard-setup>summary:hover{background:var(--accent-soft)}
html[data-theme] .portal-page .guard-setup>.panel{border:0;border-radius:0;margin:0;padding:0 20px 20px;background:none}
html[data-theme] .portal-page #guard-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 20px;margin:0}
html[data-theme] .portal-page #guard-form>:is(.security-note,.checkbox-label,.footnote){grid-column:1/-1}
html[data-theme] .portal-page #guard-form .upload-zone{min-height:80px;margin:0;padding:12px}
html[data-theme] .portal-page #guard-form .security-note{padding:12px;font-size:12px}
html[data-theme] .portal-page #guard-form .checkbox-label{padding:12px;align-items:center;gap:12px;flex-direction:row;justify-content:flex-start}
html[data-theme] .portal-page #guard-form .checkbox-label input{margin:0}
html[data-theme] .portal-page #view-account{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:start}
html[data-theme] .portal-page #view-account>.panel{margin:0}
html[data-theme] .portal-page #view-account>.panel:last-child{grid-column:1/-1}
html[data-theme] .portal-page #view-account form{max-width:560px}
html[data-theme] .portal-page .panel form :is(.form-actions,.compact-actions){gap:8px}
@media(max-width:1150px){.portal-page .guard-layout .binding-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){
 html[data-theme] .portal-page #view-account{grid-template-columns:minmax(0,1fr)}
 html[data-theme] .portal-page #guard-form{grid-template-columns:minmax(0,1fr)}
 html[data-theme] .portal-page .settings-grid>.setting-switch{grid-column:1/-1}
 html[data-theme] .portal-page .app-view .panel form :is(input:not([type=checkbox]):not([type=file]),select,.custom-select-trigger,textarea){font-size:16px}
 .portal-page .guard-setup>summary{flex-wrap:wrap;padding:16px}
 .portal-page .guard-setup>summary>span:not(.guard-setup-toggle){order:3;width:100%;margin-left:32px}
 html[data-theme] .portal-page .guard-setup>.panel{padding:0 16px 16px}
 .portal-page .guard-layout .binding-grid{grid-template-columns:minmax(0,1fr)}
 html[data-theme] .portal-page .guard-layout .guard-instruction{align-items:flex-start}
 html[data-theme] .portal-page .automation-symbol{flex-basis:42px;width:42px;height:42px;border-radius:11px}
}
@media(max-width:600px){html[data-theme] .portal-page .automation-feature-grid>.panel{padding:18px}.automation-feature-grid{gap:12px}.automation-feature-controls{align-items:flex-start;gap:8px}.automation-feature-controls .automation-feature-status{margin:8px 0}.automation-command-row{gap:8px}.automation-command-row button{font-size:12px}}

/* Catalogue tabs and action-oriented attention centre. */
.catalog-header{margin-bottom:24px}.catalog-header .eyebrow,.attention-hero .eyebrow{font-size:11px;letter-spacing:1.4px;margin-bottom:12px;color:var(--accent)}
.catalog-header h2,.attention-hero h2{font-size:32px;line-height:1.25;margin-bottom:10px;letter-spacing:-1px}
.catalog-header p,.attention-hero p{font-size:15px;line-height:1.7;max-width:65ch}
.catalog-tabs{display:flex;flex-wrap:wrap;gap:5px;padding:5px;margin-bottom:20px;border:1px solid var(--line);border-radius:12px;background:var(--surface);width:fit-content;max-width:100%}
html[data-theme] .portal-page .catalog-tab{min-height:42px;padding:10px 14px;border:1px solid transparent;border-radius:8px;background:none;color:var(--muted);font-size:14px;line-height:1.4;font-weight:550}
html[data-theme] .portal-page .catalog-tab:hover{background:var(--surface-hover);color:var(--ink)}
html[data-theme] .portal-page .catalog-tab[aria-selected=true]{background:var(--accent-soft);border-color:var(--accent-line);color:var(--accent)}
.catalog-tab-panel{min-width:0;scroll-margin-top:90px}.portal-page .settings-grid>.wide-field{grid-column:1/-1}
.catalog-tab-panel>.panel{margin:0 0 18px}.catalog-tab-panel form>button[type=submit]{grid-column:1/-1}
.portal-page .status-badge.status-ready{background:var(--accent-soft);color:var(--accent);border:1px solid var(--accent-line)}
.portal-page .status-badge.status-ready:before{content:'✓';display:grid;place-items:center;width:13px;height:13px;border-radius:50%;background:none;font-size:12px;font-weight:800}
.portal-page .status-badge.status-paused{background:var(--surface-raised);color:var(--ink);border:1px solid var(--strong-line)}
.portal-page .status-badge.status-paused:before{content:'Ⅱ';width:13px;height:13px;background:none;font-size:12px;line-height:1;font-weight:800;text-align:center}
.portal-page .status-badge.status-review{background:var(--warning-soft);color:var(--warning);border:1px solid color-mix(in srgb,var(--warning) 35%,transparent)}
.portal-page .status-badge.status-review:before{content:'!';display:grid;place-items:center;width:13px;height:13px;border:1px solid currentColor;border-radius:50%;background:none;font-size:10px;font-weight:800;line-height:1}
.attention-hero{display:flex;align-items:center;justify-content:space-between;gap:24px;margin:0 0 24px;padding:28px;border:1px solid var(--accent-line);border-radius:16px;background:linear-gradient(115deg,var(--accent-soft),transparent 80%),var(--surface)}
.attention-hero>.status-badge{flex:none;font-size:13px;white-space:nowrap}
.attention-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:24px}
.attention-metric{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 12px;border:1px solid var(--line);border-radius:14px;padding:22px;background:var(--surface);color:var(--ink);min-width:0;transition:border-color .2s,transform .2s}
.attention-metric:hover{border-color:var(--accent-line);transform:translateY(-2px)}
.attention-metric>.ui-icon{grid-column:2;grid-row:1;color:var(--accent);width:22px;height:22px}
.attention-metric>strong{grid-column:1;grid-row:1;font-size:32px;line-height:1.2;font-variant-numeric:tabular-nums}
.attention-metric>span{font-size:15px;grid-column:1/-1;font-weight:650}.attention-metric>small{grid-column:1/-1;color:var(--muted);font-size:13px;line-height:1.5}
.attention-tasks{display:grid;gap:12px}.attention-task{display:flex;align-items:center;gap:18px;padding:22px;border:1px solid var(--line);border-radius:14px;background:var(--surface);min-width:0}
.attention-task>div{min-width:0;flex:1}.attention-task h3{font-size:17px;line-height:1.4;margin:0 0 6px;letter-spacing:-.3px}.attention-task p{font-size:14px;line-height:1.65;max-width:75ch}
.attention-task-icon{display:grid;place-items:center;flex:0 0 42px;width:42px;height:42px;border:1px solid var(--accent-line);border-radius:12px;background:var(--accent-soft);color:var(--accent)}
.attention-task.warning .attention-task-icon{color:var(--warning);border-color:color-mix(in srgb,var(--warning) 30%,transparent);background:var(--warning-soft)}
.attention-task.danger .attention-task-icon{color:var(--danger);border-color:color-mix(in srgb,var(--danger) 30%,transparent);background:var(--danger-soft)}
html[data-theme] .portal-page .attention-task>.button{flex:none;min-height:42px;white-space:normal;font-size:13px}
.attention-clear{display:grid;justify-items:center;gap:12px;padding:40px 24px;border:1px solid var(--accent-line);border-radius:16px;background:var(--accent-soft);text-align:center}
.attention-clear>.ui-icon{width:40px;height:40px;color:var(--accent)}.attention-clear h3{font-size:23px}.attention-clear p{max-width:55ch;font-size:15px;line-height:1.7}
.attention-updated{font-size:12px;color:var(--muted);margin:16px 0 24px}.attention-nav-count{margin-left:auto;padding:2px 6px;border-radius:5px;background:var(--warning-soft);color:var(--warning);font-size:11px;line-height:1.4;min-width:20px;text-align:center}
html[data-theme] .portal-page #app-nav a[data-view=activity]{gap:8px;font-size:12px}
html[data-theme] .portal-page #app-nav a[data-view=activity]>span:not(.attention-nav-count){flex:1;min-width:0;width:auto;white-space:normal}
html[data-theme] .portal-page #app-nav>a>span.attention-nav-count{display:inline-flex;align-items:center;justify-content:center;flex:0 0 20px;width:20px;min-width:20px;height:20px;padding:2px;margin-left:auto;font-size:11px;line-height:1;text-align:center}
#attention-deliveries{scroll-margin-top:90px}.technical-logs>summary{padding:14px 0;color:var(--muted);font-size:13px}
@media(max-width:700px){.catalog-header h2,.attention-hero h2{font-size:27px}.catalog-tabs{width:100%;gap:4px}.portal-page .catalog-tabs .catalog-tab{flex:1 1 auto;padding:10px;font-size:13px}.attention-hero{padding:22px;align-items:flex-start;flex-direction:column;gap:18px}.attention-metrics{gap:8px}.attention-metric{padding:14px 10px;gap:7px}.attention-metric>strong{font-size:26px}.attention-metric>span{font-size:12px}.attention-metric>small{font-size:11px}.attention-metric>.ui-icon{width:17px;height:17px}.attention-task{align-items:flex-start;flex-wrap:wrap;padding:18px;gap:12px}.attention-task>div{flex:1 1 calc(100% - 60px)}.attention-task>.button{margin-left:54px;max-width:calc(100% - 54px)}.attention-task h3{font-size:16px}}
@media(prefers-reduced-motion:no-preference){html[data-motion=on] .catalog-tab-panel:not([hidden]),html[data-motion=on] .attention-hero{animation:workspace-arrive .35s ease both}@keyframes workspace-arrive{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}}

/* Editors appear when requested; saved content remains the primary screen. */
.portal-page .editor-disclosure{min-width:0;margin-top:16px;border:1px solid var(--line);border-radius:11px;background:var(--surface);overflow:clip}
.portal-page .editor-disclosure>summary{display:flex;align-items:center;justify-content:flex-start;gap:12px;min-height:52px;padding:14px 16px;list-style:none;cursor:pointer;color:var(--ink);font-size:14px;line-height:1.5}
.portal-page .editor-disclosure>summary::-webkit-details-marker{display:none}
.portal-page .editor-disclosure>summary:hover{background:var(--accent-soft)}
.portal-page .editor-toggle{display:grid;place-items:center;flex:0 0 26px;width:26px;height:26px;border:1px solid var(--accent-line);border-radius:7px;background:var(--accent-soft);color:var(--accent);font-size:22px;line-height:1;transition:transform .18s ease}
.portal-page .editor-disclosure[open]>summary .editor-toggle{transform:none}
.portal-page .editor-summary-copy{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 14px;min-width:0;flex:1}
.portal-page .editor-summary-copy>strong{font-size:14px;line-height:1.5;color:var(--ink)}
.portal-page .editor-summary-copy>small{font-size:12px;line-height:1.6;color:var(--muted)}
.portal-page .editor-disclosure[open]>summary{border-bottom:1px solid var(--line)}
.portal-page .editor-body{padding:0 16px 16px}
.portal-page .editor-body:has(>.panel){padding:0}
html[data-theme] .portal-page .editor-panel{margin:0 0 18px;border-radius:14px}
html[data-theme] .portal-page .editor-panel .editor-body>.panel{border:0;border-radius:0;margin:0;padding:18px 20px;background:transparent;box-shadow:none}
.portal-page .editor-panel .editor-body>.panel>h2:first-child{display:none}
html[data-theme] .portal-page .editor-body>form{margin-top:16px}
html[data-theme] .portal-page .app-view .panel form :is(input:not([type=checkbox]):not([type=file]):not([type=hidden]),textarea,.custom-select-trigger){background:var(--surface-raised);border-color:var(--strong-line)}
html[data-theme] .portal-page .app-view .panel form :is(input,textarea,.custom-select-trigger):focus-visible{border-color:var(--accent);background:var(--surface);outline-offset:2px}
html[data-theme] .portal-page .app-view textarea{min-height:68px}
html[data-theme] .portal-page #view-knowledge .knowledge-layout{grid-template-columns:minmax(0,1fr);gap:16px}
html[data-theme] .portal-page .knowledge-layout>.panel,html[data-theme] .portal-page .knowledge-layout>.editor-panel{margin:0}
.portal-page #faq-list .list-item p{max-width:85ch}
.bulk-price-placeholder{display:block;font-size:12px;line-height:1.5;color:var(--muted)}
@media(max-width:700px){
 .portal-page .editor-disclosure>summary{padding:13px;gap:10px;min-height:48px}
 .portal-page .editor-summary-copy{display:grid;gap:3px}
 .portal-page .editor-summary-copy>strong{font-size:14px}.portal-page .editor-summary-copy>small{font-size:12px}
 html[data-theme] .portal-page .editor-panel .editor-body>.panel{padding:16px}
 .portal-page .editor-body{padding:0 13px 14px}
 html[data-theme] .portal-page .app-view .two-columns:has(>.editor-disclosure){grid-template-columns:minmax(0,1fr);gap:0}
}

/* Editors use the top layer so opening a form never moves the cards below it. */
html:has(.portal-page){scrollbar-gutter:stable}
html:has(.portal-page .editor-dialog[open]){overflow:hidden}
.portal-page :is(.editor-disclosure,.guard-setup,.automation-feature-editor)>summary{border-bottom:0!important}
.portal-page :is(.editor-toggle,.guard-setup-toggle){display:grid;place-items:center;flex:0 0 30px;width:30px;height:30px;margin-block:0;padding:0;border:1px solid var(--accent-line);border-radius:6px;background:var(--accent-soft);color:var(--accent);transform:none!important;transition:none}
.portal-page :is(.editor-toggle,.guard-setup-toggle)>.ui-icon{display:block;width:18px;height:18px;transform:rotate(45deg);transition:transform .18s ease}
.portal-page details[open]>summary :is(.editor-toggle,.guard-setup-toggle)>.ui-icon{transform:none}
.portal-page .automation-feature-editor>summary{display:flex;align-items:center;justify-content:flex-start;gap:12px;list-style:none}
.portal-page .automation-feature-editor[open]>summary{margin-bottom:0}
.portal-page .automation-feature-editor>summary:after{display:none}
.portal-page .automation-feature-editor>summary::-webkit-details-marker{display:none}
html[data-theme] .portal-page .editor-dialog{position:fixed;inset:0;width:min(760px,calc(100vw - 32px));max-width:calc(100vw - 32px);max-height:calc(100dvh - 40px);margin:auto;padding:0;border:1px solid var(--strong-line);border-radius:16px;background:var(--surface);color:var(--ink);overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
.portal-page .editor-dialog:not([open]){display:none}
.portal-page .editor-dialog-header{position:sticky;top:0;z-index:4;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px 20px;border-bottom:1px solid var(--line);background:var(--surface)}
.portal-page .editor-dialog-header h2{font-size:19px;line-height:1.4;letter-spacing:-.3px;margin:0}
html[data-theme] .portal-page .editor-close{display:grid;place-items:center;flex:none;width:36px;height:36px;min-height:36px;padding:8px;border:1px solid var(--strong-line);border-radius:6px;background:var(--surface-raised);color:var(--ink)}
.portal-page .editor-close>.ui-icon{width:18px;height:18px}
.portal-page .editor-dialog>.editor-body{padding:0 20px 20px}
html[data-theme] .portal-page .editor-dialog .editor-body>.panel{padding:18px 0 0}
html[data-theme] .portal-page :is(.guard-setup,.automation-feature-editor)>.editor-dialog>:is(.panel,form,details){margin:0;padding:20px;border:0;background:none}
html[data-theme] .portal-page .guard-setup>.editor-dialog>.panel{border-radius:0}
html[data-theme] .portal-page .editor-dialog form{max-width:none}

/* Inbox is a full-width list; the selected conversation uses the same space. */
html[data-theme] .portal-page .inbox-layout{display:block;min-height:0;width:100%}
html[data-theme] .portal-page .inbox-layout>.panel{margin:0;padding:22px}
html[data-theme] .portal-page .inbox-list-panel{display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,240px);gap:16px 24px;align-items:center}
html[data-theme] .portal-page .inbox-list-panel>h2{margin:0}
html[data-theme] .portal-page .inbox-list-panel>.custom-select{grid-column:2;grid-row:1;margin:0}
html[data-theme] .portal-page .inbox-layout .search-box{grid-column:1/-1;width:100%;margin:0}
html[data-theme] .portal-page .chat-list{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1fr);gap:8px;margin:0}
html[data-theme] .portal-page .chat-choice{min-height:92px;padding:16px;gap:16px}
.portal-page .chat-choice-top strong{font-size:15px}
.portal-page .chat-preview{font-size:14px;line-height:1.5}
.portal-page .chat-choice-footer{display:flex;justify-content:space-between;gap:16px;min-width:0}
.portal-page .chat-choice-footer time{flex:none;font-size:12px;color:var(--muted)}
.portal-page .inbox-status{grid-column:1/-1;margin:0!important;color:var(--muted);font-size:12px!important}
.portal-page .inbox-status:empty{display:none}
.portal-page .inbox-layout .list-pager{padding:0}
html[data-theme] .portal-page #conversation{display:flex;flex-direction:column;height:calc(100dvh - 128px);min-height:420px;overflow:auto}
@media(min-width:761px){html[data-theme] .portal-page .dashboard:has(#demo-banner:not([hidden])) #conversation{height:calc(100dvh - 190px)}}
html[data-theme] .portal-page #conversation .chat-back{display:inline-flex;align-self:flex-start;flex:none;min-height:36px;margin:0 0 10px;padding:0}
.portal-page .conversation-header{flex:none;position:relative}
html[data-theme] .portal-page #conversation .conversation-header h2{margin:0 0 6px}
html[data-theme] .portal-page #conversation .conversation-meta{margin:0 0 12px;color:var(--muted);font-size:13px}
.portal-page .conversation-order{position:absolute;top:0;right:0;min-height:36px;display:inline-flex;align-items:center}
html[data-theme] .portal-page #conversation .message-thread{flex:1 1 auto;min-height:110px;max-height:none;margin:0;padding:18px;scrollbar-width:thin}
html[data-theme] .portal-page #conversation .message-bubble{max-width:min(80%,760px)}
html[data-theme] .portal-page #conversation .conversation-composer{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px 12px;flex:none;margin:14px 0 0}
.portal-page .conversation-composer>label{grid-column:1/-1;margin:0}
html[data-theme] .portal-page #conversation textarea{margin:6px 0 0;min-height:68px;max-height:140px;resize:vertical}
.portal-page .conversation-composer>.conversation-attachment{grid-column:1/-1;min-width:0;color:var(--muted);font-size:13px}
.portal-page .conversation-attachment>summary{cursor:pointer;padding:4px 0;overflow-wrap:anywhere}
.portal-page .conversation-attachment .chat-file-picker{margin:8px 0}
html[data-theme] .portal-page #conversation .conversation-composer>button{min-height:40px;margin:0}
.portal-page .conversation-composer>button[type=submit]{justify-self:start}
.portal-page .conversation-tools{flex:none;padding-top:8px}
.portal-page .conversation-tools>summary{padding:8px 0}

/* Keep desktop navigation on tablet/desktop widths and scroll it on short screens. */
@media(min-width:761px){
 html[data-theme] .portal-page #app-screen{display:block}
 html[data-theme] .portal-page #app-screen>.app-sidebar{display:flex;position:fixed;inset:0 auto 0 0;width:230px;height:100vh;height:100dvh;max-height:100dvh;overflow-x:hidden;overflow-y:auto;padding:20px 16px;border-right:1px solid var(--line);border-bottom:0;gap:12px;overscroll-behavior:contain;scrollbar-width:thin;z-index:40}
 html[data-theme] .portal-page .app-main{margin-left:230px}
 html[data-theme] .portal-page .app-sidebar :is(.workspace-card,.sidebar-user){display:flex}
 html[data-theme] .portal-page .app-sidebar .mobile-logout,html[data-theme] .portal-page .menu-toggle,html[data-theme] .portal-page .workspace-bottom-nav{display:none}
 html[data-theme] .portal-page .dashboard{padding:24px 28px;max-width:1600px}
 html[data-theme] .portal-page .app-topbar{min-height:72px;padding:12px 28px}
 html[data-theme] .portal-page .autopilot-status{width:auto;font-size:12px;padding:7px 11px;border:1px solid var(--line);background:var(--surface)}
}

/* Fit the desktop sidebar to the window; keep every section reachable on short screens. */
@media(min-width:761px){
 html[data-theme] .portal-page #app-screen>.app-sidebar{padding:12px;gap:6px;scrollbar-width:none}
 html[data-theme] .portal-page #app-screen>.app-sidebar::-webkit-scrollbar,
 html[data-theme] .portal-page #app-screen>.app-sidebar #app-nav::-webkit-scrollbar{display:none}
 html[data-theme] .portal-page #app-screen>.app-sidebar>.brand{min-height:32px;margin:0;font-size:19px}
 html[data-theme] .portal-page #app-screen>.app-sidebar>.workspace-card{padding:8px 10px;margin:0}
 html[data-theme] .portal-page #app-screen>.app-sidebar #app-nav{flex:1 1 auto;min-height:80px;overflow-x:hidden;overflow-y:auto;padding:0;gap:1px;scrollbar-width:none;overscroll-behavior:contain;scroll-padding:6px}
 html[data-theme] .portal-page #app-screen>.app-sidebar #app-nav a{min-height:35px;padding:7px 10px;font-size:13px;flex-shrink:0}
 html[data-theme] .portal-page #app-screen>.app-sidebar #app-nav .nav-group-label{padding:10px 10px 4px;flex-shrink:0}
 html[data-theme] .portal-page #app-screen>.app-sidebar #app-nav>.nav-group-label:first-child{padding-top:4px}
 html[data-theme] .portal-page #app-screen>.app-sidebar .subscription-nav{margin:0;padding:0}
 html[data-theme] .portal-page #app-screen>.app-sidebar .subscription-nav>a{min-height:60px;padding:10px;gap:8px}
 html[data-theme] .portal-page #app-screen>.app-sidebar .subscription-nav-copy strong{font-size:14px}
 html[data-theme] .portal-page #app-screen>.app-sidebar .subscription-nav-copy small{font-size:10px;line-height:1.3}
 html[data-theme] .portal-page #app-screen>.app-sidebar .profile-links{padding:6px 0 0;margin:0;gap:0 10px}
 html[data-theme] .portal-page #app-screen>.app-sidebar .profile-links a{font-size:11px;min-height:28px;padding:4px 0}
 html[data-theme] .portal-page #app-screen>.app-sidebar .sidebar-preferences>.nav-group-label{display:none}
 html[data-theme] .portal-page #app-screen>.app-sidebar .sidebar-preferences .theme-controls{margin:0}
 html[data-theme] .portal-page #app-screen>.app-sidebar .sidebar-user{min-height:46px;padding-top:8px;margin-top:0}
}
@media(min-width:761px) and (max-height:850px) and (hover:hover) and (pointer:fine){
 html[data-theme] .portal-page #app-screen>.app-sidebar #app-nav a{min-height:30px;padding-block:5px}
 html[data-theme] .portal-page #app-screen>.app-sidebar #app-nav .nav-group-label{padding-top:6px;padding-bottom:3px}
 html[data-theme] .portal-page #app-screen>.app-sidebar .subscription-nav>a{min-height:52px}
 html[data-theme] .portal-page #app-screen>.app-sidebar .subscription-nav-copy small{display:none}
}
@media(min-width:761px) and (max-width:1100px){
 html[data-theme] .portal-page #app-screen>.app-sidebar{width:210px;padding-inline:12px}
 html[data-theme] .portal-page .app-main{margin-left:210px}
 html[data-theme] .portal-page .app-sidebar>.brand{font-size:19px}
 html[data-theme] .portal-page .dashboard{padding:20px}
 html[data-theme] .portal-page .app-topbar{padding-inline:20px}
}
@media(max-width:760px){
 html[data-theme] .portal-page .inbox-layout>.panel{padding:0;border:0;background:none;border-radius:0}
 html[data-theme] .portal-page .inbox-list-panel{grid-template-columns:minmax(0,1fr);gap:12px}
 html[data-theme] .portal-page .inbox-list-panel>h2{display:none}
 html[data-theme] .portal-page .inbox-list-panel>.custom-select{grid-column:1;grid-row:auto}
 html[data-theme] .portal-page .chat-choice{padding:13px;min-height:92px;gap:12px}
 .portal-page .chat-choice-footer{gap:8px;flex-wrap:wrap}
 /* An opened conversation owns the phone screen, including the keyboard viewport. */
 html:has(.portal-page[data-view=inbox] .chat-selected){overflow:hidden;overscroll-behavior:none}
 html[data-theme] .portal-page[data-view=inbox]:has(.chat-selected){overflow:hidden}
 html[data-theme] .portal-page[data-view=inbox]:has(.chat-selected) :is(.app-topbar,.workspace-bottom-nav,.app-sidebar,#demo-banner){display:none}
 html[data-theme] .portal-page[data-view=inbox] .inbox-layout.chat-selected #conversation{position:fixed;z-index:45;top:var(--conversation-top,0px);left:0;right:0;width:100%;height:var(--conversation-height,100dvh);min-height:0;max-height:none;margin:0;padding:calc(8px + env(safe-area-inset-top,0px)) max(12px,env(safe-area-inset-right,0px)) calc(6px + env(safe-area-inset-bottom,0px)) max(12px,env(safe-area-inset-left,0px));border:0;border-radius:0;background:var(--bg);overscroll-behavior:contain}
 html[data-theme] .portal-page #conversation .conversation-header h2{font-size:16px;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0 0 4px}
 html[data-theme] .portal-page #conversation .chat-back{min-height:36px;margin:0 0 4px;font-size:13px;gap:6px}
 html[data-theme] .portal-page #conversation .conversation-meta{font-size:11px;line-height:1.4;margin:0 0 10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .portal-page .conversation-order{font-size:12px}
 html[data-theme] .portal-page #conversation #app-notice:not(:empty){flex:none;margin:0 0 8px;padding:8px 10px;max-height:80px;overflow:auto;font-size:12px}
 html[data-theme] .portal-page #conversation .message-thread{flex:1 1 0;min-height:64px}
 html[data-theme] .portal-page #conversation .conversation-composer{grid-template-columns:minmax(0,1fr) auto;gap:4px 8px;margin:8px 0 0;align-items:end}
 .portal-page .conversation-composer>label{grid-column:1;grid-row:1;min-width:0}
 .portal-page .conversation-composer .composer-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 html[data-theme] .portal-page #conversation .conversation-composer textarea{font-size:16px;line-height:1.4;min-height:44px;max-height:96px;margin:0;resize:none;padding:10px}
 html[data-theme] .portal-page #conversation .conversation-composer>button[type=submit]{grid-column:2;grid-row:1;min-height:44px;max-width:130px;padding:8px 12px;font-size:13px;white-space:normal}
 .portal-page .conversation-composer>.conversation-attachment{grid-column:1;grid-row:2;align-self:start;max-height:25dvh;overflow:auto;font-size:12px}
 .portal-page .conversation-attachment>summary{min-height:32px;display:flex;align-items:center;padding:4px 0}
 html[data-theme] .portal-page #conversation .conversation-composer>.conversation-new-draft{grid-column:2;grid-row:2;min-height:32px;padding:4px 0;border:0;background:none;color:var(--muted);font-size:11px}
 .portal-page .conversation-tools{padding:0;max-height:35dvh;overflow:auto;overscroll-behavior:contain}
 .portal-page .conversation-tools>summary{min-height:32px;display:flex;align-items:center;padding:4px 0;font-size:12px;cursor:pointer}
 html[data-theme] .portal-page #conversation .message-thread{padding:12px}
 html[data-theme] .portal-page #conversation .message-bubble{max-width:94%}
 html[data-theme] .portal-page .editor-dialog{width:calc(100vw - 20px);max-width:calc(100vw - 20px);max-height:calc(100dvh - 24px);padding:0;border-radius:12px}
 .portal-page .editor-dialog-header{padding:14px 16px;gap:12px}
 .portal-page .editor-dialog-header h2{font-size:17px}
 .portal-page .editor-dialog>.editor-body{padding:0 16px 16px}
 html[data-theme] .portal-page :is(.guard-setup,.automation-feature-editor)>.editor-dialog>:is(.panel,form,details){padding:16px}
}

/* Phone controls stay readable and comfortably tappable throughout the workspace. */
@media(max-width:760px){
 html:has(.portal-page){scrollbar-gutter:auto}
 html:has(.portal-page dialog[open]){overflow:hidden}
 html[data-theme] .portal-page :is(button,.button,.text-link,summary,[role=button]){touch-action:manipulation;-webkit-tap-highlight-color:var(--accent-soft)}
 html[data-theme] .portal-page :is(.app-view,dialog,#shop-health) :is(button,.button,.text-link,summary,[role=button]){min-width:44px;min-height:44px}
 html[data-theme] .portal-page :is(.app-view,dialog,#shop-health) :is(.button,.text-link){font-size:14px}
 html[data-theme] .portal-page :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]),textarea,select,.custom-select-trigger){font-size:16px!important}
 html[data-theme] .portal-page :is(.app-view,dialog,#shop-health) :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]),.custom-select-trigger){min-height:48px}
 html[data-theme] .portal-page :is(.checkbox-label,.setting-switch){min-height:48px;cursor:pointer}
 html[data-theme] .portal-page :is(button,a,summary,[role=button]):focus-visible{outline:2px solid var(--accent);outline-offset:2px}
 html[data-theme] .portal-page .dashboard{padding-bottom:calc(100px + env(safe-area-inset-bottom,0px));padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px))}

 html[data-theme] .portal-page .app-topbar{height:auto;min-height:64px;padding:calc(8px + env(safe-area-inset-top,0px)) max(12px,env(safe-area-inset-right,0px)) 8px max(12px,env(safe-area-inset-left,0px));gap:8px}
 html[data-theme] .portal-page #page-title{font-size:17px;line-height:1.3;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
 html[data-theme] .portal-page .topbar-actions{gap:4px}
 html[data-theme] .portal-page .menu-toggle{width:48px;min-width:48px;height:48px;min-height:48px;border:1px solid var(--strong-line);background:var(--surface);border-radius:11px}
 .portal-page .menu-toggle>.ui-icon{width:28px;height:28px;stroke-width:2}
 html[data-theme] .portal-page .topbar-actions .icon-button{width:44px;min-width:44px;height:44px;min-height:44px;padding:10px}
 html[data-theme] .portal-page .autopilot-status{position:relative;width:44px;height:44px;min-height:44px;min-width:44px;font-size:0;border:1px solid var(--line);background:var(--surface)}
 html[data-theme] .portal-page .autopilot-status>.ui-icon{display:block;width:22px;height:22px}
 html[data-theme] .portal-page .autopilot-status:before{position:absolute;top:5px;right:5px;width:6px;height:6px;box-shadow:0 0 0 2px var(--surface)}
 html[data-theme] .portal-page .workspace-bottom-nav{min-height:72px;padding:6px max(6px,env(safe-area-inset-right,0px)) calc(6px + env(safe-area-inset-bottom,0px)) max(6px,env(safe-area-inset-left,0px))}
 html[data-theme] .portal-page .workspace-bottom-nav>:is(a,button){min-height:56px;min-width:0;gap:4px;font-size:12px!important;border-radius:10px;line-height:1.3}
 .portal-page .workspace-bottom-nav .ui-icon{width:26px;height:26px}
 .portal-page .workspace-bottom-nav :is(a,button).active{color:var(--accent);background:var(--accent-soft)}

 html[data-theme] .portal-page #mobile-drawer[open]{display:flex;flex-direction:column;overflow:hidden}
 html[data-theme] .portal-page #mobile-drawer .drawer-header{flex:none;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:calc(8px + env(safe-area-inset-top,0px)) max(16px,env(safe-area-inset-right,0px)) 8px max(20px,env(safe-area-inset-left,0px));border-bottom:1px solid var(--line);background:var(--sidebar)}
 .portal-page .drawer-header h2{margin:0;font-size:19px;line-height:1.4}
 html[data-theme] .portal-page #mobile-drawer .drawer-close{position:static;width:48px;height:48px;min-height:48px;min-width:48px;padding:10px;border:1px solid var(--strong-line);border-radius:11px;background:var(--surface)}
 .portal-page .drawer-close>.ui-icon{width:26px;height:26px}
 html[data-theme] .portal-page #mobile-drawer .app-sidebar{flex:1;min-height:0;height:auto;max-height:none;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;padding:16px max(20px,env(safe-area-inset-right,0px)) calc(24px + env(safe-area-inset-bottom,0px)) max(20px,env(safe-area-inset-left,0px));gap:12px}
 html[data-theme] .portal-page #mobile-drawer .brand{display:none}
 html[data-theme] .portal-page #mobile-drawer #app-nav{gap:6px;flex:none}
 html[data-theme] .portal-page #mobile-drawer #app-nav a{min-height:52px;padding:12px 14px;gap:14px;font-size:16px;white-space:normal;line-height:1.4}
 html[data-theme] .portal-page #mobile-drawer #app-nav>a>span:first-child{width:26px}
 html[data-theme] .portal-page #mobile-drawer #app-nav .ui-icon{width:26px;height:26px}
 html[data-theme] .portal-page #mobile-drawer.more-only #app-nav>.nav-group-label:first-child,
 html[data-theme] .portal-page #mobile-drawer.more-only #app-nav a:is([data-view=overview],[data-view=inbox],[data-view=orders],[data-view=products]){display:none}
 html[data-theme] .portal-page #mobile-drawer #app-nav a[data-view=activity]{font-size:16px}
 html[data-theme] .portal-page #mobile-drawer .nav-group-label{font-size:11px;padding-block:12px 6px}
 html[data-theme] .portal-page #mobile-drawer .profile-links{display:grid;gap:4px;align-items:stretch}
 html[data-theme] .portal-page #mobile-drawer .profile-links a{min-height:48px;font-size:15px;width:100%}
 html[data-theme] .portal-page #mobile-drawer .sidebar-preferences :is(.theme-controls,.theme-picker){width:100%}
 html[data-theme] .portal-page #mobile-drawer .sidebar-preferences .theme-picker{gap:8px;flex-wrap:wrap}
 html[data-theme] .portal-page #mobile-drawer .sidebar-preferences .theme-option{flex:1 1 80px;min-height:48px;min-width:0;gap:7px;padding:8px;font-size:13px}
 html[data-theme] .portal-page #mobile-drawer .theme-name{display:inline}
 html[data-theme] .portal-page #mobile-drawer #logout-button{width:48px;height:48px}

 html[data-theme] .portal-page .section-toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 html[data-theme] .portal-page .section-toolbar>:is(.search-box,.custom-select){grid-column:1/-1;width:100%;max-width:none;min-width:0}
 html[data-theme] .portal-page .section-toolbar>.button{width:100%;min-width:0;min-height:48px;padding:10px;font-size:14px;white-space:normal}
 html[data-theme] .portal-page .product-content h2{-webkit-line-clamp:2;font-size:16px}
 html[data-theme] .portal-page .product-content>p{font-size:13px}
 html[data-theme] .portal-page .product-meta{font-size:12px}
 html[data-theme] .portal-page .product-bottom .button{min-height:44px;min-width:44px;font-size:14px;padding:8px 12px}
 html[data-theme] .portal-page :is(.product-toggle,.unlink-guard,.order-actions .icon-button){width:44px;min-width:44px;height:44px;min-height:44px;padding:10px}
 html[data-theme] .portal-page .product-toggle>.ui-icon{width:22px;height:22px}
 html[data-theme] .portal-page .product-bottom>.button:last-child:not(.edit-product){width:44px}
 html[data-theme] .portal-page .binding-card{grid-template-columns:minmax(0,1fr) 44px;grid-template-rows:20px minmax(40px,auto) 44px}
 html[data-theme] .portal-page .binding-card>strong{-webkit-line-clamp:2}
 html[data-theme] .portal-page .order-actions .icon-button>.ui-icon{width:22px;height:22px}
 html[data-theme] .portal-page .table-wrap:not(.bulk-table) td:first-child strong{font-size:15px;white-space:normal}
 html[data-theme] .portal-page .table-wrap:not(.bulk-table) td{font-size:13px}
 html[data-theme] .portal-page .table-wrap:not(.bulk-table) td:nth-child(3){font-size:15px}
 html[data-theme] .portal-page .table-wrap:not(.bulk-table) td:first-child .text-link{display:inline-flex;align-items:center}
 html[data-theme] .portal-page .order-filters .custom-select-trigger{min-height:48px}
 html[data-theme] .portal-page .form-actions>.button{font-size:14px!important}
 html[data-theme] .portal-page #promo-list .list-item .button{min-height:44px;font-size:14px}
 html[data-theme] .portal-page .bulk-table input[type=number]{min-height:48px;font-size:16px!important}

 html[data-theme] .portal-page .sales-panel .panel-head{flex-wrap:wrap;gap:12px}
 html[data-theme] .portal-page .chart-period{margin-left:auto}
 html[data-theme] .portal-page .chart-period button{min-width:44px;min-height:44px;font-size:13px;padding:8px}
 html[data-theme] .portal-page .chart-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
 html[data-theme] .portal-page .chart-toolbar>.custom-select{width:100%;max-width:none}
 html[data-theme] .portal-page .chart-mode{min-width:44px;min-height:44px}
 html[data-theme] .portal-page .metric-card>span{font-size:13px;min-height:36px}
 html[data-theme] .portal-page .metric-card>small{font-size:12px}
 html[data-theme] .portal-page .chart-footer{font-size:12px}
 html[data-theme] .portal-page .catalog-tab{min-height:48px;font-size:14px}
 html[data-theme] .portal-page .custom-select-option{min-height:48px;font-size:16px}
 html[data-theme] .portal-page .custom-select-search{min-height:48px;height:48px}
 html[data-theme] .portal-page .editor-close{width:48px;height:48px;min-width:48px;min-height:48px;padding:12px}
 html[data-theme] .portal-page dialog:not(.mobile-drawer){max-height:calc(100dvh - 24px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));scroll-padding:80px 0 16px}
 html[data-theme] .portal-page #product-dialog .panel-head,
 html[data-theme] .portal-page .detail-dialog>.panel-head{position:sticky;top:-20px;z-index:4;padding-block:8px;background:var(--bg)}
 html[data-theme] .portal-page #conversation .chat-back{min-height:44px;font-size:14px}
 html[data-theme] .portal-page #conversation .conversation-order{min-height:44px;font-size:14px}
 html[data-theme] .portal-page #conversation :is(.conversation-attachment>summary,.conversation-new-draft,.conversation-tools>summary){min-height:44px;font-size:13px}
 html[data-theme] .portal-page #conversation .conversation-composer>.conversation-new-draft{min-height:44px;font-size:13px}
}
