/* Push messages (list + editor). Uses the variables from index.html. */
.p-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.p-head h1 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.p-head p { color: var(--muted); margin-top: 4px; }
.p-head .spacer { flex: 1; }
a.btn { text-decoration: none; }
.f textarea { font: inherit; }
.p-back { color: var(--yellow); font-weight: 600; text-decoration: none; white-space: nowrap; }
.p-back:hover { text-decoration: underline; }

/* List */
.p-tools { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.p-tools .search { width: 260px; margin-left: auto; }
.p-table { width: 100%; border-collapse: collapse; }
.p-table th { text-align: left; color: var(--muted); font-size: 13px; font-weight: 600; padding: 14px 12px; text-transform: none; }
.p-table td { padding: 14px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.p-table tr[data-id] { cursor: pointer; }
.p-table tr[data-id]:hover td { background: #171717; }
.p-table .thumb { width: 64px; height: 36px; border-radius: 8px; background: var(--card2); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-table .thumb img { width: 64px; height: 36px; object-fit: cover; }
.p-table .thumb img.logo { width: 22px; height: 22px; object-fit: contain; }
.p-msg b { display: block; font-weight: 600; color: var(--yellow); }
.p-msg small { color: var(--muted); display: block; max-width: 300px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-table td.nowrap { white-space: nowrap; color: var(--soft); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: var(--card2); white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--neutral); }
.pill.sent::before { background: var(--good); } .pill.scheduled::before { background: var(--yellow); }
.pill.sending::before { background: var(--warn); } .pill.failed::before { background: #FF7A6B; }
.p-total { color: var(--muted); font-size: 14px; padding: 14px 12px 0; }
.p-empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.p-empty b { display: block; color: #fff; font-size: 18px; margin-bottom: 6px; }

/* Editor */
.p-edit { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 22px; align-items: start; }
.p-col { display: grid; gap: 18px; min-width: 0; }
.p-side { position: sticky; top: 20px; display: grid; gap: 18px; }
.p-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.p-card > h2 { font-size: 18px; font-weight: 700; padding: 20px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.p-card > h2 .grow { flex: 1; }
.p-body { padding: 20px 22px; display: grid; gap: 18px; }
.f { display: grid; gap: 8px; }
.f > label, .f .lab { font-weight: 600; font-size: 14px; display: flex; justify-content: space-between; gap: 10px; }
.f .count { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.f .count.over { color: #FF7A6B; }
.f .hint { color: var(--muted); font-size: 13px; line-height: 1.45; }
.f input[type=text], .f input[type=email], .f input[type=url], .f input[type=datetime-local], .f select, .f textarea {
  width: 100%; min-height: 48px; border-radius: 14px; background: var(--card2); border: 2px solid #2e2e2e; padding: 0 16px; outline: 0; color: #fff; }
.f textarea { padding: 12px 16px; resize: vertical; min-height: 96px; line-height: 1.45; }
.f input:focus, .f select:focus, .f textarea:focus { border-color: var(--yellow); }
.f input:disabled, .f select:disabled, .f textarea:disabled { opacity: .7; }
.f input[type=datetime-local] { color-scheme: dark; }
.f-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pic { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.pic .frame { width: 240px; aspect-ratio: 2 / 1; border-radius: 14px; background: var(--card2) center / cover no-repeat; border: 2px dashed #2e2e2e; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.pic .frame.has { border-style: solid; border-color: transparent; }
.pic .acts { display: grid; gap: 8px; }
.btn.sm { height: 40px; padding: 0 16px; font-size: 14px; }
.btn.line { background: none; color: #fff; box-shadow: 0 0 0 1px #3a3a3a inset; }
.btn.line:hover { box-shadow: 0 0 0 1px #555 inset; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.text-btn { color: var(--yellow); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; }
.text-btn.danger { color: #FF7A6B; font-size: 13px; }
.b-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; padding: 14px; border-radius: 16px; background: #111; border: 1px solid var(--line); }
.b-row .f-link { grid-column: 1 / -1; }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--yellow); margin-top: 2px; flex: none; }
.check b { font-weight: 600; display: block; }
.check span { color: var(--muted); font-size: 13px; }
.reach { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 16px; border-radius: 16px; background: #111; text-align: center; }
.reach small { color: var(--muted); font-size: 13px; display: block; }
.reach b { font-size: 22px; font-weight: 800; display: block; margin-top: 4px; font-variant-numeric: tabular-nums; }
.reach em { font-style: normal; color: var(--muted); font-size: 12px; }

/* Preview */
.pv-tools { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.phone { margin-top: 16px; border-radius: 44px; background: #0a0a0a; padding: 10px; box-shadow: 0 0 0 1px #2a2a2a, 0 30px 60px rgba(0,0,0,.5); }
.screen { border-radius: 36px; min-height: 520px; padding: 16px 14px 30px; background: radial-gradient(120% 80% at 50% 0%, #3b3a1a 0%, #1b1b12 45%, #0d0d0d 100%); color: #fff; }
.sbar { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; padding: 2px 12px 18px; }
.ios .screen { background: radial-gradient(120% 80% at 50% 0%, #4a4a20 0%, #22221a 50%, #0d0d0d 100%); }
.ios .clock { text-align: center; margin: -6px 0 18px; } .ios .clock b { font-size: 58px; font-weight: 300; display: block; line-height: 1; } .ios .clock span { font-size: 14px; opacity: .8; }
.nt { border-radius: 24px; background: rgba(38,38,38,.92); padding: 14px 16px; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.nt .row { display: flex; gap: 12px; align-items: flex-start; }
.nt .ico { width: 38px; height: 38px; border-radius: 50%; background: #000 url(/img/mark.png) center / 56% no-repeat; flex: none; box-shadow: 0 0 0 1px #333; }
.nt .txt { flex: 1; min-width: 0; }
.nt .meta { font-size: 12.5px; color: #bdbdbd; display: flex; gap: 6px; align-items: center; }
.nt .meta .chev { margin-left: auto; opacity: .8; }
.nt .t { font-weight: 700; font-size: 15px; margin-top: 2px; overflow-wrap: anywhere; }
.nt .b { color: #d6d6d6; font-size: 14px; line-height: 1.4; margin-top: 2px; overflow-wrap: anywhere; white-space: pre-wrap; }
.nt.collapsed .t, .nt.collapsed .b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nt .thumb { width: 42px; height: 42px; border-radius: 8px; background: center / cover no-repeat; flex: none; }
.nt .big { margin-top: 12px; aspect-ratio: 2 / 1; border-radius: 16px; background: center / cover no-repeat #222; }
.nt .acts { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.nt .acts span { background: rgba(255,255,255,.1); padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; }
.nt .placeholder { color: #8a8a8a; }
.ios .nt { border-radius: 20px; background: rgba(60,60,52,.78); backdrop-filter: blur(10px); }
.ios .nt .ico { border-radius: 9px; width: 36px; height: 36px; }
.ios .nt .meta { justify-content: space-between; text-transform: none; }
.ios .nt .meta b { font-weight: 600; color: #eee; }
.ios-acts { margin-top: 8px; border-radius: 16px; overflow: hidden; background: rgba(60,60,52,.78); }
.ios-acts span { display: block; padding: 13px 16px; font-size: 15px; border-top: 1px solid rgba(255,255,255,.08); }
.ios-acts span:first-child { border-top: 0; }
.pv-note { color: var(--muted); font-size: 13px; text-align: center; margin-top: 14px; }

/* Send */
.send-box { border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: grid; gap: 12px; }
.btn.wide { width: 100%; justify-content: center; }
.p-msgline { color: var(--muted); font-size: 13px; text-align: center; line-height: 1.5; }
.p-msgline.err { color: #FF7A6B; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stats div { background: #111; border-radius: 14px; padding: 14px; }
.stats small { color: var(--muted); font-size: 13px; }
.stats b { display: block; font-size: 24px; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; }

@media (max-width: 1250px) { .p-edit { grid-template-columns: 1fr; } .p-side { position: static; } }
@media (max-width: 700px) {
  .f-two, .b-row { grid-template-columns: 1fr; }
  .p-tools .search { display: flex; width: 100%; margin-left: 0; }
  .p-table .hide-sm { display: none; }
}
