:root{--bg: #0c0e14;--surface: #141822;--surface2: #1a2030;--border: #2a3348;--text: #e8ecf4;--muted: #8b95ab;--accent: #e63946;--accent-dim: #b82d38;--ok: #3dd68c;--warn: #f4a261;--radius: 10px;font-family:DM Sans,system-ui,sans-serif;color:var(--text);background:var(--bg);line-height:1.5}*{box-sizing:border-box}body{margin:0;min-height:100vh}#root{min-height:100vh}button,input,select,textarea{font:inherit}button{cursor:pointer;border:none;border-radius:var(--radius);padding:.55rem 1rem;background:var(--surface2);color:var(--text);border:1px solid var(--border);transition:background .15s,border-color .15s}button:hover:not(:disabled){background:#222a3d;border-color:#3d4a66}button:disabled{opacity:.45;cursor:not-allowed}button.primary{background:var(--accent);border-color:var(--accent);color:#fff;font-weight:600}button.primary:hover:not(:disabled){background:var(--accent-dim);border-color:var(--accent-dim)}button.ghost{background:transparent}input,select,textarea{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);color:var(--text);padding:.5rem .75rem;width:100%}textarea{resize:vertical;min-height:120px;font-family:ui-monospace,Cascadia Code,monospace;font-size:.85rem;line-height:1.45}.app-shell{max-width:1200px;margin:0 auto;padding:1.25rem 1.5rem 2rem}.header{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1.25rem;flex-wrap:wrap}.brand{display:flex;align-items:baseline;gap:.5rem}.brand h1{margin:0;font-size:1.35rem;font-weight:700;letter-spacing:-.02em}.brand span{color:var(--muted);font-size:.85rem}.tabs{display:flex;gap:.35rem;background:var(--surface);padding:.25rem;border-radius:calc(var(--radius) + 4px);border:1px solid var(--border)}.tabs button{border:none;background:transparent;padding:.45rem .9rem;font-weight:500;color:var(--muted)}.tabs button.active{background:var(--surface2);color:var(--text);box-shadow:0 1px 4px #00000040}.stats-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:.75rem;margin-bottom:1rem}.stat-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:.75rem 1rem}.stat-card strong{display:block;font-size:1.5rem;font-weight:700;line-height:1.2}.stat-card span{color:var(--muted);font-size:.8rem}.panel{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:1rem}.panel h2{margin:0 0 .75rem;font-size:1rem;font-weight:600}.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:1rem}@media (max-width: 900px){.grid-2{grid-template-columns:1fr}}.form-row{display:flex;gap:.75rem;align-items:flex-end;flex-wrap:wrap;margin-bottom:.75rem}.form-row label{display:flex;flex-direction:column;gap:.25rem;font-size:.8rem;color:var(--muted);flex:1;min-width:120px}.table-wrap{overflow:auto;max-height:360px;border:1px solid var(--border);border-radius:var(--radius)}table{width:100%;border-collapse:collapse;font-size:.85rem}th,td{text-align:left;padding:.5rem .65rem;border-bottom:1px solid var(--border)}th{position:sticky;top:0;background:var(--surface2);color:var(--muted);font-weight:500}tr.clickable{cursor:pointer}tr.clickable:hover td{background:#e639460f}tr.selected td{background:#e639461f}.badge{display:inline-block;padding:.15rem .45rem;border-radius:6px;font-size:.72rem;background:var(--surface2);color:var(--muted)}.badge.ok{color:var(--ok);background:#3dd68c1f}.badge.warn{color:var(--warn)}.log-box{background:#0a0c10;border:1px solid var(--border);border-radius:var(--radius);padding:.65rem;font-family:ui-monospace,monospace;font-size:.78rem;max-height:200px;overflow:auto;color:#a8b4cc;white-space:pre-wrap}.actions{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.75rem}.preview-subject{font-weight:600;margin-bottom:.5rem;padding:.5rem .75rem;background:var(--surface2);border-radius:var(--radius);border:1px solid var(--border)}.toast{position:fixed;bottom:1rem;right:1rem;padding:.65rem 1rem;border-radius:var(--radius);background:var(--surface2);border:1px solid var(--border);box-shadow:0 8px 24px #0006;z-index:100;max-width:360px}.toast.error{border-color:var(--accent);color:#ffb4b4}.toast.ok{border-color:var(--ok)}.alert{padding:.65rem .85rem;border-radius:var(--radius);background:#e639461a;border:1px solid rgba(230,57,70,.35);color:#ffc9c9;font-size:.85rem;margin-bottom:.75rem}.audit-preview{max-height:220px;overflow:auto;font-size:.8rem;white-space:pre-wrap;color:var(--muted);background:#0a0c10;padding:.65rem;border-radius:var(--radius);border:1px solid var(--border)}
