
/* Fondo y cuerpo */
body.layout-admin { background: var(--sl-blue-050, #F3F7FB); }

body.layout-admin #middle {
	padding: 0;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 1px 2px rgba(3, 77, 150, .06), 0 4px 12px rgba(3, 77, 150, .04);
}
body.layout-admin #wrapper_content {
	margin-top: 12px;
	margin-right: 12px;
	margin-bottom: 12px;
}
@media only screen and (max-width: 991px) {
	body.layout-admin #wrapper_content { margin-left: 12px; }
}

/* Barra superior */
#header.dw-header {
	min-height: 74px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(3, 77, 150, .06), 0 4px 12px rgba(3, 77, 150, .04);
}

.dw-qbtn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border: 1px solid var(--dw-blue, #034D96);
	border-radius: 8px;
	background: var(--dw-blue, #034D96);
	color: #fff;
	font-size: .8125rem;
	line-height: 1;
	text-decoration: none;
	transition: background .15s, border-color .15s, transform .1s;
}
#header a.dw-qbtn:hover,
#header a.dw-qbtn:focus {
	background: var(--dw-blue-600, #023C77);
	border-color: var(--dw-blue-600, #023C77);
	color: #fff;
	transform: translateY(-1px);
}
.dw-qbtn.disabled {
	opacity: .5;
	pointer-events: none;
}

.dw-fecha {
	padding: 5px 10px;
	background: #F3F7FB;
	border: 1px solid var(--dw-line, #babcbf);
	border-radius: 8px;
	color: var(--dw-blue, #034D96);
	font-size: .8125rem;
	font-weight: 600;
	white-space: nowrap;
}

.dw-bar-ver {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	flex: 0 0 auto;
	gap: 3px;
}
.dw-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 4px 9px;
	border: 1px solid transparent;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
}
.dw-badge--blue { background: var(--dw-blue-100, #E6EEF7); color: var(--dw-blue, #034D96); }
.dw-badge--pink-inverse { background: var(--dw-pink, #E33678); color: #fff; }

/* Barra inferior */
#footer.dw-appfooter {
	/* por debajo de la barra lateral (11): .sticky-bottom le da 1020 y taparía sus submenús */
	z-index: 9;
	box-sizing: border-box;
	height: 40px;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 12px;
	padding: 0 14px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(3, 77, 150, .06), 0 4px 12px rgba(3, 77, 150, .04);
	color: #6B7685;
}
.dw-appfooter__logo { grid-column: 2; display: flex; align-items: center; }
.dw-appfooter__logo img { display: block; height: 26px; width: auto; }
.dw-appfooter__info {
	grid-column: 3;
	justify-self: end;
	text-align: right;
	line-height: 1.3;
}
.dw-appfooter__line { font-size: .6875rem; font-weight: 500; color: var(--dw-fg-2, #4A5B6F); white-space: nowrap; }
.dw-appfooter__line--soft { font-size: .625rem; color: #6B7685; }
.dw-appfooter__hl { color: var(--dw-blue, #034D96); font-weight: 700; }

@media (max-width: 767px) {
	.dw-appfooter__line--soft { display: none; }
}

/* Escritorio */
@media only screen and (min-width: 992px) {

	/* selector largo: el tema fija top:0 a la cabecera sticky con 4 clases */
	body.layout-admin.header-sticky.aside-sticky:not(.aside-compact):not(.header-fixed) #header.dw-header {
		top: var(--dw-aside-gap);
		margin-top: var(--dw-aside-gap);
		margin-right: var(--dw-aside-gap);
		height: 74px;
		border-radius: 12px;
	}

	body.layout-admin:not(.aside-compact) #footer.dw-appfooter {
		bottom: var(--dw-aside-gap);
		margin-right: var(--dw-aside-gap);
		margin-bottom: var(--dw-aside-gap);
		border-radius: 12px;
	}

	/* tapa la franja del hueco: sin esto el contenido que se desplaza se ve por debajo del footer y por encima de la cabecera */
	body.layout-admin:not(.aside-compact) #footer.dw-appfooter::after,
	body.layout-admin.header-sticky.aside-sticky:not(.aside-compact):not(.header-fixed) #header.dw-header::before {
		content: "";
		position: absolute;
		z-index: -1;
		left: 0;
		right: 0;
		height: var(--dw-aside-gap);
		background: var(--sl-blue-050, #F3F7FB);
	}
	body.layout-admin:not(.aside-compact) #footer.dw-appfooter::after { top: 100%; }
	body.layout-admin.header-sticky.aside-sticky:not(.aside-compact):not(.header-fixed) #header.dw-header::before { bottom: 100%; }
}

/* Inicio: maqueta del dashboard */
.dw-kpi { font-size: 1.6rem; font-weight: 700; color: var(--sl-blue); line-height: 1.3; }
.dw-grafico { position: relative; height: 320px; }
.dw-barra { height: 6px; border-radius: 3px; background: var(--sl-blue-100); overflow: hidden; }
.dw-barra > div { height: 100%; background: var(--sl-blue); border-radius: 3px; }

/* Laboratorio de pruebas */
.dw-lab-pre {
	max-height: 60vh; overflow: auto; margin: 0; padding: .5rem;
	font-size: .6875rem; line-height: 1.45; color: var(--sl-fg-2);
	background: var(--sl-blue-050); border: 1px solid var(--sl-border); border-radius: var(--sl-radius-md);
	white-space: pre-wrap; word-break: break-word;
}

/* Campo de fichero: el botón interno del tema está pensado para inputs altos */
#sl-app input[type="file"].form-control,
.modal-body input[type="file"].form-control {
	padding: 0 .5rem 0 0; line-height: 1.625rem;
}
#sl-app input[type="file"].form-control::file-selector-button,
.modal-body input[type="file"].form-control::file-selector-button {
	margin: 0 .5rem 0 0; margin-inline-end: .5rem; padding: 0 .75rem;
	font: inherit; line-height: 1.625rem;
}
