/* ============================================================
   matrimonio.claugarcia.mx
   Capa de aplicación sobre el tema de claugarcia.mx.
   Reutiliza los tokens de /assets/css/custom.css sin tocarlos.
   ============================================================ */

:root {
	--radio-card: 20px;
	--radio-pill: 999px;
	--sombra-suave: 0 2px 24px rgba(90, 80, 68, .08);
	--sombra-media: 0 8px 40px rgba(90, 80, 68, .14);
	--ok-color: #636A55;
	--medio-color: #B08968;
	--alerta-color: #A8543F;
}

/* ------------------------------------------------------------------ base */

body.app-body {
	background-color: var(--bg-color);
	font-family: var(--default-font);
	color: var(--primary-color);
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.app-body h1, .app-body h2, .app-body h3, .app-body h4 {
	font-family: var(--accent-font);
	color: var(--primary-color);
	font-weight: 500;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--primary-color);
	color: var(--white-color);
	padding: 12px 20px;
	z-index: 999;
}
.skip-link:focus { left: 0; }

.app-main {
	flex: 1 0 auto;
	padding: 40px 0 72px;
}

/* ---------------------------------------------------------------- header */

.app-header {
	background: var(--secondary-color);
	border-bottom: 1px solid var(--divider-color);
	position: sticky;
	top: 0;
	z-index: 50;
}

.app-header-inner {
	display: flex;
	align-items: center;
	gap: 24px;
	padding: 14px 0;
	flex-wrap: wrap;
}

.app-brand {
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
}
.app-brand img { height: 36px; width: auto; }
.app-brand-tag {
	font-size: 11px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--accent-color);
	border-left: 1px solid var(--divider-color);
	padding-left: 12px;
}

.app-nav {
	display: flex;
	gap: 6px;
	margin-left: auto;
	flex-wrap: wrap;
}

.app-nav-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 16px;
	border-radius: var(--radio-pill);
	font-size: 14px;
	font-weight: 500;
	color: var(--primary-color);
	text-decoration: none;
	transition: background .25s ease, color .25s ease;
}
.app-nav-link:hover { background: var(--bg-color); color: var(--accent-color); }
.app-nav-link.is-active { background: var(--primary-color); color: var(--secondary-color); }
.app-nav-link i { font-size: 13px; }

.app-user {
	display: flex;
	align-items: center;
	gap: 12px;
	padding-left: 16px;
	border-left: 1px solid var(--divider-color);
}
.app-user-name { font-size: 14px; font-weight: 600; }
.app-logout {
	color: var(--accent-color);
	width: 36px;
	height: 36px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	border: 1px solid var(--divider-color);
	text-decoration: none;
	transition: all .25s ease;
}
.app-logout:hover { background: var(--primary-color); color: var(--secondary-color); }

/* ---------------------------------------------------------------- footer */

.app-footer {
	background: var(--primary-color);
	color: var(--secondary-color);
	padding: 22px 0;
	margin-top: auto;
}
.app-footer p { margin: 0; font-size: 13px; opacity: .75; }

/* ----------------------------------------------------------------- cards */

.card-app {
	background: var(--white-color);
	border-radius: var(--radio-card);
	border: 1px solid var(--divider-color);
	box-shadow: var(--sombra-suave);
	padding: 28px;
	height: 100%;
}
.card-app + .card-app { margin-top: 24px; }

.card-app-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 20px;
	flex-wrap: wrap;
}
.card-app-head h2 { font-size: 22px; margin: 0; }
.card-app-head h3 { font-size: 18px; margin: 0; }

.eyebrow {
	font-size: 11px;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--accent-color);
	font-family: var(--default-font);
	font-weight: 600;
	margin-bottom: 8px;
	display: block;
}

.page-title {
	margin-bottom: 32px;
}
.page-title h1 { font-size: 38px; margin: 0 0 8px; }
.page-title p { color: var(--text-color); margin: 0; max-width: 62ch; }

/* ------------------------------------------------------------ score tiles */

.score-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: 20px;
}

.score-tile {
	background: var(--white-color);
	border: 1px solid var(--divider-color);
	border-radius: var(--radio-card);
	padding: 24px;
	box-shadow: var(--sombra-suave);
	position: relative;
	overflow: hidden;
}
.score-tile::before {
	content: "";
	position: absolute;
	inset: 0 auto 0 0;
	width: 4px;
	background: var(--accent-color);
}
.score-tile.is-bien::before   { background: var(--ok-color); }
.score-tile.is-medio::before  { background: var(--medio-color); }
.score-tile.is-alerta::before { background: var(--alerta-color); }
.score-tile.is-neutro::before { background: var(--divider-color); }

