/* BooksFirst Partner Hub • Management v4, 17 Nov 2026
   Layout-only layer: no checkout/cart/payment visual overrides. */
.ed-hq .ed-main, .ed-admin .ed-main {background:#f7f7f5}
.ed-hq .ed-main>.ed-container, .ed-admin .ed-main>.ed-container {max-width:1340px;width:min(100% - 44px,1340px);margin:0 auto}
.bf-mgmt-header {display:flex;justify-content:space-between;align-items:flex-end;gap:28px;padding:36px 0 24px;border-bottom:1px solid #e5e6e3;margin-bottom:22px}
.bf-mgmt-header .eyebrow {margin:0 0 9px;font:700 11px/1.4 system-ui,Arial,sans-serif;letter-spacing:.13em;color:#bd1724}
.bf-mgmt-header h1 {font:500 clamp(29px,3.15vw,43px)/1.15 Georgia,'Times New Roman',serif;letter-spacing:-.035em;color:#19203e;margin:0 0 10px}
.bf-mgmt-header p:not(.eyebrow) {color:#5b6476;font-size:14px;max-width:64ch;margin:0;line-height:1.65}
.bf-mgmt-header-actions {display:flex;gap:9px;flex-wrap:wrap;flex-shrink:0}
.bf-mgmt-header-actions .btn {border-radius:10px;min-height:42px;display:inline-flex;align-items:center;justify-content:center;padding:.6rem 1rem}
.bf-mgmt-period,.bf-mgmt-filter{display:flex;align-items:end;flex-wrap:wrap;gap:12px;margin:0 0 22px;padding:14px 17px;border:1px solid #e3e5e8;background:#fff;border-radius:15px;box-shadow:0 2px 14px rgba(24,30,52,.025)}
.bf-mgmt-period label,.bf-mgmt-filter label {display:flex;flex-direction:column;gap:7px;font-size:12px;font-weight:650;color:#343f58;min-width:140px}
.bf-mgmt-period span {font-size:11px;color:#737d8c;align-self:center;margin-left:auto}
.bf-mgmt-filter input,.bf-mgmt-filter select,.bf-mgmt-period input,.bf-mgmt-period select,.bf-mgmt-stack input,.bf-mgmt-stack select,.bf-mgmt-stack textarea,.bf-mgmt-inline-form input,.bf-mgmt-inline-form select,.bf-mgmt-edit-form input,.bf-mgmt-edit-form select {width:100%;border:1px solid #dcdfe7;border-radius:9px;background:#fff;color:#17213d;padding:10px 12px;min-height:43px;font:inherit;box-sizing:border-box}
.bf-mgmt-filter input:focus-visible,.bf-mgmt-filter select:focus-visible,.bf-mgmt-period input:focus-visible,.bf-mgmt-period select:focus-visible,.bf-mgmt-stack input:focus-visible,.bf-mgmt-stack select:focus-visible,.bf-mgmt-edit-form input:focus-visible,.bf-mgmt-edit-form select:focus-visible {outline:2px solid #b11b29;outline-offset:2px}
.bf-mgmt-filter input[type=search]{min-width:240px}
.bf-mgmt-filter .btn,.bf-mgmt-period .btn {min-height:43px;border-radius:9px;align-self:flex-end}
.bf-mgmt-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;margin:0 0 20px}
.bf-mgmt-metric {background:#fff;border:1px solid #e4e5e6;border-radius:15px;padding:22px 20px 17px;min-height:133px;display:flex;flex-direction:column;gap:4px;position:relative}
.bf-mgmt-metric:before{content:"";position:absolute;left:20px;top:0;width:27px;height:3px;background:#d61d29;border-radius:0 0 4px 4px}
.bf-mgmt-metric span {font:650 12px/1.35 system-ui,Arial,sans-serif;letter-spacing:.015em;color:#49546a;margin:6px 0}
.bf-mgmt-metric strong{font:650 clamp(22px,2vw,31px)/1.2 system-ui,Arial,sans-serif;letter-spacing:-.04em;color:#152044;word-break:break-word}
.bf-mgmt-metric small {font-size:11px;line-height:1.45;color:#748094}
.bf-mgmt-metric a{color:#b2202c;font:650 11px system-ui;text-decoration:none;margin-top:auto;padding-top:12px}
.bf-mgmt-grid{display:grid;grid-template-columns:minmax(0,1.22fr) minmax(0,1fr);gap:17px;margin:0 0 20px;align-items:stretch}
.bf-mgmt-panel{background:#fff;border:1px solid #e3e5e8;border-radius:16px;padding:22px 24px;margin-bottom:18px;min-width:0}
.bf-mgmt-grid>.bf-mgmt-panel{margin:0}
.bf-mgmt-panel>p{font-size:13px;line-height:1.65;color:#687286;margin:5px 0 17px}
.bf-mgmt-panel-title{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:18px}
.bf-mgmt-panel-title h2{font:680 17px/1.25 system-ui,Arial,sans-serif;color:#1a2344;letter-spacing:-.025em;margin:0}
.bf-mgmt-panel-title span{font-size:11px;color:#818a9a}
.bf-mgmt-panel-title a {color:#c81825;font-weight:650;font-size:12px;text-decoration:none}
.bf-mgmt-table-wrap{width:100%;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid #e9ebef;border-radius:10px}
.bf-mgmt-panel table{border-collapse:collapse;width:100%;min-width:545px;font:12px/1.5 system-ui,Arial,sans-serif;margin:0}
.bf-mgmt-panel th{text-align:left;background:#f7f8f8;color:#586176;font-weight:720;font-size:10px;letter-spacing:.065em;text-transform:uppercase;padding:12px 13px;border-bottom:1px solid #e5e8ec}
.bf-mgmt-panel td{vertical-align:middle;padding:13px;border-bottom:1px solid #ecedf0;color:#3a4459}
.bf-mgmt-panel tr:last-child td{border-bottom:0}
.bf-mgmt-panel td strong{display:block;font-weight:680;color:#222944}
.bf-mgmt-panel td small {display:block;color:#8590a0;font-size:11px;margin-top:3px}
.bf-mgmt-panel td a {color:#bd1d28;font-weight:650;text-decoration:none}
.bf-mgmt-pill{display:inline-flex;align-items:center;max-width:100%;white-space:nowrap;padding:5px 9px;border-radius:100px;background:#f0f2f6;color:#505b6b;font-size:11px;font-weight:650;text-transform:capitalize}
.bf-mgmt-pill.is-good{background:#e6f5ed;color:#1b7546}
.bf-mgmt-pill.is-warn{background:#fff3e3;color:#925a16}
.bf-mgmt-actions-list{display:flex;flex-direction:column}
.bf-mgmt-actions-list a{display:flex;align-items:center;justify-content:space-between;gap:10px;text-decoration:none;padding:14px 3px;border-bottom:1px solid #e9eaf0;color:#2f3a52;font-size:13px}
.bf-mgmt-actions-list a:last-child{border-bottom:0}
.bf-mgmt-actions-list a strong{color:#bd1d28;font-size:13px}
.bf-mgmt-activity{display:grid;gap:0}
.bf-mgmt-activity>div{display:grid;grid-template-columns:170px minmax(170px,1fr) 1.2fr;gap:10px;border-top:1px solid #eceef0;padding:13px 0;align-items:center;font-size:12px}
.bf-mgmt-activity time{color:#8991a0}.bf-mgmt-activity strong{color:#1d2847}.bf-mgmt-activity span{color:#637087}
.bf-mgmt-note{margin:14px 0 0;font-size:11px!important;color:#7b8596!important;line-height:1.55}
.bf-mgmt-tiles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.bf-mgmt-tiles a{display:flex;flex-direction:column;gap:6px;border:1px solid #e5e7ee;border-radius:11px;padding:16px;text-decoration:none;background:#fcfcfd;transition:border-color .15s,transform .15s}
.bf-mgmt-tiles a strong{font-size:13px;color:#202849}
.bf-mgmt-tiles a small{font-size:11px;color:#737f93;line-height:1.5}
.bf-mgmt-audit{display:flex;flex-direction:column;gap:0}
.bf-mgmt-audit-item{border-top:1px solid #e9ebef;padding:16px 2px}
.bf-mgmt-audit-top{display:flex;justify-content:space-between;gap:15px;align-items:flex-start}
.bf-mgmt-audit-top div{display:flex;flex-direction:column;gap:5px}
.bf-mgmt-audit-top strong{font-size:13px;color:#14203c}
.bf-mgmt-audit-top span,.bf-mgmt-audit-top time{font-size:11px;color:#728096}
.bf-mgmt-audit-item p{font-size:12px;color:#596478;margin:10px 0}
.bf-mgmt-audit-item details{border-radius:9px;background:#f8f9fb;padding:11px 14px;font-size:12px}
.bf-mgmt-audit-item summary{cursor:pointer;font-weight:650;color:#b81c29;user-select:none}
.bf-mgmt-audit-item pre{max-width:100%;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;color:#293348;font-size:11px;padding:12px 0;margin:0}
.bf-mgmt-audit-item small{font-size:10px;color:#8792a4}
.bf-mgmt-pager{display:flex;gap:12px;align-items:center;justify-content:center;margin:18px auto 35px;color:#637186;font-size:12px}
.bf-mgmt-stack{display:flex;flex-direction:column;gap:15px}
.bf-mgmt-stack>label,.bf-mgmt-inline-form>label,.bf-mgmt-edit-form>label{display:flex;flex-direction:column;gap:7px;font-size:12px;font-weight:650;color:#333e56}
.bf-mgmt-stack .btn{align-self:start;min-height:43px;border-radius:9px}
.bf-mgmt-inline-form{display:flex;gap:12px;align-items:end;flex-wrap:wrap;padding:12px 0}
.bf-mgmt-inline-form label{min-width:185px;flex:1 1 180px}
.bf-mgmt-textbutton{background:transparent;border:0;padding:8px 0;font:650 12px system-ui;color:#b11b27;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.bf-mgmt-textbutton:focus-visible{outline:2px solid #bd1d28;outline-offset:3px}
.bf-mgmt-check{display:flex!important;align-items:center;gap:9px;font-size:12px!important;line-height:1.4;font-weight:550!important}
.bf-mgmt-check input{height:16px;width:16px!important;min-height:0!important;accent-color:#be1c29;flex-shrink:0}
.bf-mgmt-check small{color:#7a8495}
.bf-mgmt-lock,.bf-mgmt-notice {border-radius:10px;padding:14px 17px;font-size:13px;line-height:1.55;background:#fff8eb;color:#764915;margin-bottom:18px;border:1px solid #eedfbe}
.bf-mgmt-notice{color:#246b4c;background:#eef9f2;border-color:#cde7d7}
.bf-mgmt-edit-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px}
.bf-mgmt-full{grid-column:1/-1}
.bf-mgmt-edit-actions{display:flex;align-items:center;gap:12px}
.bf-mgmt-coupon-create{grid-template-columns:minmax(0,1.5fr) minmax(250px,.75fr)}
.bf-mgmt-form-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
.bf-mgmt-form-pair>label{display:flex;flex-direction:column;gap:7px;min-width:0;font-size:12px;font-weight:650;color:#33405a}
.bf-mgmt-form-pair input,.bf-mgmt-form-pair select,.bf-mgmt-advanced-fields input,.bf-mgmt-advanced-fields select{width:100%;min-height:43px;border:1px solid #dfe2e8;border-radius:9px;padding:10px;background:white;color:#192340;box-sizing:border-box;font:inherit}
.bf-mgmt-code-example{border:1px dashed #d6b1b5;background:#fff9f8;border-radius:11px;padding:14px 17px;display:flex;flex-direction:column;gap:5px}
.bf-mgmt-code-example span{font-size:11px;color:#7c5961}.bf-mgmt-code-example strong{font:750 17px ui-monospace,monospace;color:#aa1723;letter-spacing:.02em}.bf-mgmt-code-example small{font-size:11px;color:#7c7480;line-height:1.5}
.bf-mgmt-advanced{background:#f9fafb;border:1px solid #e7e8eb;border-radius:10px;padding:13px 16px}
.bf-mgmt-advanced summary{font-weight:680;color:#263151;font-size:13px;cursor:pointer}
.bf-mgmt-advanced-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:18px}
.bf-mgmt-advanced-fields label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:600;color:#3d475d}
.bf-mgmt-advanced-fields .bf-mgmt-check{flex-direction:row;align-items:center;justify-content:start}
.bf-mgmt-primary-cta{min-height:46px!important;width:100%;font-weight:700}
.bf-mgmt-coupon-guide ol{list-style:none;counter-reset:steps;margin:0;padding:0;display:grid;gap:8px}
.bf-mgmt-coupon-guide li{counter-increment:steps;position:relative;padding:10px 0 11px 39px;border-bottom:1px solid #eee}
.bf-mgmt-coupon-guide li:before{content:counter(steps);position:absolute;left:0;top:10px;width:26px;height:26px;display:grid;place-items:center;color:#b31925;background:#fff0f1;border-radius:50%;font:700 12px system-ui}
.bf-mgmt-coupon-guide li strong{font-size:13px;color:#232a48}.bf-mgmt-coupon-guide li p{font-size:12px;color:#748095;margin:4px 0;line-height:1.55}
.bf-mgmt-code{font:750 12px ui-monospace,monospace!important;color:#b11927!important;letter-spacing:.01em}
.bf-mgmt-row-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.bf-mgmt-row-actions a{color:#172149!important;text-decoration:underline!important;text-underline-offset:3px}
.bf-mgmt-row-actions form{margin:0}
.ed-hq .bf-mgmt-panel .btn,.ed-admin .bf-mgmt-panel .btn {white-space:nowrap}
@media (hover:hover) and (pointer:fine) {.bf-mgmt-tiles a:hover{border-color:#ca7980;transform:translateY(-1px)}.bf-mgmt-panel td a:hover,.bf-mgmt-panel-title a:hover{text-decoration:underline}}
@media (max-width:1100px){.bf-mgmt-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.bf-mgmt-grid,.bf-mgmt-coupon-create{grid-template-columns:1fr}.bf-mgmt-activity>div{grid-template-columns:120px 1fr}}
@media (max-width:650px){.ed-hq .ed-main>.ed-container,.ed-admin .ed-main>.ed-container{width:min(100% - 28px,1340px)}.bf-mgmt-header{align-items:flex-start;flex-direction:column;padding:20px 0 19px;gap:18px}.bf-mgmt-header h1{font-size:31px}.bf-mgmt-header-actions{width:100%}.bf-mgmt-header-actions .btn{flex:1}.bf-mgmt-metrics{gap:9px}.bf-mgmt-metric{padding:17px 13px;min-height:126px}.bf-mgmt-metric:before{left:13px}.bf-mgmt-metric strong{font-size:24px}.bf-mgmt-panel{padding:18px 14px;border-radius:13px}.bf-mgmt-tiles,.bf-mgmt-form-pair,.bf-mgmt-edit-form,.bf-mgmt-advanced-fields{grid-template-columns:1fr}.bf-mgmt-period,.bf-mgmt-filter{padding:14px;align-items:stretch}.bf-mgmt-period label,.bf-mgmt-filter label{flex:1 1 100%;min-width:0}.bf-mgmt-period span{margin:0;align-self:start}.bf-mgmt-filter input[type=search]{min-width:0}.bf-mgmt-inline-form{flex-direction:column;align-items:stretch}.bf-mgmt-inline-form label{min-width:0;flex:auto;width:100%}.bf-mgmt-inline-form .btn{width:100%}.bf-mgmt-activity>div{grid-template-columns:1fr;gap:4px}.bf-mgmt-edit-form>.bf-mgmt-full{grid-column:auto}.bf-mgmt-edit-actions{flex-direction:column;align-items:stretch}.bf-mgmt-edit-actions .btn{width:100%}.bf-mgmt-table-wrap{margin:0}.bf-mgmt-panel table{min-width:550px}.bf-mgmt-coupon-form input,.bf-mgmt-coupon-form select,.bf-mgmt-filter input,.bf-mgmt-filter select,.bf-mgmt-period input,.bf-mgmt-period select,.bf-mgmt-edit-form input,.bf-mgmt-edit-form select{font-size:16px}}
@media (prefers-reduced-motion:reduce){.bf-mgmt-tiles a{transition:none}}
