:root {
	color-scheme: light dark;
	--bg: #0f1216;
	--card: #171b21;
	--border: #2a2f38;
	--text: #e8eaed;
	--muted: #9aa4b2;
	--accent: #5b8def;
	--accent-text: #08101f;
	--danger: #e35d6a;
	--danger-bg: #2a1418;
	--ok: #3fb27f;
	--ok-bg: #10241c;
	--radius: 10px;
}

* { box-sizing: border-box; }

/* O atributo global `hidden` só é traduzido para "display: none" pela folha
   de estilos padrão do navegador para elementos HTML — a maioria dos
   navegadores não estende essa regra ao namespace SVG. Sem isso, os dois
   <svg> de um botão de alternância (ex: icon-eye/icon-eye-off) ficam ambos
   visíveis, empilhados, mesmo com o atributo `hidden` presente e correto no
   DOM. Precisa de `!important` porque, sem ele, qualquer outra regra futura
   que toque `display` num elemento com `.icon` (ou outra classe) venceria
   silenciosamente esta, reabrindo o mesmo bug. */
[hidden] {
	display: none !important;
}

body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: var(--bg);
	color: var(--text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	line-height: 1.5;
}

.card {
	width: 100%;
	max-width: 560px;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 32px;
}

.brand-header {
	text-align: center;
	margin-bottom: 20px;
}

.brand-logo {
	max-height: 48px;
	max-width: 100%;
}

h1 {
	font-size: 1.35rem;
	margin: 0 0 6px;
}

.subtitle {
	color: var(--muted);
	margin: 0 0 24px;
	font-size: 0.92rem;
}

label {
	display: block;
	font-size: 0.85rem;
	color: var(--muted);
	margin: 18px 0 6px;
}

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

textarea {
	min-height: 160px;
	resize: vertical;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

textarea:focus, input:focus, select:focus {
	outline: 2px solid var(--accent);
	outline-offset: 1px;
}

button {
	margin-top: 24px;
	width: 100%;
	padding: 12px 16px;
	border: none;
	border-radius: 8px;
	background: var(--accent);
	color: var(--accent-text);
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
}

button:hover { filter: brightness(1.08); }

.hint {
	font-size: 0.8rem;
	color: var(--muted);
	margin-top: 6px;
}

.alert {
	border-radius: 8px;
	padding: 12px 14px;
	font-size: 0.9rem;
	margin-bottom: 18px;
}

.alert-error {
	background: var(--danger-bg);
	color: #f4a3ab;
	border: 1px solid #4a2229;
}

.alert-ok {
	background: var(--ok-bg);
	color: #7fd6ac;
	border: 1px solid #1f4231;
}

.link-box {
	display: flex;
	gap: 8px;
	margin-top: 4px;
}

.link-box input {
	flex: 1;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.85rem;
}

.link-box button {
	margin-top: 0;
	width: auto;
	white-space: nowrap;
}

/* Especificidade maior que ".link-box button" de propósito: um .icon-btn
   dentro de .link-box (botão de copiar o link) deve manter o tamanho fixo
   de ícone, não herdar o "width: auto" acima. */
.link-box .icon-btn {
	width: 40px;
}

.icon-actions {
	display: flex;
	gap: 8px;
	margin-top: 8px;
}

.icon-btn {
	margin: 0;
	width: 40px;
	height: 40px;
	padding: 0;
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #10141a;
	border: 1px solid var(--border);
	color: var(--muted);
	border-radius: 8px;
	cursor: pointer;
}

.icon-btn:hover {
	filter: none;
	border-color: var(--accent);
	color: var(--accent);
}

.icon-btn .icon {
	width: 20px;
	height: 20px;
}

.icon-btn.btn-feedback-ok {
	border-color: var(--ok);
	color: var(--ok);
	background: var(--ok-bg);
}

.icon-btn.btn-feedback-err {
	border-color: var(--danger);
	color: var(--danger);
	background: var(--danger-bg);
}

pre.secret {
	white-space: pre-wrap;
	word-break: break-word;
	background: #10141a;
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 16px;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.92rem;
	margin: 4px 0 0;
}

footer {
	margin-top: 28px;
	font-size: 0.78rem;
	color: var(--muted);
	text-align: center;
}

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