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

:root {
  --green: #25d366;
  --green-strong: #128c7e;
  --green-deep: #0b6f63;
  --green-soft: #e7f9ef;
  --teal-soft: #e8f7f4;
  --slate-900: #0f172a;
  --slate-800: #1f2937;
  --slate-600: #475569;
  --slate-400: #94a3b8;
  --bg-1: #eef7f2;
  --bg-2: #f5f7fb;
  --bg-3: #edf5f1;
  --surface: rgba(255, 255, 255, 0.74);
  --surface-strong: rgba(255, 255, 255, 0.88);
  --surface-soft: rgba(255, 255, 255, 0.56);
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(18, 140, 126, 0.18);
  --text: #0f172a;
  --text-muted: #64748b;
  --danger: #dc2626;
  --warning: #d97706;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-panel: 0 28px 70px rgba(12, 38, 33, 0.10);
  --shadow-item: 0 12px 30px rgba(15, 23, 42, 0.05);
  --focus-ring: 0 0 0 4px rgba(37, 211, 102, 0.18);
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(18, 140, 126, 0.08), transparent 24%),
    linear-gradient(145deg, var(--bg-1) 0%, var(--bg-2) 48%, var(--bg-3) 100%);
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.34) 0 1px, transparent 1px 24px),
    linear-gradient(45deg, rgba(18, 140, 126, 0.03) 0 1px, transparent 1px 26px);
  background-size: 24px 24px, 26px 26px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent 85%);
  opacity: 0.55;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.04) 100%),
    linear-gradient(90deg, rgba(12, 38, 33, 0.04), transparent 30%, transparent 70%, rgba(12, 38, 33, 0.04));
  opacity: 0.7;
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  color: #fff;
  background: linear-gradient(135deg, rgba(8, 61, 53, 0.86), rgba(18, 140, 126, 0.84));
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 40px rgba(10, 44, 38, 0.22);
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  min-height: 74px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.brand-lockup {
  min-width: 0;
}

.brand-compact {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 108px;
  height: auto;
  display: block;
  flex-shrink: 0;
}

.brand-logo-small {
  width: 92px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-name {
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.05;
  color: inherit;
}

.brand-subtitle {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.25;
  color: inherit;
  opacity: 0.76;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.badge-loading {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.badge-connected {
  background: rgba(231, 249, 239, 0.98);
  color: var(--green-deep);
  border-color: rgba(37, 211, 102, 0.24);
}

.badge-disconnected {
  background: rgba(254, 226, 226, 0.92);
  color: var(--danger);
  border-color: rgba(220, 38, 38, 0.18);
}

.badge-connecting {
  background: rgba(254, 243, 199, 0.95);
  color: #92400e;
  border-color: rgba(245, 158, 11, 0.18);
}

/* Main layout */
main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 22px 42px;
  position: relative;
  z-index: 1;
}

.app-shell {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.app-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 22px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.62);
  box-shadow: var(--shadow-panel);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--green), rgba(37, 211, 102, 0.15), var(--green-strong));
  opacity: 0.78;
}

.card h2 {
  margin-bottom: 18px;
  font-size: 1.03rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--slate-900);
}

.sidebar {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sidebar-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-kicker,
.context-kicker {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-deep);
}

.sidebar-title {
  font-size: 1.45rem;
  line-height: 1.1;
  color: var(--slate-900);
}

.sidebar-text,
.context-meta,
.summary-line,
.launch-row-subtext {
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.menu-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.48);
  color: var(--slate-900);
  cursor: pointer;
  text-align: left;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.menu-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 211, 102, 0.24);
  box-shadow: var(--shadow-soft);
}

.menu-btn.active {
  border-color: rgba(37, 211, 102, 0.3);
  background: rgba(231, 249, 239, 0.86);
  box-shadow: var(--shadow-item);
}

.menu-btn-label {
  font-size: 0.92rem;
  font-weight: 800;
}

.menu-btn-help {
  font-size: 0.77rem;
  color: var(--text-muted);
}

.sidebar-summary {
  padding-top: 4px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.sidebar-launch-summary {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.context-card-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.context-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.context-card-actions select {
  min-width: min(100%, 280px);
}

.view-section {
  display: block;
}

.panel-grid {
  display: grid;
  gap: 18px;
  align-items: start;
}

.panel-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel-grid-3 {
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.7fr) minmax(320px, 0.95fr);
}

.panel-form,
.feature-card,
.nested-card {
  border-radius: 12px;
  border: 1px solid rgba(18, 140, 126, 0.12);
  background: rgba(255, 255, 255, 0.44);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
}

.panel-form,
.feature-card {
  padding: 18px;
}

.nested-card {
  padding: 22px;
}

.stack-layout,
.info-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feature-card h3 {
  margin-bottom: 8px;
  font-size: 0.96rem;
  color: var(--slate-900);
}

.feature-card p {
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.compact-header h2 {
  font-size: 0.98rem;
}

.action-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(148, 163, 184, 0.18);
  color: var(--slate-800);
}

.status-pending,
.status-dispatching {
  background: rgba(254, 243, 199, 0.94);
  color: #92400e;
}

.status-done,
.status-sent,
.status-connected {
  background: rgba(220, 252, 231, 0.94);
  color: #166534;
}

.status-failed,
.status-canceled,
.status-error,
.btn-danger-soft {
  color: #991b1b;
}

.status-failed,
.status-canceled,
.status-error {
  background: rgba(254, 226, 226, 0.94);
}

.btn-danger-soft {
  border-color: rgba(248, 113, 113, 0.22);
}

.summary-line strong {
  color: var(--slate-900);
}

.empty-state {
  padding: 18px 0;
  color: var(--text-muted);
}

/* QR */
#qr-section {
  text-align: center;
}

