:root {
	font-family: Arial, Helvetica, sans-serif;
	color: #e6edf3;
	background: #0d1117;
	--bg: #0d1117;
	--panel: #161b22;
	--panel-2: #0f141b;
	--border: #30363d;
	--muted: #8b949e;
	--blue: #2f81f7;
	--blue-dark: #1f6feb;
	--green: #3fb950;
	--orange: #d29922;
	--red: #f85149;
	--purple: #a371f7;
	--sidebar: 220px;
}

* {
	box-sizing: border-box;
}

html,
body {
	min-height: 100%;
}

body {
	margin: 0;
	background: var(--bg);
}

button,
input,
select {
	font: inherit;
}

a {
	color: #58a6ff;
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

h1,
h2,
p {
	margin-top: 0;
}

h1 {
	margin-bottom: 4px;
	font-size: 26px;
}

h2 {
	margin: 0;
	font-size: 18px;
}

.app-shell {
	min-height: 100vh;
}

.sidebar {
	position: fixed;
	inset: 0 auto 0 0;
	width: var(--sidebar);
	padding: 18px 12px;
	background: #111820;
	border-right: 1px solid #24405f;
	display: flex;
	flex-direction: column;
}

.sidebar-brand {
	padding: 4px 8px 16px;
	border-bottom: 1px solid var(--border);
	color: #79c0ff;
}

.sidebar-brand strong {
	display: block;
	color: #e6edf3;
	font-size: 16px;
}

.sidebar-brand small {
	color: var(--muted);
}

.sidebar-nav {
	display: grid;
	gap: 5px;
	padding-top: 14px;
}

.nav-button {
	width: 100%;
	min-height: 39px;
	border: 1px solid transparent;
	background: transparent;
	color: #c9d1d9;
	display: grid;
	grid-template-columns: 24px 1fr auto;
	align-items: center;
	gap: 8px;
	padding: 7px 9px;
	text-align: left;
	cursor: pointer;
	border-radius: 4px;
}

.nav-button:hover {
	background: #1c2530;
	border-color: #2d455e;
}

.nav-button.add {
	color: white;
	background: #17395d;
	border-color: #2f81f7;
}

.nav-button:disabled {
	opacity: .5;
	cursor: wait;
}

.status-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
}

.status-dot.green {
	background: var(--green);
}

.status-dot.gray {
	background: #6e7681;
}

.sidebar-bottom {
	margin-top: auto;
	display: grid;
	gap: 12px;
}

.side-info {
	border-top: 1px solid var(--border);
	padding: 10px 7px 0;
	display: grid;
	gap: 5px;
	font-size: 12px;
}

.side-info div {
	display: flex;
	justify-content: space-between;
}

.side-info span {
	color: var(--muted);
}

.main-content {
	margin-left: var(--sidebar);
	max-width: 1250px;
	padding: 26px 28px 50px;
}

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

.page-header p {
	margin: 0;
	color: var(--muted);
}

.status-line {
	display: flex;
	gap: 18px;
	flex-wrap: wrap;
	padding: 10px 12px;
	margin-bottom: 14px;
	background: #101820;
	border-left: 3px solid var(--blue);
	color: var(--muted);
	font-size: 13px;
}

.status-line b {
	color: #e6edf3;
}

.panel {
	border: 1px solid var(--border);
	background: var(--panel);
	margin-bottom: 16px;
}

.panel-heading {
	min-height: 48px;
	padding: 10px 12px;
	border-bottom: 1px solid var(--border);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	background: #18212b;
}

.creator-list,
.job-list {
	display: grid;
}

.creator-row,
.job-row {
	padding: 11px 12px;
	border-bottom: 1px solid #252c34;
	display: flex;
	align-items: center;
	gap: 12px;
}

.creator-row:last-child,
.job-row:last-child {
	border-bottom: 0;
}

.creator-info,
.job-info {
	flex: 1;
	min-width: 0;
}

.title-line {
	display: flex;
	align-items: center;
	gap: 7px;
	flex-wrap: wrap;
}

.creator-name,
.job-title {
	font-weight: 700;
}

.job-title {
	display: inline-block;
	margin-top: 6px;
}

.small-text {
	margin: 5px 0 0;
	color: var(--muted);
	font-size: 12px;
}

.creator-settings,
.job-actions {
	display: flex;
	gap: 6px;
	align-items: center;
}

.creator-settings select {
	width: auto;
	min-width: 105px;
}

.tag {
	padding: 2px 6px;
	border: 1px solid var(--border);
	border-radius: 3px;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
}

.priority-high {
	color: #ff7b72;
	border-color: #8b3a36;
	background: #2d1517;
}

.priority-medium {
	color: #e3b341;
	border-color: #765d20;
	background: #2b2413;
}

.priority-low {
	color: #79c0ff;
	border-color: #2c5b82;
	background: #10253a;
}

.mode-process {
	color: #56d364;
	border-color: #2d6a39;
	background: #10291a;
}

.mode-watch {
	color: #d2a8ff;
	border-color: #69448c;
	background: #241535;
}

.status-pending {
	color: #e3b341;
}

.status-claimed,
.status-processing {
	color: #79c0ff;
}

.status-completed {
	color: #56d364;
}

.status-failed,
.status-cancelled {
	color: #ff7b72;
}

.button {
	border: 1px solid #444c56;
	background: #21262d;
	color: #e6edf3;
	padding: 7px 11px;
	border-radius: 4px;
	cursor: pointer;
}

