/* =========================================================================
   CitasPro - Estilos públicos (booking, cuenta, panel admin frontend)
   Enfoque responsive: desktop-first con breakpoints en 1200, 992, 900, 768, 560
   ========================================================================= */

/* -------------------------------------------------------------------------
   VARIABLES GLOBALES
   -------------------------------------------------------------------------
   --cp-header-offset:       distancia para login/formulario público
   --cp-admin-header-offset: distancia para el panel admin (más pequeña)
   Puedes sobreescribirlas desde Apariencia → Personalizar → CSS adicional:
       :root { --cp-header-offset: 150px; --cp-admin-header-offset: 90px; }
   ------------------------------------------------------------------------ */
:root {
	--cp-header-offset: 110px;
	--cp-admin-header-offset: 80px;
}

/* ---------- Variables y reset ---------- */
.citaspro-booking-widget,
#citaspro-account-app,
#citaspro-frontend-admin,
.cp-admin-login-wrapper,
.cp-admin-denied {
	--cp-primary: #0F766E;
	--cp-primary-dark: #0B5C55;
	--cp-primary-tint: rgba(15,118,110,.12);
	--cp-bg: #F5F6F8;
	--cp-bg-solid: #F5F6F8;
	--cp-surface: #FFFFFF;
	--cp-surface-solid: #FFFFFF;
	--cp-text: #14161A;
	--cp-text-soft: #64748B;
	--cp-border: #E4E7EC;
	--cp-radius: 12px;
	--cp-radius-sm: 8px;
	--cp-shadow: 0 1px 3px rgba(0,0,0,.06);
	--cp-shadow-lg: 0 12px 32px rgba(0,0,0,.12);
	--cp-font: inherit;
	--cp-gap: 20px;
	--cp-touch: 44px;
}

.citaspro-booking-widget *,
#citaspro-account-app *,
#citaspro-frontend-admin *,
.cp-admin-login-wrapper *,
.cp-admin-denied *,
.citaspro-booking-widget *::before,
#citaspro-account-app *::before,
#citaspro-frontend-admin *::before,
.cp-admin-login-wrapper *::before,
.cp-admin-denied *::before,
.citaspro-booking-widget *::after,
#citaspro-account-app *::after,
#citaspro-frontend-admin *::after,
.cp-admin-login-wrapper *::after,
.cp-admin-denied *::after {
	box-sizing: border-box;
}

.citaspro-booking-widget,
#citaspro-account-app,
#citaspro-frontend-admin,
.cp-admin-login-wrapper,
.cp-admin-denied {
	font-family: var(--cp-font);
	color: var(--cp-text);
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

/* ---------- Layout contenedor ---------- */
.citaspro-booking-widget {
	display: block;
	width: 100%;
	max-width: 760px;
	margin: 0 auto;
	padding: var(--cp-header-offset, 110px) 16px 20px;
}

#citaspro-account-app {
	display: block;
	width: 100%;
	max-width: 1100px;
	margin: 0 auto;
	padding: var(--cp-header-offset, 110px) 16px 20px;
}

/* =========================================================================
   PANEL ADMIN FRONTEND - CONTENEDOR PRINCIPAL
   -------------------------------------------------------------------------
   El contenedor es transparente para no cubrir la cabecera del tema (que
   puede ser transparente con letras blancas). El fondo claro del plugin
   se dibuja con un pseudo-elemento ::before SOLO a partir del offset
   configurado, dejando libres los primeros píxeles a la cabecera.
   ========================================================================= */
#citaspro-frontend-admin.citaspro-app.citaspro-fullwidth {
	display: block;
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
	padding-top: var(--cp-admin-header-offset, 80px);
	background: transparent;
	min-height: 100vh;
	position: relative;
}

/* Fondo del plugin a partir del offset. Los primeros píxeles quedan
   transparentes para que la cabecera del tema se muestre sobre el fondo
   original del sitio y sus letras sean visibles. */
#citaspro-frontend-admin.citaspro-app.citaspro-fullwidth::before {
	content: '';
	position: absolute;
	top: var(--cp-admin-header-offset, 80px);
	left: 0;
	right: 0;
	bottom: 0;
	background: var(--cp-bg-solid, #F5F6F8);
	pointer-events: none;
	z-index: 0;
}

/* Todo el contenido del panel por encima del pseudo-fondo */
#citaspro-frontend-admin.citaspro-app.citaspro-fullwidth > * {
	position: relative;
	z-index: 1;
}

