/* Ajustes finales de claridad visual para el espacio de cliente. */
.sidebar footer span,
.topbar-user,
.project-switcher,
.client-project-context-name,
.client-project-context .nav-link,
.client-portal-project-table th,
.client-portal-project-table td,
.client-service-chips span,
.client-project-state,
.project-status,
.service-readiness {
	font-weight: 500 !important;
}

.sidebar footer small,
.project-switcher small,
.client-project-overview-item small,
.client-project-head > div > p,
.client-portal-head > div > p,
.client-service-card p,
.client-next-step p,
.client-project-activity p,
.client-portal-projects .muted,
.client-portal-appointments .muted {
	font-weight: 400 !important;
}

.client-project-head h1,
.client-portal-head h1 {
	font-size: clamp(1.65rem, 2.2vw, 2rem) !important;
	font-weight: 600 !important;
	letter-spacing: -0.025em;
}

.client-project-head .eyebrow,
.client-portal-head .eyebrow,
.client-next-step .eyebrow,
.client-service-card .eyebrow {
	font-size: .72rem;
	font-weight: 600 !important;
	letter-spacing: .055em;
}

.client-project-overview-item > span,
.client-project-overview-item strong,
.client-service-card h2,
.client-project-activity h2,
.client-portal-projects h2,
.client-portal-appointments h2,
.client-next-step h2 {
	font-weight: 600 !important;
}

.client-service-card h2,
.client-project-activity h2,
.client-next-step h2 {
	font-size: 1.05rem !important;
	letter-spacing: -0.012em;
}

.client-project-head .primary,
.client-project-head .secondary,
.client-portal-head .primary,
.client-portal-head .secondary,
.client-next-step .primary,
.client-service-card .primary,
.client-service-card .secondary,
.client-project-activity .primary,
.client-project-activity .secondary,
.client-portal-projects .primary,
.client-portal-projects .secondary,
.client-portal-appointments .secondary {
	font-size: .84rem !important;
	font-weight: 500 !important;
}

.client-project-overview-item strong {
	font-size: .98rem !important;
}

.client-business-settings .section-heading {
	margin-bottom: 1.25rem;
}

.client-business-settings .form-grid {
	align-items: start;
	column-gap: 18px;
	row-gap: 22px;
}

.client-business-settings .business-field {
	display: grid;
	grid-template-rows: 21px minmax(42px, auto) 19px;
	gap: 6px;
	min-width: 0;
}

.client-business-settings .business-field > label {
	margin: 0;
	color: #334155;
	font-size: .875rem;
	font-weight: 500;
}

.client-business-settings .business-field > input,
.client-business-settings .business-field > select,
.client-business-settings .business-field > textarea {
	width: 100%;
	margin: 0;
}

.client-business-settings .business-field > textarea {
	min-height: 7rem;
}

.client-business-settings .business-field > small {
	margin: 0;
	color: #64748b;
	font-size: .78rem;
	font-weight: 400;
	line-height: 1.35;
}

.client-business-settings .business-field.wide {
	grid-template-rows: 21px auto 19px;
}

.client-business-settings textarea {
	min-height: 7rem;
}

.client-business-settings label small,
.project-setting-toggle small {
	display: block;
	margin-top: .38rem;
	font-size: .78rem;
	font-weight: 400;
	color: var(--muted, #6b7280);
}

.project-setting-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem 1.1rem;
	border: 1px solid #e5e7eb;
	border-radius: .5rem;
	background: #fafbfc;
}

.project-setting-toggle strong {
	display: block;
	font-size: .9rem;
	font-weight: 600;
}

.whatsapp-onboarding {
	padding: 1.25rem;
}

.onboarding-status {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
}

.onboarding-status h2 {
	margin: .15rem 0 .45rem;
	font-size: 1.18rem;
	font-weight: 600;
}

.onboarding-steps {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: .75rem;
	padding: 0;
	margin: 1.25rem 0 0;
	list-style: none;
}

.onboarding-steps li {
	display: flex;
	align-items: flex-start;
	gap: .55rem;
	padding: .8rem;
	border: 1px solid #e5e7eb;
	border-radius: .5rem;
	background: #fff;
	color: #334155;
	font-size: .86rem;
	font-weight: 500;
}

.onboarding-steps li > span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 1.45rem;
	height: 1.45rem;
	border-radius: 50%;
	background: #eef2ff;
	color: #4f46e5;
	font-size: .74rem;
	font-weight: 600;
}

.onboarding-steps small {
	display: block;
	margin-top: .22rem;
	color: #64748b;
	font-size: .76rem;
	font-weight: 400;
	line-height: 1.35;
}

.switch-control {
	display: inline-flex;
	align-items: center;
	gap: .55rem;
	margin: 0;
	white-space: nowrap;
	font-size: .84rem;
	font-weight: 500;
	cursor: pointer;
}

.switch-control input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.switch-control > span[aria-hidden="true"] {
	position: relative;
	width: 2.25rem;
	height: 1.25rem;
	border-radius: 999px;
	background: #cbd5e1;
	transition: background .18s ease;
}

.switch-control > span[aria-hidden="true"]::after {
	position: absolute;
	top: .16rem;
	left: .16rem;
	width: .93rem;
	height: .93rem;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 2px rgba(15, 23, 42, .24);
	content: '';
	transition: transform .18s ease;
}