.button:hover {
	background: #30363d;
}

.button.primary {
	background: var(--blue-dark);
	border-color: #388bfd;
	color: white;
}

.button.primary:hover {
	background: var(--blue);
}

.button.danger {
	color: #ff7b72;
	border-color: #6e3431;
	background: #29181a;
}

.button.small {
	padding: 5px 8px;
	font-size: 12px;
}

.button.full {
	width: 100%;
}

.button:disabled {
	opacity: .45;
	cursor: not-allowed;
}

input,
select {
	width: 100%;
	background: #0d1117;
	color: #e6edf3;
	border: 1px solid #484f58;
	border-radius: 3px;
	padding: 8px 9px;
	outline: none;
}

input:focus,
select:focus {
	border-color: var(--blue);
}

label {
	display: grid;
	gap: 5px;
	font-size: 13px;
	font-weight: 700;
}

.flash {
	padding: 9px 11px;
	margin-bottom: 12px;
	border: 1px solid;
	font-size: 13px;
}

.flash.success {
	color: #7ee787;
	border-color: #2d6a39;
	background: #10291a;
}

.flash.error {
	color: #ff7b72;
	border-color: #7a3431;
	background: #2d1517;
}

.empty {
	margin: 0;
	padding: 22px 12px;
	color: var(--muted);
}

.error-text,
.text-red {
	color: #ff7b72;
}

.text-green {
	color: #56d364;
}

.text-muted {
	color: var(--muted);
}

.app-dialog {
	width: min(520px, calc(100% - 24px));
	border: 1px solid #4b5561;
	background: #161b22;
	color: #e6edf3;
	padding: 0;
}

.app-dialog::backdrop {
	background: rgba(0, 0, 0, .72);
}

.dialog-box {
	padding: 16px;
}

.dialog-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding-bottom: 12px;
	margin-bottom: 13px;
	border-bottom: 1px solid var(--border);
}

.close-button {
	border: 0;
	background: transparent;
	color: #8b949e;
	font-size: 23px;
	cursor: pointer;
}

.form-grid {
	display: grid;
	gap: 11px;
}

.two-columns {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.check-row {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 400;
}

.check-row input {
	width: auto;
}

.dialog-actions,
.test-row {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 8px;
}

.test-row {
	justify-content: space-between;
	border-top: 1px solid var(--border);
	margin-top: 14px;
	padding-top: 12px;
	font-size: 12px;
	color: var(--muted);
}

.api-status {
	display: grid;
	grid-template-columns: 130px 1fr;
	gap: 7px 12px;
	font-size: 13px;
	margin-bottom: 13px;
}

.api-status span {
	color: var(--muted);
}

.code-block {
	padding: 10px;
	background: #0d1117;
	border: 1px solid var(--border);
	overflow: auto;
	font-size: 12px;
}

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

.login-box {
	width: min(360px, 100%);
	border: 1px solid var(--border);
	background: var(--panel);
	padding: 20px;
	display: grid;
	gap: 14px;
}

.login-title {
	display: flex;
	gap: 12px;
	align-items: center;
	padding-bottom: 13px;
	border-bottom: 1px solid var(--border);
}

.login-title h1 {
	font-size: 20px;
}

.login-title p {
	margin: 0;
	color: var(--muted);
	font-size: 13px;
}

.logo-box {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	background: #17395d;
	border: 1px solid #2f81f7;
	color: #79c0ff;
	font-weight: 800;
}

.login-note {
	margin: 0;
	color: var(--muted);
	text-align: center;
	font-size: 11px;
}

@media (max-width: 800px) {
	:root {
		--sidebar: 100%;
	}

	.sidebar {
		position: static;
		width: 100%;
		border-right: 0;
		border-bottom: 1px solid #24405f;
	}

	.sidebar-nav {
		grid-template-columns: 1fr 1fr;
	}

	.sidebar-bottom {
		margin-top: 12px;
	}

	.main-content {
		margin-left: 0;
		width: 100%;
		padding: 18px 12px 40px;
	}

	.creator-row,
	.job-row {
		align-items: stretch;
		flex-direction: column;
	}

	.creator-settings,
	.job-actions {
		flex-wrap: wrap;
	}

	.two-columns {
		grid-template-columns: 1fr;
	}
}


.source-line {
	display: flex;
	gap: 5px;
	flex-wrap: wrap;
	margin-top: 7px;
}

.source-badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 3px 6px;
	border: 1px solid var(--border);
	border-radius: 3px;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
}

.source-badge:hover {
	text-decoration: none;
}

.source-youtube,
.platform-youtube {
	color: #ff7b72;
	border-color: #7d3431;
	background: #2b1517;
}

.source-twitch,
.platform-twitch {
	color: #d2a8ff;
	border-color: #64428a;
	background: #241535;
}

.source-kick,
.platform-kick {
	color: #7ee787;
	border-color: #327440;
	background: #10291a;
}

.source-live {
	box-shadow: inset 0 0 0 1px #f85149;
}

.source-live b,
.live-tag,
.text-live,
.live-text {
	color: #ff5d55;
}

.live-tag {
	border-color: #8b3a36;
	background: #2d1517;
}

.source-manager-list {
	display: grid;
	gap: 7px;
	margin-bottom: 16px;
}

.source-manager-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 9px;
	border: 1px solid var(--border);
	background: #10151b;
}

.source-add-form {
	padding-top: 14px;
	border-top: 1px solid var(--border);
}