/* ---------- Botones base ---------- */
.cp-btn,
.citaspro-booking-widget button,
#citaspro-account-app button,
#citaspro-frontend-admin button,
.cp-admin-login-wrapper button,
.cp-admin-denied button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: var(--cp-touch);
	padding: 10px 18px;
	border-radius: var(--cp-radius-sm);
	border: 1px solid transparent;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	cursor: pointer;
	text-decoration: none;
	transition: background-color .15s, border-color .15s, color .15s, transform .05s;
	-webkit-tap-highlight-color: transparent;
}
.cp-btn:active { transform: translateY(1px); }

.cp-btn-primary,
.citaspro-booking-widget button:not(.cpb-secondary):not(.cp-btn-light),
.cpb-primary {
	background: var(--cp-primary, #0F766E);
	color: #ffffff;
}
.cp-btn-primary:hover,
.citaspro-booking-widget button:not(.cpb-secondary):not(.cp-btn-light):hover,
.cpb-primary:hover {
	background: var(--cp-primary-dark, #0B5C55);
	color: #ffffff;
}

.cp-btn-light,
.cpb-secondary,
.citaspro-booking-widget .cpb-secondary {
	background: #F1F5F9;
	color: var(--cp-text, #14161A);
	border-color: var(--cp-border, #E4E7EC);
}
.cp-btn-light:hover,
.cpb-secondary:hover { background: #E2E8F0; color: var(--cp-text, #14161A); }

.cp-btn-block { width: 100%; }

.cp-btn-icon,
#citaspro-frontend-admin .cp-btn-icon {
	min-height: 40px;
	width: 40px;
	height: 40px;
	padding: 0;
	border-radius: 8px;
	background: #fff;
	border: 1px solid var(--cp-border, #E4E7EC);
	color: var(--cp-text-soft, #64748B);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 15px;
	cursor: pointer;
}
.cp-btn-icon:hover { background: var(--cp-bg, #F5F6F8); color: var(--cp-primary, #0F766E); }
.cp-btn-icon.cp-icon-danger { color: #B42318; }
.cp-btn-icon.cp-icon-danger:hover { background: #FDECEC; }
.cp-btn-icon:disabled { opacity: .4; cursor: not-allowed; }

/* ---------- Inputs y formularios ---------- */
.cp-input,
.citaspro-booking-widget input:not([type=checkbox]):not([type=radio]),
.citaspro-booking-widget select,
.citaspro-booking-widget textarea,
#citaspro-account-app input:not([type=checkbox]):not([type=radio]),
#citaspro-account-app select,
#citaspro-account-app textarea,
#citaspro-frontend-admin input:not([type=checkbox]):not([type=radio]),
#citaspro-frontend-admin select,
#citaspro-frontend-admin textarea,
.cp-admin-login-wrapper input:not([type=checkbox]):not([type=radio]),
.cp-admin-login-wrapper select,
.cp-admin-login-wrapper textarea {
	width: 100%;
	min-height: var(--cp-touch, 44px);
	padding: 10px 14px;
	border: 1px solid var(--cp-border, #E4E7EC);
	border-radius: var(--cp-radius-sm, 8px);
	background: #fff;
	color: var(--cp-text, #14161A);
	font-family: inherit;
	font-size: 15px;
	line-height: 1.4;
	transition: border-color .15s, box-shadow .15s;
}
.cp-input:focus,
.citaspro-booking-widget input:focus,
.citaspro-booking-widget select:focus,
.citaspro-booking-widget textarea:focus,
#citaspro-account-app input:focus,
#citaspro-frontend-admin input:focus,
.cp-admin-login-wrapper input:focus {
	outline: none;
	border-color: var(--cp-primary, #0F766E);
	box-shadow: 0 0 0 3px var(--cp-primary-tint, rgba(15,118,110,.12));
}
textarea.cp-input { min-height: 100px; resize: vertical; }

.cp-field,
.cpb-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.cp-field > label,
.cpb-field > label,
.citaspro-booking-widget label {
	font-size: 13px;
	font-weight: 600;
	color: var(--cp-text-soft, #64748B);
}
.cp-field-hint { font-size: 12px; color: var(--cp-text-soft, #64748B); margin: 0; }

/* ---------- Tarjetas y paneles ---------- */
.cp-card,
.cp-panel,
.cpb-step {
	background: var(--cp-surface-solid, #FFFFFF);
	border: 1px solid var(--cp-border, #E4E7EC);
	border-radius: var(--cp-radius, 12px);
	padding: 20px;
	box-shadow: var(--cp-shadow, 0 1px 3px rgba(0,0,0,.06));
	margin: 0 0 var(--cp-gap, 20px);
}
.cp-card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 16px;
}
.cp-card-header h2 { font-size: 18px; font-weight: 700; margin: 0; }

/* ---------- Grids ---------- */
.cp-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: var(--cp-gap, 20px);
}
.cp-mb-20 { margin-bottom: 20px; }
.cp-flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- Badges ---------- */
.cp-badge {
	display: inline-flex;
	align-items: center;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	text-transform: capitalize;
	letter-spacing: .02em;
	white-space: nowrap;
}
.cp-badge-pending   { background: #FEF3E2; color: #B45309; }
.cp-badge-confirmed { background: var(--cp-primary-tint, rgba(15,118,110,.12)); color: var(--cp-primary-dark, #0B5C55); }
.cp-badge-completed { background: #E7F6EF; color: #047857; }
.cp-badge-cancelled { background: #FDECEC; color: #B42318; }
.cp-badge-no_show   { background: #EDEDED; color: #555; }
.cp-badge-paid      { background: #E7F6EF; color: #047857; }
.cp-badge-unpaid    { background: #FEF3E2; color: #B45309; }

/* ---------- Tablas base ---------- */
.cp-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	background: #fff;
	border-radius: var(--cp-radius, 12px);
	overflow: hidden;
}
.cp-table thead th {
	padding: 12px 14px;
	text-align: left;
	background: #F8FAFC;
	color: var(--cp-text-soft, #64748B);
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	border-bottom: 1px solid var(--cp-border, #E4E7EC);
	white-space: nowrap;
}
.cp-table tbody td {
	padding: 12px 14px;
	border-bottom: 1px solid var(--cp-border, #E4E7EC);
	vertical-align: middle;
}
.cp-table tbody tr:last-child td { border-bottom: none; }
.cp-table tbody tr:hover td { background: #FAFBFC; }

.cp-table-wrapper {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

/* Acciones en fila de tabla */
.cp-table-actions { display: flex; gap: 4px; flex-wrap: nowrap; }

/* =========================================================================
   TABLA DE CITAS (panel admin frontend) - Desktop
   ========================================================================= */
@media (min-width: 769px) {
	#citaspro-frontend-admin .cp-table-appointments {
		min-width: 1320px;
		table-layout: auto;
	}
	#citaspro-frontend-admin .cp-table-appointments th,
	#citaspro-frontend-admin .cp-table-appointments td {
		white-space: nowrap;
		vertical-align: middle;
		padding: 12px 14px;
	}
	#citaspro-frontend-admin .cp-table-appointments .cp-col-ref       { min-width: 90px; }
	#citaspro-frontend-admin .cp-table-appointments .cp-col-client    { min-width: 140px; max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
	#citaspro-frontend-admin .cp-table-appointments .cp-col-email     { min-width: 190px; max-width: 230px; overflow: hidden; text-overflow: ellipsis; }
	#citaspro-frontend-admin .cp-table-appointments .cp-col-phone     { min-width: 130px; }
	#citaspro-frontend-admin .cp-table-appointments .cp-col-service   { min-width: 150px; }
	#citaspro-frontend-admin .cp-table-appointments .cp-col-employee  { min-width: 130px; }
	#citaspro-frontend-admin .cp-table-appointments .cp-col-location  { min-width: 120px; }
	#citaspro-frontend-admin .cp-table-appointments .cp-col-date      { min-width: 140px; }
	#citaspro-frontend-admin .cp-table-appointments .cp-col-time      { min-width: 110px; }
	#citaspro-frontend-admin .cp-table-appointments .cp-col-status    { min-width: 110px; }
	#citaspro-frontend-admin .cp-table-appointments .cp-col-payment   { min-width: 100px; }
	#citaspro-frontend-admin .cp-table-appointments .cp-col-price     { min-width: 120px; }
	#citaspro-frontend-admin .cp-table-appointments .cp-col-discount  { min-width: 100px; }
	#citaspro-frontend-admin .cp-table-appointments .cp-col-notes     { min-width: 180px; max-width: 220px; white-space: normal; font-size: 12.5px; line-height: 1.4; word-break: break-word; }
	#citaspro-frontend-admin .cp-table-appointments .cp-col-actions   { min-width: 230px; }
}

/* ---------- Loading ---------- */
.cp-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 40px 20px;
	color: var(--cp-text-soft, #64748B);
	font-size: 14px;
}
.cp-spinner {
	width: 22px;
	height: 22px;
	border: 3px solid var(--cp-border, #E4E7EC);
	border-top-color: var(--cp-primary, #0F766E);
	border-radius: 50%;
	animation: cp-spin .8s linear infinite;
}
@keyframes cp-spin { to { transform: rotate(360deg); } }

.cp-empty-state {
	text-align: center;
	padding: 32px 16px;
	color: var(--cp-text-soft, #64748B);
	font-size: 14px;
}

/* ---------- Modales ---------- */
.cp-modal-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(15,23,42,.55);
	z-index: 99999;
	align-items: center;
	justify-content: center;
	padding: 20px;
	backdrop-filter: blur(2px);
}
.cp-modal-overlay.is-open { display: flex; }

.cp-modal {
	background: #fff;
	border-radius: var(--cp-radius, 12px);
	width: 100%;
	max-width: 620px;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	box-shadow: var(--cp-shadow-lg, 0 12px 32px rgba(0,0,0,.12));
	overflow: hidden;
}
.cp-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 22px;
	border-bottom: 1px solid var(--cp-border, #E4E7EC);
	flex-shrink: 0;
}
.cp-modal-header h2 { margin: 0; font-size: 17px; font-weight: 700; }
.cp-modal-close {
	background: none;
	border: none;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	color: var(--cp-text-soft, #64748B);
	width: 36px;
	height: 36px;
	border-radius: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}
.cp-modal-close:hover { background: var(--cp-bg, #F5F6F8); color: var(--cp-text, #14161A); }
.cp-modal-body { padding: 22px; overflow-y: auto; flex: 1; }
.cp-modal-footer {
	padding: 14px 22px;
	border-top: 1px solid var(--cp-border, #E4E7EC);
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	flex-shrink: 0;
	flex-wrap: wrap;
}

/* ---------- Tabs de scope (próximas / historial) ---------- */
.cp-scope-tabs {
	display: inline-flex;
	background: var(--cp-bg, #F5F6F8);
	border-radius: 10px;
	padding: 4px;
	gap: 4px;
	margin-bottom: 16px;
}
.cp-scope-btn {
	background: transparent;
	border: none;
	padding: 9px 16px;
	min-height: 38px;
	border-radius: 7px;
	font-weight: 600;
	font-size: 13px;
	color: var(--cp-text-soft, #64748B);
	cursor: pointer;
	font-family: inherit;
	white-space: nowrap;
}
.cp-scope-btn.is-active {
	background: #fff;
	color: var(--cp-primary, #0F766E);
	box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

/* =========================================================================
   FORMULARIO DE RESERVA
   ========================================================================= */

.cpb-step h3 {
	margin: 0 0 18px;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.25;
}

.cpb-actions {
	display: flex;
	gap: 10px;
	justify-content: space-between;
	align-items: center;
	margin-top: 22px;
	flex-wrap: wrap;
}
.cpb-actions > button { flex: 0 0 auto; min-width: 130px; }

.cpb-slot-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
	gap: 8px;
	margin-top: 10px;
}
.cpb-slot {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 8px 12px;
	background: #F1F5F9;
	border: 1px solid transparent;
	border-radius: 8px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	color: var(--cp-text, #14161A);
	transition: background-color .15s, border-color .15s, color .15s;
	-webkit-tap-highlight-color: transparent;
	user-select: none;
}
.cpb-slot:hover { background: #E2E8F0; }
.cpb-slot.selected {
	background: var(--cp-primary, #0F766E);
	color: #fff;
	border-color: var(--cp-primary, #0F766E);
}

.cpb-context {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 14px;
	background: var(--cp-primary-tint, rgba(15,118,110,.12));
	color: var(--cp-primary-dark, #0B5C55);
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	margin: 0 0 16px;
}
.cpb-context a { color: var(--cp-primary, #0F766E); text-decoration: underline; margin-left: 4px; }

.cpb-locations-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 14px;
	margin-top: 16px;
}
.cpb-location-card {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	padding: 18px;
	background: #fff;
	border: 2px solid var(--cp-border, #E4E7EC);
	border-radius: var(--cp-radius, 12px);
	cursor: pointer;
	transition: border-color .2s, transform .15s, box-shadow .2s;
}
.cpb-location-card:hover {
	border-color: var(--cp-primary, #0F766E);
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(0,0,0,.08);
}
.cpb-location-icon { font-size: 28px; flex-shrink: 0; line-height: 1; }
.cpb-location-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cpb-location-info strong { font-size: 15px; color: var(--cp-text, #14161A); }
.cpb-location-info span { font-size: 13px; color: var(--cp-text-soft, #64748B); }

.cpb-summary {
	background: #F8FAFC;
	border: 1px solid var(--cp-border, #E4E7EC);
	border-radius: var(--cp-radius-sm, 8px);
	padding: 4px 0;
	margin-bottom: 18px;
}
.cpb-summary-row {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
	padding: 12px 18px;
	border-bottom: 1px solid var(--cp-border, #E4E7EC);
}
.cpb-summary-row:last-child { border-bottom: none; }
.cpb-summary-label { font-weight: 600; color: var(--cp-text-soft, #64748B); font-size: 13px; flex-shrink: 0; }
.cpb-summary-value { font-weight: 600; color: var(--cp-text, #14161A); text-align: right; word-break: break-word; }

.cpb-user-info-box {
	background: #F8FAFC;
	border: 1px solid var(--cp-border, #E4E7EC);
	border-radius: var(--cp-radius-sm, 8px);
	padding: 14px 18px;
	margin-bottom: 16px;
}
.cpb-user-info-row { margin: 0 0 6px; font-size: 14px; color: var(--cp-text, #14161A); }
.cpb-user-info-hint { margin: 0; font-size: 12px; color: var(--cp-text-soft, #64748B); }
.cpb-user-info-hint a { color: var(--cp-primary, #0F766E); font-weight: 600; }

.cpb-error { color: #B42318; font-size: 13px; margin-top: 8px; }
.cpb-success { text-align: center; padding: 24px 8px; }
.cpb-success h3 { font-size: 22px; margin-bottom: 16px; }

.cpb-whatsapp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 24px;
	background: #25D366;
	color: #fff;
	border-radius: var(--cp-radius-sm, 8px);
	font-weight: 700;
	text-decoration: none;
	margin: 10px 0;
	border: none;
}
.cpb-whatsapp-btn:hover { background: #128C7E; color: #fff; }

.cpb-login-required {
	display: block;
	max-width: 100%;
	margin: 0;
	padding: 24px 22px;
	background: #FEF3E2;
	border: 1px solid #FCD34D;
	color: #92400E;
	border-radius: var(--cp-radius-sm, 8px);
	text-align: center;
	font-size: 15px;
	line-height: 1.55;
	box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.cpb-login-required a {
	color: var(--cp-primary, #0F766E);
	font-weight: 600;
	text-decoration: underline;
}
.cpb-login-required a:hover { text-decoration: none; }

/* =========================================================================
   PANEL DE CLIENTE (login, registro, citas)
   ========================================================================= */

.cp-auth-wrapper {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 70vh;
	padding: 20px 16px;
	background: transparent;
	border-radius: var(--cp-radius);
}
.cp-auth-card {
	background: #fff;
	border-radius: var(--cp-radius, 12px);
	box-shadow: 0 20px 50px rgba(0,0,0,.2);
	padding: 36px 32px;
	width: 100%;
	max-width: 420px;
}
.cp-auth-title { text-align: center; margin: 0 0 8px; font-size: 26px; font-weight: 800; color: var(--cp-text, #14161A); }
.cp-auth-subtitle { text-align: center; margin: 0 0 26px; font-size: 14px; color: var(--cp-text-soft, #64748B); }
.cp-auth-panel { display: none; }
.cp-auth-panel.is-active { display: block; }
.cp-auth-toggle { text-align: center; margin: 18px 0 0; font-size: 14px; color: var(--cp-text-soft, #64748B); }
.cp-auth-toggle a { color: var(--cp-primary, #0F766E); text-decoration: none; font-weight: 600; }
.cp-auth-toggle a:hover { text-decoration: underline; }

/* =========================================================================
   LOGIN Y DENEGACIÓN DEL PANEL ADMIN EN FRONTEND
   ========================================================================= */
.cp-admin-login-wrapper {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	min-height: auto;
	padding: var(--cp-header-offset, 110px) 16px 40px;
}
.cp-admin-login-card {
	max-width: 420px;
	width: 100%;
	background: #fff;
	border: 1px solid var(--cp-border, #E4E7EC);
	border-radius: var(--cp-radius, 12px);
	box-shadow: 0 12px 32px rgba(0,0,0,.08);
	padding: 36px 32px;
}
.cp-admin-remember { margin-bottom: 14px; }
.cp-admin-login-help {
	text-align: center;
	margin: 18px 0 0;
	font-size: 13px;
}
.cp-admin-login-help a {
	color: var(--cp-primary, #0F766E);
	text-decoration: none;
	font-weight: 600;
}
.cp-admin-login-help a:hover { text-decoration: underline; }

.cp-admin-denied {
	display: block;
	max-width: 480px;
	margin: var(--cp-header-offset, 110px) auto 40px;
	padding: 32px 28px;
	background: #fff;
	border: 1px solid var(--cp-border, #E4E7EC);
	border-radius: var(--cp-radius, 12px);
	box-shadow: 0 4px 16px rgba(0,0,0,.06);
	text-align: center;
}
.cp-admin-denied h3 { margin: 0 0 12px; font-size: 20px; color: #B42318; }
.cp-admin-denied p { margin: 0 0 16px; color: var(--cp-text-soft, #64748B); font-size: 14px; }

/* =========================================================================
   PANEL ADMIN FRONTEND
   ========================================================================= */

#citaspro-frontend-admin .cp-card {
	border-radius: var(--cp-radius, 12px);
	margin-bottom: 20px;
}

/* Topbar de escritorio */
#citaspro-frontend-admin .cp-admin-topbar {
	display: flex;
	align-items: center;
	gap: 24px;
	padding: 14px 24px;
	background: #fff;
	border-bottom: 1px solid var(--cp-border, #E4E7EC);
	flex-wrap: wrap;
}
#citaspro-frontend-admin .cp-admin-title {
	margin: 0;
	font-size: 20px;
	font-weight: 800;
	color: var(--cp-primary, #0F766E);
	white-space: nowrap;
}
#citaspro-frontend-admin .cp-topnav {
	display: flex;
	gap: 4px;
	flex-wrap: wrap;
	flex: 1;
	min-width: 0;
}

/* Items de navegación (compartido entre topbar y sidebar) */
#citaspro-frontend-admin .cp-nav-item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 14px;
	border-radius: 8px;
	border: none;
	background: transparent;
	color: var(--cp-text-soft, #64748B);
	font-weight: 600;
	font-size: 13.5px;
	cursor: pointer;
	font-family: inherit;
	white-space: nowrap;
	transition: background-color .15s, color .15s;
}
#citaspro-frontend-admin .cp-nav-item:hover {
	background: var(--cp-bg, #F5F6F8);
	color: var(--cp-text, #14161A);
}
#citaspro-frontend-admin .cp-nav-item.is-active {
	background: var(--cp-primary, #0F766E);
	color: #fff;
}
#citaspro-frontend-admin .cp-nav-icon { font-size: 15px; line-height: 1; }

/* Botón hamburguesa (solo móvil) */
#citaspro-frontend-admin .cp-sidebar-toggle {
	display: none;
	width: 100%;
	align-items: center;
	justify-content: flex-start;
	gap: 10px;
	padding: 14px 18px;
	background: #fff;
	border: none;
	border-bottom: 1px solid var(--cp-border, #E4E7EC);
	font-weight: 700;
	color: var(--cp-text, #14161A);
	cursor: pointer;
	font-family: inherit;
	font-size: 14px;
	text-align: left;
}
#citaspro-frontend-admin .cp-sidebar-toggle-icon {
	font-size: 20px;
	line-height: 1;
}

/* Sidebar (drawer móvil) */
#citaspro-frontend-admin .cp-sidebar {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	width: 280px;
	max-width: 85vw;
	background: #fff;
	box-shadow: 6px 0 24px rgba(0,0,0,.15);
	z-index: 100000;
	transform: translateX(-100%);
	transition: transform .25s ease;
	overflow-y: auto;
	flex-direction: column;
}
#citaspro-frontend-admin .cp-sidebar.is-open {
	transform: translateX(0);
}
#citaspro-frontend-admin .cp-sidebar-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 18px;
	border-bottom: 1px solid var(--cp-border, #E4E7EC);
}
#citaspro-frontend-admin .cp-sidebar-brand {
	font-size: 16px;
	font-weight: 800;
	color: var(--cp-primary, #0F766E);
}
#citaspro-frontend-admin .cp-sidebar-close {
	background: none;
	border: none;
	font-size: 26px;
	line-height: 1;
	color: var(--cp-text-soft, #64748B);
	cursor: pointer;
	padding: 0;
	width: 36px;
	height: 36px;
	border-radius: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
#citaspro-frontend-admin .cp-sidebar-close:hover { background: var(--cp-bg, #F5F6F8); }

#citaspro-frontend-admin .cp-sidebar-nav {
	display: flex;
	flex-direction: column;
	padding: 12px;
	gap: 2px;
}
#citaspro-frontend-admin .cp-sidebar-nav .cp-nav-item {
	width: 100%;
	justify-content: flex-start;
	padding: 12px 14px;
	font-size: 14px;
}

/* Overlay del sidebar */
#citaspro-frontend-admin .cp-sidebar-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(15,23,42,.5);
	z-index: 99999;
	opacity: 0;
	transition: opacity .2s ease;
}
#citaspro-frontend-admin .cp-sidebar-overlay.is-visible {
	display: block;
	opacity: 1;
}

#cp-frontend-admin-content {
	padding: 20px 24px;
}

#citaspro-frontend-admin .cp-grid .cp-card {
	padding: 18px 20px;
}
#citaspro-frontend-admin .cp-grid .cp-card > div:first-child {
	font-size: 13px;
	color: var(--cp-text-soft, #64748B);
	margin-bottom: 4px;
}
#citaspro-frontend-admin .cp-grid .cp-card > div:nth-child(2) {
	font-size: 26px;
	font-weight: 800;
	line-height: 1.1;
}

/* =========================================================================
   PRÓXIMAS CITAS DEL DASHBOARD (grid alineada)
   ========================================================================= */
#citaspro-frontend-admin .cp-upcoming-table {
	display: block;
}
#citaspro-frontend-admin .cp-upcoming-head,
#citaspro-frontend-admin .cp-upcoming-row {
	display: grid;
	grid-template-columns:
		minmax(160px, 1.4fr)   /* cliente */
		minmax(160px, 1.4fr)   /* servicio */
		minmax(120px, 1fr)     /* fecha */
		80px                    /* hora */
		110px;                  /* estado */
	gap: 12px;
	align-items: center;
	font-size: 13.5px;
}
#citaspro-frontend-admin .cp-upcoming-head {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--cp-text-soft, #64748B);
	background: #F8FAFC;
	padding: 10px 14px;
	border-radius: 8px;
	margin-bottom: 6px;
}
#citaspro-frontend-admin .cp-upcoming-row {
	padding: 12px 14px;
	border-bottom: 1px solid var(--cp-border, #E4E7EC);
}
#citaspro-frontend-admin .cp-upcoming-row:last-child {
	border-bottom: none;
}
#citaspro-frontend-admin .cp-upcoming-col-cliente,
#citaspro-frontend-admin .cp-upcoming-col-servicio {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
#citaspro-frontend-admin .cp-upcoming-col-fecha {
	color: var(--cp-text-soft, #64748B);
	white-space: nowrap;
}
#citaspro-frontend-admin .cp-upcoming-col-hora {
	font-variant-numeric: tabular-nums;
	font-weight: 600;
	white-space: nowrap;
}
#citaspro-frontend-admin .cp-upcoming-col-estado {
	justify-self: start;
}

/* =========================================================================
   RESPONSIVE - BREAKPOINT 992px (tablet apaisado)
   ========================================================================= */
@media (max-width: 992px) {
	#cp-frontend-admin-content { padding: 18px; }
	.cp-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
	.cpb-locations-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

/* =========================================================================
   RESPONSIVE - BREAKPOINT 900px
   En este punto se activa el sidebar y se oculta la barra horizontal.
   ========================================================================= */
@media (max-width: 900px) {
	#citaspro-frontend-admin .cp-sidebar-toggle { display: flex; }
	#citaspro-frontend-admin .cp-sidebar { display: flex; }
	#citaspro-frontend-admin .cp-admin-topbar { display: none; }
}

/* =========================================================================
   RESPONSIVE - BREAKPOINT 768px (tablet vertical / móvil grande)
   ========================================================================= */
@media (max-width: 768px) {
	.citaspro-booking-widget,
	#citaspro-account-app { padding-left: 12px; padding-right: 12px; }
	#cp-frontend-admin-content { padding: 14px; }

	.cp-card,
	.cp-panel,
	.cpb-step { padding: 16px; margin-bottom: 16px; }
	.cp-card-header h2 { font-size: 16px; }

	.cpb-actions {
		flex-direction: column-reverse;
		align-items: stretch;
	}
	.cpb-actions > button { width: 100%; min-width: 0; }

	.cp-modal-footer {
		flex-direction: column-reverse;
		align-items: stretch;
	}
	.cp-modal-footer > button,
	.cp-modal-footer > .cp-btn { width: 100%; }

	.cp-grid { grid-template-columns: 1fr; gap: 14px; }
	.cpb-locations-grid { grid-template-columns: 1fr; gap: 10px; }
	.cpb-slot-grid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }

	.cpb-summary-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 4px;
		padding: 12px 16px;
	}
	.cpb-summary-value { text-align: left; }

	.cp-input,
	.citaspro-booking-widget input,
	.citaspro-booking-widget select,
	.citaspro-booking-widget textarea { font-size: 16px; }

	.cp-modal-overlay { padding: 12px; align-items: flex-end; }
	.cp-modal {
		max-width: 100%;
		max-height: 92vh;
		border-radius: 16px 16px 0 0;
	}
	.cp-modal-header { padding: 16px 18px; }
	.cp-modal-body { padding: 18px; }
	.cp-modal-footer { padding: 12px 18px; }

	/* Tablas en modo tarjeta */
	.cp-table-responsive,
	#citaspro-frontend-admin .cp-table,
	#citaspro-account-app .cp-table { display: block; border-radius: 0; }
	.cp-table-responsive thead,
	#citaspro-frontend-admin .cp-table thead,
	#citaspro-account-app .cp-table thead { display: none; }
	.cp-table-responsive tbody,
	#citaspro-frontend-admin .cp-table tbody,
	#citaspro-account-app .cp-table tbody { display: block; }
	.cp-table-responsive tr,
	#citaspro-frontend-admin .cp-table tbody tr,
	#citaspro-account-app .cp-table tbody tr {
		display: block;
		background: #fff;
		border: 1px solid var(--cp-border, #E4E7EC);
		border-radius: var(--cp-radius, 12px);
		margin-bottom: 12px;
		padding: 14px 16px;
	}
	.cp-table-responsive td,
	#citaspro-frontend-admin .cp-table tbody td,
	#citaspro-account-app .cp-table tbody td {
		display: flex;
		justify-content: space-between;
		align-items: flex-start;
		gap: 12px;
		padding: 8px 0;
		border: none;
		border-bottom: 1px dashed var(--cp-border, #E4E7EC);
		font-size: 13.5px;
		white-space: normal;
		max-width: none;
	}
	.cp-table-responsive td:last-child,
	#citaspro-frontend-admin .cp-table tbody td:last-child,
	#citaspro-account-app .cp-table tbody td:last-child { border-bottom: none; }

	.cp-table-responsive td::before,
	#citaspro-frontend-admin .cp-table tbody td::before,
	#citaspro-account-app .cp-table tbody td::before {
		content: attr(data-label);
		font-weight: 700;
		color: var(--cp-text-soft, #64748B);
		font-size: 11px;
		text-transform: uppercase;
		letter-spacing: .04em;
		flex-shrink: 0;
		min-width: 90px;
	}

	.cp-table-actions {
		justify-content: flex-start;
		flex-wrap: wrap;
	}

	/* Próximas citas del dashboard en modo tarjeta */
	#citaspro-frontend-admin .cp-upcoming-head { display: none; }
	#citaspro-frontend-admin .cp-upcoming-row {
		grid-template-columns: 1fr;
		gap: 4px;
		padding: 12px 14px;
		border: 1px solid var(--cp-border, #E4E7EC);
		border-radius: var(--cp-radius, 12px);
		margin-bottom: 10px;
		background: #fff;
		border-bottom: 1px solid var(--cp-border, #E4E7EC);
	}
	#citaspro-frontend-admin .cp-upcoming-col-cliente {
		font-weight: 700;
		font-size: 14px;
	}
	#citaspro-frontend-admin .cp-upcoming-col-servicio {
		color: var(--cp-text-soft, #64748B);
		font-size: 13px;
	}
	#citaspro-frontend-admin .cp-upcoming-col-fecha,
	#citaspro-frontend-admin .cp-upcoming-col-hora {
		font-size: 12.5px;
		color: var(--cp-text-soft, #64748B);
	}
}

/* =========================================================================
   RESPONSIVE - BREAKPOINT 560px (móvil)
   ========================================================================= */
@media (max-width: 560px) {
	.citaspro-booking-widget,
	#citaspro-account-app { padding-left: 10px; padding-right: 10px; }
	#cp-frontend-admin-content { padding: 10px; }

	.cp-card,
	.cp-panel,
	.cpb-step { padding: 14px; border-radius: 10px; }

	.cp-auth-card { padding: 28px 22px; border-radius: 14px; }
	.cp-auth-title { font-size: 22px; }
	.cp-admin-login-card { padding: 28px 22px; border-radius: 14px; }

	.cp-modal-overlay { padding: 0; align-items: stretch; }
	.cp-modal {
		max-width: 100%;
		max-height: 100vh;
		height: 100vh;
		border-radius: 0;
	}

	.cpb-slot-grid { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
	.cpb-slot { min-height: 40px; padding: 6px 8px; font-size: 13px; }

	.cpb-summary-row { padding: 10px 14px; }
	.cpb-summary-label { font-size: 12px; }

	.cp-scope-tabs { display: flex; width: 100%; }
	.cp-scope-btn { flex: 1; text-align: center; }

	.cpb-location-card { padding: 14px; }
	.cpb-location-icon { font-size: 24px; }

	.cp-btn-icon { min-height: 36px; width: 36px; height: 36px; }

	.cp-table-responsive td,
	#citaspro-frontend-admin .cp-table tbody td,
	#citaspro-account-app .cp-table tbody td {
		flex-direction: column;
		align-items: flex-start;
		gap: 4px;
	}
	.cp-table-responsive td::before,
	#citaspro-frontend-admin .cp-table tbody td::before,
	#citaspro-account-app .cp-table tbody td::before { min-width: 0; }

	.cpb-step h3 { font-size: 17px; }
	.cp-card-header h2 { font-size: 15px; }

	.cpb-login-required { padding: 20px 16px; font-size: 14px; }
}

/* =========================================================================
   IMPRESIÓN
   ========================================================================= */
@media print {
	.cp-btn,
	.cp-btn-icon,
	.cp-modal-overlay,
	.cpb-actions { display: none !important; }
	.cp-card,
	.cp-panel { box-shadow: none; border: 1px solid #ccc; }
}