/* ==========================================================================
   ATV Dashboard – colours follow the ATV Media Pro theme (orange · blue · green).
   ========================================================================== */

:root {
	--bg: #090b16;
	--bg-2: #0d1021;
	--surface: #12162e;
	--surface-2: #181d3b;
	--line: rgba(255, 255, 255, .08);
	--line-2: rgba(255, 255, 255, .14);
	--text: #f4f5fa;
	--muted: #a3a8c6;
	--dim: #6f7598;

	--orange: #f7941d;
	--amber: #f3b723;
	--sky: #4399d1;
	--emerald: #10a866;
	--danger: #ff6b6b;

	--g-orange: linear-gradient(135deg, #f7941d 0%, #f3b723 100%);
	--g-blue: linear-gradient(135deg, #21409a 0%, #4399d1 100%);
	--g-green: linear-gradient(135deg, #0b6e3b 0%, #10a866 100%);
	--g-brand: linear-gradient(90deg, #f7941d 0%, #f3b723 32%, #4399d1 66%, #10a866 100%);

	--radius: 20px;
	--radius-sm: 12px;
	--side-w: 264px;
	--font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--mono: ui-monospace, SFMono-Regular, Consolas, monospace;
	--ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body.atvd {
	background: var(--bg);
	color: var(--text);
	font-family: var(--font);
	font-size: 15px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
.atvd a { color: inherit; text-decoration: none; }
.atvd img { max-width: 100%; display: block; }
.atvd h1, .atvd h2, .atvd h3 { margin: 0; line-height: 1.2; font-weight: 800; letter-spacing: -.02em; }
.atvd h1 em, .atvd h2 em, .atvd h3 em {
	font-style: normal;
	background: var(--g-brand);
	-webkit-background-clip: text; background-clip: text;
	-webkit-text-fill-color: transparent; color: transparent;
}
.atvd p { margin: 0; }
.atvd button, .atvd input { font: inherit; color: inherit; }
.atvd [hidden] { display: none !important; }
.atvd :focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 8px; }
.atvd ::selection { background: var(--orange); color: #1b1203; }
.atvd-muted { color: var(--muted); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.atvd-icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Logo ---------- */
.atvd-logo { display: inline-flex; align-items: center; }
.atvd-logo .atv-logo__img, .atvd-logo img { height: 38px; width: auto; }
.atvd-logo--text { font-weight: 800; font-size: 20px; letter-spacing: -.02em; }

/* ---------- Buttons ---------- */
.atvd-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 12px 20px; border-radius: 999px; border: 1px solid transparent;
	font-weight: 700; font-size: 14.5px; line-height: 1; cursor: pointer; white-space: nowrap;
	transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s, border-color .2s, opacity .2s;
}
.atvd-btn:active { transform: translateY(1px); }
.atvd-btn--primary { background: var(--g-orange); color: #1b1203; box-shadow: 0 10px 26px -12px rgba(247, 148, 29, .8); }
.atvd-btn--primary:hover { transform: translateY(-1px); box-shadow: 0 14px 32px -12px rgba(247, 148, 29, .95); }
.atvd-btn--ghost { background: rgba(255, 255, 255, .04); border-color: var(--line-2); color: var(--text); }
.atvd-btn--ghost:hover { background: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .26); }
.atvd-btn--sm { padding: 9px 14px; font-size: 13px; }
.atvd-btn--sm .atvd-icon { width: 15px; height: 15px; }
.atvd-btn--icon { padding-left: 10px; padding-right: 10px; }
.atvd-btn--block { width: 100%; }
.atvd-btn[disabled] { opacity: .4; pointer-events: none; }
.atvd-iconbtn {
	width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line-2);
	background: rgba(255, 255, 255, .04); display: grid; place-items: center; cursor: pointer; flex: none;
}
.atvd-iconbtn:hover { background: rgba(255, 255, 255, .09); }
.atvd-row { display: flex; flex-wrap: wrap; gap: 10px; }

.atvd-spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: atvd-spin .7s linear infinite; }
@keyframes atvd-spin { to { transform: rotate(360deg); } }

.atvd-alert { border-radius: var(--radius-sm); padding: 11px 14px; font-size: 14px; margin-top: 16px; }
.atvd-alert--error { background: rgba(255, 107, 107, .12); color: #ffb3b3; border: 1px solid rgba(255, 107, 107, .3); }
.atvd-alert--ok { background: rgba(16, 168, 102, .12); color: #7fe0b3; border: 1px solid rgba(16, 168, 102, .3); }

.atvd-eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--amber); margin-bottom: 10px !important; }
.atvd-eyebrow span { width: 8px; height: 8px; border-radius: 50%; background: var(--g-orange); box-shadow: 0 0 0 4px rgba(247, 148, 29, .16); }

/* ==========================================================================
   Login
   ========================================================================== */
.atvd--login { min-height: 100vh; overflow-x: hidden; position: relative; }
.atvd-login__glow {
	position: fixed; inset: -30% -10% auto; height: 80vh; pointer-events: none;
	background:
		radial-gradient(40% 50% at 25% 40%, rgba(247, 148, 29, .22), transparent 70%),
		radial-gradient(40% 50% at 75% 30%, rgba(67, 153, 209, .2), transparent 70%),
		radial-gradient(30% 40% at 55% 70%, rgba(16, 168, 102, .14), transparent 70%);
	filter: blur(10px);
}
.atvd-login { position: relative; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 16px; gap: 24px; }
.atvd-login__brand .atvd-logo img { height: 46px; }
.atvd-login__card {
	width: 100%; max-width: 430px; padding: 34px 30px 30px;
	background: linear-gradient(180deg, rgba(24, 29, 59, .92), rgba(18, 22, 46, .92));
	border: 1px solid var(--line-2); border-radius: 26px;
	box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8);
	backdrop-filter: blur(8px);
}
.atvd-login__card::before { content: ""; display: block; height: 3px; margin: -34px -30px 28px; border-radius: 26px 26px 0 0; background: var(--g-brand); }
.atvd-login__lock { width: 48px; height: 48px; border-radius: 15px; background: var(--g-orange); color: #1b1203; display: grid; place-items: center; margin-bottom: 18px; }
.atvd-login__lock .atvd-icon { width: 22px; height: 22px; }
.atvd-login__card h1 { font-size: 26px; margin-bottom: 8px; }
.atvd-login__card > .atvd-muted { font-size: 14px; }
.atvd-login__foot { color: var(--muted); font-size: 14px; text-align: center; }
.atvd-login__foot a { color: var(--amber); }
.atvd-login__foot a:hover { color: #fff; }

.atvd-form { display: flex; flex-direction: column; gap: 16px; margin-top: 22px; }
.atvd-field { display: flex; flex-direction: column; gap: 7px; }
.atvd-field > span:first-child { font-size: 13px; font-weight: 600; color: var(--muted); }
.atvd-field input {
	width: 100%; padding: 13px 15px; border-radius: 13px;
	background: rgba(9, 11, 22, .6); border: 1px solid var(--line-2); outline: 0;
	font-size: 15px; transition: border-color .2s, box-shadow .2s;
}
.atvd-field input:focus { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(247, 148, 29, .16); }
.atvd-pass { position: relative; display: block; }
.atvd-pass input { padding-right: 48px; }
.atvd-pass__toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; background: none; color: var(--dim); cursor: pointer; display: grid; place-items: center; border-radius: 9px; }
.atvd-pass__toggle:hover, .atvd-pass__toggle.is-on { color: var(--amber); }
.atvd-form__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13.5px; flex-wrap: wrap; }
.atvd-form__row a { color: var(--amber); }
.atvd-form__row a:hover { color: #fff; }
.atvd-check { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); cursor: pointer; }
.atvd-check input { width: 16px; height: 16px; accent-color: var(--orange); }
.atvd-form .atvd-btn { margin-top: 4px; padding: 15px 20px; font-size: 15px; }
.atvd-social { margin-top: 20px; }
.atvd-divider { display: flex; align-items: center; gap: 12px; color: var(--dim); font-size: 12.5px; margin-bottom: 14px; }
.atvd-divider::before, .atvd-divider::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }

/* ==========================================================================
   App shell
   ========================================================================== */
.atvd-shell { min-height: 100vh; }
.atvd-side {
	position: fixed; inset: 0 auto 0 0; width: var(--side-w); z-index: 40;
	display: flex; flex-direction: column; gap: 8px;
	background: var(--bg-2); border-right: 1px solid var(--line);
	padding: 22px 16px 16px;
}
.atvd-side__brand { padding: 2px 8px 18px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.atvd-nav { display: flex; flex-direction: column; gap: 3px; flex: 1; overflow-y: auto; }
.atvd-nav__label { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); padding: 14px 12px 6px; }
.atvd-nav__item {
	display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px;
	color: var(--muted); font-weight: 600; font-size: 14.5px; position: relative;
	transition: background .2s, color .2s;
}
.atvd-nav__item:hover { background: rgba(255, 255, 255, .05); color: var(--text); }
.atvd-nav__item.is-active { background: rgba(247, 148, 29, .12); color: var(--text); }
.atvd-nav__item.is-active::before { content: ""; position: absolute; left: -16px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--g-orange); }
.atvd-nav__item.is-active .atvd-icon { color: var(--orange); }
.atvd-tag { margin-left: auto; font-size: 10.5px; font-weight: 800; padding: 2px 7px; border-radius: 999px; background: var(--g-orange); color: #1b1203; }
.atvd-side__user { display: flex; align-items: center; gap: 10px; padding: 12px 8px 4px; border-top: 1px solid var(--line); min-width: 0; }
.atvd-side__user img { width: 36px; height: 36px; border-radius: 50%; flex: none; }
.atvd-side__user div { flex: 1; min-width: 0; line-height: 1.3; }
.atvd-side__user strong { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.atvd-side__user span { display: block; font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.atvd-scrim { display: none; }

.atvd-main { margin-left: var(--side-w); min-height: 100vh; display: flex; flex-direction: column; }
.atvd-top {
	position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px;
	padding: 16px 32px; background: rgba(9, 11, 22, .82); backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--line);
}
.atvd-top__menu { display: none; }
.atvd-top__title { flex: 1; min-width: 0; }
.atvd-crumb { font-size: 12.5px; color: var(--dim); }
.atvd-top h1 { font-size: 22px; }
.atvd-content { padding: 28px 32px 56px; max-width: 1240px; width: 100%; }

@media (max-width: 960px) {
	.atvd-side { transform: translateX(-100%); transition: transform .3s var(--ease); box-shadow: 20px 0 60px rgba(0, 0, 0, .5); }
	.atvd-shell.is-side-open .atvd-side { transform: none; }
	.atvd-shell.is-side-open .atvd-scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(0, 0, 0, .55); }
	.atvd-main { margin-left: 0; }
	.atvd-top__menu { display: grid; }
	.atvd-top { padding: 12px 16px; }
	.atvd-content { padding: 20px 16px 48px; }
}
@media (max-width: 520px) {
	.atvd-top__logout span { display: none; }
	.atvd-top__logout { padding: 9px 10px; }
	.atvd-top h1 { font-size: 19px; }
}

/* ---------- Panels ---------- */
.atvd-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.atvd-panel__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.atvd-panel__head h3 { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.atvd-panel__head .atvd-muted { font-size: 13px; margin-top: 2px; }
.atvd-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 32px 0 14px; flex-wrap: wrap; }
.atvd-section-head h3 { font-size: 18px; }
.atvd-section-head .atvd-muted { font-size: 13.5px; margin-top: 3px; }
.atvd-kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; font-size: 14px; margin: 0; }
.atvd-kv dt { color: var(--muted); }
.atvd-kv dd { margin: 0; font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }

/* ---------- Overview ---------- */
.atvd-welcome {
	display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
	padding: 28px; border-radius: var(--radius); border: 1px solid var(--line-2); position: relative; overflow: hidden;
	background:
		radial-gradient(60% 120% at 100% 0%, rgba(247, 148, 29, .18), transparent 60%),
		radial-gradient(50% 120% at 0% 100%, rgba(67, 153, 209, .14), transparent 60%),
		var(--surface);
}
.atvd-welcome h2 { font-size: clamp(22px, 3vw, 30px); margin-bottom: 6px; }
.atvd-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin: 20px 0; }
.atvd-tile {
	display: flex; flex-direction: column; gap: 6px; padding: 22px; border-radius: var(--radius);
	background: var(--surface); border: 1px solid var(--line); transition: transform .2s var(--ease), border-color .2s;
}
.atvd-tile:hover { transform: translateY(-3px); border-color: var(--line-2); }
.atvd-tile strong { font-size: 17px; margin-top: 8px; }
.atvd-tile > span:last-child { color: var(--muted); font-size: 14px; }
.atvd-tile__icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #fff; }
.atvd-tile__icon .atvd-icon { width: 22px; height: 22px; }
.atvd-tile--orange .atvd-tile__icon { background: var(--g-orange); color: #1b1203; }
.atvd-tile--blue .atvd-tile__icon { background: var(--g-blue); }
.atvd-tile--green .atvd-tile__icon { background: var(--g-green); }

/* ---------- Account ---------- */
.atvd-account { max-width: 640px; display: flex; flex-direction: column; gap: 22px; }
.atvd-account__head { display: flex; align-items: center; gap: 16px; }
.atvd-account__head img { width: 72px; height: 72px; border-radius: 50%; border: 2px solid var(--line-2); }
.atvd-account__head h2 { font-size: 22px; }

/* ==========================================================================
   ThumbGrab
   ========================================================================== */
.tg-search-panel h2 { font-size: clamp(22px, 3vw, 28px); margin-bottom: 6px; }
.tg-search {
	display: flex; gap: 8px; margin-top: 18px; padding: 7px;
	background: rgba(9, 11, 22, .6); border: 1px solid var(--line-2); border-radius: 999px;
	transition: border-color .2s, box-shadow .2s;
}
.tg-search:focus-within { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(247, 148, 29, .14); }
.tg-search__field { flex: 1; display: flex; align-items: center; gap: 10px; padding-left: 14px; min-width: 0; color: var(--dim); }
.tg-search__field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 15.5px; padding: 10px 0; color: var(--text); }
.tg-search__field input::placeholder { color: var(--dim); }
@media (max-width: 600px) {
	.tg-search { flex-wrap: wrap; border-radius: 20px; }
	.tg-search__field { flex-basis: 100%; padding: 0 8px; }
	.tg-search .atvd-btn { flex: 1; }
}
.tg-examples { margin-top: 12px; font-size: 13px; color: var(--dim); }
.tg-examples button { background: none; border: 0; padding: 0 5px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.tg-examples button:hover { color: var(--amber); }

#tg-result { margin-top: 20px; scroll-margin-top: 90px; }
.tg-head { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 24px; padding: 16px; }
@media (max-width: 860px) { .tg-head { grid-template-columns: 1fr; } }
.tg-hero { position: relative; border-radius: 14px; overflow: hidden; background: var(--bg-2); aspect-ratio: 16 / 9; }
.tg-hero img { width: 100%; height: 100%; object-fit: cover; }
.tg-hero .tg-badge { position: absolute; left: 12px; top: 12px; }
.tg-meta { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 4px 4px 4px 0; }
.tg-meta h2 { font-size: 21px; overflow-wrap: anywhere; }
.tg-meta .atvd-muted { font-size: 14px; }
.tg-meta .atvd-row { margin-top: auto; }
.tg-platform { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--orange); }

