* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: #f3f5f4; color: #1c2b26; }
a { color: #0a7c66; }
h1 { font-size: 24px; margin: 8px 0 16px; }
h2 { font-size: 17px; margin: 0 0 12px; }
code, kbd { background: #e8eeec; padding: 1px 5px; border-radius: 4px; font-size: 13px; }

.top { background: #075e54; color: #fff; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding: 10px 20px; }
.top .brand { color: #fff; font-weight: 700; font-size: 17px; text-decoration: none; }
.top nav { display: flex; flex-wrap: wrap; gap: 4px; }
.top nav a { color: #d6ebe6; text-decoration: none; padding: 6px 12px; border-radius: 6px; }
.top nav a.active, .top nav a:hover { background: rgba(255,255,255,.16); color: #fff; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 20px 16px 60px; }
.card { background: #fff; border: 1px solid #dfe6e3; border-radius: 10px; padding: 18px; margin-bottom: 18px; overflow-x: auto; }
.card.narrow { max-width: 380px; margin: 60px auto; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 18px; }
.muted { color: #6b7d77; }
.right { text-align: right; }

label { display: block; margin-bottom: 12px; font-weight: 600; font-size: 14px; }
label.inline { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
label.inline select { width: auto; margin: 0; }
input, select, textarea { width: 100%; margin-top: 4px; padding: 9px 10px; border: 1px solid #c5d0cc; border-radius: 7px; font: inherit; background: #fff; color: inherit; }
input[type=file] { padding: 6px; }
input:focus, select:focus, textarea:focus { outline: 2px solid #25d366; outline-offset: 0; border-color: #25d366; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0; }
.row input, .row select { width: auto; flex: 1 1 180px; margin: 0; }

.btn { display: inline-block; padding: 9px 16px; border: 1px solid #c5d0cc; border-radius: 7px; background: #fff; color: #1c2b26; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: #eef3f1; }
.btn.primary { background: #0a7c66; border-color: #0a7c66; color: #fff; }
.btn.primary:hover { background: #086654; }
.btn.ok { background: #25d366; border-color: #1fb956; color: #06301a; }
.btn.danger { color: #b3261e; border-color: #e3b5b1; }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn.big { padding: 12px 22px; font-size: 16px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #e8eeec; vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #6b7d77; }
td.pre { white-space: pre-wrap; max-width: 480px; }
td.actions form { display: inline; }
td.actions { white-space: nowrap; }

.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; background: #dff5e6; border: 1px solid #a9dfba; }
.flash.err { background: #fde8e6; border-color: #f0b8b3; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: #fff; border: 1px solid #dfe6e3; border-radius: 10px; padding: 14px; }
.stat b { display: block; font-size: 26px; }
.stat span { color: #6b7d77; font-size: 13px; }

.tag { display: inline-block; padding: 1px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; background: #e8eeec; }
.tag.sent { background: #d3f5df; color: #0b6b34; }
.tag.failed { background: #fde0dd; color: #a3221b; }
.tag.skipped { background: #fff0c9; color: #7a5a00; }

.bar { height: 8px; background: #dfe6e3; border-radius: 8px; margin-bottom: 18px; overflow: hidden; }
#bar-fill { height: 100%; width: 0; background: #25d366; transition: width .3s; }
.current { background: #ece5dd; border-radius: 10px; padding: 14px; margin: 14px 0; }
.who { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.who span + span { font-weight: 400; color: #4d5d58; margin-left: 6px; }
.bubble { background: #dcf8c6; border-radius: 8px; padding: 10px 12px; white-space: pre-wrap; max-width: 520px; word-wrap: break-word; }
