#sgp-root,.sgp-dialog{font-family:Arial,sans-serif;color:#24344e;font-size:14px;line-height:1.45}
#sgp-root svg,.sgp-dialog svg{width:20px;height:20px;flex:none;vertical-align:middle}
#sgp-root .sgp-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;border:1px solid #eadce9;border-left:5px solid var(--crm-accent,#eb008b);border-radius:15px;padding:10px 15px;background:linear-gradient(105deg,#fff0f7,#f7f8fc);margin:0 0 12px}
.sgp-heading>h2{display:flex;align-items:center;gap:11px;font-size:18px;margin:0}.sgp-heading>h2>svg{box-sizing:border-box;width:40px!important;height:40px!important;padding:9px;border:1px solid #e0d7ed;border-radius:11px;background:#fff;color:#7755a5}.sgp-category-icon{display:grid;place-items:center;border:1px solid #eedce9;background:#fff;border-radius:11px;width:42px;height:42px;color:var(--crm-accent,#eb008b);flex:none}
#sgp-root .actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}#sgp-root button,#sgp-root a.button,.sgp-dialog button,.sgp-dialog a.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:38px;padding:8px 12px;font:600 13px/1.35 Arial,sans-serif;border-radius:10px;text-decoration:none}.sgp-dialog button[type=submit]{background:var(--crm-accent,#eb008b);color:#fff;border:1px solid var(--crm-accent,#eb008b)}.sgp-dialog button.quiet,#sgp-root button.quiet,.sgp-dialog a.button{background:#fff;color:#5f4886;border:1px solid #ded6ea}.sgp-dialog button:disabled,#sgp-root button:disabled{opacity:.45;cursor:default}
.sgp-counters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:12px}.sgp-counter{display:grid;grid-template-columns:28px auto;align-items:center;column-gap:8px;background:#fff;border:1px solid #e0e4ef;border-top:3px solid var(--crm-accent,#eb008b);border-radius:11px;padding:9px 13px}.sgp-counter:nth-child(2){border-top-color:#8c5dda}.sgp-counter:nth-child(3){border-top-color:#ed6881}.sgp-counter:nth-child(4){border-top-color:#e69b21}.sgp-counter>svg{color:var(--crm-accent,#eb008b);grid-row:1/3}.sgp-counter strong{font-size:24px;line-height:1.1;color:var(--crm-accent,#eb008b)}.sgp-counter span{font-size:12px;color:#52617b}
.sgp-filters{display:flex;flex-wrap:wrap;align-items:end;gap:12px;margin-bottom:17px}.sgp-filters>label{display:grid;gap:5px;flex:1 1 155px;font-size:12px}.sgp-filters>label:first-child{flex:2 1 230px}.sgp-filters input:not([type=checkbox]),.sgp-filters select{min-height:39px;width:100%;font:400 14px Arial,sans-serif;padding:8px 10px;border:1px solid #d7deeb;border-radius:9px;background:#fff;color:#33465e;box-sizing:border-box}.sgp-filters .sgp-checkbox{flex:0 1 auto}
.sgp-category{margin:0 0 12px;border:1px solid #e2dcea;border-top:3px solid var(--crm-accent,#eb008b);border-radius:15px;background:#fff;overflow:hidden}.sgp-category>summary{display:flex;align-items:center;gap:12px;cursor:pointer;list-style:none;padding:10px 15px;background:#faf8fc}.sgp-category>summary::-webkit-details-marker{display:none}.sgp-category-icon{width:35px;height:35px;border-radius:9px}.sgp-category h3{font-size:17px;margin:0;line-height:1.3}.sgp-category-count{margin-left:auto;white-space:nowrap;font-size:12px;color:#6a5787;padding:4px 8px;border-radius:7px;background:#f0eaf7}.sgp-toggle{flex:none;width:7px;height:7px;margin:0 5px 4px 2px;border-right:2px solid #a45a86;border-bottom:2px solid #a45a86;transform:rotate(45deg)}.sgp-category[open]>summary .sgp-toggle{transform:rotate(225deg);margin-top:6px}
.sgp-row{display:grid;grid-template-columns:minmax(160px,1.05fr) minmax(180px,1.45fr) minmax(160px,1.1fr) 70px 156px;gap:16px;padding:15px 17px;border-top:1px solid #ece9f0;align-items:center}.sgp-row.is-approved{background:#f0faf4}.sgp-row.is-inactive{background:#f6f7fa;opacity:.75}.sgp-row h3{font:600 14px/1.4 Arial,sans-serif;margin:0 0 4px;color:#24344e}.sgp-format{display:block;font-size:15px;line-height:1.4;color:var(--crm-accent,#eb008b);margin-bottom:4px}.sgp-row p{font-size:13px;line-height:1.45;margin:3px 0;color:#33465e;overflow-wrap:anywhere}.sgp-row small{display:block;font-size:11px;color:#6b7890;line-height:1.5}.sgp-row .sgp-label{font-size:11px;font-weight:600;color:#53637d}.sgp-row .sgp-missing{color:#b04e6b;font-style:italic}.sgp-row .late{color:#c32958;font-weight:600}.sgp-row .soon{color:#a86906;font-weight:600}.sgp-row small svg{width:13px;height:13px;margin-right:4px}
.sgp-proof{text-align:center}.sgp-thumb{padding:4px!important;width:64px;height:51px;min-height:0!important;border:1px solid #dfd9e6;background:#fff;border-radius:7px!important;box-shadow:none}.sgp-thumb img{display:block;width:100%;height:100%;object-fit:contain}.sgp-thumb svg{color:var(--crm-accent,#eb008b)}.sgp-no-file{display:grid;justify-items:center;gap:3px;font-size:10px;color:#8c92a2}.sgp-proof>small{font-size:10px}
.sgp-status{display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:600;padding:5px 8px;border-radius:8px;color:#64748b;background:#f0f2f6}.sgp-status svg{width:15px!important;height:15px!important}.sgp-status.pending{background:#f0e9ff;color:#7147a7}.sgp-status.correction{background:#fff0f3;color:#bc365c}.sgp-status.approved{background:#dcf3e4;color:#237448}.sgp-status.inactive{background:#e8ebef;color:#7b8292}.sgp-row-actions{display:flex;gap:4px;margin-top:7px}.sgp-icon{width:34px!important;height:33px;min-height:0!important;padding:6px!important;border:1px solid #ecd2e2;background:#fff5fa;color:var(--crm-accent,#eb008b);box-shadow:none}.sgp-icon svg{width:19px!important;height:19px!important}.sgp-review small{margin-top:4px}.sgp-reason{color:#b64160!important;overflow-wrap:anywhere}.sgp-add-row{margin:10px 16px 13px}.sgp-empty{margin:12px 18px;font-size:13px;color:#738097}.sgp-footnote{font-size:12px;color:#7c879b;margin:15px 0 0}
.sgp-dialog{max-width:1050px}.sgp-dialog label{display:grid;gap:6px;font:600 13px/1.4 Arial,sans-serif}.sgp-dialog input:not([type=checkbox]),.sgp-dialog select,.sgp-dialog textarea{display:block;box-sizing:border-box;width:100%;padding:9px 11px;min-height:39px;font:400 14px/1.45 Arial,sans-serif;border:1px solid #d8deeb;border-radius:9px;background:#fff;color:#263a54}.sgp-dialog textarea{resize:vertical;min-height:65px}.sgp-edit-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px 18px}.sgp-wide,.sgp-format-editor{grid-column:1/-1}.sgp-format-editor{display:grid;grid-template-columns:1fr 16px 1fr 90px 160px;gap:10px;align-items:end;border:1px solid #edcde2;background:#fff7fb;padding:11px 14px 14px;border-radius:11px}.sgp-format-editor legend{padding:0 6px;font-size:14px;font-weight:600;color:var(--crm-accent,#eb008b)}.sgp-format-editor>span{align-self:center;padding-top:20px;text-align:center}.sgp-dialog .sgp-checkbox,.sgp-checkbox{display:flex!important;align-items:center;gap:9px;font-weight:400;min-height:34px}.sgp-checkbox input[type=checkbox]{appearance:auto;flex:0 0 18px;width:18px!important;height:18px!important;margin:0;accent-color:var(--crm-accent,#eb008b)}.sgp-form-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:16px;padding-top:12px;border-top:1px solid #ece5ee}.sgp-presets{margin-bottom:18px;padding:12px;background:#f8f4fd;border:1px solid #e7dbf3;border-radius:10px}.sgp-error{color:#b92757;white-space:pre-line;font-size:13px;margin-top:10px}.sgp-help{font-size:12px;color:#78839a;margin:12px 0}.sgp-file-brief{border:1px solid #e9d5e4;border-left:3px solid var(--crm-accent,#eb008b);background:#fff8fc;padding:12px 15px;border-radius:11px;margin-bottom:16px}.sgp-file-brief>strong{font-size:18px;color:var(--crm-accent,#eb008b)}.sgp-file-brief p{margin:5px 0;font-size:13px}.sgp-preview{max-width:640px;max-height:380px;margin:12px auto;text-align:center}.sgp-preview img,.sgp-preview video{max-width:100%;max-height:360px;object-fit:contain}.sgp-download{margin:7px 0 14px}.sgp-library{margin:16px 0;border:1px solid #e3dce9;border-radius:10px;padding:11px}.sgp-library summary{cursor:pointer;color:#624d82;font-size:13px;font-weight:600}.sgp-library form{display:grid;gap:10px;margin-top:12px}.sgp-library ul{padding-left:18px}.sgp-library a{display:inline-flex;align-items:center;gap:7px;font-size:12px}.sgp-dialog button.sgp-correct{background:#fff1f5;color:#b32d58;border:1px solid #efc1d1}.sgp-dialog-name{font-size:17px;font-weight:600}
@media(max-width:1100px){.sgp-row{grid-template-columns:1.1fr 1.3fr 1.1fr 156px;gap:12px}.sgp-proof{display:none}.sgp-category h3{font-size:16px}}@media(max-width:720px){.sgp-counters{grid-template-columns:1fr 1fr}.sgp-row{grid-template-columns:1fr 1fr}.sgp-support{grid-column:1/-1}.sgp-review{grid-column:1/-1;display:flex;align-items:center;gap:12px;flex-wrap:wrap}.sgp-row-actions{margin:0}.sgp-category-count{font-size:11px}.sgp-category>summary{gap:8px;padding:10px}.sgp-category h3{font-size:15px}.sgp-edit-grid{grid-template-columns:1fr}.sgp-format-editor{grid-template-columns:1fr 12px 1fr}.sgp-format-editor label:nth-last-child(-n+2){grid-column:auto}.sgp-wide{grid-column:1}.sgp-heading .actions{width:100%}.sgp-heading .actions>button[data-sgp-add]{flex:1}.sgp-format{font-size:16px}.sgp-filters .sgp-checkbox{flex-basis:100%}}@media(max-width:430px){.sgp-row{grid-template-columns:1fr;gap:10px}.sgp-support,.sgp-review{grid-column:auto}.sgp-counter{padding:10px}.sgp-category-count{white-space:normal;max-width:65px;text-align:right}.sgp-format-editor{grid-template-columns:1fr 12px 1fr}.sgp-format-editor label:last-child{grid-column:1/-1}}

.sgp-icon[data-sgp-visibility]{background:#fff0f4;border-color:#f2c8d4;color:#b72e5e}.is-inactive .sgp-icon[data-sgp-visibility]{background:#effaf3;border-color:#c8e8d3;color:#28784b}

/* Shared CRM heading owns its frame: never frame a heading inside a heading. */
#sgp-root>.sgp-heading>h2{border:0;background:none;box-shadow:none;padding:0;margin:0}
#sgp-root .sgp-category>summary>h3{padding:0;border:0;background:none;box-shadow:none;font:600 16px/1.3 Arial,sans-serif;color:#24344e}
#sgp-root .sgp-category-icon{color:#7755a5;border-color:#e7dfef;background:#fff}

/* Keep native scrolling visible on long lists and in the support editor. */
html:has(#sgp-root){overflow-y:scroll;scrollbar-gutter:stable;scrollbar-width:auto;scrollbar-color:#9c7ba8 #f1edf5}
#editor:has(.sgp-dialog){overflow-y:scroll;overflow-x:hidden;scrollbar-gutter:stable;scrollbar-width:auto;scrollbar-color:#9c7ba8 #f1edf5;max-height:92dvh}
@media(max-width:720px){
 body main #content #sgp-root>.sgp-heading>.actions{display:grid!important;grid-template-columns:1fr 1fr 38px!important;width:100%!important;gap:7px!important;margin:0!important}
 body main #content #sgp-root>.sgp-heading>.actions>[data-sgp-add]{grid-column:1/-1;grid-row:1;width:100%;min-width:0;white-space:normal}
 body main #content #sgp-root>.sgp-heading>.actions>[data-sgp-export]{grid-row:2;min-width:0}
 body main #content #sgp-root>.sgp-heading>.actions>[data-sgp-refresh]{grid-row:2;grid-column:3;width:38px!important;height:38px}
}
