/* push.css — pushService dashboard page-specific styles */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --dark:   #0D0F14;
  --mid:    #161920;
  --card:   #1C2030;
  --border: #2A2E3F;
  --text:   #E8EAF0;
  --muted:  #7A8099;
  --accent: #4F8EF7;
  --green:  #4CAF82;
  --gold:   #C8A45A;
  --red:    #E05C5C;
}

body {
  background: var(--dark);
  color: var(--text);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  padding: 32px 24px;
  max-width: 1020px;
  margin: 0 auto;
}

/* ── Shared typography helpers ── */
.section-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.section-sub {
  font-size: .84rem;
  color: var(--muted);
  margin-bottom: 16px;
}

.req { color: var(--red); }

/* ── Monospace ── */
.mono {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: .78rem;
  color: var(--accent);
}

/* ── Form helpers ── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}

@media (max-width: 620px) {
  .form-grid { grid-template-columns: 1fr; }
}

.form-field { display: flex; flex-direction: column; gap: 4px; }
.form-field--wide { grid-column: 1 / -1; }

.field-hint {
  font-size: .74rem;
  color: var(--muted);
  line-height: 1.4;
}

.form-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.form-row .ux-input { flex: 1; min-width: 0; }

/* ── Status messages ── */
.form-status {
  font-size: .82rem;
  color: var(--muted);
}

.form-status--error   { color: var(--red);   }
.form-status--success { color: var(--green);  }
.form-status--warn    { color: var(--gold);   }
.form-status--muted   { color: var(--muted);  }

/* ── Card ── */
.ux-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px;
}

/* ── Action cell (table) ── */
.action-cell {
  display: flex;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
}

/* ── Key reveal box ── */
.key-reveal {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: .8rem;
  color: var(--green);
  background: rgba(76, 175, 130, .08);
  border: 1px solid rgba(76, 175, 130, .25);
  border-radius: 6px;
  padding: 12px 16px;
  word-break: break-all;
  line-height: 1.6;
  user-select: all;
}

/* ── Modals ── */
.push-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 16px;
}

.push-modal-inner {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
}

.push-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.push-modal-title {
  font-size: 1rem;
  font-weight: 600;
}

.push-modal-close {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color .15s;
}

.push-modal-close:hover { color: var(--text); }

/* ── Link helper ── */
.ux-link {
  color: var(--accent);
  text-decoration: none;
  font-size: .85rem;
}

.ux-link:hover { text-decoration: underline; }

/* ── Tenant select row ── */
.tenant-select-row .ux-label {
  font-size: .82rem;
  color: var(--muted);
}

/* ── Responsive ── */
@media (max-width: 480px) {
  body { padding: 16px 12px; }
  .push-modal-inner { padding: 16px; }
  .action-cell { flex-wrap: wrap; }
}

/* ── Header tenant switcher ── */
.header-tenant-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-tenant-select {
  font-size: .8rem;
  padding: 5px 10px;
  max-width: 220px;
}

/* ── Role badge ── */
.role-badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--border);
  color: var(--muted);
  white-space: nowrap;
  text-transform: uppercase;
}

.role-badge--admin  { background: rgba(200,164,90,.18);  color: var(--gold);  }
.role-badge--owner  { background: rgba(79,142,247,.18);  color: var(--accent);}
.role-badge--agency { background: rgba(76,175,130,.18);  color: var(--green); }
.role-badge--editor { background: rgba(248,248,255,.10); color: var(--text);  }

/* ── Send tab: audience picker ── */
.send-audience-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.send-radio-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: .88rem;
}

.send-audience-input {
  font-size: .84rem;
}

.send-audience-textarea {
  font-size: .82rem;
  resize: vertical;
  min-height: 80px;
}

/* ── Send progress bar ── */
.send-progress-bar-wrap {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.send-progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width .3s ease;
}

/* ── Alert variants ── */
.ux-alert-success {
  border-color: rgba(76,175,130,.4);
  background: rgba(76,175,130,.08);
  color: var(--green);
}
