.template-meta-controls{display:flex;align-items:center;gap:8px;min-width:0}
.template-meta-controls label{display:block;min-width:0;flex:0 1 330px}
.template-meta-controls select{width:100%;min-height:38px;max-width:330px}
.template-meta-controls button,.template-meta-actions button{min-height:38px;border:1px solid #28664f;border-radius:7px;background:#28664f;color:#fff;padding:7px 12px;cursor:pointer;white-space:nowrap}
.template-meta-controls button:disabled,.template-meta-actions button:disabled{opacity:.55;cursor:not-allowed}
.template-meta-controls small{font-size:11px;color:#65716a}
.template-meta-actions{display:flex;align-items:center;justify-content:flex-start;flex-wrap:wrap;gap:8px;margin-top:12px}
.content[data-screen="CA05"] .panel-heading .template-meta-actions{display:flex;align-items:center;gap:8px;margin:0;flex-wrap:wrap}
.template-readiness-compact{font-size:12px;color:#755d29;background:#fff8e7;border-radius:7px;margin:10px 0;padding:7px 10px}
.template-readiness-compact summary{cursor:pointer}
.template-readiness-compact ul{margin:6px 18px 0}
.template-meta-actions p{margin:0;font-size:12px;line-height:1.8;overflow-wrap:anywhere}
.template-meta-actions button{justify-self:start}
.template-submit-preview .phone-frame{min-height:230px}
dialog.drawer:has(#feature-document-form[data-kind=template]){width:min(1000px,96vw);max-width:96vw}
.template-editor-grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(280px,.8fr);gap:18px;align-items:start}
.template-editor-fields{display:grid;gap:8px;min-width:0}
.template-editor-basics{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.template-editor-fields h3,.template-editor-preview h3{font-size:15px;margin:10px 0 0}
.template-editor-preview{position:sticky;top:0;min-width:0}
.template-editor-preview .phone-frame{min-height:180px}
.template-format-toolbar{display:flex;align-items:center;gap:5px;flex-wrap:wrap;margin-top:-6px;padding:5px;background:#f3f7f5;border:1px solid #e4ece8;border-radius:8px;width:max-content;max-width:100%}
.template-format-toolbar button{min-width:33px;min-height:32px;padding:4px 7px}
.template-editor-buttons-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.template-editor-buttons-head h3{margin:0}
.template-editor-buttons-head button{font-size:12px;color:#28664f}
.template-editor-buttons{display:grid;gap:8px}
.template-editor-button{display:grid;grid-template-columns:125px minmax(110px,1fr) minmax(130px,1.4fr) 35px;gap:6px}
.template-editor-button>button{min-width:35px;padding:0}
.template-editor-button [hidden]{display:none}
.template-preview-header,.template-preview-footer{display:block;padding:5px 9px}
.template-preview-buttons{display:grid;gap:5px;margin-top:8px}
.template-preview-buttons span{display:block;text-align:center;padding:6px;border-radius:5px;background:#fff;color:#28664f;font-size:11px}
.template-preview-buttons .template-preview-action{display:flex;align-items:center;justify-content:center;gap:6px;min-width:0;font-weight:600}
.template-preview-action>span{display:inline!important;padding:0!important;min-width:0;background:transparent!important;color:inherit!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.template-action-icon{width:16px;height:16px;flex:none;vertical-align:middle}
.template-meta-controls button,.template-meta-actions button,.template-provider-upload,.content[data-screen="CA05"] .page-actions [data-action="feature-doc-new"],.content[data-screen="CA05"] .template-native-inspector .panel-heading button{display:inline-flex;align-items:center;justify-content:center;gap:7px}
.template-preview-footer{opacity:.72;font-size:11px}
.template-preview-media{min-height:160px;margin:0 0 8px;border-radius:9px;background:#e9f0ee;color:#41655a;display:grid;place-items:center;gap:4px;text-align:center;overflow:hidden}
.template-preview-media span{font-size:34px;line-height:1}
.template-preview-media small{max-width:260px;padding:0 12px 12px;font-size:12px}
.template-preview-media img{display:block;width:100%;height:220px;object-fit:cover}
.template-media-note{display:flex;align-items:center;gap:8px;padding:8px 10px;background:#eef7f3;border-radius:7px;font-size:12px}
.template-media-picker{font-size:12px}
.phone-conversation code{background:#e4e9e8;padding:0 2px;border-radius:3px}
@media(max-width:760px){dialog.drawer:has(#feature-document-form[data-kind=template]){width:100vw;max-width:100vw}.template-editor-grid{grid-template-columns:1fr}.template-editor-preview{position:static}.template-editor-button{grid-template-columns:1fr 1fr 35px}.template-editor-button [name=template_button_value]:not([hidden]){grid-column:1/3}}
html[data-theme="dark"] .template-meta-controls small{color:#9fb0c1}
html[data-theme="dark"] .template-preview-buttons span{background:#20303b;color:#82edc9}
html[data-theme="dark"] .template-meta-actions button,html[data-theme="dark"] .template-meta-controls button{background:#28664f;color:#fff}
.content[data-screen="CA05"]>.page-intro{min-height:88px;padding-block:14px}
.content[data-screen="CA05"]>.page-intro>p{display:none}
html[lang=ar] main.content[data-screen="CA05"]>.page-intro:has(.page-actions){padding-inline-end:24px;grid-template-columns:minmax(260px,1fr) auto;align-items:start}
html[lang=ar] main.content[data-screen="CA05"]>.page-intro>.page-actions{position:static;grid-column:2;grid-row:2;display:flex;align-items:center;justify-content:flex-end;gap:8px;width:max-content;max-width:none;flex-wrap:nowrap;margin:0}
.content[data-screen="CA05"]>.page-intro>.page-actions .template-meta-controls{flex:0 0 auto}
.content[data-screen="CA05"]>.page-intro>.page-actions .template-meta-controls label{flex:0 0 300px;width:300px}
.content[data-screen="CA05"] .template-native-filters{display:grid;grid-template-columns:minmax(220px,1fr) repeat(4,minmax(130px,170px));align-items:center;margin-bottom:12px;padding:10px 12px;gap:10px}
.content[data-screen="CA05"] .template-native-filters>label{min-width:0}
.content[data-screen="CA05"] .template-native-filters>select{min-width:0;width:100%;min-height:40px;padding-inline:14px 32px;font-family:inherit;font-size:13px;font-weight:600;color:#18322a;white-space:nowrap;text-overflow:clip;direction:rtl}
.content[data-screen="CA05"] .template-native-filters input{min-height:40px;font-size:13px}
.content[data-screen="CA05"] .template-meta-controls{margin:0;padding:0;border:0;background:transparent}
.content[data-screen="CA05"] .template-native-workspace{grid-template-columns:minmax(0,1fr);gap:16px}
.content[data-screen="CA05"] .template-native-inspector{width:min(100%,760px);justify-self:center}
.template-table-scroll{overflow-x:auto;background:#fff;border:1px solid #e3e9e6;border-radius:10px}
.template-list-table{width:100%;min-width:910px;border-collapse:collapse;table-layout:fixed;direction:rtl;font-size:13px;color:#18322a}
.template-list-table th,.template-list-table td{text-align:right;padding:13px 10px;border-bottom:1px solid #e9eeeb;vertical-align:middle;overflow-wrap:anywhere}
.template-list-table th{font-weight:700;background:#f7faf8;white-space:nowrap}
.template-list-table tr:last-child td{border-bottom:0}
.template-list-table tr.selected{background:#eef8f3}
.template-list-table tbody tr:hover{background:#f7fbf9}
.template-list-table th:first-child{width:18%}
.template-list-table th:nth-child(4){width:16%}
.template-list-table th:nth-child(8){width:13%}
.template-list-table th:last-child{width:8%;text-align:center}
.template-list-table td:last-child{text-align:center}
.template-table-name{border:0;background:none;color:#075e49;font:inherit;font-weight:700;text-align:right;padding:0;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.template-table-name:hover{color:#034a38}
.template-row-preview-button{display:inline-grid;place-items:center;width:34px;height:34px;border:1px solid #bdd9cb;border-radius:8px;background:#eff8f3;color:#075e49;cursor:pointer}
.template-row-preview-button:hover,.template-row-preview-button:focus-visible{background:#dcefe5;outline:2px solid #075e49;outline-offset:2px}
.template-preview-dialog{width:min(720px,94vw);max-width:94vw;max-height:90vh;overflow:auto;padding:0;border:1px solid #dce7e0;border-radius:14px;background:#fff;color:#18322a;box-shadow:0 24px 65px #0c291e45;direction:rtl}
.template-preview-dialog::backdrop{background:#10251db3}
.template-preview-dialog-header{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 18px;background:#fff;border-bottom:1px solid #e4ece7}
.template-preview-dialog-header strong{font-size:15px}
.template-preview-dialog-header button{display:grid;place-items:center;width:32px;height:32px;border:0;border-radius:7px;background:#f0f5f2;color:#18322a;font-size:22px;cursor:pointer}
.template-preview-dialog .template-native-inspector{width:100%!important;max-width:none;padding:16px 20px 24px;box-shadow:none;border:0}
.template-preview-dialog .template-provider-preview{margin-inline:auto}
.template-list-table .template-metric{text-align:center;color:#7b8981}
.template-table-empty{text-align:center!important;color:#61726a;padding:28px!important}
.template-table-summary{font-size:12px;color:#60746a;margin:8px 2px 2px}
.content[data-screen="CA05"] .template-native-choice{min-height:0;margin-bottom:8px;padding:12px 14px;gap:5px}
.content[data-screen="CA05"] .template-native-choice p{line-height:1.5}
.content[data-screen="CA05"] .template-native-inspector{padding:16px;min-height:0}
.content[data-screen="CA05"] .template-native-inspector .panel-heading{margin-bottom:4px}
.content[data-screen="CA05"] .template-native-inspector .panel-heading h2{font-size:16px}
.content[data-screen="CA05"] .template-native-inspector h3{margin:16px 0 8px}
.content[data-screen="CA05"] .template-native-inspector .phone-frame{min-height:175px;border-width:6px;border-top-width:8px;border-radius:10px}
.content[data-screen="CA05"] .template-native-inspector>.phone-preview{max-width:360px;margin:10px auto 0}
.content[data-screen="CA05"] .template-native-inspector>.phone-preview .phone-frame{min-height:0;border:1px solid #e1e9e4;border-radius:10px;background:#e9e4db;box-shadow:0 6px 22px #102a2312}
.content[data-screen="CA05"] .template-native-inspector>.phone-preview .phone-top{padding:7px 10px;background:#f7faf8;color:#18322a}
.content[data-screen="CA05"] .template-native-inspector>.phone-preview .phone-top small{color:#60796e}
.content[data-screen="CA05"] .template-native-inspector>.phone-preview .phone-conversation{min-height:0;padding:9px;gap:4px}
.content[data-screen="CA05"] .template-native-inspector>.phone-preview .phone-conversation article{background:#fff;color:#18322a;padding:9px 11px;line-height:1.55;font-size:12px}
.content[data-screen="CA05"] .template-native-inspector>.phone-preview .template-preview-media{min-height:92px;margin:0}
.content[data-screen="CA05"] .template-native-inspector>.phone-preview .template-preview-media img{height:130px}
.content[data-screen="CA05"] .template-native-inspector .phone-top{padding:9px 12px}
.content[data-screen="CA05"] .template-native-inspector .phone-conversation{min-height:120px;padding:12px;gap:8px}
.content[data-screen="CA05"] .template-native-inspector .phone-date{display:none}
.template-provider-facts,.template-inspector-status{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:10px 0 16px;color:#586674;font-size:12px}
.template-provider-body{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.8;padding:14px;background:#f7faf8;border-radius:8px}
.template-provider-preview{max-width:360px;margin:10px auto 0}
.template-provider-preview .phone-frame{min-height:0!important;border-width:0!important;border-radius:12px!important;background:#e9e4db;box-shadow:0 8px 30px #102a2315}
.template-provider-preview .phone-top{display:flex;align-items:center;gap:8px;padding:7px 10px!important;background:#fff}
.template-provider-preview .phone-conversation{padding:9px!important;min-height:0!important;display:block}
.template-provider-preview .phone-conversation article{background:#fff!important;color:#18322a!important;border-radius:8px;padding:9px 11px;line-height:1.55;font-size:12px;white-space:pre-wrap;overflow-wrap:anywhere;box-shadow:0 1px 4px #102a2312}
.template-provider-preview .template-preview-media{background:#eef3f1}
.template-provider-preview .template-preview-media{min-height:92px;margin-bottom:4px}
.template-provider-preview .template-preview-media img{height:130px}
.template-provider-preview .template-preview-media small{padding-bottom:8px}
.template-provider-preview .template-preview-buttons{grid-template-columns:1fr 1fr}
.template-provider-preview .phone-date,.template-provider-preview .phone-conversation>small,.template-provider-preview .phone-preview-title{display:none}
.template-provider-preview .template-preview-buttons span{background:#fff;font-size:12px;padding:7px}
.template-provider-upload{display:inline-flex;align-items:center;justify-content:center;padding:8px 12px;border:1px solid #b9d3c7;border-radius:7px;color:#28664f;font-size:12px;cursor:pointer;justify-self:start}
.template-provider-upload input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.template-inspector-status{margin:12px 0}.template-inspector-status>span:not(.badge){padding-inline:8px;border-inline-start:1px solid #dde6e2}
.content[data-screen="CA05"] .template-readiness{padding:10px 12px;margin:12px 0;border-radius:8px;background:#fff7e7}
.content[data-screen="CA05"] .template-variables{display:flex;flex-wrap:wrap;gap:6px}
.content[data-screen="CA05"] .template-variables>div{padding:6px 10px}
.content[data-screen="CA05"] .template-native-inspector .phone-preview-title,.content[data-screen="CA05"] .template-native-inspector .phone-conversation>small,dialog:has(#feature-document-form[data-kind=template]) .phone-preview-title,dialog:has(#feature-document-form[data-kind=template]) .phone-conversation>small{display:none}
dialog:has(#feature-document-form[data-kind=template]) .template-editor-preview .phone-frame{min-height:175px;border-width:6px;border-top-width:8px;border-radius:10px}
dialog:has(#feature-document-form[data-kind=template]) .template-editor-preview .phone-top{padding:9px 12px}
dialog:has(#feature-document-form[data-kind=template]) .template-editor-preview .phone-conversation{min-height:120px;padding:12px;gap:8px}
dialog:has(#feature-document-form[data-kind=template]) .template-editor-preview .phone-date{display:none}
dialog:has(#feature-document-form[data-kind=template]) textarea[name=body]{min-height:100px}
dialog:has(#feature-document-form[data-kind=template]) #feature-document-form>button.primary{position:sticky;bottom:10px;z-index:3;justify-self:end;box-shadow:0 6px 18px #102a2340}
html[data-theme="dark"] .template-format-toolbar{background:#22313a;border-color:#354a48}
html[data-theme="dark"] .template-provider-body{background:#22313a}
html[data-theme="dark"] .template-preview-dialog,html[data-theme="dark"] .template-preview-dialog-header{background:#1c2830;color:#edf7f0;border-color:#344c43}
html[data-theme="dark"] .template-native-inspector .phone-frame,html[data-theme="dark"] .template-editor-preview .phone-frame{background:#efe8df;border-color:#111b2e}
html[data-theme="dark"] .template-native-inspector .phone-conversation article,html[data-theme="dark"] .template-editor-preview .phone-conversation article{background:#d9fdd3;color:#17392b}
@media(max-width:1100px){.content[data-screen="CA05"] .template-native-filters{grid-template-columns:minmax(220px,1fr) repeat(4,minmax(110px,150px))}}
@media(max-width:950px){html[lang=ar] main.content[data-screen="CA05"]>.page-intro:has(.page-actions){grid-template-columns:1fr}html[lang=ar] main.content[data-screen="CA05"]>.page-intro>.page-actions{grid-column:1;grid-row:auto;justify-content:flex-start;flex-wrap:wrap;width:auto;margin-top:8px}}
@media(max-width:900px){.content[data-screen="CA05"] .template-native-workspace{grid-template-columns:1fr}.content[data-screen="CA05"] .template-native-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.content[data-screen="CA05"] .template-native-filters>label{grid-column:1/-1}}
@media(max-width:760px){.content[data-screen="CA05"] .template-native-filters{grid-template-columns:1fr 1fr}.content[data-screen="CA05"] .template-native-filters>label{grid-column:1/-1}.content[data-screen="CA05"] .template-meta-controls{grid-column:1/-1}.content[data-screen="CA05"] .page-actions{align-items:stretch}.content[data-screen="CA05"] .template-meta-controls{flex:1;flex-wrap:wrap}.content[data-screen="CA05"] .template-meta-controls label{flex:1 1 210px}.template-editor-basics{grid-template-columns:1fr}}