.score-tile .etiqueta {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .12em;
	color: var(--text-color);
	display: block;
	margin-bottom: 10px;
}
.score-tile .valor {
	font-family: var(--accent-font);
	font-size: 42px;
	line-height: 1;
	color: var(--primary-color);
}
.score-tile .valor small { font-size: 18px; color: var(--text-color); }
.score-tile .pie { font-size: 13px; color: var(--text-color); margin-top: 10px; }

.estrellas { letter-spacing: 2px; font-size: 16px; }

/* ----------------------------------------------------------- calendario */

.dias-grid {
	display: grid;
	grid-template-columns: repeat(10, 1fr);
	gap: 8px;
}
@media (max-width: 767px) { .dias-grid { grid-template-columns: repeat(6, 1fr); } }

.dia-celda {
	aspect-ratio: 1;
	border-radius: 12px;
	border: 1px solid var(--divider-color);
	display: grid;
	place-items: center;
	font-size: 12px;
	font-weight: 600;
	color: var(--text-color);
	background: var(--secondary-color);
	text-decoration: none;
	transition: transform .2s ease;
}
.dia-celda:hover { transform: translateY(-2px); color: var(--primary-color); }
.dia-celda.is-bien   { background: #636A5522; border-color: #636A5555; color: #4c5142; }
.dia-celda.is-medio  { background: #B0896822; border-color: #B0896855; color: #8a6a4e; }
.dia-celda.is-alerta { background: #A8543F1f; border-color: #A8543F55; color: #8d4534; }
.dia-celda.is-hoy    { outline: 2px solid var(--accent-color); outline-offset: 2px; }
.dia-celda.is-futuro { opacity: .35; pointer-events: none; }

/* ------------------------------------------------------------- sparkline */

.sparkline { width: 100%; height: 90px; display: block; }
.sparkline .linea { fill: none; stroke: var(--accent-color); stroke-width: 2; stroke-linejoin: round; }
.sparkline .area  { fill: var(--accent-color); opacity: .08; }
.sparkline .punto { fill: var(--accent-color); }
.sparkline .guia  { stroke: var(--divider-color); stroke-width: 1; stroke-dasharray: 3 4; }

/* ------------------------------------------------------ rating (formulario) */

.bloque-categoria {
	border: 1px solid var(--divider-color);
	border-radius: var(--radio-card);
	padding: 24px;
	margin-bottom: 22px;
	background: var(--secondary-color);
}
.bloque-categoria h3 {
	font-size: 19px;
	margin: 0 0 4px;
	display: flex;
	align-items: center;
	gap: 10px;
}
.bloque-categoria .ayuda { color: var(--text-color); font-size: 14px; margin-bottom: 18px; }

.rating {
	display: inline-flex;
	flex-direction: row-reverse;
	gap: 6px;
	margin-bottom: 18px;
}
.rating input { position: absolute; opacity: 0; width: 0; height: 0; }
.rating label {
	cursor: pointer;
	font-size: 30px;
	line-height: 1;
	color: var(--divider-color);
	transition: color .15s ease, transform .15s ease;
}
.rating label::before { content: "\f005"; font-family: "Font Awesome 6 Free"; font-weight: 900; }
.rating input:checked ~ label,
.rating:hover label:hover,
.rating label:hover ~ label { color: var(--accent-color); }
.rating input:checked ~ label { color: var(--accent-color); }
.rating input:focus-visible + label { outline: 2px solid var(--primary-color); outline-offset: 3px; border-radius: 4px; }
.rating label:hover { transform: scale(1.08); }

.rating-valor {
	font-size: 14px;
	color: var(--text-color);
	margin-left: 12px;
	vertical-align: super;
}

label.campo {
	display: block;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--accent-color);
	margin-bottom: 8px;
}

.app-body textarea.form-control,
.app-body input.form-control,
.app-body select.form-control {
	background: var(--white-color);
	border: 1px solid var(--divider-color);
	border-radius: 14px;
	padding: 14px 16px;
	font-size: 15px;
	color: var(--primary-color);
	width: 100%;
	font-family: var(--default-font);
}
.app-body textarea.form-control:focus,
.app-body input.form-control:focus,
.app-body select.form-control:focus {
	outline: none;
	border-color: var(--accent-color);
	box-shadow: 0 0 0 3px rgba(142, 113, 79, .12);
}
.app-body .form-group + .form-group { margin-top: 18px; }
.pista { font-size: 12.5px; color: var(--text-color); margin-top: 6px; }

/* ---------------------------------------------------------- evidencias */

.evidencias-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	gap: 12px;
	margin-top: 16px;
}
.evidencia-item {
	position: relative;
	border-radius: 14px;
	overflow: hidden;
	border: 1px solid var(--divider-color);
	background: var(--secondary-color);
	aspect-ratio: 1;
}
.evidencia-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.evidencia-item figcaption {
	position: absolute;
	inset: auto 0 0 0;
	background: rgba(90, 80, 68, .82);
	color: #fff;
	font-size: 11px;
	padding: 6px 8px;
	line-height: 1.3;
}

.dropzone {
	border: 1.5px dashed var(--divider-color);
	border-radius: 16px;
	padding: 26px;
	text-align: center;
	color: var(--text-color);
	background: var(--white-color);
	cursor: pointer;
	transition: border-color .2s ease, background .2s ease;
}
.dropzone:hover, .dropzone.is-drag { border-color: var(--accent-color); background: var(--secondary-color); }
.dropzone i { font-size: 26px; color: var(--accent-color); display: block; margin-bottom: 10px; }

/* -------------------------------------------------------------- avisos */

.aviso {
	border-radius: 16px;
	padding: 16px 20px;
	font-size: 14.5px;
	margin-bottom: 24px;
	border: 1px solid transparent;
	display: flex;
	gap: 12px;
	align-items: flex-start;
}
.aviso i { margin-top: 2px; }
.aviso a { color: var(--accent-color); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.aviso a:hover { color: var(--primary-color); }
.aviso-ok     { background: #636A5514; border-color: #636A5544; color: #4c5142; }
.aviso-info   { background: var(--secondary-color); border-color: var(--divider-color); color: var(--primary-color); }
.aviso-alerta { background: #A8543F14; border-color: #A8543F44; color: #8d4534; }

.candado {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .1em;
	color: var(--accent-color);
	background: var(--secondary-color);
	border-radius: var(--radio-pill);
	padding: 6px 14px;
}

/* -------------------------------------------------------------- reporte */

.reporte-texto {
	font-family: var(--default-font);
	font-size: 15px;
	line-height: 1.75;
	white-space: pre-wrap;
	word-break: break-word;
	background: var(--secondary-color);
	border: 1px solid var(--divider-color);
	border-radius: var(--radio-card);
	padding: 26px;
	margin: 0;
}
.reporte-texto strong { color: var(--primary-color); }

.tabs-personas {
	display: inline-flex;
	background: var(--secondary-color);
	border-radius: var(--radio-pill);
	padding: 5px;
	gap: 4px;
	margin-bottom: 26px;
}
.tabs-personas a {
	padding: 9px 22px;
	border-radius: var(--radio-pill);
	font-size: 14px;
	font-weight: 600;
	color: var(--primary-color);
	text-decoration: none;
}
.tabs-personas a.is-active { background: var(--primary-color); color: var(--secondary-color); }

/* ------------------------------------------------------------- historial */

.tabla-historial { width: 100%; border-collapse: separate; border-spacing: 0; }
.tabla-historial th {
	text-align: left;
	font-size: 11px;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--text-color);
	font-weight: 600;
	padding: 10px 14px;
	border-bottom: 1px solid var(--divider-color);
	white-space: nowrap;
}
.tabla-historial td {
	padding: 14px;
	border-bottom: 1px solid var(--divider-color);
	font-size: 14.5px;
	vertical-align: top;
}
.tabla-historial tr:last-child td { border-bottom: 0; }
.tabla-wrap { overflow-x: auto; }

/* ---------------------------------------------------------------- login */

.login-wrap {
	min-height: 100vh;
	display: grid;
	place-items: center;
	padding: 40px 20px;
	background:
		radial-gradient(1000px 600px at 15% -10%, #F7F3ED 0%, transparent 60%),
		var(--bg-color);
}
.login-card {
	width: 100%;
	max-width: 430px;
	background: var(--white-color);
	border-radius: 26px;
	border: 1px solid var(--divider-color);
	box-shadow: var(--sombra-media);
	padding: 42px 38px;
	text-align: center;
}
.login-card img { height: 42px; width: auto; margin-bottom: 26px; }
.login-card h1 { font-size: 27px; margin-bottom: 8px; }
.login-card p.sub { color: var(--text-color); font-size: 14.5px; margin-bottom: 28px; }
.login-card .form-group { text-align: left; }
.login-card .btn-default { width: 100%; margin-top: 24px; justify-content: center; }

/* --------------------------------------------------------------- utils */

.mt-32 { margin-top: 32px; }
.mb-0  { margin-bottom: 0; }
.text-muted-app { color: var(--text-color); }

@media (max-width: 991px) {
	.app-header-inner { gap: 14px; }
	.app-nav { width: 100%; order: 3; margin-left: 0; justify-content: space-between; }
	.app-nav-link span { display: none; }
	.app-nav-link { padding: 10px 18px; }
	.app-nav-link i { font-size: 15px; }
	.app-user { margin-left: auto; }
	.page-title h1 { font-size: 30px; }
}