.tg-seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.tg-seg button { border: 0; background: none; padding: 7px 16px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; }
.tg-seg button[aria-pressed="true"] { background: var(--g-orange); color: #1b1203; }

.tg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.tg-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; transition: border-color .2s; }
.tg-card:hover { border-color: var(--line-2); }
.tg-card__thumb { aspect-ratio: 16 / 9; background: var(--bg-2); display: grid; place-items: center; overflow: hidden; }
.tg-card__thumb.is-43 { aspect-ratio: 4 / 3; }
.tg-card__thumb img { width: 100%; height: 100%; object-fit: contain; }
.tg-card.is-missing .tg-card__thumb img { opacity: .2; filter: grayscale(1); }
.tg-card__body { padding: 13px 14px 14px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.tg-card__title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tg-card__title strong { font-size: 15px; }
.tg-card__file { font-family: var(--mono); font-size: 12px; color: var(--dim); overflow-wrap: anywhere; }
.tg-card__row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.tg-card__row .atvd-btn--primary { flex: 1; }

.tg-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.tg-badge .atvd-spin { width: 11px; height: 11px; }
.tg-badge--ok { background: rgba(16, 168, 102, .14); color: #5fd59e; }
.tg-badge--no { background: rgba(243, 183, 35, .14); color: var(--amber); }
.tg-badge--hd { background: var(--g-orange); color: #1b1203; }

.tg-history { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.tg-history__item { flex: none; width: 176px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 14px; overflow: hidden; transition: border-color .2s, transform .2s var(--ease); }
.tg-history__item:hover { border-color: var(--line-2); transform: translateY(-2px); }
.tg-history__item img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--bg-2); }
.tg-history__item span { padding: 8px 10px; font-size: 12.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); }

/* ==========================================================================
   Members, account, setup
   ========================================================================== */
.atvd-avatar {
	width: 36px; height: 36px; border-radius: 50%; flex: none;
	display: grid; place-items: center; background: var(--g-blue); color: #fff;
	font-size: 13px; font-weight: 800; letter-spacing: .02em;
}
.atvd-avatar--lg { width: 72px; height: 72px; font-size: 24px; background: var(--g-orange); color: #1b1203; }
.atvd-stack { display: flex; flex-direction: column; gap: 18px; }
.atvd-stack > .atvd-panel h3 { display: flex; align-items: center; gap: 8px; font-size: 17px; margin-bottom: 6px; }
.atvd-alert--page { margin: 0 0 18px; }
.atvd-alert a { color: inherit; font-weight: 700; text-decoration: underline; }
.atvd-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 16px; }
.atvd-form--inline { flex-direction: row; align-items: flex-end; flex-wrap: wrap; }
.atvd-form--inline .atvd-field { flex: 1; min-width: 200px; }
.atvd-form--inline .atvd-btn { padding: 14px 22px; }
.atvd-field select {
	width: 100%; padding: 13px 15px; border-radius: 13px; font-size: 15px;
	background: rgba(9, 11, 22, .6); border: 1px solid var(--line-2); color: var(--text); outline: 0;
}
.atvd-field select:focus { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(247, 148, 29, .16); }
.atvd-field select option { background: var(--surface); }

.atvd-table-wrap { overflow-x: auto; margin: 0 -22px -22px; border-top: 1px solid var(--line); }
.atvd-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 620px; }
.atvd-table th, .atvd-table td { text-align: left; padding: 13px 22px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.atvd-table tr:last-child td { border-bottom: 0; }
.atvd-table th { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); white-space: nowrap; }
.atvd-table td:not(:first-child) { white-space: nowrap; }
.atvd-role { white-space: nowrap; }
.atvd-table__actions { text-align: right !important; white-space: nowrap; }
.atvd-table__actions > * { margin-left: 6px; vertical-align: middle; }
.atvd-member { display: flex; align-items: center; gap: 12px; }
.atvd-member strong { display: block; font-size: 14.5px; white-space: nowrap; }
.atvd-member small { white-space: nowrap; }
.atvd-btn--icon.is-on { color: var(--amber); border-color: rgba(243, 183, 35, .4); }
.atvd-member small { display: block; color: var(--dim); font-family: var(--mono); font-size: 12px; }
.atvd-role { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.atvd-role--admin { background: rgba(247, 148, 29, .14); color: var(--amber); }
.atvd-role--member { background: rgba(67, 153, 209, .14); color: #8cc4ea; }
.atvd-inline { display: inline; margin: 0; }
.atvd-btn--danger { background: rgba(255, 107, 107, .1); border-color: rgba(255, 107, 107, .3); color: #ffb3b3; }
.atvd-btn--danger:hover { background: rgba(255, 107, 107, .2); }

.atvd-menu { display: inline-block; }
.atvd-menu summary { list-style: none; }
.atvd-menu summary::-webkit-details-marker { display: none; }
.atvd-menu[open] summary { border-color: var(--orange); color: var(--orange); }
/* Opens inside the row (not as a floating popup) so the table's scroll area never clips it. */
.atvd-menu__panel {
	position: absolute; right: 22px; width: 240px; z-index: 5; margin-top: 8px;
	display: flex; flex-direction: column; gap: 8px; padding: 12px; text-align: left;
	background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 14px;
	box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .8);
}
.atvd-table tr.has-open-menu td { padding-bottom: 170px; }
.atvd-table td.atvd-table__actions { position: relative; }
.atvd-menu__panel input {
	width: 100%; padding: 10px 12px; border-radius: 10px; font-size: 14px;
	background: rgba(9, 11, 22, .6); border: 1px solid var(--line-2); outline: 0;
}
.atvd-menu__panel input:focus { border-color: var(--orange); }

.atvd-login__card--wide { max-width: 620px; }
.atvd-setup__admins { margin-top: 16px !important; font-size: 13.5px; color: var(--muted); }
.atvd-setup__admins code { font-family: var(--mono); font-size: 12.5px; background: var(--surface-2); padding: 2px 8px; border-radius: 6px; margin-left: 4px; color: var(--text); }

/* ---------- Toast ---------- */
.atvd-toast {
	position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translate(-50%, 16px);
	max-width: calc(100% - 32px); padding: 11px 18px; border-radius: 14px; text-align: center;
	background: var(--text); color: var(--bg); font-size: 14px; font-weight: 600;
	opacity: 0; pointer-events: none; transition: .2s;
}
.atvd-toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ==========================================================================
   Public page /app/thumbgrab/ (no login): simple top bar + centred column.
   ========================================================================== */
.tgp { min-height: 100vh; display: flex; flex-direction: column; }
.tgp-wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.tgp-top { position: sticky; top: 0; z-index: 30; background: rgba(9, 11, 22, .85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.tgp-top .tgp-wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 68px; }
.tgp-top .atvd-logo img { height: 38px; width: auto; }
.tgp-main { flex: 1; padding-top: 28px; padding-bottom: 48px; }
.tgp .tg-search-panel h1 { font-size: clamp(26px, 4vw, 38px); margin-bottom: 8px; }
.tgp-info { margin-top: 28px; }
.tgp-info h2 { font-size: 20px; margin-bottom: 14px; }
.tgp-info > .atvd-muted { font-size: 13.5px; margin-top: 14px; }
.tgp-table { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.tgp-table table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 480px; }
.tgp-table th, .tgp-table td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.tgp-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); }
.tgp-table tr:last-child td { border-bottom: 0; }
.tgp-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 22px; padding-bottom: 32px; border-top: 1px solid var(--line); color: var(--dim); font-size: 13px; }
.tgp-foot a:hover { color: var(--amber); }