:root {
  --bg: #f7f8fa;
  --card: #ffffff;
  --text: #1a2733;
  --muted: #667488;
  --border: #e2e6ea;
  --primary: #0f6e73; /* tom retirado do logo (teal) */
  --primary-dark: #0b5559;
  --accent: #e08a2c; /* tom laranja do logo */
  --danger: #c0392b;
  --radius: 10px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

a { color: var(--primary); }

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

.center-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--primary-dark);
}
.brand img { width: 36px; height: 36px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.card + .card { margin-top: 16px; }

h1 { font-size: 1.5rem; margin: 0 0 4px; }
h2 { font-size: 1.15rem; margin: 0 0 12px; }
p.muted, span.muted { color: var(--muted); font-size: 0.92rem; }

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 12px 0 4px;
  color: var(--text);
}

input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="datetime-local"], textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  background: #fff;
  color: var(--text);
}
textarea { min-height: 80px; resize: vertical; }

button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
  transition: background 0.15s ease;
}
button:hover, .btn:hover { background: var(--primary-dark); }
button.secondary { background: #eef1f3; color: var(--text); }
button.secondary:hover { background: #e2e6ea; }
button.danger { background: var(--danger); }
button.full { width: 100%; margin-top: 16px; }
button:disabled { opacity: 0.6; cursor: not-allowed; }

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}

.lang-switch { display: flex; gap: 4px; }
.lang-switch button {
  background: transparent;
  color: var(--muted);
  padding: 4px 10px;
  font-size: 0.8rem;
}
.lang-switch button.active { background: var(--primary); color: #fff; }

.channel-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.channel-item:last-child { border-bottom: none; }
.channel-item .name { font-weight: 600; }

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge.pending { background: #fff3cd; color: #8a6d00; }
.badge.sent { background: #d7f3e3; color: #1c7a4d; }
.badge.failed { background: #fbdcd7; color: var(--danger); }

.error-box {
  background: #fbdcd7;
  color: var(--danger);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-top: 12px;
}

.qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px;
}

.code-text {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 1.6rem;
  letter-spacing: 4px;
  font-weight: 700;
  color: var(--primary-dark);
}

.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 160px; }

.notification-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.notification-row:last-child { border-bottom: none; }
.notification-row .title { font-weight: 600; }

.channel-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.link-button {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 600;
  padding: 0;
  cursor: pointer;
}
.link-button:hover { text-decoration: underline; background: none; }

@media (max-width: 480px) {
  .row { flex-direction: column; }
}
