* { box-sizing: border-box; }
:root { color-scheme: light; font-family: "Segoe UI", sans-serif; color: #202a31; background: #f1f3ef; }
body { margin: 0; padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left)); background: linear-gradient(135deg, #f1f3ef, #e6eeeb); min-height: 100vh; min-height: 100dvh; }
a { color: #176b58; }
.card { width: min(420px, 100%); margin: 1rem auto; background: #fff; padding: 1.5rem; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.card h1 { font-size: 1.55rem; line-height: 1.25; }
label { display: block; margin-bottom: 1rem; font-size: .9rem; font-weight: 600; }
input, select, textarea { width: 100%; padding: .7rem; margin-top: .35rem; border: 1px solid #c5ceca; border-radius: 5px; background: #fff; font: inherit; font-size: 16px; }
textarea { min-height: 9rem; resize: vertical; }
button, .button-link { display: inline-block; padding: .75rem 1rem; font-size: .95rem; font-weight: 650; border: 0; border-radius: 5px; background: #176b58; color: #fff; cursor: pointer; text-decoration: none; }
.card button { width: 100%; min-height: 3rem; }
.campo-password { margin-bottom: 1rem; }
.campo-password > label { margin-bottom: 0; }
.password-campo { position: relative; }
.password-campo input { margin-top: .35rem; padding-right: 2.8rem; }
.password-campo .ver-password { position: absolute; top: .35rem; right: .15rem; width: 2.6rem; height: calc(100% - .35rem); min-height: 0; margin: 0; padding: 0; border-radius: 5px; background: transparent; color: #42514a; display: grid; place-items: center; }
.password-campo .ver-password:hover { background: #e7eeea; }
.ver-password .ojo { width: 1.35rem; height: 1.35rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ver-password[aria-pressed="false"] .ojo-cerrado,
.ver-password[aria-pressed="true"] .ojo-abierto { display: none; }
#btn-fichar { min-height: 3.25rem; font-size: 1.1rem; }
#lista { overflow-wrap: anywhere; padding-left: 1.1rem; }
#lista li { margin-bottom: .55rem; }
.card-nav { display: flex; flex-direction: column; gap: .55rem; margin-top: 1.25rem; }
.card-nav .button-link { width: 100%; min-height: 3rem; text-align: center; }
button:disabled { opacity: .6; cursor: not-allowed; }
.msg.error { color: #a12d24; }
.msg.ok { color: #176b58; }
.aviso, .table-note { font-size: .85rem; color: #596660; }
.aviso-comunicado, .prueba-acuse { font-size: .92rem; background: #f8eee6; border: 1px solid #e4c8ae; color: #6d3b0c; padding: .75rem .9rem; border-radius: 5px; margin: 0 0 1rem; }
.prueba-acuse { background: #e5f4ee; border-color: #b7ddd0; color: #145444; }
.aviso-comunicado a { font-weight: 700; }
ul { padding-left: 1.2rem; }
small { color: #69756f; }
.admin-shell { width: min(1440px, 100%); margin: 0 auto; }
.admin-header, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.admin-header { padding: .5rem 0 1.25rem; border-bottom: 1px solid #bdc9c3; margin-bottom: 1.25rem; }
.admin-header h1 { margin: .1rem 0; }
.admin-header nav { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.admin-header nav .button-link { width: auto; min-height: 2.75rem; }
.eyebrow { margin: 0; color: #176b58; font-size: .72rem; font-weight: 700; letter-spacing: .08em; }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.panel { background: rgba(255,255,255,.94); border: 1px solid #d6dfda; border-radius: 7px; padding: 1.25rem; margin-bottom: 1rem; min-width: 0; }
.panel h2 { margin: 0 0 1rem; font-size: 1.15rem; }
#mapa-sede { height: 320px; margin: 0 0 .75rem; border: 1px solid #c5ceca; border-radius: 5px; background: #e7eeea; }
.sede-buscar-fila { display: grid; grid-template-columns: 1fr auto; gap: .6rem; align-items: end; margin-bottom: .35rem; }
.sede-buscar-fila label { margin: 0; }
.sede-buscar-fila button { margin: 0; }
#sede-resultados { list-style: none; margin: 0 0 .75rem; padding: 0; border: 1px solid #dce3df; border-radius: 5px; overflow: hidden; }
.resultado-lugar { display: block; width: 100%; padding: .65rem .75rem; border: 0; border-bottom: 1px solid #e5eae7; border-radius: 0; background: #fff; color: #202a31; font-weight: 550; text-align: left; }
#sede-resultados li:last-child .resultado-lugar { border-bottom: 0; }
.resultado-lugar:hover { background: #f3f7f5; }
.form-grid, .filter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .25rem .9rem; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid button, .filter-grid button { align-self: end; margin-bottom: 1rem; }
.filter-grid { grid-template-columns: repeat(5, minmax(120px, 1fr)); align-items: end; }
.filter-grid.personal { grid-template-columns: repeat(3, minmax(140px, 220px)); justify-content: start; }
.total-periodo { margin: 0; font-size: .95rem; }
.tag { display: inline-block; padding: .12rem .5rem; border-radius: 999px; font-size: .75rem; font-weight: 700; text-transform: uppercase; }
.tag.entrada, .tag.leido { background: #e5f4ee; color: #176b58; }
.tag.salida { background: #f8eee6; color: #8a4b12; }
.tag.pendiente, .tag.abierta { background: #fdecea; color: #a12d24; }
.tag.resuelta, .tag.aceptada { background: #e5f4ee; color: #176b58; }
.tag.rechazada { background: #f8eee6; color: #8a4b12; }
.acciones-tabla { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.acciones-tabla form { margin: 0; }
a.button-small { min-height: 0; }
.sede-opciones { border: 1px solid #dce3df; border-radius: 5px; padding: .75rem .9rem .35rem; margin: 0 0 1rem; }
.sede-opciones legend { font-size: .9rem; font-weight: 600; padding: 0 .25rem; }
.sede-opciones label { display: flex; gap: .55rem; align-items: center; font-weight: 550; margin: 0 0 .45rem; }
.sede-opciones input { width: 1.15rem; height: 1.15rem; margin: 0; padding: 0; flex: 0 0 auto; }
.acciones-ausencia { display: flex; flex-wrap: wrap; gap: .55rem; }
.form-grid .acciones-ausencia button { width: auto; margin: 0; }
button.rechazar { background: #a12d24; }
.tag.retirado { background: #eef0ef; color: #596660; }
.estado { font-weight: 650; }
.estado.ok { color: #176b58; }
.estado.curso { color: #8a4b12; }
.estado.falta { color: #a12d24; }
.filter-grid label { margin: 0; }
.filter-grid button { margin: 0; min-height: 43px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid #dce3df; border-radius: 5px; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; white-space: nowrap; }
th, td { padding: .7rem .75rem; border-bottom: 1px solid #e5eae7; text-align: left; }
td.wrap { white-space: normal; min-width: 12rem; }
th { background: #edf2ef; color: #42514a; font-size: .78rem; }
tbody tr:last-child td { border-bottom: 0; }
.button-small { width: auto; padding: .4rem .65rem; font-size: .8rem; }
.comunicado { padding-top: 1rem; margin-top: 1rem; border-top: 1px solid #e5eae7; }
.comunicado:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.comunicado h3 { margin: 0 0 .35rem; font-size: 1.05rem; }
.comunicado-cuerpo { white-space: pre-wrap; overflow-wrap: anywhere; background: #f7faf8; border: 1px solid #dce3df; border-radius: 5px; padding: .9rem 1rem; margin: .75rem 0 1rem; }
.comunicado-acciones { display: flex; flex-wrap: wrap; gap: .65rem; align-items: center; margin: .75rem 0 1rem; }
.comunicado-acciones .table-note, .comunicado-acciones a:not(.button-link) { margin: 0; }
.filtro-tipos { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 1rem; }
.filtro-tipos .button-link { background: #fff; color: #176b58; border: 1px solid #b7ddd0; min-height: 2.5rem; }
.filtro-tipos .button-link.activo { background: #176b58; color: #fff; }
.comunicado-pdf { width: 100%; height: 70vh; border: 1px solid #dce3df; border-radius: 5px; background: #fff; margin: 0 0 1rem; }
.comunicado-png { display: block; max-width: 100%; height: auto; border: 1px solid #dce3df; border-radius: 5px; background: #fff; margin: 0 0 1rem; }
input[type="file"] { padding: .45rem; background: #fff; }
.check-acuse { display: flex; gap: .65rem; align-items: flex-start; font-weight: 650; margin-bottom: .8rem; }
.check-acuse input { width: 1.15rem; height: 1.15rem; margin: .15rem 0 0; padding: 0; flex: 0 0 auto; }
.comunicado details summary { cursor: pointer; color: #176b58; font-weight: 650; }
.section-heading { margin-bottom: 1rem; }
.section-heading h2 { margin: 0; }
.table-note { margin: 0 0 .75rem; }
@media (max-width: 850px) {
	.filter-grid, .filter-grid.personal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
	body { padding: max(.7rem, env(safe-area-inset-top)) max(.7rem, env(safe-area-inset-right)) max(.7rem, env(safe-area-inset-bottom)) max(.7rem, env(safe-area-inset-left)); }
	.card { margin: 0 auto; padding: 1.15rem; }
	.admin-grid, .form-grid, .filter-grid, .filter-grid.personal, .sede-buscar-fila { grid-template-columns: 1fr; }
	.admin-header { align-items: flex-start; flex-direction: column; }
	.admin-header nav { padding-bottom: .4rem; }
	.panel { padding: 1rem; }
	.section-heading { align-items: flex-start; flex-direction: column; }
	.form-grid button, .filter-grid button, .sede-buscar-fila button { width: 100%; }
	.form-grid .acciones-ausencia button { flex: 1 1 calc(50% - .55rem); width: auto; }
	#mapa-sede { height: 240px; }
	.comunicado-pdf { height: 55vh; }
	.comunicado-acciones .button-link, .filtro-tipos .button-link { flex: 1 1 calc(50% - .45rem); text-align: center; }
	th, td { padding: .55rem .6rem; }
}
