#email-template-admin { margin-top:26px;min-width:0; }
.ticket-settings-nav { display:flex;gap:8px;flex-wrap:wrap;margin-bottom:18px; }
.email-template-header,.email-template-editor-heading,.email-template-actions,.email-template-preview-heading { display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap; }
.email-template-header { margin-bottom:18px; }
.email-template-header h2 { margin:0;font-size:19px; }
.email-template-header p,.email-template-preview-heading p { margin:7px 0 0;color:var(--muted);font-size:12px;line-height:1.6; }
.email-template-header .heading-actions,.email-template-actions { flex-wrap:wrap; }
.email-template-layout { display:grid;grid-template-columns:minmax(210px,260px) minmax(0,1fr);gap:20px;align-items:start; }
.email-template-list,.email-template-workspace { min-width:0; }
.email-template-list { overflow:hidden; }
.email-template-list h3 { font-size:13px;margin:0;padding:20px;border-bottom:1px solid var(--line); }
.email-template-list-item { display:grid;gap:8px;width:100%;padding:17px 20px;background:#fff;border:0;border-bottom:1px solid var(--line);text-align:left;font:inherit;font-size:12px;color:var(--muted);overflow-wrap:anywhere;cursor:pointer; }
.email-template-list-item:hover { background:#f6faff; }
.email-template-list-item.selected { background:var(--blue-soft);box-shadow:inset 3px 0 var(--blue); }
.email-template-list-item strong { color:var(--ink); }
.email-template-list-item span { font-size:11px; }
.email-template-status[data-active=true] { color:#23734f; }
.email-template-status[data-active=false] { color:#737985; }
.email-template-list-empty { padding:18px 20px;font-size:12px;line-height:1.6;color:var(--muted);margin:0; }
.email-template-editor,.email-template-preview-card { min-width:0;padding:22px;margin-bottom:20px; }
.email-template-editor h3,.email-template-preview-card h3 { margin:0;font-size:15px; }
.email-template-editor-heading { margin-bottom:20px; }
.email-template-dirty { padding:4px 7px;background:#fff3db;color:#815c17;border-radius:4px;font-size:10px; }
.email-template-dirty[hidden] { display:none; }
.email-template-form-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px; }
.email-template-field { display:grid;gap:7px;margin:0 0 16px;min-width:0;font-size:12px;font-weight:600; }
.email-template-field .form-input { width:100%;min-width:0;font-weight:400; }
.email-template-field textarea { resize:vertical;line-height:1.7; }
.email-template-color { display:flex;gap:9px;min-width:0; }
.email-template-color input[type=color] { width:44px;height:40px;padding:3px;flex:0 0 44px;background:#fff;border:1px solid var(--line);border-radius:6px;cursor:pointer; }
.email-template-color .form-input { min-width:0; }
.email-template-active { display:flex;align-items:center;gap:8px;margin:18px 0;font-size:12px;line-height:1.5; }
.email-template-tokens { margin:18px 0;border:1px solid var(--line);border-radius:8px;background:#f8fbfe; }
.email-template-tokens summary { padding:13px 15px;color:var(--blue-dark);font-size:12px;font-weight:600;cursor:pointer; }
.email-template-tokens p { margin:0;padding:0 15px 13px;font-size:12px;color:var(--muted);line-height:1.6; }
.email-template-token-list { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;padding:0 14px 14px; }
.email-template-token-list button { display:grid;gap:5px;min-width:0;padding:10px 12px;text-align:left;background:#fff;border:1px solid #d6e4f1;border-radius:6px;cursor:pointer; }
.email-template-token-list code { font-size:11px;color:var(--blue-dark);overflow-wrap:anywhere; }
.email-template-token-list span { font-size:10px;color:var(--muted); }
.email-template-token-list button:hover { border-color:var(--blue); }
.email-template-actions { justify-content:flex-start;margin-top:18px; }
.email-template-delete { padding:15px;margin-top:18px;border:1px solid #f0c5bc;background:#fff5f1;border-radius:7px; }
.email-template-delete p { font-size:12px;line-height:1.6;margin:0 0 12px; }
.email-template-delete .heading-actions { flex-wrap:wrap; }
.email-template-preview-heading { display:block;margin-bottom:17px; }
.email-template-subject { padding:13px 15px;background:#f5f8fc;border:1px solid var(--line);border-radius:6px;margin-bottom:16px;font-size:12px;line-height:1.7;overflow-wrap:anywhere; }
.email-template-preview { min-width:0;overflow-wrap:anywhere; }
.email-template-preview>div { max-width:100%; }
.email-template-empty { text-align:center;padding:32px 22px;color:var(--muted);font-size:13px;line-height:1.7; }
.email-template-empty h3 { color:var(--ink);font-size:16px;margin:0 0 8px; }
.email-template-empty p { margin:0; }
.email-template-feedback:empty { display:none; }
.email-template-feedback .form-error,.email-template-feedback .notice { margin:0 0 16px; }
.email-template-list-item:focus-visible,.email-template-token-list button:focus-visible,.email-template-tokens summary:focus-visible { outline:2px solid var(--blue);outline-offset:-3px; }
.modal.email-template-modal { width:min(100%,1100px); }
.email-composer-columns { display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;align-items:start; }
.email-composer-fields { display:grid;gap:16px;min-width:0; }
.email-composer-fields .service-field { margin:0; }
.email-composer-fields .form-input { max-width:100%; }
.email-template-editor textarea.form-input,.email-composer-fields textarea.form-input { height:auto;min-height:90px;resize:vertical;line-height:1.7; }
.email-template-editor textarea[name=body],.email-composer-fields textarea[name=body] { min-height:220px; }
.email-composer-apply { margin:16px 0 22px; }
.email-composer-preview { min-width:0;overflow-wrap:anywhere; }
.email-composer-apply,.email-composer-actions { display:flex;align-items:center;gap:10px;flex-wrap:wrap; }
.email-composer-context { margin:0 0 18px;color:var(--muted);font-size:12px;line-height:1.7;overflow-wrap:anywhere; }
[data-email-error]:empty { display:none; }
[data-note-template-tools] { margin:12px 0; }
[data-note-template-tools][hidden] { display:none; }
@media(max-width:1000px) { .email-template-layout { grid-template-columns:minmax(180px,220px) minmax(0,1fr);gap:14px; } .email-template-token-list { grid-template-columns:minmax(0,1fr); } }
@media(max-width:700px) { .email-template-layout,.email-template-form-grid,.email-composer-columns { grid-template-columns:minmax(0,1fr); } .email-template-list { max-height:270px;overflow:auto; } .email-template-editor,.email-template-preview-card { padding:17px; } .email-template-header>.heading-actions { width:100%; } .email-template-header .button,.email-template-actions .button { flex:1; } .email-template-actions { align-items:stretch; } .email-composer-columns { gap:20px; } .email-composer-apply .button,.email-composer-actions .button { flex:1 1 auto; } }
