:root {
  --brand: #2357d9;
  --brand-dark: #173d9c;
  --brand-soft: #eaf1ff;
  --accent: #6d3ee8;
  --ink: #101828;
  --soft: #f5f7fb;
  --danger: #d92d20;
  --success: #027a48;
  --card-shadow: 0 10px 30px rgba(16, 24, 40, .07);
}

/* Reseñas verificadas. */
.verified-reviews-section { scroll-margin-top: 100px; }
.review-section-heading { display:flex; align-items:end; justify-content:space-between; gap:1rem; margin-bottom:1.35rem; }
.review-section-heading h2 { margin:.2rem 0 .35rem; font-weight:800; }
.review-section-heading p { margin:0; color:var(--bs-secondary-color); }
.verified-review-count { display:inline-flex; align-items:center; gap:.5rem; padding:.65rem .9rem; border:1px solid rgba(37,99,235,.18); border-radius:999px; color:#1d4ed8; background:rgba(37,99,235,.07); font-weight:750; white-space:nowrap; }
.verified-review-form { margin-bottom:1.25rem; border-color:rgba(37,99,235,.18); }
.review-form-grid { display:grid; grid-template-columns:190px minmax(0,1fr); gap:1rem; margin:1rem 0; }
.verified-review-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }
.verified-review-card { padding:1.25rem; border:1px solid var(--bs-border-color); border-radius:18px; background:var(--bs-body-bg); box-shadow:0 10px 30px rgba(15,23,42,.06); }
.verified-review-top { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:.75rem; }
.review-avatar { display:grid; place-items:center; width:42px; height:42px; border-radius:50%; color:#fff; background:linear-gradient(135deg,#2563eb,#4f46e5); font-weight:800; }
.verified-review-top strong,.verified-review-top small { display:block; }
.verified-review-top small { color:#15803d; font-size:.78rem; }
.review-stars { color:#f59e0b; letter-spacing:.08em; white-space:nowrap; }
.review-stars i { color:#d5dbe5; font-style:normal; }
.verified-review-card > p { margin:1rem 0 .7rem; line-height:1.7; }
.verified-review-card time,.review-service-name { color:var(--bs-secondary-color); font-size:.82rem; }
.review-service-name { display:inline-block; margin-top:.8rem; font-weight:700; }
.review-admin-response { margin-top:1rem; padding:1rem; border-left:3px solid #2563eb; border-radius:10px; background:rgba(37,99,235,.06); }
.review-admin-response p { margin:.35rem 0 0; }
.review-empty { grid-column:1/-1; display:flex; flex-direction:column; align-items:center; gap:.5rem; text-align:center; }
.review-empty i { font-size:2rem; color:#2563eb; }
.review-status { display:inline-flex; width:max-content; margin:0 .5rem .75rem 0; padding:.3rem .65rem; border-radius:999px; font-size:.78rem; font-weight:750; }
.review-status-pending { color:#92400e; background:#fef3c7; }.review-status-published { color:#166534; background:#dcfce7; }.review-status-rejected { color:#991b1b; background:#fee2e2; }
.review-opportunity-card { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:1rem; height:100%; padding:1rem; border:1px solid var(--bs-border-color); border-radius:16px; }
.review-opportunity-icon { display:grid; place-items:center; width:46px; height:46px; border-radius:14px; color:#2563eb; background:rgba(37,99,235,.1); }
.review-opportunity-card h3 { margin:.15rem 0; font-size:1rem; }.review-opportunity-card small { color:var(--bs-secondary-color); text-transform:capitalize; }
.review-moderation-copy { margin:1rem 0; padding:1rem; border-radius:12px; background:var(--soft); font-size:1rem; line-height:1.65; }
[data-bs-theme="dark"] .verified-review-card { background:#111b2e; }

@media (max-width: 767.98px) {
  .review-section-heading { align-items:flex-start; flex-direction:column; }
  .review-form-grid,.verified-review-grid { grid-template-columns:1fr; }
  .verified-review-top { grid-template-columns:auto 1fr; }.review-stars { grid-column:1/-1; }
  .review-opportunity-card { grid-template-columns:auto 1fr; }.review-opportunity-card .btn { grid-column:1/-1; width:100%; }
}

/* Auditoría: tarjetas desplegables para evitar tablas desbordadas en móvil. */
.audit-mobile-list {
  display: grid;
  gap: .85rem;
}

.content-box.audit-mobile-record {
  min-width: 0;
  padding: 0;
  overflow: hidden;
}

.audit-mobile-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
  padding: 1rem;
  cursor: pointer;
  list-style: none;
}

.audit-mobile-summary::-webkit-details-marker {
  display: none;
}

.audit-mobile-summary-copy,
.audit-mobile-entity,
.audit-mobile-field,
.audit-mobile-value {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.audit-mobile-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 2.25rem;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 50%;
  background: var(--bs-primary-bg-subtle);
  color: var(--bs-primary);
}

.audit-collapse-minus {
  display: none;
}

.audit-mobile-record[open] .audit-collapse-plus {
  display: none;
}

.audit-mobile-record[open] .audit-collapse-minus {
  display: inline-block;
}

.audit-mobile-record[open] .audit-mobile-summary {
  border-bottom: 1px solid var(--bs-border-color);
}

.audit-mobile-body {
  display: grid;
  gap: .9rem;
  min-width: 0;
  padding: 1rem;
}

.audit-mobile-field {
  display: grid;
  gap: .2rem;
}

.audit-mobile-field > span {
  color: var(--bs-secondary-color);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.audit-mobile-metadata {
  width: 100%;
  max-width: 100%;
  max-height: 55vh;
  margin: .35rem 0 0;
  padding: .8rem;
  overflow: auto;
  border: 1px solid var(--bs-border-color);
  border-radius: .65rem;
  background: var(--bs-tertiary-bg);
  color: var(--bs-body-color);
  font-size: .76rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Asignaciones promocionales y biblioteca de cortesía. */
.promotional-product-selector,
.promotional-user-selector,
.promotional-grant-list {
  display: grid;
  gap: .75rem;
}
.promotional-product-selector,
.promotional-user-selector {
  max-height: 370px;
  padding: .25rem;
  overflow: auto;
}
.promotional-product-option,
.promotional-user-option {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  align-items: start;
  gap: .7rem;
  padding: .8rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
  cursor: pointer;
  background: var(--bs-tertiary-bg);
}
.promotional-product-option:hover,
.promotional-user-option:hover { border-color: rgba(35,87,217,.42); }
.promotional-product-option strong,
.promotional-product-option small,
.promotional-user-option strong,
.promotional-user-option small { display: block; overflow-wrap: anywhere; }
.promotional-product-option small,
.promotional-user-option small { margin-top: .2rem; color: var(--bs-secondary-color); }
.promotional-user-option:has(input:checked) { border-color: var(--brand); background: rgba(35,87,217,.08); }
.promotional-grant-card {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 14px;
  background: var(--bs-tertiary-bg);
}
.promotional-grant-meta {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: .65rem;
  margin: 1rem 0;
}
.promotional-grant-meta dt { color: var(--bs-secondary-color); font-size: .7rem; text-transform: uppercase; }
.promotional-grant-meta dd { margin: .15rem 0 0; overflow-wrap: anywhere; font-size: .84rem; font-weight: 700; }
.promotional-library-panel { border-color: rgba(245,183,0,.38); }
.promotional-download-card .download-icon { color: #805500; background: linear-gradient(145deg,#fff6bf,#ffe27a); }
.maintenance-reset-options { padding: 1rem; border: 1px solid rgba(217,45,32,.24); border-radius: 12px; background: rgba(217,45,32,.035); }

/* Códigos de acceso al aula. */
.course-code-entry-page { min-height: 65vh; display: grid; place-items: center; }
.course-code-entry-card { width: min(100%,760px); padding: clamp(1.4rem,4vw,2.6rem); text-align: center; }
.course-code-entry-card > p { max-width: 620px; margin-inline: auto; }
.course-code-entry-icon { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 1rem; border-radius: 22px; color: #fff; background: linear-gradient(135deg,#2357d9,#7048db); box-shadow: 0 14px 32px rgba(35,87,217,.24); font-size: 1.7rem; }
.course-code-entry-form { margin: 1.5rem 0; text-align: left; }
.course-code-entry-help { display: flex; flex-wrap: wrap; justify-content: center; gap: .65rem; margin: 1.25rem 0; }
.course-code-entry-help span { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .75rem; border: 1px solid var(--bs-border-color); border-radius: 999px; color: var(--bs-secondary-color); font-size: .82rem; }
.course-code-entry-help i { color: var(--brand); }
.course-access-code-purchase { width: 100%; padding: .85rem 1rem; border: 1px solid rgba(35,87,217,.25); border-radius: 14px; background: rgba(35,87,217,.045); }
.course-access-code-purchase summary { color: var(--brand); font-weight: 800; cursor: pointer; }
.course-access-code-purchase form { display: grid; gap: .6rem; margin-top: 1rem; }
.course-access-code-checkout { border-color: rgba(25,135,84,.28); background: rgba(25,135,84,.045); }
.course-access-code-checkout summary { color: #147044; font-weight: 850; cursor: pointer; }
.course-access-new-code { display: grid; grid-template-columns: minmax(0,1fr) minmax(280px,480px); align-items: center; gap: 1rem; }
.course-access-new-code strong,.course-access-new-code span { display: block; }
.course-access-code-list { display: grid; gap: .8rem; }
.course-access-code-card { padding: 1rem; border: 1px solid var(--bs-border-color); border-radius: 14px; background: var(--bs-tertiary-bg); }
.course-access-code-card code { display: inline-block; max-width: 100%; padding: .35rem .55rem; border-radius: 8px; overflow-wrap: anywhere; color: var(--brand); background: rgba(35,87,217,.08); font-weight: 800; }
.course-access-code-meta { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .7rem; margin-top: 1rem; }
.course-access-code-meta span { min-width: 0; overflow-wrap: anywhere; font-size: .82rem; font-weight: 700; }
.course-access-code-meta small { display: block; margin-bottom: .15rem; color: var(--bs-secondary-color); font-size: .66rem; text-transform: uppercase; }

@media (max-width: 575.98px) {
  .promotional-grant-meta { grid-template-columns: 1fr; }
  .course-code-entry-form .input-group { display: grid; grid-template-columns: auto minmax(0,1fr); }
  .course-code-entry-form .input-group .btn { grid-column: 1/-1; width: 100%; border-radius: var(--bs-border-radius-lg); margin-top: .6rem; }
  .course-access-code-purchase .input-group { display: grid; gap: .55rem; }
  .course-access-code-purchase .input-group > * { width: 100%; border-radius: var(--bs-border-radius) !important; }
  .course-access-code-checkout .input-group { display: grid; gap: .55rem; }
  .course-access-code-checkout .input-group > * { width: 100%; border-radius: var(--bs-border-radius) !important; }
  .course-access-code-meta { grid-template-columns: 1fr; }
  .course-access-new-code { grid-template-columns: 1fr; }
  .premium-course-crown { width: 2rem; height: 2rem; top: .42rem; right: .42rem; font-size: .82rem; }
  .offer-badge.has-premium-crown { top: 2.85rem; }
}

/* V3.23 - Aula innovadora: docentes, evaluaciones, notas y encuestas. */
.course-instructor-mini { display:flex; align-items:center; gap:.65rem; min-width:0; margin:.7rem 0; }
.course-instructor-mini > img,.course-instructor-mini > span { flex:0 0 auto; display:grid; place-items:center; width:38px; height:38px; overflow:hidden; border-radius:50%; color:#fff; background:linear-gradient(135deg,#2357d9,#7048db); object-fit:cover; font-size:.78rem; font-weight:850; }
.course-instructor-mini > img { object-position:center top; }
.course-instructor-mini div { min-width:0; line-height:1.15; }
.course-instructor-mini small,.course-instructor-mini strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.course-instructor-mini small { margin-bottom:.2rem; color:var(--bs-secondary-color); font-size:.68rem; font-weight:750; text-transform:uppercase; letter-spacing:.05em; }
.course-instructor-mini strong { font-size:.88rem; }
.product-card-instructor { padding:.55rem .65rem; border:1px solid var(--bs-border-color); border-radius:13px; background:rgba(35,87,217,.04); }
.product-card-instructor > img,.product-card-instructor > span { width:34px; height:34px; }
.classroom-instructors { display:flex; flex-wrap:wrap; gap:.75rem; margin-top:1.2rem; }
.classroom-instructors > span { display:flex; align-items:center; gap:.65rem; min-width:0; padding:.55rem .85rem .55rem .55rem; border:1px solid rgba(255,255,255,.24); border-radius:999px; background:rgba(255,255,255,.1); backdrop-filter:blur(7px); }
.classroom-instructors img,.classroom-instructors b { display:grid; place-items:center; width:40px; height:40px; border-radius:50%; object-fit:cover; object-position:center top; color:#1645b1; background:#fff; }
.classroom-instructors > span > span { display:block; min-width:0; }
.classroom-instructors small,.classroom-instructors strong { display:block; }
.classroom-instructors small { font-size:.62rem; letter-spacing:.07em; opacity:.8; }
.classroom-instructors strong { max-width:220px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.module-evaluation-row { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:.8rem; padding:1rem; border-top:1px solid var(--bs-border-color); background:rgba(35,87,217,.045); }
.module-evaluation-row > span:nth-child(2) strong,.module-evaluation-row > span:nth-child(2) small { display:block; }
.module-evaluation-row > span:nth-child(2) small { color:var(--bs-secondary-color); }
.module-evaluation-row.is-passed { background:rgba(2,122,72,.06); }
.classroom-lessons .module-evaluation-row > .btn { display:inline-flex; align-items:center; justify-content:center; gap:.35rem; }
.lesson-notes-panel { scroll-margin-top:100px; }
.public-lesson-notes { border-color:rgba(35,87,217,.2); background:linear-gradient(145deg,rgba(234,241,255,.65),var(--bs-body-bg)); }
.public-lesson-notes article { padding:1rem 0 0; }
.public-lesson-notes article+article { margin-top:1rem; border-top:1px solid var(--bs-border-color); }
.public-lesson-notes article div { display:flex; align-items:center; gap:.5rem; color:var(--brand); }
.public-lesson-notes article p { margin:.6rem 0 0; line-height:1.7; overflow-wrap:anywhere; }
.learning-survey-card { max-width:900px; }
.instructor-admin-grid { display:grid; gap:1rem; }
.instructor-admin-summary { display:grid; grid-template-columns:76px minmax(0,1fr); align-items:center; gap:1rem; }
.instructor-avatar { display:grid; place-items:center; width:76px; aspect-ratio:1; overflow:hidden; border-radius:22px; color:#fff; background:linear-gradient(135deg,#2357d9,#7048db); font-size:1.4rem; font-weight:850; }
.instructor-avatar img { width:100%; height:100%; object-fit:cover; object-position:center top; }
.instructor-editor { border-top:1px solid var(--bs-border-color); }
.instructor-editor summary { padding-top:1rem; color:var(--brand); font-weight:800; cursor:pointer; }
.instructor-create-form { top:95px; }
.survey-response-list { display:grid; gap:.8rem; }
.survey-response-card { padding:0; overflow:hidden; }
.survey-response-card summary { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:1rem 1.2rem; cursor:pointer; }
.survey-response-card summary div strong,.survey-response-card summary div small { display:block; }
.survey-response-card summary small { color:var(--bs-secondary-color); }
.survey-response-detail { padding:0 1.2rem 1.2rem; border-top:1px solid var(--bs-border-color); }
.survey-response-detail p { margin:1rem 0; }
.survey-response-detail blockquote { margin:0 0 .75rem; padding:1rem; border-left:3px solid var(--brand); border-radius:10px; background:var(--soft); overflow-wrap:anywhere; }

@media (max-width:767.98px) {
  .module-evaluation-row { grid-template-columns:auto minmax(0,1fr); padding:.85rem; }
  .module-evaluation-row > .btn,.module-evaluation-row > .badge { grid-column:1/-1; width:100%; }
  .classroom-instructors { gap:.5rem; }
  .classroom-instructors > span { width:100%; border-radius:16px; }
  .classroom-instructors strong { max-width:calc(100vw - 150px); }
  .instructor-admin-summary { grid-template-columns:60px minmax(0,1fr); align-items:start; }
  .instructor-avatar { width:60px; border-radius:18px; }
  .learning-survey-card { padding:1.1rem; }
}

/* Aula virtual, evaluaciones y certificados */
.course-admin-card { display: flex; flex-direction: column; gap: 1.35rem; }
.download-conditions {
  display: flex;
  gap: .85rem;
  align-items: flex-start;
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(35,87,217,.22);
  border-radius: 16px;
  color: var(--bs-body-color);
  background: var(--brand-soft);
}
[data-bs-theme="dark"] .download-conditions { background: #14213a; }
.download-conditions > i { margin-top: .15rem; color: var(--brand); font-size: 1.2rem; }
.download-conditions p { margin: .15rem 0; }
.download-conditions small, .download-policy-inline, .checkout-summary-item small {
  display: block;
  color: var(--bs-secondary-color);
  font-size: .78rem;
  line-height: 1.45;
}
.download-policy-inline { margin-top: .25rem; max-width: 520px; }
.checkout-summary-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.checkout-summary-item > span { min-width: 0; }
.checkout-summary-item small { margin-top: .3rem; }
.course-admin-card-main { display: flex; align-items: flex-start; gap: 1rem; }
.course-admin-icon, .cert-setting-icon {
  display: grid; place-items: center; flex: 0 0 auto; width: 54px; height: 54px;
  border-radius: 16px; color: #fff; background: linear-gradient(135deg,var(--brand),var(--accent));
  font-size: 1.25rem; box-shadow: 0 10px 24px rgba(35,87,217,.2);
}
.course-admin-stats { display: grid; grid-template-columns: repeat(3,1fr); border: 1px solid var(--bs-border-color); border-radius: 16px; overflow: hidden; }
.course-admin-stats span { display: grid; gap: .15rem; padding: .85rem; text-align: center; color: var(--bs-secondary-color); font-size: .78rem; }
.course-admin-stats span + span { border-left: 1px solid var(--bs-border-color); }
.course-admin-stats strong { color: var(--bs-body-color); font-size: 1.2rem; }
.course-module-admin { padding: 1.25rem; }
.course-module-heading, .course-module-heading > div { display: flex; align-items: flex-start; gap: 1rem; }
.course-module-heading { justify-content: space-between; }
.module-number {
  display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px;
  border-radius: 12px; color: var(--brand); background: var(--brand-soft); font-weight: 800;
}
.admin-lesson-list { margin-top: 1rem; border-top: 1px solid var(--bs-border-color); }
.admin-lesson-list > a,
.admin-lesson-row > a {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .8rem;
  padding: .9rem 0; color: inherit; text-decoration: none; border-bottom: 1px solid var(--bs-border-color);
}
.admin-lesson-list > a:hover strong,
.admin-lesson-row > a:hover strong { color: var(--brand); }
.admin-lesson-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:.65rem;border-bottom:1px solid var(--bs-border-color)}
.admin-lesson-row>a{grid-template-columns:auto minmax(0,1fr);min-width:0;border-bottom:0}
.admin-lesson-row form{margin:0}
.admin-lesson-chevron{color:var(--bs-secondary-color)}
@media(max-width:575.98px){.admin-lesson-row{grid-template-columns:minmax(0,1fr) auto;gap:.4rem}.admin-lesson-row .btn span,.admin-lesson-chevron{display:none}.admin-lesson-row .btn{display:grid;place-items:center;width:36px;height:36px;padding:0}.admin-lesson-row>a{gap:.55rem}.admin-lesson-row .lesson-type-icon{width:34px;height:34px}}
.admin-lesson-list small, .admin-assets-list small { display: block; color: var(--bs-secondary-color); overflow-wrap: anywhere; }
.lesson-type-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; color: var(--brand); background: var(--brand-soft); }
.course-module-form { top: 110px; }
.course-content-heading > div:first-child { min-width: 0; }
.course-content-heading h1 { overflow-wrap: anywhere; }
.course-content-actions { justify-content: flex-end; }
.course-content-final-action { display: inline-grid !important; place-items: center; flex: 0 0 34px; width: 34px; min-width: 34px; height: 34px; padding: 0 !important; }
.course-content-final-action i { margin: 0 !important; }
@media (min-width: 1200px) {
  .course-content-heading { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; flex-wrap: nowrap; }
  .course-content-heading h1 { margin-bottom: .35rem; font-size: clamp(2rem,3vw,2.45rem); line-height: 1.08; }
  .course-content-actions { align-self: center; flex-wrap: nowrap; }
  .course-content-actions .btn { flex: 0 0 auto; }
  .course-content-layout { --bs-gutter-x: 1.25rem; }
  .course-content-editor-column { min-width: 0; }
}
@media (min-width: 992px) and (max-width: 1199.98px) {
  .course-content-heading { align-items: flex-start; }
  .course-content-actions { width: 100%; justify-content: flex-start; }
}
@media (max-width: 991.98px) {
  .course-content-editor-column { margin-top: .25rem; }
  .course-module-form { position: static !important; }
}
.admin-assets-list > div {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .8rem 0; border-bottom: 1px solid var(--bs-border-color);
}
.admin-assets-list > div > span { display: grid; grid-template-columns: auto 1fr; column-gap: .7rem; align-items: center; }
.admin-assets-list > div > span i { grid-row: 1/3; color: var(--brand); }
.admin-asset-item{padding:.85rem 0;border-bottom:1px solid var(--bs-border-color)}
.admin-asset-summary{display:flex;justify-content:space-between;align-items:center;gap:1rem}
.admin-asset-summary>span{display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:.7rem;align-items:center;min-width:0}
.admin-asset-summary>span i{grid-row:1/3;color:var(--brand)}
.admin-asset-summary>span strong,.admin-asset-summary>span small{min-width:0;overflow-wrap:anywhere}
.admin-asset-actions{display:flex;align-items:center;gap:.45rem;flex:0 0 auto}
.admin-asset-actions form{margin:0}
.admin-asset-edit-form{margin-top:.85rem;padding:.85rem;border:1px solid var(--bs-border-color);border-radius:12px;background:var(--bs-tertiary-bg)}
@media(max-width:575.98px){.admin-asset-summary{align-items:flex-start}.admin-asset-actions{gap:.35rem}.admin-asset-edit-form{padding:.7rem}}
.question-admin-list article {
  display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: .8rem;
  padding: 1rem 0; border-bottom: 1px solid var(--bs-border-color);
}
.question-admin-list article > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 800; }
.question-admin-list small { display: block; color: var(--bs-secondary-color); margin-top: .2rem; }

.learning-hero, .course-classroom-header, .exam-header, .verification-hero {
  color: #fff; background:
    radial-gradient(circle at 85% 0,rgba(109,62,232,.72),transparent 34%),
    linear-gradient(135deg,#0b1f3a,#173d75 62%,#2357d9);
}
.learning-hero { padding: 4.6rem 0 4rem; }
.learning-hero h1, .course-classroom-header h1, .exam-header h1, .verification-hero h1 { font-size: clamp(2.2rem,5vw,4.2rem); font-weight: 850; letter-spacing: -.045em; }
.learning-hero p, .course-classroom-header p, .exam-header p, .verification-hero p { max-width: 750px; color: rgba(255,255,255,.78); font-size: 1.08rem; }
.learning-dashboard-hero { padding: 2.35rem 0 2rem; }
.learning-dashboard-hero h1 { font-size: clamp(2rem,4vw,3.15rem); }
.learning-dashboard-hero p { margin-bottom: 0; font-size: 1rem; }
.learning-dashboard-container { max-width: 1380px; }
.learning-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.learning-section-heading h2 { margin: 0; font-size: clamp(1.6rem,3vw,2.25rem); font-weight: 800; }
.learning-course-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.learning-course-grid > .empty-state { grid-column: 1 / -1; }
.learning-course-card { display: flex; min-width: 0; height: 100%; flex-direction: column; border: 1px solid var(--bs-border-color); border-radius: 18px; overflow: hidden; background: var(--bs-body-bg); box-shadow: 0 10px 28px rgba(16,24,40,.08); transition: transform .18s ease,box-shadow .18s ease; }
.learning-course-card:hover { transform: translateY(-3px); box-shadow: 0 15px 34px rgba(16,24,40,.12); }
.learning-course-cover { position: relative; display: grid; aspect-ratio: 16 / 9; min-height: 0; place-items: center; overflow: hidden; background: linear-gradient(135deg,var(--brand-soft),#ddd5ff); color: var(--brand); font-size: 2rem; }
.learning-course-cover img { width: 100%; height: 100%; object-fit: cover; }
.learning-course-cover .badge { position: absolute; left: .65rem; top: .65rem; font-size: .7rem; }
.learning-course-copy { display: flex; min-height: 0; flex: 1; flex-direction: column; align-items: flex-start; padding: .9rem; }
.learning-course-copy h3 { display: -webkit-box; min-height: 2.45em; margin-bottom: .45rem; overflow: hidden; font-size: 1rem; font-weight: 800; line-height: 1.22; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.learning-course-copy p { display: -webkit-box; min-height: 2.6em; margin-bottom: .75rem; overflow: hidden; color: var(--bs-secondary-color); font-size: .78rem; line-height: 1.3; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.learning-course-copy .btn { width: 100%; }
.course-progress-label { display: flex; justify-content: space-between; width: 100%; margin-bottom: .45rem; font-size: .82rem; color: var(--bs-secondary-color); }
.course-progress-label strong { color: var(--brand); }
.learning-course-copy .progress, .course-progress-panel .progress { width: 100%; height: 8px; background: rgba(255,255,255,.15); }
.learning-course-copy .progress { background: var(--brand-soft); }
.progress-bar { background: linear-gradient(90deg,var(--brand),var(--accent)); }

@media (min-width: 576px) {
  .learning-course-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (min-width: 992px) {
  .learning-course-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
.certificate-list-card {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem;
  padding: 1rem; border: 1px solid var(--bs-border-color); border-radius: 18px; background: var(--bs-body-bg);
}
.certificate-list-card > span { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 15px; color: #9a6700; background: #fff4ce; font-size: 1.35rem; }
.certificate-list-card h3 { margin: 0 0 .2rem; font-size: 1rem; }
.certificate-list-card p { margin: 0; color: var(--bs-secondary-color); font-size: .82rem; }

.course-classroom-header { padding: 2rem 0 3rem; }
.course-back-link { display: inline-flex; align-items: center; gap: .5rem; margin-bottom: 2rem; color: rgba(255,255,255,.8); text-decoration: none; }
.course-classroom-header h1 { max-width: 900px; font-size: clamp(2rem,4vw,3.4rem); }
.course-progress-panel { padding: 1.15rem; border: 1px solid rgba(255,255,255,.22); border-radius: 18px; background: rgba(255,255,255,.1); backdrop-filter: blur(10px); }
.course-progress-panel > div:first-child { display: flex; justify-content: space-between; margin-bottom: .7rem; }
.course-progress-panel strong { font-size: 1.4rem; }
.course-progress-panel small { display: block; margin-top: .55rem; color: rgba(255,255,255,.68); }
.classroom-module { margin-bottom: 1rem; border: 1px solid var(--bs-border-color); border-radius: 20px; overflow: hidden; background: var(--bs-body-bg); box-shadow: 0 8px 24px rgba(16,24,40,.05); }
.classroom-module-heading { display: flex; align-items: flex-start; gap: 1rem; padding: 1.2rem; background: var(--soft); }
[data-bs-theme="dark"] .classroom-module-heading { background: #111827; }
.classroom-module-heading > span { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 auto; border-radius: 13px; color: #fff; background: var(--brand); font-weight: 800; }
.classroom-module-heading small { color: var(--brand); font-weight: 800; letter-spacing: .08em; }
.classroom-module-heading h2 { margin: .15rem 0; font-size: 1.2rem; font-weight: 800; }
.classroom-module-heading p { margin: 0; color: var(--bs-secondary-color); }
.classroom-lessons a {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .9rem;
  padding: 1rem 1.2rem; color: inherit; text-decoration: none; border-top: 1px solid var(--bs-border-color);
}
.classroom-lessons a:hover { background: rgba(35,87,217,.035); }
.classroom-lessons small { display: block; margin-top: .2rem; color: var(--bs-secondary-color); }
.lesson-status-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: var(--brand); background: var(--brand-soft); }
.classroom-lessons a.completed .lesson-status-icon { color: #fff; background: var(--success); }
.certification-panel { position: sticky; top: 110px; padding: 1.5rem; border: 1px solid rgba(35,87,217,.18); border-radius: 22px; background: linear-gradient(160deg,var(--bs-body-bg),var(--brand-soft)); box-shadow: var(--card-shadow); }
[data-bs-theme="dark"] .certification-panel { background: linear-gradient(160deg,#111827,#14213a); }
.certification-panel-icon { display: grid; place-items: center; width: 62px; height: 62px; margin-bottom: 1rem; border-radius: 19px; color: #9a6700; background: #fff4ce; font-size: 1.65rem; }
.certification-panel h2 { font-weight: 800; }
.cert-price { margin: 1rem 0; color: var(--brand); font-size: 1.8rem; font-weight: 850; }
.certification-coupon-field { text-align: left; }
.certification-coupon-field .form-label { margin-bottom: .4rem; font-size: .88rem; font-weight: 750; }
.certification-coupon-field .form-text { display: block; margin-top: .35rem; line-height: 1.35; }
.cert-lock { padding: .8rem; border-radius: 12px; color: var(--bs-secondary-color); background: rgba(0,0,0,.04); text-align: center; }

.lesson-page { min-height: 70vh; background: var(--soft); }
[data-bs-theme="dark"] .lesson-page { background: #0b1220; }
.lesson-topbar { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.lesson-topbar a { color: var(--brand); text-decoration: none; font-weight: 700; }
.lesson-topbar span { color: var(--bs-secondary-color); }
.lesson-video { position: relative; aspect-ratio: 16/9; overflow: hidden; border-radius: 22px; background: #030712; box-shadow: 0 18px 48px rgba(0,0,0,.22); }
.lesson-video iframe, .lesson-video video { width: 100%; height: 100%; border: 0; }
.lesson-content h1 { margin: .35rem 0 1.4rem; font-size: clamp(1.8rem,4vw,3rem); font-weight: 850; }
.lesson-text { font-size: 1.05rem; line-height: 1.8; }
.lesson-assets { display: grid; gap: .65rem; }
.lesson-assets a { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .8rem; padding: .85rem; border: 1px solid var(--bs-border-color); border-radius: 13px; color: inherit; text-decoration: none; }
.lesson-assets a > i:first-child { color: var(--brand); font-size: 1.3rem; }
.lesson-assets small { display: block; color: var(--bs-secondary-color); }
.lesson-actions { position: sticky; top: 110px; }
.lesson-completed { display: grid; justify-items: center; gap: .5rem; padding: 1rem; color: var(--success); text-align: center; }
.lesson-completed i { font-size: 2rem; }
.lesson-navigation { display: grid; gap: .6rem; margin-top: 1rem; }
.lesson-navigation a { display: grid; grid-template-columns: 18px minmax(0,1fr) 18px; align-items: center; gap: .65rem; min-height: 96px; padding: .8rem .75rem; border: 1px solid var(--bs-border-color); border-radius: 12px; color: inherit; text-decoration: none; font-size: .85rem; transition: border-color .18s ease, background-color .18s ease, transform .18s ease; }
.lesson-navigation a:hover { border-color: var(--brand); background: rgba(35,87,217,.045); transform: translateY(-1px); }
.lesson-navigation a > span { min-width: 0; }
.lesson-navigation a.is-previous::after, .lesson-navigation a.is-next::before { content: ""; width: 18px; }
.lesson-navigation a.is-previous > i { grid-column: 1; }
.lesson-navigation a.is-previous > span { grid-column: 2; }
.lesson-navigation a.is-next::before { grid-column: 1; grid-row: 1; }
.lesson-navigation a.is-next > span { grid-column: 2; grid-row: 1; }
.lesson-navigation a.is-next > i { grid-column: 3; grid-row: 1; }
.lesson-navigation a > i { justify-self: center; color: var(--bs-secondary-color); }
.lesson-navigation small { display: block; margin-bottom: .18rem; color: var(--bs-secondary-color); font-size: .72rem; }
.lesson-navigation strong { display: -webkit-box; overflow: hidden; color: var(--bs-body-color); font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; }

.exam-header { padding: 3.5rem 0; }
.exam-header h1 { font-size: clamp(2rem,4vw,3.3rem); }
.exam-rules { display: flex; gap: .8rem; align-items: center; margin-bottom: 1rem; padding: 1rem; border-radius: 15px; color: #174ea6; background: #eaf2ff; }
.exam-question { position: relative; margin-bottom: 1rem; padding-left: 5rem; }
.exam-question-number { position: absolute; left: 1.25rem; top: 1.25rem; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; color: #fff; background: var(--brand); font-size: 1.1rem; font-weight: 800; }
.exam-question h2 { margin-bottom: 1rem; font-size: 1.18rem; }
.exam-options { display: grid; gap: .55rem; }
.exam-options label { display: flex; align-items: flex-start; gap: .75rem; padding: .8rem 1rem; border: 1px solid var(--bs-border-color); border-radius: 13px; cursor: pointer; }
.exam-options label:hover { border-color: var(--brand); background: rgba(35,87,217,.035); }

.verification-hero { padding: 5rem 0; text-align: center; }
.verification-hero .container { display: grid; justify-items: center; }
.verification-icon { display: grid; place-items: center; width: 76px; height: 76px; margin-bottom: 1rem; border-radius: 23px; color: #102a55; background: #fff; font-size: 2rem; }
.verification-search { display: grid; grid-template-columns: minmax(0,440px) auto; gap: .6rem; width: min(100%,620px); margin-top: 1.5rem; }
.verification-search .form-control { min-height: 54px; border: 0; }
.verification-result-page { min-height: 70vh; background: var(--soft); }
[data-bs-theme="dark"] .verification-result-page { background: #0b1220; }
.verification-card { width: min(100%,760px); margin: 0 auto; padding: clamp(1.5rem,5vw,3.4rem); border: 1px solid var(--bs-border-color); border-radius: 28px; background: var(--bs-body-bg); text-align: center; box-shadow: 0 20px 60px rgba(16,24,40,.1); }
.verification-status-icon { display: grid; place-items: center; width: 76px; height: 76px; margin: 0 auto 1rem; border-radius: 50%; font-size: 2.2rem; }
.verification-card.valid .verification-status-icon { color: var(--success); background: #d1fadf; }
.verification-card.invalid .verification-status-icon { color: var(--danger); background: #fee4e2; }
.verification-card h1 { font-weight: 850; }
.verification-data { display: grid; grid-template-columns: repeat(2,1fr); gap: 0; margin: 2rem 0; text-align: left; border: 1px solid var(--bs-border-color); border-radius: 18px; overflow: hidden; }
.verification-data div { padding: .9rem 1rem; border-bottom: 1px solid var(--bs-border-color); }
.verification-data div:nth-child(odd) { border-right: 1px solid var(--bs-border-color); }
.verification-data dt { color: var(--bs-secondary-color); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
.verification-data dd { margin: .25rem 0 0; font-weight: 750; }

.certificate-document-page { min-height: 80vh; background: #e9edf5; }
.certificate-actions { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.certificate-document { width: min(100%,1120px); aspect-ratio: 1.414/1; margin: auto; padding: 18px; color: #10213d; background: #fff; box-shadow: 0 18px 60px rgba(16,24,40,.16); }
.certificate-border { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; padding: 4.5% 6%; border: 3px solid var(--certificate-accent,#d3a646); text-align: center; overflow: hidden; background-color: rgba(255,255,255,.94); background-size: cover; background-position: center; }
.certificate-border::before, .certificate-border::after { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; background: rgba(35,87,217,.06); }
.certificate-border::before { left: -130px; top: -130px; }
.certificate-border::after { right: -130px; bottom: -130px; }
.certificate-brand { position: absolute; left: 4%; top: 4%; display: flex; align-items: center; gap: .6rem; text-align: left; }
.certificate-brand img { width: 58px; height: 58px; object-fit: contain; }
.certificate-brand strong, .certificate-brand small { display: block; }
.certificate-brand small { font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; }
.certificate-kicker { color: var(--certificate-accent,#a87818); font-size: clamp(.62rem,1.25vw,.95rem); font-weight: 800; letter-spacing: .22em; }
.certificate-document h1 { margin: 1% 0 0; font-family: Georgia,serif; font-size: clamp(2.3rem,6vw,5.5rem); color: var(--certificate-primary,#153e75); }
.certificate-intro, .certificate-copy { margin: .6% 0; color: #64748b; font-size: clamp(.7rem,1.5vw,1.2rem); }
.certificate-document h2 { margin: .4% 0; padding: 0 4%; color: #101f38; font-family: Georgia,serif; font-size: clamp(1.8rem,4vw,3.8rem); border-bottom: 2px solid var(--certificate-accent,#d3a646); }
.certificate-document h3 { margin: .8% 0 1.2%; color: var(--certificate-primary,#2357d9); font-size: clamp(1rem,2.3vw,2rem); font-weight: 800; }
.certificate-metrics { display: grid; grid-template-columns: repeat(3,1fr); width: 76%; border-block: 1px solid #dbe2ec; }
.certificate-metrics span { display: grid; padding: 1.2% 2%; }
.certificate-metrics span + span { border-left: 1px solid #dbe2ec; }
.certificate-metrics small { color: #64748b; font-size: clamp(.5rem,1vw,.78rem); text-transform: uppercase; letter-spacing: .06em; }
.certificate-metrics strong { font-size: clamp(.7rem,1.4vw,1.1rem); }
.certificate-footer-row { display: flex; align-items: end; justify-content: space-between; width: 76%; margin-top: 2%; }
.certificate-signature { display: grid; min-width: 230px; }
.certificate-signature > span { border-top: 1px solid #10213d; }
.certificate-signature strong { margin-top: .4rem; font-size: clamp(.7rem,1.25vw,1rem); }
.certificate-signature small, .certificate-qr small { color: #64748b; font-size: clamp(.5rem,.9vw,.7rem); }
.certificate-qr { display: grid; justify-items: center; gap: .25rem; }
.certificate-qr img, .certificate-qr canvas { width: clamp(64px,9vw,116px) !important; height: clamp(64px,9vw,116px) !important; }
.certificate-verify-url { margin: .5% 0 0; color: #64748b; font-size: clamp(.45rem,.8vw,.65rem); }
.user-role-menu-button { display: inline-flex; align-items: center; gap: .45rem; text-decoration: none; }
.user-role-display-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-role-avatar, .mobile-user-avatar { overflow: hidden; }
.user-role-avatar { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #fff; background: var(--bs-primary); font-size: .68rem; font-weight: 800; }
.user-role-avatar img, .mobile-user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-role-dropdown { width: min(320px,calc(100vw - 2rem)); max-height: min(70vh,560px); overflow-y: auto; }
.profile-photo-editor { display: grid; grid-template-columns: 96px minmax(0,1fr); gap: 1rem; align-items: center; }
.profile-photo-preview { display: grid; place-items: center; width: 96px; height: 96px; overflow: hidden; border-radius: 24px; color: var(--bs-secondary-color); background: var(--bs-tertiary-bg); font-size: 2rem; }
.profile-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.certificate-template-preview { aspect-ratio: 1.414/1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8%; border: 3px solid var(--certificate-accent); color: #10213d; background-color: #fff; background-size: cover; background-position: center; text-align: center; box-shadow: 0 12px 35px rgba(16,24,40,.12); }
.certificate-template-preview small { color: var(--certificate-accent); font-weight: 800; letter-spacing: .12em; }
.certificate-template-preview h2 { margin: .5rem 0; color: var(--certificate-primary); font-family: Georgia,serif; font-size: clamp(1.8rem,4vw,3.2rem); }
.certificate-template-preview h3 { padding-bottom: .25rem; border-bottom: 2px solid var(--certificate-accent); font-family: Georgia,serif; }
.certificate-template-preview strong { color: var(--certificate-primary); }
.certificate-template-preview span { margin-top: 1rem; font-size: .72rem; }

@media (max-width: 767.98px) {
  .learning-dashboard-hero { padding: 1.65rem 0 1.4rem; }
  .learning-dashboard-container { padding-top: 1.25rem !important; }
  .course-admin-stats { grid-template-columns: 1fr; }
  .course-admin-stats span + span { border-left: 0; border-top: 1px solid var(--bs-border-color); }
  .verification-search { grid-template-columns: 1fr; }
  .verification-data { grid-template-columns: 1fr; }
  .verification-data div:nth-child(odd) { border-right: 0; }
  .exam-question { padding: 4.7rem 1rem 1rem; }
  .lesson-topbar { display: grid; }
  .certificate-document { padding: 7px; }
  .certificate-border { padding: 7% 4%; }
  .certificate-brand { position: static; margin-bottom: 3%; }
  .certificate-brand img { width: 34px; height: 34px; }
  .certificate-metrics, .certificate-footer-row { width: 96%; }
  .certificate-signature { min-width: 120px; }
}

@media print {
  .certificate-document-page .site-navbar, .certificate-document-page .certificate-actions,
  .certificate-document-page + .footer, .public-bottom-nav { display: none !important; }
  .certificate-document-page { background: #fff; }
  .certificate-document { width: 297mm; height: 210mm; box-shadow: none; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  overflow-x: hidden;
  color: var(--bs-body-color);
  background: var(--bs-body-bg);
}
img { max-width: 100%; }
.navbar { backdrop-filter: blur(14px); }
.site-navbar { min-height: 88px; }
.site-brand { min-width: 0; padding-top: .35rem; padding-bottom: .35rem; }
.site-brand-copy { min-width: 0; line-height: 1.05; }
.site-brand-copy strong { display: block; font-size: 1.12rem; letter-spacing: -.015em; }
.site-brand-copy small { display: block; margin-top: .24rem; font-size: .67rem; letter-spacing: .11em; text-transform: uppercase; }
.site-logo-frame {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 18px;
  background: transparent;
}
.site-logo-frame-header { width: 74px; height: 74px; }
.site-logo-frame-footer { width: 78px; height: 78px; }
.site-logo-frame-auth { width: 106px; height: 106px; border-radius: 24px; }
.site-logo-frame-preview { width: 112px; height: 112px; border-radius: 24px; }
.site-logo-frame-header .site-logo-image { padding: 2px; }
.site-logo-image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  object-position: center;
}
.site-logo-frame:not(.site-logo-frame-preview)[data-logo-shape="portrait"] .site-logo-image,
.logo-preview-icon[data-logo-shape="portrait"] .site-logo-image {
  object-fit: cover;
  object-position: center 28%;
}
.site-logo-frame:not(.site-logo-frame-preview)[data-logo-shape="landscape"] .site-logo-image {
  object-fit: contain;
  padding-inline: 3px;
}
.footer-brand .site-logo-frame { filter: drop-shadow(0 7px 14px rgba(0,0,0,.22)); }
.logo-settings-panel {
  padding: 1.35rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 18px;
  background: var(--soft);
}
[data-bs-theme="dark"] .logo-settings-panel { background: #111827; }
.logo-preview-stage {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 146px;
  padding: 1rem 1.15rem;
  border: 1px dashed var(--bs-border-color);
  border-radius: 16px;
  background: var(--bs-body-bg);
}
.logo-preview-stage strong { font-size: 1.15rem; }
.logo-preview-stage small { font-size: .68rem; letter-spacing: .11em; }

.logo-preview-stage-dual {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.logo-preview-item {
  display: grid;
  justify-items: center;
  gap: .55rem;
  min-width: 0;
  text-align: center;
}
.logo-preview-item small {
  letter-spacing: 0;
  text-transform: none;
  color: var(--bs-secondary-color);
}
.logo-upload-help {
  display: flex;
  align-items: flex-start;
  gap: .8rem;
  padding: .85rem 1rem;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand-dark);
}
[data-bs-theme="dark"] .logo-upload-help { background: rgba(35,87,217,.2); color: #b2ccff; }
.logo-upload-help i { margin-top: .15rem; font-size: 1.15rem; }
.logo-upload-help span { display: block; margin-top: .2rem; font-size: .84rem; line-height: 1.45; }
.admin-current-logo { display: block; width: 76px; height: 76px; padding: 5px; border: 1px solid var(--bs-border-color); border-radius: 16px; background: var(--bs-body-bg); object-fit: contain; }

.eyebrow {
  display: inline-block;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* Slider publicitario */
.promo-slider-section { background: linear-gradient(180deg, var(--soft), transparent); }
.promo-carousel {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 18px 50px rgba(16, 24, 40, .14);
  background: #101828;
}
.promo-carousel .carousel-item { position: relative; }
.promo-image {
  width: 100%;
  height: clamp(250px, 31vw, 440px);
  object-fit: cover;
  object-position: left center;
}
.promo-media { display: block; background: #070b14; }
.promo-video { object-position: center; }
.promo-embed { position: relative; overflow: hidden; }
.promo-embed > img,
.promo-embed > iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.promo-embed > iframe { z-index: 0; }
.promo-embed.is-playing > img,
.promo-embed.is-playing > span { visibility: hidden; }
.promo-embed > span {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: .45rem;
  color: #fff;
  background: rgba(7,11,20,.35);
  pointer-events: none;
}
.promo-embed > span i { font-size: 2.5rem; }
.promo-carousel-toggle {
  position: absolute;
  z-index: 5;
  right: 1rem;
  bottom: .75rem;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 50%;
  color: #fff;
  background: rgba(8,15,35,.68);
}
.promo-carousel-toggle:hover,
.promo-carousel-toggle:focus-visible { background: rgba(8,15,35,.92); }
.promo-carousel .carousel-item {
  position: relative;
  overflow: hidden;
}
.promo-carousel .carousel-item img {
  transition: transform .45s ease, object-position .25s ease;
}
.promo-overlay {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(8, 15, 35, .82) 0%, rgba(8, 15, 35, .45) 48%, rgba(8, 15, 35, .03) 78%);
}
.promo-content {
  position: absolute;
  z-index: 2;
  left: clamp(1.4rem, 5vw, 4.5rem);
  top: 50%;
  transform: translateY(-50%);
  width: min(560px, 72%);
  color: #fff;
}
.promo-content h2 {
  font-size: clamp(1.7rem, 3.5vw, 3.2rem);
  line-height: 1.05;
  font-weight: 850;
  letter-spacing: -.035em;
}
.promo-content p { font-size: clamp(.95rem, 1.4vw, 1.15rem); color: rgba(255,255,255,.88); }
.promo-carousel .carousel-control-prev,
.promo-carousel .carousel-control-next { width: 8%; }

/* Página principal */
.hero-section {
  background:
    radial-gradient(circle at 85% 20%, rgba(109, 62, 232, .15), transparent 32%),
    linear-gradient(135deg, #f8faff 0%, #eef3ff 60%, #f7f3ff 100%);
  border-bottom: 1px solid var(--bs-border-color);
}
[data-bs-theme="dark"] .hero-section {
  background: radial-gradient(circle at 85% 20%, rgba(109, 62, 232, .24), transparent 34%), #0d1428;
}
.hero-section h1 {
  font-size: clamp(2.35rem, 5vw, 4.6rem);
  font-weight: 850;
  line-height: 1.03;
  letter-spacing: -.045em;
  max-width: 760px;
}
.hero-section .lead { max-width: 690px; }
.hero-image { max-height: 470px; filter: drop-shadow(0 28px 32px rgba(16, 24, 40, .16)); }
.hero-trust { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-trust span {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem .8rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  font-size: .86rem;
}
[data-bs-theme="dark"] .hero-trust span { background: rgba(17,24,39,.78); }

.section-heading { margin-bottom: 1.75rem; }
.section-heading > div > span,
.section-heading > span { color: var(--brand); }
.section-heading h2 { font-weight: 830; letter-spacing: -.025em; margin-bottom: 0; }
.section-link { text-decoration: none; font-weight: 700; white-space: nowrap; }
.categories-section { background: var(--soft); }
[data-bs-theme="dark"] .categories-section { background: #0b1120; }
.category-card {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  height: 100%;
  padding: 1.35rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 18px;
  background: var(--bs-body-bg);
  text-decoration: none;
  color: inherit;
  transition: .22s ease;
}
.category-card > i { color: var(--brand); font-size: 1.6rem; }
.category-card span { color: var(--brand); font-size: .85rem; }
.category-card:hover { transform: translateY(-4px); box-shadow: var(--card-shadow); border-color: rgba(35, 87, 217, .35); }

/* Cabecera y barra del catálogo */
.page-header {
  background: linear-gradient(135deg, #101828, #253a70);
  color: #fff;
  padding: 3.2rem 0;
}
.page-header-compact { padding: 2.6rem 0; }
.page-header h1 { font-weight: 850; letter-spacing: -.035em; margin: .35rem 0; }
.page-header p { color: rgba(255,255,255,.78); margin-bottom: 0; }
.catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(300px, 1fr) auto;
  gap: .75rem;
  align-items: stretch;
  margin-bottom: 1.1rem;
}
.toolbar-field {
  display: flex;
  align-items: center;
  min-height: 48px;
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
  background: var(--bs-body-bg);
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(16,24,40,.035);
}
.toolbar-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 100%;
  flex: 0 0 48px;
  color: var(--brand);
  border-right: 1px solid var(--bs-border-color);
}
.toolbar-field .form-control,
.toolbar-field .form-select {
  box-shadow: none !important;
  min-height: 46px;
  background-color: transparent;
}
.toolbar-search-button {
  flex: 0 0 auto;
  min-width: 86px;
  margin: 5px;
  border-radius: 9px;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}
.view-switcher {
  display: flex;
  align-items: center;
  gap: .65rem;
  white-space: nowrap;
}
.view-switcher-label { font-size: .86rem; font-weight: 700; }
.view-switcher .btn-group {
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bs-body-bg);
}
.view-button {
  width: 48px;
  height: 46px;
  border: 0;
  border-radius: 0 !important;
  color: var(--bs-secondary-color);
}
.view-button + .view-button { border-left: 1px solid var(--bs-border-color); }
.view-button.active { background: var(--brand-soft); color: var(--brand-dark); }
[data-bs-theme="dark"] .view-button.active { background: rgba(35,87,217,.25); color: #a9c2ff; }
.catalog-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .35rem .1rem 1rem;
  color: var(--bs-secondary-color);
  font-size: .9rem;
}
.catalog-summary a { text-decoration: none; }
.catalog-pagination { margin-top: 2rem; }

/* Tarjetas de producto */
.product-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--bs-border-color);
  border-radius: 17px;
  background: var(--bs-body-bg);
  box-shadow: 0 5px 18px rgba(16,24,40,.055);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(35,87,217,.3);
  box-shadow: 0 15px 35px rgba(16,24,40,.11);
}
.product-card a { color: inherit; text-decoration: none; }
.cover {
  position: relative;
  display: block;
  height: 205px;
  overflow: hidden;
  background: linear-gradient(145deg, #f7f9fd, #edf1f8);
  border-bottom: 1px solid var(--bs-border-color);
}
[data-bs-theme="dark"] .cover { background: linear-gradient(145deg, #172033, #111827); }
.cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: .85rem;
  transition: transform .25s ease;
}
.product-card:hover .cover img { transform: scale(1.025); }
.cover-placeholder {
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--brand);
  font-size: 4rem;
}
.type-badge,
.offer-badge {
  position: absolute;
  z-index: 2;
  top: .75rem;
  padding: .32rem .62rem;
  border-radius: 999px;
  font-size: .7rem;
  line-height: 1;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(16,24,40,.12);
}
.type-badge { left: .75rem; background: rgba(255,255,255,.94); color: #344054; }
.offer-badge { right: .75rem; background: var(--danger); color: #fff; }
.premium-course-crown {
  position: absolute;
  z-index: 3;
  top: .65rem;
  right: .65rem;
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border: 2px solid rgba(255,255,255,.9);
  border-radius: 50%;
  color: #7a4b00;
  background: linear-gradient(145deg,#fff3a3,#f5b700);
  box-shadow: 0 6px 16px rgba(67,43,0,.26);
}
.offer-badge.has-premium-crown { top: 3.45rem; }
.learning-course-cover > .premium-course-crown { left: auto; right: .65rem; top: .65rem; font-size: .95rem; }
.product-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1rem;
}
.product-category {
  color: var(--brand);
  font-size: .73rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.product-title {
  margin: .45rem 0 .45rem;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.28;
  min-height: 2.56em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-description {
  color: var(--bs-secondary-color);
  font-size: .84rem;
  line-height: 1.45;
  margin-bottom: .9rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: .7rem;
  margin-top: auto;
  padding-top: .75rem;
  border-top: 1px solid var(--bs-border-color);
}
.price-block { min-width: 0; }
.old-price { color: var(--bs-secondary-color); font-size: .78rem; text-decoration: line-through; margin-right: .3rem; }
.offer-label { color: var(--danger); font-size: .68rem; font-weight: 800; text-transform: uppercase; }
.price { display: block; color: var(--brand); font-size: 1.18rem; line-height: 1.2; }
.product-detail-button { white-space: nowrap; }

/* Vista lista */
.catalog-grid[data-view="list"] .catalog-product-item { flex: 0 0 100%; max-width: 100%; }
.catalog-grid[data-view="list"] .product-card { flex-direction: row; min-height: 190px; }
.catalog-grid[data-view="list"] .cover { flex: 0 0 230px; height: auto; min-height: 190px; border-bottom: 0; border-right: 1px solid var(--bs-border-color); }
.catalog-grid[data-view="list"] .product-card-body { padding: 1.2rem 1.35rem; }
.catalog-grid[data-view="list"] .product-title { min-height: auto; font-size: 1.12rem; }
.catalog-grid[data-view="list"] .product-description { -webkit-line-clamp: 3; max-width: 760px; }

/* Componentes generales existentes */
.filter-bar,
.content-box {
  border: 1px solid var(--bs-border-color);
  border-radius: 18px;
  padding: 1.5rem;
  background: var(--bs-body-bg);
  box-shadow: 0 10px 30px rgba(16,24,40,.05);
}
.product-detail-cover {
  border-radius: 24px;
  overflow: hidden;
  min-height: 450px;
  background: linear-gradient(135deg,#eef2ff,#f4ebff);
}
.product-detail-cover img { width: 100%; height: 100%; object-fit: contain; padding: 1rem; }
.price-xl { font-size: 2.3rem; font-weight: 800; color: var(--brand); margin: 1rem 0; }
.product-meta { display: flex; gap: .75rem; flex-wrap: wrap; }
.product-meta span { padding: .55rem .8rem; background: var(--soft); color: #344054; border-radius: 10px; }
.process { background: var(--soft); }
[data-bs-theme="dark"] .process,
[data-bs-theme="dark"] .product-meta span { background: #111827; color: #e5e7eb; }
.step { background: var(--bs-body-bg); padding: 2rem; border-radius: 22px; height: 100%; border: 1px solid var(--bs-border-color); }
.step b { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: #fff; margin-bottom: 1rem; }
.empty-state,
.result-box { text-align: center; padding: 3.5rem 1.5rem; border: 2px dashed var(--bs-border-color); border-radius: 22px; }
.empty-state > i,
.result-box > i { font-size: 3.2rem; margin-bottom: 1rem; color: var(--brand); }
.auth-section { min-height: 75vh; display: grid; place-items: center; padding: 3rem 1rem; background: linear-gradient(135deg,#eef2ff,#f4ebff); }
[data-bs-theme="dark"] .auth-section { background: #0b1020; }
.auth-card { width: min(100%,470px); background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); border-radius: 24px; padding: 2rem; box-shadow: 0 24px 70px rgba(16,24,40,.15); }

/* Administración */
.stat-card { padding: 1.5rem; border-radius: 18px; border: 1px solid var(--bs-border-color); display: flex; flex-direction: column; gap: .4rem; height: 100%; }
.stat-card i { font-size: 1.5rem; color: var(--brand); }
.stat-card strong { font-size: 2rem; }
.banner-reference-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border: 1px solid #b2ccff;
  border-radius: 14px;
  background: #eff4ff;
  color: #1849a9;
}
[data-bs-theme="dark"] .banner-reference-box { background: rgba(35,87,217,.14); border-color: rgba(108,153,255,.35); color: #b2ccff; }
.banner-reference-box > i { font-size: 1.5rem; }
.banner-reference-box span { display: block; font-size: .86rem; opacity: .86; }
.admin-banner-thumb { width: 138px; height: 58px; object-fit: cover; border-radius: 8px; border: 1px solid var(--bs-border-color); }
.admin-banner-media-thumb,
.admin-banner-mobile-thumb { position: relative; display: inline-flex; }
.admin-banner-media-thumb > span,
.admin-banner-mobile-thumb > i {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%,-50%);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #fff;
  background: rgba(8,15,35,.76);
}
.admin-banner-mobile-thumb {
  grid-column: 1;
  grid-row: 1 / 3;
  width: 60px;
  height: 54px;
}
.banner-preview-card { height: 100%; padding: 1rem; border: 1px solid var(--bs-border-color); border-radius: 16px; background: var(--soft); }
[data-bs-theme="dark"] .banner-preview-card { background: #111827; }
.preview-label { display: block; font-size: .75rem; font-weight: 800; color: var(--brand); margin-bottom: .65rem; text-transform: uppercase; }
.banner-preview-frame { position: relative; overflow: hidden; aspect-ratio: 1600 / 520; border-radius: 12px; background: #dfe6f3; }
.banner-preview-frame img { width: 100%; height: 100%; object-fit: cover; }
.banner-video-preview { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #070b14; }
.banner-external-preview { position: absolute; z-index: 2; inset: 0; display: grid; place-content: center; justify-items: center; gap: .5rem; padding: 1rem; color: #fff; text-align: center; background: linear-gradient(135deg,rgba(8,15,35,.78),rgba(35,87,217,.66)); }
.banner-external-preview i { font-size: 2.3rem; }
.banner-external-preview.d-none { display: none; }
.banner-preview-placeholder { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: .5rem; color: #667085; }
.banner-preview-placeholder i { font-size: 2rem; }
.admin-product-cell { display: flex; align-items: center; gap: .8rem; min-width: 250px; }
.admin-product-cell img,
.admin-product-placeholder { width: 48px; height: 48px; border-radius: 8px; object-fit: contain; background: var(--soft); border: 1px solid var(--bs-border-color); }
.admin-product-placeholder { display: grid; place-items: center; color: var(--brand); }

.footer { background: #101828; color: #fff; }
.footer a { display: block; color: #d0d5dd; text-decoration: none; margin: .45rem 0; }
.legal { max-width: 900px; }
.legal h2 { margin-top: 2rem; }
.table { min-width: 680px; }

@media (max-width: 1199.98px) {
  .catalog-toolbar { grid-template-columns: minmax(210px, 280px) 1fr; }
  .view-switcher { grid-column: 1 / -1; justify-content: flex-end; }
}

@media (max-width: 767.98px) {
  .site-navbar { min-height: 74px; }
  .site-logo-frame-header { width: 58px; height: 58px; border-radius: 15px; }
  .site-brand { gap: .65rem !important; }
  .site-brand-copy strong { font-size: 1rem; }
  .site-brand-copy small { font-size: .58rem; letter-spacing: .085em; }
  .promo-carousel { border-radius: 16px; }
  .promo-image { height: 250px; object-position: 16% center; }
  .promo-video { object-position: center; }
  .promo-carousel-toggle { right: .65rem; bottom: .5rem; width: 34px; height: 34px; }
  .promo-overlay { background: linear-gradient(90deg, rgba(8,15,35,.85), rgba(8,15,35,.32)); }
  .promo-content { left: 1.25rem; width: calc(100% - 2.5rem); }
  .promo-content p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .hero-section h1 { font-size: 2.55rem; }
  .hero-image { max-height: 330px; }
  .page-header-compact { padding: 2rem 0; }
  .catalog-toolbar { grid-template-columns: 1fr; }
  .category-field,
  .search-field { width: 100%; }
  .view-switcher { grid-column: auto; justify-content: space-between; }
  .toolbar-search-button { display: none; }
  .catalog-summary { align-items: flex-start; }
  .cover { height: 190px; }
  .product-card-body { padding: .9rem; }
  .product-detail-button { font-size: .76rem; padding: .38rem .55rem; }
  .catalog-grid[data-view="list"] .product-card { min-height: 155px; }
  .catalog-grid[data-view="list"] .cover { flex-basis: 145px; min-height: 155px; }
  .catalog-grid[data-view="list"] .product-card-body { padding: .85rem; }
  .catalog-grid[data-view="list"] .product-description { -webkit-line-clamp: 2; }
  .product-detail-cover { min-height: 320px; }
  .content-box { padding: 1rem; }
  .navbar .btn-primary { margin-top: .5rem; }
  .admin-banner-thumb { width: 108px; height: 48px; }
}

@media (max-width: 575.98px) {
  .site-logo-frame-footer { width: 66px; height: 66px; }
  .site-logo-frame-auth { width: 92px; height: 92px; }
  .site-logo-frame-preview { width: 96px; height: 96px; }
  .logo-preview-stage { min-height: 126px; padding: .85rem; }
  .logo-preview-stage-dual { grid-template-columns: 1fr 1fr; gap: .65rem; }
  .promo-image { height: 220px; }
  .promo-content h2 { font-size: 1.55rem; }
  .promo-content p { font-size: .88rem; margin-bottom: .7rem; }
  .promo-content .btn { padding: .42rem .7rem; font-size: .82rem; }
  .hero-section h1 { font-size: 2.15rem; }
  .hero-trust { gap: .45rem; }
  .hero-trust span { font-size: .76rem; padding: .45rem .65rem; }
  .section-heading { align-items: flex-start !important; }
  .catalog-product-item { width: 100%; }
  .cover { height: 220px; }
  .catalog-grid[data-view="list"] .product-card { flex-direction: column; }
  .catalog-grid[data-view="list"] .cover { flex-basis: auto; width: 100%; height: 190px; border-right: 0; border-bottom: 1px solid var(--bs-border-color); }
  .catalog-grid[data-view="list"] .product-title { font-size: 1rem; }
}

/* Pagos manuales por Yape y Plin */
.checkout-sticky-summary { position: sticky; top: 96px; }
.manual-payment-option { display: block; height: 100%; cursor: pointer; }
.manual-payment-option > input { position: absolute; opacity: 0; pointer-events: none; }
.manual-payment-option > span { display: flex; flex-direction: column; align-items: center; gap: .45rem; height: 100%; padding: 1rem; border: 1px solid var(--bs-border-color); border-radius: 18px; text-align: center; transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.manual-payment-option > input:checked + span { border-color: var(--bs-primary); background: rgba(var(--bs-primary-rgb), .05); box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), .12); }
.manual-payment-option.disabled { cursor: not-allowed; opacity: .58; }
.manual-payment-option img { width: min(100%, 220px); aspect-ratio: 1; object-fit: contain; border-radius: 14px; background: #fff; }
.payment-qr-expandable { cursor: zoom-in; transition: transform .18s ease, box-shadow .18s ease; }
.payment-qr-expandable:hover,
.payment-qr-expandable:focus-visible { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(15, 23, 42, .16); outline: 3px solid rgba(var(--bs-primary-rgb), .2); outline-offset: 3px; }
.payment-qr-zoom-hint { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; color: var(--bs-primary); font-size: .75rem; font-weight: 700; }
.payment-qr-dialog {
  width: min(94vw, 660px);
  max-width: none;
  max-height: calc(100dvh - 1.25rem);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 24px;
  background: transparent;
  color: var(--bs-body-color);
}
.payment-qr-dialog::backdrop { background: rgba(8, 15, 30, .78); backdrop-filter: blur(4px); }
.payment-qr-dialog-card { position: relative; display: grid; justify-items: center; gap: .85rem; max-height: calc(100dvh - 1.25rem); padding: 1.35rem; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; border: 1px solid var(--bs-border-color); border-radius: 24px; background: var(--bs-body-bg); box-shadow: 0 28px 80px rgba(0, 0, 0, .34); text-align: center; }
.payment-qr-dialog-close { position: absolute; top: .85rem; right: .85rem; display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid var(--bs-border-color); border-radius: 50%; color: var(--bs-body-color); background: var(--bs-body-bg); }
.payment-qr-dialog-close:hover,
.payment-qr-dialog-close:focus-visible { color: #fff; border-color: var(--bs-primary); background: var(--bs-primary); outline: none; }
.payment-qr-dialog-heading { padding-inline: 2.5rem; }
.payment-qr-dialog-heading h2 { margin: .15rem 0 0; font-size: clamp(1.2rem, 3vw, 1.65rem); }
.payment-qr-dialog-image { width: min(72vw, 460px); height: min(55dvh, 460px); object-fit: contain; padding: .55rem; border: 1px solid var(--bs-border-color); border-radius: 18px; background: #fff; }
.payment-qr-dialog-meta { margin: 0; color: var(--bs-body-color); font-size: clamp(.9rem, 2vw, 1.05rem); font-weight: 800; overflow-wrap: anywhere; }
.payment-qr-dialog-help { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; max-width: 480px; color: var(--bs-secondary-color); }
body.payment-qr-dialog-open { overflow: hidden; }
.payment-qr-placeholder { display: grid; place-items: center; width: 150px; aspect-ratio: 1; border: 1px dashed var(--bs-border-color); border-radius: 14px; font-size: 3rem; color: var(--bs-secondary-color); }
.cert-payment-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.cert-payment-options label { display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: .65rem; border: 1px solid var(--bs-border-color); border-radius: 14px; cursor: pointer; text-align: center; }
.cert-payment-options label.disabled { opacity: .55; cursor: not-allowed; }
.cert-payment-options img { width: 100px; height: 100px; object-fit: contain; border-radius: 10px; background: #fff; }
.payment-qr-preview { display: flex; align-items: center; gap: 1rem; }
.payment-qr-preview img { width: 130px; height: 130px; object-fit: contain; padding: .35rem; border: 1px solid var(--bs-border-color); border-radius: 14px; background: #fff; }
.payment-qr-preview span { color: var(--bs-secondary-color); font-weight: 700; }
.manual-payment-review { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; align-items: center; padding: 1rem; border-radius: 16px; background: var(--bs-tertiary-bg); }

@media (max-width: 991.98px) {
  .checkout-sticky-summary { position: static; }
  .manual-payment-review { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 575.98px) {
  .payment-qr-dialog { width: min(95vw, 440px); max-height: calc(100dvh - .75rem); }
  .payment-qr-dialog-card { gap: .65rem; max-height: calc(100dvh - .75rem); padding: 1rem; border-radius: 20px; }
  .payment-qr-dialog-close { top: .6rem; right: .6rem; width: 36px; height: 36px; }
  .payment-qr-dialog-image { width: min(86vw, 380px); height: min(48dvh, 340px); padding: .35rem; }
  .payment-qr-dialog-help { font-size: .72rem; }
  .manual-payment-review, .cert-payment-options { grid-template-columns: 1fr; }
}

@media (min-width: 576px) and (max-height: 720px) {
  .payment-qr-dialog-card { gap: .55rem; padding: 1rem; }
  .payment-qr-dialog-heading h2 { font-size: 1.3rem; }
  .payment-qr-dialog-image { width: min(68vw, 430px); height: min(50dvh, 390px); padding: .4rem; }
  .payment-qr-dialog-help { font-size: .76rem; }
}

/* =========================================================
   Versión 1.5: navegación móvil, seguridad admin y footer
   ========================================================= */
.site-logo-frame-menu {
  width: 48px;
  height: 48px;
  border-radius: 14px;
}

.site-menu-toggle {
  width: 48px;
  height: 48px;
  padding: .55rem;
  border-radius: 12px;
}

.site-navigation .nav-link.active {
  color: var(--brand);
  font-weight: 700;
}

.theme-toggle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
}

.admin-page-heading,
.admin-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.admin-stat-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: .85rem;
  min-height: 132px;
  height: 100%;
  padding: 1.15rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 20px;
  background: var(--bs-body-bg);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(16, 24, 40, .045);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.admin-stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(35, 87, 217, .32);
  box-shadow: var(--card-shadow);
}
.admin-stat-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  font-size: 1.2rem;
}
.admin-stat-icon.tone-primary { background: #eaf1ff; color: #2357d9; }
.admin-stat-icon.tone-warning { background: #fff3d6; color: #b96b00; }
.admin-stat-icon.tone-info { background: #e2f5ff; color: #027aa7; }
.admin-stat-icon.tone-success { background: #dcfae6; color: #027a48; }
[data-bs-theme="dark"] .admin-stat-icon.tone-primary { background: rgba(35,87,217,.22); color: #b2ccff; }
[data-bs-theme="dark"] .admin-stat-icon.tone-warning { background: rgba(245,158,11,.19); color: #fdbb74; }
[data-bs-theme="dark"] .admin-stat-icon.tone-info { background: rgba(14,165,233,.18); color: #7dd3fc; }
[data-bs-theme="dark"] .admin-stat-icon.tone-success { background: rgba(16,185,129,.18); color: #6ee7b7; }
.admin-stat-data {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.admin-stat-data strong {
  overflow-wrap: anywhere;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  line-height: 1.05;
  color: var(--bs-heading-color);
}
.admin-stat-data small {
  margin-top: .35rem;
  color: var(--bs-secondary-color);
  font-weight: 650;
}
.admin-stat-arrow {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  color: var(--bs-secondary-color);
  font-size: .8rem;
}

.admin-monitor-card { overflow: hidden; }
.admin-section-heading {
  margin: -1.5rem -1.5rem 1rem;
  padding: 1.15rem 1.5rem;
  border-bottom: 1px solid var(--bs-border-color);
}
.order-status {
  display: inline-flex;
  align-items: center;
  padding: .32rem .62rem;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 750;
}
.order-status.status-paid { background: #dcfae6; color: #027a48; }
.order-status.status-pending { background: #fff3d6; color: #93370d; }
.order-status.status-cancelled,
.order-status.status-refunded { background: #f2f4f7; color: #475467; }

.admin-mobile-records { display: grid; gap: .75rem; }
.admin-mobile-record {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto 14px;
  align-items: center;
  gap: .75rem;
  min-height: 76px;
  padding: .8rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 16px;
  color: inherit;
  text-decoration: none;
}
.admin-mobile-record .record-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--brand-soft);
  color: var(--brand);
}
.admin-mobile-record .record-copy,
.admin-mobile-record .record-meta { display: flex; flex-direction: column; min-width: 0; }
.admin-mobile-record .record-copy strong,
.admin-mobile-record .record-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-mobile-record .record-meta { align-items: flex-end; text-align: right; }
.admin-mobile-record small { color: var(--bs-secondary-color); }

.security-card-heading {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.security-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 1.35rem;
}
.security-checklist {
  display: grid;
  gap: .8rem;
  padding: 0;
  margin: 1.25rem 0 1.5rem;
  list-style: none;
}
.security-checklist li { display: flex; align-items: flex-start; gap: .65rem; }
.security-checklist i { color: var(--success); margin-top: .2rem; }

.footer-heading {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: .85rem;
  color: #fff;
}
.footer-heading i { color: #84adff; }
.footer .footer-link {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  margin: .55rem 0;
  color: #d0d5dd;
  line-height: 1.45;
}
.footer .footer-link i {
  flex: 0 0 18px;
  margin-top: .18rem;
  color: #84adff;
  text-align: center;
}
.footer .footer-link:hover { color: #fff; }
.footer .footer-link-muted { color: #98a2b3; }
.footer-email span { overflow-wrap: anywhere; }
.footer-copyright {
  padding-top: .25rem;
  text-align: center;
  color: #fff;
  font-size: .88rem;
}

.admin-mobile-appbar,
.admin-bottom-nav { display: none; }

@media (max-width: 991.98px) {
  .site-navbar { min-height: 74px; }
  .site-navigation { width: min(88vw, 360px) !important; }
  .site-navigation .offcanvas-body { padding: 1rem; }
  .site-navigation .navbar-nav { gap: .35rem; }
  .site-navigation .nav-link,
  .site-navigation .btn-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    width: 100%;
    min-height: 48px;
    padding: .7rem .8rem;
    border-radius: 12px;
  }
  .site-navigation .nav-link:hover,
  .site-navigation .nav-link.active { background: var(--brand-soft); }
  [data-bs-theme="dark"] .site-navigation .nav-link:hover,
  [data-bs-theme="dark"] .site-navigation .nav-link.active { background: rgba(35,87,217,.18); }
  .site-navigation form { width: 100%; }
  .site-navigation .theme-toggle-button { width: 100%; min-height: 46px; margin-top: .4rem; }

  .admin-area .admin-desktop-navbar { display: none !important; }
  .admin-mobile-appbar {
    position: sticky;
    top: 0;
    z-index: 1025;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px 44px;
    align-items: center;
    gap: .55rem;
    min-height: 68px;
    padding: .55rem max(.75rem, env(safe-area-inset-left));
    border-bottom: 1px solid var(--bs-border-color);
    background: var(--bs-body-bg);
    background: color-mix(in srgb, var(--bs-body-bg) 92%, transparent);
    backdrop-filter: blur(16px);
  }
  .admin-appbar-button,
  .admin-avatar {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--bs-border-color);
    border-radius: 13px;
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    text-decoration: none;
  }
  .admin-avatar {
    border-color: var(--brand-dark);
    background: var(--brand-dark);
    color: #fff;
    font-size: .8rem;
    font-weight: 800;
  }
  .admin-appbar-copy { min-width: 0; line-height: 1.08; }
  .admin-appbar-copy small,
  .admin-appbar-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .admin-appbar-copy small { color: var(--bs-secondary-color); font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; }
  .admin-appbar-copy strong { margin-top: .22rem; font-size: .95rem; }

  .admin-mobile-offcanvas { width: min(88vw, 350px) !important; }
  .admin-mobile-menu { display: grid; gap: .45rem; }
  .admin-mobile-menu a {
    display: flex;
    align-items: center;
    gap: .8rem;
    min-height: 50px;
    padding: .72rem .8rem;
    border-radius: 13px;
    color: inherit;
    text-decoration: none;
    font-weight: 650;
  }
  .admin-mobile-menu a i {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--soft);
    color: var(--brand);
  }
  [data-bs-theme="dark"] .admin-mobile-menu a i { background: #111827; }
  .admin-mobile-menu a.active { background: var(--brand-soft); color: var(--brand-dark); }
  [data-bs-theme="dark"] .admin-mobile-menu a.active { background: rgba(35,87,217,.2); color: #b2ccff; }

  .admin-bottom-nav {
    position: fixed;
    z-index: 1035;
    left: max(.55rem, env(safe-area-inset-left));
    right: max(.55rem, env(safe-area-inset-right));
    bottom: max(.55rem, env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: 68px;
    padding: .35rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 20px;
    background: var(--bs-body-bg);
    background: color-mix(in srgb, var(--bs-body-bg) 94%, transparent);
    box-shadow: 0 16px 42px rgba(16, 24, 40, .18);
    backdrop-filter: blur(16px);
  }
  .admin-bottom-nav a,
  .admin-bottom-nav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .24rem;
    min-width: 0;
    min-height: 58px;
    padding: .3rem .15rem;
    border: 0;
    border-radius: 15px;
    background: transparent;
    color: var(--bs-secondary-color);
    text-decoration: none;
    font-size: .67rem;
    font-weight: 650;
  }
  .admin-bottom-nav a i,
  .admin-bottom-nav button i { font-size: 1rem; }
  .admin-bottom-nav .active { background: var(--brand-soft); color: var(--brand-dark); }
  [data-bs-theme="dark"] .admin-bottom-nav .active { background: rgba(35,87,217,.22); color: #b2ccff; }

  .admin-area .admin-main { min-height: 60vh; padding-bottom: 5.4rem; }
  .admin-area .footer { padding-bottom: calc(5rem + env(safe-area-inset-bottom)) !important; }
  .admin-main .container.py-4 { padding-top: 1rem !important; }
  .admin-primary-action { min-height: 44px; }
  .admin-stat-card { min-height: 122px; padding: 1rem; }
}

@media (max-width: 767.98px) {
  .admin-section-heading { margin: -1rem -1rem 1rem; padding: 1rem; }
  .admin-page-heading { align-items: flex-start; }
  .admin-primary-action { width: 100%; }
  .security-card-heading { align-items: center; }
  .footer-grid { text-align: left; }
  .footer-brand-column { text-align: center; }
  .footer-brand { justify-content: center; }
  .footer-brand-column p { max-width: 560px; margin-inline: auto; }
}

@media (max-width: 575.98px) {
  .site-brand-copy strong { font-size: .98rem; }
  .site-menu-toggle { width: 44px; height: 44px; }
  .admin-mobile-appbar { grid-template-columns: 42px minmax(0, 1fr) 42px 42px; gap: .4rem; }
  .admin-appbar-button,
  .admin-avatar { width: 42px; height: 42px; }
  .admin-stat-card {
    align-items: flex-start;
    flex-direction: column;
    min-height: 144px;
  }
  .admin-stat-icon { width: 44px; height: 44px; }
  .admin-stat-data strong { font-size: 1.35rem; }
  .admin-mobile-record { grid-template-columns: 40px minmax(0, 1fr) auto 12px; gap: .55rem; }
  .footer .row > [class*="col-"] { min-width: 0; }
}

.admin-mobile-card-list {
  display: grid;
  gap: 1rem;
}
.admin-product-mobile-card,
.admin-order-mobile-card {
  padding: 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 18px;
  background: var(--bs-body-bg);
  box-shadow: 0 10px 28px rgba(16, 24, 40, .05);
}
.admin-product-mobile-card {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: .9rem;
}
.admin-product-mobile-cover {
  display: grid;
  place-items: center;
  width: 82px;
  height: 96px;
  overflow: hidden;
  border: 1px solid var(--bs-border-color);
  border-radius: 14px;
  background: var(--soft);
  color: var(--brand);
  font-size: 1.5rem;
}
.admin-product-mobile-cover img { width: 100%; height: 100%; object-fit: contain; }
.admin-product-mobile-copy { min-width: 0; }
.admin-product-mobile-copy h2 {
  display: -webkit-box;
  overflow: hidden;
  margin: .45rem 0 .25rem;
  font-size: 1rem;
  line-height: 1.25;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.admin-product-mobile-copy p { margin: 0; color: var(--bs-secondary-color); font-size: .78rem; }
.admin-mobile-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: .45rem; margin-top: .55rem; }
.admin-mobile-price del { color: var(--bs-secondary-color); font-size: .76rem; }
.admin-mobile-price strong { font-size: 1.05rem; }
.admin-mobile-price span { padding: .18rem .42rem; border-radius: 999px; background: #fee4e2; color: #b42318; font-size: .66rem; font-weight: 800; }
.admin-product-mobile-card > .btn { grid-column: 1 / -1; min-height: 44px; }

.admin-order-mobile-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: 1rem;
}
.admin-order-mobile-heading small { color: var(--bs-secondary-color); }
.admin-order-mobile-heading h2 { margin: .1rem 0 0; font-size: 1rem; }
.admin-order-mobile-data { display: grid; gap: .75rem; }
.admin-order-mobile-data > span {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  column-gap: .65rem;
  align-items: center;
}
.admin-order-mobile-data > span i {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
}
.admin-order-mobile-data strong,
.admin-order-mobile-data small { min-width: 0; overflow-wrap: anywhere; }
.admin-order-mobile-data small { color: var(--bs-secondary-color); }
.admin-order-mobile-form { display: grid; grid-template-columns: 1fr auto; gap: .65rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--bs-border-color); }

/* ==========================================================
   SERVITECNO DIGITAL STUDIO v1.6
   Navegación móvil, recuperación y control de desbordamiento
   ========================================================== */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

body,
.site-main,
.admin-main,
.footer,
.site-navbar {
  min-width: 0;
}

/* Evita que backdrop-filter convierta la barra en contenedor del offcanvas. */
.navbar { backdrop-filter: none; }
.site-navbar {
  background-color: color-mix(in srgb, var(--bs-body-bg) 96%, transparent) !important;
  box-shadow: 0 1px 0 rgba(16, 24, 40, .04);
}
.site-navbar-inner { min-width: 0; }
.site-desktop-navigation { gap: .15rem; }
.site-desktop-navigation .nav-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .65rem .72rem;
  border-radius: 10px;
  color: var(--bs-secondary-color);
  text-decoration: none;
  white-space: nowrap;
}
.site-desktop-navigation .nav-link:hover,
.site-desktop-navigation .nav-link.active {
  background: var(--brand-soft);
  color: var(--brand-dark);
}
[data-bs-theme="dark"] .site-desktop-navigation .nav-link:hover,
[data-bs-theme="dark"] .site-desktop-navigation .nav-link.active {
  background: rgba(35, 87, 217, .2);
  color: #b2ccff;
}
.site-desktop-navigation form { margin: 0; }
.site-menu-toggle {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--bs-border-color);
  border-radius: 13px;
  color: var(--bs-body-color);
  box-shadow: none !important;
}
.site-menu-toggle i { font-size: 1.2rem; }
.site-logo-frame-menu { width: 52px; height: 52px; border-radius: 15px; }

/* Cajón móvil público y administrativo */
.offcanvas.mobile-drawer {
  --bs-offcanvas-width: min(86vw, 340px);
  width: min(86vw, 340px) !important;
  max-width: calc(100vw - 42px) !important;
  height: 100dvh;
  border: 0;
  background: #102035;
  color: #fff;
  box-shadow: 18px 0 45px rgba(3, 12, 28, .28);
}
.mobile-drawer .offcanvas-body { min-width: 0; }
.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-height: 78px;
  padding: .8rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.mobile-drawer-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-width: 0;
}
.mobile-drawer-brand .site-brand-copy strong,
.mobile-drawer-brand .site-brand-copy small { color: #fff; }
.mobile-drawer-brand .site-brand-copy strong {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mobile-drawer-close {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  color: #dce8f8;
  font-size: 1.15rem;
}
.mobile-drawer-body {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  padding: 1rem;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.mobile-user-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: .8rem;
  padding: .8rem;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  background: rgba(255,255,255,.065);
}
.mobile-user-avatar {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 2px solid rgba(255,255,255,.55);
  border-radius: 50%;
  background: #15945f;
  color: #fff;
  font-size: .8rem;
  font-weight: 850;
}
.mobile-user-card > span:last-child { min-width: 0; }
.mobile-user-card strong,
.mobile-user-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mobile-user-card small { margin-top: .2rem; color: #98aac1; font-size: .73rem; }
.mobile-menu-section { min-width: 0; }
.mobile-menu-label {
  display: block;
  padding: 0 .55rem .45rem;
  color: #8297b2;
  font-size: .66rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.mobile-menu-links { display: grid; gap: .3rem; }
.mobile-menu-links a {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: .65rem;
  min-height: 48px;
  padding: .45rem .6rem;
  border-radius: 13px;
  color: #eaf1fb;
  text-decoration: none;
  font-size: .9rem;
  font-weight: 680;
}
.mobile-menu-links a i {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: rgba(255,255,255,.07);
  color: #d9e8fb;
}
.mobile-menu-links a span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mobile-menu-links a b {
  min-width: 24px;
  padding: .18rem .4rem;
  border-radius: 999px;
  background: #1769ff;
  color: #fff;
  font-size: .68rem;
  text-align: center;
}
.mobile-menu-links a:hover,
.mobile-menu-links a.active {
  background: #0f65b8;
  color: #fff;
}
.mobile-menu-links a:hover i,
.mobile-menu-links a.active i { background: rgba(255,255,255,.14); color: #fff; }
.mobile-drawer-actions {
  display: grid;
  gap: .55rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.12);
}
.mobile-drawer-actions form { margin: 0; }
.mobile-theme-button,
.mobile-logout-button {
  display: flex;
  align-items: center;
  gap: .75rem;
  width: 100%;
  min-height: 46px;
  padding: .65rem .8rem;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 12px;
  background: rgba(255,255,255,.055);
  color: #fff;
  text-align: left;
}
.mobile-logout-button { color: #ffb4b4; }
.offcanvas-backdrop.show { opacity: .62; }

/* App bar del administrador */
@media (max-width: 991.98px) {
  .admin-area .admin-desktop-navbar { display: none !important; }
  .admin-mobile-appbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr) 44px 44px;
    align-items: center;
    gap: .55rem;
    width: 100%;
    min-height: 68px;
    padding: .55rem max(.75rem, env(safe-area-inset-left));
    border-bottom: 1px solid var(--bs-border-color);
    background: var(--bs-body-bg);
    box-shadow: 0 8px 24px rgba(16,24,40,.06);
  }
  .admin-mobile-offcanvas { z-index: 1060; }
  .admin-main { width: 100%; overflow-x: clip; }
  .admin-main > * { max-width: 100%; }
}

/* Barras inferiores: sin 100vw, para evitar desplazamiento horizontal. */
.admin-bottom-nav,
.public-bottom-nav { display: none; }
@media (max-width: 991.98px) {
  .admin-bottom-nav,
  .public-bottom-nav {
    position: fixed;
    z-index: 1040;
    left: max(8px, env(safe-area-inset-left));
    right: max(8px, env(safe-area-inset-right));
    bottom: max(8px, env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: auto;
    max-width: calc(100vw - 16px);
    min-height: 66px;
    padding: 5px;
    border: 1px solid rgba(193, 205, 220, .72);
    border-radius: 19px;
    background: color-mix(in srgb, var(--bs-body-bg) 96%, transparent);
    box-shadow: 0 15px 38px rgba(16, 24, 40, .2);
  }
  .admin-bottom-nav a,
  .admin-bottom-nav button,
  .public-bottom-nav a,
  .public-bottom-nav button {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .23rem;
    min-width: 0;
    min-height: 54px;
    padding: .25rem .1rem;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: var(--bs-secondary-color);
    text-decoration: none;
    font-size: clamp(.57rem, 2.5vw, .68rem);
    font-weight: 680;
    line-height: 1;
  }
  .admin-bottom-nav i,
  .public-bottom-nav i { font-size: 1.03rem; }
  .admin-bottom-nav .active,
  .public-bottom-nav .active { background: var(--brand-soft); color: var(--brand-dark); }
  [data-bs-theme="dark"] .admin-bottom-nav .active,
  [data-bs-theme="dark"] .public-bottom-nav .active { background: rgba(35,87,217,.22); color: #b2ccff; }
  .public-bottom-nav b {
    position: absolute;
    top: 4px;
    right: calc(50% - 20px);
    display: grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: #1769ff;
    color: #fff;
    font-size: .58rem;
  }
  .has-public-bottom-nav .site-main,
  .admin-area .admin-main { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
}

/* Formularios de acceso */
.auth-section {
  width: 100%;
  min-height: calc(100dvh - 88px);
  padding: clamp(1.4rem, 5vw, 3.5rem) max(1rem, env(safe-area-inset-left));
}
.auth-card {
  width: min(100%, 480px);
  min-width: 0;
  padding: clamp(1.25rem, 5vw, 2.15rem);
}
.auth-section-login { padding-block: clamp(.85rem, 2vw, 1.35rem); }
.auth-card .form-control,
.auth-card .input-group-text,
.auth-card .btn { min-height: 46px; }
.auth-card-login {
  width: min(100%, 440px);
  padding: clamp(1.15rem, 3vw, 1.6rem);
}
.auth-login-heading {
  margin-bottom: 1.2rem;
  text-align: center;
}
.auth-login-heading .eyebrow {
  display: block;
  margin-bottom: .35rem;
  font-size: .72rem;
  letter-spacing: .13em;
}
.auth-login-heading h1 {
  margin: 0 0 .3rem;
  font-size: clamp(1.55rem, 3vw, 1.85rem);
  line-height: 1.2;
}
.auth-login-heading p {
  max-width: 350px;
  margin: 0 auto;
  color: var(--bs-secondary-color);
  font-size: .92rem;
  line-height: 1.45;
}
.auth-card-login .form-label { margin-bottom: .35rem; }
.auth-card-login .form-control,
.auth-card-login .input-group-text,
.auth-card-login .btn { min-height: 44px; }
.auth-password-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .4rem;
}
.auth-login-actions {
  display: grid;
  gap: .65rem;
  margin-top: 1.2rem;
}
.auth-login-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .55rem .9rem;
  font-weight: 700;
}
.auth-section-register { padding-block: clamp(.85rem, 2vw, 1.5rem); }
.auth-card-register { width: min(100%, 900px); padding: clamp(1rem, 2vw, 1.3rem); }
.auth-register-heading { margin-bottom: .75rem; text-align: center; }
.auth-register-heading .eyebrow {
  display: block;
  margin-bottom: .3rem;
  font-size: .72rem;
  letter-spacing: .13em;
}
.auth-register-heading h1 {
  margin: 0 0 .25rem;
  font-size: clamp(1.45rem, 3vw, 1.7rem);
  line-height: 1.2;
}
.auth-register-heading p {
  margin: 0;
  color: var(--bs-secondary-color);
  font-size: .86rem;
  line-height: 1.4;
}
.auth-register-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem .85rem;
  align-items: start;
}
.auth-register-field { min-width: 0; }
.auth-register-field .form-label { margin-bottom: .2rem; font-size: .86rem; }
.auth-card-register .form-control,
.auth-card-register .form-select,
.auth-card-register .input-group-text,
.auth-card-register .btn { min-height: 40px; }
.auth-card-register .form-text { margin-top: .18rem; font-size: .7rem; line-height: 1.25; }
.auth-country-picker { position: relative; min-width: 0; }
.auth-country-native {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}
.auth-country-trigger {
  width: 100%;
  min-height: 40px;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.auth-country-options {
  position: absolute;
  z-index: 1080;
  top: calc(100% + .3rem);
  right: 0;
  left: 0;
  max-height: calc(4 * 38px + 2px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1px;
  border: 1px solid var(--bs-border-color);
  border-radius: 10px;
  background: var(--bs-body-bg);
  box-shadow: 0 14px 32px rgba(16, 24, 40, .18);
}
.auth-country-option {
  display: block;
  width: 100%;
  min-height: 38px;
  padding: .45rem .7rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--bs-body-color);
  font-size: .86rem;
  line-height: 1.2;
  text-align: left;
}
.auth-country-option:hover,
.auth-country-option:focus-visible { outline: 0; background: var(--brand-soft); color: var(--brand); }
.auth-country-option[aria-selected="true"] { background: var(--brand); color: #fff; font-weight: 700; }
.auth-register-consent-box {
  padding: .5rem .7rem;
  border: 1px solid rgba(23, 105, 255, .22);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(23, 105, 255, .07), rgba(66, 198, 255, .05));
  font-size: .8rem;
  line-height: 1.3;
}
.auth-register-grid + .auth-register-consent-box { margin-top: .6rem; }
.auth-register-consent-box .form-check { min-height: 0; margin: 0; }
.auth-register-consent-box small {
  display: block;
  margin-top: .2rem;
  padding-left: 1.5rem;
  color: var(--bs-secondary-color);
  font-size: .74rem;
  line-height: 1.35;
}
.profile-consent-stack {
  display: grid;
  gap: .65rem;
}
.profile-consent-box {
  padding: .7rem .85rem;
  border: 1px solid rgba(23, 105, 255, .22);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(23, 105, 255, .07), rgba(66, 198, 255, .05));
  font-size: .86rem;
  line-height: 1.4;
}
.profile-consent-box .form-check {
  min-height: 0;
  margin: 0;
}
.profile-consent-box small {
  display: block;
  margin-top: .25rem;
  padding-left: 1.5rem;
  color: var(--bs-secondary-color);
  font-size: .76rem;
  line-height: 1.35;
}
.profile-consent-box .form-check-input:disabled + .form-check-label { opacity: .65; }
.auth-register-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
.auth-register-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-width: 210px;
  padding: .5rem 1rem;
  font-weight: 700;
}
.auth-register-actions p { margin: 0; font-size: .9rem; text-align: center; }

@media (min-width: 992px) {
  .auth-register-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .auth-register-field:nth-child(1),
  .auth-register-field:nth-child(2),
  .auth-register-field:nth-child(7),
  .auth-register-field:nth-child(8) { grid-column: span 2; }
}
.auth-small-link { font-size: .84rem; text-decoration: none; }

@media (max-width: 767.98px) {
  .auth-register-grid { grid-template-columns: minmax(0, 1fr); }
}
.input-icon-field { position: relative; }
.input-icon-field > i {
  position: absolute;
  z-index: 2;
  left: .95rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--bs-secondary-color);
}
.input-icon-field .form-control { padding-left: 2.75rem; }
.auth-password-group .input-group-text { background: transparent; }
.local-reset-box { overflow-wrap: anywhere; }

/* Pie de página sin filas negativas de Bootstrap. */
.footer { margin-top: 0; padding: 3.25rem 0 1.4rem; background: #0d1b31; color: #fff; overflow: hidden; }
.footer-container { min-width: 0; }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(150px, .85fr) minmax(190px, 1.15fr) minmax(180px, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
.footer-grid > section { min-width: 0; }
.footer-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
  margin-bottom: 1rem;
}
.footer-brand h2 {
  min-width: 0;
  margin: 0;
  color: #fff;
  font-size: 1.15rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.footer-brand-column > p {
  max-width: 610px;
  margin: 0;
  color: #8fa1ba;
  line-height: 1.65;
}
.footer-heading {
  margin: .1rem 0 .8rem;
  font-size: .98rem;
}
.footer .footer-link { width: fit-content; max-width: 100%; }
.footer .footer-link span { min-width: 0; overflow-wrap: anywhere; }
.footer-copyright {
  margin-top: 2rem;
  padding: 1.25rem .75rem 0;
  border-top: 1px solid rgba(255,255,255,.22);
  text-align: center;
  line-height: 1.5;
}

/* Contenedores, tablas y componentes administrativos. */
.container,
.container-fluid,
.row,
[class*="col-"] { min-width: 0; }
.table-responsive { max-width: 100%; }
.content-box,
.admin-product-mobile-card,
.admin-order-mobile-card,
.admin-monitor-card,
.stat-card { max-width: 100%; }
@media (max-width: 991.98px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand-column { grid-column: 1 / -1; text-align: center; }
  .footer-brand { justify-content: center; }
  .footer-brand-column > p { margin-inline: auto; }
}

@media (max-width: 575.98px) {
  .site-navbar { min-height: 68px; }
  .site-logo-frame-header { width: 50px; height: 50px; border-radius: 14px; }
  .site-brand { gap: .6rem !important; margin-right: .25rem; }
  .site-brand-copy strong { font-size: .98rem; }
  .site-brand-copy small { font-size: .55rem; letter-spacing: .08em; }
  .mobile-drawer-header,
  .mobile-drawer-body { padding-left: .85rem; padding-right: .85rem; }
  .offcanvas.mobile-drawer {
    --bs-offcanvas-width: min(88vw, 330px);
    width: min(88vw, 330px) !important;
    max-width: calc(100vw - 32px) !important;
  }
  .admin-mobile-appbar {
    grid-template-columns: 42px minmax(0, 1fr) 42px 42px;
    gap: .4rem;
    padding-inline: .65rem;
  }
  .admin-appbar-copy small { display: none; }
  .admin-appbar-copy strong { font-size: .9rem; }
  .auth-section { min-height: calc(100dvh - 68px); padding: 1.1rem .8rem; align-items: start; }
  .auth-section-login { min-height: calc(100dvh - 77px); padding: .65rem .7rem; }
  .auth-card { margin-top: .8rem; border-radius: 21px; }
  .auth-card-login { margin-top: .35rem; padding: 1.1rem; border-radius: 18px; }
  .auth-login-heading { margin-bottom: 1rem; }
  .auth-login-heading p { font-size: .86rem; }
  .auth-login-actions { margin-top: 1rem; gap: .55rem; }
  .auth-password-label-row { gap: .5rem; }
  .auth-password-label-row .auth-small-link { font-size: .78rem; white-space: nowrap; }
  .auth-card .h3 { font-size: 1.42rem; }
  .auth-card-register { padding: 1.15rem; }
  .auth-register-grid { grid-template-columns: minmax(0, 1fr); gap: .8rem; }
  .auth-register-heading { margin-bottom: 1rem; }
  .auth-section-register { min-height: auto; padding: .65rem .7rem 1rem; }
  .auth-card-register { margin-top: .35rem; padding: 1rem; border-radius: 18px; }
  .auth-register-heading p { font-size: .84rem; }
  .auth-register-actions { display: grid; gap: .65rem; }
  .auth-register-actions .btn { width: 100%; min-width: 0; }
  .footer { padding-top: 2.4rem; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 1.7rem; }
  .footer-brand-column { grid-column: auto; }
  .footer-brand { flex-direction: column; gap: .7rem; }
  .footer-brand h2 { text-align: center; }
  .footer-grid > section:not(.footer-brand-column) { padding-inline: .15rem; }
  .footer-copyright { margin-top: 1.5rem; font-size: .8rem; }
}

@supports not (overflow: clip) {
  html, body, .admin-main, .site-main { overflow-x: hidden; }
}
@media (max-width: 991.98px) {
  .has-public-bottom-nav .footer { padding-bottom: calc(6rem + env(safe-area-inset-bottom)); }
}
/* Respaldo si el JavaScript de Bootstrap no pudiera cargarse. */
.mobile-drawer.fallback-open {
  visibility: visible !important;
  transform: none !important;
}
.mobile-drawer-fallback-backdrop {
  position: fixed;
  z-index: 1050;
  inset: 0;
  background: rgba(0,0,0,.62);
}

/* Área del cliente responsive */
.account-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .65rem;
  max-width: 840px;
}
.account-tabs button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-width: 0;
  min-height: 48px;
  padding: .65rem .8rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 13px;
  background: var(--bs-body-bg);
  color: var(--bs-secondary-color);
  font-weight: 700;
}
.account-tabs button.active { border-color: var(--brand); background: var(--brand); color: #fff; }
.account-panel { overflow: hidden; }
.account-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.account-panel-heading h2 { margin: .2rem 0 0; font-size: 1.35rem; }
.account-count { display: grid; place-items: center; min-width: 36px; height: 36px; padding: 0 .55rem; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); font-weight: 800; }
.account-mobile-list { display: grid; gap: .85rem; }
.account-orders-table-wrap { width: 100%; overflow: hidden; }
.account-orders-table { width: 100%; table-layout: fixed; font-size: .86rem; }
.account-orders-table th,
.account-orders-table td { padding: .72rem .45rem; overflow-wrap: anywhere; }
.account-orders-table th:nth-child(1) { width: 15%; }
.account-orders-table th:nth-child(2) { width: 13%; }
.account-orders-table th:nth-child(3) { width: 16%; }
.account-orders-table th:nth-child(4) { width: 13%; }
.account-orders-table th:nth-child(5) { width: 19%; }
.account-orders-table th:nth-child(6) { width: 11%; }
.account-orders-table th:nth-child(7) { width: 13%; }
.account-orders-table .account-pay-button { min-width: 0; max-width: 100%; white-space: normal; }
.account-order-card { display: block; overflow: hidden; border: 1px solid var(--bs-border-color); border-radius: 16px; background: var(--bs-body-bg); }
.account-order-summary { display: grid; grid-template-columns: minmax(0,1fr) auto 36px; align-items: center; gap: .65rem; min-height: 76px; padding: .85rem; cursor: pointer; list-style: none; }
.account-order-summary::-webkit-details-marker { display: none; }
.account-order-identity { min-width: 0; }
.account-order-identity small,
.account-order-identity strong { display: block; }
.account-order-identity small { color: var(--bs-secondary-color); font-size: .72rem; }
.account-order-identity strong { overflow-wrap: anywhere; }
.account-order-toggle { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-dark); font-size: 1.25rem; font-weight: 850; }
.account-order-toggle::before { content: '+'; line-height: 1; }
.account-order-card[open] .account-order-toggle::before { content: '−'; }
.account-order-card[open] .account-order-summary { border-bottom: 1px solid var(--bs-border-color); background: var(--bs-tertiary-bg); }
.account-order-detail { padding: .9rem; }
.account-order-card dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; margin: 0; }
.account-order-card dl div { min-width: 0; }
.account-order-card dt { color: var(--bs-secondary-color); font-size: .7rem; font-weight: 600; }
.account-order-card dd { margin: .15rem 0 0; font-weight: 750; overflow-wrap: anywhere; }
.account-order-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: .85rem; }
.account-order-actions:empty { display: none; }
.download-card { display: grid; grid-template-columns: 48px minmax(0,1fr) auto; align-items: center; gap: .85rem; height: 100%; padding: 1rem; border: 1px solid var(--bs-border-color); border-radius: 16px; }
.download-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); }
.download-card h3 { margin: 0 0 .25rem; font-size: 1rem; }
.download-card p { margin: 0; color: var(--bs-secondary-color); font-size: .78rem; }
.account-empty { display: grid; justify-items: center; gap: .65rem; padding: 2.25rem 1rem; text-align: center; color: var(--bs-secondary-color); }
.account-empty i { font-size: 2.4rem; color: var(--brand); }
.account-empty strong { color: var(--bs-body-color); }
.account-security-panel { max-width: 660px; }
@media (max-width: 575.98px) {
  .account-header { padding: 1.65rem 0; }
  .account-header h1 { font-size: 1.8rem; }
  .account-page { padding-inline: .8rem; }
  .account-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; }
  .account-tabs button { flex-direction: column; gap: .2rem; min-height: 58px; padding: .45rem .2rem; font-size: .68rem; }
  .account-tabs button i { font-size: .95rem; }
  .account-panel { padding: 1rem; }
  .download-card { grid-template-columns: 44px minmax(0,1fr); }
  .download-card .btn { grid-column: 1 / -1; width: 100%; }
}
.account-password-button { min-width: 210px; }
@media (max-width: 575.98px) { .account-password-button { width: 100%; min-width: 0; } }
.mobile-drawer.fallback-open { z-index: 1060 !important; }
@media (max-width: 991.98px) {
  .admin-bottom-nav,
  .public-bottom-nav { z-index: 1030; }
}

/* ======================================================================
   Servitecno Digital Studio v1.8
   Pie de página de cuatro columnas en escritorio, compacto y sin bordes.
   ====================================================================== */

/* Los cajones móviles continúan abriéndose desde el lado derecho. */
.offcanvas.mobile-drawer.offcanvas-end {
  right: 0 !important;
  left: auto !important;
  border: 0;
  box-shadow: -18px 0 45px rgba(3, 12, 28, .30);
}

/* Base tipográfica: títulos y subtítulos claramente diferenciados. */
.footer-grid {
  display: grid;
  align-items: start;
  min-width: 0;
}
.footer-grid > section {
  min-width: 0;
  border: 0 !important;
}
.footer-brand-column {
  min-width: 0;
}
.footer-brand-column > p {
  margin: 0;
  color: #8fa1ba;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}
.footer-heading {
  display: flex;
  align-items: center;
  gap: .42rem;
  margin: 0 0 .5rem;
  color: #fff;
  font-size: .98rem;
  font-weight: 800;
  line-height: 1.1;
}
.footer-heading i {
  flex: 0 0 16px;
  width: 16px;
  color: #84adff;
  text-align: center;
}
.footer .footer-link {
  display: flex;
  align-items: flex-start;
  gap: .42rem;
  width: fit-content;
  max-width: 100%;
  margin: .2rem 0;
  color: #c8d2e1;
  font-size: .9rem;
  font-weight: 400;
  line-height: 1;
  text-align: left;
}
.footer .footer-link i {
  flex: 0 0 16px;
  width: 16px;
  margin-top: 0;
  color: #84adff;
  text-align: center;
}
.footer .footer-link > span,
.footer .footer-link-label {
  min-width: 0;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}
.footer-email-text {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: baseline;
  line-height: 1;
}
.footer-email-text > span {
  white-space: nowrap;
}
.footer-copyright {
  width: 100%;
  max-width: 100%;
  margin-top: 1.35rem;
  padding: .65rem .4rem 0;
  border: 0 !important;
  color: #fff;
  font-size: .82rem;
  line-height: 1.2;
  text-align: center;
  overflow-wrap: break-word;
  word-break: normal;
}

/* Escritorio: marca + Información + Redes sociales + Contacto. */
@media (min-width: 992px) {
  .footer-grid {
    grid-template-columns: minmax(280px, 1.55fr) minmax(150px, .72fr) minmax(220px, 1fr) minmax(210px, .95fr);
    column-gap: clamp(1.2rem, 3vw, 2.7rem);
    row-gap: 0;
  }
  .footer-brand-column {
    grid-column: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: left;
  }
  .footer-brand {
    justify-content: flex-start;
    margin-bottom: .7rem;
  }
  .footer-brand-column > p {
    width: 100%;
    max-width: 100%;
    line-height: 1.35;
    text-align: justify;
    text-align-last: left;
  }
  .footer-grid > section:not(.footer-brand-column) {
    padding: .2rem 0 0;
  }
}

/* ==========================================================
   Versión 2.3: ajuste responsive integral y lectura progresiva
   ========================================================== */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.site-logo-frame .site-logo-image,
.site-logo-frame[data-logo-shape="portrait"] .site-logo-image,
.site-logo-frame[data-logo-shape="landscape"] .site-logo-image {
  width: 100%;
  height: 100%;
  padding: 3px;
  object-fit: contain !important;
  object-position: center !important;
}

.responsive-disclosure > summary {
  position: relative;
  display: flex;
  align-items: center;
  gap: .85rem;
  width: 100%;
  padding-right: 2.35rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.responsive-disclosure > summary::-webkit-details-marker { display: none; }
.responsive-disclosure > summary::after {
  content: "+";
  position: absolute;
  right: .15rem;
  top: 50%;
  display: grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
  transform: translateY(-50%);
}
.responsive-disclosure[open] > summary::after { content: "−"; }
.responsive-disclosure > summary:focus-visible {
  outline: 3px solid rgba(35, 87, 217, .28);
  outline-offset: 4px;
  border-radius: 10px;
}

.legal-page-heading {
  margin-bottom: 1.5rem;
  padding: clamp(1.3rem, 3vw, 2rem);
  border: 1px solid var(--bs-border-color);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(35, 87, 217, .08), rgba(111, 66, 193, .06));
}
.legal-page-heading h1 {
  margin: .35rem 0 .6rem;
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: -.035em;
}
.legal-page-heading p { max-width: 720px; margin: 0; color: var(--bs-secondary-color); }
.legal-sections { display: grid; gap: .8rem; }
.legal-section {
  overflow: hidden;
  border: 1px solid var(--bs-border-color);
  border-radius: 18px;
  background: var(--bs-body-bg);
  box-shadow: 0 8px 24px rgba(16, 24, 40, .035);
}
.legal-section > summary {
  min-height: 64px;
  padding: 1rem 3.5rem 1rem 1.15rem;
}
.legal-section > summary::after { right: 1rem; }
.legal-section > summary span[role="heading"] {
  color: var(--bs-heading-color);
  font-size: 1.08rem;
  font-weight: 780;
}
.legal-section-body {
  padding: 0 1.15rem 1.1rem;
  border-top: 1px solid transparent;
}
.legal-section[open] .legal-section-body { border-top-color: var(--bs-border-color); padding-top: 1rem; }
.legal-section-body p:last-child { margin-bottom: 0; }

.product-information { margin: 0; }
.product-information > summary {
  min-height: 38px;
  color: var(--bs-heading-color);
  font-size: 1.15rem;
  font-weight: 780;
}
.product-information-body {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--bs-border-color);
}
.product-description-copy { white-space: normal; }

.course-module-disclosure > summary { padding-right: 3.25rem; }
.course-module-disclosure > summary::after { right: 1rem; }
.course-module-disclosure .module-title {
  display: block;
  color: var(--bs-heading-color);
  font-size: 1.22rem;
  font-weight: 800;
  line-height: 1.2;
}

@media (min-width: 992px) {
  .product-detail-cover { max-height: 560px; }
  .legal-section > summary { cursor: default; }
  .legal-section > summary::after { opacity: .65; }
}

@media (max-width: 991.98px) {
  .site-navbar { min-height: 74px; }
  .site-navbar-inner { min-width: 0; }
  .site-menu-toggle { min-width: 46px; min-height: 46px; }
  .page-header-compact { padding-block: 2.2rem; }
  .page-header-compact h1 { font-size: clamp(2rem, 5.2vw, 2.65rem); }
  .product-detail-page > .row { align-items: flex-start; }
  .product-detail-cover {
    width: min(100%, 620px);
    min-height: 0;
    aspect-ratio: 4 / 3;
    margin-inline: auto;
  }
  .checkout-sticky-summary { position: static; }
  .admin-page-heading { align-items: flex-start; }
}

@media (max-width: 767.98px) {
  body {
    overflow-wrap: anywhere;
    word-break: normal;
  }
  .container { --bs-gutter-x: 1.4rem; }
  .site-main,
  .admin-main { min-width: 0; }

  .site-navbar { min-height: 68px; }
  .site-logo-frame-header { width: 48px; height: 48px; }
  .site-brand-copy strong { font-size: .98rem; }
  .site-brand-copy small { font-size: .56rem; }

  .hero-section .container {
    padding-top: 3rem !important;
    padding-bottom: 2.7rem !important;
  }
  .hero-section h1 {
    max-width: 100%;
    font-size: clamp(1.95rem, 8.4vw, 2.25rem);
    line-height: 1.06;
    letter-spacing: -.04em;
    text-wrap: balance;
  }
  .hero-section .lead {
    font-size: 1.05rem;
    line-height: 1.55;
  }
  .hero-image {
    width: min(100%, 330px);
    max-height: 260px;
    margin-top: .5rem;
  }
  .hero-trust { margin-top: 1.2rem !important; }

  .page-header,
  .course-classroom-header,
  .learning-hero,
  .verification-hero { overflow: hidden; }
  .page-header h1,
  .course-classroom-header h1,
  .learning-hero h1,
  .verification-hero h1 {
    font-size: clamp(1.85rem, 8vw, 2.35rem);
    line-height: 1.08;
    text-wrap: balance;
  }
  .page-header p,
  .course-classroom-header p,
  .learning-hero p { font-size: 1rem; line-height: 1.55; }

  .product-detail-page h1 {
    font-size: clamp(1.85rem, 8vw, 2.35rem);
    line-height: 1.1;
    text-wrap: balance;
  }
  .product-detail-cover {
    aspect-ratio: 4 / 3;
    border-radius: 20px;
  }
  .product-detail-cover img { padding: .65rem; }
  .price-xl { font-size: clamp(2rem, 10vw, 2.7rem); }
  .product-meta { gap: .5rem; }
  .product-meta span { padding: .55rem .7rem; font-size: .8rem; }

  .content-box { padding: 1rem; border-radius: 17px; }
  .download-conditions { align-items: flex-start; padding: .9rem; }
  .product-information > summary { min-height: 44px; font-size: 1rem; }
  .product-information-body { margin-top: .75rem; padding-top: .85rem; }

  .legal { max-width: 100%; }
  .legal-page-heading { margin-bottom: 1rem; padding: 1.1rem; border-radius: 18px; }
  .legal-page-heading h1 { font-size: clamp(1.8rem, 8vw, 2.25rem); text-wrap: balance; }
  .legal-page-heading p { font-size: .94rem; line-height: 1.5; }
  .legal-section { border-radius: 15px; }
  .legal-section > summary { min-height: 58px; padding: .85rem 3.2rem .85rem 1rem; }
  .legal-section > summary::after { right: .8rem; }
  .legal-section > summary span[role="heading"] { font-size: 1rem; }
  .legal-section-body { padding-inline: 1rem; }

  .legal-section-body p,
  .product-description-copy,
  .lesson-content p,
  .classroom-module-heading p {
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    line-height: 1.65;
  }

  .classroom-module { border-radius: 17px; }
  .classroom-module-heading { padding: 1rem 3.1rem 1rem 1rem; }
  .course-module-disclosure > summary::after { right: .75rem; }
  .course-module-disclosure .module-title { font-size: 1.05rem; }
  .classroom-lessons a { min-height: 58px; padding: .8rem; }

  .form-control,
  .form-select,
  .form-control-sm,
  .form-select-sm,
  input,
  textarea,
  select { font-size: 16px !important; }
  .btn {
    min-height: 44px;
    white-space: normal;
  }
  .input-group .btn { min-height: 0; }

  .catalog-toolbar { gap: .75rem; }
  .catalog-toolbar .toolbar-field { min-height: 50px; }
  .catalog-grid[data-view="grid"] .product-card-body { padding: .78rem; }
  .catalog-grid[data-view="grid"] .product-title { font-size: .9rem; line-height: 1.25; }
  .catalog-grid[data-view="grid"] .product-description { -webkit-line-clamp: 2; }
  .catalog-grid[data-view="grid"] .product-card-footer { gap: .55rem; }

  .admin-page-shell { padding-top: 1rem !important; }
  .admin-page-heading h1 { font-size: clamp(1.65rem, 7.5vw, 2.15rem); }
  .admin-page-heading p { line-height: 1.5; }
  .admin-page-heading .admin-primary-action { width: 100%; }
  .admin-stat-card { min-height: 112px; padding: .9rem; }
  .admin-section-heading { margin: -1rem -1rem 1rem; padding: 1rem; }
  .manual-payment-review { grid-template-columns: 1fr; }
  .payment-qr-preview { align-items: flex-start; flex-direction: column; }
  .payment-qr-preview img { width: min(100%, 180px); height: auto; aspect-ratio: 1; }

  .table-responsive {
    max-width: 100%;
    overscroll-behavior-inline: contain;
  }
  .footer-link,
  .mobile-menu-links a,
  .mobile-menu-links button { min-height: 44px; }
}

@media (max-width: 359.98px) {
  .container { --bs-gutter-x: 1.1rem; }
  .site-brand { gap: .45rem !important; }
  .site-logo-frame-header { width: 44px; height: 44px; }
  .site-brand-copy strong { font-size: .9rem; }
  .site-brand-copy small { font-size: .5rem; letter-spacing: .055em; }
  .hero-section h1 { font-size: 1.95rem; }
  .hero-section .d-flex.gap-2 .btn { width: 100%; }
  .hero-trust span { font-size: .72rem; }
  .catalog-product-item {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
  }
  .catalog-grid[data-view="grid"] .cover { height: 230px; }
  .catalog-grid[data-view="grid"] .product-title { font-size: 1rem; }
  .catalog-grid[data-view="grid"] .product-card-body { padding: 1rem; }
  .catalog-grid[data-view="grid"] .product-description { display: block; }
  .catalog-grid[data-view="grid"] .product-card-footer {
    align-items: center;
    flex-direction: row;
  }
  .product-detail-page h1 { font-size: 1.85rem; }
  .public-bottom-nav a,
  .public-bottom-nav button,
  .admin-bottom-nav a,
  .admin-bottom-nav button { padding-inline: .25rem; }
}

/* Tablet y móvil: marca arriba y las tres secciones en columnas compactas. */
@media (max-width: 991.98px) {
  .footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: .8rem;
    row-gap: .85rem;
  }
  .footer-brand-column {
    grid-column: 1 / -1;
    display: grid;
    justify-items: center;
    text-align: center;
  }
  .footer-brand {
    justify-content: center;
    margin-bottom: .6rem;
  }
  .footer-brand-column > p {
    width: min(100%, 720px);
    margin-inline: auto;
    line-height: 1.3;
    text-align: justify;
    text-align-last: center;
  }
  .footer-grid > section:not(.footer-brand-column) {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
  }
}

@media (max-width: 575.98px) {
  .footer {
    padding: 2rem 0 1rem;
  }
  .footer-container {
    width: 100%;
    padding-inline: .78rem;
  }
  .footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: .42rem;
    row-gap: .7rem;
  }
  .footer-brand-column {
    padding-inline: .15rem;
  }
  .footer-brand {
    flex-direction: row;
    gap: .58rem;
    margin-bottom: .45rem;
  }
  .footer-brand h2 {
    max-width: 210px;
    font-size: .94rem;
    line-height: 1.1;
    text-align: left;
  }
  .site-logo-frame-footer {
    width: 56px;
    height: 56px;
    border-radius: 14px;
  }
  .footer-brand-column > p {
    font-size: .72rem;
    line-height: 1.25;
  }
  .footer-heading {
    gap: .27rem;
    margin-bottom: .32rem;
    font-size: clamp(.66rem, 2.65vw, .76rem);
    line-height: 1.05;
  }
  .footer-heading i {
    flex-basis: 13px;
    width: 13px;
    font-size: .69rem;
  }
  .footer .footer-link {
    gap: .25rem;
    margin: .16rem 0;
    font-size: clamp(.6rem, 2.45vw, .7rem);
    line-height: 1;
  }
  .footer .footer-link i {
    flex-basis: 13px;
    width: 13px;
    font-size: .67rem;
  }
  .footer-email-text {
    display: grid;
    line-height: 1;
  }
  .footer-email-text > span {
    max-width: 100%;
    white-space: nowrap;
  }
  .footer-copyright {
    margin-top: .85rem;
    padding-top: .45rem;
    font-size: .7rem;
    line-height: 1.15;
  }
}

/* Pantallas muy estrechas: reduce tipografía sin romper palabras. */
@media (max-width: 359.98px) {
  .footer-container { padding-inline: .5rem; }
  .footer-grid { column-gap: .22rem; }
  .footer-heading { gap: .18rem; font-size: .61rem; }
  .footer .footer-link { gap: .16rem; font-size: .56rem; }
  .footer-heading i,
  .footer .footer-link i {
    flex-basis: 11px;
    width: 11px;
    font-size: .61rem;
  }
}

/* ==========================================================
   Versión 1.9: refinamiento final del footer
   - logo y marca centrados
   - descripción justificada
   - cuatro columnas equilibradas en escritorio
   - interlineado 1.5 en títulos y subtítulos
   - divisor sutil sobre derechos reservados
   ========================================================== */
.footer-grid {
  align-items: start;
}
.footer-brand-column {
  text-align: center;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  text-align: center;
}
.footer-brand h2 {
  margin: 0;
  text-align: center;
}
.footer-brand-column > p {
  margin: 0 auto;
  text-align: justify;
  text-align-last: auto;
}
.footer-heading {
  line-height: 1.5;
}
.footer .footer-link {
  width: 100%;
  line-height: 1.5;
}
.footer .footer-link > span,
.footer .footer-link-label,
.footer-email-text {
  line-height: 1.5;
}
.footer-email-text {
  display: flex;
  flex-wrap: wrap;
  gap: .08rem;
  align-items: baseline;
}
.footer-copyright {
  margin-top: 1.35rem;
  padding-top: .9rem;
  border-top: 1px solid rgba(255,255,255,.12) !important;
}

@media (min-width: 992px) {
  .footer-grid {
    grid-template-columns: minmax(300px, 1.32fr) repeat(3, minmax(180px, 1fr));
    column-gap: clamp(1.35rem, 2.3vw, 2.6rem);
  }
  .footer-brand-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
  }
  .footer-brand {
    margin-bottom: .85rem;
  }
  .footer-brand-column > p {
    width: min(100%, 530px);
    line-height: 1.5;
  }
  .footer-grid > section:not(.footer-brand-column) {
    width: 100%;
    min-width: 0;
    padding-top: .2rem;
  }
  .footer-heading {
    margin-bottom: .5rem;
    font-size: 1rem;
  }
  .footer .footer-link {
    margin: .08rem 0;
    font-size: .95rem;
  }
}

@media (max-width: 991.98px) {
  .footer-brand-column {
    justify-items: center;
    text-align: center;
  }
  .footer-brand {
    margin-bottom: .55rem;
  }
  .footer-brand-column > p {
    width: min(100%, 680px);
    line-height: 1.42;
  }
  .footer-grid > section:not(.footer-brand-column) {
    width: 100%;
  }
  .footer-heading {
    margin-bottom: .34rem;
    line-height: 1.5;
  }
  .footer .footer-link {
    margin: .06rem 0;
    line-height: 1.5;
  }
  .footer-copyright {
    margin-top: 1rem;
    padding-top: .72rem;
  }
}

@media (max-width: 575.98px) {
  .footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: .62rem;
    row-gap: .78rem;
  }
  .footer-brand {
    gap: .52rem;
  }
  .footer-brand-column > p {
    font-size: .72rem;
    line-height: 1.35;
  }
  .footer-heading {
    margin-bottom: .26rem;
    font-size: clamp(.68rem, 2.7vw, .77rem);
    line-height: 1.5;
  }
  .footer .footer-link {
    gap: .24rem;
    margin: .02rem 0;
    font-size: clamp(.61rem, 2.45vw, .71rem);
    line-height: 1.5;
  }
  .footer-email-text {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0;
    line-height: 1.5;
  }
  .footer-copyright {
    font-size: .72rem;
    line-height: 1.25;
  }
}

@media (max-width: 359.98px) {
  .footer-grid {
    column-gap: .35rem;
  }
  .footer-heading {
    font-size: .62rem;
  }
  .footer .footer-link {
    font-size: .57rem;
  }
}

/* ==========================================================
   Versión 1.10: footer más compacto y contador de carrito
   - oculta contador cuando está en 0
   - títulos de columnas sin icono y en mayúsculas
   - distribución más compacta en web y más aireada en móvil
   ========================================================== */
.footer { padding: 2.55rem 0 1.15rem; }
.footer-grid {
  align-items: start;
}
.footer-brand {
  gap: .55rem;
}
.footer-brand-column {
  text-align: center;
}
.footer-brand-column > p {
  color: #a7b6ca;
  text-align: justify;
}
.footer-heading {
  display: block;
  margin: 0 0 .45rem;
  font-size: .95rem;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1.2;
  text-transform: uppercase;
}
.footer-heading i { display: none !important; }
.footer .footer-link {
  width: 100%;
  margin: .12rem 0;
  font-size: .92rem;
  line-height: 1.3;
}
.footer .footer-link i {
  margin-top: .12rem;
}
.footer-copyright {
  margin-top: 1rem;
  padding-top: .72rem;
  border-top: 1px solid rgba(255,255,255,.10) !important;
}

@media (min-width: 992px) {
  .footer-grid {
    grid-template-columns: minmax(270px, 1.18fr) repeat(3, minmax(210px, 1fr));
    column-gap: clamp(1rem, 1.9vw, 2rem);
    row-gap: 0;
  }
  .footer-brand-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
  }
  .footer-brand-column > p {
    width: min(100%, 360px);
    margin-inline: auto;
    line-height: 1.42;
  }
  .footer-grid > section:not(.footer-brand-column) {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 991.98px) {
  .footer {
    padding: 2rem 0 .95rem;
  }
  .footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: .95rem;
    row-gap: .95rem;
  }
  .footer-brand-column {
    grid-column: 1 / -1;
  }
  .footer-brand-column > p {
    width: min(100%, 720px);
    margin-inline: auto;
    line-height: 1.34;
    text-align: justify;
    text-align-last: center;
  }
  .footer-heading {
    margin-bottom: .38rem;
    font-size: .83rem;
    line-height: 1.2;
  }
  .footer .footer-link {
    margin: .08rem 0;
    font-size: .8rem;
    line-height: 1.25;
  }
}

@media (max-width: 575.98px) {
  .footer-container {
    padding-inline: .95rem;
  }
  .footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: .85rem;
    row-gap: .82rem;
  }
  .footer-brand {
    gap: .46rem;
    margin-bottom: .4rem;
  }
  .footer-brand h2 {
    font-size: 1.02rem;
    line-height: 1.15;
    text-align: center;
  }
  .footer-brand-column > p {
    font-size: .73rem;
    line-height: 1.28;
    text-align: justify;
    text-align-last: center;
  }
  .footer-heading {
    margin-bottom: .3rem;
    font-size: .72rem;
    line-height: 1.2;
  }
  .footer .footer-link {
    gap: .26rem;
    margin: .06rem 0;
    font-size: .72rem;
    line-height: 1.2;
  }
  .footer .footer-link i {
    flex-basis: 12px;
    width: 12px;
    font-size: .72rem;
  }
  .footer-email-text {
    display: grid;
    line-height: 1.2;
  }
  .footer-email-text > span {
    white-space: normal;
  }
  .footer-copyright {
    margin-top: .95rem;
    padding-top: .62rem;
    font-size: .74rem;
  }
}

@media (max-width: 359.98px) {
  .footer-container { padding-inline: .75rem; }
  .footer-grid { column-gap: .55rem; }
  .footer-heading { font-size: .66rem; }
  .footer .footer-link { font-size: .64rem; }
}

/* ==========================================================
   Versión 1.11: footer con secciones mejor centradas
   - centra vertical y horizontalmente Información / Redes / Contacto
   - interlineado 2.0 en esas secciones
   - mejor reparto del espacio en móvil
   ========================================================== */
@media (min-width: 992px) {
  .footer-grid {
    grid-template-columns: minmax(320px, 1.28fr) repeat(3, minmax(190px, 1fr));
    column-gap: clamp(1.1rem, 2vw, 2.1rem);
    align-items: stretch;
  }
  .footer-brand-column > p {
    width: min(100%, 440px);
    line-height: 1.52;
  }
  .footer-grid > section:not(.footer-brand-column) {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 100%;
    padding-bottom: .25rem;
  }
  .footer-heading {
    width: 100%;
    margin-bottom: .45rem;
    text-align: center;
    line-height: 2;
  }
  .footer .footer-link {
    justify-content: center;
    width: 100%;
    margin: .08rem 0;
    line-height: 2;
    text-align: center;
  }
  .footer .footer-link i {
    margin-top: .45rem;
  }
  .footer-email-text {
    justify-content: center;
    line-height: 2;
  }
}

@media (max-width: 991.98px) {
  .footer-grid > section:not(.footer-brand-column) {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .footer-heading {
    width: 100%;
    text-align: center;
    line-height: 2;
  }
  .footer .footer-link {
    justify-content: center;
    width: 100%;
    line-height: 2;
    text-align: center;
  }
  .footer-email-text {
    justify-content: center;
    line-height: 2;
  }
}

@media (max-width: 575.98px) {
  .footer-grid {
    column-gap: 1rem;
    row-gap: 1rem;
  }
  .footer-grid > section:not(.footer-brand-column) {
    padding-inline: .08rem;
  }
  .footer-heading {
    margin-bottom: .22rem;
    font-size: .73rem;
    line-height: 2;
  }
  .footer .footer-link {
    gap: .18rem;
    margin: .02rem 0;
    font-size: .72rem;
    line-height: 2;
  }
  .footer .footer-link i {
    margin-top: .38rem;
  }
  .footer-email-text {
    line-height: 2;
  }
}

/* ==========================================================
   Versión 1.12: ajuste fino de interlineado del footer
   - Información / Redes sociales / Contacto con interlineado 2.5
   ========================================================== */
.footer-grid > section:not(.footer-brand-column) .footer-heading {
  line-height: 2.5 !important;
}
.footer-grid > section:not(.footer-brand-column) .footer-link,
.footer-grid > section:not(.footer-brand-column) .footer-link > span,
.footer-grid > section:not(.footer-brand-column) .footer-link-label,
.footer-grid > section:not(.footer-brand-column) .footer-email-text {
  line-height: 2.5 !important;
}

/* ==========================================================
   Versión 1.13: corrige el orden del footer como estaba antes,
   manteniendo interlineado 2.5 y texto justificado.
   ========================================================== */
@media (min-width: 992px) {
  .footer-grid {
    grid-template-columns: minmax(340px, 1.35fr) repeat(3, minmax(185px, 1fr));
    column-gap: clamp(1.1rem, 2vw, 2.1rem);
    align-items: start;
  }
  .footer-brand-column {
    align-items: flex-start;
    text-align: left;
  }
  .footer-brand {
    width: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    margin-bottom: .8rem;
  }
  .footer-brand-column > p {
    width: 100%;
    max-width: 100%;
    margin: 0;
    line-height: 1.55;
    text-align: justify;
    text-align-last: left;
    text-justify: inter-word;
  }
  .footer-grid > section:not(.footer-brand-column) {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left;
    padding-bottom: 0;
  }
  .footer-heading {
    width: 100%;
    margin-bottom: .32rem;
    text-align: left;
    line-height: 2.5;
  }
  .footer .footer-link {
    justify-content: flex-start;
    width: 100%;
    margin: 0;
    line-height: 2.5;
    text-align: left;
  }
  .footer .footer-link i {
    margin-top: .58rem;
  }
  .footer-email-text {
    justify-content: flex-start;
    line-height: 2.5;
  }
}

@media (max-width: 991.98px) {
  .footer-brand-column > p {
    text-align: justify;
    text-align-last: center;
  }
  .footer-heading {
    line-height: 2.5;
  }
  .footer .footer-link,
  .footer-email-text {
    line-height: 2.5;
  }
}

/* ==========================================================
   Versión 1.14: corrige el footer móvil sin romper escritorio.
   ========================================================== */
@media (max-width: 991.98px) {
  .footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: .95rem;
    row-gap: .95rem;
  }
  .footer-grid > section:not(.footer-brand-column) {
    align-items: center;
    text-align: center;
  }
  .footer-heading {
    text-align: center;
    line-height: 2.5;
    margin-bottom: .18rem;
  }
  .footer .footer-link {
    width: 100%;
    justify-content: center;
    text-align: center;
    margin: 0;
    line-height: 2.5;
    gap: .28rem;
  }
  .footer .footer-link i {
    margin-top: .55rem;
    flex: 0 0 14px;
    width: 14px;
    font-size: .78rem;
  }
  .footer .footer-link > span,
  .footer .footer-link-label {
    display: inline-block;
    text-align: center;
    overflow-wrap: normal;
    word-break: keep-all;
  }
  .footer-email-text {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 2.5;
  }
}

@media (max-width: 575.98px) {
  .footer-container {
    padding-inline: .85rem;
  }
  .footer-grid {
    column-gap: .7rem;
    row-gap: .82rem;
  }
  .footer-brand-column > p {
    font-size: .72rem;
    line-height: 1.38;
    margin-bottom: .15rem;
  }
  .footer-heading {
    font-size: .76rem;
    line-height: 2.5;
    margin-bottom: .08rem;
  }
  .footer .footer-link {
    font-size: .69rem;
    line-height: 2.5;
    gap: .18rem;
  }
  .footer .footer-link i {
    margin-top: .52rem;
    flex: 0 0 12px;
    width: 12px;
    font-size: .7rem;
  }
  .footer .footer-link > span,
  .footer .footer-link-label {
    text-wrap: balance;
  }
  .footer-email-text {
    font-size: .69rem;
  }
  .footer-copyright {
    margin-top: .8rem;
    padding-top: .58rem;
  }
}

/* ==========================================================
   Versión 1.15: alineación móvil del footer hacia la izquierda
   - títulos y enlaces alineados como bloques de referencia
   - mantiene tres columnas e interlineado 2.5
   ========================================================== */
@media (max-width: 991.98px) {
  .footer-grid > section:not(.footer-brand-column) {
    align-items: flex-start !important;
    justify-content: flex-start;
    text-align: left !important;
  }

  .footer-grid > section:not(.footer-brand-column) .footer-heading {
    width: 100%;
    text-align: left !important;
    justify-content: flex-start;
    line-height: 2.5 !important;
  }

  .footer-grid > section:not(.footer-brand-column) .footer-link {
    width: 100%;
    justify-content: flex-start !important;
    align-items: flex-start;
    text-align: left !important;
    line-height: 2.5 !important;
  }

  .footer-grid > section:not(.footer-brand-column) .footer-link > span,
  .footer-grid > section:not(.footer-brand-column) .footer-link-label {
    text-align: left !important;
    word-break: normal;
    overflow-wrap: break-word;
  }

  .footer-grid > section:not(.footer-brand-column) .footer-email-text {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    text-align: left !important;
    line-height: 2.5 !important;
  }
}

@media (max-width: 575.98px) {
  .footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: .72rem;
  }

  .footer-grid > section:not(.footer-brand-column) {
    min-width: 0;
    padding-inline: 0;
  }

  .footer-heading {
    font-size: clamp(.67rem, 2.55vw, .75rem);
  }

  .footer .footer-link {
    gap: .2rem;
    font-size: clamp(.62rem, 2.35vw, .7rem);
  }

  .footer-email {
    gap: .14rem !important;
  }

  .footer-email-text > span {
    max-width: 100%;
    white-space: nowrap;
  }
}

/* ==========================================================
   Versión 1.16: equilibrio móvil de columnas del footer
   - más espacio para Redes sociales y Contacto
   - textos completos en una sola línea
   - tipografía compacta sin desbordamiento
   ========================================================== */
@media (max-width: 575.98px) {
  .footer-container {
    padding-inline: .42rem;
  }

  .footer-grid {
    grid-template-columns: minmax(0, .72fr) minmax(0, 1.25fr) minmax(0, 1.18fr);
    column-gap: .24rem;
    row-gap: .78rem;
  }

  .footer-grid > section:not(.footer-brand-column) {
    width: 100%;
    min-width: 0;
    overflow: visible;
  }

  .footer-heading {
    margin-bottom: .12rem;
    font-size: clamp(.57rem, 2.25vw, .66rem);
    line-height: 2.5 !important;
    letter-spacing: 0;
    white-space: nowrap;
  }

  .footer .footer-link {
    width: 100%;
    gap: .12rem;
    margin: 0;
    font-size: clamp(.52rem, 2.02vw, .61rem);
    line-height: 2.5 !important;
    white-space: nowrap;
  }

  .footer .footer-link i {
    flex: 0 0 9px;
    width: 9px;
    margin-top: .48rem;
    font-size: .58rem;
  }

  .footer .footer-link > span,
  .footer .footer-link-label {
    display: inline-block;
    min-width: 0;
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    text-wrap: nowrap;
  }

  .footer-email {
    gap: .1rem !important;
  }

  .footer-email-text {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: baseline !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    min-width: 0;
    font-size: clamp(.49rem, 1.92vw, .58rem);
    line-height: 2.5 !important;
    white-space: nowrap;
  }

  .footer-email-text > span {
    display: inline;
    max-width: none;
    white-space: nowrap !important;
  }
}

@media (max-width: 359.98px) {
  .footer-container {
    padding-inline: .28rem;
  }

  .footer-grid {
    grid-template-columns: minmax(0, .7fr) minmax(0, 1.27fr) minmax(0, 1.2fr);
    column-gap: .14rem;
  }

  .footer-heading {
    font-size: .54rem;
  }

  .footer .footer-link {
    gap: .08rem;
    font-size: .49rem;
  }

  .footer .footer-link i {
    flex-basis: 8px;
    width: 8px;
    font-size: .52rem;
  }

  .footer-email-text {
    font-size: .46rem;
  }
}

/* ==========================================================
   Versión 1.17: composición móvil final del footer
   Replica la distribución solicitada: marca centrada, texto
   compacto y tres columnas equilibradas sin saltos de línea.
   ========================================================== */
@media (max-width: 575.98px) {
  .footer {
    padding: 1.9rem 0 calc(5.85rem + env(safe-area-inset-bottom));
  }

  .footer-container {
    width: 100%;
    max-width: none;
    padding-inline: .62rem;
  }

  .footer-grid {
    grid-template-columns: minmax(0, .82fr) minmax(0, 1.22fr) minmax(0, 1.16fr);
    column-gap: .42rem;
    row-gap: .88rem;
    align-items: start;
  }

  .footer-brand-column {
    grid-column: 1 / -1;
    width: 100%;
    align-items: center !important;
    justify-items: center;
    text-align: center !important;
  }

  .footer-brand {
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: .48rem;
    margin-bottom: .34rem;
    text-align: center;
  }

  .site-logo-frame-footer {
    width: 58px;
    height: 58px;
    border-radius: 14px;
  }

  .footer-brand h2 {
    width: 100%;
    max-width: none;
    margin: 0;
    font-size: 1rem;
    line-height: 1.15;
    text-align: center;
    white-space: nowrap;
  }

  .footer-brand-column > p {
    width: 100%;
    max-width: 490px;
    margin: 0 auto;
    color: #a8b8ce;
    font-size: .69rem;
    line-height: 1.32;
    text-align: center;
    text-align-last: center;
    word-spacing: normal;
    letter-spacing: 0;
  }

  .footer-grid > section:not(.footer-brand-column) {
    width: 100%;
    min-width: 0;
    align-items: flex-start !important;
    justify-content: flex-start;
    padding: 0;
    overflow: visible;
    text-align: left !important;
  }

  .footer-grid > section:not(.footer-brand-column) .footer-heading {
    width: 100%;
    margin: 0 0 .08rem;
    font-size: clamp(.59rem, 2.34vw, .69rem);
    font-weight: 800;
    line-height: 2.5 !important;
    letter-spacing: 0;
    text-align: left !important;
    white-space: nowrap;
  }

  .footer-grid > section:not(.footer-brand-column) .footer-link {
    width: 100%;
    max-width: none;
    justify-content: flex-start !important;
    align-items: flex-start;
    gap: .12rem;
    margin: 0;
    font-size: clamp(.51rem, 2.04vw, .6rem);
    line-height: 2.5 !important;
    text-align: left !important;
    white-space: nowrap;
  }

  .footer-grid > section:not(.footer-brand-column) .footer-link i {
    flex: 0 0 9px;
    width: 9px;
    margin-top: .48rem;
    font-size: .57rem;
    text-align: center;
  }

  .footer-grid > section:not(.footer-brand-column) .footer-link > span,
  .footer-grid > section:not(.footer-brand-column) .footer-link-label {
    display: inline-block;
    min-width: 0;
    overflow: visible;
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    text-align: left !important;
  }

  .footer-email {
    gap: .09rem !important;
  }

  .footer-grid > section:not(.footer-brand-column) .footer-email-text {
    display: inline-flex !important;
    min-width: 0;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: baseline !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    font-size: clamp(.47rem, 1.87vw, .56rem);
    line-height: 2.5 !important;
    text-align: left !important;
    white-space: nowrap;
  }

  .footer-email-text > span {
    display: inline;
    max-width: none;
    white-space: nowrap !important;
  }

  .footer-copyright {
    margin-top: .76rem;
    padding: .64rem .12rem 0;
    border-top: 1px solid rgba(255,255,255,.12) !important;
    font-size: .7rem;
    line-height: 1.25;
    text-align: center;
  }
}

@media (max-width: 379.98px) {
  .footer-container {
    padding-inline: .38rem;
  }

  .footer-grid {
    grid-template-columns: minmax(0, .78fr) minmax(0, 1.24fr) minmax(0, 1.18fr);
    column-gap: .2rem;
  }

  .footer-grid > section:not(.footer-brand-column) .footer-heading {
    font-size: .55rem;
  }

  .footer-grid > section:not(.footer-brand-column) .footer-link {
    gap: .08rem;
    font-size: .48rem;
  }

  .footer-grid > section:not(.footer-brand-column) .footer-link i {
    flex-basis: 8px;
    width: 8px;
    font-size: .51rem;
  }

  .footer-grid > section:not(.footer-brand-column) .footer-email-text {
    font-size: .445rem;
  }
}

/* Ajustes de navegación y certificados 2026-07 */
@media (min-width: 992px) {
  .site-navbar {
    z-index: 1085 !important;
    overflow: visible;
  }

  .site-navbar .user-role-dropdown {
    z-index: 1100;
  }
}

.user-role-dropdown {
  max-height: calc(100vh - 110px);
  overscroll-behavior: contain;
}
.user-role-dropdown{width:min(340px,calc(100vw - 2rem));padding:.45rem;scrollbar-width:thin}.user-role-dropdown>div:first-child{position:sticky;top:-.45rem;z-index:2;margin:-.45rem -.45rem .35rem;padding:.8rem 1rem!important;background:var(--bs-dropdown-bg);border-radius:.55rem .55rem 0 0}.user-role-dropdown .dropdown-header{margin:.25rem .35rem .15rem;padding:.35rem .45rem;color:var(--brand);font-size:.63rem;font-weight:900;letter-spacing:.13em}.user-role-dropdown .dropdown-item{display:flex;align-items:center;min-height:38px;border-radius:.55rem;font-size:.84rem}.user-role-dropdown .dropdown-item i{width:20px;color:var(--bs-secondary-color);text-align:center}.user-role-dropdown .dropdown-item:hover i,.user-role-dropdown .dropdown-item:focus i{color:currentColor}.user-role-dropdown .dropdown-divider{margin:.35rem .4rem}

.verification-hero {
  position: relative;
  overflow: hidden;
}

.verification-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 62%, rgba(255,255,255,.05) 62% 63%, transparent 63%),
    radial-gradient(circle at 12% 85%, rgba(33,150,243,.2), transparent 26%);
}

.verification-hero .container {
  position: relative;
  z-index: 1;
}

.verification-icon {
  color: #1f51c7;
  box-shadow: 0 16px 45px rgba(0,0,0,.2);
}

.verification-search {
  grid-template-columns: minmax(0,1fr) auto;
  width: min(100%,820px);
}

.verification-search-field {
  position: relative;
  min-width: 0;
}

.verification-search-field > i {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 1rem;
  color: #64748b;
  transform: translateY(-50%);
}

.verification-search-field .form-control {
  width: 100%;
  padding-left: 2.8rem;
}

.verification-search .btn {
  min-width: 170px;
}

.verification-search-help {
  margin-top: .8rem;
  color: rgba(255,255,255,.72);
}

.verification-search-results {
  background: var(--soft);
}

[data-bs-theme="dark"] .verification-search-results {
  background: #0b1220;
}

.verification-results-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.verification-results-heading h2 {
  margin: .25rem 0 0;
  font-weight: 850;
}

.verification-results-count {
  padding: .5rem .85rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 999px;
  background: var(--bs-body-bg);
  font-size: .85rem;
  font-weight: 750;
}

.verification-result-list {
  display: grid;
  gap: .85rem;
}

.verification-result-item,
.verification-empty-result {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 20px;
  background: var(--bs-body-bg);
  box-shadow: 0 10px 35px rgba(16,24,40,.06);
}

.verification-result-icon,
.verification-empty-result > i {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 1.35rem;
}

.verification-result-copy {
  min-width: 0;
  flex: 1;
}

.verification-result-copy h3 {
  margin: .4rem 0 .15rem;
  font-size: 1.1rem;
  font-weight: 800;
}

.verification-result-copy p,
.verification-empty-result p {
  margin: 0;
  color: var(--bs-secondary-color);
}

.verification-result-copy small {
  display: block;
  margin-top: .35rem;
  color: var(--bs-secondary-color);
}

.verification-empty-result h3 {
  margin: 0 0 .25rem;
}

.certificate-signature-admin-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .8rem 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 16px;
  background: var(--bs-tertiary-bg);
}

.certificate-signature-admin-preview img {
  width: 170px;
  height: 70px;
  object-fit: contain;
  background: #fff;
  border-radius: 10px;
}

.certificate-signatory-editor {
  height: 100%;
  padding: 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 16px;
  background: var(--bs-tertiary-bg);
}

.certificate-signatory-editor legend {
  float: none;
  width: auto;
  margin: 0 0 .75rem;
  padding: 0 .35rem;
  color: var(--bs-primary);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.certificate-signatory-editor-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .75rem;
}

.certificate-signatory-editor-heading legend {
  margin: 0;
}

.certificate-signatory-editor-heading .btn {
  flex: 0 0 auto;
}

.certificate-topics-editor {
  padding: 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 16px;
  background: var(--bs-tertiary-bg);
}

.certificate-partner-logo-list {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: .75rem;
}

.certificate-partner-logo-item {
  display: grid;
  grid-template-columns: 58px minmax(0,1fr);
  align-items: center;
  gap: .65rem;
  padding: .65rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 14px;
  cursor: pointer;
}

.certificate-partner-logo-item img {
  grid-row: span 2;
  width: 58px;
  height: 48px;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
}

.certificate-partner-logo-item > span:not(.form-check) {
  overflow: hidden;
  font-size: .8rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.certificate-partner-logo-item .form-check {
  display: flex;
  align-items: center;
  gap: .35rem;
}

.certificate-template-preview-v2 {
  position: relative;
  justify-content: flex-start;
  overflow: hidden;
  padding: 5% 7%;
  background-repeat: no-repeat;
}

.certificate-preview-logos {
  display: flex;
  align-self: stretch;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  min-height: 34px;
  margin-bottom: 2%;
}

.certificate-preview-logos img {
  width: 38px;
  height: 32px;
  object-fit: contain;
}

.certificate-template-preview-v2 .certificate-preview-course {
  width: 78%;
  margin: 0 0 2%;
  padding: .35rem .65rem;
  color: #fff;
  background: var(--certificate-primary);
  border-radius: 999px;
  font-size: clamp(.55rem,1.35vw,.78rem);
}

.certificate-template-preview-v2 p {
  max-width: 84%;
  margin: 1% 0;
  font-size: clamp(.48rem,1.15vw,.7rem);
}

.certificate-template-preview-v2 h2 {
  margin: 0 0 .15rem;
}

.certificate-template-preview-v2 > small {
  display: block;
  margin: 0 0 .55rem;
}

.certificate-document-v2 {
  padding: 10px;
  background: #f7fbff;
}

.certificate-document-v2 .certificate-tech-frame {
  position: relative;
  justify-content: flex-start;
  padding: 3% 4.2% 2.2%;
  border: 2px solid var(--certificate-primary);
  background-color: rgba(255,255,255,.965);
  background-size: cover;
  background-position: center;
}

.certificate-document-v2 .certificate-tech-frame::before,
.certificate-document-v2 .certificate-tech-frame::after {
  width: 42%;
  height: 7px;
  border-radius: 0;
  background: linear-gradient(90deg,var(--certificate-primary),#1ca4d8,var(--certificate-accent));
  clip-path: polygon(0 0,100% 0,96% 100%,4% 100%);
}

.certificate-document-v2 .certificate-tech-frame::before {
  top: 1.3%;
  left: 3%;
}

.certificate-document-v2 .certificate-tech-frame::after {
  right: 3%;
  bottom: 1.3%;
}

.certificate-tech-corner {
  position: absolute;
  width: 14%;
  height: 19%;
  pointer-events: none;
  border-color: var(--certificate-primary);
  opacity: .22;
}

.certificate-tech-corner-one {
  top: 2.3%;
  right: 1.8%;
  border-top: 4px solid;
  border-right: 4px solid;
  clip-path: polygon(22% 0,100% 0,100% 78%,86% 100%,86% 24%,0 24%);
}

.certificate-tech-corner-two {
  bottom: 2.3%;
  left: 1.8%;
  border-bottom: 4px solid;
  border-left: 4px solid;
  clip-path: polygon(0 22%,14% 0,14% 76%,100% 76%,78% 100%,0 100%);
}

.certificate-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  min-height: 58px;
}

.certificate-main-brand {
  display: flex;
  align-items: center;
  gap: .55rem;
  text-align: left;
}

.certificate-main-brand img {
  width: clamp(38px,5vw,62px);
  height: clamp(38px,5vw,62px);
  object-fit: contain;
}

.certificate-main-brand strong,
.certificate-main-brand small {
  display: block;
}

.certificate-main-brand strong {
  font-size: clamp(.62rem,1.25vw,1rem);
}

.certificate-main-brand small {
  color: #64748b;
  font-size: clamp(.4rem,.8vw,.62rem);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.certificate-partner-logos {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(.3rem,1vw,.8rem);
  max-width: 55%;
}

.certificate-partner-logos img {
  width: clamp(32px,4.8vw,58px);
  height: clamp(28px,4vw,48px);
  object-fit: contain;
}

.certificate-heading {
  display: grid;
  justify-items: center;
  width: 100%;
  margin-top: -.8%;
}

.certificate-document-v2 .certificate-heading h1 {
  margin: -.3% 0 0;
  font-size: clamp(2rem,5.1vw,4.7rem);
  letter-spacing: .035em;
  line-height: 1;
  text-transform: uppercase;
}

.certificate-document-v2 .certificate-heading .certificate-kicker {
  display: block;
  margin: .2% 0 .8%;
}

.certificate-course-ribbon {
  width: min(82%,780px);
  padding: .65% 3%;
  /* html2canvas 1.4 no interpreta color-mix() al generar el PDF. */
  border: 1px solid #d6ae59;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(90deg,#082f57,var(--certificate-primary),#0a5b88);
  box-shadow: 0 5px 18px rgba(12,50,86,.16);
  font-size: clamp(.72rem,1.7vw,1.35rem);
}

.certificate-recipient {
  display: grid;
  justify-items: center;
  width: 86%;
  margin-top: 1.1%;
}

.certificate-document-v2 .certificate-recipient h2 {
  margin: .1% 0 .4%;
  padding: 0 4% .25%;
  font-size: clamp(1.45rem,3.35vw,3.15rem);
  line-height: 1.12;
}

.certificate-document-v2 .certificate-copy {
  max-width: 82%;
  line-height: 1.4;
}

.certificate-topics {
  display: flex;
  align-items: center;
  width: 92%;
  margin-top: .35%;
  padding: .35% 1%;
  border: 1px solid #bacbdc;
  border-radius: 8px;
  background: rgba(248,251,255,.8);
  text-align: left;
}

.certificate-topics > strong {
  flex: 0 0 auto;
  margin-right: .7rem;
  color: var(--certificate-primary);
  font-size: clamp(.48rem,.82vw,.68rem);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.certificate-topics > div {
  display: flex;
  flex-wrap: wrap;
  gap: .15rem .65rem;
  min-width: 0;
}

.certificate-topics span {
  position: relative;
  color: #475569;
  font-size: clamp(.45rem,.78vw,.66rem);
}

.certificate-topics span::before {
  content: "•";
  margin-right: .3rem;
  color: var(--certificate-accent);
}

.certificate-topics-dense {
  padding-block: .25%;
}

.certificate-topics-dense > strong,
.certificate-topics-dense span {
  font-size: clamp(.38rem,.62vw,.53rem);
  line-height: 1.12;
}

.certificate-document-v2 .certificate-metrics {
  width: 92%;
  margin-top: .8%;
  border: 1px solid #d7e2ed;
  border-radius: 10px;
  background: rgba(248,251,255,.88);
}

.certificate-document-v2 .certificate-metrics span {
  min-width: 0;
  padding: .45% .65%;
}

.certificate-document-v2 .certificate-metrics small {
  font-size: clamp(.4rem,.72vw,.62rem);
}

.certificate-document-v2 .certificate-metrics strong {
  font-size: clamp(.58rem,1.02vw,.9rem);
}

.certificate-footer-row-v2 {
  align-items: end;
  justify-content: space-between;
  gap: .8rem;
  width: 88%;
  margin-top: .8%;
}

.certificate-signatories {
  display: grid;
  flex: 1 1 auto;
  align-items: end;
  justify-content: center;
  gap: .45rem;
  min-width: 0;
  max-width: 80%;
}

.certificate-signatories-count-1 {
  flex-basis: 42%;
  max-width: 42%;
}

.certificate-signatories-count-2 {
  flex-basis: 65%;
  max-width: 65%;
}

.certificate-signatories-count-3 {
  flex-basis: 80%;
  max-width: 80%;
  gap: .3rem;
}

.certificate-signatories .certificate-signature {
  width: min(100%,var(--signature-line-width,220px));
  min-width: 0;
  justify-self: center;
  text-align: center;
}

.certificate-signatories .certificate-signature > span {
  width: 100%;
  justify-self: center;
}

.certificate-signatories .certificate-signature strong {
  overflow-wrap: anywhere;
  font-size: clamp(.5rem,.88vw,.76rem);
  line-height: 1.12;
}

.certificate-signatories .certificate-signature small {
  overflow-wrap: anywhere;
  font-size: clamp(.4rem,.68vw,.58rem);
  line-height: 1.14;
}

.certificate-signature-image {
  display: grid;
  place-items: end center;
  height: clamp(34px,5vw,60px);
  margin-bottom: clamp(5px,.6vw,9px);
  overflow: hidden;
}

.certificate-signature-image img {
  width: clamp(100px,15vw,180px);
  max-width: 100%;
  height: 100%;
  object-fit: contain;
}

.certificate-signatories-count-3 .certificate-signature-image img {
  width: clamp(82px,10vw,125px);
}

.certificate-signature-compact strong {
  font-size: clamp(.46rem,.78vw,.68rem) !important;
}

.certificate-signature-compact small {
  font-size: clamp(.37rem,.6vw,.52rem) !important;
}

.certificate-signature-dense strong {
  font-size: clamp(.42rem,.69vw,.6rem) !important;
}

.certificate-signature-dense small {
  font-size: clamp(.34rem,.53vw,.46rem) !important;
}

.certificate-signature .certificate-signature-institution {
  color: #475569;
  font-weight: 650;
}

.certificate-signature .certificate-signature-cip {
  margin-top: .1rem;
  color: var(--certificate-primary,#153e75);
  font-weight: 750;
}

.certificate-footer-row-v2 .certificate-qr {
  flex: 0 0 clamp(90px,12vw,132px);
  min-width: 0;
}

.certificate-qr-code {
  max-width: 132px;
  overflow-wrap: anywhere;
  color: var(--certificate-primary,#153e75) !important;
  font-weight: 750;
  line-height: 1.1;
}

.certificate-validation-copy {
  display: grid;
  justify-items: center;
  flex: 0 1 24%;
  max-width: 24%;
  color: #475569;
}

.certificate-validation-copy strong {
  font-size: clamp(.55rem,1vw,.78rem);
}

.certificate-validation-copy small {
  font-size: clamp(.45rem,.8vw,.65rem);
}

.certificate-document-v2 .certificate-verify-url {
  margin-top: .2%;
}

@media (max-width: 767.98px) {
  .verification-search {
    grid-template-columns: 1fr;
  }

  .verification-search .btn {
    width: 100%;
  }

  .verification-results-heading,
  .verification-result-item {
    align-items: stretch;
    flex-direction: column;
  }

  .verification-result-item .btn {
    width: 100%;
  }

  .certificate-partner-logo-list {
    grid-template-columns: 1fr;
  }

  .certificate-document-v2 .certificate-tech-frame {
    padding-inline: 3%;
  }

  .certificate-main-brand span,
  .certificate-validation-copy {
    display: none;
  }

  .certificate-recipient {
    width: 96%;
  }

  .certificate-document-v2 .certificate-copy {
    max-width: 94%;
  }

  .certificate-document-v2 .certificate-metrics,
  .certificate-footer-row-v2 {
    width: 96%;
  }
}

/* ==========================================================
   Versión 1.18: footer móvil centrado como bloque y menú inferior
   visible en todas las páginas públicas, incluido acceso.
   ========================================================== */
@media (max-width: 575.98px) {
  .footer-container {
    width: 100%;
    max-width: none;
    padding-inline: .32rem;
  }

  .footer-grid {
    width: calc(100% - .4rem);
    max-width: 540px;
    margin-inline: auto;
    grid-template-columns: minmax(0, .72fr) minmax(0, 1.34fr) minmax(0, 1.24fr);
    column-gap: .34rem;
    row-gap: .82rem;
    justify-content: center;
    align-items: start;
  }

  .footer-brand-column {
    grid-column: 1 / -1;
    width: 100%;
  }

  .footer-grid > section:not(.footer-brand-column) {
    width: 100%;
    min-width: 0;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    text-align: left !important;
    padding: 0;
  }

  .footer-grid > section:not(.footer-brand-column) .footer-heading {
    width: 100%;
    margin: 0 0 .08rem;
    font-size: clamp(.57rem, 2.2vw, .69rem);
    line-height: 2.5 !important;
    text-align: left !important;
    white-space: nowrap;
  }

  .footer-grid > section:not(.footer-brand-column) .footer-link {
    width: 100%;
    max-width: none;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    gap: .1rem;
    margin: 0;
    font-size: clamp(.48rem, 1.72vw, .59rem);
    line-height: 2.5 !important;
    text-align: left !important;
    white-space: nowrap;
  }

  .footer-grid > section:not(.footer-brand-column) .footer-link i {
    flex: 0 0 9px;
    width: 9px;
    margin-top: .48rem;
    font-size: .56rem;
    text-align: center;
  }

  .footer-grid > section:not(.footer-brand-column) .footer-link > span,
  .footer-grid > section:not(.footer-brand-column) .footer-link-label {
    display: inline-block;
    min-width: 0;
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    text-align: left !important;
  }

  .footer-grid > section:not(.footer-brand-column) .footer-email-text {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: baseline !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    min-width: 0;
    font-size: clamp(.41rem, 1.55vw, .54rem);
    line-height: 2.5 !important;
    white-space: nowrap !important;
    text-align: left !important;
  }

  .footer-email-text > span {
    display: inline;
    max-width: none;
    white-space: nowrap !important;
  }
}

@media (max-width: 359.98px) {
  .footer-grid {
    width: 100%;
    grid-template-columns: minmax(0, .68fr) minmax(0, 1.34fr) minmax(0, 1.28fr);
    column-gap: .2rem;
  }

  .footer-grid > section:not(.footer-brand-column) .footer-heading {
    font-size: .53rem;
  }

  .footer-grid > section:not(.footer-brand-column) .footer-link {
    gap: .07rem;
    font-size: .43rem;
  }

  .footer-grid > section:not(.footer-brand-column) .footer-link i {
    flex-basis: 8px;
    width: 8px;
    font-size: .49rem;
  }

  .footer-grid > section:not(.footer-brand-column) .footer-email-text {
    font-size: .385rem;
  }
}

/* ==========================================================
   Versión 1.19: catálogo compacto 2x2 y footer móvil ordenado
   ========================================================== */
@media (max-width: 575.98px) {
  /* Footer: el bloque se centra, pero cada columna conserva
     su contenido alineado a la izquierda. */
  .footer {
    padding-top: 1.75rem;
  }
  .footer-container {
    width: 100%;
    max-width: none;
    padding-inline: .75rem;
  }
  .footer-grid {
    width: 100%;
    max-width: 520px;
    margin-inline: auto;
    grid-template-columns: minmax(0, .78fr) minmax(0, 1.32fr) minmax(0, 1.22fr);
    column-gap: .7rem;
    row-gap: .8rem;
    justify-content: center;
    align-items: start;
  }
  .footer-brand-column {
    grid-column: 1 / -1;
    width: 100%;
  }
  .footer-brand-column > p {
    width: min(100%, 500px);
    margin-inline: auto;
    font-size: .73rem;
    line-height: 1.35;
    text-align: center;
    text-align-last: center;
  }
  .footer-grid > section:not(.footer-brand-column) {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    text-align: left !important;
    padding: 0;
  }
  .footer-grid > section:not(.footer-brand-column) .footer-heading {
    width: 100%;
    margin: 0 0 .1rem;
    font-size: clamp(.62rem, 2.15vw, .74rem);
    line-height: 1.35 !important;
    text-align: left !important;
    white-space: nowrap;
  }
  .footer-grid > section:not(.footer-brand-column) .footer-link {
    width: 100%;
    max-width: none;
    margin: .1rem 0;
    gap: .2rem;
    justify-content: flex-start !important;
    align-items: center !important;
    font-size: clamp(.49rem, 1.72vw, .63rem);
    line-height: 2.15 !important;
    text-align: left !important;
    white-space: nowrap;
  }
  .footer-grid > section:not(.footer-brand-column) .footer-link i {
    flex: 0 0 10px;
    width: 10px;
    margin: 0;
    font-size: .62rem;
    text-align: center;
  }
  .footer-grid > section:not(.footer-brand-column) .footer-link > span,
  .footer-grid > section:not(.footer-brand-column) .footer-link-label {
    min-width: 0;
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    text-align: left !important;
  }
  .footer-grid > section:not(.footer-brand-column) .footer-email-text {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    align-items: baseline !important;
    justify-content: flex-start !important;
    font-size: inherit;
    line-height: 2.15 !important;
    white-space: nowrap !important;
    text-align: left !important;
  }
  .footer-email-text > span {
    display: inline !important;
    white-space: nowrap !important;
  }
  .footer-copyright {
    margin-top: .85rem;
    padding-top: .62rem;
    font-size: .7rem;
    line-height: 1.25;
  }

  /* Barra del catálogo más compacta. */
  .catalog-section {
    padding-inline: .7rem;
  }
  .catalog-toolbar {
    gap: .65rem;
    padding: .75rem;
    border-radius: 15px;
  }
  .toolbar-field {
    min-height: 46px;
  }
  .view-switcher {
    min-height: 42px;
  }
  .view-switcher-label {
    font-size: .78rem;
  }
  .view-button {
    min-width: 42px;
    min-height: 42px;
  }
  .catalog-summary {
    padding-bottom: .7rem;
    font-size: .78rem;
  }

  /* Dos productos por fila tanto en Inicio como en Catálogo. */
  .catalog-grid,
  .section-heading + .row {
    --bs-gutter-x: .7rem;
    --bs-gutter-y: .75rem;
  }
  .catalog-product-item {
    flex: 0 0 50%;
    width: 50%;
    max-width: 50%;
  }
  .product-card {
    border-radius: 13px;
    box-shadow: 0 4px 13px rgba(16,24,40,.055);
  }
  .cover {
    height: 132px;
  }
  .cover img {
    padding: .42rem;
  }
  .cover-placeholder {
    font-size: 2.3rem;
  }
  .type-badge,
  .offer-badge {
    top: .42rem;
    padding: .22rem .38rem;
    font-size: .5rem;
  }
  .type-badge { left: .42rem; }
  .offer-badge { right: .42rem; }
  .product-card-body {
    padding: .62rem;
  }
  .product-category {
    font-size: .54rem;
    letter-spacing: .025em;
  }
  .product-title {
    min-height: 2.4em;
    margin: .28rem 0 .35rem;
    font-size: .76rem;
    line-height: 1.2;
  }
  .catalog-grid[data-view="grid"] .product-description,
  .catalog-product-item .product-description {
    display: none;
  }
  .product-card-footer {
    flex-direction: column;
    align-items: stretch;
    gap: .38rem;
    padding-top: .48rem;
  }
  .old-price {
    font-size: .59rem;
  }
  .offer-label {
    font-size: .52rem;
  }
  .price {
    font-size: .94rem;
  }
  .product-detail-button {
    width: 100%;
    padding: .34rem .38rem;
    font-size: .65rem;
  }

  /* Vista lista móvil: tarjeta horizontal compacta. */
  .catalog-grid[data-view="list"] .catalog-product-item {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
  }
  .catalog-grid[data-view="list"] .product-card {
    min-height: 128px;
    flex-direction: row;
  }
  .catalog-grid[data-view="list"] .cover {
    flex: 0 0 108px;
    width: 108px;
    height: auto;
    min-height: 128px;
    border-right: 1px solid var(--bs-border-color);
    border-bottom: 0;
  }
  .catalog-grid[data-view="list"] .product-card-body {
    min-width: 0;
    padding: .62rem;
  }
  .catalog-grid[data-view="list"] .product-title {
    min-height: auto;
    font-size: .82rem;
  }
  .catalog-grid[data-view="list"] .product-description {
    display: -webkit-box;
    margin-bottom: .42rem;
    font-size: .65rem;
    line-height: 1.3;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .catalog-grid[data-view="list"] .product-card-footer {
    flex-direction: row;
    align-items: end;
    justify-content: space-between;
    gap: .35rem;
  }
  .catalog-grid[data-view="list"] .product-detail-button {
    width: auto;
    white-space: nowrap;
  }
}

@media (max-width: 359.98px) {
  .footer-container {
    padding-inline: .5rem;
  }
  .footer-grid {
    grid-template-columns: minmax(0, .72fr) minmax(0, 1.3fr) minmax(0, 1.24fr);
    column-gap: .38rem;
  }
  .footer-grid > section:not(.footer-brand-column) .footer-heading {
    font-size: .57rem;
  }
  .footer-grid > section:not(.footer-brand-column) .footer-link {
    gap: .12rem;
    font-size: .45rem;
  }
  .footer-grid > section:not(.footer-brand-column) .footer-link i {
    flex-basis: 8px;
    width: 8px;
    font-size: .5rem;
  }
  .cover {
    height: 112px;
  }
  .product-card-body {
    padding: .52rem;
  }
  .product-title {
    font-size: .7rem;
  }
  .price {
    font-size: .86rem;
  }
}

/* ==========================================================
   Versión 1.20: administración completa de categorías
   ========================================================== */
.admin-category-form-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 13px;
  background: rgba(13, 110, 253, .10);
  color: var(--bs-primary);
}
.admin-category-table th,
.admin-category-table td {
  vertical-align: middle;
}
.admin-category-table code {
  color: #e83e8c;
}
.admin-category-mobile-list {
  display: grid;
  gap: .8rem;
}
.admin-category-mobile-card {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 16px;
  background: var(--bs-body-bg);
  box-shadow: 0 8px 22px rgba(15, 23, 42, .05);
}
.admin-category-mobile-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.min-w-0 { min-width: 0; }

@media (max-width: 991.98px) {
  .admin-category-form {
    position: static !important;
  }
}

/* ==========================================================
   Versión 1.21: cabecera móvil unificada
   - mismo diseño para cliente, visitante y administrador
   - logotipo a la izquierda y hamburguesa a la derecha
   - el administrador abre su menú lateral propio desde la derecha
   ========================================================== */
@media (max-width: 991.98px) {
  .admin-area .admin-desktop-navbar {
    display: flex !important;
  }

  .admin-area .site-navbar {
    min-height: 74px;
    background: var(--bs-body-bg) !important;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .06);
  }

  .admin-area .site-navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-width: 0;
  }

  .admin-area .site-brand {
    min-width: 0;
    margin-right: .75rem;
  }

  .admin-area .site-menu-toggle {
    flex: 0 0 auto;
    margin-left: auto;
  }

  .admin-mobile-appbar {
    display: none !important;
  }

  .admin-area .admin-main {
    padding-top: 0;
  }
}

@media (max-width: 575.98px) {
  .admin-area .site-navbar {
    min-height: 68px;
  }

  .admin-area .site-logo-frame-header {
    width: 50px;
    height: 50px;
    border-radius: 14px;
  }

  .admin-area .site-brand-copy strong {
    font-size: .98rem;
  }

  .admin-area .site-brand-copy small {
    font-size: .55rem;
    letter-spacing: .08em;
  }
}

/* Capa final v2.3: prevalencia sobre estilos históricos del tema. */
.site-logo-frame .site-logo-image,
.site-logo-frame[data-logo-shape] .site-logo-image {
  object-fit: contain !important;
  object-position: center !important;
}

@media (max-width: 767.98px) {
  .form-control,
  .form-select,
  .form-control-sm,
  .form-select-sm,
  input,
  textarea,
  select { font-size: 16px !important; }

  .product-detail-page h1 {
    font-size: clamp(1.85rem, 8vw, 2.35rem);
    line-height: 1.1;
  }
  .product-detail-page .product-detail-cover {
    min-height: 0;
    aspect-ratio: 4 / 3;
  }
  .legal-section-body p,
  .product-description-copy,
  .lesson-content p,
  .classroom-module-heading p {
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
  }
  .admin-page-heading .admin-primary-action { width: 100%; }
}

@media (max-width: 339.98px) {
  .catalog-grid .catalog-product-item,
  .section-heading + .row .catalog-product-item {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .catalog-grid[data-view="grid"] .cover,
  .section-heading + .row .cover { height: 220px; }
  .catalog-grid[data-view="grid"] .product-card-body,
  .section-heading + .row .product-card-body { padding: .9rem; }
  .catalog-grid[data-view="grid"] .product-title,
  .section-heading + .row .product-title { font-size: .95rem; }
  .catalog-grid[data-view="grid"] .product-description,
  .section-heading + .row .product-description {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

/* Productos gratuitos, demostraciones y biblioteca v2.12 */
.product-detail-page > .row { align-items: flex-start; }
.product-detail-page .col-lg-5 {
  display: flex;
  justify-content: center;
}
.product-detail-page .product-detail-cover {
  width: min(100%, 410px);
  min-height: 0;
  max-height: none;
  aspect-ratio: 4 / 5;
  margin-inline: auto;
  border: 1px solid var(--bs-border-color);
  border-radius: 22px;
  background: linear-gradient(145deg,#f3f6ff,#eef8ff);
  box-shadow: 0 16px 38px rgba(16,24,40,.08);
}
.product-detail-page .product-detail-cover img { padding: .85rem; }
.product-detail-actions {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: .75rem;
}
.product-detail-actions form { margin: 0; }
.product-detail-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding-inline: 1rem;
  font-size: 1rem;
}
.product-preview-actions {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: .75rem;
}
.product-free-form { display: grid; gap: .7rem; }
.product-marketing-consent {
  max-width: 520px;
  margin: 0;
  padding: .75rem 1rem .75rem 2.35rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
  background: var(--soft);
}
.product-free-label { color: #067647 !important; background: #ecfdf3 !important; }
[data-bs-theme="dark"] .product-free-label { color: #75e0a7 !important; background: #073b2a !important; }
.product-access-admin-card {
  height: 100%;
  padding: 1.15rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 16px;
  background: var(--soft);
}
[data-bs-theme="dark"] .product-access-admin-card { background: #111827; }
.product-system-video-admin-card {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(320px, 1.2fr);
  gap: 1.25rem;
  padding: 1.25rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 16px;
  background: linear-gradient(135deg, var(--soft), transparent);
}
.product-functionality-video-modal {
  z-index: 1300;
}
body.product-video-modal-open > .modal-backdrop {
  z-index: 1290;
}
.product-functionality-video-modal .modal-dialog {
  width: min(94vw, 1200px, calc(177.7778vh - 13.333rem));
  width: min(94vw, 1200px, calc(177.7778dvh - 13.333rem));
  max-width: min(94vw, 1200px, calc(177.7778vh - 13.333rem));
  max-width: min(94vw, 1200px, calc(177.7778dvh - 13.333rem));
  margin: .75rem auto;
}
.product-functionality-video-modal .modal-content {
  display: flex;
  max-height: calc(100vh - 1.5rem);
  max-height: calc(100dvh - 1.5rem);
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .3);
}
.product-functionality-video-modal .modal-header {
  flex: 0 0 auto;
  gap: 1rem;
  padding: .85rem 1rem;
}
.product-functionality-video-modal .modal-header > div { min-width: 0; }
.product-functionality-video-modal .modal-title { overflow-wrap: anywhere; }
.product-functionality-video-modal .btn-close { flex: 0 0 auto; }
.product-functionality-video-modal .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  background: #05070b;
}
.product-functionality-video-player {
  width: 100%;
  max-height: calc(100vh - 7.5rem);
  max-height: calc(100dvh - 7.5rem);
  aspect-ratio: 16 / 9;
  background: #05070b;
}
.product-functionality-video-player iframe,
.product-functionality-video-player video {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
}
@media (max-width: 575.98px) {
  .product-functionality-video-modal .modal-dialog {
    width: calc(100vw - 1rem);
    max-width: calc(100vw - 1rem);
    margin: .5rem auto;
  }
  .product-functionality-video-modal .modal-content {
    max-height: calc(100vh - 1rem);
    max-height: calc(100dvh - 1rem);
    border-radius: 14px;
  }
  .product-functionality-video-modal .modal-header { padding: .75rem; }
  .product-functionality-video-modal .modal-header .eyebrow { font-size: .68rem; }
  .product-functionality-video-modal .modal-title { font-size: 1rem !important; }
  .product-functionality-video-player {
    max-height: calc(100vh - 6.25rem);
    max-height: calc(100dvh - 6.25rem);
  }
}
.product-option-muted { opacity: .62; }
.product-option-muted small::after {
  content: " No aplica al tipo seleccionado.";
  font-weight: 700;
}
.product-demo-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.product-demo-heading h1 { margin: .25rem 0; }
.product-demo-heading p { margin: 0; color: var(--bs-secondary-color); }
.product-document-viewer {
  height: min(76vh, 850px);
  min-height: 560px;
  overflow: hidden;
  border: 1px solid var(--bs-border-color);
  border-radius: 18px;
  background: #dfe4ec;
  box-shadow: 0 18px 45px rgba(16,24,40,.1);
}
.product-document-viewer iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.product-demo-callout {
  display: flex;
  align-items: center;
  gap: .9rem;
  margin-top: 1rem;
  padding: 1rem 1.2rem;
  border: 1px solid #b2ccff;
  border-radius: 15px;
  background: #eff4ff;
  color: #1849a9;
}
.product-demo-callout > i {
  flex: 0 0 auto;
  font-size: 1.35rem;
}
.product-demo-callout > span {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.5;
  overflow-wrap: break-word;
  word-break: normal;
}
.product-demo-callout > .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}
[data-bs-theme="dark"] .product-demo-callout { border-color: #344054; background: #101828; color: #d1e0ff; }
.download-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .5rem;
}
.lead-mobile-card { gap: .8rem; }
.certificate-document-v2 .certificate-qr .certificate-verify-url {
  display: block;
  width: min(250px, 23vw);
  margin-top: .22rem;
  color: #667085;
  font-size: clamp(.38rem,.58vw,.52rem);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

@media (max-width: 991.98px) {
  .product-detail-page .product-detail-cover {
    width: min(100%, 380px);
    aspect-ratio: 4 / 5;
  }
}

@media (max-width: 767.98px) {
  .product-system-video-admin-card { grid-template-columns: 1fr; }
  .product-detail-page .product-detail-cover {
    width: min(100%, 320px);
    aspect-ratio: 4 / 5;
  }
  .product-detail-actions,
  .product-detail-actions form,
  .product-preview-actions,
  .product-detail-actions .btn { width: 100%; }
  .product-marketing-consent { width: 100%; }
  .product-demo-heading { align-items: stretch; flex-direction: column; }
  .product-demo-heading .btn { width: 100%; }
  .product-document-viewer { min-height: 480px; height: 68vh; border-radius: 13px; }
  .product-demo-callout {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: .65rem .7rem;
    padding: .85rem;
  }
  .product-demo-callout > i {
    grid-column: 1;
    grid-row: 1;
    margin-top: .12rem;
  }
  .product-demo-callout > span {
    grid-column: 2;
    grid-row: 1;
  }
  .product-demo-callout > .btn {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    white-space: normal;
  }
  .download-card-actions { justify-content: stretch; width: 100%; }
  .download-card-actions .btn { flex: 1 1 140px; }
}

/* =========================================================
   Notificaciones internas, correo y Web Push — v2.4
   ========================================================= */
.notification-center {
  position: relative;
}

.notification-bell-button {
  align-items: center;
  border: 1px solid var(--bs-border-color);
  border-radius: 50%;
  color: var(--bs-body-color);
  display: inline-flex;
  height: 42px;
  justify-content: center;
  padding: 0;
  position: relative;
  width: 42px;
}

.notification-bell-button:hover,
.notification-bell-button:focus-visible,
.notification-bell-button[aria-expanded="true"] {
  background: rgba(13, 110, 253, .1);
  border-color: rgba(13, 110, 253, .35);
  color: var(--bs-primary);
}

.notification-badge {
  align-items: center;
  background: #dc3545;
  border: 2px solid var(--bs-tertiary-bg);
  border-radius: 999px;
  color: #fff;
  display: flex;
  font-size: .64rem;
  font-weight: 800;
  height: 20px;
  justify-content: center;
  min-width: 20px;
  padding: 0 4px;
  position: absolute;
  right: -6px;
  top: -6px;
}

.notification-badge[hidden] {
  display: none !important;
}

.notification-dropdown {
  border: 1px solid var(--bs-border-color);
  border-radius: 18px;
  box-shadow: 0 22px 55px rgba(5, 20, 45, .18);
  margin-top: 12px !important;
  max-width: calc(100vw - 20px);
  overflow: hidden;
  padding: 0;
  width: 390px;
  z-index: 1100;
}

.notification-dropdown-header {
  align-items: center;
  background: var(--bs-tertiary-bg);
  border-bottom: 1px solid var(--bs-border-color);
  display: flex;
  justify-content: space-between;
  min-height: 68px;
  padding: 12px 16px;
}

.notification-dropdown-header > span {
  display: grid;
  gap: 2px;
}

.notification-dropdown-header small {
  color: var(--bs-secondary-color);
}

.notification-dropdown-header form {
  margin: 0;
}

.notification-dropdown-header button {
  background: none;
  border: 0;
  color: var(--bs-primary);
  font-size: .78rem;
  font-weight: 700;
  padding: 6px;
}

.notification-dropdown-list {
  max-height: 390px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.notification-item {
  border-bottom: 1px solid var(--bs-border-color);
  margin: 0;
}

.notification-item > button {
  align-items: flex-start;
  background: var(--bs-body-bg);
  border: 0;
  color: var(--bs-body-color);
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  text-align: left;
  width: 100%;
}

.notification-item > button:hover,
.notification-item > button:focus-visible {
  background: var(--bs-tertiary-bg);
  outline: none;
}

.notification-item.is-unread > button {
  background: rgba(13, 110, 253, .075);
}

.notification-item-icon,
.notification-history-icon {
  align-items: center;
  background: rgba(13, 110, 253, .12);
  border-radius: 12px;
  color: var(--bs-primary);
  display: flex;
  flex: 0 0 auto;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.notification-item-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.notification-item-copy strong,
.notification-item-copy span {
  overflow-wrap: anywhere;
}

.notification-item-copy strong {
  font-size: .9rem;
}

.notification-item-copy span {
  color: var(--bs-secondary-color);
  font-size: .78rem;
  line-height: 1.4;
}

.notification-item-copy small {
  color: var(--bs-primary);
  font-size: .7rem;
  font-weight: 700;
}

.notification-empty {
  align-items: center;
  color: var(--bs-secondary-color);
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 34px 18px;
  text-align: center;
}

.notification-empty i {
  font-size: 1.5rem;
}

.notification-view-all {
  background: var(--bs-tertiary-bg);
  color: var(--bs-primary);
  display: block;
  font-size: .82rem;
  font-weight: 750;
  padding: 13px 16px;
  text-align: center;
  text-decoration: none;
}

.notification-view-all:hover {
  color: var(--bs-primary);
  text-decoration: underline;
}

.notification-page {
  max-width: 980px;
}

.notification-page-heading {
  align-items: flex-end;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 24px;
}

.notification-page-heading h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 2px 0 5px;
}

.notification-page-heading p {
  color: var(--bs-secondary-color);
  margin: 0;
}

.push-settings-card {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  margin-bottom: 24px;
}

.push-settings-icon {
  align-items: center;
  background: linear-gradient(135deg, #0d6efd, #6f42c1);
  border-radius: 18px;
  color: #fff;
  display: flex;
  font-size: 1.4rem;
  height: 58px;
  justify-content: center;
  width: 58px;
}

.push-settings-copy h2 {
  font-size: 1.25rem;
  margin: 2px 0 4px;
}

.push-settings-copy p {
  color: var(--bs-secondary-color);
  margin: 0 0 4px;
}

.push-settings-copy small {
  color: var(--bs-secondary-color);
  display: block;
  font-size: .76rem;
}

.notification-history {
  display: grid;
  gap: 12px;
}

.notification-history-item {
  margin: 0;
  overflow: hidden;
  padding: 0;
}

.notification-history-item > button {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--bs-body-color);
  display: grid;
  gap: 16px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 18px 20px;
  text-align: left;
  width: 100%;
}

.notification-history-item > button:hover,
.notification-history-item > button:focus-visible {
  background: var(--bs-tertiary-bg);
  outline: none;
}

.notification-history-item.is-unread {
  border-color: rgba(13, 110, 253, .38);
  box-shadow: inset 4px 0 0 var(--bs-primary), 0 10px 30px rgba(5, 20, 45, .07);
}

.notification-history-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.notification-history-title {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: flex-start;
}

.notification-history-title b {
  background: var(--bs-primary);
  border-radius: 999px;
  color: #fff;
  font-size: .64rem;
  padding: 3px 7px;
  text-transform: uppercase;
}

.notification-history-copy > span:not(.notification-history-title) {
  color: var(--bs-secondary-color);
}

.notification-history-copy small {
  color: var(--bs-primary);
  font-weight: 700;
}

.notification-history-arrow {
  color: var(--bs-secondary-color);
}

.notification-history-empty {
  padding: 50px 20px;
}

.notification-history-empty > i {
  color: var(--bs-primary);
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.mail-status-card {
  align-items: center;
  display: flex;
  gap: 20px;
  justify-content: space-between;
}

.mail-status-card > div {
  align-items: center;
  display: flex;
  gap: 16px;
  min-width: 0;
}

.mail-status-card code {
  overflow-wrap: anywhere;
}

@media (max-width: 991.98px) {
  .mobile-notification-bell .notification-dropdown {
    left: 8px !important;
    margin: 0 !important;
    max-width: none;
    position: fixed !important;
    right: 8px !important;
    top: 70px !important;
    transform: none !important;
    width: auto;
  }

  .notification-dropdown-list {
    max-height: min(55vh, 390px);
  }
}

@media (max-width: 767.98px) {
  .notification-page-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .notification-page-heading .btn {
    width: 100%;
  }

  .push-settings-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .push-toggle-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .notification-history-item > button {
    align-items: flex-start;
    gap: 12px;
    grid-template-columns: auto minmax(0, 1fr);
    padding: 16px;
  }

  .notification-history-arrow {
    display: none;
  }

  .notification-history-copy > span:not(.notification-history-title) {
    hyphens: auto;
    text-align: justify;
  }

  .mail-status-card,
  .mail-status-card > div {
    align-items: stretch;
    flex-direction: column;
  }

  .mail-status-card .btn {
    width: 100%;
  }
}

@media (max-width: 379.98px) {
  .site-navbar .site-navbar-inner {
    gap: .25rem;
    padding-inline: .55rem;
  }

  .site-navbar .site-brand {
    flex: 1 1 auto;
    max-width: none;
    margin-right: 0;
    gap: .38rem !important;
  }

  .site-navbar .site-logo-frame-header {
    width: 38px;
    height: 38px;
    border-radius: 11px;
  }

  .site-navbar .site-brand-copy {
    display: block;
    flex: 1 1 auto;
    max-width: none;
  }

  .site-navbar .site-brand-copy strong {
    overflow: visible;
    font-size: .82rem;
    line-height: 1.05;
    white-space: nowrap;
  }

  .site-navbar .site-brand-copy small {
    display: none;
  }

  .site-navbar .mobile-notification-bell {
    margin-right: .25rem !important;
  }

  .notification-dropdown-header {
    padding-inline: 12px;
  }

  .notification-item > button {
    padding-inline: 12px;
  }
}

/* ==========================================================
   v2.16 — Certificado, archivo unificado y visor protegido
   ========================================================== */
.product-detail-page .product-detail-cover {
  width: min(100%, 350px);
  aspect-ratio: 4 / 5;
  max-height: 470px;
}
.product-detail-page .product-detail-cover img {
  object-fit: contain;
  object-position: center;
  padding: .7rem;
}
.product-file-current {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-top: .65rem;
  padding: .65rem .8rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 11px;
  background: var(--soft);
  color: var(--bs-secondary-color);
  font-size: .82rem;
  overflow-wrap: anywhere;
}
.product-file-current i { color: var(--brand); }
.product-demo-advanced {
  border: 1px dashed var(--bs-border-color);
  border-radius: 12px;
  padding: .75rem .9rem;
}
.product-demo-advanced > summary {
  cursor: pointer;
  color: var(--brand);
  font-weight: 750;
}

.protected-pdf-viewer {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--bs-border-color);
  border-radius: 18px;
  background: #d8dee8;
  box-shadow: 0 18px 45px rgba(16,24,40,.12);
  user-select: none;
  -webkit-user-select: none;
}
.protected-pdf-toolbar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .65rem .8rem;
  border-bottom: 1px solid var(--bs-border-color);
  background: color-mix(in srgb, var(--bs-body-bg) 94%, transparent);
  backdrop-filter: blur(10px);
}
.protected-pdf-toolbar-group {
  display: flex;
  align-items: center;
  gap: .42rem;
}
.protected-pdf-page-control {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin: 0;
  color: var(--bs-secondary-color);
  font-size: .78rem;
  white-space: nowrap;
}
.protected-pdf-page-control input {
  width: 62px;
  min-height: 32px;
  padding: .2rem .35rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 8px;
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  text-align: center;
}
.protected-pdf-zoom {
  min-width: 55px;
  color: var(--bs-secondary-color);
  font-size: .76rem;
  font-weight: 700;
  text-align: center;
}
.protected-pdf-status {
  padding: .65rem 1rem;
  background: #eff4ff;
  color: #1849a9;
  font-size: .84rem;
  text-align: center;
}
.protected-pdf-status.is-error { background: #fff1f3; color: #c01048; }
.protected-pdf-stage {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  min-height: 560px;
  max-height: 78vh;
  padding: 1rem;
  overflow: auto;
  outline: none;
}
.protected-pdf-stage canvas {
  position: relative;
  z-index: 1;
  display: block;
  max-width: none;
  background: #fff;
  box-shadow: 0 8px 26px rgba(16,24,40,.2);
}
.protected-pdf-watermarks {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  grid-template-rows: repeat(3, minmax(0,1fr));
  align-items: center;
  justify-items: center;
  pointer-events: none;
  overflow: hidden;
}
.protected-pdf-watermarks span {
  width: 180%;
  color: rgba(16,24,40,.13);
  font-size: clamp(.62rem,1.2vw,.92rem);
  font-weight: 800;
  letter-spacing: .04em;
  text-align: center;
  text-transform: uppercase;
  transform: rotate(-28deg);
  white-space: nowrap;
}
.protected-pdf-security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  margin: 0;
  padding: .7rem 1rem;
  border-top: 1px solid var(--bs-border-color);
  background: var(--bs-body-bg);
  color: var(--bs-secondary-color);
  font-size: .78rem;
  text-align: center;
}
.protected-pdf-print-warning { display: none; }
.protected-pdf-viewer:fullscreen {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  border-radius: 0;
  background: #cfd6e1;
}
.protected-pdf-viewer:fullscreen .protected-pdf-stage {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  max-height: none;
}
.protected-pdf-viewer:fullscreen > :not(.protected-pdf-stage) {
  flex: 0 0 auto;
}

.certificate-document-v3 .certificate-metrics-six {
  width: 94%;
  margin-top: .65%;
}
.certificate-document-v3 .certificate-metrics-six span { padding: .38% .42%; }
.certificate-document-v3 .certificate-metrics-six small {
  line-height: 1.05;
  white-space: normal;
  text-align: center;
}
.certificate-footer-row-v3 {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: clamp(.45rem,1.1vw,.9rem);
  width: 91%;
  margin-top: .45%;
}
.certificate-signature-zone {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
  gap: .22rem;
}
.certificate-footer-row-v3 .certificate-signatories {
  width: 100%;
  max-width: none;
  margin-inline: auto;
  align-items: end;
  gap: clamp(.25rem,.7vw,.55rem);
}
.certificate-footer-row-v3 .certificate-signatories-count-1 { width: 48%; }
.certificate-footer-row-v3 .certificate-signatories-count-2 { width: 78%; }
.certificate-footer-row-v3 .certificate-signatories-count-3 { width: 100%; }
.certificate-footer-row-v3 .certificate-signature {
  align-content: end;
  width: min(100%, var(--signature-line-width,220px));
  min-width: 0;
  margin-inline: auto;
}
.certificate-footer-row-v3 .certificate-signature-image {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: clamp(36px,4.7vw,56px);
  margin-bottom: 2px;
  overflow: visible;
}
.certificate-footer-row-v3 .certificate-signature-image img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  object-position: center bottom;
}
.certificate-footer-row-v3 .certificate-signatories-count-1 .certificate-signature-image img { max-width: 190px; }
.certificate-footer-row-v3 .certificate-signatories-count-2 .certificate-signature-image img { max-width: 155px; }
.certificate-footer-row-v3 .certificate-signatories-count-3 .certificate-signature-image img { max-width: 118px; }
.certificate-footer-row-v3 .certificate-signature-line {
  width: 100%;
  margin: 0 auto;
  border-top: 1px solid #10213d;
}
.certificate-footer-row-v3 .certificate-signature strong { margin-top: .2rem; }
.certificate-verification-route {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: .28rem;
  width: min(100%, 720px);
  margin: .12rem auto 0;
  color: #475569;
  font-size: clamp(.36rem,.62vw,.53rem);
  line-height: 1.15;
  text-align: center;
}
.certificate-verification-route strong { color: var(--certificate-primary,#153e75); }
.certificate-verification-route span { overflow-wrap: anywhere; }
.certificate-footer-row-v3 .certificate-qr {
  display: grid;
  justify-items: center;
  flex: 0 0 clamp(92px,11vw,124px);
  gap: .08rem;
}
.certificate-footer-row-v3 .certificate-qr-code {
  display: grid;
  justify-items: center;
  max-width: 140px;
  line-height: 1.05;
}
.certificate-footer-row-v3 .certificate-qr-code span { font-weight: 600; }
.certificate-footer-row-v3 .certificate-qr-code strong { color: var(--certificate-primary,#153e75); }

@media (max-width: 991.98px) {
  .product-detail-page .product-detail-cover { width: min(100%, 310px); max-height: 415px; }
}
@media (max-width: 767.98px) {
  .product-detail-page .product-detail-cover { width: min(78vw, 270px); max-height: 360px; }
  .protected-pdf-toolbar { align-items: stretch; flex-direction: column; }
  .protected-pdf-toolbar-group { justify-content: center; }
  .protected-pdf-stage { min-height: 440px; max-height: 70vh; padding: .65rem; }
  .protected-pdf-security-note { font-size: .7rem; }
}
@media (max-width: 420px) {
  .protected-pdf-toolbar { padding: .55rem; }
  .protected-pdf-toolbar-group { gap: .25rem; }
  .protected-pdf-page-control span:first-child { display: none; }
  .protected-pdf-page-control input { width: 52px; }
}

/* Cabecera móvil: marca, campana y menú permanecen en una sola fila. */
@media (max-width: 1199.98px) {
  .site-navbar .site-navbar-inner {
    flex-wrap: nowrap;
    align-items: center;
  }
  .site-navbar .site-brand {
    flex: 1 1 0;
    min-width: 0;
    margin-right: .4rem;
    overflow: hidden;
  }
  .site-navbar .site-brand-copy {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
  }
  .site-navbar .mobile-notification-bell {
    flex: 0 0 auto;
    margin-left: auto !important;
    margin-right: .45rem !important;
  }
  .site-navbar .site-menu-toggle {
    flex: 0 0 auto;
    margin-left: 0 !important;
  }
}
@media print {
  body.has-protected-pdf-viewer * { visibility: hidden !important; }
  body.has-protected-pdf-viewer .protected-pdf-print-warning,
  body.has-protected-pdf-viewer .protected-pdf-print-warning * {
    visibility: visible !important;
  }
  body.has-protected-pdf-viewer .protected-pdf-viewer {
    position: fixed !important;
    inset: 0 !important;
    display: grid !important;
    place-items: center !important;
    border: 0 !important;
    background: #fff !important;
  }
  body.has-protected-pdf-viewer .protected-pdf-toolbar,
  body.has-protected-pdf-viewer .protected-pdf-status,
  body.has-protected-pdf-viewer .protected-pdf-stage,
  body.has-protected-pdf-viewer .protected-pdf-security-note { display: none !important; }
  body.has-protected-pdf-viewer .protected-pdf-print-warning {
    display: block !important;
    color: #111827 !important;
    font: 700 18pt Arial,sans-serif !important;
    text-align: center !important;
  }
}

/* =========================================================
   Servitecno Digital Studio v2.19
   Slider visible, botones consistentes y tarjetas de cursos
   ========================================================= */

/* Botones: alineación visual consistente en toda la interfaz. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .42rem;
  border-radius: .68rem;
  font-weight: 650;
  line-height: 1.15;
  text-align: center;
}
.btn > i { flex: 0 0 auto; }
.btn-sm {
  min-height: 34px;
  padding: .42rem .68rem;
  font-size: .8rem;
}
.admin-page-shell .btn:not(.btn-sm),
.product-detail-button {
  min-height: 40px;
}

/* Elimina la separación forzada de Bootstrap antes del footer. */
.footer.mt-5 { margin-top: 0 !important; }

/* Slider: conserva el formato amplio y muestra mejor la zona importante. */
.promo-image {
  width: 100%;
  object-fit: cover;
  object-position: left center;
}
.promo-video { object-position: center; }
.promo-carousel .carousel-indicators {
  align-items: center;
  gap: .42rem;
  margin-bottom: .72rem;
}
.promo-carousel .carousel-indicators [data-bs-target] {
  box-sizing: border-box;
  width: 10px;
  height: 10px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background-color: #fff;
  box-shadow: 0 1px 5px rgba(0,0,0,.32);
  opacity: .58;
  transition: transform .18s ease, opacity .18s ease;
}
.promo-carousel .carousel-indicators .active {
  width: 12px;
  height: 12px;
  opacity: 1;
  transform: scale(1.06);
}

/* Tarjetas de productos: precio y acción siempre ordenados. */
.product-card-footer {
  align-items: center;
}
.product-detail-button {
  min-width: 116px;
  padding-inline: .82rem;
}

/* Módulo administrativo de cursos. */
.course-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.course-admin-empty { grid-column: 1 / -1; }
.course-admin-card {
  min-width: 0;
  gap: 1rem;
  padding: 1.1rem;
  border-radius: 18px;
}
.course-admin-card-main {
  min-width: 0;
  gap: .8rem;
}
.course-admin-card-copy { min-width: 0; }
.course-admin-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-bottom: .55rem;
}
.course-admin-badges .badge {
  font-size: .67rem;
  line-height: 1;
}
.course-admin-card-copy h2 {
  display: -webkit-box;
  min-height: 2.45em;
  margin: 0 0 .32rem;
  overflow: hidden;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.22;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.course-admin-card-copy p {
  display: -webkit-box;
  min-height: 2.55em;
  margin: 0;
  overflow: hidden;
  color: var(--bs-secondary-color);
  font-size: .78rem;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.course-admin-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-radius: 14px;
}
.course-admin-stats span {
  gap: .08rem;
  min-width: 0;
  padding: .62rem .3rem;
}
.course-admin-stats span + span {
  border-top: 0;
  border-left: 1px solid var(--bs-border-color);
}
.course-admin-stats strong {
  font-size: 1.05rem;
  line-height: 1;
}
.course-admin-stats small {
  overflow: hidden;
  font-size: .68rem;
  line-height: 1.2;
  text-overflow: ellipsis;
}
.course-admin-actions {
  display: flex;
  align-items: stretch;
  gap: .25rem;
  margin-top: auto;
}
.course-admin-actions > .btn,
.course-admin-actions > form {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
}
.course-admin-actions .btn {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: .45rem .18rem;
  overflow: hidden;
  font-size: .68rem;
  white-space: nowrap;
}
.course-admin-actions .btn i { font-size: .78rem; }
.course-action-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 991.98px) {
  .course-admin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767.98px) {
  .btn:not(.btn-sm) {
    min-height: 40px;
    padding: .52rem .72rem;
    font-size: .86rem;
  }
  .btn-sm {
    min-height: 34px;
    padding: .4rem .58rem;
    font-size: .76rem;
  }

  .promo-image { object-position: 16% center; }
  .promo-video { object-position: center; }
  .promo-carousel .carousel-indicators { margin-bottom: .5rem; }

  .categories-section.py-5 {
    padding-bottom: 1.75rem !important;
  }

  .catalog-grid[data-view="grid"] .product-card-body,
  .section-heading + .row .product-card-body {
    padding: .72rem;
  }
  .catalog-grid[data-view="grid"] .product-card-footer,
  .section-heading + .row .product-card-footer {
    align-items: stretch;
    flex-direction: column;
    gap: .42rem;
    padding-top: .58rem;
  }
  .catalog-grid[data-view="grid"] .product-detail-button,
  .section-heading + .row .product-detail-button {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding: .46rem .45rem;
    font-size: .75rem;
  }

  .admin-courses-page {
    --bs-gutter-x: 1rem;
  }
  .admin-courses-page .admin-page-heading {
    gap: .75rem;
    margin-bottom: 1rem !important;
  }
  .admin-courses-page .admin-page-heading .admin-primary-action {
    width: auto;
    min-height: 38px;
    padding-inline: .8rem;
  }
  .course-admin-grid { gap: .62rem; }
  .course-admin-card {
    gap: .62rem;
    padding: .65rem;
    border-radius: 15px;
    box-shadow: 0 7px 18px rgba(16,24,40,.06);
  }
  .course-admin-card-main {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: .48rem;
  }
  .course-admin-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: .9rem;
  }
  .course-admin-badges {
    gap: .18rem;
    margin-bottom: .35rem;
  }
  .course-admin-badges .badge {
    padding: .25rem .35rem;
    font-size: .52rem;
  }
  .course-admin-card-copy h2 {
    min-height: 2.55em;
    margin-bottom: .2rem;
    font-size: .8rem;
    line-height: 1.25;
  }
  .course-admin-card-copy p {
    min-height: 2.45em;
    font-size: .62rem;
    line-height: 1.24;
  }
  .course-admin-stats { border-radius: 11px; }
  .course-admin-stats span { padding: .42rem .08rem; }
  .course-admin-stats strong { font-size: .85rem; }
  .course-admin-stats small { font-size: .5rem; }
  .course-admin-actions {
    display: flex;
    gap: .22rem;
  }
  .course-admin-actions .btn {
    min-height: 34px;
    padding: 0;
    border-radius: 9px;
    font-size: .72rem;
  }
  .course-admin-actions .btn i { font-size: .72rem; }
  .course-admin-actions .course-action-label {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }
}

@media (max-width: 359.98px) {
  .admin-courses-page { --bs-gutter-x: .72rem; }
  .course-admin-grid { gap: .42rem; }
  .course-admin-card { padding: .52rem; }
  .course-admin-card-main {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: .38rem;
  }
  .course-admin-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    font-size: .78rem;
  }
  .course-admin-badges .badge { font-size: .46rem; }
  .course-admin-card-copy h2 { font-size: .72rem; }
  .course-admin-card-copy p { font-size: .55rem; }
  .course-admin-stats small { font-size: .46rem; }
  .course-admin-actions .btn { min-height: 31px; }
}


/* ==========================================================
   V2.20 - Aula del cliente alineada con el catálogo
   ========================================================== */
.learning-dashboard-container,
.learning-course-content {
  width: 100%;
}

@media (max-width: 767.98px) {
  .learning-dashboard-hero .container,
  .course-classroom-header .container,
  .learning-dashboard-container,
  .learning-course-content {
    padding-left: .7rem !important;
    padding-right: .7rem !important;
  }

  .learning-dashboard-container {
    padding-top: 1rem !important;
    padding-bottom: 1.5rem !important;
  }

  .learning-section-heading {
    align-items: center;
    gap: .65rem;
    margin-bottom: .75rem;
  }

  .learning-section-heading h2 {
    font-size: 1.35rem;
  }

  .learning-course-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem .7rem;
  }

  .learning-course-card {
    border-radius: 13px;
    box-shadow: 0 4px 13px rgba(16,24,40,.055);
  }

  .learning-course-cover {
    aspect-ratio: 16 / 10;
    font-size: 1.55rem;
  }

  .learning-course-cover .badge {
    left: .42rem;
    top: .42rem;
    padding: .24rem .4rem;
    font-size: .52rem;
  }

  .learning-course-copy {
    padding: .65rem;
  }

  .learning-course-copy h3 {
    min-height: 2.45em;
    margin-bottom: .35rem;
    font-size: .78rem;
    line-height: 1.22;
  }

  .learning-course-copy p {
    min-height: 2.6em;
    margin-bottom: .55rem;
    font-size: .65rem;
    line-height: 1.3;
  }

  .course-progress-label {
    margin-bottom: .32rem;
    gap: .2rem;
    font-size: .62rem;
  }

  .learning-course-copy .progress {
    height: 6px;
  }

  .learning-course-copy .btn {
    min-height: 34px;
    margin-top: .55rem !important;
    padding: .34rem .42rem;
    font-size: .66rem;
  }

  .learning-section-heading.mt-5 {
    margin-top: 1.45rem !important;
  }

  .certificate-list-card {
    grid-template-columns: 38px minmax(0,1fr) auto;
    gap: .6rem;
    padding: .75rem;
    border-radius: 14px;
  }

  .certificate-list-card > span {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    font-size: 1rem;
  }

  .certificate-list-card h3 {
    font-size: .8rem;
  }

  .certificate-list-card p {
    font-size: .64rem;
  }

  .certificate-list-card .btn {
    min-width: 38px;
    min-height: 34px;
    padding: .34rem .48rem;
    font-size: .66rem;
  }

  .course-classroom-header {
    padding: 1.35rem 0 1.6rem;
  }

  .course-back-link {
    margin-bottom: 1rem;
  }

  .course-classroom-header h1 {
    font-size: 1.65rem;
  }

  .course-classroom-header p {
    font-size: .86rem;
  }

  .learning-course-content {
    padding-top: .9rem !important;
    padding-bottom: 1.4rem !important;
  }

  .learning-course-content > .row {
    --bs-gutter-x: .7rem;
    --bs-gutter-y: .85rem;
  }

  .classroom-module {
    margin-bottom: .75rem;
    border-radius: 14px;
  }

  .classroom-module-heading {
    gap: .65rem;
    padding: .8rem;
  }

  .classroom-module-heading > span {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: .78rem;
  }

  .classroom-module-heading small {
    font-size: .6rem;
  }

  .classroom-module-heading .module-title {
    font-size: .84rem;
    line-height: 1.25;
  }

  .classroom-module-heading p {
    margin-top: .2rem;
    font-size: .68rem;
  }

  .classroom-lessons a {
    grid-template-columns: 32px minmax(0,1fr) auto;
    gap: .55rem;
    padding: .72rem .8rem;
  }

  .lesson-status-icon {
    width: 32px;
    height: 32px;
    font-size: .75rem;
  }

  .classroom-lessons strong {
    font-size: .75rem;
  }

  .classroom-lessons small {
    font-size: .62rem;
  }

  .certification-panel {
    position: static;
    padding: 1rem;
    border-radius: 16px;
  }
}

@media (max-width: 359.98px) {
  .learning-dashboard-hero .container,
  .course-classroom-header .container,
  .learning-dashboard-container,
  .learning-course-content {
    padding-left: .55rem !important;
    padding-right: .55rem !important;
  }

  .learning-course-grid {
    gap: .6rem .5rem;
  }

  .learning-course-copy {
    padding: .55rem;
  }

  .learning-course-copy h3 {
    font-size: .72rem;
  }

  .learning-course-copy p,
  .course-progress-label,
  .learning-course-copy .btn {
    font-size: .6rem;
  }
}

/* ==========================================================
   V2.21 - Mi aula: alineación web con el catálogo
   ========================================================== */
@media (min-width: 768px) {
  .learning-dashboard-container {
    max-width: 1140px;
    margin-right: auto;
    margin-left: auto;
  }

  .learning-dashboard-hero .container {
    max-width: 1140px;
  }
}

@media (min-width: 992px) {
  .learning-dashboard-container {
    padding-left: .75rem;
    padding-right: .75rem;
  }

  .learning-course-grid {
    align-items: stretch;
  }

  .learning-course-card {
    width: 100%;
    max-width: 100%;
  }
}

/* =========================================================
   Servitecno Digital Studio v2.23
   Visor tipo libro responsive para demos y productos adquiridos
   ========================================================= */
.protected-pdf-book-viewer .protected-pdf-stage {
  position: relative;
  align-items: center;
  justify-content: center;
  min-height: 590px;
  max-height: 82vh;
  padding: 1.15rem 3.25rem;
  overflow: auto;
  background:
    radial-gradient(circle at 50% 8%, rgba(255,255,255,.34), transparent 36%),
    linear-gradient(145deg, #cbd3df, #e5e9f0 52%, #c7d0dd);
  touch-action: pan-y pinch-zoom;
}
.protected-pdf-book {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  width: max-content;
  max-width: 100%;
  margin: auto;
  filter: drop-shadow(0 18px 24px rgba(16,24,40,.22));
  perspective: 1800px;
  transform-style: preserve-3d;
}
.protected-pdf-sheet {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 1px;
  overflow: hidden;
  background: #fff;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}
.protected-pdf-sheet.is-left {
  border-radius: 8px 1px 1px 8px;
  box-shadow: inset -14px 0 18px -18px rgba(16,24,40,.85);
}
.protected-pdf-sheet.is-right {
  border-radius: 1px 8px 8px 1px;
  box-shadow: inset 14px 0 18px -18px rgba(16,24,40,.85);
}
.protected-pdf-sheet.is-empty {
  background: linear-gradient(90deg, rgba(15,23,42,.055), transparent 10%), #fbfbf8;
}
.protected-pdf-sheet canvas {
  position: relative;
  z-index: 1;
  display: block;
  max-width: none;
  background: #fff;
  box-shadow: none;
}
.protected-pdf-book-gutter {
  position: absolute;
  z-index: 5;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 18px;
  pointer-events: none;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(15,23,42,.18) 43%, rgba(255,255,255,.5) 50%, rgba(15,23,42,.16) 57%, transparent);
  opacity: .72;
}
.protected-pdf-page-number {
  position: absolute;
  z-index: 4;
  bottom: .38rem;
  min-width: 1.5rem;
  padding: .12rem .35rem;
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  color: #475467;
  font-size: .65rem;
  font-weight: 700;
  text-align: center;
  pointer-events: none;
}
.protected-pdf-sheet.is-left .protected-pdf-page-number { left: .45rem; }
.protected-pdf-sheet.is-right .protected-pdf-page-number { right: .45rem; }
.protected-pdf-book-viewer .protected-pdf-watermarks {
  z-index: 6;
  grid-template-columns: repeat(5, minmax(0,1fr));
  grid-template-rows: repeat(2, minmax(0,1fr));
}
.protected-pdf-book-viewer .protected-pdf-watermarks span {
  width: 230%;
  font-size: clamp(.52rem,.82vw,.78rem);
}
.protected-pdf-edge-control {
  position: sticky;
  z-index: 10;
  top: 50%;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 52px;
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 999px;
  background: rgba(15,23,42,.72);
  color: #fff;
  box-shadow: 0 8px 20px rgba(15,23,42,.18);
  backdrop-filter: blur(8px);
  transform: translateY(-50%);
  transition: transform .18s ease, background .18s ease, opacity .18s ease;
}
.protected-pdf-edge-control:hover:not(:disabled) {
  background: rgba(15,23,42,.9);
  transform: translateY(-50%) scale(1.06);
}
.protected-pdf-edge-control:disabled { opacity: .22; cursor: default; }
.protected-pdf-edge-control.is-prev { left: .65rem; margin-right: .7rem; }
.protected-pdf-edge-control.is-next { right: .65rem; margin-left: .7rem; }
.protected-pdf-view-mode {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  min-height: 32px;
  padding: .25rem .55rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 999px;
  color: var(--bs-secondary-color);
  font-size: .72rem;
  font-weight: 750;
  white-space: nowrap;
}
.protected-pdf-demo-end {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  padding: .8rem 1rem;
  border-top: 1px solid #fedf89;
  background: #fffaeb;
  color: #93370d;
  text-align: left;
}
.protected-pdf-demo-end[hidden] { display: none !important; }
.protected-pdf-demo-end > i { font-size: 1.05rem; }
.protected-pdf-demo-end div { display: grid; gap: .05rem; }
.protected-pdf-demo-end strong { font-size: .86rem; }
.protected-pdf-demo-end span { font-size: .76rem; }
.protected-pdf-page-flip {
  position: absolute;
  z-index: 12;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 50%;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(100deg, rgba(255,255,255,.98), rgba(226,232,240,.95) 58%, rgba(148,163,184,.5));
  box-shadow: -12px 0 25px rgba(15,23,42,.18);
  transform-origin: left center;
  transform: rotateY(0deg);
}
.protected-pdf-book.is-flipping-next .protected-pdf-page-flip {
  animation: protected-page-turn-next .42s ease-in-out both;
}
.protected-pdf-book.is-flipping-prev .protected-pdf-page-flip {
  left: 0;
  transform-origin: right center;
  background: linear-gradient(80deg, rgba(148,163,184,.5), rgba(226,232,240,.95) 42%, rgba(255,255,255,.98));
  box-shadow: 12px 0 25px rgba(15,23,42,.18);
  animation: protected-page-turn-prev .42s ease-in-out both;
}
@keyframes protected-page-turn-next {
  0% { opacity: 0; transform: rotateY(0deg); }
  10% { opacity: .96; }
  100% { opacity: 0; transform: rotateY(-178deg); }
}
@keyframes protected-page-turn-prev {
  0% { opacity: 0; transform: rotateY(0deg); }
  10% { opacity: .96; }
  100% { opacity: 0; transform: rotateY(178deg); }
}
.protected-pdf-book-viewer:fullscreen .protected-pdf-stage {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  max-height: none;
}

@media (max-width: 899.98px) {
  .protected-pdf-book-viewer .protected-pdf-stage {
    min-height: 500px;
    max-height: 74vh;
    padding: .75rem 2.55rem;
  }
  .protected-pdf-book.is-single-page .protected-pdf-sheet.is-right,
  .protected-pdf-book.is-single-page .protected-pdf-book-gutter { display: none; }
  .protected-pdf-book.is-single-page .protected-pdf-sheet.is-left {
    border-radius: 8px;
    box-shadow: 0 10px 22px rgba(16,24,40,.18);
  }
  .protected-pdf-book-viewer .protected-pdf-watermarks {
    grid-template-columns: repeat(2, minmax(0,1fr));
    grid-template-rows: repeat(3, minmax(0,1fr));
  }
  .protected-pdf-page-flip {
    left: 0;
    width: 100%;
    transform-origin: right center;
  }
  .protected-pdf-book.is-flipping-next .protected-pdf-page-flip { transform-origin: right center; }
  .protected-pdf-edge-control { width: 34px; height: 46px; }
  .protected-pdf-edge-control.is-prev { margin-right: .35rem; }
  .protected-pdf-edge-control.is-next { margin-left: .35rem; }
}

@media (max-width: 575.98px) {
  .protected-pdf-book-viewer .protected-pdf-stage {
    min-height: 430px;
    max-height: 70vh;
    padding: .55rem 2.05rem;
  }
  .protected-pdf-book-viewer .protected-pdf-toolbar { gap: .48rem; padding: .5rem; }
  .protected-pdf-book-viewer .protected-pdf-toolbar-group { gap: .22rem; }
  .protected-pdf-view-mode { min-height: 30px; padding-inline: .42rem; font-size: .66rem; }
  .protected-pdf-edge-control {
    position: absolute;
    top: 50%;
    width: 31px;
    height: 42px;
  }
  .protected-pdf-edge-control.is-prev { left: .28rem; margin: 0; }
  .protected-pdf-edge-control.is-next { right: .28rem; margin: 0; }
  .protected-pdf-page-number { font-size: .58rem; }
}

@media (prefers-reduced-motion: reduce) {
  .protected-pdf-page-flip,
  .protected-pdf-book.is-flipping-next .protected-pdf-page-flip,
  .protected-pdf-book.is-flipping-prev .protected-pdf-page-flip { animation: none !important; }
}

/* =========================================================
   Servitecno Digital Studio v2.25
   Reportes financieros para administrador y superadministrador
   ========================================================= */
.financial-report-actions,
.financial-presets,
.financial-filter-heading,
.financial-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
  flex-wrap: wrap;
}
.financial-report-filter { padding: 1.15rem; }
.financial-filter-heading { margin-bottom: .85rem; }
.financial-presets { justify-content: flex-start; margin-bottom: 1rem; }
.financial-filter-grid {
  display: grid;
  grid-template-columns: repeat(6,minmax(0,1fr));
  gap: .8rem;
  align-items: end;
}
.financial-filter-grid .form-label { display: grid; gap: .35rem; margin: 0; color: var(--bs-secondary-color); font-size: .76rem; font-weight: 750; }
.financial-filter-search { grid-column: span 2; }
.financial-filter-submit { display: flex; }
.financial-filter-submit .btn { width: 100%; }
.financial-snapshot-grid {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 1rem;
}
.financial-snapshot-card {
  display: flex;
  align-items: center;
  gap: .85rem;
  min-width: 0;
  padding: 1.05rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 18px;
  background: var(--bs-body-bg);
  box-shadow: 0 8px 24px rgba(16,24,40,.045);
}
.financial-snapshot-card > span,
.financial-method-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: var(--brand);
  background: var(--brand-soft);
}
.financial-snapshot-card div { display: grid; min-width: 0; gap: .2rem; }
.financial-snapshot-card small { color: var(--bs-secondary-color); font-weight: 700; }
.financial-snapshot-card strong { overflow-wrap: anywhere; color: var(--bs-heading-color); font-size: clamp(1.15rem,2vw,1.65rem); }
.financial-summary-grid {
  display: grid;
  grid-template-columns: repeat(6,minmax(0,1fr));
  gap: .8rem;
}
.financial-summary-card {
  display: grid;
  align-content: center;
  min-height: 128px;
  padding: 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 17px;
  background: var(--bs-body-bg);
}
.financial-summary-card small { color: var(--bs-secondary-color); font-weight: 700; }
.financial-summary-card strong { margin: .28rem 0; overflow-wrap: anywhere; color: var(--bs-heading-color); font-size: clamp(1.25rem,2.2vw,1.85rem); }
.financial-summary-card span { color: var(--bs-secondary-color); font-size: .72rem; }
.financial-summary-card.is-primary { border-color: rgba(35,87,217,.32); background: linear-gradient(145deg,var(--bs-body-bg),var(--brand-soft)); }
.financial-summary-card.is-danger { border-color: rgba(217,45,32,.28); background: linear-gradient(145deg,var(--bs-body-bg),rgba(217,45,32,.055)); }
.financial-panel { overflow: hidden; }
.financial-panel-heading {
  margin: -1.5rem -1.5rem 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--bs-border-color);
}
.financial-panel-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: .32rem .68rem;
  border-radius: 999px;
  color: var(--brand);
  background: var(--brand-soft);
  font-size: .76rem;
  font-weight: 800;
}
.financial-trend-list { display: grid; gap: .75rem; }
.financial-trend-row { display: grid; grid-template-columns: 58px minmax(0,1fr) auto; align-items: center; gap: .7rem; }
.financial-trend-row > span { color: var(--bs-secondary-color); font-size: .76rem; font-weight: 700; }
.financial-trend-row > strong { min-width: 86px; font-size: .82rem; text-align: right; }
.financial-trend-track { height: 11px; overflow: hidden; border-radius: 999px; background: var(--soft); }
.financial-trend-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--brand),#64b5f6); }
.financial-method-list,
.financial-category-list { display: grid; gap: .55rem; }
.financial-method-row {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: .7rem;
  padding: .7rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 14px;
}
.financial-method-row div { display: grid; min-width: 0; }
.financial-method-row small { color: var(--bs-secondary-color); font-size: .72rem; }
.financial-method-row b { font-size: .83rem; white-space: nowrap; }
.financial-category-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
  padding: .72rem .15rem;
  border-bottom: 1px solid var(--bs-border-color);
}
.financial-category-list > div:last-child { border-bottom: 0; }
.financial-category-list span { display: grid; min-width: 0; }
.financial-category-list small { color: var(--bs-secondary-color); font-size: .72rem; }
.financial-category-list b { font-size: .84rem; white-space: nowrap; }
.financial-table td > strong,
.financial-table td > small { display: block; }
.financial-table td > small { margin-top: .2rem; color: var(--bs-secondary-color); font-size: .72rem; }
.financial-products-cell { display: -webkit-box; max-width: 270px; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.financial-mobile-orders { display: grid; gap: .7rem; }
.financial-mobile-orders article { padding: .9rem; border: 1px solid var(--bs-border-color); border-radius: 15px; background: var(--bs-body-bg); }
.financial-mobile-order-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.financial-mobile-orders h3 { margin: .6rem 0 .25rem; font-size: .95rem; }
.financial-mobile-orders p { display: -webkit-box; margin: 0 0 .65rem; overflow: hidden; color: var(--bs-secondary-color); font-size: .76rem; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.financial-mobile-orders dl { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .35rem; margin: 0; }
.financial-mobile-orders dl div { padding: .45rem; border-radius: 10px; background: var(--soft); }
.financial-mobile-orders dt { color: var(--bs-secondary-color); font-size: .62rem; text-transform: uppercase; }
.financial-mobile-orders dd { margin: .1rem 0 0; overflow-wrap: anywhere; font-size: .7rem; font-weight: 750; }
.financial-pagination { display: flex; align-items: center; justify-content: center; gap: .35rem; padding-top: 1rem; }
.financial-pagination a,
.financial-pagination span { display: grid; place-items: center; min-width: 34px; height: 34px; padding: 0 .35rem; border: 1px solid var(--bs-border-color); border-radius: 10px; color: inherit; text-decoration: none; }
.financial-pagination a.active { border-color: var(--brand); color: #fff; background: var(--brand); }
.financial-accounting-note { display: flex; align-items: flex-start; gap: .65rem; padding: .9rem 1rem; border: 1px solid #fedf89; border-radius: 14px; color: #93370d; background: #fffaeb; font-size: .78rem; }
[data-bs-theme="dark"] .financial-accounting-note { border-color: rgba(245,158,11,.32); color: #fdbb74; background: rgba(245,158,11,.1); }

@media (max-width: 1199.98px) {
  .financial-filter-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .financial-summary-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 767.98px) {
  .financial-report-actions { width: 100%; }
  .financial-report-actions > * { flex: 1 1 auto; }
  .financial-report-actions .btn { width: 100%; }
  .financial-report-filter { padding: 1rem; }
  .financial-filter-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; }
  .financial-filter-search { grid-column: 1 / -1; }
  .financial-filter-submit { grid-column: 1 / -1; }
  .financial-presets { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .financial-snapshot-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; }
  .financial-snapshot-card { padding: .8rem; }
  .financial-snapshot-card > span { width: 38px; height: 38px; }
  .financial-summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; }
  .financial-summary-card { min-height: 112px; padding: .8rem; }
  .financial-panel-heading { margin: -1rem -1rem 1rem; padding: .9rem 1rem; }
  .financial-method-row { grid-template-columns: auto minmax(0,1fr); }
  .financial-method-row b { grid-column: 2; }
}
@media (max-width: 389.98px) {
  .financial-filter-grid { grid-template-columns: 1fr; }
  .financial-filter-search,
  .financial-filter-submit { grid-column: auto; }
  .financial-mobile-orders dl { grid-template-columns: 1fr 1fr; }
  .financial-mobile-orders dl div:last-child { grid-column: 1 / -1; }
}

/* =========================================================
   Versión 2.26: Checkout Bricks de Mercado Pago
   ========================================================= */
.checkout-page-header {
  background:
    radial-gradient(circle at 88% 18%, rgba(41, 98, 255, .17), transparent 30%),
    linear-gradient(135deg, var(--bs-body-bg), var(--soft));
}
.mp-checkout-card { overflow: visible; }
.mp-checkout-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.mp-secure-badge {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem .75rem;
  border: 1px solid rgba(41, 98, 255, .22);
  border-radius: 999px;
  color: #2457d6;
  background: rgba(41, 98, 255, .07);
  font-size: .82rem;
  font-weight: 750;
  white-space: nowrap;
}
[data-bs-theme="dark"] .mp-secure-badge { color: #9fbcff; background: rgba(74, 125, 255, .13); }
.checkout-customer-fields {
  padding: 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 16px;
  background: var(--bs-tertiary-bg);
}
.checkout-terms {
  padding: .9rem 1rem .9rem 2.6rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 14px;
  background: var(--bs-body-bg);
}
.checkout-terms .form-check-input { margin-left: -1.55rem; }
.mp-brick-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  min-height: 170px;
  border: 1px dashed var(--bs-border-color);
  border-radius: 16px;
  color: var(--bs-secondary-color);
}
.mp-brick-container {
  min-height: 80px;
  overflow: visible;
}
.mp-fallback {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .9rem 1rem;
  border: 1px dashed var(--bs-border-color);
  border-radius: 15px;
  background: var(--bs-tertiary-bg);
}
.mp-fallback > div { display: flex; flex-direction: column; gap: .15rem; }
.mp-fallback small { color: var(--bs-secondary-color); }
.manual-payment-section { padding: 0; overflow: hidden; }
.manual-payment-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border: 0;
  background: transparent;
  color: var(--bs-body-color);
  text-align: left;
}
.manual-payment-toggle > span { display: flex; align-items: center; gap: .65rem; }
.manual-payment-toggle > span > i { color: var(--brand); }
.manual-payment-toggle[aria-expanded="true"] > .fa-chevron-down { transform: rotate(180deg); }
.manual-payment-toggle > .fa-chevron-down { transition: transform .2s ease; }
.manual-payment-section .collapse > form,
.manual-payment-section .collapsing > form { padding-left: 1.25rem !important; padding-right: 1.25rem !important; padding-bottom: 1.25rem !important; }
.checkout-summary-title { display: flex; align-items: center; gap: .65rem; }
.checkout-summary-title > i { color: var(--brand); font-size: 1.15rem; }
.checkout-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  font-size: 1.15rem;
}
.checkout-total strong { color: var(--brand); font-size: 1.45rem; }
.checkout-security-note {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  margin-top: 1rem;
  padding: .75rem;
  border-radius: 12px;
  background: var(--bs-tertiary-bg);
  color: var(--bs-secondary-color);
  font-size: .82rem;
  line-height: 1.45;
}
.checkout-security-note i { margin-top: .15rem; color: #198754; }
.payment-result-card { max-width: 720px; }
.payment-result-icon {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  font-size: 2.5rem;
}
.payment-result-card.status-success .payment-result-icon { color: #087f5b; background: rgba(25, 135, 84, .12); }
.payment-result-card.status-danger .payment-result-icon { color: #c92a2a; background: rgba(220, 53, 69, .12); }
.payment-result-card.status-warning .payment-result-icon { color: #9a6700; background: rgba(255, 193, 7, .16); }
.payment-result-data {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .7rem;
  margin: 1.5rem 0 0;
  text-align: left;
}
.payment-result-data > div {
  padding: .85rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
  background: var(--bs-tertiary-bg);
}
.payment-result-data dt { color: var(--bs-secondary-color); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; }
.payment-result-data dd { margin: .2rem 0 0; font-weight: 750; overflow-wrap: anywhere; }

@media (max-width: 767.98px) {
  .mp-checkout-heading { flex-direction: column; }
  .mp-secure-badge { align-self: flex-start; }
  .mp-fallback { flex-direction: column; align-items: stretch; }
  .mp-fallback .btn { width: 100%; }
  .payment-result-data { grid-template-columns: 1fr; }
  .checkout-total strong { font-size: 1.25rem; }
}

@media (max-width: 575.98px) {
  .mp-checkout-card,
  .manual-payment-section,
  .checkout-sticky-summary { border-radius: 16px; }
  .mp-checkout-card { padding: 1rem; }
  .checkout-customer-fields { padding: .85rem; }
  .manual-payment-toggle { padding: 1rem; }
  .manual-payment-section .collapse > form,
  .manual-payment-section .collapsing > form { padding-left: 1rem !important; padding-right: 1rem !important; padding-bottom: 1rem !important; }
}

/* ==========================================================
   V2.27 - Centro de pago pendiente y medios combinados
   ========================================================== */
.pending-payment-header {
  background:
    radial-gradient(circle at 88% 14%, rgba(79, 70, 229, .26), transparent 34%),
    linear-gradient(135deg, #0f2f5b 0%, #173f78 55%, #3349d8 100%);
  color: #fff;
}
.pending-payment-header .eyebrow,
.pending-payment-header p { color: rgba(255,255,255,.82); }
.pending-payment-page { max-width: 1140px; }
.payment-state-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  align-items: start;
  border: 1px solid var(--bs-border-color);
}
.payment-state-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  font-size: 1.35rem;
  background: rgba(13,110,253,.12);
  color: var(--bs-primary);
}
.payment-state-review .payment-state-icon { background: rgba(255,193,7,.16); color: #b77900; }
.payment-state-processing .payment-state-icon { background: rgba(13,202,240,.16); color: #087990; }
.payment-state-card h2 { margin-bottom: .45rem; }
.payment-state-card p { color: var(--bs-secondary-color); }
.payment-state-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  margin: 1rem 0 1.25rem;
}
.payment-state-details div {
  padding: .75rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 14px;
  background: var(--bs-tertiary-bg);
}
.payment-state-details dt {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--bs-secondary-color);
}
.payment-state-details dd { margin: .2rem 0 0; font-weight: 750; overflow-wrap: anywhere; }
.payment-rejected-alert { border-radius: 16px; }
.pending-order-summary .pending-order-number {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .15rem .75rem;
  align-items: center;
  margin: 1rem 0 .5rem;
  padding: .9rem 1rem;
  border-radius: 14px;
  background: var(--bs-tertiary-bg);
  border: 1px solid var(--bs-border-color);
}
.pending-order-number small { grid-column: 1; color: var(--bs-secondary-color); }
.pending-order-number strong { grid-column: 1; overflow-wrap: anywhere; }
.pending-order-number .order-status { grid-column: 2; grid-row: 1 / span 2; }
.account-pay-button { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; white-space: nowrap; }
.account-order-note {
  margin: .75rem 0;
  padding: .65rem .75rem;
  border-radius: 12px;
  background: rgba(220,53,69,.08);
  color: var(--bs-danger-text-emphasis);
  font-size: .78rem;
}
.mp-checkout-card.is-processing {
  position: relative;
  pointer-events: none;
  opacity: .82;
}
.mp-checkout-card.is-processing::after {
  content: 'Procesando pago…';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 20;
  border-radius: inherit;
  background: rgba(255,255,255,.72);
  color: #0f172a;
  font-weight: 800;
  backdrop-filter: blur(2px);
}
[data-bs-theme="dark"] .mp-checkout-card.is-processing::after {
  background: rgba(8,15,35,.76);
  color: #fff;
}

@media (max-width: 767.98px) {
  .pending-payment-page { padding-left: .85rem; padding-right: .85rem; }
  .payment-state-card { grid-template-columns: 1fr; gap: .85rem; padding: 1rem; }
  .payment-state-icon { width: 48px; height: 48px; border-radius: 14px; }
  .payment-state-details { grid-template-columns: 1fr; gap: .55rem; }
  .payment-state-details div { padding: .65rem .75rem; }
  .pending-order-summary { margin-top: 0; }
  .account-pay-button { min-height: 40px; }
}

/* =========================================================
   Versión 2.28: aceptación legal y pago de certificaciones
   ========================================================= */
.checkout-legal-consent {
  padding: 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 16px;
  background: var(--bs-tertiary-bg);
}
.checkout-legal-consent .checkout-terms,
.checkout-legal-consent > .form-check {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding-top: .25rem;
  padding-bottom: .25rem;
}
.checkout-legal-consent > small {
  display: block;
  margin-top: .65rem;
  color: var(--bs-secondary-color);
  font-size: .76rem;
}
[data-mp-pay] {
  min-width: 160px;
  justify-content: center;
}
[data-mp-pay]:disabled {
  cursor: not-allowed;
  opacity: .62;
}
[data-mp-pay].is-processing { pointer-events: none; }
.legal-document details {
  border-bottom: 1px solid var(--bs-border-color);
  padding: .9rem 0;
}
.legal-document details:last-child { border-bottom: 0; }
.legal-document summary {
  cursor: pointer;
  font-weight: 750;
}
.legal-document details > div {
  padding-top: .75rem;
  color: var(--bs-secondary-color);
}
.legal-document details > div p:last-child { margin-bottom: 0; }

@media (max-width: 575.98px) {
  .checkout-legal-consent { padding: .8rem; }
  [data-mp-pay] { width: 100%; }
}

/* =========================================================
   V2.29 · ASISTENTE SERVITECNO FLOTANTE
   ========================================================= */
.servi-assistant {
  --assistant-primary: #0b67f0;
  --assistant-primary-dark: #084db5;
  --assistant-ink: #10213b;
  --assistant-surface: #ffffff;
  --assistant-soft: #edf5ff;
  position: fixed;
  right: max(22px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 1085;
  font-family: inherit;
}

.servi-assistant-launcher {
  position: relative;
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  padding: 5px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(224,241,255,.96));
  box-shadow: 0 18px 46px rgba(8, 32, 70, .28), 0 5px 16px rgba(10, 103, 240, .22);
  cursor: pointer;
  isolation: isolate;
  transition: transform .22s ease, box-shadow .22s ease;
  animation: serviAssistantFloat 3.6s ease-in-out infinite;
}

.servi-assistant-launcher:hover,
.servi-assistant-launcher:focus-visible {
  transform: translateY(-5px) scale(1.035);
  box-shadow: 0 22px 54px rgba(8, 32, 70, .34), 0 8px 20px rgba(10, 103, 240, .28);
  outline: none;
}

.servi-assistant-launcher img {
  position: relative;
  z-index: 3;
  width: 76px;
  height: 76px;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
  filter: drop-shadow(0 8px 9px rgba(15, 34, 63, .18));
  transform-origin: 50% 82%;
  animation: serviAssistantWave 5.8s ease-in-out infinite;
}

.servi-assistant-pulse,
.servi-assistant-glow {
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  pointer-events: none;
}

.servi-assistant-pulse {
  z-index: -2;
  border: 2px solid rgba(16, 146, 255, .44);
  animation: serviAssistantPulse 2.5s ease-out infinite;
}

.servi-assistant-glow {
  z-index: -1;
  background: radial-gradient(circle, rgba(30, 183, 255, .28), transparent 68%);
  filter: blur(7px);
}

.servi-assistant-online {
  position: absolute;
  z-index: 5;
  right: 5px;
  bottom: 7px;
  width: 17px;
  height: 17px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #18b36b;
  box-shadow: 0 2px 8px rgba(24, 179, 107, .45);
}

.servi-assistant-hint {
  position: absolute;
  right: 100px;
  bottom: 18px;
  display: grid;
  min-width: 184px;
  padding: .72rem 2.1rem .72rem .92rem;
  border: 1px solid rgba(10, 103, 240, .16);
  border-radius: 16px 16px 4px 16px;
  background: rgba(255,255,255,.97);
  box-shadow: 0 14px 36px rgba(13, 35, 70, .18);
  color: var(--assistant-ink);
  opacity: 0;
  visibility: hidden;
  transform: translateX(14px) scale(.96);
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
  cursor: pointer;
}

.servi-assistant-hint.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(0) scale(1);
}

.servi-assistant-hint.is-hidden { display: none; }
.servi-assistant-hint strong { font-size: .88rem; }
.servi-assistant-hint span { color: #5f6f85; font-size: .78rem; }
.servi-assistant-hint button {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #778399;
}
.servi-assistant-hint button:hover { background: #edf3fb; color: #273a56; }

.servi-assistant-panel {
  position: absolute;
  right: 0;
  bottom: 102px;
  display: flex;
  flex-direction: column;
  width: min(390px, calc(100vw - 32px));
  height: min(610px, calc(100vh - 145px));
  min-height: 460px;
  overflow: hidden;
  border: 1px solid rgba(56, 84, 120, .17);
  border-radius: 24px;
  background: var(--assistant-surface);
  box-shadow: 0 26px 78px rgba(6, 27, 62, .32);
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px) scale(.965);
  transform-origin: right bottom;
  transition: opacity .23s ease, transform .23s ease, visibility .23s ease;
}

.servi-assistant.is-open .servi-assistant-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.servi-assistant.is-open .servi-assistant-launcher {
  animation-play-state: paused;
  transform: scale(.94);
}

.servi-assistant-header {
  display: grid;
  grid-template-columns: 48px 1fr 38px;
  align-items: center;
  gap: .72rem;
  min-height: 74px;
  padding: .75rem .85rem;
  color: #fff;
  background:
    radial-gradient(circle at 90% 10%, rgba(79, 204, 255, .34), transparent 32%),
    linear-gradient(135deg, #0c2243, #075fc9 70%, #118fea);
}

.servi-assistant-header-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 50%;
  background: rgba(255,255,255,.94);
  box-shadow: 0 5px 14px rgba(0,0,0,.18);
}
.servi-assistant-header-avatar img { width: 44px; height: 44px; object-fit: contain; }
.servi-assistant-header-avatar span {
  position: absolute;
  right: 0;
  bottom: 1px;
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #24d27f;
}
.servi-assistant-header strong { display: block; line-height: 1.15; font-size: .98rem; }
.servi-assistant-header small { display: flex; align-items: center; gap: .34rem; margin-top: .26rem; color: rgba(255,255,255,.78); font-size: .69rem; }
.servi-assistant-header small span { width: 6px; height: 6px; border-radius: 50%; background: #53efa6; }
.servi-assistant-header > button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 12px;
  background: rgba(255,255,255,.13);
  color: #fff;
  transition: background .18s ease, transform .18s ease;
}
.servi-assistant-header > button:hover { background: rgba(255,255,255,.23); transform: rotate(4deg); }

.servi-assistant-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1rem .85rem .6rem;
  background:
    linear-gradient(rgba(247,250,255,.92), rgba(247,250,255,.92)),
    radial-gradient(circle at 20% 20%, rgba(18, 130, 255, .08), transparent 28%);
  scrollbar-width: thin;
  scrollbar-color: #b9cae2 transparent;
}

.servi-assistant-message {
  display: flex;
  align-items: flex-end;
  gap: .48rem;
  margin-bottom: .82rem;
  animation: serviAssistantMessage .22s ease both;
}
.servi-assistant-message.is-user { justify-content: flex-end; }
.servi-assistant-message-avatar {
  flex: 0 0 31px;
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  overflow: hidden;
  border: 1px solid #d7e2ef;
  border-radius: 50%;
  background: #fff;
}
.servi-assistant-message-avatar img { width: 30px; height: 30px; object-fit: contain; }
.servi-assistant-bubble {
  max-width: 82%;
  padding: .72rem .82rem .48rem;
  border: 1px solid #dbe5f1;
  border-radius: 17px 17px 17px 5px;
  background: #fff;
  color: #23344e;
  box-shadow: 0 4px 13px rgba(20, 53, 91, .07);
}
.servi-assistant-message.is-user .servi-assistant-bubble {
  border-color: transparent;
  border-radius: 17px 17px 5px 17px;
  background: linear-gradient(135deg, #0b69ee, #0754c2);
  color: #fff;
}
.servi-assistant-bubble p { margin: 0; font-size: .83rem; line-height: 1.45; }
.servi-assistant-bubble time { display: block; margin-top: .35rem; color: #8a98aa; font-size: .59rem; text-align: right; }
.servi-assistant-message.is-user .servi-assistant-bubble time { color: rgba(255,255,255,.68); }

.servi-assistant-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .62rem;
}
.servi-assistant-actions a {
  display: inline-flex;
  align-items: center;
  gap: .34rem;
  padding: .38rem .55rem;
  border: 1px solid #bad3f4;
  border-radius: 999px;
  background: #f4f9ff;
  color: #0758c7;
  font-size: .69rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}
.servi-assistant-actions a:hover { background: #e4f1ff; border-color: #86b6ed; }

.servi-assistant-message.is-typing .servi-assistant-bubble {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 58px;
  min-height: 40px;
  padding: .68rem .82rem;
}
.servi-assistant-message.is-typing .servi-assistant-bubble > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7e9abc;
  animation: serviAssistantTyping 1.1s ease-in-out infinite;
}
.servi-assistant-message.is-typing .servi-assistant-bubble > span:nth-child(2) { animation-delay: .14s; }
.servi-assistant-message.is-typing .servi-assistant-bubble > span:nth-child(3) { animation-delay: .28s; }

.servi-assistant-quick {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .42rem;
  padding: .65rem .72rem;
  border-top: 1px solid #e5ebf3;
  background: #fff;
}
.servi-assistant-quick button {
  display: grid;
  justify-items: center;
  gap: .28rem;
  min-width: 0;
  min-height: 54px;
  padding: .44rem .25rem;
  border: 1px solid #d9e5f2;
  border-radius: 12px;
  background: #f7faff;
  color: #33506f;
  font-size: .62rem;
  font-weight: 700;
  transition: transform .17s ease, border-color .17s ease, color .17s ease, background .17s ease;
}
.servi-assistant-quick button i { color: var(--assistant-primary); font-size: .95rem; }
.servi-assistant-quick button:hover { transform: translateY(-2px); border-color: #9fc6f5; background: #edf6ff; color: #0757bd; }

.servi-assistant-form {
  display: grid;
  grid-template-columns: 1fr 42px;
  align-items: end;
  gap: .45rem;
  padding: .62rem .7rem .45rem;
  border-top: 1px solid #e4ebf3;
  background: #fff;
}
.servi-assistant-form textarea {
  width: 100%;
  min-height: 42px;
  max-height: 96px;
  resize: none;
  overflow-y: auto;
  padding: .62rem .75rem;
  border: 1px solid #cfdcea;
  border-radius: 14px;
  outline: 0;
  background: #f9fbfe;
  color: #20334e;
  font: inherit;
  font-size: .8rem;
  line-height: 1.35;
}
.servi-assistant-form textarea:focus { border-color: #6ca7ee; box-shadow: 0 0 0 3px rgba(25, 114, 226, .12); }
.servi-assistant-form button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(145deg, #1677f2, #0755c6);
  color: #fff;
  box-shadow: 0 5px 12px rgba(11, 103, 240, .25);
}
.servi-assistant-form button:hover { filter: brightness(1.06); transform: translateY(-1px); }
.servi-assistant-form button:disabled { opacity: .58; cursor: wait; transform: none; }
.servi-assistant-disclaimer { margin: 0; padding: 0 .8rem .55rem; background: #fff; color: #8b96a6; font-size: .57rem; text-align: center; }

[data-bs-theme="dark"] .servi-assistant {
  --assistant-surface: #101b2e;
  --assistant-ink: #eef5ff;
}
[data-bs-theme="dark"] .servi-assistant-hint { border-color: #315071; background: rgba(18,31,50,.98); color: #f2f7ff; }
[data-bs-theme="dark"] .servi-assistant-hint span { color: #aebdd0; }
[data-bs-theme="dark"] .servi-assistant-body { background: #0d1727; }
[data-bs-theme="dark"] .servi-assistant-bubble { border-color: #2b405a; background: #17263a; color: #eaf2fb; }
[data-bs-theme="dark"] .servi-assistant-quick,
[data-bs-theme="dark"] .servi-assistant-form,
[data-bs-theme="dark"] .servi-assistant-disclaimer { border-color: #293b52; background: #101b2e; }
[data-bs-theme="dark"] .servi-assistant-quick button { border-color: #30455f; background: #17263a; color: #c7d5e7; }
[data-bs-theme="dark"] .servi-assistant-form textarea { border-color: #30455f; background: #132238; color: #eef5ff; }

@keyframes serviAssistantFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
@keyframes serviAssistantWave {
  0%, 78%, 100% { transform: rotate(0deg) scale(1); }
  82% { transform: rotate(-3deg) scale(1.02); }
  87% { transform: rotate(3deg) scale(1.02); }
  92% { transform: rotate(-2deg) scale(1.01); }
}
@keyframes serviAssistantPulse {
  0% { opacity: .8; transform: scale(.94); }
  75%, 100% { opacity: 0; transform: scale(1.33); }
}
@keyframes serviAssistantMessage {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes serviAssistantTyping {
  0%, 60%, 100% { transform: translateY(0); opacity: .45; }
  30% { transform: translateY(-4px); opacity: 1; }
}

@media (max-width: 991.98px) {
  .servi-assistant {
    right: max(14px, env(safe-area-inset-right));
    bottom: calc(82px + env(safe-area-inset-bottom));
  }
  .servi-assistant-launcher { width: 72px; height: 72px; }
  .servi-assistant-launcher img { width: 64px; height: 64px; }
  .servi-assistant-panel {
    bottom: 84px;
    height: min(580px, calc(100vh - 178px));
  }
  .servi-assistant-hint { right: 84px; bottom: 12px; }
}

@media (max-width: 575.98px) {
  .servi-assistant {
    left: 10px;
    right: 10px;
    bottom: calc(78px + env(safe-area-inset-bottom));
    pointer-events: none;
  }
  .servi-assistant-launcher {
    position: absolute;
    right: 4px;
    bottom: 0;
    width: 67px;
    height: 67px;
    pointer-events: auto;
  }
  .servi-assistant-launcher img { width: 59px; height: 59px; }
  .servi-assistant-online { width: 14px; height: 14px; }
  .servi-assistant-hint {
    right: 78px;
    bottom: 6px;
    min-width: 166px;
    pointer-events: auto;
  }
  .servi-assistant-panel {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    width: auto;
    height: min(620px, calc(100dvh - 92px));
    min-height: 430px;
    border-radius: 21px;
    transform-origin: right bottom;
    pointer-events: auto;
  }
  .servi-assistant-header { min-height: 68px; grid-template-columns: 43px 1fr 36px; padding: .68rem .75rem; }
  .servi-assistant-header-avatar { width: 43px; height: 43px; }
  .servi-assistant-header-avatar img { width: 39px; height: 39px; }
  .servi-assistant-body { padding: .85rem .65rem .45rem; }
  .servi-assistant-bubble { max-width: 86%; }
  .servi-assistant-quick { padding: .55rem .55rem; gap: .32rem; }
  .servi-assistant-quick button { min-height: 50px; font-size: .57rem; }
  .servi-assistant-form { padding: .55rem .58rem .4rem; }
}

@media (prefers-reduced-motion: reduce) {
  .servi-assistant-launcher,
  .servi-assistant-launcher img,
  .servi-assistant-pulse,
  .servi-assistant-message,
  .servi-assistant-message.is-typing .servi-assistant-bubble > span {
    animation: none !important;
  }
  .servi-assistant-panel,
  .servi-assistant-hint { transition-duration: .01ms !important; }
}


/* ==========================================================
   v2.30 — Refinamiento responsive de biblioteca, productos,
   slider, certificados y detalle comercial
   ========================================================== */

/* Evita que acciones compactas conviertan palabras en columnas. */
.download-card-actions .btn,
.admin-product-mobile-actions .btn,
.admin-mobile-disclosure-actions .btn {
  min-width: 0;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

/* Mi cuenta: biblioteca y descargas. */
.download-card-copy { min-width: 0; }
.download-card-copy h3,
.download-card-copy p,
.download-card-copy small { overflow-wrap: anywhere; }
.download-card-actions {
  align-items: stretch;
}
.download-card-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .42rem;
  min-height: 42px;
}

/* Productos administrativos en móvil. */
.admin-product-category-tabs {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: .85rem;
  padding: .45rem;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  border: 1px solid var(--bs-border-color);
  border-radius: 14px;
  background: var(--bs-body-bg);
  box-shadow: 0 8px 24px rgba(16,24,40,.045);
}
.admin-product-category-tab {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 38px;
  padding: .48rem .75rem;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--bs-secondary-color);
  font-size: .82rem;
  font-weight: 750;
  line-height: 1.15;
  text-decoration: none;
  white-space: nowrap;
}
.admin-product-category-tab:hover {
  border-color: color-mix(in srgb, var(--brand) 38%, var(--bs-border-color));
  color: var(--brand);
  background: var(--brand-soft);
}
.admin-product-category-tab.active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}
.admin-product-mobile-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
  width: 100%;
}
.admin-product-mobile-actions form { min-width: 0; margin: 0; }
.admin-product-mobile-actions .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  width: 100%;
  min-height: 42px;
  padding: .55rem .65rem;
  font-size: .78rem;
}
.admin-product-mobile-actions .btn i { flex: 0 0 auto; }
.admin-product-mobile-actions .btn span { min-width: 0; }

/* Registros desplegables (+ / −) para tablas administrativas. */
.admin-mobile-disclosure-list {
  display: grid;
  gap: .75rem;
}
.admin-mobile-disclosure {
  overflow: hidden;
  border: 1px solid var(--bs-border-color);
  border-radius: 15px;
  background: var(--bs-body-bg);
  box-shadow: 0 8px 24px rgba(16,24,40,.05);
}
.admin-mobile-disclosure > summary {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: .25rem .65rem;
  min-height: 76px;
  padding: .72rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.admin-mobile-disclosure > summary::-webkit-details-marker { display: none; }
.admin-mobile-disclosure > summary:focus-visible {
  outline: 3px solid rgba(13,110,253,.24);
  outline-offset: -3px;
}
.admin-mobile-disclosure-thumb,
.certificate-mobile-icon {
  grid-column: 1;
  grid-row: 1 / 3;
  width: 60px;
  height: 54px;
  border: 1px solid var(--bs-border-color);
  border-radius: 10px;
  background: var(--soft);
}
.admin-mobile-disclosure-thumb { object-fit: cover; }
.certificate-mobile-icon {
  display: grid;
  place-items: center;
  color: var(--brand);
  font-size: 1.35rem;
}
.admin-mobile-disclosure-main {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}
.admin-mobile-disclosure-main strong,
.admin-mobile-disclosure-main small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}
.admin-mobile-disclosure-main strong {
  font-size: .86rem;
  line-height: 1.25;
}
.admin-mobile-disclosure-main small {
  margin-top: .12rem;
  color: var(--bs-secondary-color);
  font-size: .69rem;
  line-height: 1.25;
}
.admin-mobile-disclosure > summary > .badge {
  grid-column: 2;
  grid-row: 2;
  justify-self: start;
  max-width: 100%;
}
.admin-mobile-disclosure-toggle {
  grid-column: 3;
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--bs-border-color);
  border-radius: 50%;
  background: var(--soft);
  color: var(--brand);
  font-size: 1.05rem;
  font-weight: 900;
}
.admin-mobile-disclosure-toggle::before { content: "+"; }
.admin-mobile-disclosure[open] .admin-mobile-disclosure-toggle::before { content: "−"; }
.admin-mobile-disclosure[open] > summary {
  border-bottom: 1px solid var(--bs-border-color);
  background: color-mix(in srgb, var(--soft) 72%, transparent);
}
.admin-mobile-disclosure-body { padding: .85rem; }
.admin-mobile-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: .7rem;
  margin: 0;
}
.admin-mobile-detail-grid > div {
  min-width: 0;
  padding: .65rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 11px;
  background: var(--soft);
}
.admin-mobile-detail-grid dt {
  margin-bottom: .22rem;
  color: var(--bs-secondary-color);
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .045em;
}
.admin-mobile-detail-grid dd {
  margin: 0;
  font-size: .78rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.admin-mobile-detail-grid dd small { display: block; color: var(--bs-secondary-color); }
.admin-mobile-disclosure-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
  margin-top: .8rem;
}
.admin-mobile-disclosure-actions form { min-width: 0; margin: 0; }
.admin-mobile-disclosure-actions .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .42rem;
  width: 100%;
  min-height: 41px;
  padding: .5rem .6rem;
  font-size: .76rem;
}
.certificate-mobile-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  overflow-wrap: anywhere;
}

/* Paginación común para listados administrativos extensos. */
.admin-pagination-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .85rem;
  margin-top: 1rem;
  padding-top: .85rem;
  border-top: 1px solid var(--bs-border-color);
}
.admin-pagination-shell .page-link {
  min-width: 34px;
  text-align: center;
  white-space: nowrap;
}

@media (max-width: 575.98px) {
  .admin-product-category-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-inline: -.15rem;
    padding: .38rem;
    overflow: visible;
  }
  .admin-product-category-tab {
    width: 100%;
    min-width: 0;
    min-height: 36px;
    padding: .42rem .65rem;
    font-size: .76rem;
    line-height: 1.2;
    white-space: normal;
  }
  .admin-product-category-tab span {
    min-width: 0;
    overflow-wrap: anywhere;
    text-align: left;
  }
  .admin-pagination-shell {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .admin-pagination-shell .pagination {
    gap: .18rem;
  }
  .admin-pagination-shell .page-link {
    padding: .38rem .55rem;
    font-size: .74rem;
  }
}

/* Detalle comercial del producto: menos espacio y oferta completa. */
.product-detail-page {
  padding-top: 2rem !important;
  padding-bottom: 2rem !important;
}
.product-detail-page > .row {
  --bs-gutter-x: 2rem;
  --bs-gutter-y: 1.25rem;
}
.product-detail-page .col-lg-4 {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
.product-detail-page .product-detail-cover {
  width: min(100%, 310px);
  max-height: 410px;
  margin-inline: auto;
}
.product-detail-page h1 {
  margin: .28rem 0 .35rem;
  line-height: 1.08;
}
.product-detail-page .lead { margin-bottom: .75rem; }
.product-detail-price-box {
  display: grid;
  justify-items: start;
  gap: .16rem;
  margin: .55rem 0 .75rem;
}
.product-detail-price-reference {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .45rem;
  color: var(--bs-secondary-color);
  font-size: .78rem;
}
.product-detail-price-reference del { font-weight: 700; }
.product-detail-discount {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: .18rem .48rem;
  border-radius: 999px;
  background: #fee4e2;
  color: #b42318;
  font-size: .7rem;
  font-weight: 850;
}
.product-detail-offer-label {
  color: #d92d20;
  font-size: .68rem;
  font-weight: 850;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.product-detail-price-box .price-xl {
  margin: 0;
  line-height: 1.05;
}
.product-detail-page .product-meta { gap: .48rem; }
.product-detail-page .product-meta span { padding: .42rem .65rem; font-size: .78rem; }
.product-detail-page .product-detail-actions { margin-block: 1rem !important; }
.product-detail-page .download-conditions { margin-top: .75rem; }
.product-detail-page .product-information { margin-top: 1rem; }
[data-bs-theme="dark"] .product-detail-discount { background: #55160f; color: #fda29b; }

@media (max-width: 767.98px) {
  .account-panel { padding: .8rem; }
  .account-panel-heading { margin-bottom: .85rem; }
  .download-card {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: .65rem;
    padding: .78rem;
  }
  .download-icon { width: 42px; height: 42px; border-radius: 12px; }
  .download-card-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: .5rem;
    width: 100%;
  }
  .download-card-actions .btn {
    width: 100%;
    min-height: 40px;
    padding: .48rem .55rem;
    font-size: .75rem;
  }

  .admin-product-mobile-card {
    gap: .68rem;
    padding: .78rem;
    border-radius: 15px;
  }
  .admin-product-mobile-cover { width: 76px; height: 88px; }
  .admin-product-mobile-copy h2 { margin-top: .3rem; }
  .admin-mobile-price { margin-top: .38rem; }

  .page-admin-banners .content-box,
  .page-admin-certificates .content-box { box-shadow: none; }

  .product-detail-page {
    padding-top: 1.25rem !important;
    padding-bottom: 1.5rem !important;
  }
  .product-detail-page > .row { --bs-gutter-y: 1rem; }
  .product-detail-page .product-detail-cover {
    width: min(72vw, 250px);
    max-height: 335px;
  }
  .product-detail-page h1 { font-size: clamp(1.72rem, 8vw, 2.15rem); }
  .product-detail-page .lead { font-size: .95rem; }
  .product-detail-price-box { margin-top: .45rem; }
  .product-detail-page .product-detail-actions { margin-block: .8rem !important; gap: .55rem; }
  .product-detail-page .product-detail-actions .btn { min-height: 44px; font-size: .86rem; }

  /* Reduce la superposición del asistente en Mi cuenta. */
  body.page-account .servi-assistant-launcher {
    width: 56px;
    height: 56px;
  }
  body.page-account .servi-assistant-launcher img {
    width: 50px;
    height: 50px;
  }
  body.page-account .servi-assistant-hint { display: none !important; }
}

@media (max-width: 359.98px) {
  .download-card-actions,
  .admin-product-mobile-actions,
  .admin-mobile-disclosure-actions,
  .admin-mobile-detail-grid {
    grid-template-columns: 1fr;
  }
  .admin-mobile-disclosure > summary {
    grid-template-columns: 52px minmax(0,1fr) auto;
    gap: .25rem .48rem;
    padding: .62rem;
  }
  .admin-mobile-disclosure-thumb,
  .certificate-mobile-icon { width: 52px; height: 48px; }
  .admin-mobile-disclosure-main strong { font-size: .8rem; }
  .admin-mobile-disclosure-main small { font-size: .64rem; }
  .admin-mobile-disclosure-toggle { width: 29px; height: 29px; }
}

/* ==========================================================
   V2.31 - Boletas y facturas manuales, preparadas para SUNAT
   ========================================================== */
.billing-choice {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 18px;
  background: color-mix(in srgb, var(--soft) 82%, transparent);
}
.billing-choice-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .85rem;
}
.billing-choice-heading > i {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: color-mix(in srgb, var(--brand) 13%, transparent);
  color: var(--brand);
  font-size: 1.05rem;
}
.billing-type-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .65rem;
}
.billing-type-option { min-width: 0; cursor: pointer; }
.billing-type-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.billing-type-option span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .48rem;
  min-height: 46px;
  padding: .62rem .7rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 13px;
  background: var(--bs-body-bg);
  font-size: .82rem;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.billing-type-option input:checked + span {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent);
  color: var(--brand);
}
.billing-type-option:hover span { transform: translateY(-1px); }
.billing-fields {
  margin-top: .85rem;
  padding-top: .85rem;
  border-top: 1px dashed var(--bs-border-color);
}
.billing-fields[hidden] { display: none !important; }
.billing-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: .22rem .58rem;
  border-radius: 999px;
  background: var(--soft);
  color: var(--bs-secondary-color);
  font-size: .68rem;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
}
.billing-status-pending_data,
.billing-status-pending_issue,
.billing-status-preparing { background: #fff4d6; color: #8a5300; }
.billing-status-issued,
.billing-status-sent { background: #dcfae6; color: #067647; }
.billing-status-observed,
.billing-status-cancelled { background: #fee4e2; color: #b42318; }
[data-bs-theme="dark"] .billing-status-pending_data,
[data-bs-theme="dark"] .billing-status-pending_issue,
[data-bs-theme="dark"] .billing-status-preparing { background: #4b3510; color: #ffd98a; }
[data-bs-theme="dark"] .billing-status-issued,
[data-bs-theme="dark"] .billing-status-sent { background: #123f2b; color: #75e0a7; }
[data-bs-theme="dark"] .billing-status-observed,
[data-bs-theme="dark"] .billing-status-cancelled { background: #55160f; color: #fda29b; }

.billing-header,
.billing-status-summary,
.billing-issued-card,
.billing-help-card,
.billing-admin-summary {
  padding: 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 16px;
  background: var(--bs-body-bg);
}
.billing-status-summary { display: grid; gap: .65rem; }
.billing-issued-card { background: color-mix(in srgb, #12b76a 7%, var(--bs-body-bg)); }
.billing-help-card { background: color-mix(in srgb, var(--brand) 6%, var(--bs-body-bg)); }
.billing-filters { margin-bottom: 1rem; }
.billing-admin-card {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  padding: 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 17px;
  background: var(--bs-body-bg);
  box-shadow: 0 10px 25px rgba(16,24,40,.06);
}
.billing-admin-card-head {
  display: grid;
  grid-template-columns: 46px minmax(0,1fr) auto;
  align-items: center;
  gap: .7rem;
}
.billing-document-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: color-mix(in srgb, var(--brand) 13%, transparent);
  color: var(--brand);
}
.billing-card-data {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: .55rem;
  margin: 0;
}
.billing-card-data > div {
  min-width: 0;
  padding: .62rem;
  border-radius: 11px;
  background: var(--soft);
}
.billing-card-data dt {
  margin-bottom: .15rem;
  color: var(--bs-secondary-color);
  font-size: .62rem;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.billing-card-data dd { margin: 0; font-size: .78rem; overflow-wrap: anywhere; }
.billing-email-history {
  display: grid;
  gap: .55rem;
  margin-top: .75rem;
}
.billing-email-history > div {
  padding: .72rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
}

@media (max-width: 767.98px) {
  .billing-choice { padding: .8rem; border-radius: 15px; }
  .billing-choice-heading { align-items: flex-start; }
  .billing-choice-heading > i { flex-basis: 38px; width: 38px; height: 38px; }
  .billing-type-options { grid-template-columns: 1fr; gap: .5rem; }
  .billing-type-option span { justify-content: flex-start; min-height: 42px; }
  .billing-fields { margin-top: .7rem; padding-top: .7rem; }
  .billing-customer-page,
  .admin-billing-page,
  .admin-billing-form-page { padding-top: 1rem !important; }
  .billing-admin-card { padding: .8rem; }
  .billing-admin-card-head { grid-template-columns: 40px minmax(0,1fr); }
  .billing-admin-card-head .billing-status { grid-column: 1 / -1; justify-self: start; }
  .billing-document-icon { width: 40px; height: 40px; }
}

@media (max-width: 359.98px) {
  .billing-card-data { grid-template-columns: 1fr; }
}

/* =========================================================
   Versión 2.32: contraste y legibilidad de cabeceras claras
   ========================================================= */
/*
 * Utilidad reutilizable para páginas cuyo encabezado usa un fondo claro.
 * Evita heredar el texto blanco del componente base .page-header.
 */
.page-header.page-header-light {
  position: relative;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid rgba(35, 87, 217, .12);
  border-radius: 0;
  background:
    radial-gradient(circle at 88% 18%, rgba(41, 98, 255, .16), transparent 31%),
    linear-gradient(135deg, #ffffff 0%, #f5f8ff 58%, #eef3ff 100%);
  color: #101828;
  box-shadow: none;
}
.page-header.page-header-light > .container {
  position: relative;
  z-index: 1;
}
.page-header.page-header-light .eyebrow {
  color: #175cd3;
}
.page-header.page-header-light h1 {
  color: #101828;
}
.page-header.page-header-light p {
  max-width: 780px;
  color: #475467;
}

/* El checkout necesita una cabecera visible, pero más compacta. */
.checkout-page-header.page-header-light {
  padding: 2.25rem 0;
}

/* La solicitud de boleta/factura reutilizaba una tarjeta blanca como cabecera. */
.billing-header.page-header-light {
  padding: 2.35rem 0;
}

/* Mantiene contraste equivalente cuando el usuario activa el modo oscuro. */
[data-bs-theme="dark"] .page-header.page-header-light {
  border-bottom-color: rgba(143, 180, 255, .16);
  background:
    radial-gradient(circle at 88% 18%, rgba(74, 125, 255, .22), transparent 31%),
    linear-gradient(135deg, #0f1728 0%, #151f35 58%, #1a2743 100%);
  color: #f8fafc;
}
[data-bs-theme="dark"] .page-header.page-header-light .eyebrow {
  color: #9fbcff;
}
[data-bs-theme="dark"] .page-header.page-header-light h1 {
  color: #f8fafc;
}
[data-bs-theme="dark"] .page-header.page-header-light p {
  color: #cbd5e1;
}

@media (max-width: 767.98px) {
  .checkout-page-header.page-header-light,
  .billing-header.page-header-light {
    padding: 1.7rem 0;
  }
  .page-header.page-header-light h1 {
    margin-top: .25rem;
    margin-bottom: .35rem;
  }
  .page-header.page-header-light p {
    font-size: .95rem;
    line-height: 1.48;
  }
}

@media (prefers-contrast: more) {
  .page-header.page-header-light {
    border-bottom-color: currentColor;
  }
  .page-header.page-header-light .eyebrow,
  .page-header.page-header-light h1,
  .page-header.page-header-light p {
    color: currentColor;
  }
}


/* =========================================================
   Versión 2.34: métodos de pago contraíbles y exclusivos
   ========================================================= */
.payment-method-accordion {
  display: grid;
  gap: 1rem;
}
.payment-method-card {
  padding: 0;
  overflow: visible;
  border-color: var(--bs-border-color);
  box-shadow: 0 8px 24px rgba(16, 24, 40, .045);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.payment-method-card.is-active {
  border-color: rgba(41, 98, 255, .5);
  box-shadow: 0 12px 34px rgba(41, 98, 255, .12), 0 0 0 3px rgba(41, 98, 255, .07);
}
.payment-method-card.is-disabled {
  opacity: .72;
  box-shadow: none;
}
.payment-method-toggle {
  width: 100%;
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 1.25rem;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: var(--bs-body-color);
  text-align: left;
  cursor: pointer;
}
.payment-method-toggle:hover:not(:disabled) {
  background: rgba(41, 98, 255, .035);
}
.payment-method-toggle:focus-visible {
  outline: 3px solid rgba(41, 98, 255, .3);
  outline-offset: -3px;
}
.payment-method-toggle:disabled {
  cursor: not-allowed;
}
.payment-method-toggle-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: .9rem;
}
.payment-method-icon {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  font-size: 1.2rem;
}
.payment-method-icon-automatic {
  color: #175cd3;
  background: rgba(41, 98, 255, .11);
}
.payment-method-icon-manual {
  color: #087f5b;
  background: rgba(25, 135, 84, .12);
}
.payment-method-icon-yape {
  color: #5b21b6;
  background: rgba(124, 58, 237, .12);
}
.payment-method-toggle-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .12rem;
}
.payment-method-toggle-copy .eyebrow {
  margin: 0;
  font-size: .66rem;
  line-height: 1.2;
}
.payment-method-toggle-copy strong {
  font-size: 1.06rem;
  line-height: 1.3;
}
.payment-method-toggle-copy small {
  color: var(--bs-secondary-color);
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.payment-method-toggle-state {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: .7rem;
}
.payment-method-selected-label {
  display: none;
  padding: .35rem .6rem;
  border-radius: 999px;
  color: #175cd3;
  background: rgba(41, 98, 255, .09);
  font-size: .72rem;
  font-weight: 800;
  white-space: nowrap;
}
.payment-method-card.is-active .payment-method-selected-label {
  display: inline-flex;
}
.payment-method-toggle-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--bs-border-color);
  border-radius: 50%;
  color: var(--bs-secondary-color);
  background: var(--bs-body-bg);
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
}
.payment-method-card.is-active .payment-method-toggle-icon {
  border-color: rgba(41, 98, 255, .28);
  color: #175cd3;
  background: rgba(41, 98, 255, .08);
}
.payment-method-panel {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  visibility: hidden;
  border-top: 0 solid transparent;
  transition: grid-template-rows .28s ease, opacity .2s ease, visibility 0s linear .28s, border-color .2s ease;
}
.payment-method-panel.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
  visibility: visible;
  border-top-width: 1px;
  border-top-color: var(--bs-border-color);
  transition: grid-template-rows .28s ease, opacity .22s ease, visibility 0s linear 0s, border-color .2s ease;
}
.payment-method-panel-inner {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.payment-method-panel.is-open .payment-method-panel-inner {
  overflow: visible;
}
.payment-method-panel-content {
  padding: 1.25rem;
}
.payment-method-panel-inner > form {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  padding-bottom: 1.25rem;
}
.payment-method-panel .mp-checkout-heading-compact {
  margin-bottom: 1rem;
}
.payment-method-panel .mp-checkout-heading-compact h2 {
  color: var(--bs-body-color);
}
.payment-method-accordion.is-payment-processing .payment-method-toggle {
  cursor: wait;
  opacity: .72;
}
[data-bs-theme="dark"] .payment-method-card.is-active {
  border-color: rgba(126, 162, 255, .56);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .28), 0 0 0 3px rgba(82, 126, 255, .1);
}
[data-bs-theme="dark"] .payment-method-toggle:hover:not(:disabled) {
  background: rgba(126, 162, 255, .07);
}
[data-bs-theme="dark"] .payment-method-icon-automatic,
[data-bs-theme="dark"] .payment-method-selected-label,
[data-bs-theme="dark"] .payment-method-card.is-active .payment-method-toggle-icon {
  color: #9fbcff;
  background: rgba(74, 125, 255, .15);
}
[data-bs-theme="dark"] .payment-method-icon-manual {
  color: #75d6b2;
  background: rgba(25, 135, 84, .18);
}
[data-bs-theme="dark"] .payment-method-icon-yape {
  color: #c4b5fd;
  background: rgba(139, 92, 246, .2);
}

.mp-yape-card {
  position: relative;
}

.mp-yape-card.is-processing {
  pointer-events: none;
}

.yape-automatic-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem 1rem;
  border: 1px solid rgba(124, 58, 237, .2);
  border-radius: .9rem;
  background: rgba(124, 58, 237, .055);
}

.yape-automatic-summary span {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: var(--bs-secondary-color);
}

.yape-automatic-summary strong {
  color: var(--bs-body-color);
  font-size: 1.05rem;
  white-space: nowrap;
}

.yape-automatic-actions {
  display: flex;
  justify-content: center;
}

.yape-automatic-actions .btn {
  width: auto;
  min-width: 168px;
  justify-content: center;
}

@media (max-width: 767.98px) {
  .payment-method-accordion { gap: .8rem; }
  .payment-method-toggle {
    min-height: 84px;
    padding: .95rem 1rem;
    gap: .65rem;
  }
  .payment-method-toggle-main { gap: .7rem; }
  .payment-method-icon {
    flex-basis: 43px;
    width: 43px;
    height: 43px;
    border-radius: 13px;
    font-size: 1.05rem;
  }
  .payment-method-toggle-copy strong { font-size: 1rem; }
  .payment-method-toggle-copy small { font-size: .78rem; }
  .payment-method-selected-label { display: none !important; }
  .payment-method-toggle-icon {
    width: 32px;
    height: 32px;
  }
  .payment-method-panel-content {
    padding: 1rem;
  }
  .payment-method-panel-inner > form {
    padding-left: 1rem;
    padding-right: 1rem;
    padding-bottom: 1rem;
  }
}

@media (max-width: 389.98px) {
  .payment-method-toggle {
    min-height: 78px;
    padding: .85rem;
  }
  .payment-method-icon {
    flex-basis: 39px;
    width: 39px;
    height: 39px;
  }
  .payment-method-toggle-copy .eyebrow { font-size: .6rem; }
  .payment-method-toggle-copy small { font-size: .73rem; }
  .payment-method-toggle-icon {
    width: 30px;
    height: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .payment-method-card,
  .payment-method-toggle-icon,
  .payment-method-panel {
    transition: none;
  }
}

/* ================================================================
   V2.35 · Avisos de nuevos productos y suscripción voluntaria
   ================================================================ */
.newsletter-consent-box {
    border: 1px solid rgba(23, 105, 255, .22);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(23, 105, 255, .07), rgba(66, 198, 255, .05));
    padding: .9rem 1rem;
}

.product-newsletter-admin-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1rem;
    align-items: flex-start;
    padding: 1.15rem;
    border: 1px solid rgba(23, 105, 255, .22);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(23, 105, 255, .065), rgba(255, 255, 255, .94));
}

.product-newsletter-admin-icon,
.newsletter-stat-icon,
.newsletter-unsubscribe-icon {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 14px;
    background: rgba(23, 105, 255, .12);
    color: #175cd3;
    font-size: 1.15rem;
}

.product-newsletter-admin-content {
    min-width: 0;
}

.newsletter-settings-count {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 1px dashed rgba(23, 105, 255, .34);
    border-radius: 12px;
    background: rgba(23, 105, 255, .055);
    color: var(--bs-secondary-color);
}

.newsletter-settings-count strong {
    margin-right: .35rem;
    color: var(--bs-body-color);
    font-size: 1.15rem;
}

.newsletter-stat-card {
    display: flex;
    align-items: center;
    gap: .9rem;
}

.newsletter-stat-card div {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.newsletter-stat-card small {
    color: var(--bs-secondary-color);
}

.newsletter-stat-card strong {
    font-size: 1.55rem;
    line-height: 1.2;
}

.newsletter-empty-state {
    display: grid;
    justify-items: center;
    gap: .45rem;
    padding: 2.2rem 1rem;
    text-align: center;
    border: 1px dashed var(--bs-border-color);
    border-radius: 15px;
}

.newsletter-empty-state > i {
    font-size: 2rem;
    color: #175cd3;
}

.newsletter-campaign-table th {
    white-space: nowrap;
}

.newsletter-campaign-cards {
    display: grid;
    gap: .85rem;
}

.newsletter-campaign-card {
    padding: 1rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 15px;
    background: var(--bs-body-bg);
    box-shadow: 0 8px 24px rgba(16, 24, 40, .05);
}

.newsletter-campaign-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .55rem;
    margin-top: 1rem;
}

.newsletter-campaign-metrics span {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    padding: .65rem .35rem;
    border-radius: 11px;
    background: rgba(23, 105, 255, .055);
    text-align: center;
}

.newsletter-campaign-metrics small {
    color: var(--bs-secondary-color);
    font-size: .72rem;
}

.newsletter-campaign-metrics strong {
    font-size: 1.12rem;
}

.newsletter-delivery-list {
    display: grid;
    gap: .65rem;
}

.newsletter-delivery-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: .8rem;
    align-items: center;
    padding: .8rem .9rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
}

.newsletter-delivery-item > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.newsletter-delivery-item strong,
.newsletter-delivery-item small {
    overflow-wrap: anywhere;
}

.newsletter-unsubscribe-card {
    max-width: 620px;
    padding: clamp(1.5rem, 4vw, 2.6rem);
}

.newsletter-unsubscribe-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border-radius: 20px;
    font-size: 1.6rem;
}

.newsletter-unsubscribe-icon.is-success {
    background: rgba(6, 118, 71, .12);
    color: #067647;
}

[data-bs-theme="dark"] .auth-register-consent-box,
[data-bs-theme="dark"] .profile-consent-box,
[data-bs-theme="dark"] .newsletter-consent-box,
[data-bs-theme="dark"] .product-newsletter-admin-card {
    background: linear-gradient(135deg, rgba(23, 105, 255, .16), rgba(20, 27, 45, .94));
    border-color: rgba(96, 165, 250, .32);
}

[data-bs-theme="dark"] .newsletter-campaign-card {
    box-shadow: none;
}

@media (max-width: 575.98px) {
    .product-newsletter-admin-card {
        grid-template-columns: 1fr;
        gap: .7rem;
        padding: 1rem;
    }

    .product-newsletter-admin-icon {
        width: 40px;
        height: 40px;
    }

    .newsletter-delivery-item {
        grid-template-columns: 1fr;
        gap: .45rem;
    }

    .newsletter-delivery-status {
        width: max-content;
    }

    .newsletter-delivery-item > span:last-child {
        font-size: .8rem;
    }

    .newsletter-campaign-metrics small {
        font-size: .66rem;
    }
}


/* =========================================================
   Parche PagoEfectivo: compactación del Payment Brick
   ========================================================= */
.mp-checkout-card .billing-choice {
  margin-top: 1rem;
  margin-bottom: .35rem;
}
.mp-checkout-card .checkout-legal-consent {
  margin-top: .5rem !important;
}
.mp-checkout-card .mp-brick-container {
  margin-bottom: 0;
}


/* ================================================================
   V2.36 · Auditoría y corrección global del modo oscuro
   Mantiene blancos únicamente los documentos/QR/PDF que lo requieren.
   ================================================================ */
[data-bs-theme="dark"] {
  color-scheme: dark;
  --brand-dark: #b8c9ff;
  --brand-soft: #172442;
  --ink: #f8fafc;
  --soft: #111827;
  --danger: #f97066;
  --success: #75e0a7;
  --card-shadow: 0 14px 38px rgba(0, 0, 0, .32);
}

[data-bs-theme="dark"] body {
  background: #0b1220;
}

[data-bs-theme="dark"] :is(
  .product-card,
  .learning-course-card,
  .classroom-module,
  .content-box,
  .filter-bar,
  .auth-card,
  .stat-card,
  .admin-stat-card,
  .billing-admin-card,
  .newsletter-campaign-card,
  .legal-section
) {
  box-shadow: 0 10px 30px rgba(0, 0, 0, .22);
}

/* Variables propias que antes conservaban superficies claras. */
[data-bs-theme="dark"] :is(
  .module-number,
  .lesson-type-icon,
  .question-admin-list article > span,
  .lesson-status-icon,
  .cover-placeholder,
  .product-category,
  .price,
  .preview-label,
  .admin-product-placeholder,
  .admin-product-mobile-cover,
  .verification-result-icon,
  .verification-empty-result > i,
  .financial-snapshot-card > span,
  .financial-method-icon,
  .financial-panel-badge,
  .billing-choice-heading > i
) {
  color: #9fbcff;
}

[data-bs-theme="dark"] .learning-course-cover {
  background: linear-gradient(135deg, #172442, #282046);
  color: #9fbcff;
}

[data-bs-theme="dark"] :is(.product-detail-cover, .product-detail-page .product-detail-cover) {
  background: linear-gradient(145deg, #172033, #111827);
}

[data-bs-theme="dark"] .type-badge {
  background: rgba(17, 24, 39, .94);
  color: #e5e7eb;
  border: 1px solid rgba(148, 163, 184, .24);
}

[data-bs-theme="dark"] :is(.certificate-list-card > span, .certification-panel-icon) {
  background: #46340f;
  color: #ffd98a;
}

[data-bs-theme="dark"] .verification-icon {
  background: #172442;
  color: #9fbcff;
}

[data-bs-theme="dark"] .verification-card.invalid .verification-status-icon {
  background: #55160f;
  color: #fda29b;
}

[data-bs-theme="dark"] .banner-preview-frame {
  background: #162033;
}

[data-bs-theme="dark"] .banner-preview-placeholder {
  color: #aab6c7;
}

/* Checkout, comprobantes y campos del comprador. */
[data-bs-theme="dark"] .billing-choice {
  background: #121b2d;
  border-color: #344054;
}

[data-bs-theme="dark"] .billing-type-option span {
  background: #0f1728;
  border-color: #344054;
}

[data-bs-theme="dark"] .billing-type-option input:checked + span {
  color: #9fbcff;
  border-color: #7e9eff;
  background: rgba(74, 125, 255, .12);
  box-shadow: 0 0 0 3px rgba(74, 125, 255, .13);
}

[data-bs-theme="dark"] :is(
  .checkout-customer-fields,
  .checkout-legal-consent,
  .checkout-security-note,
  .mp-fallback,
  .payment-result-data > div,
  .payment-state-details div,
  .pending-order-summary .pending-order-number
) {
  background: #111a2b;
}

[data-bs-theme="dark"] :is(
  .form-control:disabled,
  .form-control[readonly],
  .form-select:disabled,
  input:disabled,
  textarea:disabled
) {
  color: #cbd5e1;
  background-color: #182235;
  border-color: #3b475b;
  opacity: 1;
}

[data-bs-theme="dark"] :is(.form-control, .form-select)::placeholder {
  color: #8390a4;
  opacity: 1;
}

/* Utilidades Bootstrap que permanecían visualmente claras. */
[data-bs-theme="dark"] .badge.text-bg-light {
  color: #e5e7eb !important;
  background-color: #253044 !important;
  border-color: #3b475b !important;
}

[data-bs-theme="dark"] .alert.alert-light {
  color: #dbe5f3;
  background: #172033;
  border-color: #3b475b;
}

[data-bs-theme="dark"] .order-status.status-pending {
  background: #4b3510;
  color: #ffd98a;
}

[data-bs-theme="dark"] .order-status.status-paid {
  background: #123f2b;
  color: #75e0a7;
}

[data-bs-theme="dark"] :is(.order-status.status-cancelled, .order-status.status-refunded) {
  background: #293241;
  color: #cbd5e1;
}

/* Visor protegido: interfaz oscura, páginas del documento en blanco. */
[data-bs-theme="dark"] .protected-pdf-viewer,
[data-bs-theme="dark"] .protected-pdf-viewer:fullscreen {
  background: #0f1728;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .34);
}

[data-bs-theme="dark"] .protected-pdf-status {
  background: #172442;
  color: #b8c9ff;
}

[data-bs-theme="dark"] .protected-pdf-status.is-error {
  background: #451526;
  color: #fda4af;
}

/* El certificado, los QR y las hojas PDF conservan blanco por legibilidad e impresión. */
[data-bs-theme="dark"] :is(
  .certificate-template-preview,
  .certificate-document,
  .certificate-border,
  .certificate-document-v2,
  .certificate-document-v2 .certificate-tech-frame,
  .payment-qr-preview img,
  .manual-payment-option img,
  .cert-payment-options img,
  .protected-pdf-stage canvas,
  .protected-pdf-sheet,
  .protected-pdf-sheet canvas
) {
  color-scheme: light;
}

@media (prefers-reduced-motion: reduce) {
  [data-bs-theme="dark"] * {
    scroll-behavior: auto;
  }
}

/* PagoEfectivo: estado interno, código CIP y Status Screen Brick. */
.pagoefectivo-guide {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: .8rem;
  padding: .9rem 1rem;
  border: 1px solid rgba(13, 110, 253, .2);
  border-radius: .9rem;
  background: rgba(13, 110, 253, .055);
}

.pagoefectivo-guide-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: .75rem;
  color: #175cd3;
  background: rgba(13, 110, 253, .12);
}

.pagoefectivo-guide ol {
  margin: 0 0 .55rem;
  padding-left: 1.15rem;
}

.pagoefectivo-guide li + li {
  margin-top: .3rem;
}

.pagoefectivo-guide p {
  color: var(--bs-secondary-color);
  font-size: .88rem;
}

.mp-status-screen-shell {
  margin-top: 1.25rem;
  padding: 1rem;
  border: 1px solid var(--border-color, #dfe5ec);
  border-radius: 1rem;
  background: var(--surface, #fff);
  overflow: hidden;
}

.mp-status-loading {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  color: var(--text-muted, #667085);
  text-align: center;
}

#statusScreenBrick_container {
  width: 100%;
  min-height: 1px;
}

.payment-code-row dd {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: .55rem;
}

.payment-code-value {
  display: inline-block;
  max-width: 100%;
  padding: .3rem .55rem;
  border: 1px dashed var(--border-color, #cfd7e3);
  border-radius: .55rem;
  background: var(--soft, #f4f7fb);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: .04em;
  overflow-wrap: anywhere;
}

.payment-code-copy {
  white-space: nowrap;
}

.payment-code-copy.is-copied {
  box-shadow: 0 0 0 .2rem rgba(25, 135, 84, .14);
}

.payment-state-actions form {
  display: inline-flex;
  margin: 0;
}

.payment-expiration-note {
  display: flex;
  align-items: flex-start;
  gap: .45rem;
  color: var(--text-muted, #667085);
  font-size: .92rem;
}

[data-bs-theme="dark"] .mp-status-screen-shell {
  background: #101a2c;
  border-color: #344054;
}

[data-bs-theme="dark"] .pagoefectivo-guide {
  border-color: rgba(111, 148, 255, .28);
  background: rgba(82, 126, 255, .1);
}

[data-bs-theme="dark"] .pagoefectivo-guide-icon {
  color: #9fbcff;
  background: rgba(82, 126, 255, .16);
}

[data-bs-theme="dark"] .payment-code-value {
  color: #e5edf8;
  background: #172235;
  border-color: #526078;
}

@media (max-width: 575.98px) {
  .pagoefectivo-guide {
    grid-template-columns: 1fr;
    padding: .8rem;
  }

  .yape-automatic-summary {
    align-items: flex-start;
    flex-direction: column;
    gap: .35rem;
  }

  .payment-code-row dd {
    justify-content: flex-start;
  }

  .payment-code-value {
    width: 100%;
  }

  .payment-state-actions,
  .payment-state-actions form,
  .payment-state-actions .btn {
    width: 100%;
  }

  .payment-state-actions .btn {
    justify-content: center;
  }

  .mp-status-screen-shell {
    padding: .65rem;
  }
}

/* ================================================================
   V2.37 · Payment Brick sincronizado con modo claro/oscuro
   El contenido interno de Mercado Pago se tematiza mediante su SDK.
   Estas reglas eliminan destellos blancos durante el desmontaje/render.
   ================================================================ */
.mp-brick-container,
#statusScreenBrick_container {
  border-radius: 16px;
  transition: background-color .18s ease, border-color .18s ease;
}

.mp-brick-container iframe,
#statusScreenBrick_container iframe {
  display: block;
  max-width: 100%;
  border-radius: 16px;
  background: transparent;
}

[data-mp-checkout].is-theme-refreshing .mp-brick-container,
[data-mp-status-screen].is-theme-refreshing #statusScreenBrick_container {
  min-height: 0;
  overflow: hidden;
}

[data-mp-checkout].is-theme-refreshing .mp-brick-container > *,
[data-mp-status-screen].is-theme-refreshing #statusScreenBrick_container > * {
  visibility: hidden;
}

[data-bs-theme="light"] .mp-brick-container,
[data-bs-theme="light"] #statusScreenBrick_container,
[data-bs-theme="light"] .mp-brick-loading {
  background: #ffffff;
}

[data-bs-theme="dark"] .mp-checkout-card .mp-brick-container,
[data-bs-theme="dark"] #statusScreenBrick_container,
[data-bs-theme="dark"] .mp-brick-loading {
  color-scheme: dark;
  color: #cbd5e1;
  background: #0f1728;
  border-color: #344054;
}

[data-bs-theme="dark"] .mp-brick-container iframe,
[data-bs-theme="dark"] #statusScreenBrick_container iframe {
  color-scheme: dark;
  background: #0f1728 !important;
}

[data-bs-theme="dark"] [data-mp-checkout].is-theme-refreshing .mp-brick-loading,
[data-bs-theme="dark"] [data-mp-status-screen].is-theme-refreshing .mp-status-loading {
  background: #0f1728;
  color: #cbd5e1;
  border-color: #344054;
}

@media (prefers-reduced-motion: reduce) {
  .mp-brick-container,
  #statusScreenBrick_container {
    transition: none;
  }
}

/* ================================================================
   V2.36 · Cupones y promociones
   ================================================================ */
.coupon-cart-card,
.cart-pricing-card,
.coupon-install-card,
.coupon-stat-card {
  border: 1px solid var(--bs-border-color);
}

.coupon-apply-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .75rem;
}

.coupon-applied-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 1px dashed rgba(var(--bs-success-rgb), .55);
  border-radius: 14px;
  background: rgba(var(--bs-success-rgb), .08);
}

.coupon-applied-row > div {
  display: flex;
  flex-direction: column;
}

.coupon-applied-row strong,
.coupon-code-badge {
  letter-spacing: .08em;
}

.coupon-code-badge {
  display: inline-flex;
  padding: .35rem .55rem;
  border-radius: .55rem;
  background: rgba(var(--bs-primary-rgb), .1);
  color: var(--bs-primary);
}

.cart-pricing-card > div,
.checkout-pricing-lines > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .45rem 0;
}

.cart-discount-line,
.checkout-discount-line {
  color: var(--bs-success);
}

.cart-total-line {
  margin-top: .45rem;
  padding-top: 1rem !important;
  border-top: 1px solid var(--bs-border-color);
  font-size: 1.15rem;
}

.coupon-install-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.coupon-stat-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.coupon-stat-card span {
  color: var(--bs-secondary-color);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.coupon-stat-card strong {
  font-size: 1.45rem;
}

.coupon-admin-table .badge {
  margin: .1rem .2rem .1rem 0;
}

.coupon-feature-check {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 14px;
}

.coupon-feature-check span {
  display: flex;
  flex-direction: column;
}

.coupon-feature-check small {
  color: var(--bs-secondary-color);
}

.coupon-selector[hidden] {
  display: none !important;
}

.coupon-choice-list {
  max-height: 320px;
  overflow: auto;
  display: grid;
  gap: .5rem;
  padding: .25rem;
}

.coupon-choice-list > label {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  padding: .75rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
  cursor: pointer;
}

.coupon-choice-list > label:hover {
  border-color: rgba(var(--bs-primary-rgb), .55);
  background: rgba(var(--bs-primary-rgb), .05);
}

.coupon-choice-list span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.coupon-choice-list strong,
.coupon-choice-list small {
  overflow-wrap: anywhere;
}

.coupon-choice-list small {
  color: var(--bs-secondary-color);
}

[data-bs-theme="dark"] .coupon-applied-row {
  background: rgba(var(--bs-success-rgb), .12);
}

[data-bs-theme="dark"] .coupon-code-badge {
  background: rgba(var(--bs-primary-rgb), .18);
}

@media (max-width: 575.98px) {
  .coupon-apply-form {
    grid-template-columns: 1fr;
  }

  .coupon-applied-row,
  .coupon-install-card {
    flex-direction: column;
  }

  .coupon-applied-row .btn,
  .coupon-applied-row form {
    width: 100%;
  }

  .coupon-applied-row .btn {
    justify-content: center;
  }
}

.pending-order-summary .checkout-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .45rem 0;
  font-size: .92rem;
}

.pending-order-summary .coupon-discount-row {
  color: var(--bs-success);
  border-bottom: 1px solid var(--bs-border-color);
  padding-bottom: .8rem;
}

/* ==========================================================
   v2.37 / parche V8 — Descarga inmediata y consumo visual
   ========================================================== */
.download-card {
  position: relative;
  grid-template-columns: 48px minmax(0, 1fr);
}

/* Biblioteca: las acciones siempre aparecen debajo de la informacion. */
.download-card-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-content: stretch;
  width: 100%;
}

.download-card-actions .btn,
.download-card-actions .download-state-chip {
  width: 100%;
}

.download-action-feedback {
  grid-column: 1 / -1;
}

.library-download-button[aria-busy="true"] {
  cursor: wait;
  opacity: .82;
}

.download-state-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 38px;
  padding: .45rem .75rem;
  border: 1px solid color-mix(in srgb, var(--bs-success) 38%, var(--bs-border-color));
  border-radius: .6rem;
  background: color-mix(in srgb, var(--bs-success) 10%, var(--bs-body-bg));
  color: var(--bs-success-text-emphasis);
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.download-state-chip i {
  flex: 0 0 auto;
}

.download-action-feedback {
  grid-column: 1 / -1;
  width: 100%;
  margin: -.15rem 0 0;
  padding: .55rem .7rem;
  border-radius: .6rem;
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.35;
}

.download-action-feedback.is-success {
  background: color-mix(in srgb, var(--bs-success) 10%, var(--bs-body-bg));
  color: var(--bs-success-text-emphasis);
}

.download-action-feedback.is-warning {
  background: color-mix(in srgb, var(--bs-warning) 14%, var(--bs-body-bg));
  color: var(--bs-warning-text-emphasis);
}

.download-action-feedback.is-error {
  background: color-mix(in srgb, var(--bs-danger) 10%, var(--bs-body-bg));
  color: var(--bs-danger-text-emphasis);
}

.download-transfer-frame {
  position: fixed !important;
  inset: auto auto 0 0 !important;
  width: 1px !important;
  height: 1px !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

[data-bs-theme="dark"] .download-state-chip,
[data-bs-theme="dark"] .download-action-feedback {
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .025);
}

@media (max-width: 767.98px) {
  .download-card {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .download-action-feedback {
    grid-column: 1 / -1;
  }

  .download-state-chip {
    width: 100%;
  }
}

/* ==========================================================
   V2.38 - Licencias, IGV y referencia monetaria
   ========================================================== */
.product-price-tax,
.product-price-usd {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin-top: .35rem;
  color: var(--bs-secondary-color);
  font-size: .82rem;
  font-weight: 650;
}
.product-price-usd { color: var(--brand-dark); }
.product-dual-price,
.product-card-dual-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  column-gap: .28em;
}
.product-dual-price .price-choice,
.product-card-dual-price .price-choice {
  color: var(--bs-secondary-color);
  font-size: .48em;
  font-weight: 750;
}
.product-dual-price .price-usd {
  font-size: .7em;
  font-weight: 800;
}
.product-card-dual-price .price-choice,
.product-card-dual-price .price-usd { font-size: .7em; }
.product-card-dual-price {
  flex-wrap: nowrap;
  white-space: nowrap;
}
.product-card-regular-price {
  display: block;
  color: var(--bs-secondary-color);
  font-size: .68rem;
  line-height: 1.25;
}
.product-card-regular-price .old-price { margin-left: .16rem; }
.catalog-product-item .product-card-footer {
  align-items: stretch;
  flex-direction: column;
}
.catalog-product-item .product-detail-button { width: 100%; }
.product-price-meta {
  display: block;
  margin-top: .18rem;
  color: var(--bs-secondary-color);
  font-size: .68rem;
  font-weight: 650;
  line-height: 1.25;
}
.product-purchase-form {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  align-items: end;
  gap: .75rem;
}
.course-certification-bundle,
.certification-option-card {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  width: 100%;
  padding: .8rem .9rem;
  border: 1px solid rgba(35,87,217,.22);
  border-radius: 14px;
  background: var(--brand-soft);
  cursor: pointer;
}
.course-certification-bundle { flex-basis: 100%; }
.course-certification-bundle .form-check-input,
.certification-option-card .form-check-input { flex: 0 0 auto; margin-top: .2rem; }
.course-certification-bundle span,
.certification-option-card span { display: grid; gap: .2rem; }
.course-certification-bundle strong,
.certification-option-card strong { color: var(--bs-body-color); font-size: .9rem; }
.course-certification-bundle small,
.certification-option-card small { color: var(--bs-secondary-color); line-height: 1.45; }
.course-certification-pending-notice {
  display: grid;
  grid-template-columns: 38px minmax(0,1fr);
  align-items: start;
  gap: .7rem;
  width: 100%;
  margin: 0;
  padding: .8rem;
}
.course-certification-pending-notice > i {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  color: #9a6700;
  background: rgba(255,255,255,.68);
}
.course-certification-pending-notice > div { display: grid; justify-items: start; gap: .28rem; min-width: 0; }
.course-certification-pending-notice strong { font-size: .9rem; }
.course-certification-pending-notice > div > span { color: var(--bs-secondary-color); font-size: .78rem; line-height: 1.4; }
.course-certification-pending-notice .btn { min-height: 34px; margin-top: .18rem; padding: .3rem .7rem; font-size: .76rem; }
[data-bs-theme="dark"] .course-certification-pending-notice > i { background: rgba(255,255,255,.1); }
.cert-lock.is-reserved { color: #067647; background: #d1fadf; font-weight: 750; }
[data-bs-theme="dark"] .cert-lock.is-reserved { color: #75e0a7; background: rgba(6,118,71,.24); }
.product-license-quantity {
  display: grid;
  gap: .28rem;
  min-width: 135px;
  color: var(--bs-secondary-color);
  font-size: .78rem;
  font-weight: 700;
}
.product-license-quantity .form-control {
  min-height: 48px;
  font-size: 1rem;
  font-weight: 750;
}
.cart-quantity-input { width: 86px; min-width: 70px; }
.cart-item-remove .btn span { display: none; }
.cart-update-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: .75rem;
}
.cart-update-status {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 38px;
  color: var(--bs-secondary-color);
  font-size: .78rem;
  font-weight: 700;
}
.cart-update-status[data-state="updating"] { color: var(--brand); }
.cart-update-status[data-state="success"] { color: #067647; }
.cart-update-status[data-state="error"] { color: #b42318; }
.cart-checkout-is-updating {
  pointer-events: none;
  opacity: .62;
}
.cart-fixed-quantity {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  min-height: 38px;
  border-radius: .55rem;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 800;
}
.cart-tax-note {
  display: block;
  color: var(--bs-secondary-color);
  font-size: .68rem;
}
.cart-usd-reference,
.checkout-usd-reference {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: .45rem;
  padding: .65rem .75rem;
  border-radius: .65rem;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: .82rem;
}
.download-license-count { color: var(--brand) !important; font-weight: 700; }
[data-bs-theme="dark"] .product-price-usd { color: #b2ccff; }

@media (max-width: 575.98px) {
  .product-purchase-form,
  .product-purchase-form .btn,
  .product-license-quantity,
  .product-preview-actions,
  .product-preview-actions .btn { width: 100%; }
  .cart-update-controls { align-items: stretch; flex-direction: column; }
  .cart-update-controls .btn { width: 100%; }
}

@media (max-width: 767.98px) {
  .table-responsive:has(.cart-items-table) { overflow: visible; }
  .cart-items-table,
  .cart-items-table tbody {
    display: block;
    width: 100%;
  }
  .cart-items-table { min-width: 0; margin: 0; }
  .cart-items-table thead { display: none; }
  .cart-items-table tbody {
    display: grid;
    gap: .85rem;
  }
  .cart-items-table .cart-item-row {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--bs-border-color);
    border-radius: .9rem;
    background: var(--bs-body-bg);
    box-shadow: 0 .45rem 1.3rem rgba(15, 23, 42, .06);
  }
  .cart-items-table .cart-item-row > td {
    display: flex;
    min-width: 0;
    padding: .75rem .85rem;
    border: 0;
  }
  .cart-items-table .cart-item-product {
    grid-column: 1 / -1;
    display: block;
    border-bottom: 1px solid var(--bs-border-color);
  }
  .cart-item-heading { min-width: 0; }
  .cart-item-heading > strong {
    display: block;
    overflow-wrap: anywhere;
    line-height: 1.35;
  }
  .cart-items-table [data-cart-label] {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: .2rem;
  }
  .cart-items-table [data-cart-label]::before {
    content: attr(data-cart-label);
    color: var(--bs-secondary-color);
    font-size: .67rem;
    font-weight: 800;
    letter-spacing: .045em;
    text-transform: uppercase;
  }
  .cart-items-table [data-cart-field="unit-price"],
  .cart-items-table [data-cart-field="quantity"] {
    border-bottom: 1px solid var(--bs-border-color);
  }
  .cart-items-table [data-cart-field="quantity"] { align-items: flex-end; }
  .cart-items-table [data-cart-field="total"] { font-size: 1.05rem; }
  .cart-items-table .cart-item-remove {
    align-items: center;
    justify-content: flex-end;
  }
  .cart-item-remove .btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
  }
  .cart-item-remove .btn span { display: inline; }
  [data-bs-theme="dark"] .cart-items-table .cart-item-row {
    box-shadow: none;
  }
}

/* =========================================================
   Servitecno Portal Corporativo + Store + Academy + Studio
   ========================================================= */
.btn-primary {
  --bs-btn-bg: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand-dark);
  --bs-btn-hover-border-color: var(--brand-dark);
  --bs-btn-active-bg: var(--brand-dark);
  --bs-btn-active-border-color: var(--brand-dark);
}
.btn-outline-primary {
  --bs-btn-color: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand);
  --bs-btn-hover-border-color: var(--brand);
  --bs-btn-active-bg: var(--brand-dark);
  --bs-btn-active-border-color: var(--brand-dark);
}

/* Reporte académico por docentes */
.academic-report-page { min-width: 0; }
.academic-report-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.academic-summary-card {
  display: flex;
  align-items: center;
  gap: .85rem;
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 1rem;
  background: var(--bs-body-bg);
}
.academic-summary-card div { display: grid; min-width: 0; }
.academic-summary-card small { color: var(--bs-secondary-color); font-size: .72rem; font-weight: 750; }
.academic-summary-card strong { font-size: clamp(1.45rem, 2vw, 2rem); line-height: 1.05; }
.academic-report-note { display: flex; align-items: flex-start; gap: .65rem; font-size: .82rem; }
.academic-report-owner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.academic-teacher-identity { display: flex; align-items: center; gap: .85rem; min-width: 0; }
.academic-teacher-identity h2 { margin: 0; font-size: 1.2rem; overflow-wrap: anywhere; }
.academic-teacher-identity p { margin: .1rem 0 0; color: var(--bs-secondary-color); }
.academic-teacher-identity small { color: var(--brand); font-size: .67rem; font-weight: 850; letter-spacing: .08em; }
.academic-teacher-avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2.9rem;
  height: 2.9rem;
  overflow: hidden;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 850;
}
.academic-teacher-avatar img { width: 100%; height: 100%; object-fit: cover; }
.academic-conversion { display: grid; justify-items: end; }
.academic-conversion small { color: var(--bs-secondary-color); font-size: .72rem; }
.academic-conversion strong { color: var(--brand); font-size: 1.35rem; }
.academic-course-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; }
.academic-course-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 1rem;
  background: var(--bs-body-bg);
}
.academic-course-card header div { display: flex; flex-wrap: wrap; gap: .35rem; }
.academic-course-card h2 { margin: .6rem 0 0; font-size: 1rem; overflow-wrap: anywhere; }
.academic-course-card > .btn { align-self: flex-start; margin-top: auto; }
.academic-course-metrics { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .55rem; margin: 0; }
.academic-course-metrics div { padding: .6rem; border-radius: .7rem; background: var(--bs-tertiary-bg); }
.academic-course-metrics dt { color: var(--bs-secondary-color); font-size: .67rem; }
.academic-course-metrics dd { margin: 0; font-size: 1.05rem; font-weight: 850; }
.academic-teacher-ranking { display: grid; gap: .8rem; }
.academic-teacher-report {
  overflow: hidden;
  border: 1px solid var(--bs-border-color);
  border-radius: 1rem;
  background: var(--bs-body-bg);
}
.academic-teacher-report > summary {
  display: grid;
  grid-template-columns: auto auto minmax(180px,1fr) repeat(3,minmax(70px,auto)) auto;
  align-items: center;
  gap: .85rem;
  padding: .9rem 1rem;
  cursor: pointer;
  list-style: none;
}
.academic-teacher-report > summary::-webkit-details-marker { display: none; }
.academic-rank {
  display: inline-grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: .75rem;
  font-weight: 850;
}
.academic-teacher-copy { display: grid; min-width: 0; }
.academic-teacher-copy strong { overflow-wrap: anywhere; }
.academic-teacher-copy small { color: var(--bs-secondary-color); font-size: .73rem; overflow-wrap: anywhere; }
.academic-teacher-totals { display: grid; justify-items: center; }
.academic-teacher-totals b { font-size: 1.05rem; }
.academic-teacher-totals small { color: var(--bs-secondary-color); font-size: .64rem; }
.academic-expand-icon { color: var(--brand); transition: transform .2s ease; }
.academic-teacher-report[open] .academic-expand-icon { transform: rotate(180deg); }
.academic-teacher-detail { padding: 0 1rem 1rem; border-top: 1px solid var(--bs-border-color); }
.academic-teacher-detail-summary { display: flex; flex-wrap: wrap; gap: 1rem; padding: .8rem 0; color: var(--bs-secondary-color); font-size: .78rem; }
.academic-teacher-detail-summary strong { color: var(--bs-body-color); }
.academic-course-list { display: grid; gap: .55rem; }
.academic-course-list > article {
  display: grid;
  grid-template-columns: minmax(180px,1fr) minmax(260px,auto) auto;
  align-items: center;
  gap: .75rem;
  padding: .75rem;
  border-radius: .75rem;
  background: var(--bs-tertiary-bg);
}
.academic-course-name { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; min-width: 0; }
.academic-course-name strong { flex-basis: 100%; overflow-wrap: anywhere; }
.academic-course-name small { color: var(--bs-secondary-color); }
.academic-course-list dl { display: grid; grid-template-columns: repeat(3,minmax(70px,1fr)); gap: .5rem; margin: 0; }
.academic-course-list dl div { display: grid; justify-items: center; }
.academic-course-list dt { color: var(--bs-secondary-color); font-size: .62rem; }
.academic-course-list dd { margin: 0; font-weight: 850; }

@media (max-width: 991.98px) {
  .academic-report-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .academic-course-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .academic-teacher-report > summary { grid-template-columns: auto auto minmax(0,1fr) auto; }
  .academic-teacher-totals { display: none; }
  .academic-course-list > article { grid-template-columns: minmax(0,1fr) auto; }
  .academic-course-list dl { grid-column: 1/-1; grid-row: 2; }
}
@media (max-width: 575.98px) {
  .academic-report-summary { gap: .65rem; }
  .academic-summary-card { align-items: flex-start; padding: .75rem; }
  .academic-summary-card .admin-stat-icon { width: 2.25rem; height: 2.25rem; }
  .academic-report-owner { align-items: flex-start; flex-direction: column; }
  .academic-conversion { justify-items: start; }
  .academic-course-grid { grid-template-columns: 1fr; }
  .academic-teacher-report > summary { grid-template-columns: auto auto minmax(0,1fr) auto; gap: .55rem; padding: .75rem; }
  .academic-rank { position: absolute; margin: -.45rem 0 0 -.45rem; width: 1.35rem; height: 1.35rem; font-size: .6rem; }
  .academic-teacher-avatar { width: 2.55rem; height: 2.55rem; }
  .academic-teacher-detail { padding: 0 .7rem .7rem; }
  .academic-course-list > article { grid-template-columns: minmax(0,1fr) auto; padding: .65rem; }
}
.text-primary { color: var(--brand) !important; }
.bg-primary { background-color: var(--brand) !important; }

.site-brand-copy { max-width: 245px; }
.site-brand-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-main-dropdown > .nav-link { display: flex; align-items: center; gap: .35rem; }
.site-main-dropdown .dropdown-menu { min-width: 230px; padding: .55rem; border-radius: 14px; box-shadow: var(--card-shadow); }
.site-main-dropdown .dropdown-item { display: flex; align-items: center; padding: .7rem .8rem; border-radius: 9px; }
.site-main-dropdown .dropdown-item:hover { background: var(--brand-soft); color: var(--brand-dark); }
.mobile-submenu-link { padding-left: 2rem !important; font-size: .94rem; opacity: .94; }
.mobile-submenu-link::before { content: ''; width: 10px; height: 1px; margin-right: .25rem; background: currentColor; opacity: .35; }

.corporate-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 90% 15%, rgba(var(--bs-primary-rgb), .18), transparent 34%),
    radial-gradient(circle at 12% 86%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 30%),
    linear-gradient(145deg, var(--bs-body-bg), var(--brand-soft));
}
[data-bs-theme="dark"] .corporate-hero {
  background:
    radial-gradient(circle at 90% 15%, rgba(var(--bs-primary-rgb), .24), transparent 36%),
    linear-gradient(145deg, #111827, #172238);
}
.corporate-hero::after { content: ''; position: absolute; inset: auto -8% -46% auto; width: 420px; aspect-ratio: 1; border: 1px solid rgba(var(--bs-primary-rgb), .15); border-radius: 50%; }
.corporate-kicker { display: inline-flex; align-items: center; gap: .5rem; margin-bottom: 1rem; padding: .4rem .75rem; border: 1px solid rgba(var(--bs-primary-rgb), .22); border-radius: 999px; color: var(--brand-dark); background: rgba(255,255,255,.7); font-size: .76rem; font-weight: 900; letter-spacing: .12em; }
[data-bs-theme="dark"] .corporate-kicker { background: rgba(15,23,42,.7); color: #dbe7ff; }
.corporate-hero h1 { max-width: 780px; margin-bottom: 1.25rem; font-size: clamp(2.45rem, 6vw, 5rem); line-height: .98; letter-spacing: -.055em; font-weight: 900; }
.corporate-hero .lead { max-width: 740px; font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--bs-secondary-color); }
.corporate-trust-row { display: flex; flex-wrap: wrap; gap: .85rem 1.4rem; color: var(--bs-secondary-color); font-size: .92rem; font-weight: 700; }
.corporate-trust-row i { color: var(--brand); margin-right: .3rem; }
.corporate-hero-panel { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; max-width: 440px; margin-inline: auto; padding: clamp(1.6rem,4vw,2.5rem); border: 1px solid rgba(var(--bs-primary-rgb), .16); border-radius: 30px; background: color-mix(in srgb, var(--bs-body-bg) 88%, transparent); box-shadow: 0 24px 70px rgba(16,24,40,.14); backdrop-filter: blur(12px); text-align: center; }
.corporate-hero-logo { width: 116px; height: 116px; margin-bottom: 1.2rem; border-radius: 26px; background: #fff; box-shadow: 0 12px 35px rgba(var(--bs-primary-rgb), .16); }
.corporate-hero-panel > strong { font-size: 1.6rem; }
.corporate-hero-panel > p { margin: .35rem 0 1.4rem; color: var(--bs-secondary-color); }
.corporate-hero-mini-grid { display: grid; width: 100%; grid-template-columns: repeat(3,1fr); gap: .65rem; }
.corporate-hero-mini-grid a { display: grid; gap: .45rem; place-items: center; min-width: 0; padding: .85rem .45rem; border: 1px solid rgba(var(--bs-primary-rgb), .12); border-radius: 14px; background: var(--bs-body-bg); color: var(--bs-body-color); text-decoration: none; font-size: .82rem; font-weight: 800; }
.corporate-hero-mini-grid a:hover { border-color: rgba(var(--bs-primary-rgb), .35); color: var(--brand); transform: translateY(-2px); }
.corporate-hero-mini-grid i { color: var(--brand); font-size: 1.25rem; }

.corporate-section-heading { max-width: 780px; }
.corporate-section-heading p, .section-heading > p { color: var(--bs-secondary-color); }
.corporate-service-card { display: flex; flex-direction: column; padding: 1.7rem; border: 1px solid var(--bs-border-color); border-radius: 22px; background: var(--bs-body-bg); box-shadow: 0 10px 35px rgba(16,24,40,.05); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.corporate-service-card:hover { transform: translateY(-5px); border-color: rgba(var(--bs-primary-rgb), .28); box-shadow: 0 18px 45px rgba(16,24,40,.1); }
.corporate-service-icon { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 1.25rem; border-radius: 17px; background: var(--brand-soft); color: var(--brand); font-size: 1.35rem; }
.corporate-service-card small { color: var(--brand); font-size: .73rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.corporate-service-card h3, .corporate-service-card h2 { margin: .35rem 0 .8rem; font-weight: 850; }
.corporate-service-card p { flex: 1; color: var(--bs-secondary-color); }
.corporate-service-card > a:not(.btn) { display: inline-flex; align-items: center; gap: .45rem; margin-top: .4rem; color: var(--brand); font-weight: 800; text-decoration: none; }
.corporate-service-card-large { min-height: 360px; }
.corporate-service-card-large .btn { align-self: flex-start; }

.corporate-about-section { background: var(--soft); }
[data-bs-theme="dark"] .corporate-about-section { background: #101827; }
.corporate-about-section h2 { font-weight: 850; letter-spacing: -.025em; }
.corporate-courses-section { background: color-mix(in srgb, var(--brand-soft) 55%, var(--bs-body-bg)); }
[data-bs-theme="dark"] .corporate-courses-section { background: #101827; }
.certificate-cta-card { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: clamp(1.6rem,4vw,2.5rem); border-radius: 26px; background: linear-gradient(135deg, var(--brand-dark), var(--brand)); color: #fff; box-shadow: 0 20px 50px rgba(var(--bs-primary-rgb), .22); }
.certificate-cta-card .eyebrow, .certificate-cta-card p { color: rgba(255,255,255,.83); }
.certificate-cta-card h2 { margin: .35rem 0 .6rem; }
.corporate-contact-strip { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1.5rem 1.7rem; border: 1px solid var(--bs-border-color); border-radius: 22px; background: var(--bs-body-bg); box-shadow: var(--card-shadow); }
.corporate-contact-strip h2 { margin: .2rem 0 0; font-size: clamp(1.25rem,2.4vw,1.8rem); }

.service-subbrand-hero, .page-intro-hero { border-bottom: 1px solid var(--bs-border-color); background: linear-gradient(135deg, var(--bs-body-bg), var(--brand-soft)); }
[data-bs-theme="dark"] .service-subbrand-hero, [data-bs-theme="dark"] .page-intro-hero { background: linear-gradient(135deg,#111827,#172238); }
.service-subbrand-hero h1, .page-intro-hero h1 { font-size: clamp(2.25rem,5vw,4rem); font-weight: 900; letter-spacing: -.04em; }
.service-subbrand-hero .lead, .page-intro-hero .lead { max-width: 820px; color: var(--bs-secondary-color); }
.subbrand-icon-panel { display: inline-grid; place-items: center; min-width: min(100%, 300px); padding: 2.25rem; border: 1px solid rgba(var(--bs-primary-rgb), .18); border-radius: 28px; background: var(--bs-body-bg); box-shadow: var(--card-shadow); }
.subbrand-icon-panel i { margin-bottom: 1rem; color: var(--brand); font-size: 4.5rem; }
.subbrand-icon-panel span { font-weight: 850; }
.academy-feature-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; }
.academy-feature-grid article { display: grid; gap: .35rem; padding: 1.25rem; border: 1px solid var(--bs-border-color); border-radius: 18px; }
.academy-feature-heading { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.academy-feature-heading > i { flex: 0 0 auto; color: var(--brand); font-size: 1.25rem; }
.academy-feature-heading > strong { min-width: 0; }
.academy-feature-grid article span { color: var(--bs-secondary-color); font-size: .9rem; }
.subbrand-summary-panel { text-align: center; }
.subbrand-summary-panel strong,
.subbrand-summary-panel small { display: block; }
.subbrand-summary-panel strong { color: var(--bs-body-color); font-size: 1.1rem; font-weight: 850; }
.subbrand-summary-panel small { max-width: 240px; margin-top: .35rem; color: var(--bs-secondary-color); line-height: 1.45; }
.studio-services-section { position: relative; overflow: hidden; border-top: 1px solid var(--bs-border-color); background: linear-gradient(180deg,rgba(var(--bs-primary-rgb),.025),transparent 42%); }
.studio-services-heading { margin-bottom: 1.35rem; }
.studio-services-heading p { margin: .35rem 0 0; color: var(--bs-secondary-color); }
.studio-service-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: .9rem; }
.studio-service-item { min-width: 0; min-height: 150px; padding: 1.2rem; border: 1px solid var(--bs-border-color); border-radius: 18px; background: var(--bs-body-bg); box-shadow: 0 8px 24px rgba(15,39,79,.045); transition: border-color .2s ease,box-shadow .2s ease,transform .2s ease; }
.studio-service-item { grid-column: span 2; }
.studio-service-item:hover { border-color: rgba(var(--bs-primary-rgb),.32); box-shadow: 0 14px 34px rgba(15,39,79,.09); transform: translateY(-2px); }
.studio-service-heading { display: flex; align-items: center; gap: .75rem; min-width: 0; margin-bottom: .7rem; }
.studio-service-icon { display: grid; flex: 0 0 46px; place-items: center; width: 46px; height: 46px; border: 1px solid rgba(var(--bs-primary-rgb),.12); border-radius: 14px; color: var(--brand); background: linear-gradient(145deg,var(--brand-soft),rgba(var(--bs-primary-rgb),.055)); box-shadow: 0 7px 18px rgba(15,39,79,.07); font-size: 1.15rem; }
.studio-service-item h3 { min-width: 0; margin: 0; color: var(--bs-body-color); font-size: 1rem; font-weight: 850; line-height: 1.3; overflow-wrap: anywhere; }
.studio-service-item p { margin: 0; color: var(--bs-secondary-color); font-size: .9rem; line-height: 1.55; overflow-wrap: anywhere; }
.studio-service-item:nth-last-child(2):nth-child(3n + 1) { grid-column: 2/span 2; }
.studio-service-item:last-child:nth-child(3n + 2) { grid-column: 4/span 2; }
.studio-service-item:last-child:nth-child(3n + 1) { grid-column: 3/span 2; }
@media(max-width:991.98px){.studio-service-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.studio-service-item,.studio-service-item:nth-last-child(2):nth-child(3n + 1),.studio-service-item:last-child:nth-child(3n + 2),.studio-service-item:last-child:nth-child(3n + 1){grid-column:auto;width:auto;justify-self:stretch}.studio-service-item:last-child:nth-child(2n + 1){grid-column:1/-1;width:min(76%,680px);justify-self:center}}
@media(max-width:575.98px){.service-subbrand-hero .btn{width:100%}.subbrand-summary-panel{display:grid;width:100%;min-width:0;padding:1.5rem}.subbrand-summary-panel i{font-size:3.4rem}.studio-service-grid{grid-template-columns:1fr}.studio-service-item,.studio-service-item:last-child:nth-child(2n + 1){grid-column:auto;width:100%;min-height:0;padding:1rem;justify-self:stretch}.studio-service-heading{gap:.65rem;margin-bottom:.6rem}.studio-service-icon{flex-basis:40px;width:40px;height:40px;border-radius:12px;font-size:1rem}.studio-service-item h3{font-size:.95rem}.studio-service-item p{font-size:.84rem}}
.studio-services-admin { padding: 1rem; border: 1px solid var(--bs-border-color); border-radius: 16px; background: var(--soft); }
.manager-icon-button { display: inline-grid; flex: 0 0 36px; place-items: center; width: 36px; height: 36px; padding: 0 !important; }
.studio-services-admin-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .85rem; }
.studio-service-admin-item { min-width: 0; padding: .9rem; border: 1px solid var(--bs-border-color); border-radius: 14px; background: var(--bs-body-bg); }
.studio-service-admin-item.is-hidden,.site-value-admin-item.is-hidden { opacity: .68; border-style: dashed; background: rgba(var(--bs-secondary-rgb),.06); }
.studio-service-admin-toolbar { display: flex; align-items: center; justify-content: space-between; gap: .7rem; margin-bottom: .75rem; }
.studio-service-admin-number { color: var(--brand); font-size: .76rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.studio-service-admin-toolbar .btn { min-width: 34px; padding: .3rem .55rem; }
.studio-service-admin-fields { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(180px,.65fr); gap: .7rem; }
.studio-service-admin-description { grid-column: 1/-1; }
.studio-service-admin-icon { width: 42px; justify-content: center; color: var(--brand); background: var(--brand-soft); }
.site-values-admin { padding: 1rem; border: 1px solid var(--bs-border-color); border-radius: 16px; background: var(--soft); }
.site-values-admin-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; }
.site-value-admin-item { display: grid; grid-template-columns: 32px minmax(0,1fr) auto; align-items: center; gap: .55rem; min-width: 0; padding: .65rem; border: 1px solid var(--bs-border-color); border-radius: 12px; background: var(--bs-body-bg); }
.site-value-admin-number { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: var(--brand); background: var(--brand-soft); font-size: .78rem; font-weight: 850; }
.site-value-admin-fields { display: grid; grid-template-columns: minmax(0,1fr) minmax(185px,.8fr); gap: .5rem; min-width: 0; }
.site-value-admin-icon { width: 40px; justify-content: center; color: var(--brand); background: var(--brand-soft); }
.site-value-admin-actions { display: flex; gap: .3rem; }
.site-value-admin-actions .btn { min-width: 32px; padding: .28rem .42rem; }
@media(max-width:991.98px){.studio-services-admin-list{grid-template-columns:1fr}}
@media(max-width:767.98px){.site-values-admin-list{grid-template-columns:1fr}}
@media(max-width:575.98px){.admin-current-logo{width:64px;height:64px;border-radius:14px}.studio-services-admin,.site-values-admin{padding:.75rem}.studio-service-admin-item{padding:.75rem}.studio-service-admin-toolbar{align-items:flex-start}.studio-service-admin-toolbar .btn{min-width:32px;padding:.26rem .45rem}.studio-service-admin-fields{grid-template-columns:1fr}.studio-service-admin-description{grid-column:auto}.site-value-admin-item{grid-template-columns:28px minmax(0,1fr);gap:.45rem;padding:.55rem}.site-value-admin-number{width:28px;height:28px}.site-value-admin-fields{grid-template-columns:1fr}.site-value-admin-actions{grid-column:2;justify-content:flex-end}}
.about-detail-card { padding: 2rem; border: 1px solid var(--bs-border-color); border-radius: 24px; background: var(--bs-body-bg); box-shadow: var(--card-shadow); }
.about-detail-card > span { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 1.2rem; border-radius: 17px; color: var(--brand); background: var(--brand-soft); font-size: 1.4rem; }
.about-detail-card h2 { font-weight: 850; }
.about-detail-card p { color: var(--bs-secondary-color); font-size: 1.05rem; }
.value-chip { display: flex; align-items: center; gap: .7rem; min-height: 76px; padding: 1rem; border: 1px solid var(--bs-border-color); border-radius: 16px; background: var(--bs-body-bg); }
.value-chip i { color: var(--brand); }
.contact-form-card { border-radius: 24px; }
.contact-info-stack { display: grid; gap: .9rem; }
.contact-info-stack article, .contact-info-link { display: flex; align-items: center; gap: 1rem; padding: 1.2rem; border: 1px solid var(--bs-border-color); border-radius: 17px; background: var(--bs-body-bg); color: var(--bs-body-color); text-decoration: none; }
.contact-info-stack i { display: grid; place-items: center; flex: 0 0 auto; width: 44px; height: 44px; border-radius: 13px; color: var(--brand); background: var(--brand-soft); font-size: 1.2rem; }
.contact-info-stack small, .contact-info-stack strong { display: block; }
.contact-info-stack small { color: var(--bs-secondary-color); }

.site-maintenance-jump { display: flex; flex-wrap: wrap; gap: .55rem; }
.site-maintenance-jump a { display: inline-flex; align-items: center; gap: .4rem; padding: .55rem .8rem; border: 1px solid var(--bs-border-color); border-radius: 999px; color: var(--bs-body-color); background: var(--bs-body-bg); text-decoration: none; font-size: .88rem; font-weight: 750; }
.site-maintenance-jump a:hover { color: var(--brand); border-color: rgba(var(--bs-primary-rgb), .3); }
.maintenance-switch { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 58px; padding: .75rem 1rem; border: 1px solid var(--bs-border-color); border-radius: 14px; font-weight: 700; }
.maintenance-table { min-width: 1180px; }
.maintenance-table td { vertical-align: middle; }
.maintenance-url-input { min-width: 175px; }
.maintenance-order-input { min-width: 78px; }
.maintenance-service-form { display: flex; flex-direction: column; padding: 1.3rem; border: 1px solid var(--bs-border-color); border-radius: 19px; background: var(--bs-body-bg); }
.maintenance-service-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; color: var(--brand); background: var(--brand-soft); }
.contact-admin-card { position: relative; }
.contact-admin-new { border-left: 4px solid var(--brand); }
.contact-admin-message { padding: 1rem; border-radius: 14px; background: var(--soft); white-space: normal; }
[data-bs-theme="dark"] .contact-admin-message { background: #111827; }

@media (max-width: 1199.98px) {
  .site-desktop-navigation .nav-link { padding-inline: .42rem; font-size: .87rem; }
  .site-brand-copy { max-width: 190px; }
}
@media (max-width: 991.98px) {
  .corporate-hero { text-align: center; }
  .corporate-hero .lead { margin-inline: auto; }
  .corporate-hero .d-flex, .corporate-trust-row { justify-content: center; }
  .academy-feature-grid { grid-template-columns: repeat(2,1fr); }
  .certificate-cta-card, .corporate-contact-strip { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 575.98px) {
  .corporate-hero h1 { font-size: clamp(2.15rem,12vw,3.3rem); }
  .corporate-hero-panel { border-radius: 22px; }
  .corporate-hero-mini-grid { grid-template-columns: 1fr; }
  .academy-feature-grid { grid-template-columns: 1fr; }
  .certificate-cta-card { border-radius: 20px; }
  .service-subbrand-hero, .page-intro-hero { text-align: center; }
  .service-subbrand-hero .d-flex { justify-content: center; }
}

/* =========================================================
   PATCH V3.1 - Header web en una sola línea
   Mantiene drawer móvil y compacta únicamente >= 1200px.
   ========================================================= */
@media (min-width: 1200px) {
  .site-navbar {
    min-height: 72px;
  }

  .site-navbar .site-navbar-inner {
    width: 100%;
    max-width: none;
    flex-wrap: nowrap;
    gap: .7rem;
    padding-inline: clamp(1rem, 3vw, 3rem);
  }

  .site-navbar .site-brand {
    flex: 0 1 285px;
    max-width: 285px;
    min-width: 225px;
    margin-right: .25rem;
    gap: .7rem !important;
  }

  .site-navbar .site-logo-frame-header {
    width: 56px;
    height: 56px;
    border-radius: 15px;
  }

  .site-navbar .site-brand-copy {
    max-width: 215px;
  }

  .site-navbar .site-brand-copy strong {
    font-size: 1rem;
  }

  .site-navbar .site-brand-copy small {
    margin-top: .18rem;
    font-size: .56rem;
    letter-spacing: .07em;
  }

  .site-desktop-navigation {
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: .05rem;
  }

  .site-desktop-navigation .nav-link {
    flex: 0 0 auto;
    padding: .56rem .5rem;
    font-size: .88rem;
  }

  .site-desktop-navigation .user-role-menu-button {
    max-width: 190px;
  }

  .site-desktop-navigation .user-role-display-name {
    max-width: 145px;
  }

  .site-desktop-navigation .notification-bell-button {
    width: 40px;
    height: 40px;
  }

  .site-desktop-navigation .theme-toggle-button {
    width: 40px;
    min-width: 40px;
    padding-inline: 0;
  }
}

@media (min-width: 1400px) {
  .site-navbar .site-brand {
    flex-basis: 310px;
    max-width: 310px;
  }

  .site-navbar .site-brand-copy {
    max-width: 238px;
  }

  .site-desktop-navigation .nav-link {
    padding-inline: .62rem;
    font-size: .92rem;
  }

  .site-desktop-navigation .user-role-display-name {
    max-width: 175px;
  }
}

/* Parche V3.3 · datos de comprobante bloqueados y trazabilidad */
.billing-readonly-data > div {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: .8rem .9rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
  background: var(--soft);
}
.billing-readonly-data small {
  color: var(--bs-secondary-color);
  font-size: .68rem;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.billing-readonly-data strong { overflow-wrap: anywhere; }

/* =========================================================
   Parche V3.4 - Menú móvil jerárquico y compacto
   ========================================================= */
.site-navigation .mobile-menu-links {
  gap: .12rem;
}

.site-navigation .mobile-menu-group {
  display: grid;
  gap: .06rem;
  min-width: 0;
}

.site-navigation .mobile-menu-parent-toggle {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 20px;
  align-items: center;
  gap: .55rem;
  width: 100%;
  min-height: 46px;
  padding: .38rem .55rem;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #eaf1fb;
  font: inherit;
  font-size: .88rem;
  font-weight: 680;
  text-align: left;
  box-shadow: none;
}

.site-navigation .mobile-menu-parent-toggle > i:not(.mobile-menu-chevron) {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,.07);
  color: #d9e8fb;
}

.site-navigation .mobile-menu-parent-toggle > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-navigation .mobile-menu-parent-toggle:hover,
.site-navigation .mobile-menu-parent-toggle:focus-visible,
.site-navigation .mobile-menu-parent-toggle.active,
.site-navigation .mobile-menu-parent-toggle[aria-expanded="true"] {
  background: rgba(15,101,184,.78);
  color: #fff;
}

.site-navigation .mobile-menu-parent-toggle:hover > i:not(.mobile-menu-chevron),
.site-navigation .mobile-menu-parent-toggle:focus-visible > i:not(.mobile-menu-chevron),
.site-navigation .mobile-menu-parent-toggle.active > i:not(.mobile-menu-chevron),
.site-navigation .mobile-menu-parent-toggle[aria-expanded="true"] > i:not(.mobile-menu-chevron) {
  background: rgba(255,255,255,.14);
  color: #fff;
}

.site-navigation .mobile-menu-chevron {
  display: block;
  width: 20px;
  height: auto;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: transparent !important;
  color: #a9bdd5;
  font-size: .68rem;
  text-align: center;
  transition: transform .2s ease, color .2s ease;
}

.site-navigation .mobile-menu-parent-toggle[aria-expanded="true"] .mobile-menu-chevron {
  transform: rotate(180deg);
  color: #fff;
}

.site-navigation .mobile-submenu {
  min-width: 0;
}

.site-navigation .mobile-submenu-inner {
  display: grid;
  gap: .04rem;
  margin: .06rem 0 .12rem 1.12rem;
  padding: .08rem 0 .08rem .55rem;
  border-left: 1px solid rgba(174,205,239,.24);
}

.site-navigation .mobile-menu-links .mobile-submenu-link {
  grid-template-columns: 32px minmax(0, 1fr);
  gap: .5rem;
  min-height: 39px;
  padding: .24rem .42rem !important;
  border-radius: 10px;
  font-size: .81rem;
  font-weight: 620;
  opacity: .96;
}

.site-navigation .mobile-menu-links .mobile-submenu-link::before {
  display: none !important;
  content: none !important;
}

.site-navigation .mobile-menu-links .mobile-submenu-link i {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  font-size: .75rem;
}

.site-navigation .mobile-menu-links .mobile-submenu-link.active {
  background: rgba(15,101,184,.72);
}

@media (max-width: 575.98px) {
  .site-navigation .mobile-menu-parent-toggle,
  .site-navigation .mobile-menu-links > a {
    min-height: 43px;
  }

  .site-navigation .mobile-menu-parent-toggle {
    grid-template-columns: 34px minmax(0, 1fr) 18px;
    gap: .5rem;
    padding-top: .3rem;
    padding-bottom: .3rem;
  }

  .site-navigation .mobile-menu-parent-toggle > i:not(.mobile-menu-chevron) {
    width: 34px;
    height: 34px;
  }

  .site-navigation .mobile-submenu-inner {
    margin-left: 1rem;
    padding-left: .5rem;
  }
}

/* =========================================================
   Servitecno V3.6 · Avisos y promociones flotantes
   ========================================================= */
body.floating-promo-open { overflow: hidden; }
.floating-promotions-root { position: relative; z-index: 1090; }
.floating-promo { position: fixed; z-index: 1095; opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.floating-promo.is-visible { opacity: 1; pointer-events: auto; }
.floating-promo-backdrop { position: fixed; inset: 0; border: 0; background: rgba(13, 23, 43, .58); backdrop-filter: blur(3px); cursor: default; }
.floating-promo-panel { position: relative; overflow: hidden; background: var(--bs-body-bg); color: var(--bs-body-color); border: 1px solid var(--bs-border-color); box-shadow: 0 24px 70px rgba(8, 18, 43, .28); }
.floating-promo-close { position: absolute; z-index: 3; top: .65rem; right: .65rem; width: 2.25rem; height: 2.25rem; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(17, 24, 39, .78); color: #fff; box-shadow: 0 5px 18px rgba(0,0,0,.18); }
.floating-promo-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.floating-promo-media { position: relative; overflow: hidden; }
.floating-promo-media video,
.floating-promo-media iframe { display: block; width: 100%; height: 100%; border: 0; object-fit: contain; background: #050914; }
.floating-promo-embed > img,
.floating-promo-embed > iframe { position: absolute; inset: 0; }
.floating-promo-embed > span { position: absolute; z-index: 1; inset: 0; display: grid; place-content: center; justify-items: center; gap: .35rem; color: #fff; background: rgba(5,9,20,.42); pointer-events: none; }
.floating-promo-embed > span i { font-size: 2.25rem; }
.floating-promo-embed.is-playing > img,
.floating-promo-embed.is-playing > span { visibility: hidden; }
.floating-promo-content { min-height: 0; overflow: auto; padding: 1.1rem 1.15rem 1.2rem; }
.floating-promo-kicker { display: inline-flex; align-items: center; gap: .45rem; margin-bottom: .45rem; color: var(--brand); font-size: .76rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.floating-promo-content h2 { margin: 0 0 .55rem; font-size: clamp(1.25rem, 2vw, 1.85rem); line-height: 1.12; }
.floating-promo-content p { margin: 0 0 .9rem; color: var(--bs-secondary-color); line-height: 1.5; }
.floating-promo-action { width: 100%; font-weight: 700; }
.floating-promo-codebox { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .55rem; margin: .85rem 0; padding: .65rem .7rem; border: 1px dashed color-mix(in srgb, var(--brand) 50%, var(--bs-border-color)); border-radius: .85rem; background: color-mix(in srgb, var(--brand) 7%, var(--bs-body-bg)); }
.floating-promo-codebox > span { font-size: .72rem; font-weight: 800; text-transform: uppercase; color: var(--bs-secondary-color); }
.floating-promo-codebox strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1rem; letter-spacing: .06em; }
.floating-promo-codebox button { border: 0; border-radius: .65rem; background: var(--brand); color: #fff; padding: .45rem .6rem; display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 700; }
.floating-promo-navigation { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px; padding: .42rem .7rem; border-top: 1px solid var(--bs-border-color); background: color-mix(in srgb, var(--bs-tertiary-bg) 82%, transparent); }
.floating-promo-navigation[hidden] { display: none !important; }
.floating-promo-navigation button { width: 31px; height: 31px; padding: 0; border: 1px solid var(--bs-border-color); border-radius: 50%; display: grid; place-items: center; color: var(--brand); background: var(--bs-body-bg); font-size: .78rem; }
.floating-promo-navigation button:hover,
.floating-promo-navigation button:focus-visible { color: #fff; border-color: var(--brand); background: var(--brand); }
.floating-promo-navigation [data-promo-position] { min-width: 3.4rem; text-align: center; color: var(--bs-secondary-color); font-size: .78rem; font-weight: 800; }

.floating-promo-type-poster { inset: 0; display: grid; place-items: center; padding: 1rem; transform: translateY(10px); }
.floating-promo-type-poster.is-visible { transform: translateY(0); }
.floating-promo-type-poster .floating-promo-panel { width: min(92vw, 560px); max-height: min(88vh, 760px); border-radius: 1.15rem; display: flex; flex-direction: column; }
.floating-promo-type-poster .floating-promo-image { min-height: 0; max-height: 58vh; background: var(--bs-tertiary-bg); }
.floating-promo-type-poster .floating-promo-video,
.floating-promo-type-poster .floating-promo-embed { width: 100%; aspect-ratio: 16 / 9; }
.floating-promo-type-poster .floating-promo-image img,
.floating-promo-type-poster .floating-promo-image video { object-fit: contain; max-height: 58vh; }

.floating-promo-type-card,
.floating-promo-type-coupon { width: min(390px, calc(100vw - 2rem)); transform: translateY(12px); }
.floating-promo-type-card.is-visible,
.floating-promo-type-coupon.is-visible { transform: translateY(0); }
.floating-promo-type-card .floating-promo-panel,
.floating-promo-type-coupon .floating-promo-panel { border-radius: 1rem; }
.floating-promo-type-card .floating-promo-image,
.floating-promo-type-coupon .floating-promo-image { height: 155px; background: var(--bs-tertiary-bg); }
.floating-promo-pos-bottom_right { right: 1.15rem; bottom: 1.15rem; }
.floating-promo-pos-bottom_left { left: 1.15rem; bottom: 1.15rem; }
.floating-promo-pos-top_right { right: 1.15rem; top: 5.4rem; }
.floating-promo-type-card.floating-promo-pos-center,
.floating-promo-type-coupon.floating-promo-pos-center { left: 50%; top: 50%; transform: translate(-50%, calc(-50% + 12px)); }
.floating-promo-type-card.floating-promo-pos-center.is-visible,
.floating-promo-type-coupon.floating-promo-pos-center.is-visible { transform: translate(-50%, -50%); }

.promo-admin-stat { min-height: 108px; display: flex; flex-direction: column; justify-content: center; gap: .25rem; }
.promo-admin-stat span { color: var(--bs-secondary-color); font-size: .83rem; font-weight: 700; }
.promo-admin-stat strong { font-size: 1.85rem; line-height: 1; }
.promo-admin-name { display: flex; gap: .75rem; align-items: center; min-width: 240px; }
.promo-admin-name img,
.promo-admin-thumb { width: 58px; height: 58px; border-radius: .8rem; object-fit: cover; flex: 0 0 auto; }
.promo-admin-media-image { position: relative; display: block; width: 58px; height: 58px; flex: 0 0 auto; }
.promo-admin-media-image img { width: 100%; height: 100%; }
.promo-admin-media-image i { position: absolute; right: -.25rem; bottom: -.2rem; display: grid; place-items: center; width: 1.45rem; height: 1.45rem; border: 2px solid var(--bs-body-bg); border-radius: 50%; color: #fff; background: var(--brand); font-size: .65rem; }
.promo-admin-thumb { display: grid; place-items: center; background: var(--bs-tertiary-bg); color: var(--brand); font-size: 1.25rem; }
.promo-admin-name strong,
.promo-admin-name small { display: block; }
.promo-admin-name small { color: var(--bs-secondary-color); margin-top: .15rem; max-width: 240px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.promo-admin-preview { height: 130px; border-radius: .9rem; overflow: hidden; border: 1px solid var(--bs-border-color); background: var(--bs-tertiary-bg); }
.promo-admin-preview img { width: 100%; height: 100%; object-fit: contain; }
.promo-admin-preview-empty { display: grid; place-items: center; align-content: center; gap: .35rem; color: var(--bs-secondary-color); }
.promo-admin-preview-empty i { font-size: 1.6rem; }
.promo-device-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .65rem; }
.promo-device-check { margin: 0; padding: .75rem; border: 1px solid var(--bs-border-color); border-radius: .8rem; display: flex; align-items: center; gap: .5rem; }
.promo-device-check > span { display: flex; align-items: center; gap: .4rem; }

@media (max-width: 991.98px) {
    .floating-promo-pos-bottom_right,
    .floating-promo-pos-bottom_left { bottom: calc(5.2rem + env(safe-area-inset-bottom)); }
    .floating-promo-pos-top_right { top: 4.8rem; }
}
@media (max-width: 767.98px) {
    .floating-promo-type-poster { padding: .75rem; }
    .floating-promo-type-poster .floating-promo-panel { width: min(94vw, 470px); max-height: 84vh; }
    .floating-promo-type-poster .floating-promo-image { max-height: 52vh; }
    .floating-promo-type-poster .floating-promo-image img,
    .floating-promo-type-poster .floating-promo-image video { max-height: 52vh; }
    .floating-promo-content { padding: .9rem .95rem 1rem; }
    .floating-promo-content h2 { font-size: 1.2rem; }
    .floating-promo-content p { font-size: .92rem; }
    .floating-promo-type-card,
    .floating-promo-type-coupon { width: calc(100vw - 1.25rem); left: .625rem !important; right: auto !important; }
    .floating-promo-type-card.floating-promo-pos-top_right,
    .floating-promo-type-coupon.floating-promo-pos-top_right { top: 4.35rem; }
    .floating-promo-type-card.floating-promo-pos-center,
    .floating-promo-type-coupon.floating-promo-pos-center { left: 50% !important; width: min(92vw, 390px); }
    .floating-promo-type-card .floating-promo-image,
    .floating-promo-type-coupon .floating-promo-image { height: 125px; }
    .floating-promo-codebox { grid-template-columns: 1fr; }
    .floating-promo-navigation { min-height: 42px; padding: .35rem .55rem; }
    .promo-device-grid { grid-template-columns: 1fr; }
}

/* ===== Parche V3.7 · Tarjetas comerciales, social proof y calificaciones ===== */
.product-card .product-description {
  display: none !important;
}

.product-social-proof {
  display: grid;
  gap: .42rem;
  margin-bottom: .95rem;
}

.product-counter-badge {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  align-self: flex-start;
  padding: .32rem .7rem;
  border-radius: 999px;
  background: rgba(24,84,255,.08);
  color: var(--brand-primary, #1d4ed8);
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.2;
}

.product-counter-badge.is-new {
  background: rgba(16,185,129,.12);
  color: #0f8a59;
}

.product-rating-overview,
.product-insight-summary {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
}

.product-insight-summary {
  margin: .15rem 0 1rem;
}

.rating-stars-display {
  display: inline-flex;
  align-items: center;
  gap: .14rem;
  color: #f59e0b;
  font-size: .92rem;
}

.product-rating-overview-detail .rating-stars-display {
  font-size: 1rem;
}

.rating-text {
  color: var(--text-secondary, #4b5563);
  font-size: .84rem;
  font-weight: 700;
}

.rating-count {
  color: inherit;
}

.product-rating-form {
  display: grid;
  gap: .22rem;
}

.rating-selector {
  display: inline-flex;
  align-items: center;
  gap: .16rem;
  flex-wrap: wrap;
}

.rating-star-button {
  width: 1.7rem;
  height: 1.7rem;
  border: 0;
  background: transparent;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #d1d5db;
  transition: transform .16s ease, color .16s ease;
}

.rating-star-button i {
  pointer-events: none;
}

.rating-star-button:hover,
.rating-star-button:focus-visible,
.rating-star-button.is-selected,
.rating-star-button.is-preview {
  color: #f59e0b;
}

.rating-star-button:hover,
.rating-star-button:focus-visible {
  transform: translateY(-1px);
}

.rating-star-button:focus-visible {
  outline: 2px solid rgba(37,99,235,.25);
  outline-offset: 2px;
  border-radius: 999px;
}

.rating-helper {
  color: var(--text-secondary, #6b7280);
  font-size: .74rem;
  line-height: 1.35;
}

.product-rating-form-detail {
  margin: 0 0 1rem;
}

.rating-helper-detail {
  margin: -.15rem 0 1rem;
}

.product-detail-page .product-rating-form .rating-star-button {
  width: 2rem;
  height: 2rem;
  font-size: 1.05rem;
}

.product-detail-page .product-rating-overview {
  gap: .72rem;
}

.product-card-footer {
  align-items: end;
}

.product-detail-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-width: 168px;
  width: auto;
  align-self: flex-end;
  border-radius: .95rem;
  white-space: nowrap;
  padding-inline: 1rem;
}

.catalog-grid[data-view="list"] .product-card {
  flex-direction: row;
  align-items: stretch;
}

.catalog-grid[data-view="list"] .product-card .cover {
  flex: 0 0 230px;
  max-width: 230px;
}

.catalog-grid[data-view="list"] .product-card-body {
  display: flex;
  flex-direction: column;
}

.catalog-grid[data-view="list"] .product-title {
  margin-bottom: .55rem;
}

.catalog-grid[data-view="list"] .product-card-footer {
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: .9rem;
}

.catalog-grid[data-view="list"] .product-card-footer .price-block {
  flex: 1 1 auto;
}

.catalog-grid[data-view="list"] .product-card-footer .product-detail-button {
  flex: 0 0 auto;
  margin-left: auto;
}

.section-heading + .row .product-card,
.catalog-grid[data-view="grid"] .product-card {
  min-height: 100%;
}

.section-heading + .row .product-card-body,
.catalog-grid[data-view="grid"] .product-card-body {
  display: flex;
  flex-direction: column;
}

.section-heading + .row .product-card-footer,
.catalog-grid[data-view="grid"] .product-card-footer {
  margin-top: auto;
}

@media (max-width: 991.98px) {
  .catalog-grid[data-view="list"] .product-card {
    flex-direction: column;
  }

  .catalog-grid[data-view="list"] .product-card .cover {
    flex-basis: auto;
    max-width: 100%;
  }

  .catalog-grid[data-view="list"] .product-card-footer {
    gap: .75rem;
  }
}

@media (max-width: 767.98px) {
  .product-card .product-title {
    margin-bottom: .45rem;
  }

  .product-social-proof {
    gap: .35rem;
    margin-bottom: .82rem;
  }

  .product-counter-badge {
    font-size: .76rem;
    padding: .28rem .62rem;
  }

  .product-detail-button {
    width: 100%;
    min-width: 0;
    align-self: stretch;
  }

  .product-card-footer {
    align-items: stretch;
  }

  .product-rating-overview,
  .product-insight-summary {
    gap: .42rem;
  }

  .rating-stars-display {
    font-size: .88rem;
  }

  .rating-text {
    font-size: .78rem;
  }

  .rating-star-button {
    width: 1.58rem;
    height: 1.58rem;
  }
}

/* ===== Parche V3.8 · Vista lista comercial + catálogo de cursos ===== */
.academy-courses-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.25rem;
}

.academy-courses-heading > div {
  min-width: 0;
}

.academy-view-all {
  flex: 0 0 auto;
  white-space: nowrap;
}

.academy-view-all-mobile {
  display: none;
}

.academy-catalog-header .eyebrow,
.academy-catalog-section .product-category {
  color: var(--brand-primary, #1d4ed8);
}

/* En vista lista cada tarjeta ocupa una fila completa. */
.catalog-grid[data-view="list"] > .catalog-product-item {
  flex: 0 0 100% !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* Escritorio: portada | información social | precio y acción. */
@media (min-width: 992px) {
  .catalog-grid[data-view="list"] .product-card {
    display: grid !important;
    grid-template-columns: 230px minmax(0, 1fr) !important;
    min-height: 235px !important;
    align-items: stretch;
    overflow: hidden;
  }

  .catalog-grid[data-view="list"] .product-card .cover {
    width: 230px !important;
    max-width: 230px !important;
    min-height: 235px !important;
    height: 100% !important;
    flex: none !important;
    border-right: 1px solid var(--bs-border-color) !important;
    border-bottom: 0 !important;
  }

  .catalog-grid[data-view="list"] .product-card .cover img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .catalog-grid[data-view="list"] .product-card-body {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(210px, 255px);
    grid-template-rows: auto auto 1fr;
    column-gap: 1.75rem;
    row-gap: .35rem;
    padding: 1.15rem 1.35rem !important;
    min-width: 0;
  }

  .catalog-grid[data-view="list"] .product-category {
    grid-column: 1;
    grid-row: 1;
    align-self: end;
  }

  .catalog-grid[data-view="list"] .product-title {
    grid-column: 1;
    grid-row: 2;
    margin: 0 0 .25rem !important;
    min-height: 0 !important;
    font-size: 1.18rem !important;
    line-height: 1.25;
  }

  .catalog-grid[data-view="list"] .product-social-proof {
    grid-column: 1;
    grid-row: 3;
    align-content: start;
    margin: .15rem 0 0 !important;
    max-width: 540px;
  }

  .catalog-grid[data-view="list"] .product-card-footer {
    grid-column: 2;
    grid-row: 1 / 4;
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: stretch !important;
    gap: .8rem !important;
    margin: 0 !important;
    padding-left: .35rem;
    min-width: 0;
  }

  .catalog-grid[data-view="list"] .product-card-footer .price-block {
    display: grid;
    gap: .12rem;
    flex: none !important;
  }

  .catalog-grid[data-view="list"] .product-card-footer .product-detail-button {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 220px;
    margin: 0 !important;
    align-self: stretch !important;
  }

  .catalog-grid[data-view="list"] .product-card-regular-price,
  .catalog-grid[data-view="list"] .product-price-meta {
    white-space: normal;
  }

  .catalog-grid[data-view="list"] .rating-selector {
    margin-top: .12rem;
  }
}

/* Tablet: mantiene la lectura de lista, reduciendo la portada y el bloque de precio. */
@media (min-width: 768px) and (max-width: 991.98px) {
  .catalog-grid[data-view="list"] .product-card {
    display: grid !important;
    grid-template-columns: 170px minmax(0, 1fr) !important;
    min-height: 205px !important;
    overflow: hidden;
  }

  .catalog-grid[data-view="list"] .product-card .cover {
    width: 170px !important;
    max-width: 170px !important;
    min-height: 205px !important;
    height: 100% !important;
    border-right: 1px solid var(--bs-border-color) !important;
    border-bottom: 0 !important;
  }

  .catalog-grid[data-view="list"] .product-card-body {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 200px;
    grid-template-rows: auto auto 1fr;
    gap: .3rem 1rem;
    padding: .95rem 1rem !important;
  }

  .catalog-grid[data-view="list"] .product-category { grid-column: 1; grid-row: 1; }
  .catalog-grid[data-view="list"] .product-title { grid-column: 1; grid-row: 2; margin-bottom: .2rem; }
  .catalog-grid[data-view="list"] .product-social-proof { grid-column: 1; grid-row: 3; margin-bottom: 0; }
  .catalog-grid[data-view="list"] .product-card-footer {
    grid-column: 2;
    grid-row: 1 / 4;
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: stretch !important;
    gap: .65rem;
    margin: 0 !important;
  }

  .catalog-grid[data-view="list"] .product-detail-button {
    width: 100% !important;
    min-width: 0 !important;
  }
}

/* Móvil: la vista lista sigue siendo distinta de la cuadrícula y conserva portada lateral. */
@media (max-width: 767.98px) {
  .catalog-grid[data-view="list"] {
    --bs-gutter-y: .72rem;
  }

  .catalog-grid[data-view="list"] .product-card {
    display: grid !important;
    grid-template-columns: 108px minmax(0, 1fr) !important;
    min-height: 0 !important;
    overflow: hidden;
  }

  .catalog-grid[data-view="list"] .product-card .cover {
    width: 108px !important;
    max-width: 108px !important;
    height: 100% !important;
    min-height: 205px !important;
    border-right: 1px solid var(--bs-border-color) !important;
    border-bottom: 0 !important;
  }

  .catalog-grid[data-view="list"] .product-card .cover img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .catalog-grid[data-view="list"] .type-badge {
    left: .45rem;
    top: .45rem;
    font-size: .65rem;
    padding: .28rem .48rem;
  }

  .catalog-grid[data-view="list"] .offer-badge {
    right: .42rem;
    top: .42rem;
    font-size: .66rem;
    padding: .28rem .44rem;
  }

  .catalog-grid[data-view="list"] .product-card-body {
    display: flex !important;
    flex-direction: column;
    padding: .72rem .75rem !important;
    min-width: 0;
  }

  .catalog-grid[data-view="list"] .product-category {
    font-size: .67rem;
    line-height: 1.2;
    margin-bottom: .25rem;
  }

  .catalog-grid[data-view="list"] .product-title {
    font-size: .93rem !important;
    line-height: 1.24;
    margin-bottom: .42rem !important;
    min-height: 0 !important;
  }

  .catalog-grid[data-view="list"] .product-social-proof {
    gap: .28rem;
    margin-bottom: .55rem !important;
  }

  .catalog-grid[data-view="list"] .product-counter-badge {
    font-size: .68rem;
    padding: .23rem .48rem;
  }

  .catalog-grid[data-view="list"] .rating-stars-display {
    font-size: .72rem;
  }

  .catalog-grid[data-view="list"] .rating-text {
    font-size: .7rem;
  }

  .catalog-grid[data-view="list"] .rating-star-button {
    width: 1.35rem;
    height: 1.35rem;
    font-size: .78rem;
  }

  .catalog-grid[data-view="list"] .rating-helper {
    font-size: .66rem;
  }

  .catalog-grid[data-view="list"] .product-card-footer {
    display: flex !important;
    flex-direction: column;
    align-items: stretch !important;
    gap: .5rem !important;
    margin-top: auto !important;
  }

  .catalog-grid[data-view="list"] .price-block {
    gap: .08rem;
  }

  .catalog-grid[data-view="list"] .product-card-regular-price,
  .catalog-grid[data-view="list"] .product-price-meta {
    font-size: .66rem;
  }

  .catalog-grid[data-view="list"] .offer-label {
    font-size: .68rem;
  }

  .catalog-grid[data-view="list"] .product-card-dual-price {
    font-size: 1rem;
  }

  .catalog-grid[data-view="list"] .product-detail-button {
    width: 100% !important;
    min-width: 0 !important;
    padding: .52rem .55rem;
    border-radius: .7rem;
    font-size: .75rem;
  }

  .academy-courses-heading {
    display: block;
  }

  .academy-courses-heading .academy-view-all {
    display: none;
  }

  .academy-view-all-mobile {
    display: block;
  }
}

@media (max-width: 420px) {
  .catalog-grid[data-view="list"] .product-card {
    grid-template-columns: 96px minmax(0, 1fr) !important;
  }

  .catalog-grid[data-view="list"] .product-card .cover {
    width: 96px !important;
    max-width: 96px !important;
    min-height: 195px !important;
  }

  .catalog-grid[data-view="list"] .product-card-body {
    padding: .62rem .65rem !important;
  }
}

/* Parche V3.9 · accesos rápidos del asistente */
.servi-assistant-quick {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 575.98px) {
  .servi-assistant-quick {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .servi-assistant-quick button {
    min-height: 48px;
  }
}

/* ==========================================================
   V3.11 - Corrección de alineación en resumen del pedido
   ========================================================== */
.checkout-summary-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 1rem;
}

.checkout-summary-item > span {
  min-width: 0;
}

.checkout-summary-item > b,
.checkout-pricing-lines > div > strong,
.checkout-total > strong,
.checkout-usd-reference > strong {
  flex: 0 0 auto;
  min-width: max-content;
  white-space: nowrap;
  text-align: right;
  line-height: 1.1;
}

.checkout-pricing-lines > div,
.checkout-total,
.checkout-usd-reference {
  align-items: center;
}

@media (max-width: 575.98px) {
  .checkout-summary-item {
    gap: .8rem;
  }

  .checkout-summary-item > b {
    font-size: 1rem;
  }

  .checkout-pricing-lines > div {
    gap: .8rem;
  }

  .checkout-total > strong {
    font-size: 1.3rem;
  }
}

/* ==========================================================
   V3.14 - Misión y Visión sin alterar el menú acumulado
   ========================================================== */
.about-detail-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.about-detail-card > span {
  margin: 0 auto 1rem;
}

.about-detail-card h2 {
  width: 100%;
  margin: 0 0 .9rem;
  text-align: center;
}

.about-detail-card p {
  width: 100%;
  margin: 0;
  color: var(--bs-secondary-color);
  text-align: justify;
  text-justify: inter-word;
  line-height: 1.75;
  hyphens: auto;
}

@media (max-width: 767.98px) {
  .about-detail-card {
    padding: 1.5rem;
  }

  .about-detail-card > span {
    width: 52px;
    height: 52px;
    margin-bottom: .85rem;
  }

  .about-detail-card h2 {
    margin-bottom: .75rem;
  }

  .about-detail-card p {
    font-size: 1rem;
    line-height: 1.65;
  }
}

/* ==========================================================
   V3.15 - Ajuste responsive del hero principal
   ========================================================== */
.corporate-hero .container {
  position: relative;
  z-index: 1;
}

.corporate-hero .row {
  min-height: clamp(520px, 72vh, 720px);
}

.corporate-hero h1 {
  max-width: 10.5ch;
  font-size: clamp(2.9rem, 5.3vw, 5.2rem);
  line-height: .95;
  letter-spacing: -.06em;
  text-wrap: balance;
}

.corporate-hero .lead {
  max-width: 780px;
  line-height: 1.55;
  text-wrap: pretty;
}

.corporate-hero .btn-lg {
  min-height: 54px;
  padding-inline: 1.4rem;
  font-size: 1.06rem;
  font-weight: 800;
  border-radius: 14px;
}

.corporate-trust-row {
  gap: .8rem 1.2rem;
}

.corporate-hero-panel {
  width: min(100%, 380px);
}

.corporate-hero-mini-grid a {
  min-height: 92px;
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  .corporate-hero h1 {
    max-width: 11ch;
    font-size: clamp(2.85rem, 4.8vw, 4.55rem);
  }

  .corporate-hero .lead {
    max-width: 690px;
    font-size: 1.08rem;
  }

  .corporate-hero-panel {
    width: min(100%, 360px);
  }
}

@media (max-width: 991.98px) {
  .corporate-hero .row {
    min-height: auto;
  }

  .corporate-hero .container {
    padding-top: 2.8rem !important;
    padding-bottom: 2.8rem !important;
  }

  .corporate-hero h1 {
    max-width: 12ch;
    margin-inline: auto;
    font-size: clamp(2.5rem, 9vw, 4.1rem);
    line-height: .98;
    letter-spacing: -.05em;
  }

  .corporate-hero .lead {
    max-width: 720px;
    font-size: 1.06rem;
  }

  .corporate-hero .d-flex {
    justify-content: center;
  }

  .corporate-hero-panel {
    width: min(100%, 430px);
    margin-top: .5rem;
  }
}

@media (max-width: 767.98px) {
  .corporate-kicker {
    margin-bottom: .85rem;
    font-size: .74rem;
  }

  .corporate-hero h1 {
    max-width: 9ch;
    font-size: clamp(2.35rem, 12vw, 3.55rem);
    line-height: 1.01;
    letter-spacing: -.05em;
  }

  .corporate-hero .lead {
    font-size: 1rem;
    line-height: 1.6;
  }

  .corporate-hero .d-flex {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .corporate-hero .btn-lg {
    width: 100%;
    justify-content: center;
  }

  .corporate-trust-row {
    justify-content: center;
    gap: .65rem 1rem;
    font-size: .88rem;
  }

  .corporate-hero-panel {
    width: 100%;
    max-width: 420px;
    padding: 1.5rem 1.15rem;
    border-radius: 24px;
  }

  .corporate-hero-logo {
    width: 98px;
    height: 98px;
    margin-bottom: 1rem;
  }

  .corporate-hero-panel > strong {
    font-size: 1.42rem;
  }

  .corporate-hero-panel > p {
    margin-bottom: 1rem;
    font-size: .98rem;
  }

  .corporate-hero-mini-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: .55rem;
  }

  .corporate-hero-mini-grid a {
    min-height: 84px;
    padding: .7rem .35rem;
    font-size: .76rem;
  }

  .corporate-hero-mini-grid i {
    font-size: 1.15rem;
  }
}

@media (max-width: 420px) {
  .corporate-hero .container {
    padding-top: 2.35rem !important;
    padding-bottom: 2.35rem !important;
  }

  .corporate-hero h1 {
    max-width: 8.2ch;
    font-size: clamp(2.12rem, 13vw, 3.2rem);
  }

  .corporate-hero .lead {
    font-size: .97rem;
  }

  .corporate-hero-mini-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================
   V3.16 - Título principal en dos líneas en modo web
   Solo afecta el hero corporativo en escritorio.
   ========================================================== */
@media (min-width: 992px) {
  .corporate-hero h1 {
    max-width: 100%;
    font-size: clamp(3.35rem, 4.45vw, 4.65rem);
    line-height: .98;
    letter-spacing: -.055em;
    text-wrap: balance;
  }
}

@media (min-width: 1200px) {
  .corporate-hero h1 {
    max-width: 760px;
  }
}

/* ==========================================================
   V3.17 - Ajuste visual de tarjetas en Nuestros servicios
   ========================================================== */
.corporate-service-card {
  align-items: stretch;
}

.corporate-service-card .corporate-service-icon {
  margin-inline: auto;
}

.corporate-service-card small {
  display: block;
  text-align: center;
}

.corporate-service-card h3,
.corporate-service-card h2 {
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: clamp(1.7rem, 2.2vw, 2.25rem);
}

.corporate-service-card p {
  text-align: justify;
  text-justify: inter-word;
  line-height: 1.65;
}

@media (max-width: 767.98px) {
  .corporate-service-card h3,
  .corporate-service-card h2 {
    font-size: clamp(1.5rem, 6vw, 1.9rem);
  }
}

/* Los nombres principales Store, Academy y Studio mantienen una sola línea. */
.corporate-service-card.corporate-service-card-primary h3 {
  min-height: 1.15em;
  white-space: nowrap;
  overflow-wrap: normal;
  font-size: clamp(1.45rem, 2vw, 1.9rem);
  line-height: 1.15;
  letter-spacing: -.035em;
}

@media (max-width: 767.98px) {
  .corporate-service-card.corporate-service-card-primary h3 {
    font-size: clamp(1.28rem, 6vw, 1.55rem);
  }
}

/* ==========================================================
   V3.18 - Ficha de producto/curso sin espacios artificiales
   Portada proporcional + acceso bajo portada + información ancha
   ========================================================== */
.product-detail-page .product-detail-layout {
  display: grid;
  grid-template-columns: minmax(270px, 350px) minmax(0, 1fr);
  grid-template-areas:
    "cover commerce"
    "access commerce"
    "information information";
  column-gap: clamp(1.5rem, 3vw, 2.6rem);
  row-gap: 1rem;
  align-items: start;
}

.product-detail-cover-area {
  grid-area: cover;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-width: 0;
}

.product-detail-commerce {
  grid-area: commerce;
  min-width: 0;
}

.product-detail-access-area {
  grid-area: access;
  width: min(100%, 350px);
  justify-self: center;
  align-self: start;
}

.product-detail-information-wide {
  grid-area: information;
  width: 100%;
  margin-top: .35rem !important;
}

/* La caja de la portada ya no impone altura ni relación de aspecto. */
.product-detail-page .product-detail-cover {
  width: min(100%, 350px) !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  margin: 0 auto !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  overflow: visible !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* La imagen conserva su proporción real y termina donde termina el archivo. */
.product-detail-page .product-detail-cover > img {
  display: block;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  padding: 0 !important;
  margin: 0 !important;
  object-fit: contain !important;
  object-position: top center !important;
  border: 1px solid var(--bs-border-color);
  border-radius: 20px;
  background: var(--bs-body-bg);
  box-shadow: 0 14px 34px rgba(16,24,40,.08);
}

/* Cuando no existe portada, sí se mantiene una caja visual controlada. */
.product-detail-page .product-detail-cover > .cover-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 390px;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--bs-border-color);
  border-radius: 20px;
  background: linear-gradient(145deg,#f3f6ff,#eef8ff);
  color: var(--brand);
  font-size: 3rem;
  box-shadow: 0 14px 34px rgba(16,24,40,.08);
}

[data-bs-theme="dark"] .product-detail-page .product-detail-cover > .cover-placeholder {
  background: linear-gradient(145deg,#111827,#172238);
}

.product-detail-page .product-detail-access-area .download-conditions {
  width: 100%;
  margin: 0 !important;
  padding: .95rem 1rem;
  border-radius: 16px;
}

.product-detail-page .product-detail-access-area .download-conditions strong {
  display: block;
  margin-bottom: .18rem;
}

.product-detail-page .product-detail-access-area .download-conditions p {
  margin: .16rem 0 .3rem;
  line-height: 1.55;
}

.product-detail-page .product-detail-information-wide .product-information-body {
  width: 100%;
}

.product-detail-page .product-detail-information-wide .product-description-copy {
  text-align: justify;
  text-justify: inter-word;
  line-height: 1.72;
}

.product-detail-page .product-detail-information-wide h3 {
  margin-top: 1.2rem;
}

@media (min-width: 1200px) {
  .product-detail-page .product-detail-layout {
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  }

  .product-detail-access-area,
  .product-detail-page .product-detail-cover {
    width: min(100%, 360px) !important;
  }
}

@media (max-width: 991.98px) {
  .product-detail-page .product-detail-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "cover"
      "commerce"
      "access"
      "information";
    gap: 1rem;
  }

  .product-detail-page .product-detail-cover {
    width: min(78vw, 330px) !important;
  }

  .product-detail-access-area {
    width: 100%;
  }

  .product-detail-page .product-detail-access-area .download-conditions {
    max-width: none;
  }
}

@media (max-width: 575.98px) {
  .product-detail-page .product-detail-cover {
    width: min(82vw, 300px) !important;
  }

  .product-detail-page .product-detail-cover > img,
  .product-detail-page .product-detail-cover > .cover-placeholder {
    border-radius: 17px;
  }

  .product-detail-page .product-detail-cover > .cover-placeholder {
    min-height: 320px;
  }

  .product-detail-page .product-detail-access-area .download-conditions {
    padding: .85rem .9rem;
  }

  .product-detail-page .product-detail-information-wide {
    margin-top: 0 !important;
  }

  .product-detail-page .product-detail-information-wide .product-description-copy {
    line-height: 1.62;
  }
}

/* ==========================================================
   V3.19 - Texto de descargas por licencia + justificado
   ========================================================== */
.product-detail-page .product-detail-access-area .download-conditions > div {
  min-width: 0;
  width: 100%;
}

.product-detail-page .product-detail-access-area .download-conditions p,
.product-detail-page .product-detail-access-area .download-conditions small {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.product-detail-page .product-detail-access-area .download-conditions p {
  line-height: 1.65;
}

.product-detail-page .product-detail-access-area .download-conditions small {
  line-height: 1.55;
}

/* ==========================================================
   V3.20 - Altura automática según Descripción y requisitos
   Sin alturas fijas ni recortes de contenido.
   ========================================================== */
.product-detail-page,
.product-detail-page .product-detail-layout,
.product-detail-page .product-detail-information-wide,
.product-detail-page .product-information,
.product-detail-page .product-information-body,
.product-detail-page .product-description-copy {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
}

.product-detail-page .product-detail-layout {
  grid-auto-rows: max-content;
  align-content: start;
}

.product-detail-page .product-detail-information-wide,
.product-detail-page .product-information,
.product-detail-page .product-information-body {
  overflow: visible !important;
}

.product-detail-page .product-information-body {
  display: block;
}

.product-detail-page .product-description-copy {
  display: block;
  width: 100%;
  overflow: visible !important;
  overflow-wrap: anywhere;
  word-break: normal;
}

/* El último párrafo no agrega espacio inferior artificial. */
.product-detail-page .product-information-body > :last-child {
  margin-bottom: 0 !important;
}

/* Mantiene el contenido compacto cuando la descripción es corta. */
.product-detail-page .product-detail-information-wide.content-box {
  padding-bottom: clamp(1rem, 2vw, 1.5rem);
}

@media (max-width: 991.98px) {
  .product-detail-page .product-detail-layout {
    grid-auto-rows: max-content;
  }

  .product-detail-page .product-detail-information-wide,
  .product-detail-page .product-information-body {
    width: 100%;
  }
}

/* V3.21 - Verificador de certificados compacto y legible. */
.verification-hero {
  padding: 3.25rem 0 3.5rem;
}

.verification-hero .container {
  width: min(100% - 2rem, 900px);
}

.verification-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
}

.verification-hero h1 {
  max-width: 720px;
  margin: .65rem auto .75rem;
  font-size: clamp(2.35rem, 5vw, 3.55rem);
  line-height: 1.03;
}

.verification-hero p {
  max-width: 610px;
  margin: 0 auto;
  font-size: clamp(.98rem, 1.8vw, 1.08rem);
  line-height: 1.65;
}

.verification-search {
  width: min(100%, 760px);
  margin-top: 1.35rem;
}

.verification-search .btn {
  min-width: 150px;
}

.verification-search-help {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-top: .75rem;
}

@media (max-width: 767.98px) {
  .verification-hero {
    padding: 2.5rem 0 2.8rem;
  }

  .verification-hero h1 {
    font-size: clamp(2rem, 11vw, 2.75rem);
  }

  .verification-search {
    grid-template-columns: 1fr;
    margin-top: 1.15rem;
  }

  .verification-search .btn {
    width: 100%;
  }
}

/* V3.22 - Fundadores y equipo: presentación pública y edición exclusiva. */
.team-public-section {
  scroll-margin-top: 92px;
  background:
    radial-gradient(circle at 12% 16%, rgba(35,87,217,.11), transparent 27rem),
    linear-gradient(180deg, rgba(234,241,255,.45), rgba(255,255,255,0));
}

.team-section-heading { max-width: 760px; }
.team-section-heading h2 { margin: .45rem 0 .75rem; font-size: clamp(2rem,4vw,3.1rem); font-weight: 850; letter-spacing: -.035em; }
.team-section-heading p { margin: 0; color: var(--bs-secondary-color); font-size: 1.08rem; line-height: 1.75; }
.team-public-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1.4rem; }
.team-public-card { min-width: 0; overflow: hidden; border: 1px solid rgba(35,87,217,.13); border-radius: 26px; background: var(--bs-body-bg); box-shadow: 0 18px 50px rgba(16,24,40,.09); transition: transform .2s ease,box-shadow .2s ease; }
.team-public-card:hover { transform: translateY(-5px); box-shadow: 0 24px 60px rgba(16,24,40,.13); }
.team-public-photo { position: relative; display: grid; place-items: center; aspect-ratio: 4/3; overflow: hidden; color: #fff; background: linear-gradient(135deg,#153b98,#285fe3 58%,#7253e7); }
.team-public-photo::after { position: absolute; inset: 0; content: ""; background: linear-gradient(180deg,transparent 55%,rgba(9,22,54,.48)); pointer-events: none; }
.team-public-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.team-public-photo > span { font-size: clamp(3.2rem,7vw,5.4rem); font-weight: 850; letter-spacing: -.06em; opacity: .92; }
.team-member-badge { position: absolute; z-index: 1; left: 1rem; bottom: 1rem; display: inline-flex; align-items: center; gap: .45rem; padding: .48rem .78rem; border: 1px solid rgba(255,255,255,.42); border-radius: 999px; color: #fff; background: rgba(12,31,73,.7); backdrop-filter: blur(8px); font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.team-member-badge.is-founder { color: #3d2800; border-color: rgba(255,229,142,.65); background: linear-gradient(135deg,#ffe79b,#f7c948); }
.team-public-copy { padding: 1.35rem 1.4rem 1.5rem; }
.team-member-role { margin: 0 0 .3rem; color: var(--brand); font-size: .78rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.team-public-copy h3 { margin: 0 0 .65rem; font-size: 1.38rem; font-weight: 850; overflow-wrap: anywhere; }
.team-member-specialty { display: flex; align-items: flex-start; gap: .5rem; margin: 0 0 .8rem; color: var(--bs-secondary-color); font-weight: 700; line-height: 1.45; }
.team-member-specialty i { margin-top: .2rem; color: #f2ad00; }
.team-member-biography { margin: 0; color: var(--bs-secondary-color); line-height: 1.7; overflow-wrap: anywhere; }
.team-linkedin { display: inline-flex; align-items: center; gap: .45rem; margin-top: 1rem; font-weight: 750; text-decoration: none; }
.team-admin-list { display: grid; gap: 1rem; }
.team-admin-card { min-width: 0; }
.team-admin-summary { display: grid; grid-template-columns: 84px minmax(0,1fr); align-items: center; gap: 1rem; min-width: 0; }
.team-admin-avatar { display: grid; place-items: center; width: 84px; aspect-ratio: 1; overflow: hidden; border-radius: 22px; color: #fff; background: linear-gradient(135deg,#1944ab,#6547db); font-size: 1.7rem; font-weight: 850; }
.team-admin-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.team-admin-editor { border-top: 1px solid var(--bs-border-color); }
.team-admin-editor summary { padding-top: 1rem; color: var(--brand); cursor: pointer; font-weight: 800; }
.team-admin-editor summary::marker { color: var(--brand); }
.min-w-0 { min-width: 0; }

[data-bs-theme="dark"] .team-public-section { background: radial-gradient(circle at 12% 16%,rgba(58,105,224,.16),transparent 27rem); }
[data-bs-theme="dark"] .team-public-card { border-color: rgba(125,158,246,.18); }

@media (max-width: 991.98px) {
  .team-public-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 575.98px) {
  .team-public-grid { grid-template-columns: 1fr; }
  .team-public-card:hover { transform: none; }
  .team-public-photo { aspect-ratio: 5/3; }
  .team-public-copy { padding: 1.15rem; }
  .team-admin-summary { grid-template-columns: 64px minmax(0,1fr); gap: .8rem; align-items: start; }
  .team-admin-avatar { width: 64px; border-radius: 18px; font-size: 1.25rem; }
}

/* Biblioteca: tres tarjetas por fila y acciones compactas en escritorio. */
@media (min-width: 768px) {
  .account-page #downloads .download-card-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    align-self: end;
    gap: .3rem;
    width: 100%;
  }

  .account-page #downloads .download-card-actions .btn,
  .account-page #downloads .download-card-actions .download-state-chip {
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    min-height: 34px;
    padding: .32rem .3rem;
    font-size: .62rem;
    white-space: nowrap;
  }

  .account-page #downloads .download-card-actions .me-1 {
    margin-right: .15rem !important;
  }
}

.license-action-label-short { display: none; }

@media (min-width: 992px) and (max-width: 1199.98px) {
  .account-page #downloads .license-action-label-full { display: none; }
  .account-page #downloads .license-action-label-short { display: inline; }
}

/* La tarjeta decide cuándo mostrar solo iconos, sin depender del ancho total de la pantalla. */
.account-page #downloads .download-card {
  container-name: library-card;
  container-type: inline-size;
  grid-template-columns: minmax(0, 1fr);
}

.account-page #downloads .download-card > .download-icon {
  position: absolute;
  top: .9rem;
  right: .9rem;
  z-index: 1;
  width: 44px;
  height: 44px;
  border: 1px solid color-mix(in srgb, var(--brand) 16%, var(--bs-border-color));
  border-radius: 14px;
  box-shadow: 0 9px 20px rgba(34, 85, 210, .13);
}

.account-page #downloads .download-card > .download-card-copy {
  grid-column: 1 / -1;
  padding-right: 3.45rem;
}

@container library-card (max-width: 325px) {
  .download-card-actions {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: .42rem;
  }

  .download-card-actions .btn,
  .download-card-actions .download-state-chip {
    flex: 0 0 38px !important;
    width: 38px !important;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0 !important;
    border-radius: 10px;
    font-size: .78rem;
  }

  .download-card-actions .download-action-label,
  .download-card-actions .license-action-label-full,
  .download-card-actions .license-action-label-short {
    display: none !important;
  }

  .download-card-actions .me-1 {
    margin-right: 0 !important;
  }
}

.account-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  margin-top: 1.4rem;
}

.account-pagination-pages {
  display: flex;
  align-items: center;
  gap: .35rem;
}

.account-pagination-control,
.account-pagination-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-height: 38px;
  border: 1px solid #cbd7ed;
  border-radius: 11px;
  color: var(--brand);
  background: var(--surface, #fff);
  font-size: .8rem;
  font-weight: 800;
  text-decoration: none;
}

.account-pagination-control { padding: .5rem .75rem; }
.account-pagination-page { width: 38px; }
.account-pagination-page.active { border-color: var(--brand); color: #fff; background: var(--brand); }
.account-pagination-control:hover,
.account-pagination-page:hover { border-color: var(--brand); color: var(--brand); }
.account-pagination-page.active:hover { color: #fff; }
.account-pagination-control.disabled { opacity: .45; pointer-events: none; }
.account-pagination-ellipsis { color: var(--muted); font-weight: 800; }

.attempt-admin-list,.attempt-history-list { display:grid; gap:.75rem; }
.attempt-admin-card { border:1px solid var(--bs-border-color); border-radius:14px; padding:.85rem 1rem; background:var(--bs-body-bg); }
.attempt-admin-card summary { display:flex; align-items:center; justify-content:space-between; gap:1rem; cursor:pointer; list-style:none; }
.attempt-admin-card summary::-webkit-details-marker { display:none; }
.attempt-admin-card summary > span:first-child { display:grid; gap:.2rem; min-width:0; }
.attempt-admin-card summary small { color:var(--bs-secondary-color); overflow-wrap:anywhere; }
.attempt-history-list > div { display:grid; grid-template-columns:auto minmax(0,1fr); gap:.3rem .7rem; align-items:center; padding:.75rem 0; border-bottom:1px solid var(--bs-border-color); }
.attempt-history-list > div small { grid-column:2; color:var(--bs-secondary-color); }
@media (max-width:575.98px) { .attempt-admin-card summary { align-items:flex-start; } .attempt-admin-card summary .badge { flex-shrink:0; } .attempt-history-list > div { grid-template-columns:1fr; } .attempt-history-list > div small { grid-column:1; } }

@media (max-width: 575.98px) {
  .account-pagination { gap: .4rem; }
  .account-pagination-control { min-width: 38px; padding: .45rem; }
  .account-pagination-control span { display: none; }
  .account-pagination-page { width: 36px; min-height: 36px; }
}

/* Aula avanzada: acciones compactas, trabajos y resultados adaptables. */
.compact-action-row{display:flex;flex-wrap:wrap;align-items:center;gap:.45rem}.compact-action-row .btn{width:auto;white-space:nowrap}.assignment-admin-list{display:grid;gap:.75rem}.assignment-admin-list article,.assignment-review-head{display:flex;align-items:center;justify-content:space-between;gap:1rem}.assignment-admin-list article{padding:.9rem;border:1px solid var(--bs-border-color);border-radius:14px}.assignment-admin-list h3{margin:.35rem 0 .15rem;font-size:1rem}.assignment-admin-list small{display:block;color:var(--bs-secondary-color)}.assignment-format-grid{display:flex;flex-wrap:wrap;gap:.45rem 1rem}.assignment-review-card,.assignment-student-card{max-width:980px}.assignment-text,.assignment-instructions{padding:1rem;border:1px solid var(--bs-border-color);border-radius:12px;background:var(--bs-tertiary-bg);overflow-wrap:anywhere}.assignment-result-panel{padding:1rem;border-left:4px solid var(--brand);border-radius:10px;background:var(--bs-tertiary-bg)}.assignment-result-panel>div{display:flex;justify-content:space-between;gap:1rem}.question-edit-disclosure{border:1px solid var(--bs-border-color);border-radius:12px;overflow:hidden}.question-edit-disclosure summary{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.75rem;padding:.85rem;cursor:pointer;list-style:none}.question-edit-disclosure summary>span{display:grid;place-items:center;width:32px;height:32px;border-radius:9px;color:#fff;background:var(--brand);font-weight:800}.question-edit-disclosure summary small{display:block;color:var(--bs-secondary-color)}.question-inline-form{display:grid;gap:.55rem;padding:.85rem;border-top:1px solid var(--bs-border-color)}.assessment-result-card{max-width:720px;text-align:center}.assessment-result-icon{display:grid;place-items:center;width:72px;height:72px;margin:0 auto 1rem;border-radius:24px;color:#fff;background:var(--brand);font-size:2rem}.assessment-result-card.is-passed .assessment-result-icon{background:#159447}.assessment-score{display:grid;place-items:center;margin:1rem auto}.assessment-score strong{font-size:clamp(3rem,9vw,5.5rem);line-height:1;color:var(--brand)}.assessment-score span{color:var(--bs-secondary-color)}.assessment-result-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.65rem;margin:1.2rem 0}.assessment-result-metrics>span{display:grid;padding:.8rem;border:1px solid var(--bs-border-color);border-radius:12px}.assessment-result-metrics small{color:var(--bs-secondary-color)}.exam-question{display:grid;grid-template-columns:44px minmax(0,1fr);column-gap:1rem;padding:1.25rem}.exam-question-number{position:static;grid-row:1/span 2}.exam-question h2,.exam-question .exam-options{grid-column:2}.certificate-document-page{overflow-x:hidden}.certificate-signature-image img{mix-blend-mode:multiply}
.assignment-schedule-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem;margin-top:1rem}.assignment-schedule-option{padding:.8rem;border:1px solid var(--bs-border-color);border-radius:12px;background:var(--bs-tertiary-bg);transition:border-color .2s,box-shadow .2s}.assignment-schedule-option.is-enabled{border-color:rgba(var(--bs-primary-rgb),.55);box-shadow:0 0 0 3px rgba(var(--bs-primary-rgb),.08)}.assignment-schedule-option .form-check-label{font-weight:700}.assignment-admin-schedule{margin-top:.35rem;color:var(--brand)!important}.assignment-student-schedule{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem}.assignment-student-schedule:empty{display:none}.assignment-student-schedule>div{display:flex;align-items:center;gap:.7rem;padding:.8rem;border:1px solid var(--bs-border-color);border-radius:12px;background:var(--bs-tertiary-bg)}.assignment-student-schedule i{color:var(--brand);font-size:1.1rem}.assignment-student-schedule span,.assignment-student-schedule strong{display:block}.assignment-student-schedule span{font-size:.78rem;color:var(--bs-secondary-color)}.assignment-student-schedule strong{font-size:.9rem;color:var(--bs-body-color)}
.assignment-selected-file{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.8rem;margin-top:.65rem;padding:.8rem;border:1px solid rgba(25,135,84,.35);border-radius:12px;background:rgba(25,135,84,.08)}.assignment-selected-file>i{color:#198754;font-size:1.4rem}.assignment-selected-file>span{min-width:0}.assignment-selected-file strong,.assignment-selected-file small{display:block}.assignment-selected-file strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.assignment-selected-file small{color:var(--bs-secondary-color)}.assignment-selected-file>div{display:flex;flex-wrap:wrap;gap:.4rem}
.assignment-instructions-panel{margin-top:.2rem;border:1px solid var(--bs-border-color);border-radius:14px;overflow:hidden;background:var(--bs-body-bg)}.assignment-instructions-heading{display:flex;align-items:center;gap:.6rem;padding:.8rem 1rem;border-bottom:1px solid var(--bs-border-color);background:var(--bs-tertiary-bg)}.assignment-instructions-heading i{color:var(--brand)}.assignment-instructions-heading h2{margin:0;font-size:1rem;font-weight:800}.assignment-instructions-panel .assignment-instructions{border:0;border-radius:0;background:transparent}.assignment-review-card{scroll-margin-top:1rem}.assignment-review-card:target{border-color:var(--brand);box-shadow:0 0 0 3px rgba(var(--bs-primary-rgb),.14),0 12px 30px rgba(16,24,40,.08)}.assignment-review-schedule{color:var(--bs-secondary-color);font-size:.9rem}
.assignment-edit-submission-form{margin-top:-.5rem;padding:1rem;border:1px solid var(--bs-border-color);border-radius:12px;background:var(--bs-tertiary-bg)}
@media(max-width:767.98px){.compact-action-row{justify-content:center}.compact-action-row .btn span{display:none}.compact-action-row .btn{display:inline-grid;place-items:center;min-width:36px;min-height:34px;padding:.35rem .55rem}.assignment-admin-list article,.assignment-review-head{align-items:flex-start;flex-direction:column}.assignment-admin-list article .compact-action-row{align-self:stretch}.assignment-schedule-grid,.assignment-student-schedule{grid-template-columns:1fr}.assessment-result-metrics{grid-template-columns:1fr}.exam-question{grid-template-columns:34px minmax(0,1fr);padding:.9rem}.exam-question-number{width:34px;height:34px}.certificate-actions{justify-content:center}.certificate-actions .btn{font-size:.78rem;padding:.4rem .65rem}.certificate-document{width:100%;min-width:0;aspect-ratio:1.414/1;padding:4px}.certificate-document-v2 .certificate-tech-frame{padding:2.5%}.certificate-document-v2 :is(.certificate-heading h1,.certificate-recipient h2){line-height:1}.certificate-footer-row-v3 .certificate-signature-image{height:clamp(18px,5vw,34px)}.certificate-footer-row-v3 .certificate-signature-image img{max-width:100%!important}.certificate-verification-route{display:none}.certificate-qr{transform:scale(.72);transform-origin:right bottom}.student-course-table table,.student-course-table tbody,.student-course-table tr,.student-course-table td{display:block;width:100%}.student-course-table thead{display:none}.student-course-table tr{padding:.75rem;border-bottom:1px solid var(--bs-border-color)}.student-course-table td{display:grid;grid-template-columns:42% 58%;padding:.4rem 0;border:0}.student-course-table td:before{content:attr(data-label);color:var(--bs-secondary-color);font-weight:700}}
@media(max-width:575.98px){.assignment-selected-file{grid-template-columns:auto minmax(0,1fr)}.assignment-selected-file>div{grid-column:1/-1;width:100%}.assignment-selected-file>div .btn{flex:1}}

/* Certificado completo escalado como una hoja, sin ocultar contenido en móvil. */
.certificate-preview-stage{--certificate-scale:1;position:relative;width:min(100%,1120px);aspect-ratio:1120/792;margin-inline:auto;overflow:hidden}
.certificate-preview-stage .certificate-document{position:absolute;top:0;left:0;width:1120px;min-width:1120px;max-width:none;height:792px;margin:0;padding:10px;aspect-ratio:auto;transform:scale(var(--certificate-scale));transform-origin:top left;cursor:zoom-in}
.certificate-expand-button{position:absolute;right:.65rem;bottom:.65rem;z-index:4;display:inline-grid;place-items:center;width:2.25rem;height:2.25rem;padding:0;border:1px solid rgba(255,255,255,.75);border-radius:50%;color:#fff;background:rgba(8,47,87,.84);box-shadow:0 5px 18px rgba(15,23,42,.22)}
.certificate-mobile-hint{display:none}
.certificate-preview-stage.is-expanded{position:fixed;inset:0;z-index:2100;width:100vw;max-width:none;height:100vh;margin:0;aspect-ratio:auto;background:rgba(5,12,24,.94)}
.certificate-preview-stage.is-expanded .certificate-document{cursor:zoom-out}
.certificate-preview-stage.is-expanded .certificate-expand-button{position:fixed;top:.75rem;right:.75rem;bottom:auto;width:2.65rem;height:2.65rem;background:#fff;color:#10213d}
body.certificate-preview-open{overflow:hidden}
.certificate-export-stage{position:fixed!important;top:0!important;left:-20000px!important;width:1120px!important;height:792px!important;max-width:none!important;overflow:visible!important;pointer-events:none}
.certificate-export-stage .certificate-document{top:0!important;left:0!important;transform:none!important}
@media(max-width:767.98px){.certificate-document-page>.container{padding-inline:.65rem}.certificate-preview-stage .certificate-document{width:1120px;min-width:1120px;height:792px;padding:10px;aspect-ratio:auto}.certificate-preview-stage .certificate-document-v2 .certificate-tech-frame{padding:3% 4.2% 2.2%}.certificate-preview-stage .certificate-main-brand span{display:block}.certificate-preview-stage .certificate-recipient{width:86%}.certificate-preview-stage .certificate-document-v2 .certificate-copy{max-width:82%}.certificate-preview-stage .certificate-document-v2 .certificate-metrics{width:92%}.certificate-preview-stage .certificate-footer-row-v3{width:91%}.certificate-preview-stage .certificate-footer-row-v3 .certificate-signature-image{height:clamp(36px,4.7vw,56px)}.certificate-preview-stage .certificate-verification-route{display:flex}.certificate-preview-stage .certificate-qr{transform:none}.certificate-mobile-hint{display:flex;align-items:center;justify-content:center;gap:.4rem;margin:.65rem 0 0;color:var(--bs-secondary-color);font-size:.72rem}}
@media print{.certificate-preview-stage{width:297mm;height:210mm;overflow:visible}.certificate-preview-stage .certificate-document{position:static;width:297mm;min-width:297mm;height:210mm;transform:none}.certificate-expand-button,.certificate-mobile-hint{display:none!important}}

/* Notas vigesimales del aula. */
.question-points{display:inline-flex;align-items:center;margin-left:.45rem;padding:.18rem .48rem;border-radius:999px;color:#174ea6;background:#eaf1ff;font-size:.72rem;font-weight:800;white-space:nowrap;vertical-align:middle}
.student-gradebook{overflow:hidden}.student-gradebook-heading{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1rem}.student-gradebook-heading h2{margin:.2rem 0 0;font-size:1.45rem}.gradebook-scale{padding:.35rem .65rem;border-radius:999px;color:var(--brand);background:var(--brand-soft);font-size:.76rem;font-weight:800;white-space:nowrap}.student-gradebook-list{display:grid;gap:.65rem}.student-grade-row{display:grid;grid-template-columns:42px minmax(0,1fr) auto auto;align-items:center;gap:.75rem;padding:.8rem;border:1px solid var(--bs-border-color);border-radius:14px;background:var(--bs-body-bg)}.student-grade-row.is-final{border-color:rgba(var(--bs-primary-rgb),.28);background:rgba(var(--bs-primary-rgb),.035)}.grade-type-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;color:var(--brand);background:var(--brand-soft)}.student-grade-row>div{min-width:0}.student-grade-row>div>strong,.student-grade-row>div>small{display:block}.student-grade-row>div>small{margin-top:.15rem;color:var(--bs-secondary-color);font-size:.78rem}.student-grade-row p{margin:.35rem 0 0;color:var(--bs-secondary-color);font-size:.78rem;overflow-wrap:anywhere}.grade-value{font-size:1rem;font-weight:900;white-space:nowrap}.payment-grade-status{display:inline-flex!important;align-items:center;gap:.3rem;margin-top:.35rem;font-size:.72rem!important;font-weight:800}.payment-grade-status.is-paid{color:#16864b!important}.payment-grade-status.is-pending{color:#936400!important}
@media(max-width:767.98px){.student-gradebook-heading{align-items:flex-start}.student-grade-row{grid-template-columns:36px minmax(0,1fr) auto;gap:.55rem;padding:.7rem}.grade-type-icon{width:36px;height:36px}.student-grade-row>.badge{grid-column:2/4;justify-self:start}.grade-value{font-size:.9rem}.gradebook-scale{font-size:.68rem}.question-points{display:flex;width:max-content;margin:.35rem 0 0}}
.student-grade-summary{padding-top:1rem;border-top:1px solid var(--bs-border-color)}.student-grade-categories{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.65rem}.student-grade-categories>span{padding:.7rem;border-radius:12px;background:var(--bs-tertiary-bg)}.student-grade-categories small,.student-grade-categories strong{display:block}.student-grade-categories small{color:var(--bs-secondary-color);font-size:.72rem}.student-grade-categories strong{margin-top:.2rem}.student-overall-grade{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-top:.75rem;padding:1rem;border:1px solid rgba(var(--bs-primary-rgb),.25);border-radius:14px;background:rgba(var(--bs-primary-rgb),.05)}.student-overall-grade small,.student-overall-grade strong,.student-overall-grade span{display:block}.student-overall-grade strong{font-size:1.45rem}.student-overall-grade div>span{color:var(--bs-secondary-color);font-size:.75rem}.gradebook-help{color:var(--bs-secondary-color);font-size:.78rem}.gradebook-admin-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem}.gradebook-admin-summary article{padding:1rem;border:1px solid var(--bs-border-color);border-radius:16px;background:var(--bs-body-bg);box-shadow:var(--soft-shadow)}.gradebook-admin-summary small,.gradebook-admin-summary strong{display:block}.gradebook-admin-summary small{color:var(--bs-secondary-color)}.gradebook-admin-summary strong{margin-top:.25rem;font-size:1.3rem}.gradebook-settings>summary{display:flex;align-items:center;justify-content:space-between;cursor:pointer;font-weight:800;list-style:none}.gradebook-settings>summary::-webkit-details-marker{display:none}.gradebook-settings[open]>summary>i{transform:rotate(180deg)}.gradebook-table-card{overflow:hidden}.gradebook-table{min-width:900px}.gradebook-table th{vertical-align:bottom;white-space:nowrap;background:var(--bs-tertiary-bg)}.gradebook-table th span,.gradebook-table th small,.gradebook-table td small{display:block}.gradebook-table th span{max-width:170px;white-space:normal}.gradebook-table th small,.gradebook-table td small{color:var(--bs-secondary-color);font-size:.7rem}.gradebook-table td:first-child{min-width:210px}.grade-cell{text-align:center;font-weight:800}
@media(max-width:991.98px){.gradebook-admin-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:575.98px){.student-grade-categories{grid-template-columns:1fr}.student-overall-grade{align-items:flex-start}.gradebook-admin-summary{grid-template-columns:1fr 1fr;gap:.6rem}.gradebook-admin-summary article{padding:.75rem}.gradebook-admin-summary strong{font-size:1rem}}

/* Biblioteca y asignación de plantillas de certificado. */
.certificate-template-library-list{position:sticky;top:1rem;max-height:calc(100vh - 2rem);overflow:auto}.certificate-template-library-card{display:grid;grid-template-columns:78px minmax(0,1fr);gap:.8rem;padding:.75rem;border:1px solid var(--bs-border-color);border-radius:15px;background:var(--bs-body-bg)}.certificate-template-library-card.is-selected{border-color:var(--brand);box-shadow:0 0 0 2px rgba(var(--bs-primary-rgb),.1)}.certificate-template-card-swatch{display:grid;place-items:center;min-height:92px;border:3px solid var(--template-accent);border-radius:11px;color:var(--template-primary);background-color:#fff;background-position:center;background-size:cover;font-size:1.5rem}.certificate-template-card-body{min-width:0}.certificate-template-card-body h3{margin:.15rem 0;font-size:.95rem;overflow-wrap:anywhere}.certificate-template-card-body small{color:var(--bs-secondary-color);font-size:.72rem}.certificate-template-card-actions{display:flex;flex-wrap:wrap;align-items:center;gap:.35rem}.certificate-template-card-actions form{display:inline-flex;margin:0}.certificate-template-card-actions .btn{display:inline-flex;align-items:center;justify-content:center;gap:.35rem;min-height:32px;padding:.3rem .55rem}.certificate-template-course-editor{padding:1rem;border:1px solid var(--bs-border-color);border-radius:16px;background:var(--bs-tertiary-bg)}.certificate-template-choice-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.55rem;margin-bottom:.55rem}.certificate-template-choice{display:grid;grid-template-columns:auto 13px minmax(0,1fr);align-items:center;gap:.5rem;min-width:0;padding:.65rem;border:1px solid var(--bs-border-color);border-radius:11px;background:var(--bs-body-bg);cursor:pointer}.certificate-template-choice>span{width:13px;height:26px;border-radius:999px;background:var(--template-color)}.certificate-template-choice strong{font-size:.8rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:1199.98px){.certificate-template-library-list{position:static;max-height:none}.certificate-template-library-list>.d-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:767.98px){.certificate-template-library-list>.d-grid,.certificate-template-choice-grid{grid-template-columns:1fr}.certificate-template-preview-v2{font-size:.7rem}.certificate-template-card-actions .btn span{display:none}.certificate-template-library-card{grid-template-columns:68px minmax(0,1fr)}.certificate-template-card-swatch{min-height:82px}}

/* V3.31 - Equipo público circular y cuadrícula de cuatro. */
.team-public-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}
.team-public-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 1 calc((100% - 3rem)/4);
  width: calc((100% - 3rem)/4);
  padding: 1.15rem .9rem 1.2rem;
  border-radius: 22px;
  box-shadow: 0 12px 32px rgba(16,24,40,.075);
  text-align: center;
}
.team-public-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 38px rgba(16,24,40,.11);
}
.team-public-photo {
  width: min(124px,66%);
  aspect-ratio: 1;
  border: 4px solid rgba(35,87,217,.12);
  border-radius: 50%;
  box-shadow: 0 9px 22px rgba(24,66,170,.16);
}
.team-public-photo::after {
  border-radius: inherit;
  background: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.48);
}
.team-public-photo > span {
  font-size: clamp(2.2rem,4vw,3.35rem);
}
.team-member-badge {
  position: static;
  z-index: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .32rem;
  margin-top: .65rem;
  padding: .32rem .58rem;
  border: 1px solid rgba(35,87,217,.2);
  border-radius: 999px;
  color: #fff;
  background: #173f9f;
  backdrop-filter: none;
  font-size: .62rem;
  letter-spacing: .045em;
}
.team-public-copy {
  display: grid;
  grid-template-rows: minmax(1.7rem,auto) minmax(2.65rem,auto) minmax(4rem,auto) 1fr auto;
  align-items: start;
  width: 100%;
  padding: .62rem .05rem 0;
}
.team-member-role {
  margin-bottom: .25rem;
  font-size: .66rem;
  line-height: 1.25;
  letter-spacing: .065em;
}
.team-public-copy h3 {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  margin-bottom: .45rem;
  font-size: 1.08rem;
  line-height: 1.22;
}
.team-member-specialty {
  display: block;
  margin: 0;
  font-size: .84rem;
  line-height: 1.38;
  text-align: center;
}
.team-member-specialty i {
  display: inline;
  margin: 0 .3rem 0 0;
  font-size: .75rem;
}
.team-member-specialty span {
  display: inline;
  max-width: 19rem;
}
.team-member-biography {
  align-self: stretch;
  margin-top: .62rem;
  padding-top: .62rem;
  border-top: 1px solid rgba(98,116,150,.14);
  font-size: .84rem;
  line-height: 1.5;
}
.team-linkedin {
  justify-content: center;
  margin-top: .7rem;
  font-size: .82rem;
}
[data-bs-theme="dark"] .team-public-photo {
  border-color: rgba(125,158,246,.22);
}

@media (max-width: 991.98px) {
  .team-public-card {
    flex-basis: calc((100% - 1rem)/2);
    width: calc((100% - 1rem)/2);
  }
}
@media (max-width: 575.98px) {
  .team-public-card { flex-basis: 100%; max-width: 390px; width: 100%; margin-inline: auto; }
  .team-public-card { padding: 1.15rem 1rem 1.25rem; }
  .team-public-photo { width: 120px; aspect-ratio: 1; }
  .team-public-copy { display: flex; flex-direction: column; align-items: center; padding: .65rem .1rem 0; }
  .team-member-specialty { min-height: 0; }
  .team-member-biography { width: 100%; }
}
/* V3.32: editor enriquecido seguro y acciones compactas */
.rich-text-editor {
  --rt-editor-surface: #fff;
  --rt-toolbar-surface: #f8faff;
  --rt-footer-surface: #fbfcff;
  --rt-control-color: #334155;
  --rt-muted-color: #68758a;
  --rt-divider-color: #d9e1ee;
  --rt-hover-surface: #edf3ff;
  --rt-hover-border: #c9d7fb;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--bs-border-color, #d8e0ec);
  border-radius: 12px;
  color: var(--bs-body-color, #172033);
  background: var(--rt-editor-surface);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.rich-text-editor:focus-within { border-color: var(--primary, #2357d9); box-shadow: 0 0 0 .2rem rgba(35, 87, 217, .12); }
.rich-text-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  gap: .25rem;
  padding: .45rem;
  overflow: visible;
  border-bottom: 1px solid var(--bs-border-color, #d8e0ec);
  background: var(--rt-toolbar-surface);
}
.rich-text-toolbar-group {
  position: relative;
  display: inline-flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: .2rem;
  min-width: 0;
  max-width: 100%;
  padding-right: .45rem;
  margin-right: .2rem;
  border-right: 1px solid var(--rt-divider-color);
}
.rich-text-toolbar-group:last-child {
  padding-right: 0;
  margin-right: 0;
  border-right: 0;
}
.rich-text-tool {
  display: inline-grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 32px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--rt-control-color);
  background: transparent;
}
.rich-text-tool:hover,
.rich-text-tool:focus-visible { color: var(--primary, #2357d9); border-color: var(--rt-hover-border); background: var(--rt-hover-surface); outline: none; }
.rich-text-spacing-control {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  height: 32px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--rt-control-color);
  background: transparent;
}
.rich-text-style-control {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  height: 32px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--rt-control-color);
  background: transparent;
}
.rich-text-spacing-control:hover,
.rich-text-spacing-control:focus-within,
.rich-text-style-control:hover,
.rich-text-style-control:focus-within { color: var(--primary, #2357d9); border-color: var(--rt-hover-border); background: var(--rt-hover-surface); }
.rich-text-spacing-control > i { flex: 0 0 auto; margin-left: .48rem; font-size: .76rem; }
.rich-text-style-control > i { flex: 0 0 auto; margin-left: .48rem; font-size: .76rem; }
.rich-text-spacing-control select {
  width: 132px;
  height: 30px;
  padding: 0 1.35rem 0 .35rem;
  border: 0;
  outline: 0;
  color: inherit;
  background: transparent;
  font-size: .72rem;
  font-weight: 700;
}
.rich-text-style-control select {
  height: 30px;
  padding: 0 1.35rem 0 .35rem;
  border: 0;
  outline: 0;
  color: inherit;
  background: transparent;
  font-size: .72rem;
  font-weight: 700;
}
.rich-text-spacing-control select option,
.rich-text-style-control select option {
  color: var(--bs-body-color, #172033);
  background: var(--rt-editor-surface);
}
.rich-text-font-control select { width: 126px; }
.rich-text-size-control select { width: 110px; }
.rich-text-surface {
  min-height: 150px;
  max-height: 520px;
  padding: .9rem 1rem;
  overflow: auto;
  color: var(--bs-body-color, #172033);
  background: var(--rt-editor-surface);
  line-height: 1.65;
  overflow-wrap: anywhere;
  outline: none;
}
.rich-text-surface:empty::before { content: attr(data-placeholder); color: var(--bs-secondary-color, #8792a5); pointer-events: none; }
.rich-text-surface.is-invalid { box-shadow: inset 0 0 0 2px #dc3545; }
.rich-text-surface h2 { font-size: 1.45rem; }
.rich-text-surface h3 { font-size: 1.18rem; }
.rich-text-surface p:last-child,
.rich-text-surface ul:last-child,
.rich-text-surface ol:last-child,
.rich-text-surface blockquote:last-child { margin-bottom: 0; }
.rich-text-footer { display: flex; justify-content: space-between; gap: .75rem; padding: .3rem .65rem; border-top: 1px solid var(--bs-border-color, #edf0f5); color: var(--rt-muted-color); background: var(--rt-footer-surface); font-size: .72rem; }
.rich-text-footer span { min-width: 0; overflow-wrap: anywhere; }
[data-bs-theme="dark"] .rich-text-editor {
  --rt-editor-surface: #101827;
  --rt-toolbar-surface: #172033;
  --rt-footer-surface: #131d2d;
  --rt-control-color: #e2e8f0;
  --rt-muted-color: #a8b4c7;
  --rt-divider-color: #3b475b;
  --rt-hover-surface: #213250;
  --rt-hover-border: #5572a6;
  border-color: #3b475b;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .24);
}
[data-bs-theme="dark"] .rich-text-editor:focus-within {
  border-color: #7e9eff;
  box-shadow: 0 0 0 .2rem rgba(126, 158, 255, .16);
}
[data-bs-theme="dark"] .rich-text-tool:hover,
[data-bs-theme="dark"] .rich-text-tool:focus-visible,
[data-bs-theme="dark"] .rich-text-spacing-control:hover,
[data-bs-theme="dark"] .rich-text-spacing-control:focus-within,
[data-bs-theme="dark"] .rich-text-style-control:hover,
[data-bs-theme="dark"] .rich-text-style-control:focus-within {
  color: #b8c9ff;
}
.rich-text-source { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.rich-text-content { min-width: 0; color: inherit; line-height: 1.7; overflow-wrap: anywhere; }
.rich-text-content > :last-child { margin-bottom: 0; }
.rich-text-content h2 { margin: 1.15em 0 .55em; font-size: clamp(1.25rem, 2.5vw, 1.65rem); }
.rich-text-content h3 { margin: 1em 0 .5em; font-size: clamp(1.08rem, 2vw, 1.3rem); }
.rich-text-content ul,
.rich-text-content ol { padding-left: 1.4rem; }
.rich-text-content blockquote { margin: 1rem 0; padding: .75rem 1rem; border-left: 4px solid var(--primary, #2357d9); border-radius: 0 8px 8px 0; background: #f5f8ff; }
.rich-text-content a { overflow-wrap: anywhere; }
.corporate-service-description { flex: 1; color: var(--bs-secondary-color); text-align: justify; text-justify: inter-word; }
.studio-service-description { color: var(--bs-secondary-color); font-size: .9rem; line-height: 1.55; }
.studio-service-description p { margin-bottom: 0; }
.module-summary-copy { overflow-wrap: anywhere; }
.floating-promo-description { margin-bottom: .9rem; }
.rt-align-left { text-align: left; }
.rt-align-center { text-align: center; }
.rt-align-right { text-align: right; }
.rt-align-justify { text-align: justify; }
.rt-line-height-100 { line-height: 1 !important; }
.rt-line-height-115 { line-height: 1.15 !important; }
.rt-line-height-150 { line-height: 1.5 !important; }
.rt-line-height-200 { line-height: 2 !important; }
.rt-font-system { font-family: inherit !important; }
.rt-font-arial { font-family: Arial, Helvetica, sans-serif !important; }
.rt-font-verdana { font-family: Verdana, Geneva, sans-serif !important; }
.rt-font-georgia { font-family: Georgia, 'Times New Roman', serif !important; }
.rt-font-times { font-family: 'Times New Roman', Times, serif !important; }
.rt-font-trebuchet { font-family: 'Trebuchet MS', Arial, sans-serif !important; }
.rt-font-size-small { font-size: .875rem !important; }
.rt-font-size-normal { font-size: 1rem !important; }
.rt-font-size-medium { font-size: 1.125rem !important; }
.rt-font-size-large { font-size: 1.25rem !important; }
.rt-font-size-title { font-size: 1.5rem !important; }

.btn.has-action-icon { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; max-width: 100%; min-width: 0; }
.btn.has-action-icon > i,
.btn.has-action-icon > svg { flex: 0 0 auto; }
.btn.has-action-icon .btn-label { min-width: 0; overflow-wrap: anywhere; }
/* Los controles de navegación conservan su composición original; nunca muestran iconos automáticos. */
.site-navbar .action-auto-icon,
.site-navigation .action-auto-icon,
.dropdown-menu .action-auto-icon,
.user-role-menu-button > .action-auto-icon,
.navbar-toggler > .action-auto-icon { display: none !important; }
.btn.action-display-icon {
  position: relative;
  flex: 0 0 38px !important;
  width: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
  min-height: 38px;
  padding: 0 !important;
  gap: 0 !important;
  white-space: nowrap;
}
.btn.btn-sm.action-display-icon {
  flex-basis: 34px !important;
  width: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  min-height: 34px;
}
.btn.action-display-icon > i,
.btn.action-display-icon > svg { margin: 0 !important; font-size: .86rem; }
.btn.action-display-icon .btn-label {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.course-admin-actions:has(.action-display-icon),
.admin-product-mobile-actions:has(.action-display-icon),
.admin-category-mobile-actions:has(.action-display-icon),
.admin-mobile-disclosure-actions:has(.action-display-icon) {
  display: flex !important;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .45rem;
}
.course-admin-actions:has(.action-display-icon) > form,
.admin-product-mobile-actions:has(.action-display-icon) > form,
.admin-category-mobile-actions:has(.action-display-icon) > form,
.admin-mobile-disclosure-actions:has(.action-display-icon) > form {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
}
.action-tooltip .tooltip-inner { padding: .38rem .58rem; font-size: .75rem; font-weight: 700; }
.compact-action-row,
.admin-card-actions,
.card-actions { flex-wrap: wrap; max-width: 100%; }
.table .btn.has-action-icon { white-space: nowrap; }

@media (max-width: 767.98px) {
  .rich-text-surface { min-height: 135px; padding: .75rem; }
  .rich-text-toolbar { padding: .35rem; }
  .rich-text-toolbar-group { gap: .12rem; padding-right: .3rem; margin-right: .08rem; }
  .rich-text-toolbar-group-typography {
    flex: 1 1 100%;
    width: 100%;
    padding-right: 0;
    margin-right: 0;
    border-right: 0;
  }
  .rich-text-toolbar-group-typography :is(.rich-text-style-control, .rich-text-spacing-control) {
    flex: 1 1 138px;
    min-width: 0;
    max-width: 100%;
  }
  .rich-text-toolbar-group-typography :is(.rich-text-style-control, .rich-text-spacing-control) select {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }
  .rich-text-tool { flex-basis: 32px; width: 32px; height: 30px; }
  .btn.action-display-responsive,
  .btn.action-icon-responsive { flex: 0 0 36px !important; width: 36px !important; min-width: 36px !important; max-width: 36px !important; min-height: 36px; padding: 0 !important; gap: 0 !important; }
  .btn.action-display-responsive > i,
  .btn.action-icon-responsive > i { margin: 0 !important; }
  .btn.action-display-responsive .btn-label,
  .btn.action-icon-responsive .btn-label { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; }
  .btn.action-display-responsive.w-100 { margin-inline: auto; }
  .btn.action-display-text,
  .btn.action-label-essential { width: auto; max-width: 100%; white-space: normal; }
  .compact-action-row .btn.action-label-essential .btn-label,
  .compact-action-row .btn.action-display-text .btn-label,
  .btn.action-label-essential .btn-label,
  .btn.action-display-text .btn-label { position: static !important; display: inline !important; width: auto !important; height: auto !important; margin: 0 !important; overflow: visible !important; clip: auto !important; white-space: normal !important; }
  .product-preview-actions .btn.action-display-text { width: 100%; }

  /* En las tarjetas de cursos, las acciones móviles permanecen compactas y alineadas. */
  .course-admin-actions > .btn.action-display-responsive,
  .course-admin-actions > form > .btn.action-display-responsive {
    flex: 1 1 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 34px;
    padding: 0 !important;
  }
  .course-admin-actions .btn.action-display-responsive .course-action-label {
    position: absolute !important;
    display: block !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }
}

@media (max-width: 420px) {
  .rich-text-footer { align-items: flex-start; flex-direction: column; gap: .15rem; }
  .rich-text-toolbar { gap: .3rem .15rem; }
  .rich-text-toolbar-group { padding-right: .22rem; }
}

/* ==========================================================
   V4.1 - Marca visible y CTA completos en tarjetas móviles
   ========================================================== */
@media (max-width: 767.98px) {
  .product-card .product-detail-button.action-display-text {
    display: inline-flex !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100%;
    min-height: 36px;
    padding: .48rem .58rem;
    gap: .38rem;
    white-space: normal;
  }

  .product-card .product-detail-button.action-display-text .btn-label {
    position: static !important;
    display: inline !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
  }
}

@media (max-width: 339.98px) {
  .site-navbar .site-navbar-inner {
    padding-inline: .42rem;
  }

  .site-navbar .site-logo-frame-header {
    width: 34px;
    height: 34px;
  }

  .site-navbar .site-brand-copy strong {
    font-size: .76rem;
  }

  .site-navbar .notification-bell-button,
  .site-navbar .site-menu-toggle {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
  }
}

/* ==========================================================
   V4.2 - Accesos Store, Academy y Studio alineados en móvil
   ========================================================== */
@media (max-width: 575.98px) {
  .corporate-hero-mini-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .45rem;
  }

  .corporate-hero-mini-grid a {
    min-height: 76px;
    padding: .58rem .24rem;
    gap: .36rem;
    border-radius: 12px;
    font-size: .72rem;
    line-height: 1.1;
  }

  .corporate-hero-mini-grid i {
    font-size: 1.08rem;
  }
}

@media (max-width: 339.98px) {
  .corporate-hero-mini-grid {
    gap: .32rem;
  }

  .corporate-hero-mini-grid a {
    min-height: 70px;
    padding-inline: .15rem;
    font-size: .66rem;
  }
}

/* ==========================================================
   V4.3 - Identidad del usuario como cabecera del menú móvil
   ========================================================== */
.mobile-drawer-header-user {
  position: relative;
  align-items: stretch;
  padding: .72rem .8rem;
}

.mobile-drawer-user-card {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: .65rem;
  min-height: 58px;
  padding: .52rem 3.25rem .52rem .62rem;
  border-radius: 14px;
}

.mobile-drawer-user-card .mobile-user-avatar {
  width: 40px;
  height: 40px;
}

.mobile-drawer-header-user .mobile-drawer-close {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: 1rem;
  width: 36px;
  height: 36px;
  flex-basis: 36px;
  transform: translateY(-50%);
}

@media (max-width: 339.98px) {
  .mobile-drawer-header-user {
    padding-inline: .62rem;
  }

  .mobile-drawer-user-card {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: .5rem;
    padding-left: .52rem;
  }

  .mobile-drawer-user-card .mobile-user-avatar {
    width: 36px;
    height: 36px;
  }

  .mobile-drawer-header-user .mobile-drawer-close {
    right: .8rem;
  }
}