#qr-section p {
  margin-bottom: 18px;
  color: var(--text-muted);
}

#qr-container {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.66);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

#qr-img {
  width: 220px;
  height: 220px;
  display: block;
  border-radius: 10px;
}

/* Forms */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--surface-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
  outline: none;
}

textarea {
  resize: vertical;
  min-height: 104px;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(37, 211, 102, 0.48);
  box-shadow: var(--focus-ring);
  background: #fff;
}

input::placeholder,
textarea::placeholder {
  color: var(--slate-400);
}

select {
  appearance: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 18px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease, background 0.16s ease, border-color 0.16s ease;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: none;
}

.btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--green) 0%, #20b462 45%, var(--green-deep) 100%);
  box-shadow: 0 10px 24px rgba(18, 140, 126, 0.22);
}

.btn-secondary {
  color: #fff;
  background: linear-gradient(135deg, #128c7e 0%, #0d766d 100%);
  box-shadow: 0 10px 22px rgba(13, 118, 109, 0.18);
}

.btn-ghost {
  color: var(--slate-800);
  background: rgba(255, 255, 255, 0.52);
  border-color: rgba(148, 163, 184, 0.26);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-header {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: none;
}

.btn-sm {
  padding: 8px 12px;
  font-size: 0.8rem;
}

/* Section headers */
.groups-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.groups-header h2 {
  margin-bottom: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(37, 211, 102, 0.12);
  color: var(--green-deep);
  font-size: 0.72rem;
  font-weight: 800;
}

.groups-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

#search-input,
select {
  min-height: 40px;
}

#search-input {
  width: 220px;
}

/* Launch layout */
.launch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.82fr) minmax(320px, 0.93fr);
  gap: 16px;
  align-items: start;
}

.launch-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.launch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.launch-grid .form-group {
  margin-bottom: 0;
}

.launch-config {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(18, 140, 126, 0.12);
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
}

.launch-config-head,
.launch-config-actions,
.launch-actions,
.schedule-actions,
.schedule-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.launch-config-head h3 {
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--slate-900);
}

.launch-config-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.launch-config-grid .form-group:first-child {
  grid-column: 1 / -1;
}

.launch-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.launch-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.66);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px) saturate(145%);
  -webkit-backdrop-filter: blur(14px) saturate(145%);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.launch-row:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 211, 102, 0.2);
  box-shadow: var(--shadow-item);
}

.launch-row.active {
  border-color: rgba(37, 211, 102, 0.34);
  background: rgba(231, 249, 239, 0.82);
}

.launch-row-main {
  min-width: 0;
  flex: 1;
}

.launch-row-title {
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 4px;
}

.launch-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.launch-row-meta span {
  display: inline-flex;
  align-items: center;
}

.launch-row-subtext {
  margin-top: 8px;
}

.launch-row-actions {
  flex-shrink: 0;
}

/* Schedule */
.schedule-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.schedule-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.schedule-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px) saturate(145%);
  -webkit-backdrop-filter: blur(14px) saturate(145%);
}

.schedule-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.schedule-item-title {
  font-weight: 800;
  color: var(--slate-900);
}

.schedule-item-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.schedule-item-grid .form-group {
  margin-bottom: 0;
}

.schedule-item-grid .form-group:nth-child(5),
.schedule-item-grid .form-group:nth-child(6),
.schedule-item-grid .form-group:nth-child(7),
.schedule-item-grid .form-group:nth-child(8) {
  grid-column: 1 / -1;
}

.schedule-layout {
  align-items: start;
}

.schedule-actions {
  margin-bottom: 16px;
}

/* Groups */
.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.group-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.20);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  user-select: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  backdrop-filter: blur(14px) saturate(145%);
  -webkit-backdrop-filter: blur(14px) saturate(145%);
}

.group-card:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 211, 102, 0.22);
  box-shadow: var(--shadow-item);
}

.group-card.selected {
  border-color: rgba(37, 211, 102, 0.34);
  background: rgba(231, 249, 239, 0.86);
}

