:root { --bg: #f4f5f7; --card: #fff; --line: #e6e7eb; --text: #15171a; --sub: #6b7280; --main: #111827; --accent: #8e028b;
        --ok: #0f9d58; --warn: #d97706; --bad: #dc2626; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
       "Malgun Gothic", sans-serif; }
a { color: inherit; }
header { position: sticky; top: 0; z-index: 5; background: var(--main); color: #fff; }
.top { max-width: 760px; margin: 0 auto; display: flex; align-items: center; gap: 6px; padding: 10px 16px; }
.top b { font-size: 16px; margin-right: auto; }
.top a { text-decoration: none; padding: 7px 11px; border-radius: 9px; font-size: 14px; color: #d1d5db; }
.top a.on { background: rgba(255,255,255,.14); color: #fff; }
main { max-width: 760px; margin: 0 auto; padding: 16px 16px 60px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin-bottom: 16px; }
h2 { font-size: 17px; margin: 0 0 14px; }
label { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 6px; }
input[type=text], input[type=password], input[type=tel], input[type=number], input[type=datetime-local], textarea, select {
  width: 100%; border: 1px solid #d5d7dc; border-radius: 10px; padding: 11px 12px; font: inherit; background: #fff; }
textarea { min-height: 90px; resize: vertical; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1 1 160px; }
.chk { display: flex; align-items: center; gap: 8px; font-weight: 500; margin: 6px 0; }
.chk input { width: 20px; height: 20px; }
.seg { display: flex; border: 1px solid #d5d7dc; border-radius: 10px; overflow: hidden; }
.seg label { flex: 1; margin: 0; text-align: center; padding: 10px 0; font-weight: 600; cursor: pointer; }
.seg input { display: none; }
.seg input:checked + span { color: #fff; }
.seg label:has(input:checked) { background: var(--main); color: #fff; }
.btn { display: inline-block; border: 0; border-radius: 12px; padding: 13px 18px; font: inherit; font-weight: 700; color: #fff;
       background: var(--main); cursor: pointer; text-decoration: none; }
.btn.full { width: 100%; margin-top: 16px; font-size: 16px; }
.btn.light { background: #eef0f3; color: #111; }
.btn.small { padding: 7px 11px; font-size: 13px; border-radius: 9px; }
.btn.red { background: #fee2e2; color: var(--bad); }
.hint { color: var(--sub); font-size: 13px; margin-top: 6px; }
.flash { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; border-radius: 12px; padding: 11px 14px; margin-bottom: 14px; }
.stats { display: flex; gap: 10px; flex-wrap: wrap; }
.stat { flex: 1 1 140px; background: #f8f9fb; border-radius: 12px; padding: 12px 14px; }
.stat .n { font-size: 24px; font-weight: 800; }
.stat .l { color: var(--sub); font-size: 13px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { border-top: 1px solid var(--line); padding: 12px 0; display: flex; gap: 10px; align-items: flex-start; }
.list li:first-child { border-top: 0; }
.list .main { flex: 1; min-width: 0; }
.list .t { font-weight: 700; word-break: break-all; }
.list .m { color: var(--sub); font-size: 13px; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 99px; padding: 2px 9px; background: #eef0f3; color: #374151; }
.pill.sent { background: #dcfce7; color: #166534; }
.pill.scheduled { background: #e0f2fe; color: #075985; }
.pill.failed, .pill.fail { background: #fee2e2; color: #991b1b; }
.pill.dry-run { background: #fef3c7; color: #92400e; }
.preview { display: flex; gap: 10px; background: #f1f2f4; border-radius: 14px; padding: 12px; margin-top: 14px; }
.preview img { width: 42px; height: 42px; border-radius: 10px; }
.preview .pt { font-weight: 700; font-size: 14px; }
.preview .pb { font-size: 13px; color: #374151; white-space: pre-wrap; }
.preview .pi { width: 100%; border-radius: 10px; margin-top: 8px; display: none; }
code, .code { background: #f3f4f6; border-radius: 8px; padding: 2px 6px; font-size: 13px; word-break: break-all; }
pre.code { display: block; padding: 12px; white-space: pre-wrap; }
.login { max-width: 360px; margin: 12vh auto 0; }
@media (max-width: 520px) { .top a { padding: 7px 8px; font-size: 13px; } }
