:root{--brand:#C11D2A;--ink:#292522;--muted:#817a75;--line:#eee9e6;--wash:#faf8f7;--soft-red:#fff3f3;--shadow:0 8px 24px rgba(59,37,31,.055)}
*{box-sizing:border-box}body{margin:0;background:var(--wash);color:var(--ink);font:15px/1.55 -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif}.topbar{height:70px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 30px;position:sticky;top:0;z-index:5}.brand{display:flex;align-items:center;gap:12px;color:var(--ink);font-weight:700;text-decoration:none}.brand img{width:138px;height:auto;max-height:44px;object-fit:contain}.user-tools{display:flex;align-items:center;gap:22px;color:#625b56;font-size:14px}.user-tools form{margin:0}.shell{display:flex;min-height:calc(100vh - 70px)}.sidebar{width:240px;flex:0 0 240px;padding:28px 16px;background:#fff;border-right:1px solid var(--line)}.nav-caption{margin:28px 12px 8px;color:#99918b;font-size:12px}.nav-item{display:block;text-decoration:none;color:#554e49;padding:10px 13px;border-radius:9px;margin:3px 0;font-size:14px}.nav-item.active{background:var(--soft-red);color:var(--brand);font-weight:650}.content{flex:1 1 0;width:100%;max-width:none;padding:32px;margin:0}.content-public{display:flex;align-items:center;justify-content:center;max-width:none}.page-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:24px}.eyebrow{margin:0 0 6px;color:var(--brand);font-size:12px;font-weight:700}.page-heading h1,.login-card h1{font-size:27px;line-height:1.25;margin:0 0 8px}.muted{color:var(--muted);margin:0;font-size:14px}.card{background:#fff;border:1px solid #f0ece9;border-radius:14px;padding:24px;box-shadow:var(--shadow);margin-bottom:18px}.card h2{font-size:17px;margin:0 0 8px}.welcome-card{display:flex;align-items:flex-start;gap:14px}.welcome-card p{margin:0;color:var(--muted);font-size:14px}.status-dot{width:10px;height:10px;background:#6aa67b;border-radius:50%;margin-top:6px}.actions{display:flex;align-items:center;gap:10px;margin-top:22px}.button{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:0 16px;border-radius:8px;border:1px solid transparent;text-decoration:none;font:inherit;font-size:14px;cursor:pointer}.button.primary{background:var(--brand);color:#fff;font-weight:650}.button.secondary{background:#fff;color:#5f5752;border-color:#e8e2de}.button.full{width:100%;margin-top:10px}.table-card{padding:0;overflow:hidden}.table-scroll{overflow:auto}table{border-collapse:collapse;width:100%;min-width:660px;text-align:left}th{font-size:12px;color:#8b837d;background:#fcfbfa;font-weight:600}th,td{padding:14px 18px;border-bottom:1px solid #f0ece9}td{font-size:14px}.strong{font-weight:600}.role-chip{display:inline-block;padding:3px 9px;border-radius:30px;background:#f6f2ef;color:#665d57;font-size:12px}.state{font-size:12px;padding:4px 9px;border-radius:30px}.state-active{color:#287a4a;background:#eef8f0}.state-disabled{color:#8d827b;background:#f4f1ef}.row-actions{display:flex;gap:14px;align-items:center}.row-actions a,.link-button{color:var(--brand);font-size:13px;text-decoration:none;border:0;background:none;padding:0;cursor:pointer;font:inherit}.row-actions form{margin:0}.empty{text-align:center;color:#999;padding:38px}.form-card{max-width:720px}.field{margin-bottom:19px}.field label{display:block;font-weight:600;font-size:13px;margin-bottom:7px}.field input,.field select,.role-picker select{width:100%;height:42px;padding:0 12px;border:1px solid #e4ded9;border-radius:8px;background:#fff;color:var(--ink);font:inherit}.field-error,.form-errors{display:block;color:#b4232c;font-size:13px;margin-top:5px}.form-errors{padding:10px 12px;background:#fff1f1;border-radius:7px}.credential-card{max-width:700px}.credential-card dl{display:grid;grid-template-columns:160px 1fr;gap:13px;margin:24px 0}.credential-card dt{color:var(--muted)}.credential-card dd{margin:0;font-weight:600}.credential{font-family:ui-monospace,Menlo,monospace;color:var(--brand);word-break:break-all}.notice{background:#fff8ec;border:1px solid #f5e8cc;border-radius:8px;padding:12px 14px;color:#7b6540;font-size:13px}.permission-card{padding:0;overflow:hidden}.role-picker{display:flex;align-items:center;gap:14px;padding:20px;border-bottom:1px solid var(--line)}.role-picker select{max-width:260px}.check-cell{display:inline-flex;justify-content:center;width:100%;cursor:pointer}.check-cell input{width:17px;height:17px;accent-color:var(--brand)}.permission-foot{padding:18px 20px;display:flex;align-items:center;justify-content:space-between}.message{padding:11px 14px;border-radius:8px;background:#eff8f0;color:#287a4a;font-size:14px}.login-card{width:min(420px,100%);padding:34px}.login-logo{display:block;max-width:180px;max-height:64px;object-fit:contain;margin:0 auto 24px}.login-card>.muted{margin-bottom:24px}.login-card .field{margin-bottom:16px}
@media(max-width:760px){.topbar{height:62px;padding:0 16px}.brand img{width:112px}.brand span{font-size:13px}.user-tools{gap:9px;font-size:12px}.shell{display:block;min-height:calc(100vh - 62px)}.sidebar{width:auto;padding:10px 12px;border-right:0;border-bottom:1px solid var(--line);display:flex;gap:5px;overflow:auto}.nav-caption{display:none}.nav-item{white-space:nowrap;margin:0;padding:8px 11px}.content{padding:26px 16px}.page-heading{align-items:flex-start;flex-direction:column}.card{padding:18px}.table-card,.permission-card{padding:0}.credential-card dl{grid-template-columns:1fr;gap:5px}.credential-card dd{margin-bottom:11px}.permission-foot{align-items:flex-start;flex-direction:column}.login-card{padding:26px 20px}}
.connection-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:12px}.connection-heading h2{margin-bottom:4px}.connection-heading form{margin:0}.flow-list{padding-left:22px;color:#625b56}.flow-list li{padding:4px 0}.button:disabled{opacity:.5;cursor:not-allowed}
.connection-picker{display:flex;align-items:center;gap:12px;margin-bottom:18px}.connection-picker label{font-weight:600}.connection-picker select{min-width:280px;height:40px;border:1px solid #e4ded9;border-radius:8px;padding:0 10px;background:#fff;font:inherit}.date-rule{background:#faf8f7;border-radius:8px;padding:12px 14px;margin:16px 0 22px;color:#625b56;font-size:14px}.table-title{padding:20px 20px 0}.inline-form{display:flex;align-items:flex-end;gap:14px;flex-wrap:wrap;margin-top:16px}.inline-form .field{margin:0;min-width:240px}.compact-button{min-height:33px;padding:0 11px;font-size:12px}.table-note{padding:14px 20px}.row-actions{margin-top:6px}.row-actions a{font-size:12px}
.catalog-scroll{max-height:560px;overflow:auto}
@media(max-width:760px){.connection-picker{align-items:flex-start;flex-direction:column}.connection-picker select{min-width:0;width:100%}.inline-form{align-items:stretch;flex-direction:column}.inline-form .field{min-width:0}.connection-heading{flex-direction:column}}

.market-checkboxes ul{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:8px}.market-checkboxes li{border:1px solid #eee8e4;border-radius:8px;padding:10px 12px;background:#fff}.market-checkboxes label{display:flex;align-items:center;gap:9px;margin:0;font-weight:500;cursor:pointer}.market-checkboxes input{width:17px;height:17px;accent-color:var(--brand)}
.basic-data-toolbar{padding:18px 22px 0}.basic-data-toolbar .connection-picker{margin-bottom:16px}.basic-tabs{display:flex;gap:5px;overflow:auto;border-bottom:1px solid var(--line)}.basic-tabs a{white-space:nowrap;text-decoration:none;color:#655d57;padding:11px 15px;border-bottom:2px solid transparent;font-size:14px}.basic-tabs a.active{color:var(--brand);border-bottom-color:var(--brand);font-weight:650}.sync-pause-notice{margin-bottom:18px;background:#fff8ec}.interface-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.interface-card{margin:0;min-width:0}.interface-card-top>div{min-width:0;overflow-wrap:anywhere}.interface-card-selected{border-color:#e8bdc0}.interface-card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.interface-card-top h2{font-size:19px}.interface-facts{display:grid;grid-template-columns:115px minmax(0,1fr);gap:8px 12px;margin:20px 0}.interface-facts dt{font-size:13px;color:var(--muted)}.interface-facts dd{margin:0;min-width:0;overflow-wrap:anywhere;font-size:13px}.credential-safe-note{padding-top:12px;border-top:1px solid var(--line)}.interface-card .actions{margin-top:16px}.interface-card .actions form{margin:0}.section-lead{margin:0 0 16px}.api-boundary-note{margin:14px 0 20px}.report-config-table{min-width:880px}.report-config-table td:first-child{width:62px}.report-config-table td:nth-child(2){min-width:300px}.report-config-table td:nth-child(3){min-width:300px;color:#655d57}.report-config-table code{display:inline-block;margin-top:4px;color:#817a75;font-size:11px;overflow-wrap:anywhere}.foundation-chip{display:inline-block;margin-left:8px;padding:2px 7px;border-radius:20px;background:#fff2f2;color:var(--brand);font-size:11px;font-weight:600}.interval-input{display:flex;align-items:center;gap:7px;white-space:nowrap}.interval-input input{width:125px;height:36px;border:1px solid #e4ded9;border-radius:7px;padding:0 9px;font:inherit}.interval-input span{font-size:12px;color:var(--muted)}.form-footer{display:flex;align-items:center;justify-content:space-between;gap:15px;padding-top:18px}.market-selection-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(270px,1fr));gap:10px}.market-option{display:flex;gap:11px;align-items:flex-start;border:1px solid var(--line);padding:14px;border-radius:9px;cursor:pointer}.market-option-selected{border-color:#e1a7ac;background:#fffafa}.market-option input{width:17px;height:17px;margin:3px 0 0;accent-color:var(--brand)}.market-option span{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}.market-option strong{font-size:14px}.market-option small{font-size:12px;color:var(--muted);overflow-wrap:anywhere}.market-option em{font-size:11px;color:var(--muted);font-style:normal}.check-cell input{width:17px;height:17px;accent-color:var(--brand)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.interface-dialog{width:min(650px,calc(100vw - 28px));max-height:calc(100vh - 36px);overflow:auto;border:1px solid #eee8e4;border-radius:14px;padding:22px;background:#fff;color:var(--ink);box-shadow:0 20px 70px rgba(40,25,22,.2)}.interface-dialog::backdrop{background:rgba(37,30,27,.28)}.dialog-heading{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:15px}.dialog-heading h2{margin:0;font-size:19px}.dialog-close{border:0;background:transparent;color:var(--muted);font-size:27px;line-height:1;cursor:pointer}.dialog-notice{margin-bottom:16px}.interface-dialog .field{margin-bottom:13px}.interface-dialog .field label{font-size:12px}.interface-dialog .field input,.interface-dialog .field select{height:39px}.dialog-actions{display:flex;justify-content:flex-end;gap:9px;padding-top:5px}
@media(max-width:1100px){.interface-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.basic-data-toolbar{padding:16px 16px 0}.basic-tabs a{padding:10px}.interface-grid{grid-template-columns:1fr}.form-footer{align-items:flex-start;flex-direction:column}.market-selection-grid{grid-template-columns:1fr}}

.sync-detail-scroll{max-height:560px;overflow-y:scroll;scrollbar-gutter:stable;overscroll-behavior:contain}.sync-detail-scroll thead th{position:sticky;top:0;z-index:1;box-shadow:0 1px 0 var(--line)}.sync-detail-scroll:focus-visible{outline:2px solid var(--brand);outline-offset:-2px}.sync-load-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 20px;border-top:1px solid var(--line);min-height:56px}.sync-load-footer [hidden]{display:none}.sync-load-footer button:disabled{cursor:wait;opacity:.6}.settlement-count-note{margin-top:0;padding-top:0}.sync-detail-scroll::-webkit-scrollbar{width:12px;height:12px}.sync-detail-scroll::-webkit-scrollbar-track{background:#faf8f7}.sync-detail-scroll::-webkit-scrollbar-thumb{background:#d7ceca;border-radius:8px;border:3px solid #faf8f7}.sync-detail-scroll::-webkit-scrollbar-thumb:hover{background:#bcafaa}@media(max-width:760px){.sync-detail-scroll{max-height:440px}.sync-load-footer{align-items:flex-start;flex-wrap:wrap}}

.sync-detail-scroll th,.sync-detail-scroll .state{white-space:nowrap}.sync-summary-table{min-width:1160px}.sync-summary-table td{white-space:nowrap}.sync-summary-table td:first-child{min-width:125px}.sync-summary-table td:nth-child(2){min-width:260px;white-space:normal}
/* Explicit administrator consent uses a normal sized checkbox in the interface dialog. */
.interface-dialog .field input[type="checkbox"]{width:18px;height:18px;min-height:0;accent-color:var(--brand);display:block;margin:8px 0}

/* Confirmed five-group navigation; native details supplies the fold behavior. */
.sidebar{position:sticky;top:70px;height:calc(100vh - 70px);overflow-y:auto;padding:18px 12px;overscroll-behavior:contain;scrollbar-gutter:stable}
.content{min-width:0}
.state{display:inline-flex;align-items:center;white-space:nowrap;flex-shrink:0;line-height:20px}
td:has(>.row-actions){white-space:nowrap}
td .row-actions{min-width:max-content;flex-wrap:nowrap}
.nav-group{margin-bottom:12px}
.nav-group-title{display:flex;align-items:center;justify-content:space-between;gap:8px;list-style:none;padding:9px 12px;border-radius:8px;color:#554e49;font:inherit;font-size:14px;font-weight:400;cursor:pointer;user-select:none}
.nav-group-title::-webkit-details-marker{display:none}
.nav-group-title::marker{content:""}
.nav-group-title:hover,.nav-item:hover{background:#faf6f4}
.nav-group-title:focus-visible,.nav-item:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
.nav-chevron{width:16px;height:16px;flex:none;transition:transform .15s}
.nav-group:not([open]) .nav-chevron{transform:rotate(-90deg)}
.nav-group:not([open]) .nav-group-items{display:none}
.nav-group-items{padding:2px 0 0 8px}
.nav-item{display:flex;align-items:center;gap:9px;padding:8px 10px;margin:2px 0;font-size:14px;line-height:1.55}
.nav-item.active,.nav-item.active:hover{background:var(--soft-red);color:var(--brand)}
.nav-item-label{min-width:0;flex:1}
.nav-icon{width:17px;height:17px;flex:none}
.nav-pending-label{flex:none;font-size:10px;font-weight:400;color:#998f88;background:#f5f1ee;border-radius:5px;padding:1px 4px}
.module-pending-card{max-width:760px}
.module-pending-list{margin:18px 0 0;padding-left:21px;color:#625b56;font-size:14px}
.module-pending-list li{padding:5px 0}
@media(max-width:760px){.sidebar{position:static;top:auto;width:auto;height:auto;max-height:320px;display:block;padding:12px;overflow-y:auto;border-right:0;border-bottom:1px solid var(--line)}.nav-group{margin-bottom:6px}.nav-item{white-space:normal}.nav-group-items{padding-left:10px}.content{width:100%}}
@media(prefers-reduced-motion:reduce){.nav-chevron{transition:none}}

/* Company and brand master records. */
.company-stat-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;margin-bottom:18px}
.company-stat{display:flex;flex-direction:column;gap:5px;text-decoration:none;color:var(--ink);margin:0;padding:17px 18px}
.company-stat span{color:var(--muted);font-size:13px}
.company-stat strong{font-size:27px;line-height:1.25;color:var(--brand)}
.company-stat small{font-size:11px;color:var(--muted)}
.company-stat:hover{border-color:#e8bdc1}
.company-workspace{padding:0;overflow:hidden}
.company-tabs{padding:8px 16px 0}
.company-section-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:22px 22px 15px}
.company-section-heading h2{margin-bottom:5px}
.company-filters{display:flex;gap:9px;align-items:center;flex-wrap:wrap;padding:0 22px 20px}
.company-filters input,.company-filters select{height:38px;border:1px solid #e4ded9;border-radius:8px;padding:0 10px;background:#fff;font:inherit;font-size:13px;max-width:100%}
.company-filters input{width:230px}
.company-filters select{min-width:115px;max-width:250px}
.company-clear-filter{color:var(--brand);text-decoration:none;font-size:13px}
.company-record-scroll{max-height:520px;overflow:auto}
.company-record-scroll thead th{position:sticky;top:0;z-index:1;white-space:nowrap}
.company-record-scroll tbody td:first-child{min-width:150px}
.company-record-scroll tbody td:nth-last-child(3){min-width:76px;white-space:nowrap}
.company-record-scroll tbody td:last-child{min-width:116px;white-space:nowrap}
.company-record-cell{min-width:110px;max-width:260px;overflow-wrap:anywhere}
.company-record-time{white-space:nowrap;font-size:12px;color:var(--muted)}
.company-record-actions{margin:0;white-space:nowrap}
.company-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 22px}
.company-pagination>div{display:flex;gap:8px}
.company-form-card{max-width:850px}
.company-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 22px;padding-top:15px}
.company-field-wide{grid-column:1/-1}
.company-required{margin-left:7px;color:var(--brand);font-size:11px;font-weight:400}
.company-form-card textarea{width:100%;resize:vertical;min-height:95px;padding:10px 12px;border:1px solid #e4ded9;border-radius:8px;font:inherit;background:#fff;color:var(--ink)}
.company-form-card .field-help{font-size:12px;line-height:1.5;margin-top:7px}
.company-form-card input[type="checkbox"]{width:18px;height:18px;margin:0;accent-color:var(--brand)}
.company-form-card #id_operating_companies{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:8px}
.company-form-card #id_operating_companies label{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:8px;padding:10px;font-size:13px;font-weight:400;margin:0;cursor:pointer}
.company-form-footer{display:flex;justify-content:flex-end;gap:10px;border-top:1px solid var(--line);padding-top:18px}
.company-prerequisite{margin-bottom:14px}
.company-prerequisite a{color:var(--brand)}
@media(max-width:1000px){.company-stat-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.content{padding:26px 16px}.company-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.company-form-grid{grid-template-columns:1fr}.company-section-heading{align-items:flex-start;padding:18px;flex-direction:column}.company-filters{padding:0 18px 18px}.company-filters input{width:100%}.company-pagination{padding:15px 18px;align-items:flex-start;flex-wrap:wrap}.company-record-scroll{max-height:420px}}

/* Shared table text actions: links and buttons have identical typography and alignment. */
:root{--table-action-font-size:13px;--table-action-height:28px;--table-action-line-height:20px}
td{vertical-align:middle}
td .row-actions{display:flex;align-items:center;gap:14px;margin:0;white-space:nowrap}
.row-actions a:not(.button),.row-actions button.link-button{display:inline-flex;align-items:center;justify-content:center;height:var(--table-action-height);padding:0;border:0;background:none;color:var(--brand);font:inherit;font-size:var(--table-action-font-size);line-height:var(--table-action-line-height);text-decoration:none;white-space:nowrap;cursor:pointer}
.row-actions form{display:inline-flex;align-items:center;margin:0;line-height:var(--table-action-line-height)}
.row-actions a:focus-visible,.row-actions button:focus-visible{outline:2px solid var(--brand);outline-offset:2px;border-radius:3px}

.company-category-note{padding:0 22px 18px;font-size:13px;line-height:1.55}
@media(max-width:760px){.company-category-note{padding:0 18px 18px}}

/* Country, market, channel and store master records. */
.catalog-stat-grid{grid-template-columns:repeat(6,minmax(0,1fr))}
.catalog-stat-grid:has(>a:only-child){grid-template-columns:minmax(200px,280px)}
.company-form-card #id_countries{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:8px;max-height:320px;overflow:auto}
.company-form-card #id_countries label{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:8px;padding:10px;font-size:13px;font-weight:400;margin:0;cursor:pointer}
.company-form-card #id_countries .catalog-choice-disabled{opacity:.55;cursor:not-allowed;background:#faf8f7}
.store-context{padding-top:18px;margin:4px 0 20px;border-top:1px solid var(--line)}
.store-context .table-scroll{margin-top:12px;max-height:350px}
.store-context th{position:sticky;top:0}
.field input:disabled,.field select:disabled{background:#faf8f7;color:var(--muted);cursor:not-allowed}
@media(max-width:1000px){.catalog-stat-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.catalog-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Supplier records reuse the confirmed master-data layout. */
.supplier-stat-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.supplier-form-section{border-top:1px solid var(--line);padding-top:18px;margin-top:5px}
.supplier-form-section h2{margin-bottom:0}
.company-form-card #id_supplier_types{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:8px;max-height:280px;overflow:auto}
.company-form-card #id_supplier_types label{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:8px;padding:10px;font-size:13px;font-weight:400;margin:0;cursor:pointer}
.company-form-card .supplier-clear-account{display:flex;align-items:center;gap:8px;margin-top:29px;font-weight:400}
.supplier-detail-card{max-width:1000px}
.supplier-facts{display:grid;grid-template-columns:210px minmax(0,1fr);gap:12px 20px;margin:18px 0 0;font-size:14px}
.supplier-facts dt{color:var(--muted)}
.supplier-facts dd{margin:0;overflow-wrap:anywhere}
@media(max-width:760px){.supplier-stat-grid{grid-template-columns:1fr}.supplier-facts{grid-template-columns:1fr;gap:4px}.supplier-facts dd{margin-bottom:10px}.company-form-card .supplier-clear-account{margin-top:0}}
.company-form-card #id_service_brands{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:8px;max-height:280px;overflow:auto}
.company-form-card #id_service_brands label{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:8px;padding:10px;font-size:13px;font-weight:400;margin:0;cursor:pointer}
.supplier-form-section [hidden],.supplier-qr-links [hidden]{display:none!important}
.supplier-form-section a:not(.button){color:var(--brand)}
.field input[type="file"]{height:auto;min-height:42px;padding:7px 9px;font-size:13px}
.field input[type="file"]::file-selector-button{font:inherit;color:var(--brand);background:#fff3f3;border:1px solid #efcdd0;border-radius:5px;padding:4px 8px;margin-right:9px;cursor:pointer}
.supplier-qr-links{margin-top:7px}
.supplier-qr-view{max-width:850px;text-align:center}
.supplier-qr-view img{display:block;max-width:min(100%,600px);max-height:70vh;object-fit:contain;margin:0 auto 20px}

/* Material and service records use the shared master-data table and form styles. */
.material-stat-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.material-dictionary-tabs{display:flex;flex-wrap:wrap;gap:8px;padding:18px 22px 0}
.material-dictionary-tabs a{font-size:13px;color:var(--muted);padding:8px 12px;border:1px solid var(--line);border-radius:8px;text-decoration:none}
.material-dictionary-tabs a.active{color:var(--brand);background:#fff3f3;border-color:#efcdd0}
.material-price{min-width:120px;white-space:nowrap}
.material-dimensions{min-width:235px;font-size:13px}
.material-supplier-context{background:#faf8f7;border:1px solid var(--line);border-radius:8px;padding:12px 15px;margin-bottom:18px;font-size:13px}
.material-supplier-context p{margin:0;line-height:1.6}
.material-supplier-link{display:inline-block;margin-top:6px;color:var(--brand)}
.material-supplier-context [hidden]{display:none!important}
.material-image-card img{display:block;max-width:100%;max-height:420px;object-fit:contain;margin:18px 0}
.material-related-link{color:var(--brand)}
@media(max-width:760px){.material-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.material-dictionary-tabs{padding:18px 18px 0}}

/* Product/BOM editing shares the master-data layout and action typography. */
.product-cost-note{margin-bottom:20px}
.product-form-card{max-width:none}
.product-list-table{min-width:1500px}
.product-list-table td:first-child{min-width:230px}
.product-list-table td:nth-child(2),.product-list-table td:nth-child(3){min-width:180px}
.product-list-table td:last-child{min-width:150px}
.product-final-price{white-space:nowrap;font-weight:700;color:var(--brand)}
.product-section-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:18px}
.product-section-buttons{display:flex;flex-wrap:wrap;gap:8px;flex-shrink:0}
.product-lines-table{min-width:950px}
.product-lines-table th:first-child{width:46%}
.product-lines-table input:not([type=checkbox]),.product-lines-table select{width:100%;height:40px;border:1px solid #e4ded9;border-radius:8px;background:#fff;padding:0 10px;font:inherit;font-size:13px}
.product-lines-table input[type=number]{min-width:115px}
.product-lines-table select{min-width:290px}
.product-material-filters{display:grid;grid-template-columns:150px minmax(180px,1fr);gap:8px;margin-bottom:8px}
.product-material-filters label{display:block;font-size:12px;color:var(--muted);margin-bottom:4px}
.product-lines-table .product-material-filters select{min-width:0;height:35px}
.product-lines-table .product-material-filters input{height:35px}
.product-material-match{display:block;margin-top:5px;font-size:12px}
.product-delete{display:flex;align-items:center;gap:7px;white-space:nowrap;font-size:13px}
.product-delete input{width:17px;height:17px;accent-color:var(--brand)}
.product-row-deleted{background:#faf8f7}
.product-row-deleted td:not(:last-child){opacity:.45}
.product-lines-help{margin-top:14px;font-size:13px}
.product-cost-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;margin:20px 0}
.product-cost-grid>div{padding:15px 12px;background:#faf8f7;border-radius:9px;min-width:0}
.product-cost-grid span{display:block;font-size:12px;color:var(--muted)}
.product-cost-grid strong{display:block;margin-top:7px;font-size:20px;overflow-wrap:anywhere}
.product-cost-grid>div:last-child{background:var(--soft-red);color:var(--brand)}
.product-editor .errorlist{color:#b4232c;font-size:13px}
.product-lines-card>.table-scroll{max-height:520px}
.product-lines-table thead th{position:sticky;top:0;z-index:1;white-space:nowrap}
@media(max-width:1100px){.product-cost-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.product-cost-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.product-section-heading{flex-direction:column;align-items:flex-start}.product-cost-grid strong{font-size:18px}}
.product-basic-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 36px}
.warehouse-list-table{min-width:1320px}
.warehouse-stat-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.fulfillment-tabs{padding:0;margin-bottom:20px;flex-wrap:wrap}
.company-form-card #id_markets{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:8px}
.company-form-card #id_markets label{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:8px;padding:10px;font-size:13px;font-weight:400;margin:0}
.freight-plan-table{min-width:1380px}
.product-freight-table{min-width:1580px}
.product-freight-table th:nth-child(n+4):nth-child(-n+7),.product-freight-table td:nth-child(n+4):nth-child(-n+7){white-space:nowrap}
.product-freight-table th:last-child,.product-freight-table td:last-child{min-width:168px;white-space:nowrap}
.freight-plan-table th:last-child,.freight-plan-table td:last-child{min-width:168px;white-space:nowrap}
.freight-estimate-result{margin-top:20px;font-size:18px;color:var(--brand)}
.warehouse-list-table th:last-child,.warehouse-list-table td:last-child{min-width:168px;white-space:nowrap}
.product-basic-columns .supplier-facts{grid-template-columns:150px minmax(0,1fr);gap:12px 16px}
.product-physical-column{border-left:1px solid var(--line);padding-left:28px;min-width:0}
.product-physical-help{font-size:12px;line-height:1.6;margin-top:14px}
@media(max-width:1050px){.product-basic-columns{grid-template-columns:1fr}.product-physical-column{border-left:0;border-top:1px solid var(--line);padding:18px 0 0}}
@media(max-width:760px){.product-basic-columns .supplier-facts{grid-template-columns:1fr;gap:4px}}

/* VAT declaration is a separate column; retain readable status and actions. */
.freight-plan-table{min-width:1440px}

/* 2026-10-04: business pages use the full available desktop workspace. */
.content:not(.content-public) :is(.form-card,.company-form-card,.supplier-detail-card,.credential-card,.module-pending-card){max-width:none}

/* Manual FX management follows the shared light business layout. */
.exchange-tabs{margin:0 0 20px;background:#fff;border:1px solid var(--line);border-radius:10px;padding:0 10px}.exchange-table{min-width:1120px}.exchange-table th,.exchange-table td{vertical-align:middle}.exchange-nowrap{white-space:nowrap}.exchange-filter{padding-top:20px}.exchange-table td:last-child{max-width:280px;overflow-wrap:anywhere}.exchange-table .row-actions{min-width:80px}

.credential-password{width:100%;min-height:42px;padding:8px 10px;border:1px solid var(--line);border-radius:8px;background:#fff;font-size:15px}.credential-copy-status{margin:10px 0 16px}.credential-card dl dd{min-width:0}@media(max-width:760px){.credential-card dl{grid-template-columns:1fr;gap:7px}.credential-card dl dd{margin-bottom:10px}}

/* 店铺商品预算维护：桌面工具栏和可访问表单。 */
.listing-toolbar{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.listing-toolbar select{max-width:520px;min-width:180px}.listing-toolbar .form-control{height:42px;padding:0 12px;border:1px solid var(--line);border-radius:8px;background:white;font:inherit}.listing-form .field input[type=checkbox]{width:18px;height:18px;accent-color:#C11D2A}.listing-form input:disabled,.listing-form select:disabled{background:#faf8f6}.listing-form .notice{margin-bottom:20px}@media(max-width:760px){.listing-toolbar{width:100%}.listing-toolbar select{max-width:100%}}

.listing-spu-options{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:22px;align-items:start;min-width:0}.listing-spu-options .field{min-width:0}.listing-checkbox-control{min-height:42px;display:flex;align-items:center;gap:10px}.listing-checkbox-control .field-help{margin:0;min-width:0;line-height:20px}.listing-form .listing-checkbox-control input[type=checkbox]{margin:0;flex:0 0 18px}@media(max-width:760px){.listing-spu-options{grid-template-columns:1fr;gap:0}}

.listing-form .company-form-footer{align-items:center;flex-wrap:wrap}.listing-footer-status{margin-right:20px}.listing-footer-status label{display:inline-flex;align-items:center;gap:8px;min-height:40px;white-space:nowrap;font-size:14px;cursor:pointer}.listing-footer-status input[type=checkbox]{width:18px;height:18px;margin:0;accent-color:#C11D2A}

.listing-summary-header{display:grid;grid-template-columns:minmax(440px,1.1fr) minmax(0,2fr);gap:24px;align-items:center}.listing-store-controls{min-width:0}.listing-store-controls>.muted{margin-top:8px}.listing-summary-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.listing-summary-card{border:1px solid var(--line);border-radius:12px;background:#fff;padding:14px 16px;min-width:0;display:flex;flex-direction:column;justify-content:center}.listing-summary-card .muted{font-size:12px}.listing-summary-warehouse{font-size:13px;font-weight:600;overflow-wrap:anywhere;margin-top:4px}.listing-summary-value{color:var(--brand);font-size:26px;line-height:1.3;margin:5px 0}.listing-summary-note{font-size:12px;color:var(--muted);margin:0}.listing-summary-header+.basic-tabs{margin-top:14px}@media(max-width:1300px){.listing-summary-header{grid-template-columns:1fr}}@media(max-width:760px){.listing-summary-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.listing-summary-card{padding:12px}}

.listing-tab-import-row{display:grid;grid-template-columns:minmax(440px,1.1fr) minmax(0,2fr);gap:24px;align-items:center;margin-top:14px;border-bottom:1px solid var(--line)}.listing-tab-import-row .basic-tabs{border-bottom:0;margin:0;min-width:0;overflow-x:auto}.listing-import-tools{display:flex;gap:12px;justify-content:flex-end;align-items:center;min-width:0;padding-bottom:8px}.listing-import-upload{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin:0;min-width:0}.listing-import-upload input[type=file]{font:inherit;font-size:13px;width:320px;max-width:100%;min-width:0;height:42px;padding:8px 10px;border:1px solid #d8d0cb;border-radius:8px;background:#fff;cursor:pointer}.listing-import-upload input[type=file]:focus-visible{outline:2px solid var(--brand);outline-offset:2px}.listing-import-upload input[type=file]::file-selector-button{cursor:pointer}.listing-import-hint{margin:10px 0 0 auto;max-width:760px;text-align:right;font-size:12px}.listing-import-errors{max-height:400px;overflow:auto;color:#C11D2A}.listing-import-tools .button{white-space:nowrap}@media(max-width:1300px){.listing-tab-import-row{grid-template-columns:1fr;gap:8px}}@media(max-width:760px){.listing-import-tools{align-items:flex-start;flex-direction:column}.listing-import-upload input[type=file]{max-width:100%}}

.listing-import-upload .visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

@media(max-width:760px){.listing-import-hint{max-width:100%;text-align:left}.listing-import-upload{width:100%}}

/* Finance workflows keep action forms and numeric summaries usable on narrow screens. */
.finance-workflow .actions{flex-wrap:wrap;gap:14px}
.finance-workflow .actions form{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.finance-workflow .actions input{min-height:40px;padding:8px 12px;border:1px solid var(--line);border-radius:8px;font:inherit;max-width:100%}
.finance-workflow details summary{cursor:pointer;color:var(--brand)}
.finance-workflow details[open] summary{margin-bottom:14px}
.finance-workflow .company-form-grid>div{min-width:0;overflow-wrap:anywhere}

/* Finance list filters need breathing room below tabs and at the card edge. */
.company-filters.finance-list-filters{padding-top:20px}
@media(max-width:760px){.company-filters.finance-list-filters{padding-top:18px}}

/* 接入准备页面沿用标准筛选栏、表单和多选控件尺寸。 */
.company-filters.preparation-filters{padding-top:20px}
.preparation-form .field{min-width:0}
.preparation-form .preparation-choice-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:8px}
.preparation-form .preparation-choice-grid label{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:8px;padding:10px;font-size:13px;font-weight:400;margin:0;cursor:pointer}
.preparation-form .preparation-choice-grid input[type="checkbox"]{flex:0 0 18px}
@media(max-width:760px){.company-filters.preparation-filters{padding-top:18px}}

/* System identity follows the navigation, without covering menu items. */
.sidebar{display:flex;flex-direction:column}
.sidebar #app-navigation{flex:0 0 auto}
.sidebar-company{flex:0 0 auto;margin-top:auto;padding:22px 10px 8px;color:var(--muted);font-size:12px;line-height:1.65;overflow-wrap:anywhere}
.sidebar-company strong{display:block;border-top:1px solid var(--line);padding-top:16px;margin-bottom:8px;color:var(--ink);font-size:14px}
.sidebar-company p{margin:4px 0}
@media(max-width:760px){.sidebar-company{margin-top:12px}}