.group-check {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.5px solid rgba(148, 163, 184, 0.32);
  background: rgba(255, 255, 255, 0.76);
  flex-shrink: 0;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.group-card.selected .group-check {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-strong) 100%);
  border-color: transparent;
}

.group-card.selected .group-check::after {
  content: "✓";
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
}

.group-info {
  flex: 1;
  min-width: 0;
}

.group-name {
  font-weight: 800;
  font-size: 0.93rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
  color: var(--slate-900);
}

.group-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.group-meta span {
  display: inline-flex;
  align-items: center;
}

.group-desc {
  margin-top: 5px;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--slate-600);
  word-break: break-word;
}

.launch-group-card {
  cursor: default;
}

.launch-group-card .group-check {
  background: rgba(255, 255, 255, 0.5);
}

.launch-group-card.selected .group-check::after {
  content: "Ativo";
  font-size: 0.6rem;
  letter-spacing: 0.02em;
}

/* Tags */
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.tag-announce {
  background: rgba(233, 213, 255, 0.78);
  color: #7c3aed;
}

.tag-locked {
  background: rgba(254, 226, 226, 0.84);
  color: var(--danger);
}

.tag-active {
  background: rgba(220, 252, 231, 0.92);
  color: var(--green-deep);
}

/* Send / status */
.send-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.selected-info {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.progress-wrap {
  margin-top: 16px;
}

.progress-bar-track {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.18);
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green) 0%, var(--green-deep) 100%);
  transition: width 0.28s ease;
}

#progress-text,
#contacts-progress-text {
  margin-top: 8px;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.send-result {
  margin-top: 16px;
  padding: 14px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.45;
}

.send-result.success {
  background: rgba(240, 253, 244, 0.94);
  border: 1px solid rgba(187, 247, 208, 0.92);
  color: #166534;
}

.send-result.partial {
  background: rgba(255, 251, 235, 0.94);
  border: 1px solid rgba(253, 230, 138, 0.92);
  color: #92400e;
}

.send-result.error {
  background: rgba(254, 242, 242, 0.96);
  border: 1px solid rgba(254, 202, 202, 0.96);
  color: #991b1b;
}

/* Loading / errors */
.loading-msg {
  padding: 42px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.error-msg {
  padding: 14px;
  border-radius: 12px;
  background: rgba(254, 242, 242, 0.96);
  border: 1px solid rgba(254, 202, 202, 0.96);
  color: #991b1b;
  font-size: 0.9rem;
}

.hidden {
  display: none !important;
}

/* Login */
.login-page {
  background:
    linear-gradient(160deg, rgba(8, 61, 53, 0.96) 0%, rgba(18, 140, 126, 0.94) 42%, rgba(6, 49, 43, 0.98) 100%);
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(100%, 408px);
  padding: 28px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}

.login-logo {
  display: flex;
  align-items: center;
  margin-bottom: 22px;
  color: var(--green-deep);
  gap: 16px;
}

.login-brand-logo {
  width: 118px;
  background: linear-gradient(135deg, rgba(37, 211, 102, 0.18), rgba(18, 140, 126, 0.10));
  border-radius: 16px;
  padding: 10px 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.36), 0 14px 28px rgba(18, 140, 126, 0.12);
}

.login-btn {
  width: 100%;
}

/* Toast */
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
  max-width: min(90vw, 380px);
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.toast.hidden {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

/* Responsive */
@media (max-width: 1180px) {
  .app-shell,
  .panel-grid-2,
  .panel-grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: static;
  }
}

@media (max-width: 640px) {
  .header-inner {
    min-height: 68px;
    padding: 0 16px;
  }

  main {
    padding: 16px 14px 36px;
    gap: 16px;
  }

  .card {
    padding: 18px;
  }

  .brand-name {
    font-size: 0.98rem;
  }

  .brand-subtitle {
    font-size: 0.72rem;
  }

  .panel-form,
  .nested-card,
  .feature-card {
    padding: 16px;
  }

  .context-card-main,
  .context-card-actions,
  .action-stack {
    width: 100%;
  }

  .context-card-actions .btn,
  .context-card-actions select,
  .action-stack .btn {
    width: 100%;
  }

  .groups-controls {
    width: 100%;
  }

  #search-input {
    width: 100%;
  }

  .launch-grid,
  .launch-config-grid,
  .schedule-item-grid {
    grid-template-columns: 1fr;
  }

  .launch-config-grid .form-group:first-child {
    grid-column: auto;
  }

  .launch-row,
  .group-card {
    flex-direction: column;
  }

  .launch-row-actions,
  .launch-actions,
  .launch-config-actions,
  .schedule-actions {
    width: 100%;
  }

  .launch-actions .btn,
  .launch-config-actions .btn,
  .schedule-actions .btn,
  .schedule-tools .btn {
    width: 100%;
  }

  .send-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .toast {
    left: 14px;
    right: 14px;
    bottom: 14px;
    max-width: none;
  }
}
