/* ── Fondo de pagina ── */
body {
	background-image: url('/static/index.jpg');
	background-size: cover;
	background-position: center;
	background-attachment: fixed;
	background-repeat: no-repeat;
	min-height: 100vh;
}

/* ── Espaciado derecho del menu ── */
nav ul:last-child {
	margin-right: 1rem;
}

/* ── Auth Modal ── */
.auth-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, .65);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	animation: overlayIn .15s ease;
}
@keyframes overlayIn { from { opacity: 0 } to { opacity: 1 } }

.auth-modal-box {
	background: var(--pico-background-color, #fff);
	color: var(--pico-color, #222);
	padding: 1.75rem;
	border-radius: .5rem;
	width: 100%;
	max-width: 460px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, .35);
	position: relative;
	animation: boxIn .2s ease;
}
@keyframes boxIn { from { opacity: 0; transform: translateY(-16px) } to { opacity: 1; transform: translateY(0) } }

.auth-modal-box h2 {
	margin: 0 0 1.25rem 0;
	text-align: center;
	color: var(--pico-primary);
	font-size: 1.125rem;
	font-weight: 600;
}

.auth-modal-close {
	position: absolute;
	top: .625rem;
	right: .625rem;
	background: none;
	border: none;
	font-size: 1.125rem;
	cursor: pointer;
	color: var(--pico-muted-color);
	width: 1.75rem;
	height: 1.75rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: .25rem;
	transition: background .15s;
}
.auth-modal-close:hover {
	background: var(--pico-muted-border-color, #eee);
}

/* ── Form Fields ── */
.form-field {
	margin-bottom: .75rem;
}
.form-field label {
	display: block;
	font-size: .75rem;
	font-weight: 500;
	color: var(--pico-muted-color);
	margin-bottom: .25rem;
}
.form-field input {
	width: 100%;
	padding: .5rem .75rem;
	border: 1px solid var(--pico-muted-border-color, #ddd);
	border-radius: .375rem;
	font-size: .875rem;
	box-sizing: border-box;
	transition: border-color .15s, box-shadow .15s;
}
.form-field input:focus {
	border-color: var(--pico-primary);
	outline: none;
	box-shadow: 0 0 0 2px color-mix(in srgb, var(--pico-primary) 20%, transparent);
}

/* ── Change Password Fieldset ── */
#change-area {
	border: 1px solid var(--pico-muted-border-color, #ddd);
	border-radius: .375rem;
	padding: .875rem .875rem .125rem;
	margin-bottom: .75rem;
}
#change-area legend {
	font-size: .75rem;
	font-weight: 600;
	color: var(--pico-mark-color, #f57c00);
	padding: 0 .5rem;
	margin: 0;
}

/* ── Auth Toast (feedback bajo ultimo campo visible) ── */
.auth-toast {
	margin: .375rem 0 .75rem;
	padding: .4375rem .75rem;
	border-radius: .375rem;
	font-size: .75rem;
	font-weight: 500;
	text-align: center;
	display: none;
	animation: toastIn .2s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(-4px) } to { opacity: 1; transform: translateY(0) } }

.auth-toast.success {
	display: block;
	color: var(--pico-ins-color);
	background: color-mix(in srgb, var(--pico-ins-color) 8%, transparent);
}
.auth-toast.error {
	display: block;
	color: var(--pico-del-color);
	background: color-mix(in srgb, var(--pico-del-color) 8%, transparent);
}
.auth-toast.info {
	display: block;
	color: var(--pico-primary);
	background: color-mix(in srgb, var(--pico-primary) 8%, transparent);
}
.auth-toast.warning {
	display: block;
	color: var(--pico-mark-color, #f57c00);
	background: color-mix(in srgb, var(--pico-mark-color, #f57c00) 8%, transparent);
}

/* ── Auth Button ── */
.auth-btn {
	width: 100%;
	padding: .625rem;
	background: var(--pico-primary);
	color: #fff;
	border: none;
	border-radius: .375rem;
	cursor: pointer;
	font-weight: 600;
	font-size: .875rem;
	transition: background .15s, opacity .15s;
}
.auth-btn:hover {
	background: var(--pico-primary-hover);
}
.auth-btn:disabled {
	opacity: .5;
	cursor: default;
}
.auth-btn.warning {
	background: var(--pico-mark-color, #f57c00);
}
.auth-btn.warning:hover {
	background: color-mix(in srgb, var(--pico-mark-color, #f57c00) 85%, black);
}

/* ── Upload Module ── */
.upload-row {
	margin-bottom: .5rem;
	padding: .75rem;
}
.upload-row-header {
	display: flex;
	justify-content: space-between;
	font-weight: 500;
	margin-bottom: .25rem;
}
.upload-metrics {
	display: flex;
	justify-content: space-between;
	font-size: .85rem;
	margin-top: .25rem;
}
.upload-progress {
	width: 100%;
	height: .5rem;
}
.upload-progress.error {
	accent-color: var(--pico-del-color);
}
.upload-status.success {
	color: var(--pico-ins-color);
}
.upload-status.error {
	color: var(--pico-del-color);
}

/* ── Upload Dialog Modal ── */
.upload-dialog-modal::backdrop {
	background: rgba(0, 0, 0, .05);
}
.upload-dialog-modal[open] {
	display: flex;
	flex-direction: column;
	background: transparent;
}
.upload-dialog-close {
	float: right;
	cursor: pointer;
	font-size: 1.2em;
	padding: 0 6px;
}
.upload-dialog-close:hover {
	background: #f0f0f0;
	border-radius: 4px;
}
