:root {
  --bg: #23272a;
  --bg-row: #2c3033;
  --border: #3a3f44;
  --text: #e6e6e6;
  --text-dim: #a0a4a8;
  --purple: #8e7cf0;
  --green: #3ba55d;
  --green-hover: #359154;
  --blue: #3d7ff2;
  --blue-hover: #2f6adb;
  --red: #d64545;
  --red-hover: #b83a3a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.topbar {
  height: 6px;
  background: var(--purple);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 24px 60px;
}

.brand {
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.5px;
  margin: 4px 0 6px;
}

.subtitle {
  color: var(--text-dim);
  margin-bottom: 22px;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
}

.navbar a:hover { color: var(--text); }

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-row);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

th {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text);
}

td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }

.channel-pill {
  color: var(--text);
  font-weight: 600;
}

.streamer-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #23272a;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  margin: 3px 6px 3px 0;
}

.streamer-chip .status {
  color: var(--green);
  font-size: 12px;
  margin-left: 6px;
}

.actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  border-radius: 5px;
  padding: 8px 14px;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  color: white;
}

.btn-green { background: var(--green); }
.btn-green:hover { background: var(--green-hover); }
.btn-blue { background: var(--blue); }
.btn-blue:hover { background: var(--blue-hover); }
.btn-red { background: var(--red); }
.btn-red:hover { background: var(--red-hover); }

.empty-state {
  color: var(--text-dim);
  padding: 30px 16px;
  text-align: center;
}

.new-integration {
  margin-top: 22px;
}

.flash {
  background: #3a3520;
  border: 1px solid #6b5f2a;
  color: #e8d98a;
  padding: 10px 14px;
  border-radius: 5px;
  margin-bottom: 16px;
  font-size: 14px;
}

.form-card {
  background: var(--bg-row);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 24px;
  max-width: 560px;
}

label {
  display: block;
  font-size: 13px;
  color: var(--text-dim);
  margin: 16px 0 6px;
}

label:first-child { margin-top: 0; }

select, textarea, input[type="text"], input[type="password"] {
  width: 100%;
  background: #23272a;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 5px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
}

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

.hint {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 6px;
}

.form-actions {
  margin-top: 22px;
  display: flex;
  gap: 10px;
}

.login-card {
  max-width: 340px;
  margin: 80px auto;
  background: var(--bg-row);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 28px;
}

a.back-link {
  color: var(--text-dim);
  font-size: 13px;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 18px;
}
a.back-link:hover { color: var(--text); }
.dashboard-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    color: #ffffff;
}

.sources-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
}

.source-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #1e1e24;
    padding: 14px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease-in-out, transform 0.1s ease;
    border: 1px solid #2d2d38;
}

.source-item:hover {
    background: #282832;
    transform: translateY(-1px);
}

.source-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #5865f2;
    cursor: pointer;
}

.source-info strong {
    display: block;
    color: #ffffff;
    font-size: 15px;
}

.source-info span {
    display: block;
    color: #a0a0a0;
    font-size: 13px;
    margin-top: 3px;
}

.btn-save {
    background-color: #5865f2;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-save:hover {
    background-color: #4752c4;
}

.navbar {
    background-color: #16161a;
    border-bottom: 1px solid #282830;
    padding: 12px 0;
    width: 100%;
}

.nav-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.nav-link {
    color: #a0a0a0;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    background-color: #1e1e24;
    border: 1px solid #2d2d38;
    transition: all 0.2s ease-in-out;
}

.nav-link:hover {
    color: #ffffff;
    background-color: #282832;
    border-color: #3e3e4d;
}

.nav-link.active {
    color: #ffffff;
    background-color: #5865f2;
    border-color: #5865f2;
    box-shadow: 0 4px 12px rgba(88, 101, 244, 0.3);
}