:root{--bg: #0f172a;--panel: #1e293b;--panel-2: #273449;--text: #e2e8f0;--muted: #94a3b8;--accent: #3b82f6;--danger: #ef4444;--border: #334155}*{box-sizing:border-box}body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;background:var(--bg);color:var(--text)}.center{min-height:100vh;display:flex;align-items:center;justify-content:center}.muted{color:var(--muted)}.error{color:#fecaca;background:#ef44441f;border:1px solid rgba(239,68,68,.4);padding:8px 12px;border-radius:8px;font-size:14px}.card{background:var(--panel);border:1px solid var(--border);border-radius:12px;padding:20px 24px}.card h2{margin-top:0}.login-card{width:340px;display:flex;flex-direction:column;gap:14px}.login-card h1{margin:0 0 8px;font-size:22px}label{display:flex;flex-direction:column;gap:6px;font-size:14px;color:var(--muted)}input,select{background:var(--panel-2);border:1px solid var(--border);border-radius:8px;padding:10px 12px;color:var(--text);font-size:14px;outline:none}input:focus,select:focus{border-color:var(--accent)}button{background:var(--accent);color:#fff;border:none;border-radius:8px;padding:10px 16px;font-size:14px;cursor:pointer}button:hover{filter:brightness(1.1)}button:disabled{opacity:.6;cursor:default}button.danger{background:var(--danger)}.layout{display:flex;min-height:100vh}.sidebar{width:240px;background:var(--panel);border-right:1px solid var(--border);display:flex;flex-direction:column;padding:20px 14px}.brand{font-size:18px;font-weight:700;padding:0 10px 18px}.sidebar nav{display:flex;flex-direction:column;gap:4px;flex:1}.nav-item{background:transparent;color:var(--text);text-align:left;padding:10px 12px;border-radius:8px}.nav-item:hover{background:var(--panel-2);filter:none}.nav-item.active{background:var(--accent)}.sidebar-footer{border-top:1px solid var(--border);padding-top:14px;display:flex;flex-direction:column;gap:10px}.user-badge{padding:0 10px}.user-email{font-size:13px}.user-role{font-size:12px;color:var(--muted)}.logout{background:var(--panel-2)}.content{flex:1;padding:28px 32px;overflow:auto}.stack{display:flex;flex-direction:column;gap:20px}.row-form{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.row-form input{flex:1;min-width:160px}.table{width:100%;border-collapse:collapse}.table th,.table td{text-align:left;padding:10px 8px;border-bottom:1px solid var(--border);font-size:14px}.table th{color:var(--muted);font-weight:500}.card label{margin-top:14px}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:14px}.grid2 label{margin-top:0}textarea{background:var(--panel-2);border:1px solid var(--border);border-radius:8px;padding:10px 12px;color:var(--text);font-size:14px;font-family:inherit;resize:vertical;outline:none}textarea:focus{border-color:var(--accent)}label.checkbox{flex-direction:row;align-items:center;gap:8px;color:var(--text);cursor:pointer}label.checkbox input{width:auto}.actions{margin-top:16px;display:flex;gap:10px}button.secondary{background:var(--panel-2)}.success{color:#bbf7d0;background:#22c55e1f;border:1px solid rgba(34,197,94,.4);padding:8px 12px;border-radius:8px;font-size:14px;margin-top:14px}.error{margin-top:14px}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#0009;display:flex;align-items:center;justify-content:center;padding:24px;z-index:50}.modal{background:var(--panel);border:1px solid var(--border);border-radius:12px;width:min(800px,100%);max-height:85vh;display:flex;flex-direction:column}.modal-head{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid var(--border)}.modal-head h3{margin:0}.preview{margin:0;padding:20px;overflow:auto;white-space:pre-wrap;word-break:break-word;font-family:ui-monospace,Cascadia Code,Consolas,monospace;font-size:13px;line-height:1.5;color:var(--text)}.badge{align-self:flex-start;padding:4px 10px;border-radius:999px;font-size:12px;white-space:nowrap;border:1px solid var(--border)}.badge-pending{background:#3b82f626;color:#bfdbfe;border-color:#3b82f666}.badge-sent{background:#22c55e26;color:#bbf7d0;border-color:#22c55e66}.badge-rejected{background:var(--panel-2);color:var(--muted)}.badge-error{background:#ef444426;color:#fecaca;border-color:#ef444466}.stats-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:14px}.stat{background:var(--panel-2);border:1px solid var(--border);border-radius:10px;padding:18px;text-align:center}.stat-value{font-size:30px;font-weight:700;line-height:1}.stat-label{margin-top:8px;font-size:13px;color:var(--muted)}.stat-pending .stat-value{color:#93c5fd}.stat-sent .stat-value{color:#86efac}.stat-error .stat-value{color:#fca5a5}.flags{display:flex;flex-direction:column;gap:10px}.flag{font-size:14px;display:flex;align-items:center;gap:8px}.dot{width:10px;height:10px;border-radius:50%;display:inline-block}.dot-ok{background:#22c55e}.dot-off{background:#6b7280}