.switch-control input:checked + span[aria-hidden="true"] { background: #635bff; }
.switch-control input:checked + span[aria-hidden="true"]::after { transform: translateX(1rem); }
.switch-control input:focus-visible + span[aria-hidden="true"] { outline: 2px solid #635bff; outline-offset: 3px; }
.switch-control input:disabled + span[aria-hidden="true"] { opacity: .5; }
.switch-control:has(input:disabled) { cursor: not-allowed; color: #94a3b8; }
.switch-label { font-weight: 500; }

.form-submit-row {
	display: flex;
	justify-content: flex-end;
	margin-top: .25rem;
}

.client-business-settings .form-submit-row .primary {
	width: auto;
	min-width: 10.5rem;
	font-weight: 500 !important;
}

.client-document-upload .section-heading,
.client-documents-list .section-heading {
	margin-bottom: 1.25rem;
}

.client-document-upload .form-grid {
	align-items: start;
}

.document-file-field,
.document-channel-note {
	display: flex;
	flex-direction: column;
	gap: .4rem;
}

.document-file-field > span,
.document-channel-note > span {
	font-size: .84rem;
	font-weight: 500;
	color: #334155;
}

.document-file-field input[type="file"] {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	clip-path: inset(50%);
}

.document-file-picker {
	display: flex;
	align-items: center;
	gap: .7rem;
	min-height: 2.75rem;
	padding: .38rem .5rem;
	border: 1px solid #d8dee8;
	border-radius: .5rem;
	background: #fff;
	cursor: pointer;
}

.document-file-picker > span {
	display: inline-flex;
	align-items: center;
	min-height: 2rem;
	padding: 0 .75rem;
	border-radius: .38rem;
	background: #f3f4f6;
	color: #243047;
	font-size: .82rem;
	font-weight: 500;
}

.document-file-picker strong {
	overflow: hidden;
	color: #64748b;
	font-size: .84rem;
	font-weight: 400;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.document-file-picker:hover,
.document-file-field input[type="file"]:focus-visible + .document-file-picker {
	border-color: #635bff;
	box-shadow: 0 0 0 3px rgba(99, 91, 255, .12);
}

.document-file-field small,
.document-channel-note small {
	font-size: .78rem;
	font-weight: 400;
	color: #718096;
}

.document-channel-note {
	justify-content: center;
	min-height: 4.9rem;
}

.checkbox-row {
	display: flex;
	align-items: flex-start;
	gap: .55rem;
	font-size: .84rem;
	font-weight: 400;
	line-height: 1.45;
	color: #475569;
}

.checkbox-row input {
	margin-top: .18rem;
	accent-color: #635bff;
}

.document-review-reason {
	display: block;
	margin-top: .28rem;
	max-width: 24rem;
	font-size: .76rem;
}

.document-actions {
	display: flex;
	flex-wrap: wrap;
	gap: .45rem;
	min-width: 10rem;
}

.document-actions form {
	margin: 0;
}

.document-actions .secondary {
	min-height: 2rem;
	padding: .35rem .65rem;
	font-size: .8rem;
}

.knowledge-document {
	border: 1px solid #dce4ed;
	border-radius: .55rem;
	background: #fff;
}

.knowledge-document summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: .9rem 1rem;
	cursor: pointer;
	color: #243047;
	font-size: .9rem;
	font-weight: 500;
}

.knowledge-document summary small {
	color: #718096;
	font-size: .78rem;
	font-weight: 400;
}

.knowledge-document > p {
	margin: 0;
	padding: 0 1rem 1rem;
	color: #526174;
	font-size: .86rem;
	line-height: 1.55;
}

.document-channel-note strong {
	font-size: .92rem;
	font-weight: 500;
}

.client-document-upload .form-submit-row .primary {
	width: auto;
	min-width: 10.5rem;
	font-weight: 500 !important;
}

.client-document-upload .form-submit-row .primary:disabled {
	cursor: not-allowed;
	opacity: .5;
}

.client-documents-empty {
	padding: .5rem 0 .15rem;
}

.client-documents-empty h3 {
	margin: 0 0 .35rem;
	font-size: .98rem;
	font-weight: 600;
}

.client-documents-empty p {
	max-width: 42rem;
	margin: 0;
	font-weight: 400;
	color: #64748b;
}

/* Información para la IA: el cliente añade contenido y Holania gestiona la capacidad. */
.knowledge-summary { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.knowledge-summary h2 { margin: .15rem 0 .35rem !important; }
.knowledge-summary p:not(.eyebrow) { max-width: 52rem; margin: 0; color: #64748b; }
.knowledge-status { display: inline-flex; flex: 0 0 auto; align-items: center; gap: .42rem; padding: .45rem .7rem; border-radius: 999px; background: #fff8e8; color: #925f0c; font-size: .78rem; font-weight: 500; white-space: nowrap; }
.knowledge-status > span { width: .48rem; height: .48rem; border-radius: 50%; background: currentColor; }
.knowledge-status.is-ready { background: #effaf5; color: #16835f; }
.knowledge-channel-usage { display: grid; gap: .75rem; }
.knowledge-channel-usage > section { padding: .8rem; border: 1px solid #e2e8f0; border-radius: .65rem; background: #fbfcfe; }
.knowledge-channel-usage > section > strong { display: block; margin-bottom: .65rem; color: #334155; font-size: .86rem; }
.knowledge-usage-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.knowledge-usage-grid div { min-width: 0; }
.knowledge-usage-grid span,.knowledge-usage-grid b { display: block; }
.knowledge-usage-grid span { margin-bottom: .18rem; color: #718096; font-size: .72rem; }
.knowledge-usage-grid b { overflow-wrap: anywhere; color: #243047; font-size: .82rem; }
.knowledge-no-capacity { margin: 0; padding: .85rem; border-radius: .55rem; background: #fff8e8; color: #7a5410; font-size: .84rem; }
.knowledge-process { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: hidden; background: #fff; }
.knowledge-process article { display: grid; grid-template-columns: 2rem 1fr; align-items: center; gap: .7rem; padding: .8rem 1rem; }
.knowledge-process article + article { border-left: 1px solid #e1e6ed; }
.knowledge-process article > span { display: grid; width: 2rem; height: 2rem; place-items: center; border: 1px solid #c9e7dc; border-radius: 50%; background: #f2fbf7; color: #16835f; font-size: .8rem; font-weight: 600; }
.knowledge-process strong,.knowledge-process small { display: block; }
.knowledge-process strong { color: #334155; font-size: .82rem; }
.knowledge-process small { margin-top: .1rem; color: #718096; font-size: .72rem; line-height: 1.35; }
.knowledge-upload-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.knowledge-upload-form > .document-file-field,.knowledge-upload-form > .knowledge-policy,.knowledge-upload-form > .form-submit-row { grid-column: 1 / -1; }
.knowledge-plan-field,.knowledge-replace-field { display: grid; align-content: start; gap: .38rem; }
.knowledge-plan-field small,.knowledge-replace-field small { color: #718096; font-size: .76rem; }
.knowledge-replace-field { grid-column: 1 / -1; max-width: 36rem; }
.field-optional { color: #94a3b8; font-weight: 400; }
.document-channel-note { min-height: 0; padding: .8rem .9rem; border: 1px solid #e2e8f0; border-radius: .6rem; background: #fbfcfe; }
.document-file-drop { display: grid; min-height: 9rem; place-items: center; align-content: center; gap: .24rem; padding: 1.25rem; border: 1px dashed #b9c4d2; border-radius: .7rem; background: #fbfcfe; color: #526174; text-align: center; cursor: pointer; transition: border-color .18s ease,background .18s ease,box-shadow .18s ease; }
.document-file-drop:hover,.document-file-drop.is-dragging,.document-file-field input[type="file"]:focus-visible + .document-file-drop { border-color: #635bff; background: #f8f7ff; box-shadow: 0 0 0 3px rgba(99,91,255,.1); }
.document-upload-icon { display: grid; width: 2.15rem; height: 2.15rem; margin-bottom: .15rem; place-items: center; border-radius: 50%; background: #eeecff; color: #5b52dc; font-size: 1.15rem; }
.document-file-drop strong { color: #334155; font-size: .9rem; }
.document-file-drop > span:not(.document-upload-icon) { font-size: .8rem; }
.document-file-drop small { font-size: .74rem; }
.document-selected { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.2rem; padding: .8rem .9rem; border: 1px solid #b9e6d6; border-radius: .65rem; background: #f4fbf8; }
.document-selected[hidden],.document-file-drop[hidden] { display: none !important; }
.document-selected > div { min-width: 0; }
.document-selected strong,.document-selected small { display: block; }
.document-selected strong { overflow: hidden; color: #334155; text-overflow: ellipsis; white-space: nowrap; }
.document-selected small { margin-top: .2rem; color: #64748b; }
.knowledge-policy { padding: .85rem .95rem; border: 1px solid #e2e8f0; border-radius: .65rem; background: #fbfcfe; }
.knowledge-policy details { margin: .55rem 0 0 1.55rem; color: #64748b; font-size: .76rem; }
.knowledge-policy summary { cursor: pointer; }
.knowledge-policy p { margin: .4rem 0 0; line-height: 1.5; }
.client-document-upload .form-submit-row { align-items: center; justify-content: space-between; gap: 1rem; margin-top: 0; }
.client-document-upload .form-submit-row > span { color: #718096; font-size: .76rem; }
.knowledge-unavailable { border-style: dashed; background: #fbfcfe; }
.knowledge-unavailable h2 { margin-bottom: .4rem; }
.knowledge-unavailable p { max-width: 48rem; color: #64748b; }
.client-documents-empty { display: grid; justify-items: center; padding: 2rem 1rem; text-align: center; }
.client-documents-empty > span { display: grid; width: 2.5rem; height: 2.5rem; margin-bottom: .7rem; place-items: center; border-radius: 50%; background: #f0efff; color: #635bff; font-size: 1.25rem; }
.client-documents-empty .secondary { margin-top: 1rem; text-decoration: none; }
.document-file-meta { display: block; margin-top: .22rem; font-size: .74rem; }
.document-status { white-space: nowrap; }
.document-status.is-available { border-color: #b9e6d6 !important; background: #effaf5 !important; color: #176b4d !important; }
.document-status.is-ready-to-analyze { border-color: #c9c5ff !important; background: #f2f0ff !important; color: #5149d5 !important; }
.document-status.is-requires-review,.document-status.is-pending-review { border-color: #efd397 !important; background: #fff8e8 !important; color: #925f0c !important; }
.document-status.is-rejected { border-color: #efc0c0 !important; background: #fff1f1 !important; color: #a21c1c !important; }
.knowledge-secondary-grid { display: grid; gap: .75rem; }
.knowledge-secondary-grid .card { margin: 0 !important; padding: 0 !important; overflow: hidden; }
.knowledge-secondary > summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.15rem; cursor: pointer; list-style: none; }
.knowledge-secondary > summary::-webkit-details-marker { display: none; }
.knowledge-secondary > summary span,.knowledge-secondary > summary strong,.knowledge-secondary > summary small { display: block; }
.knowledge-secondary > summary strong { color: #334155; font-size: .88rem; }
.knowledge-secondary > summary small { margin-top: .18rem; color: #718096; font-size: .76rem; font-weight: 400; }
.knowledge-secondary > summary > b { color: #64748b; font-size: 1rem; transition: transform .18s ease; }
.knowledge-secondary[open] > summary { border-bottom: 1px solid #e8edf2; }
.knowledge-secondary[open] > summary > b { transform: rotate(180deg); }
.knowledge-secondary > .knowledge-channel-usage,.knowledge-secondary > .knowledge-no-capacity { margin: 1rem; }

/* Soporte del cliente: solicitudes legibles, estados traducidos y acción proporcionada. */
.client-support-create .section-heading,.client-support-history .section-heading { margin-bottom: 1.1rem; }
.support-request-form textarea { min-height: 8.5rem; }
.support-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.support-form-footer p { max-width: 42rem; margin: 0; color: #718096; font-size: .78rem; }
.support-form-footer .primary { width: auto; min-width: 10.5rem; }
.support-request-count { display: inline-flex; align-items: center; min-height: 2rem; padding: .3rem .7rem; border: 1px solid #e1e6ed; border-radius: 999px; background: #f8fafc; color: #64748b; font-size: .76rem; font-weight: 500; white-space: nowrap; }
.support-request-list { display: grid; gap: .75rem; }
.support-request-item { display: grid; grid-template-columns: minmax(0,1fr) minmax(16rem,.42fr); gap: 1.5rem; padding: 1rem; border: 1px solid #e1e6ed; border-radius: .7rem; background: #fff; }
.support-request-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.support-request-title h3 { margin: 0 !important; color: #243047; }
.support-request-main > p { max-width: 52rem; margin: .55rem 0 0; color: #526174; font-size: .84rem; line-height: 1.55; overflow-wrap: anywhere; }
.support-request-meta { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem 1rem; margin: 0; padding-left: 1.25rem; border-left: 1px solid #e8edf2; }
.support-request-meta div { min-width: 0; }
.support-request-meta dt { margin-bottom: .12rem; color: #718096; font-size: .7rem; font-weight: 500; text-transform: uppercase; letter-spacing: .035em; }
.support-request-meta dd { margin: 0; overflow-wrap: anywhere; color: #334155; font-size: .78rem; }
.support-status { white-space: nowrap; }
.support-status.is-open { border-color: #efd397 !important; background: #fff8e8 !important; color: #925f0c !important; }
.support-status.is-in-progress { border-color: #c9c5ff !important; background: #f2f0ff !important; color: #5149d5 !important; }
.support-status.is-resolved { border-color: #b9e6d6 !important; background: #effaf5 !important; color: #176b4d !important; }
.support-empty { display: grid; justify-items: center; padding: 2rem 1rem; text-align: center; }
.support-empty > span { display: grid; width: 2.5rem; height: 2.5rem; margin-bottom: .7rem; place-items: center; border-radius: 50%; background: #f0efff; color: #635bff; font-size: 1.1rem; font-weight: 600; }
.support-empty h3 { margin: 0 0 .3rem !important; }
.support-empty p,.support-readonly p { max-width: 44rem; margin: 0; color: #64748b; }
.support-readonly { border-style: dashed; background: #fbfcfe; }

.client-agenda-head .action-row {
	align-items: center;
}
.client-agenda-sections { margin-bottom: 1.2rem !important; }
.agenda-location-selector { display: flex; align-items: end; gap: .65rem; max-width: 46rem; margin-bottom: .35rem; }
.agenda-location-selector label,.agenda-location-selector select { width: 100%; }
.agenda-location-help { margin: 0 0 1rem; color: #718096; font-size: .76rem; }
.agenda-view-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 0 1rem; }
.agenda-view-toolbar h2 { margin: 0; color: #243047; font-size: 1.05rem; }
.agenda-view-toolbar p { margin: .25rem 0 0; color: #718096; font-size: .8rem; }
.agenda-view-toolbar .view-tabs { flex: 0 0 auto; }
.agenda-view-actions { display: flex; align-items: center; justify-content: flex-end; gap: .65rem; flex: 1; flex-wrap: wrap; }
.agenda-quick-search { display: flex; align-items: center; width: min(100%,31rem); }
.agenda-quick-search .sr-only { position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.agenda-quick-search input { width: 100%; min-height: 2.45rem; padding: .55rem .7rem; border: 1px solid #d8dee8; border-right: 0; border-radius: .45rem 0 0 .45rem; background: #fff; color: #243047; }
.agenda-quick-search input:focus { position: relative; z-index: 1; border-color: #635bff; outline: 2px solid rgba(99,91,255,.13); }
.agenda-quick-search .secondary { min-height: 2.45rem !important; border-radius: 0 .45rem .45rem 0 !important; white-space: nowrap; }
.services-team-intro { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.services-team-intro h2 { margin: .15rem 0 .25rem; }
.services-team-intro p { margin-bottom: 0; }

.appointment-search-card .section-heading { align-items: center; margin-bottom: 1rem; }
.appointment-result-count { display: inline-flex; align-items: center; min-height: 2rem; padding: .3rem .65rem; border: 1px solid #dedcfb; border-radius: .4rem; background: #f5f4ff; color: #5149d5; font-size: .76rem; font-weight: 600; white-space: nowrap; }
.appointment-search-form { display: grid; grid-template-columns: minmax(16rem,1.7fr) minmax(11rem,.75fr) minmax(9rem,.55fr) minmax(9rem,.55fr) auto; gap: .75rem; align-items: end; margin-bottom: 1rem; padding: 1rem; border: 1px solid #e1e6ed; border-radius: .65rem; background: #f8fafc; }
.appointment-search-form label { display: grid; gap: .35rem; color: #475569; font-size: .75rem; font-weight: 500; }
.appointment-search-form input,.appointment-search-form select { width: 100%; min-height: 2.45rem; border: 1px solid #d8dee8; border-radius: .4rem; background: #fff; color: #243047; }
.appointment-search-actions { display: flex; gap: .45rem; align-items: center; }
.appointment-search-actions .primary,.appointment-search-actions .secondary { min-height: 2.45rem !important; white-space: nowrap; }
.appointment-search-empty { display: grid; justify-items: center; padding: 2.25rem 1rem; border: 1px dashed #d8dee8; border-radius: .65rem; background: #fbfcfe; text-align: center; }
.appointment-search-empty strong { color: #334155; }
.appointment-search-empty p { margin: .3rem 0 0; color: #718096; }
.appointment-search-results { border: 1px solid #e1e6ed !important; border-radius: .65rem !important; }
.appointment-search-results td > strong,.appointment-search-results td > small { display: block; }
.appointment-search-results td > small { margin-top: .15rem; color: #718096; font-size: .72rem; }
.appointment-search-results tr.is-cancelled td { background: #fafbfc; color: #718096; }
.appointment-search-results tr.is-cancelled td:nth-child(-n+4) { text-decoration: line-through; }
.appointment-status { display: inline-flex; align-items: center; min-height: 1.65rem; padding: .18rem .45rem; border: 1px solid #d8dee8; border-radius: .35rem; background: #f8fafc; color: #526174; font-size: .7rem; font-weight: 600; white-space: nowrap; }
.appointment-status--confirmed,.appointment-status--completed { border-color: #b9e6d6; background: #effaf5; color: #176b4d; }
.appointment-status--pending,.appointment-status--awaiting_confirmation,.appointment-status--reschedule_requested { border-color: #efd397; background: #fff8e8; color: #925f0c; }
.appointment-status--cancelled,.appointment-status--no_show { border-color: #d8dee8; background: #f1f5f9; color: #64748b; }
.appointment-row-actions { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.appointment-row-actions .secondary { min-height: 2rem !important; padding: .35rem .55rem !important; font-size: .72rem !important; white-space: nowrap; }
.appointment-row-actions form { margin: 0; }
.appointment-detail-panel { margin: 0 0 1rem; padding: 1rem; scroll-margin-top: 1rem; border: 1px solid #c9c5ff; border-radius: .65rem; background: #fbfaff; box-shadow: 0 8px 24px rgba(81,73,213,.07); }
.appointment-detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: .85rem; border-bottom: 1px solid #e3e0ff; }
.appointment-detail-heading .eyebrow { margin: 0 0 .15rem; color: #635bff; }
.appointment-detail-heading h3 { margin: 0; color: #243047; font-size: 1.05rem; }
.appointment-detail-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .85rem 1.25rem; margin: 1rem 0; }
.appointment-detail-grid div { min-width: 0; }
.appointment-detail-grid dt { margin-bottom: .2rem; color: #718096; font-size: .68rem; font-weight: 600; letter-spacing: .035em; text-transform: uppercase; }
.appointment-detail-grid dd { margin: 0; overflow-wrap: anywhere; color: #334155; font-size: .8rem; }
.appointment-detail-grid .appointment-detail-notes { grid-column: 1/-1; padding-top: .75rem; border-top: 1px solid #ebe9ff; }
.appointment-detail-actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.appointment-detail-actions form { margin: 0; }
.appointment-management-grid { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(17rem,.7fr); gap: 1rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #e3e0ff; }
.appointment-edit-panel,.appointment-state-panel { min-width: 0; border: 1px solid #e1e6ed; border-radius: .65rem; background: #fff; }
.appointment-edit-panel summary { padding: .85rem 1rem; color: #334155; font-size: .82rem; font-weight: 600; cursor: pointer; }
.appointment-edit-panel[open] summary { border-bottom: 1px solid #e8edf2; }
.appointment-edit-form { padding: 0 1rem 1rem; }
.appointment-state-panel { padding: 1rem; }
.appointment-state-panel h4,.appointment-history h4 { margin: 0 0 .3rem; color: #334155; font-size: .9rem; }
.appointment-state-panel > p { margin: 0 0 .8rem; color: #718096; font-size: .75rem; }
.appointment-state-actions { display: flex; align-items: stretch; flex-direction: column; gap: .45rem; }
.appointment-state-actions form,.appointment-state-actions button { width: 100%; margin: 0; }
.appointment-communication-note { margin: 1rem 0 0; padding: .75rem .85rem; border: 1px solid #dbe6ef; border-radius: .55rem; background: #f8fafc; color: #5b6b7f; font-size: .75rem; line-height: 1.5; }
.appointment-history { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #e3e0ff; }
.appointment-history ol { display: grid; gap: 0; margin: .7rem 0 0; padding: 0; list-style: none; }
.appointment-history li { display: grid; grid-template-columns: 8rem minmax(0,1fr) minmax(8rem,.5fr); gap: .75rem; padding: .6rem 0; border-top: 1px solid #ebeef3; color: #526174; font-size: .75rem; }
.appointment-history li span,.appointment-history li small { color: #718096; }
.appointment-history li strong { color: #334155; font-weight: 500; }
.appointment-message-history { margin-top: 1rem; border: 1px solid #e1e6ed; border-radius: .65rem; background: #fff; }
.appointment-message-history summary { padding: .8rem 1rem; color: #334155; font-size: .8rem; font-weight: 600; cursor: pointer; }
.appointment-message-history ol { display: grid; gap: .55rem; max-height: 22rem; margin: 0; padding: 0 1rem 1rem; overflow: auto; list-style: none; }
.appointment-message-history li { max-width: 80%; padding: .65rem .75rem; border-radius: .55rem; background: #f1f5f9; }
.appointment-message-history li.is-outbound { margin-left: auto; background: #f0efff; }
.appointment-message-history span { color: #718096; font-size: .68rem; }
.appointment-message-history p { margin: .25rem 0 0; color: #334155; font-size: .77rem; line-height: 1.45; }
.appointment-pagination { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; }
.appointment-pagination p { margin: 0; color: #718096; font-size: .76rem; }
.appointment-pagination nav { display: flex; align-items: center; gap: .55rem; }
.appointment-pagination nav span { color: #526174; font-size: .76rem; white-space: nowrap; }
.appointment-pagination .secondary { min-height: 2.1rem !important; padding: .35rem .6rem !important; font-size: .74rem !important; }

.agenda-metrics-card {
	padding: 1.15rem 1.25rem !important;
}

.agenda-metrics-heading {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 1rem;
}

.agenda-metrics-heading h2 {
	margin: 0 0 .2rem !important;
}

.agenda-metrics-heading p {
	margin: 0 !important;
}

.agenda-metrics-period {
	display: flex;
	align-items: end;
	gap: .45rem;
	flex: 0 0 auto;
}

.agenda-metrics-period label {
	display: grid;
	gap: .2rem;
	color: #526174;
	font-size: .7rem;
	font-weight: 600;
}

.agenda-metrics-period select {
	min-width: 7.5rem;
	min-height: 2.25rem !important;
	padding: .35rem 1.8rem .35rem .55rem;
}

.agenda-metrics-grid {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	margin-top: 1rem;
	border-top: 1px solid #e1e6ed;
	border-bottom: 1px solid #e1e6ed;
}

.agenda-metrics-grid article {
	min-width: 0;
	padding: .85rem .9rem;
	border-right: 1px solid #e1e6ed;
}

.agenda-metrics-grid article:last-child {
	border-right: 0;
}

.agenda-metrics-grid span,
.agenda-metrics-grid small {
	display: block;
	color: #718096;
	font-size: .68rem;
	line-height: 1.35;
}

.agenda-metrics-grid strong {
	display: block;
	margin: .2rem 0 .15rem;
	color: #243047;
	font-size: 1.35rem;
	font-weight: 600;
	line-height: 1.2;
}

.agenda-metrics-grid .is-positive strong { color: #16725f; }
.agenda-metrics-grid .is-warning strong { color: #9a6511; }
.agenda-metrics-grid .is-danger strong { color: #a83232; }

.agenda-metrics-context {
	display: flex;
	justify-content: space-between;
	gap: .75rem 1.5rem;
	margin: .75rem 0 0 !important;
	color: #526174 !important;
	font-size: .72rem !important;
}

@media (max-width: 1100px) {
	.agenda-metrics-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.agenda-metrics-grid article:nth-child(3n) { border-right: 0; }
	.agenda-metrics-grid article:nth-child(-n + 3) { border-bottom: 1px solid #e1e6ed; }
}

.client-agenda-calendar {
	margin-bottom: 18px;
}

.client-agenda-calendar .section-heading {
	align-items: center;
	margin-bottom: 1.25rem;
}

.client-agenda-calendar .client-calendar-controls {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: .65rem;
	flex-wrap: wrap;
}

.client-agenda-calendar .calendar-cancelled-toggle {
	min-height: 2.25rem !important;
	font-size: .76rem !important;
}

.client-agenda-calendar .calendar-toolbar {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	gap: 1rem;
	margin: 1rem 0 1.25rem !important;
}

.client-agenda-calendar .calendar-toolbar h3 {
	margin: 0;
	color: #243047;
	font-size: 1rem;
	font-weight: 600;
	text-align: center;
}

.client-agenda-calendar .calendar-toolbar .secondary {
	display: inline-flex;
	width: auto;
	min-width: 0;
	min-height: 2.3rem;
	align-items: center;
	justify-content: center;
	padding: 0 .7rem;
	font-size: .76rem;
	text-decoration: none;
	white-space: nowrap;
}

.client-agenda-calendar .calendar-pagination {
	display: flex;
	gap: .45rem;
	justify-self: start;
}

.client-agenda-calendar .calendar-pagination .calendar-today {
	width: auto;
	padding: 0 .7rem;
	font-size: .78rem;
}

.client-agenda-calendar .calendar-month-picker {
	display: flex;
	align-items: end;
	justify-self: end;
	gap: .45rem;
}

.client-agenda-calendar .calendar-month-picker label {
	display: grid;
	gap: .2rem;
	color: #526174;
	font-size: .7rem;
	font-weight: 600;
}

.client-agenda-calendar .calendar-month-picker input[type="month"] {
	min-height: 2.3rem;
	margin: 0;
	padding: .35rem .55rem;
	border: 1px solid #d8dee8;
	border-radius: .45rem;
	background: #fff;
	color: #243047;
	font: inherit;
}

.client-agenda-calendar .calendar-grid,
.client-agenda-calendar .week-grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	overflow: hidden;
	border: 1px solid #d8dee8;
	border-radius: .65rem;
	background: #fff;
}

.client-agenda-calendar .calendar-grid > *,
.client-agenda-calendar .week-grid > * {
	min-width: 0;
}

.client-agenda-calendar .calendar-weekday,
.client-agenda-calendar .week-heading {
	padding: .65rem .35rem;
	border-bottom: 1px solid #d8dee8;
	background: #f8fafc;
	color: #64748b;
	font-size: .75rem;
	font-weight: 500;
	text-align: center;
}

.client-agenda-calendar .calendar-day {
	min-height: 5.9rem;
	padding: .55rem;
	border-right: 1px solid #e7ebf0;
	border-bottom: 1px solid #e7ebf0;
	background: #fff;
}

.client-agenda-calendar .calendar-day:nth-child(7n),
.client-agenda-calendar .week-column:nth-child(7n) {
	border-right: 0;
}

.client-agenda-calendar .calendar-day:nth-last-child(-n + 7) {
	border-bottom: 0;
}

.client-agenda-calendar .calendar-day.is-empty {
	background: #fbfcfe;
}

.client-agenda-calendar .calendar-day-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .35rem;
}

.client-agenda-calendar .calendar-day-heading > span {
	color: #475569;
	font-size: .78rem;
	font-weight: 500;
}

.client-agenda-calendar .calendar-day-create {
	display: inline-grid;
	width: 1.35rem;
	height: 1.35rem;
	place-items: center;
	border-radius: .3rem;
	color: #6558e8;
	font-size: .9rem;
	font-weight: 600;
	text-decoration: none;
}

.client-agenda-calendar .calendar-day-create:hover,
.client-agenda-calendar .calendar-day-create:focus-visible {
	background: #f0efff;
}

.client-agenda-calendar .calendar-empty-day-action {
	display: grid;
	min-height: 3.25rem;
	margin-top: .35rem;
	place-items: center;
	border: 1px dashed #d8d4ff;
	border-radius: .4rem;
	color: #6b63c9;
	font-size: .67rem;
	text-decoration: none;
}

.client-agenda-calendar .calendar-empty-day-action:hover,
.client-agenda-calendar .calendar-empty-day-action:focus-visible {
	border-color: #8478f2;
	background: #f8f7ff;
}

.client-agenda-calendar .calendar-event,
.client-agenda-calendar .week-event {
	display: grid;
	gap: .1rem;
	margin-top: .4rem;
	padding: .35rem .4rem;
	border-radius: .35rem;
	background: #eeedff;
	color: #5149d5;
	font-size: .72rem;
	font-weight: 500;
	line-height: 1.25;
	text-decoration: none;
}

.client-agenda-calendar .calendar-event {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.client-agenda-calendar .calendar-event:hover,
.client-agenda-calendar .calendar-event:focus-visible,
.client-agenda-calendar .week-event:hover,
.client-agenda-calendar .week-event:focus-visible {
	box-shadow: 0 0 0 2px rgba(101, 88, 232, .18);
	transform: translateY(-1px);
}

.client-agenda-calendar .status-confirmed { border-left: 3px solid #16a085; background: #eaf8f4; color: #16725f; }
.client-agenda-calendar .status-pending { border-left: 3px solid #d79a16; background: #fff8e8; color: #8b620b; }
.client-agenda-calendar .status-awaiting-confirmation { border-left: 3px solid #7c6ee6; background: #f1efff; color: #5a50bd; }
.client-agenda-calendar .status-reschedule-requested { border-left: 3px solid #dd6b20; background: #fff3e8; color: #9a4b16; }
.client-agenda-calendar .status-completed { border-left: 3px solid #3b82f6; background: #edf5ff; color: #2f65a9; }
.client-agenda-calendar .status-no-show { border-left: 3px solid #64748b; background: #f1f5f9; color: #526174; }
.client-agenda-calendar .status-cancelled { border-left: 3px solid #94a3b8; background: #f1f5f9; color: #64748b; }

.client-agenda-calendar .calendar-event.is-cancelled,
.client-agenda-calendar .week-event.is-cancelled {
	border: 1px dashed #cbd5e1;
	background: #f1f5f9 !important;
	color: #64748b !important;
}

.client-agenda-calendar .is-cancelled .calendar-event-copy {
	text-decoration: line-through;
}

.client-agenda-calendar .calendar-event-status {
	display: block;
	margin-top: .12rem;
	color: #64748b;
	font-size: .62rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
}

.client-agenda-calendar .calendar-more-link,
.client-agenda-calendar .week-day-create {
	display: block;
	margin-top: .4rem;
	color: #6558e8;
	font-size: .66rem;
	font-weight: 600;
	text-decoration: none;
}

.client-agenda-calendar .calendar-more-link:hover,
.client-agenda-calendar .week-day-create:hover {
	text-decoration: underline;
}

.client-agenda-calendar .calendar-status-legend {
	display: flex;
	align-items: center;
	gap: .5rem .9rem;
	flex-wrap: wrap;
	margin: -.35rem 0 .75rem;
	color: #526174;
	font-size: .68rem;
}

.client-agenda-calendar .calendar-status-legend span {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	border: 0;
	background: none;
}

.client-agenda-calendar .calendar-status-legend span::before {
	width: .55rem;
	height: .55rem;
	border-radius: 50%;
	background: currentColor;
	content: "";
}

.client-agenda-calendar .week-column {
	min-height: 11rem;
	padding: .55rem;
	border-right: 1px solid #e7ebf0;
	background: #fff;
}

.client-agenda-calendar .week-event strong {
	font-size: .72rem;
	font-weight: 600;
}

.client-agenda-calendar .week-event span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.client-manual-reservation .section-heading {
	margin-bottom: 1.25rem;
}

.client-service-settings {
	margin-bottom: 18px;
}

.client-reminder-settings {
	margin-bottom: 18px;
}

.client-reminder-settings .section-heading {
	margin-bottom: 1.15rem;
}

.client-reminder-form {
	align-items: end;
}

.reminder-readiness {
	border: 1px solid #fde2e2;
	border-left: 3px solid #e38a8a;
	background: #fffafa;
	border-radius: 8px;
	padding: .8rem 1rem;
	margin: 0 0 1rem;
}

.reminder-readiness.is-ready {
	border-color: #cfe9df;
	border-left-color: #28a57a;
	background: #f7fcfa;
}

.reminder-readiness .eyebrow {
	margin: 0 0 .2rem;
	font-size: .72rem;
	font-weight: 600;
}

.reminder-readiness p:last-child {
	margin: 0;
	font-size: .88rem;
	line-height: 1.45;
}

.reminder-enable {
	display: flex !important;
	align-items: flex-start;
	gap: .7rem;
	padding: .9rem 1rem;
	border: 1px solid #e2e8f0;
	border-radius: .65rem;
	background: #fbfcfe;
}

.reminder-enable input,
.reminder-opt-in input,
.reminder-same-day input {
	width: 1rem;
	min-height: 1rem;
	margin: .15rem 0 0;
}

.reminder-enable span {
	display: grid;
	gap: .2rem;
}

.reminder-enable strong {
	font-size: .9rem;
	font-weight: 500;
}

.reminder-enable small,
.client-reminder-unavailable {
	color: #64748b;
	font-size: .82rem;
	font-weight: 400;
}

.reminder-same-day,
.reminder-opt-in {
	display: flex !important;
	align-items: flex-start;
	gap: .55rem;
	padding-top: .65rem;
	font-weight: 400 !important;
}

.client-reminder-unavailable {
	max-width: 52rem;
	margin: 0;
}

.client-service-settings .section-heading {
	margin-bottom: 1.25rem;
}

.client-service-create {
	align-items: end;
	padding: 1rem;
	border: 1px solid #e2e8f0;
	border-radius: .65rem;
	background: #fbfcfe;
}

.client-service-create .form-submit-row {
	justify-content: flex-start;
	margin: 0;
}

.client-service-list {
	display: grid;
	gap: .65rem;
	margin-top: 1rem;
}

.client-service-row {
	display: grid;
	grid-template-columns: minmax(12rem, 1.7fr) minmax(7rem, .8fr) minmax(8rem, .9fr) auto auto;
	align-items: end;
	gap: .75rem;
	padding: .85rem 1rem;
	border: 1px solid #e2e8f0;
	border-radius: .65rem;
	background: #fff;
}

.client-service-row label {
	display: grid;
	gap: .35rem;
	margin: 0;
	color: #475569;
	font-size: .78rem;
	font-weight: 500;
}

.client-service-row input,
.client-service-row select {
	min-height: 2.45rem;
	margin: 0;
}

.client-service-toggle {
	display: flex !important;
	align-items: center;
	gap: .4rem !important;
	min-height: 2.45rem;
	white-space: nowrap;
}

.client-service-toggle input {
	width: 1rem;
	min-height: 1rem;
	margin: 0;
}

.client-service-row .secondary {
	min-height: 2.45rem;
	white-space: nowrap;
}

.client-service-empty {
	margin: 1rem 0 0;
	color: #64748b;
}

.field-optional {
	color: #718096;
	font-size: .78rem;
	font-weight: 400;
}

.client-chat-preview {
	display: grid;
	gap: .7rem;
}

.client-chat-preview p {
	margin: 0;
}

.client-chat-preview-launcher {
	display: inline-flex;
	justify-self: start;
	align-items: center;
	gap: .45rem;
	padding: .8rem 1rem;
	border-radius: .5rem;
	background: var(--chat-color, #10b7d2);
	box-shadow: 0 .55rem 1.2rem rgba(10, 32, 50, .15);
	color: #fff;
	font-size: .9rem;
	font-weight: 600;
}

.client-chat-preview-left { justify-self: start; }
.client-chat-preview-right { justify-self: end; }

.chat-color-section { display: grid; gap: .7rem; }
.field-label { margin: 0; color: #334155; font-size: .84rem; font-weight: 500; }
.chat-color-controls { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .7rem; }
.chat-color-control { display: grid; gap: .35rem; margin: 0; color: #475569; font-size: .78rem; font-weight: 500; }
.chat-color-input { display: flex; align-items: center; min-height: 2.5rem; gap: .5rem; padding: .25rem .45rem; border: 1px solid #d8dee8; border-radius: .5rem; background: #fff; }
.chat-color-input input[type="color"] { width: 2rem; height: 2rem; min-height: 0; padding: 0; border: 0; border-radius: .32rem; background: transparent; cursor: pointer; }
.chat-color-input output { color: #64748b; font-size: .75rem; font-weight: 500; }
.chat-avatar-upload { display: grid; gap: .4rem; }
.chat-avatar-upload input[type="file"] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.chat-avatar-upload .document-file-picker { margin: 0; }
.chat-avatar-upload small { color: #718096; font-size: .78rem; font-weight: 400; }
.chat-avatar-upload-error { min-height: 1.1rem; color: #b42318; font-size: .8rem; font-weight: 500; }
.chat-avatar-current { display: inline-flex; align-items: center; gap: .5rem; color: #64748b; font-size: .8rem; font-weight: 400; }
.chat-avatar-current img,
.chat-avatar-preview { width: 1.45rem; height: 1.45rem; border-radius: 50%; object-fit: cover; vertical-align: middle; }
.avatar-crop-modal { position: fixed; z-index: 2147483646; inset: 0; display: grid; place-items: center; padding: 1rem; background: rgba(15, 23, 42, .5); }
.avatar-crop-modal[hidden] { display: none; }
.avatar-crop-dialog { width: min(100%, 29rem); padding: 1.4rem; border-radius: .8rem; background: #fff; box-shadow: 0 1.5rem 4rem rgba(15, 23, 42, .28); }
.avatar-crop-dialog h2 { margin: .15rem 0 .3rem; font-size: 1.15rem; font-weight: 600; }
.avatar-crop-dialog header p { margin: 0; }
.avatar-crop-canvas-wrap { display: grid; place-items: center; margin: 1.2rem 0 1rem; }
.avatar-crop-canvas-wrap canvas { width: min(100%, 18rem); height: auto; border-radius: .65rem; cursor: grab; touch-action: none; }
.avatar-crop-canvas-wrap canvas:active { cursor: grabbing; }
.avatar-crop-zoom { display: grid; gap: .4rem; margin: 0; color: #334155; font-size: .84rem; font-weight: 500; }
.avatar-crop-zoom input { width: 100%; accent-color: #635bff; }
.avatar-crop-actions { justify-content: flex-end; margin-top: 1.15rem; }
.client-chat-preview-window { width: min(100%, 22rem); overflow: hidden; border: 1px solid #dbe5ec; border-radius: .75rem; background: var(--preview-background, #f4fafc); box-shadow: 0 .55rem 1.2rem rgba(10, 32, 50, .08); }
.client-chat-preview-window header { display: grid; gap: .1rem; padding: .8rem 1rem; background: var(--preview-header, #10b7d2); color: #fff; }
.client-chat-preview-window header strong { font-size: .86rem; font-weight: 600; }
.client-chat-preview-window header small { opacity: .86; font-size: .72rem; }
.client-chat-preview-messages { display: grid; gap: .55rem; min-height: 6.5rem; padding: .9rem; }
.preview-message { max-width: 84%; padding: .55rem .68rem; border-radius: .55rem; color: #142033; font-size: .78rem; line-height: 1.35; box-shadow: 0 1px 4px rgba(18,42,60,.08); }
.preview-assistant { background: var(--preview-assistant, #fff); }
.preview-visitor { justify-self: end; background: var(--preview-visitor, #edf8fb); }
.client-chat-preview-composer { display: flex; justify-content: space-between; gap: .8rem; padding: .65rem .8rem; border-top: 1px solid #dbe5ec; background: #fff; color: #94a3b8; font-size: .75rem; }
.client-chat-preview-composer span { color: var(--preview-launcher, #10b7d2); font-weight: 600; }

/* Configurador guiado del Chat web. */
.chat-setup-steps {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin: 0 0 1rem;
	border: 1px solid #e2e7ef;
	border-radius: .75rem;
	background: #fff;
	overflow: hidden;
}
.chat-setup-steps a {
	display: grid;
	grid-template-columns: 2rem 1fr;
	grid-template-rows: auto auto;
	align-items: center;
	gap: .05rem .65rem;
	min-width: 0;
	padding: .85rem 1rem;
	border-right: 1px solid #e7ebf1;
	color: #526176;
	text-decoration: none;
}
.chat-setup-steps a:last-child { border-right: 0; }
.chat-setup-steps a > span {
	display: grid;
	grid-row: 1 / 3;
	place-items: center;
	width: 2rem;
	height: 2rem;
	border: 1px solid #d8dee8;
	border-radius: 50%;
	background: #f8fafc;
	font-size: .78rem;
	font-weight: 600;
}
.chat-setup-steps strong { color: #273449; font-size: .84rem; font-weight: 600; }
.chat-setup-steps small { overflow: hidden; color: #718096; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.chat-setup-steps a.is-current { background: #f6f5ff; }
.chat-setup-steps a.is-complete > span { border-color: #a9ddca; background: #effaf5; color: #16714e; }
.chat-setup-steps a.is-available > span { border-color: #c9c6f5; background: #f7f6ff; color: #6259cc; }
.chat-setup-steps a.is-current > span { border-color: #635bff; background: #635bff; color: #fff; }
.client-chat-builder {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(22rem, .85fr);
	align-items: start;
	gap: 1rem;
	margin-bottom: 1rem;
}
.client-chat-config,
.client-chat-builder .client-chat-preview { margin: 0 !important; }
.client-chat-builder .client-chat-preview { position: sticky; top: 1rem; gap: 1rem; }
.chat-card-heading { margin-bottom: .9rem; }
.chat-card-heading .eyebrow { margin-bottom: .2rem !important; }
.chat-card-heading h2 { margin: 0 0 .3rem !important; }
.chat-card-heading p { margin: 0 !important; }
.client-chat-style-form { display: grid; }
.chat-form-section {
	display: grid;
	gap: .8rem;
	min-width: 0;
	margin: 0;
	padding: 1rem 0;
	border: 0;
	border-top: 1px solid #e7ebf1;
}
.chat-form-section legend { padding: 0; color: #273449; font-size: .9rem; font-weight: 600; }
.chat-form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: .9rem; }
.chat-form-grid > label { align-self: start; }
.chat-form-stack { display: grid; gap: .85rem; }
.chat-form-grid label,
.chat-form-stack label { display: grid; gap: .35rem; color: #334155; font-size: .82rem; font-weight: 500; }
.chat-form-grid input,
.chat-form-stack input,
.chat-form-stack select { width: 100%; min-height: 2.65rem; padding: .6rem .75rem; border: 1px solid #ccd6e0; border-radius: .55rem; background: #fff; font: inherit; }
.chat-form-stack label > small { color: #718096; font-size: .75rem; font-weight: 400; }
.chat-primary-color { max-width: 16rem; }
.chat-advanced-colors { border: 1px solid #e1e6ed; border-radius: .6rem; background: #fbfcfe; }
.chat-advanced-colors summary { padding: .75rem .85rem; color: #445269; font-size: .8rem; font-weight: 600; cursor: pointer; }
.chat-advanced-colors > p { margin: 0; padding: 0 .85rem .75rem; color: #718096; font-size: .75rem; }
.chat-advanced-colors .chat-color-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 .85rem .85rem; }
.chat-form-section .access-toggle { display: grid; gap: .3rem; margin: 0; }
.chat-form-section .access-toggle small { margin-left: 1.45rem; color: #718096; font-size: .75rem; font-weight: 400; }
.chat-form-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1rem; border-top: 1px solid #e7ebf1; }
.chat-form-actions .primary { width: auto !important; min-width: 10.5rem; }
.chat-save-status { color: #64748b; font-size: .77rem; }
.chat-save-status.is-dirty { color: #9a5d0b; }
.chat-preview-stage {
	position: relative;
	min-height: 30rem;
	overflow: hidden;
	border: 1px solid #dce3eb;
	border-radius: .7rem;
	background: linear-gradient(145deg, #f8fafc, #edf3f7);
}
.chat-preview-stage.client-chat-preview-left,
.chat-preview-stage.client-chat-preview-right { justify-self: stretch; }
.chat-preview-page { position: absolute; inset: 0; padding: 1.4rem; opacity: .65; }
.chat-preview-page:before { display: block; width: 42%; height: .8rem; margin-bottom: 1.1rem; border-radius: 99px; background: #dbe3ea; content: ""; }
.chat-preview-page span { display: block; width: 72%; height: .5rem; margin: .55rem 0; border-radius: 99px; background: #e0e7ed; }
.chat-preview-page span:nth-child(2) { width: 57%; }
.chat-preview-page span:nth-child(3) { width: 65%; }
.chat-preview-stage .client-chat-preview-window,
.chat-preview-stage .client-chat-preview-launcher { position: absolute; z-index: 1; transition: left .2s ease, right .2s ease, opacity .2s ease; }
.chat-preview-stage .client-chat-preview-window { bottom: 5.6rem; width: min(calc(100% - 2rem), 22rem); }
.chat-preview-stage .client-chat-preview-launcher { bottom: 1.2rem; max-width: calc(100% - 2rem); }
.chat-preview-stage.client-chat-preview-right .client-chat-preview-window,
.chat-preview-stage.client-chat-preview-right .client-chat-preview-launcher { right: 1rem; left: auto; }
.chat-preview-stage.client-chat-preview-left .client-chat-preview-window,
.chat-preview-stage.client-chat-preview-left .client-chat-preview-launcher { right: auto; left: 1rem; }
.chat-preview-stage.is-paused .client-chat-preview-window,
.chat-preview-stage.is-paused .client-chat-preview-launcher { opacity: .55; }
.chat-preview-stage.is-paused:after { position: absolute; z-index: 2; inset: auto 1rem 1rem; padding: .55rem .7rem; border-radius: .45rem; background: rgba(30, 41, 59, .88); color: #fff; content: "Vista previa del chat pausado"; font-size: .75rem; text-align: center; }
.chat-install-card { margin-top: 0 !important; }
.chat-install-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.chat-install-heading .eyebrow { margin-bottom: .2rem !important; }
.chat-install-heading h2 { margin: 0 0 .3rem !important; }
.chat-install-heading p { margin: 0 !important; }
.chat-install-code { display: grid; gap: .4rem; color: #334155; font-size: .82rem; font-weight: 500; }
.chat-install-code textarea { width: 100%; min-height: 5.4rem; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .75rem; }
.chat-install-card.is-locked { border-style: dashed; background: #fbfcfe; }
.chat-install-actions { margin-bottom: .8rem; }
.chat-install-actions .secondary { text-decoration: none; }
.chat-install-code-details { margin: .9rem 0; border: 1px solid #e1e6ed; border-radius: .6rem; background: #fbfcfe; }
.chat-install-code-details summary { padding: .75rem .85rem; color: #445269; font-size: .8rem; font-weight: 600; cursor: pointer; }
.chat-install-code-details > p { margin: 0; padding: 0 .85rem .7rem; color: #718096; font-size: .78rem; }
.chat-install-code-details .chat-install-code { padding: 0 .85rem .85rem; }
.chat-install-result { margin: 0 !important; padding: .65rem .75rem; border-radius: .5rem; background: #f7f9fb; color: #64748b; font-size: .78rem; }
.chat-install-result.is-checking { background: #f6f5ff; color: #5149d5; }
.chat-install-result.is-success { background: #effaf5; color: #16714e; }
.chat-install-result.is-warning { background: #fff8e8; color: #925f0c; }

@media (max-width: 1100px) {
	.appointment-search-form { grid-template-columns: repeat(2,minmax(0,1fr)); }
	.appointment-search-main { grid-column: 1/-1; }
	.appointment-search-actions { justify-content: flex-end; }
	.appointment-detail-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
	.appointment-management-grid { grid-template-columns: 1fr; }
	.client-chat-builder { grid-template-columns: 1fr; }
	.client-chat-builder .client-chat-preview { position: static; }
	.chat-preview-stage { min-height: 27rem; }
}

@media (max-width: 640px) {
	.chat-setup-steps a { grid-template-columns: 1.8rem 1fr; padding: .7rem .55rem; }
	.chat-setup-steps a > span { width: 1.8rem; height: 1.8rem; }
	.chat-setup-steps small { display: none; }
	.chat-form-grid { grid-template-columns: 1fr; }
	.chat-advanced-colors .chat-color-controls { grid-template-columns: 1fr; }
	.chat-form-actions { align-items: stretch; flex-direction: column; }
	.chat-form-actions .primary { width: 100% !important; }
	.chat-preview-stage { min-height: 25rem; }
	.chat-install-heading { flex-direction: column; }
}

/* Estados de facturación: el color complementa al texto, no lo sustituye. */
.subscription-status { font-weight: 500 !important; }
.badge.subscription-status.is-active { border-color: #b9e6d6 !important; background: #effaf5 !important; color: #176b4d !important; }
.badge.subscription-status.is-ending { border-color: #efd397 !important; background: #fff8e8 !important; color: #925f0c !important; }
.subscription-cancellation-note { color: #718096; font-size: .84rem; font-weight: 400; }

.client-project-delete-zone,
.project-danger-zone { border-color: #f0d2d2 !important; background: #fffdfd !important; }
.client-project-delete-zone { margin-top: 1.1rem; }
.client-project-delete-zone .section-heading { margin-bottom: .25rem; }
.client-project-delete-zone h2,
.project-danger-zone h2 { margin-bottom: .35rem; font-size: 1.02rem !important; font-weight: 600 !important; }
.client-project-delete-zone p,
.project-danger-zone p { max-width: 52rem; }
.danger,
.form-grid button.danger { border: 1px solid #c44444 !important; background: #c44444 !important; color: #fff !important; font-weight: 500 !important; }
.danger:hover,
.danger:focus-visible,
.danger:active,
.form-grid button.danger:hover,
.form-grid button.danger:focus-visible,
.form-grid button.danger:active {
	border-color: #a83232 !important;
	background: #a83232 !important;
	color: #fff !important;
	-webkit-text-fill-color: #fff !important;
}
.project-danger-zone { margin-top: 1.1rem; }
.project-danger-zone .form-grid { max-width: 34rem; }

/* La lista operativa muestra planes reales, no módulos técnicos internos. */
.project-plan-chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.project-plan-chips .badge { font-weight: 500 !important; }
.badge.project-list-status { font-weight: 500 !important; }
.badge.project-list-status.is-active { border-color: #b9e6d6 !important; background: #effaf5 !important; color: #176b4d !important; }
.badge.project-list-status.is-paused { border-color: #efd397 !important; background: #fff8e8 !important; color: #925f0c !important; }
.badge.project-list-status.is-draft { border-color: #cbd5e1 !important; background: #f8fafc !important; color: #64748b !important; }
.project-list-statuses { display: flex; flex-wrap: wrap; gap: .45rem; min-width: 12rem; }
.badge.whatsapp-list-status { font-weight: 500 !important; }
.badge.whatsapp-list-status.is-ready { border-color: #b9e6d6 !important; background: #effaf5 !important; color: #176b4d !important; }
.badge.whatsapp-list-status.is-pending { border-color: #efd397 !important; background: #fff8e8 !important; color: #925f0c !important; }
.badge.whatsapp-list-status.is-error { border-color: #efc0c0 !important; background: #fff1f1 !important; color: #a21c1c !important; }

/* Jerarquía tipográfica común a los paneles de propietario y cliente.
   400 para lectura, 500 para controles/estados y 600 para información principal. */
body,
p,
small,
input,
select,
textarea { font-weight: 400 !important; }

h1,
h2,
h3,
.page-head h1,
.section-heading h2,
.card > h2 { font-weight: 600 !important; }

strong,
.table-wrap strong,
.table-wrap td:first-child strong { font-weight: 600 !important; }

label,
.form-grid label,
.field-label,
.table-wrap thead th,
.metric-card span,
.badge,
.subscription-status,
.sidebar nav a.active,
.client-project-context-name,
.project-switcher { font-weight: 500 !important; }

.primary,
.secondary,
button,
.form-grid button:not(.password-field button),
.action-row a { font-weight: 500 !important; }

.table-wrap thead th { font-weight: 600 !important; }

.metric-card strong,
.kpis strong { font-weight: 600 !important; }

/* Facturación: consulta compacta por defecto y acciones situadas junto a su estado. */
.billing-card-actions { display: flex; align-items: center; gap: .7rem; }
.billing-card-actions .inline-form { margin: 0; }
.billing-payment-card .section-heading { align-items: center; margin-bottom: 0; }
.billing-profile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem 2rem; margin: 1rem 0 0; }
.billing-profile-grid div { min-width: 0; }
.billing-profile-grid dt { margin-bottom: .25rem; color: #718096; font-size: .78rem; font-weight: 500; }
.billing-profile-grid dd { margin: 0; overflow-wrap: anywhere; color: #243047; font-size: .92rem; font-weight: 400; }
.billing-profile-actions { display: flex; justify-content: flex-start; margin-top: 1rem; }
.billing-invoice-amount { white-space: normal; }
.billing-invoice-amount span,.billing-invoice-amount small { display: block; }
.billing-invoice-amount span { color: #334155; font-size: .84rem; }
.billing-invoice-amount small { color: #64748b; font-size: .78rem; margin-top: .15rem; }
.billing-metrics { grid-template-columns: repeat(2, minmax(180px, 1fr)) !important; max-width: 42rem; }
.billing-metrics .metric-card { min-height: 118px !important; }
.billing-metrics .metric-card span { margin-top: 10px !important; }

@media (max-width: 640px) {
	.billing-card-actions { align-items: stretch; flex-direction: column; }
	.billing-card-actions .inline-form,
	.billing-card-actions button { width: 100%; }
	.billing-payment-card .section-heading { align-items: flex-start; }
	.billing-profile-grid { grid-template-columns: 1fr; gap: .85rem; }
	.billing-profile-actions { justify-content: stretch; }
	.billing-profile-actions .secondary { width: 100%; text-align: center; }
	.billing-metrics { grid-template-columns: 1fr !important; max-width: none; }
}

@media (max-width: 640px) {
	.onboarding-status { flex-direction: column; }
	.onboarding-steps { grid-template-columns: 1fr; }
	.project-setting-toggle { align-items: flex-start; flex-direction: column; }
	.form-submit-row { justify-content: stretch; }
	.client-business-settings .form-submit-row .primary { width: 100%; }
	.document-file-picker { align-items: flex-start; flex-direction: column; gap: .3rem; }
	.client-document-upload .form-submit-row .primary { width: 100%; }
	.appointment-search-form { grid-template-columns: 1fr; }
	.appointment-search-main { grid-column: auto; }
	.appointment-search-actions { justify-content: stretch; }
	.appointment-search-actions > * { flex: 1; text-align: center; }
	.agenda-view-toolbar,.services-team-intro { align-items: stretch; flex-direction: column; }
	.agenda-view-actions { align-items: stretch; justify-content: flex-start; flex-direction: column; }
	.agenda-view-toolbar .view-tabs { align-self: flex-start; }
	.agenda-quick-search { width: 100%; }
	.agenda-location-selector { align-items: stretch; flex-direction: column; }
	.appointment-detail-grid { grid-template-columns: 1fr; }
	.appointment-detail-grid .appointment-detail-notes { grid-column: auto; }
	.appointment-detail-heading { align-items: flex-start; }
	.appointment-detail-actions > * { flex: 1; text-align: center; }
	.appointment-history li { grid-template-columns: 1fr; gap: .15rem; }
	.appointment-pagination { align-items: stretch; flex-direction: column; }
	.appointment-pagination nav { justify-content: space-between; }
	.agenda-metrics-heading { align-items: stretch; flex-direction: column; }
	.agenda-metrics-period,.agenda-metrics-period label { width: 100%; }
	.agenda-metrics-period select { width: 100%; }
	.agenda-metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.agenda-metrics-grid article { border-bottom: 1px solid #e1e6ed; }
	.agenda-metrics-grid article:nth-child(3n) { border-right: 1px solid #e1e6ed; }
	.agenda-metrics-grid article:nth-child(2n) { border-right: 0; }
	.agenda-metrics-grid article:nth-last-child(-n + 2) { border-bottom: 0; }
	.agenda-metrics-context { align-items: flex-start; flex-direction: column; }
	.client-agenda-head .action-row { width: 100%; }
	.client-agenda-head .action-row a { flex: 1; text-align: center; }
	.client-agenda-calendar .section-heading { align-items: flex-start; }
	.client-agenda-calendar .calendar-toolbar { grid-template-columns: 1fr; }
	.client-agenda-calendar .calendar-toolbar h3 { grid-row: 1; }
	.client-agenda-calendar .calendar-pagination { grid-row: 2; justify-self: stretch; }
	.client-agenda-calendar .calendar-pagination > * { flex: 1; }
	.client-agenda-calendar .calendar-month-picker { grid-row: 3; justify-self: stretch; }
	.client-agenda-calendar .calendar-month-picker label { flex: 1; }
	.client-agenda-calendar .calendar-month-picker input[type="month"] { width: 100%; }
	.client-agenda-calendar .calendar-day { min-height: 4.65rem; padding: .32rem; }
	.client-agenda-calendar .calendar-weekday,
	.client-agenda-calendar .week-heading { padding: .5rem .15rem; font-size: .64rem; }
	.client-agenda-calendar .calendar-event { padding: .28rem; font-size: .62rem; }
	.client-agenda-calendar .calendar-event-status { display: none; }
	.client-agenda-calendar .calendar-empty-day-action { min-height: 2.4rem; font-size: .6rem; }
	.client-agenda-calendar .calendar-day-create { width: 1.2rem; height: 1.2rem; }
	.client-agenda-calendar .calendar-status-legend { gap: .4rem .65rem; }
	.client-agenda-calendar .week-column { min-height: 7rem; padding: .3rem; }
	.client-agenda-calendar .week-event { padding: .28rem; font-size: .62rem; }
	.client-service-row { grid-template-columns: 1fr 1fr; align-items: end; }
	.client-service-row .client-service-toggle { grid-column: 1; }
	.client-service-row .secondary { grid-column: 2; }
	.client-service-create .form-submit-row .secondary { width: 100%; }
	.client-reminder-form .form-submit-row .secondary { width: 100%; }
	.chat-advanced-colors .chat-color-controls { grid-template-columns: 1fr; }
	.knowledge-summary { align-items: flex-start; flex-direction: column; }
	.knowledge-process,.knowledge-upload-form,.knowledge-usage-grid { grid-template-columns: 1fr; }
	.knowledge-process article + article { border-top: 1px solid #e1e6ed; border-left: 0; }
	.knowledge-upload-form > * { grid-column: 1 !important; }
	.document-selected,.client-document-upload .form-submit-row { align-items: stretch; flex-direction: column; }
	.client-document-upload .form-submit-row .primary { width: 100%; }
	.support-form-footer,.support-request-title { align-items: stretch; flex-direction: column; }
	.support-form-footer .primary { width: 100%; }
	.support-request-item { grid-template-columns: 1fr; gap: 1rem; }
	.support-request-meta { padding: 1rem 0 0; border-top: 1px solid #e8edf2; border-left: 0; }
}
