.template-modal{position:fixed;inset:0;z-index:20;display:grid;place-items:center}.template-modal[hidden]{display:none}.template-modal-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.45)}.template-dialog{position:relative;width:min(860px,calc(100% - 32px));max-height:calc(100vh - 40px);overflow:auto;background:#ffffff;border:1px solid #d8e0ea;border-radius:10px;box-shadow:0 24px 60px rgba(15,23,42,.18);color:#111827}.template-dialog-header{display:flex;justify-content:space-between;align-items:center;padding:22px 26px;border-bottom:1px solid #e5e7eb}.template-dialog-header h2{margin:4px 0 0;font-size:20px;color:#111827}.template-editor{display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:35px;padding:26px}.template-fields{display:grid;gap:16px}.template-fields label{display:grid;gap:7px;color:#334155;font-size:12px;font-weight:500}.template-fields input,.template-fields select,.template-fields textarea{width:100%;padding:11px 12px;border:1px solid #cbd5e1;border-radius:6px;background:#ffffff;color:#111827;font:inherit}.template-fields textarea{min-height:150px;resize:vertical}.template-fields small{color:#4b5563}.template-form-actions{display:flex;justify-content:flex-end;gap:10px}.phone-preview{text-align:center;color:#4b5563;font-size:11px}.phone-frame{width:220px;height:410px;margin:auto;padding:10px;border:7px solid #334155;border-radius:28px;background:#1e293b;box-shadow:0 12px 28px rgba(15,23,42,.15)}.phone-speaker{width:58px;height:5px;margin:2px auto 9px;border-radius:4px;background:#64748b}.phone-screen{height:360px;padding:12px 9px;border-radius:17px;background:#f8fafc;text-align:left}.phone-status{text-align:center;color:#4b5563;font-size:10px;margin-bottom:120px}.phone-bubble{max-width:90%;padding:10px 12px;border-radius:14px 14px 3px 14px;background:#dcfce7;color:#111827;border:1px solid #bbf7d0;font-size:12px;line-height:1.5;margin-left:auto;word-break:break-word}.phone-screen img{display:block;max-width:90%;max-height:180px;margin:10px 0 0 auto;border-radius:8px}@media(max-width:700px){.template-editor{grid-template-columns:1fr}.phone-preview{order:-1}.phone-frame{transform:scale(.85);transform-origin:top center;margin-bottom:-50px}}
