/* tenant_crm row15: shared Studio materials and the Shop product editor proportions. */
.crmpane.templates .crmwrap,.crmpane.templates .crmsearch,.crmpane.templates .crmrows,.crmpane.templates .crmdet,.crmpane.templates .crmtoday,.crmpane.templates .crmboard{display:none!important}
.tpl-pane{min-width:0;overflow:auto;padding:26px;flex:1;background:var(--paper)}.tpl-pane[hidden]{display:none}
.tpl-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:24px}.tpl-heading h2{font-size:24px;letter-spacing:-.025em;margin:0 0 8px;color:var(--ink)}.tpl-heading p{margin:0;color:var(--muted);font-size:13px;line-height:1.6}.tpl-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.tpl-actions button{white-space:nowrap}
.tpl-layout{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:22px;align-items:start}.tpl-card{border:1px solid var(--line);border-radius:12px;background:var(--card);padding:20px;min-width:0}.tpl-card h3{margin:0 0 10px;font-size:14px;line-height:1.45;color:var(--ink)}.tpl-card p{font-size:12px;line-height:1.7;color:var(--muted);margin:8px 0}.tpl-toolbar{display:flex;gap:10px;align-items:center;margin-bottom:18px}.tpl-toolbar label{flex:1;min-width:0}.tpl-toolbar input{width:100%}.tpl-label{display:block;font-size:12px;font-weight:650;margin-bottom:6px;color:var(--ink)}
.tpl-list{border-top:1px solid var(--line)}.tpl-row{width:100%;border:0;border-bottom:1px solid var(--line);background:transparent;color:var(--ink);display:flex;gap:18px;align-items:center;text-align:left;padding:18px 4px;font:inherit;cursor:pointer}.tpl-row:hover{background:var(--paper2)}.tpl-row>span:first-child{flex:1;min-width:0}.tpl-row strong,.tpl-row small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tpl-row strong{font-size:14px;font-weight:650}.tpl-row small{font-size:12px;color:var(--muted);margin-top:6px}.tpl-row .tpl-arrow{color:var(--muted);font-size:20px}.tpl-badge{display:inline-flex;padding:5px 9px;border-radius:20px;background:var(--paper2);color:var(--muted);font-size:11px;line-height:1.3;font-weight:650;white-space:nowrap}.tpl-approved{color:var(--accent-ink,var(--accent));background:var(--accent-soft)}.tpl-empty{padding:48px 18px;text-align:center}.tpl-empty h3{font-size:19px}.tpl-empty .tpl-actions{justify-content:center;margin-top:20px}.tpl-empty-icon{font-size:32px;margin-bottom:16px;color:var(--accent)}.tpl-notice{padding:12px 14px;background:var(--paper2);border:1px solid var(--line);border-radius:8px;font-size:12px;line-height:1.65;color:var(--ink);overflow-wrap:anywhere}.tpl-muted{font-size:12px;color:var(--muted);line-height:1.65}.tpl-more{margin-top:16px}
.tpl-dialog{z-index:9000;padding:0;border:1px solid var(--line);border-radius:12px;background:var(--card);color:var(--ink);width:min(1220px,calc(100vw - 48px));max-width:none;max-height:calc(100dvh - 48px);box-shadow:0 24px 64px rgba(0,0,0,.28);overflow:hidden}.tpl-dialog::backdrop{background:rgba(10,14,20,.48)}.tpl-shell{display:flex;flex-direction:column;max-height:calc(100dvh - 50px)}.tpl-modal-head{display:flex;gap:18px;align-items:center;padding:17px 22px;border-bottom:1px solid var(--line);flex:none}.tpl-modal-head>div{flex:1;min-width:0}.tpl-modal-head h2{margin:4px 0 0;font-size:18px;line-height:1.4;overflow-wrap:anywhere}.tpl-modal-head small{font-size:11px;color:var(--muted)}.tpl-modal-head button{flex:none}.tpl-edit-scroll{overflow:auto;min-height:0;overscroll-behavior:contain;padding:22px}.tpl-editor-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px;align-items:start}.tpl-fields{display:flex;flex-direction:column;gap:18px}.tpl-field label{display:block;font-size:12px;line-height:1.5;font-weight:650;margin-bottom:6px}.tpl-field input,.tpl-field textarea{width:100%;box-sizing:border-box;font:inherit;font-size:13px;line-height:1.6}.tpl-field textarea{resize:vertical;min-height:100px}.tpl-field textarea[data-part="html"]{font-family:var(--mono,ui-monospace,monospace);font-size:12px}.tpl-field input[data-part="name"]{font-size:16px;font-weight:650}.tpl-field [readonly]{background:var(--paper);color:var(--soft-ink,var(--ink))}.tpl-field-error{color:var(--rose);font-size:12px;min-height:0;margin:5px 0 0}.tpl-field-error:empty{display:none}.tpl-field-hint{margin:5px 0 0;font-size:11px;color:var(--muted)}
.tpl-preview{min-width:0;display:flex;flex-direction:column;gap:14px}.tpl-preview-head{display:flex;gap:12px;align-items:center;justify-content:space-between}.tpl-preview-head h3{margin:0}.tpl-preview-frame{border:1px solid var(--line);border-radius:8px;background:#fff;width:100%;height:340px;box-sizing:border-box}.tpl-preview-text{white-space:pre-wrap;overflow-wrap:anywhere;margin:0;padding:16px;border:1px solid var(--line);border-radius:8px;background:var(--paper);color:var(--ink);font-family:inherit;font-size:13px;line-height:1.7;max-height:340px;overflow:auto}.tpl-preview-subject{font-size:13px;font-weight:650;overflow-wrap:anywhere;padding:12px 0;border-bottom:1px solid var(--line)}.tpl-placeholders{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0}.tpl-placeholder{font-family:var(--mono,ui-monospace,monospace);font-size:11px;padding:5px 8px;border:1px solid var(--line);border-radius:6px;background:var(--paper)}.tpl-samples{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.tpl-samples input{width:100%;box-sizing:border-box}.tpl-approval{border-top:1px solid var(--line);padding-top:16px}.tpl-approval .tpl-actions{margin-top:10px}.tpl-modal-foot{border-top:1px solid var(--line);padding:14px 22px;display:flex;align-items:center;gap:14px;justify-content:space-between;background:var(--card);flex:none}.tpl-modal-foot p{font-size:12px;line-height:1.6;margin:0;flex:1;min-width:0;overflow-wrap:anywhere}.tpl-modal-foot button{flex:none}.tpl-dialog[aria-busy="true"] [data-tpl]:not([data-tpl="close"]){opacity:.6;pointer-events:none}.tpl-dialog:focus-visible,.tpl-pane button:focus-visible{outline:2px solid var(--accent);outline-offset:3px}.tpl-confirm{padding:24px;max-width:480px;margin:auto}.tpl-confirm h3{margin:0 0 12px;font-size:19px}.tpl-confirm p{color:var(--muted);font-size:13px;line-height:1.7}.tpl-confirm .tpl-actions{margin-top:24px}.tpl-approval button[data-emphasis="primary"]{min-height:42px}
:root[data-theme="glass"] .tpl-dialog,:root[data-theme="glass"] .tpl-modal-foot{backdrop-filter:blur(24px)}
@media(max-width:900px){.tpl-layout{grid-template-columns:1fr}.tpl-aside{display:grid;grid-template-columns:1fr 1fr;gap:16px}.tpl-dialog{width:calc(100vw - 32px);max-height:calc(100dvh - 32px)}.tpl-shell{max-height:calc(100dvh - 34px)}}
@media(max-width:640px){.tpl-pane{padding:18px 14px}.tpl-heading{flex-direction:column;gap:14px;margin-bottom:18px}.tpl-heading h2{font-size:22px}.tpl-card{padding:16px}.tpl-aside{display:block}.tpl-editor-grid{grid-template-columns:1fr;gap:20px}.tpl-dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 16px);border-radius:10px}.tpl-shell{max-height:calc(100dvh - 18px)}.tpl-modal-head{padding:13px 14px}.tpl-modal-head h2{font-size:16px}.tpl-edit-scroll{padding:16px 14px}.tpl-modal-foot{padding:12px 14px;align-items:flex-start;flex-wrap:wrap}.tpl-modal-foot p{flex-basis:100%}.tpl-modal-foot .tpl-actions{width:100%;justify-content:flex-end}.tpl-field input,.tpl-field textarea,.tpl-samples input{font-size:16px}.tpl-preview-frame{height:310px}.tpl-row{gap:10px}.tpl-samples{grid-template-columns:1fr}.tpl-dialog .studio-control-button{min-height:40px}.crmpane .crmviews{flex-basis:100%;width:100%;box-sizing:border-box}.crmpane .crmviews .studio-control-button{padding-inline:8px;min-width:0;flex:1;font-size:12px}}

.tpl-modal-head h2{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

.crmpane.templates.company #crmTemplates{display:none!important}

.tpl-placeholder code{font:inherit}.tpl-placeholder small{display:block;margin-top:4px;color:var(--muted);font-family:Manrope,sans-serif;font-size:10px;line-height:1.5}.tpl-row .tpl-updated{font-size:11px}
