:root{color:#111827;background:#f8fafc;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-synthesis:none;text-rendering:optimizeLegibility}*{box-sizing:border-box}body{margin:0;min-width:320px;min-height:100vh}button,input,select,textarea{font:inherit}input[readonly]{background:#f8fafc;color:#475569;font-weight:650}button{border:1px solid #cbd5e1;border-radius:6px;background:#fff;color:#0f172a;min-height:38px;padding:8px 11px;display:inline-flex;align-items:center;justify-content:center;gap:7px;cursor:pointer}button:hover{border-color:#64748b}main{min-height:100vh}.topbar{background:#fff;border-bottom:1px solid #e2e8f0;min-height:78px;padding:14px 20px;display:flex;align-items:center;justify-content:space-between;gap:18px}.topbar h1{margin:0;font-size:22px;line-height:1.2}.topbar p{margin:4px 0 0;color:#475569;font-size:14px}.status-row,.actions,.toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.pill{min-height:32px;border-radius:999px;border:1px solid #cbd5e1;padding:5px 10px;color:#334155;background:#fff;display:inline-flex;align-items:center;gap:6px;font-size:13px}.pill.ok{border-color:#99f6e4;background:#f0fdfa;color:#115e59}.pill.warn{border-color:#fed7aa;background:#fff7ed;color:#9a3412}.icon-button{width:38px;padding:0}.workspace{display:grid;grid-template-columns:minmax(250px,300px) minmax(420px,1fr);gap:0;min-height:calc(100vh - 78px)}.sidebar{background:#f1f5f9;padding:16px;border-right:1px solid #e2e8f0;overflow:auto}.content{padding:18px;overflow:auto}.login-panel{min-height:calc(100vh - 78px);display:grid;place-items:center;padding:18px}h2{margin:18px 0 10px;font-size:16px}.toolbar button{flex:1 1 120px}.draft-list{display:grid;gap:8px}.draft-item{min-height:58px;width:100%;display:grid;grid-template-columns:1fr auto;justify-items:start;align-items:center;text-align:left;column-gap:8px}.draft-item span{font-weight:650;grid-column:1}.draft-item small,.muted{color:#64748b}.draft-item small{grid-column:1}.status-badge{grid-column:2;grid-row:1 / span 2;border-radius:999px;border:1px solid #cbd5e1;padding:4px 8px;font-size:12px;font-style:normal;font-weight:650;color:#334155;background:#fff}.status-sent{border-color:#99f6e4;background:#f0fdfa;color:#115e59}.status-ready,.status-syncing{border-color:#bfdbfe;background:#eff6ff;color:#1d4ed8}.status-error{border-color:#fecaca;background:#fef2f2;color:#991b1b}.empty-state{border:1px dashed #94a3b8;border-radius:8px;padding:28px;background:#fff}.form-head{display:flex;align-items:end;justify-content:space-between;gap:14px;margin-bottom:14px}.form-head label{display:block;font-size:13px;color:#475569;margin-bottom:5px}select,input,textarea{width:100%;border:1px solid #cbd5e1;border-radius:6px;background:#fff;min-height:38px;padding:8px 10px}textarea{min-height:88px;resize:vertical}.primary{background:#0f766e;border-color:#0f766e;color:#fff}.danger{color:#991b1b}.notice{border:1px solid #bbf7d0;background:#f0fdf4;color:#166534;border-radius:6px;padding:8px 10px;display:flex;align-items:center;gap:7px}.error-box{border:1px solid #fecaca;background:#fef2f2;color:#991b1b;border-radius:6px;padding:8px 10px;display:flex;align-items:center;gap:7px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(220px,1fr));gap:14px}.field{border:1px solid #e2e8f0;border-radius:8px;padding:12px;background:#fff}label.field{display:grid;gap:7px}.field span,.field legend{color:#334155;font-size:13px;font-weight:650}.field.wide{grid-column:1 / -1}.choice-row{display:flex;flex-wrap:wrap;gap:8px}.choice{min-height:34px;padding:6px 9px;display:inline-flex;align-items:center;gap:6px;border:1px solid #cbd5e1;border-radius:999px;background:#f8fafc}.choice input{width:auto;min-height:0}.input-with-unit{display:grid;grid-template-columns:1fr auto;align-items:center;gap:8px}.input-with-unit em{color:#64748b;font-style:normal;font-size:13px}@media(max-width:1120px){.workspace{grid-template-columns:260px 1fr}}@media(max-width:760px){.topbar,.form-head{align-items:stretch;flex-direction:column}.workspace,.form-grid{grid-template-columns:1fr}.sidebar{border-left:0;border-right:0}}.tabs{display:flex;gap:8px;flex-wrap:wrap;padding:12px 20px;background:#fff;border-bottom:1px solid #e2e8f0}.global-message{margin:12px 20px}.template-list,.office-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr));gap:14px;margin:18px 0}.template-card,.editor,.field-config{border:1px solid #d6dee8;background:#fff;border-radius:10px;padding:18px;overflow-wrap:anywhere}.template-card h3{margin:0 0 8px}.editor{margin-top:24px}.editor-fields{border:0;padding:0;min-width:0}.editor-fields>label{display:block;margin:16px 0}.field-config{margin:14px 0;background:#f8fafc}.config-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.config-grid label{display:grid;gap:6px}.config-grid .check{display:flex;align-items:center}.check input{width:20px}.field>label{display:block;font-size:14px;font-weight:600;margin-bottom:8px}.field fieldset{border:0;padding:0;margin:0;min-width:0}.field legend{margin-bottom:8px}.field.invalid{border-color:#dc2626}.field-error{display:block;color:#991b1b;margin-top:8px}button:disabled{opacity:.55;cursor:not-allowed}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #0d9488;outline-offset:2px}.draft-item{grid-template-columns:1fr}.draft-item .status-badge{grid-column:1;grid-row:auto;margin-top:6px}.form-section{margin-bottom:22px}.field{min-width:0}@media(max-width:760px){.config-grid{grid-template-columns:1fr}.editor,.field-config{padding:12px}.actions button{min-height:44px}.tabs{padding:10px}}:root{--ink: #213344;--blue: #006b9b;--line: #dce2e7;--canvas: #f4f6f8;--gutter: clamp(1rem, 2.5vw, 2rem);color:var(--ink);background:var(--canvas);font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}main{background:var(--canvas)}.topbar{min-height:76px;padding:.75rem var(--gutter);background:#fff;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:1rem;flex-shrink:0}.brand img{width:145px;height:auto}.brand h1{font-size:1rem;letter-spacing:-.025em;padding-left:1rem;border-left:1px solid var(--line)}.status-row{font-size:.8125rem;gap:.5rem;justify-content:flex-end}.status-row>span:not(.pill){max-width:15rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}button{min-height:36px;padding:.5rem .75rem;border-radius:5px;border-color:#ced8e0;color:var(--ink);font-size:.875rem;font-weight:500;line-height:1.3}button:enabled:hover{border-color:#81abc3;background:#f0f7fb}button.primary{background:var(--blue);border-color:var(--blue);color:#fff}button.primary:enabled:hover{background:#00547c;border-color:#00547c}button.danger{color:#a62e2e}.pill{min-height:26px;padding:.25rem .5rem;font-size:.75rem}:where(button,input,select,textarea):focus-visible{outline:2px solid #008bc7;outline-offset:3px}.tabs{padding:0 var(--gutter);gap:1.5rem;background:#fff;border-bottom:1px solid var(--line)}.tabs button{min-height:46px;border:0;border-bottom:2px solid transparent;border-radius:0;padding:.65rem 0;background:transparent;color:#546676}.tabs button.primary{background:transparent;color:var(--blue);border-color:var(--blue);font-weight:600}.tabs button:enabled:hover{background:transparent;color:var(--blue)}.tabs .pill{align-self:center}.workspace{max-width:1240px;margin:0 auto;padding:1.5rem var(--gutter);grid-template-columns:250px minmax(0,1fr);gap:1.5rem;min-height:auto;align-items:start}.workspace>.content{padding:0;overflow:visible;min-width:0}main>.content{max-width:1240px;padding:1.5rem var(--gutter);margin:auto}h2,h3{color:var(--ink);line-height:1.35;letter-spacing:-.02em}h2{font-size:1.125rem}h3{font-size:1rem}.sidebar,.template-card,.editor,.form-section{padding:1.125rem;background:#fff;border:1px solid var(--line);border-radius:6px;box-shadow:none}.sidebar h2{margin:0 0 .75rem;font-size:.875rem}.sidebar h2:not(:first-child){margin-top:1.5rem}.toolbar{display:grid;gap:.5rem}.toolbar button{justify-content:flex-start;text-align:left}.form-choices button{gap:.65rem}.form-choices svg{color:var(--blue);flex:none;width:19px;height:19px}.draft-list{gap:.5rem}.draft-item{min-width:0;text-align:left;padding:.65rem .75rem}.draft-item small{font-size:.8125rem}.draft-list>p{margin:.25rem 0;color:#647485;font-size:.875rem}.status-badge{font-size:.75rem;padding:.2rem .45rem}.workspace.overview{display:flex;flex-direction:column;gap:1.5rem}.overview>.content{order:-1;width:100%}.overview>.sidebar{width:100%}.welcome{margin-bottom:1.5rem}.welcome h2{margin:0;font-size:1.5rem;font-weight:650;letter-spacing:-.035em}.welcome p{margin:.4rem 0 0;color:#627283;font-size:.875rem;line-height:1.5;max-width:65ch}.overview .content>h2{font-size:.875rem;font-weight:600;margin:0 0 .75rem}.overview .form-choices{grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem}.overview .form-choices button{padding:1rem;background:#fff;min-height:64px;border-left:3px solid #009cde}.overview .form-choices button:enabled:hover{background:#f0f8fd;border-color:#75adc9}.overview .draft-list{grid-template-columns:repeat(auto-fit,minmax(min(100%,16rem),1fr))}.form-head{display:flex;align-items:center;flex-wrap:wrap;gap:.75rem;margin-bottom:1rem}.form-head h2,.template-card h3{margin:0}.form-head p{color:#627283;font-size:.875rem;margin:.3rem 0 0;line-height:1.5}.form-head small{display:inline-block;margin-top:.3rem}.form-head .actions{gap:.5rem}.form-section{margin-bottom:1rem}.form-section h2{margin:0 0 1rem;font-size:1rem}.form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem 1.25rem}.field{min-width:0;margin:0;padding:0;border:0;background:transparent;border-radius:0}.field>label,.field span,.field legend,.config-grid label{font-size:.875rem;font-weight:500}.field>label{margin-bottom:.4rem}input,select,textarea{min-height:38px;border:1px solid #c5d0d9;border-radius:5px;padding:.5rem .625rem;color:var(--ink);background:#fff;font-size:1rem}textarea{min-height:80px}.choice{border-radius:5px;font-size:.875rem;min-height:36px}.choice input,.check input{min-height:0;accent-color:var(--blue)}.field.invalid input,.field.invalid textarea,.field.invalid select{border-color:#b93030}.template-list,.office-list{gap:.875rem;margin:1rem 0}.template-card p{font-size:.875rem;color:#627283;line-height:1.5}.editor{margin-top:1.5rem}.field-config{padding:1rem;margin:.75rem 0;border-color:var(--line);border-radius:5px;background:#f7f9fb}.field-config .form-head{padding:0 0 .75rem;border-bottom:1px solid var(--line)}.field-config .form-head strong{font-size:.875rem}.editor-fields>label{font-size:.875rem}.notice,.error-box{font-size:.875rem;line-height:1.5;border-radius:5px}.empty-state{background:#fff;border:1px solid var(--line);border-radius:6px;padding:1.75rem}.empty-state h2{margin:0 0 .75rem;font-size:1.375rem}.empty-state p{line-height:1.5;color:#627283;font-size:.875rem}.login-panel{min-height:calc(100svh - 76px)}.login-panel .empty-state{width:min(100%,25rem);padding:1.75rem;border-top:3px solid #009cde;box-shadow:0 8px 28px #2033440a}.login-panel .primary{width:100%;margin-top:.5rem;min-height:42px}@media(min-width:1440px){.topbar,.tabs{padding-left:max(var(--gutter),calc((100vw - 1240px) / 2 + var(--gutter)));padding-right:max(var(--gutter),calc((100vw - 1240px) / 2 + var(--gutter)))}}@media(max-width:760px){.topbar{align-items:stretch;gap:.75rem}.brand img{width:125px}.status-row{justify-content:flex-start}.status-row button{min-height:40px}.tabs{gap:1rem;flex-wrap:nowrap;overflow-x:auto}.tabs button{white-space:nowrap;flex-shrink:0}.workspace{grid-template-columns:minmax(0,1fr);padding-top:1rem;gap:1rem}.workspace.overview{gap:1rem}.overview .form-choices{grid-template-columns:minmax(0,1fr);gap:.5rem}.overview .form-choices button{min-height:48px;padding:.75rem}.welcome{margin-bottom:1.25rem}.welcome h2{font-size:1.375rem}.form-grid,.config-grid{grid-template-columns:minmax(0,1fr)}.form-head{align-items:stretch}.actions button{min-height:42px}}
