.content-wrap.template-management{box-sizing:border-box;width:100%;max-width:none;min-width:0;min-height:calc(100vh - 64px);margin:0;padding-left:clamp(16px,1.4vw,28px);padding-right:clamp(16px,1.4vw,28px);padding-bottom:clamp(16px,1.4vw,28px)}
.template-management .template-filters .filter-grid{grid-template-columns:minmax(240px,1fr) 190px 170px auto}
.template-management .template-list table{min-width:1280px}
.template-management .table-scroll{max-width:100%;overflow-x:auto}
.template-management .row-actions{display:flex;flex-wrap:wrap;gap:2px;max-width:320px}
.template-management .metric-number,.template-management .metric-rate,.template-management .metric-money{white-space:nowrap;text-align:right;font-variant-numeric:tabular-nums}
.template-management .metric-money.profit{color:var(--success);font-weight:700}
.template-management .modified-at{white-space:nowrap;color:#5e6879;font-variant-numeric:tabular-nums}
.template-management .device-tag{display:inline-flex;padding:4px 8px;border-radius:12px;background:var(--primary-soft);color:var(--primary);font-size:11px;font-weight:600}
.template-management .reference-link{border:0;background:transparent;color:var(--primary);padding:4px;cursor:pointer}
.template-management .workspace-header{display:flex;align-items:flex-start;gap:16px;margin-bottom:20px}
.template-management .template-back-button{display:inline-flex;align-items:center;justify-content:center;min-height:40px;font-size:15px;padding:0 14px;border:1px solid #cbd5e3;border-radius:8px;background:#fff;white-space:nowrap;cursor:pointer}
.template-management .workspace-header h1{margin:0 0 5px;font-size:25px}
.template-management .workspace-header p{margin:0;color:var(--muted);font-size:13px}
.template-management .template-workspace{display:grid;grid-template-columns:minmax(320px,.82fr) minmax(420px,1.18fr);gap:16px}
.template-management .form-card,.template-management .recognition-card{padding:20px}
.template-management .form-card{display:flex;flex-direction:column;gap:15px}
.template-management .form-card label{display:flex;flex-direction:column;gap:7px;color:#5e6879;font-size:12px;font-weight:600}
.template-management .form-card input:not([type="radio"]):not([type="file"]),.template-management .form-card select{height:38px;border:1px solid #d9dee8;border-radius:7px;padding:0 10px;background:#fff}
.template-management .form-card fieldset label{display:inline-flex;flex-direction:row;align-items:center;gap:6px;margin-right:14px}
.template-management .form-card input[type="radio"]{width:16px;height:16px;flex:0 0 16px;margin:0;padding:0}
.template-management .form-card input[type="file"]{box-sizing:border-box;min-height:38px;border:1px solid #d9dee8;border-radius:7px;padding:4px 8px;background:#fff;color:#455165;font:inherit}
.template-management .form-card input[type="file"]::file-selector-button{margin-right:8px;border:0;border-radius:5px;padding:5px 9px;background:var(--primary-soft);color:var(--primary);font:inherit;font-weight:600;cursor:pointer}
.template-management .form-card fieldset{border:1px solid var(--line);border-radius:8px;padding:12px}
.template-management .recognition-card ul{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0;padding:0;list-style:none}
.template-management .recognition-card li,.template-management .check-list>div{padding:10px;border-radius:8px;background:#f7f9fc;font-size:12px}
.template-management .check-list{display:grid;gap:8px}
.template-management .check-list>div{display:flex;align-items:center;gap:8px}
.template-management .check-list em{margin-left:auto;color:var(--success);font-style:normal}
.template-management .workspace-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}
.template-management .preview-site{width:100%;max-width:980px;min-height:310px;background:#fff;border:1px solid #d8deea;border-radius:10px;box-shadow:var(--shadow)}
.template-management .preview-site header{padding:15px 18px;border-bottom:1px solid var(--line);font-weight:700}
.template-management .preview-site main{padding:42px 24px;text-align:center}
.template-management .inline-empty{padding:28px;text-align:center;color:var(--muted);background:#f7f9fc;border-radius:8px}
.template-dialog{width:min(520px,calc(100% - 32px));border:0;border-radius:14px;padding:0;background:#fff;color:#172033;font-family:inherit;font-size:14px;box-shadow:0 24px 70px rgba(13,23,41,.28)}
.template-dialog::backdrop{background:rgba(15,24,38,.48)}
.template-dialog form{padding:28px}
.template-dialog h2{margin:0 0 10px;font-size:20px;line-height:1.35;color:#172033}
.template-dialog p{margin:0 0 20px;color:var(--muted);font-size:14px;line-height:1.6}
.template-dialog #templateDialogFields{display:grid;gap:16px}
.template-dialog #templateDialogFields label{display:grid;gap:7px;color:#455165;font-size:14px;font-weight:600;line-height:1.4}
.template-dialog #templateDialogFields input,.template-dialog #templateDialogFields select{box-sizing:border-box;width:100%;height:40px;border:1px solid #d7deea;border-radius:8px;padding:0 11px;background:#fff;color:#172033;font-family:inherit;font-size:14px;line-height:normal;outline:none}
.template-dialog #templateDialogFields input:focus,.template-dialog #templateDialogFields select:focus{border-color:var(--primary);box-shadow:0 0 0 3px var(--primary-soft)}
.template-dialog #templateDialogFields select{cursor:pointer}.template-dialog .dialog-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:22px}
@media(max-width:1280px){.template-management .template-filters .filter-grid{grid-template-columns:minmax(220px,1fr) 160px 150px auto}.template-management .template-workspace{grid-template-columns:1fr}.template-management .row-actions{max-width:260px}}
