    body[data-admin-page=templates] {
      --sc-bg:light-dark(#f4f5f9,#11141b);--sc-panel:light-dark(#ffffff,#1a1e28);--sc-ink:light-dark(#202331,#edf0f6);--sc-muted:light-dark(#6b7182,#a0a8bc);--sc-line:light-dark(#e8eaf0,#303644);
      --sc-accent:light-dark(#7154d9,#b09bff);--sc-accent-soft:light-dark(#f0ebfc,#29223d);--sc-green:light-dark(#20785c,#78cbb0);--sc-green-soft:light-dark(#eaf6ef,#17352a);--sc-amber:light-dark(#966115,#e8bd72);--sc-amber-soft:light-dark(#fff5e4,#382c1b);--sc-red:light-dark(#b04651,#ee9ba4);--sc-red-soft:light-dark(#fff0f1,#38212b);--sc-rail:light-dark(#1b1e2a,#141721);--sc-rail-ink:#e9ecf5;--sc-rail-muted:#a6acbf;--sc-selected:#303045;--sc-queue:280px;--sc-gap:18px;
      color:var(--sc-ink);font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:14px;line-height:1.5;text-align:left;background:var(--sc-bg);
    }
    body[data-admin-page=templates] * {box-sizing:border-box}
body[data-admin-page=templates] {font-family:SCOverview,Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color-scheme:light;--text:var(--sc-ink);--muted:var(--sc-muted);--muted-2:var(--sc-muted);--line:var(--sc-line);--surface-2:var(--sc-bg);--surface:var(--sc-panel);--mint:var(--sc-accent);padding:0}
body[data-admin-page=templates][data-overview-theme=dark] {color-scheme:dark}
body[data-admin-page=templates] .ops-shell {padding-left:176px;background:var(--sc-bg);padding-bottom:24px;overflow:visible}
body[data-admin-page=templates] #ops-content {max-width:1550px;padding:24px;margin:0 auto}
body[data-admin-page=templates] .admin-rail {width:176px;padding:24px 14px;background:var(--sc-rail);border:0;gap:0;color:var(--sc-rail-ink)}
body[data-admin-page=templates] .admin-logo {display:flex;align-items:baseline;gap:0;width:auto;height:auto;border:0;line-height:1.3;background:transparent;box-shadow:none;color:var(--sc-rail-ink);font-size:22px;letter-spacing:-1px;font-weight:650;align-self:flex-start;margin:0 12px 24px;text-decoration:none}
body[data-admin-page=templates] .admin-logo span {color:#b7a2ff;margin-left:3px}
body[data-admin-page=templates] .admin-rail nav {width:100%;gap:5px;margin:0}
body[data-admin-page=templates] .overview-nav-caption {padding:10px 12px;color:var(--sc-rail-muted);font-size:10px;letter-spacing:1.2px;text-transform:uppercase}
body[data-admin-page=templates] .overview-nav-caption:not(:first-child) {margin-top:16px}
body[data-admin-page=templates] .admin-rail nav a {display:flex;align-items:center;flex-direction:row;justify-content:flex-start;gap:11px;min-height:42px;padding:10px 12px;border:0;border-radius:8px;color:var(--sc-rail-muted);background:transparent}
body[data-admin-page=templates] .admin-rail nav a.is-active {color:var(--sc-rail-ink);background:var(--sc-selected);box-shadow:none}
body[data-admin-page=templates] .admin-rail nav a b {width:17px;height:17px;font-size:0;flex:none}
body[data-admin-page=templates] .admin-rail nav a b svg {display:block;width:17px;height:17px}
body[data-admin-page=templates] .admin-rail nav a span {font-size:12px;font-weight:500;letter-spacing:0;white-space:normal}
body[data-admin-page=templates] .admin-rail nav a span:after {content:none}
body[data-admin-page=templates] .admin-cabinet {color:var(--sc-rail-muted);margin-top:auto;border-color:#343746;background:transparent;width:100%;min-height:40px}
body[data-admin-page=templates] .ops-topbar {min-height:62px;padding:14px 24px;background:var(--sc-panel);gap:12px}
body[data-admin-page=templates] .ops-topbar .brand, body[data-admin-page=templates] .ops-owner>span:not(.system-status) {display:none}
body[data-admin-page=templates] .overview-top-crumb {display:flex;align-items:center;gap:10px;font-size:12px;color:var(--sc-muted)}
body[data-admin-page=templates] .overview-top-crumb strong {color:var(--sc-ink);font-weight:500}
body[data-admin-page=templates] .ops-owner {gap:10px;min-width:0}
body[data-admin-page=templates] .system-status {color:var(--sc-muted);border:0;background:transparent;font-size:10px;letter-spacing:0;min-height:0;padding:0;white-space:nowrap}
body[data-admin-page=templates] .system-status i {display:none}
body[data-admin-page=templates] .ops-owner button {height:32px;min-height:32px;padding:0 10px;background:var(--sc-panel);color:var(--sc-muted);border:1px solid var(--sc-line);border-radius:7px;font-size:12px;font-weight:500}
body[data-admin-page=templates] #overview-theme {display:grid;place-items:center;width:32px;padding:0}
body[data-admin-page=templates] #overview-theme svg {width:16px;height:16px}

body[data-admin-page=templates] [hidden] {display:none!important}
body[data-admin-page=templates] .admin-page {min-height:0}
body[data-admin-page=templates] .ops-heading,body[data-admin-page=templates] .client-page-heading {display:flex;align-items:center;justify-content:space-between;gap:20px;margin:0 0 22px}
body[data-admin-page=templates] .ops-heading h1,body[data-admin-page=templates] .client-page-heading h1 {margin:0;font-size:28px;line-height:1.3;letter-spacing:-.7px;font-weight:650}
body[data-admin-page=templates] .ops-heading p,body[data-admin-page=templates] .client-page-heading p {font-size:13px;color:var(--sc-muted);margin:7px 0 0;overflow-wrap:anywhere}

body[data-admin-page=templates] [hidden]{display:none!important}
body[data-admin-page=templates] .ops-owner .system-status{display:none}
body[data-admin-page=templates] .as-refresh{display:grid;justify-items:end;gap:7px;color:var(--sc-muted);font-size:11px;flex:none}
body[data-admin-page=templates] .button{min-height:36px;padding:8px 12px;border:1px solid var(--sc-line);border-radius:8px;background:var(--sc-panel);color:var(--sc-ink);box-shadow:none;font-size:12px;font-weight:500;letter-spacing:0}
body[data-admin-page=templates] .button:disabled{opacity:.5;cursor:default}
body[data-admin-page=templates] .button.button-primary{color:light-dark(#fff,#201735);background:var(--sc-accent);border-color:var(--sc-accent)}
body[data-admin-page=templates] [hidden]{display:none!important}
body[data-admin-page=templates] #ops-data-status{display:none}
body[data-admin-page=templates] .template-page{max-width:none;margin:0}
body[data-admin-page=templates] .tp-refresh{display:grid;justify-items:end;gap:6px;font-size:11px;color:var(--sc-muted);flex:none}
body[data-admin-page=templates] .tp-summary{display:flex;flex-wrap:wrap;gap:12px 28px;padding:16px 20px;margin-bottom:20px;border:1px solid var(--sc-line);border-radius:10px;background:var(--sc-panel);font-size:12px;color:var(--sc-muted)}
body[data-admin-page=templates] .tp-summary strong{color:var(--sc-ink);margin-left:8px;font-variant-numeric:tabular-nums}
body[data-admin-page=templates] .tp-layout{display:grid;grid-template-columns:300px minmax(0,1fr);gap:20px;align-items:start}
body[data-admin-page=templates] .tp-library,body[data-admin-page=templates] .tp-editor{min-width:0;background:var(--sc-panel);border:1px solid var(--sc-line);border-radius:12px;overflow:hidden}
body[data-admin-page=templates] .tp-library{padding:18px}
body[data-admin-page=templates] label{display:grid;gap:7px;color:var(--sc-muted);font-size:12px;min-width:0}
body[data-admin-page=templates] input,body[data-admin-page=templates] select,body[data-admin-page=templates] textarea,body[data-admin-page=templates] #template-form input,body[data-admin-page=templates] #template-form select,body[data-admin-page=templates] #template-form textarea{width:100%;min-width:0;min-height:40px;padding:10px 12px;border:1px solid var(--sc-line);border-radius:8px;background:var(--sc-panel);color:var(--sc-ink);font:inherit;font-size:13px;line-height:1.5;box-shadow:none;letter-spacing:0}
body[data-admin-page=templates] textarea{resize:vertical;font-family:inherit;white-space:pre-wrap;overflow-wrap:anywhere}
body[data-admin-page=templates] #template-form textarea:disabled,body[data-admin-page=templates] #template-form select:disabled{background:var(--sc-bg);color:var(--sc-muted)}
body[data-admin-page=templates] input:focus,body[data-admin-page=templates] select:focus,body[data-admin-page=templates] textarea:focus,body[data-admin-page=templates] #template-form input:focus,body[data-admin-page=templates] #template-form select:focus,body[data-admin-page=templates] #template-form textarea:focus{outline:2px solid var(--sc-accent-soft);border-color:var(--sc-accent)}
body[data-admin-page=templates] .tp-library-filters{display:grid;gap:12px;margin-top:14px}
body[data-admin-page=templates] #template-list{display:grid;gap:6px;padding:18px 0 0;background:transparent;border:0;max-height:650px;overflow:auto;min-width:0}
body[data-admin-page=templates] #template-list .tp-item{display:block;min-width:0;width:100%;padding:14px;text-align:left;border:1px solid transparent;border-radius:9px;box-shadow:none;background:transparent;color:var(--sc-ink);font:inherit;line-height:1.5;letter-spacing:0}
body[data-admin-page=templates] #template-list .tp-item:hover{background:var(--sc-bg)}
body[data-admin-page=templates] #template-list .tp-item.is-active{background:var(--sc-accent-soft);border-color:var(--sc-accent)}
body[data-admin-page=templates] .tp-item strong{font-size:13px;font-weight:600}
body[data-admin-page=templates] .tp-item small{display:block;font-size:11px;color:var(--sc-muted);margin:5px 0}
body[data-admin-page=templates] .tp-badge{display:inline-block;font-size:10px;line-height:1.5;padding:4px 7px;border-radius:5px;background:var(--sc-bg);color:var(--sc-muted);margin:4px 4px 0 0}
body[data-admin-page=templates] .tp-badge.accent{background:var(--sc-accent-soft);color:var(--sc-accent)}
body[data-admin-page=templates] .tp-badge.warning{background:var(--sc-amber-soft);color:var(--sc-amber)}
body[data-admin-page=templates] .tp-editor-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:22px 24px}
body[data-admin-page=templates] .tp-caption{font-size:11px;color:var(--sc-muted)}
body[data-admin-page=templates] .tp-editor-heading h2{font-size:20px;font-weight:600;margin:5px 0}
body[data-admin-page=templates] .tp-editor-heading p{font-size:12px;color:var(--sc-muted);margin:5px 0 0}
body[data-admin-page=templates] .tp-integrity{margin:0 24px 20px;padding:12px 14px;border-radius:8px;font-size:12px;background:var(--sc-amber-soft);color:var(--sc-amber)}
body[data-admin-page=templates] .tp-tabs{display:flex;gap:24px;border-bottom:1px solid var(--sc-line);padding:0 24px;overflow-x:auto}
body[data-admin-page=templates] .tp-tabs button{min-height:46px;background:transparent;border:0;border-bottom:2px solid transparent;border-radius:0;color:var(--sc-muted);font:inherit;font-size:13px;padding:0;letter-spacing:0;box-shadow:none;white-space:nowrap}
body[data-admin-page=templates] .tp-tabs button[aria-selected=true]{color:var(--sc-accent);border-color:var(--sc-accent)}
body[data-admin-page=templates] #template-form,body[data-admin-page=templates] .tp-preview,body[data-admin-page=templates] .tp-history{padding:24px}
body[data-admin-page=templates] #template-fields{padding:0;margin:0;border:0;min-width:0}
body[data-admin-page=templates] #template-fields>label{margin-top:18px}
body[data-admin-page=templates] .tp-fields{display:grid;grid-template-columns:1fr 1fr;gap:16px}
body[data-admin-page=templates] .tp-wide{grid-column:1/-1}
body[data-admin-page=templates] label small{font-size:11px;font-weight:400;line-height:1.6}
body[data-admin-page=templates] #template-mission{font-size:13px!important;min-height:114px!important}
body[data-admin-page=templates] #template-advanced{margin:20px 0 0;padding:14px;border:1px solid var(--sc-line);border-radius:8px;font-size:12px}
body[data-admin-page=templates] #template-advanced summary{font-weight:500;color:var(--sc-ink);cursor:pointer}
body[data-admin-page=templates] #template-advanced p{font-size:11px;line-height:1.6;color:var(--sc-muted)}
body[data-admin-page=templates] #template-configuration{font-family:ui-monospace,SFMono-Regular,monospace;font-size:12px}
body[data-admin-page=templates] .tp-error,body[data-admin-page=templates] #template-json-error{color:var(--sc-red);font-size:12px}
body[data-admin-page=templates] .tp-validation{padding:12px 14px;margin-top:20px;border-radius:8px;background:var(--sc-bg);color:var(--sc-muted);font-size:12px;line-height:1.6}
body[data-admin-page=templates] .tp-validation.is-error{background:var(--sc-red-soft);color:var(--sc-red)}
body[data-admin-page=templates] .tp-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:10px;margin-top:18px}
body[data-admin-page=templates] .tp-preview>p,body[data-admin-page=templates] .tp-history>p{color:var(--sc-muted);font-size:12px;line-height:1.7;margin:0 0 20px}
body[data-admin-page=templates] .tp-client-card{max-width:480px;border:1px solid var(--sc-line);border-radius:12px;padding:24px;background:var(--sc-bg)}
body[data-admin-page=templates] .tp-client-card h3{font-size:18px;font-weight:600;margin:10px 0}
body[data-admin-page=templates] .tp-client-card p{font-size:13px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere}
body[data-admin-page=templates] .tp-preview dl>div{display:flex;justify-content:space-between;gap:16px;border-bottom:1px solid var(--sc-line);padding:12px 0;font-size:12px}
body[data-admin-page=templates] .tp-preview dd{margin:0;color:var(--sc-ink);text-align:right}
body[data-admin-page=templates] .tp-preview dt,body[data-admin-page=templates] .tp-preview>small{color:var(--sc-muted)}
body[data-admin-page=templates] #template-versions{display:grid;gap:12px}
body[data-admin-page=templates] #template-versions article{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px;border:1px solid var(--sc-line);border-radius:9px;background:transparent}
body[data-admin-page=templates] #template-versions strong{font-size:13px}
body[data-admin-page=templates] #template-versions small{display:block;color:var(--sc-muted);font-size:11px;margin-top:6px}
body[data-admin-page=templates] .tp-empty{font-size:12px;line-height:1.6;color:var(--sc-muted);padding:20px 0}
body[data-admin-page=templates] .tp-dialog{width:min(760px,calc(100vw - 32px));max-height:88vh;border:1px solid var(--sc-line);border-radius:12px;padding:24px;background:var(--sc-panel);color:var(--sc-ink)}
body[data-admin-page=templates] .tp-dialog::backdrop{background:#11172899}
body[data-admin-page=templates] .tp-dialog header,body[data-admin-page=templates] .tp-dialog footer{display:flex;align-items:center;justify-content:space-between;gap:16px}
body[data-admin-page=templates] .tp-dialog h2{font-size:20px;margin:0}
body[data-admin-page=templates] .tp-dialog p{font-size:12px;color:var(--sc-muted);line-height:1.6}
body[data-admin-page=templates] .tp-dialog table{width:100%;min-width:0;border-collapse:collapse;font-size:11px;table-layout:fixed}
body[data-admin-page=templates] .tp-dialog th,body[data-admin-page=templates] .tp-dialog td{padding:10px 8px;text-align:left;vertical-align:top;border-bottom:1px solid var(--sc-line);white-space:pre-wrap;overflow-wrap:anywhere;background:transparent;color:var(--sc-ink);text-transform:none;letter-spacing:0}
body[data-admin-page=templates] .tp-dialog th{font-weight:500;color:var(--sc-muted)}
body[data-admin-page=templates] .tp-dialog footer{justify-content:flex-end;margin-top:20px;flex-wrap:wrap}
body[data-admin-page=templates] #template-confirm-draft-warning{display:flex;align-items:flex-start;gap:10px;margin-top:20px;color:var(--sc-amber)}
body[data-admin-page=templates] #template-replace-draft{width:16px;min-height:16px;flex:none}
@media(max-width:1000px){body[data-admin-page=templates] .tp-layout{grid-template-columns:250px minmax(0,1fr);gap:16px}}
@media(max-width:760px){body[data-admin-page=templates] .tp-layout{grid-template-columns:1fr}body[data-admin-page=templates] #template-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));max-height:300px}body[data-admin-page=templates] .tp-library-filters{grid-template-columns:1fr 1fr}}
@media(max-width:680px){body[data-admin-page=templates] .ops-shell{padding:0 0 76px}body[data-admin-page=templates] #ops-content{padding:20px 16px}body[data-admin-page=templates] .admin-rail{left:0;right:0;bottom:0;top:auto;width:100%;height:66px;padding:4px 6px;z-index:10}body[data-admin-page=templates] .admin-logo,body[data-admin-page=templates] .admin-cabinet,body[data-admin-page=templates] .overview-nav-caption{display:none}body[data-admin-page=templates] .admin-rail nav{display:grid;grid-template-columns:repeat(8,minmax(64px,1fr));grid-template-rows:50px;height:58px;align-content:center;overflow-x:auto;overflow-y:hidden;gap:2px}body[data-admin-page=templates] .admin-rail nav a{flex-direction:column;gap:5px;padding:5px 2px;min-height:50px}body[data-admin-page=templates] .admin-rail nav a span{font-size:10px;white-space:nowrap}body[data-admin-page=templates] .ops-topbar{padding:12px 16px;flex-wrap:wrap;gap:8px}body[data-admin-page=templates] .ops-owner{margin-left:auto;min-width:0}body[data-admin-page=templates] .ops-heading{flex-direction:column;align-items:flex-start;gap:12px}body[data-admin-page=templates] .ops-heading h1{font-size:25px}body[data-admin-page=templates] .tp-refresh{justify-items:start}body[data-admin-page=templates] .tp-summary{display:grid;grid-template-columns:1fr 1fr;gap:12px;font-size:11px;padding:16px}body[data-admin-page=templates] .tp-summary strong{display:block;margin:4px 0 0;font-size:17px}body[data-admin-page=templates] #template-list{grid-template-columns:1fr}body[data-admin-page=templates] .tp-library{padding:16px}body[data-admin-page=templates] .tp-editor-heading{padding:18px;flex-wrap:wrap}body[data-admin-page=templates] .tp-integrity{margin:0 18px 16px}body[data-admin-page=templates] .tp-tabs{padding:0 18px;gap:20px}body[data-admin-page=templates] #template-form,body[data-admin-page=templates] .tp-preview,body[data-admin-page=templates] .tp-history{padding:18px}body[data-admin-page=templates] .tp-fields{grid-template-columns:1fr}body[data-admin-page=templates] .tp-actions{justify-content:stretch}body[data-admin-page=templates] .tp-actions button{flex:1 1 100%}body[data-admin-page=templates] .tp-dialog{padding:18px}body[data-admin-page=templates] #template-versions article{flex-wrap:wrap}body[data-admin-page=templates] .tp-preview dl>div{flex-wrap:wrap}}

@media(max-width:680px){body[data-admin-page=templates] .tp-library-filters{grid-template-columns:1fr}body[data-admin-page=templates] .tp-tabs{gap:14px;padding:0 14px}body[data-admin-page=templates] .tp-tabs button{font-size:12px}}
