/* Sistema de citas (demo). Colores tomados de las variables --bk-* de cada sitio. */
.bk {
  background: var(--bk-surface);
  color: var(--bk-ink);
  border-radius: var(--bk-radius);
  box-shadow: var(--bk-shadow, 0 20px 50px -24px rgba(0, 0, 0, .25));
  padding: 22px 18px 24px;
  max-width: 760px;
  margin: 0 auto;
  scroll-margin-top: 84px;
}
@media (min-width: 640px) { .bk { padding: 34px 38px 38px; } }
.bk [hidden] { display: none !important; }
.bk h3 { font-family: var(--font-head); font-size: 1.35rem; line-height: 1.2; margin: 0 0 4px; outline: none; }
.bk-sub { color: var(--bk-muted); margin: 0 0 18px; font-size: .95rem; }

/* Progreso */
.bk-progress { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin: 0 0 10px; padding: 0; font-size: .72rem; color: var(--bk-muted); text-align: center; }
.bk-progress li { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.bk-progress span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .8rem; border: 1.5px solid var(--bk-line); background: var(--bk-surface); transition: .3s; }
.bk-progress .is-active { color: var(--bk-ink); font-weight: 700; }
.bk-progress .is-active span { border-color: var(--bk-accent); color: var(--bk-accent); box-shadow: 0 0 0 4px var(--bk-soft); }
.bk-progress .is-done span { background: var(--bk-accent); border-color: var(--bk-accent); color: var(--bk-on-accent); }
.bk-bar { height: 4px; border-radius: 4px; background: var(--bk-line); margin: 0 0 26px; overflow: hidden; }
.bk-bar i { display: block; height: 100%; width: 0; background: var(--bk-accent); border-radius: inherit; transition: width .45s ease; }

.bk-step { animation: bk-in .35s ease both; }
@keyframes bk-in { from { opacity: 0; transform: translateY(8px); } }

/* Paso 1 */
.bk-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (min-width: 560px) { .bk-options { gap: 10px; } }
.bk-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; width: 100%; padding: 12px 12px; line-height: 1.3; border: 1.5px solid var(--bk-line); border-radius: var(--bk-radius-sm); background: var(--bk-surface); color: inherit; font: inherit; cursor: pointer; transition: border-color .2s, background .2s, transform .2s; }
.bk-opt b { font-weight: 700; font-size: .95rem; hyphens: auto; overflow-wrap: anywhere; }
.bk-opt small { color: var(--bk-muted); font-size: .8rem; }
@media (min-width: 560px) { .bk-opt { padding: 14px 16px; } }
@media (hover: hover) { .bk-opt:hover { border-color: var(--bk-accent); background: var(--bk-soft); } .bk-day:hover:not(:disabled), .bk-time:hover:not(:disabled) { border-color: var(--bk-accent); background: var(--bk-accent); color: var(--bk-on-accent); } }
.bk-opt[aria-pressed="true"] { border-color: var(--bk-accent); background: var(--bk-soft); }
.bk-opt:active { transform: scale(.98); }

/* Paso 2 */
.bk-cal { border: 1.5px solid var(--bk-line); border-radius: var(--bk-radius-sm); padding: 12px; }
.bk-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.bk-cal-title { font-weight: 700; font-size: 1.05rem; }
.bk-cal-head button { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--bk-line); background: var(--bk-surface); color: inherit; font-size: 1.1rem; cursor: pointer; }
.bk-cal-head button:disabled { opacity: .3; cursor: default; }
.bk-week, .bk-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.bk-week { font-size: .72rem; font-weight: 700; color: var(--bk-muted); text-transform: uppercase; margin-bottom: 4px; }
.bk-day { aspect-ratio: 1; min-height: 38px; border: 0; border-radius: 10px; background: var(--bk-soft); color: var(--bk-ink); font: inherit; font-weight: 700; cursor: pointer; transition: background .2s, color .2s, transform .15s; }
.bk-day:active:not(:disabled) { transform: scale(.94); }
.bk-day:disabled { background: transparent; color: var(--bk-muted); opacity: .45; text-decoration: line-through; font-weight: 400; cursor: not-allowed; }
@media (min-width: 560px) { .bk-day { aspect-ratio: auto; height: 46px; } }
.bk-day.is-today { box-shadow: inset 0 0 0 1.5px var(--bk-line); }
.bk-day.is-selected { background: var(--bk-accent); color: var(--bk-on-accent); }
.bk-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 0; font-size: .8rem; color: var(--bk-muted); }
.bk-legend span::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; background: var(--bk-soft); }
.bk-legend .off::before { background: transparent; border: 1px dashed var(--bk-muted); }

/* Paso 3 */
.bk-times { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 560px) { .bk-times { grid-template-columns: repeat(4, 1fr); } }
.bk-time { padding: 12px 6px; border: 1.5px solid var(--bk-line); border-radius: var(--bk-radius-sm); background: var(--bk-surface); color: inherit; font: inherit; font-size: .92rem; font-weight: 700; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 1px; transition: .2s; white-space: nowrap; }
.bk-time:disabled { opacity: .45; cursor: not-allowed; font-weight: 400; text-decoration: line-through; background: transparent; }
.bk-time small { font-size: .68rem; text-decoration: none; }

/* Paso 4 */
.bk-field { display: block; margin-bottom: 14px; }
.bk-field span { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 6px; }
.bk-field input { width: 100%; padding: 13px 14px; border: 1.5px solid var(--bk-line); border-radius: var(--bk-radius-sm); background: var(--bk-surface); color: inherit; font: inherit; font-size: 16px; transition: border-color .2s, box-shadow .2s; }
.bk-field input:focus { outline: none; border-color: var(--bk-accent); box-shadow: 0 0 0 4px var(--bk-soft); }
.bk-field input[aria-invalid="true"] { border-color: #d64545; }
.bk-err { display: block; color: #c23b3b; font-size: .82rem; margin-top: 5px; min-height: 0; }
.bk-err:empty { display: none; }
.bk-privacy { font-size: .8rem; color: var(--bk-muted); margin: 4px 0 18px; }

/* Paso 5 */
.bk-summary { margin: 0 0 20px; border: 1.5px solid var(--bk-line); border-radius: var(--bk-radius-sm); overflow: hidden; }
.bk-summary div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 14px; border-top: 1px solid var(--bk-line); }
.bk-summary div:first-child { border-top: 0; }
.bk-summary dt { color: var(--bk-muted); font-size: .9rem; }
.bk-summary dd { margin: 0; font-weight: 700; text-align: right; word-break: break-word; }

.bk-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.bk-actions .btn { flex: 1 1 auto; justify-content: center; }
.bk-back { background: none; border: 0; color: var(--bk-muted); font: inherit; font-weight: 700; padding: 10px 4px; cursor: pointer; }
.bk-back:hover { color: var(--bk-ink); }

/* Confirmación */
.bk-ok { text-align: center; padding: 6px 0 26px; animation: bk-in .4s ease both; }
.bk-ok-icon { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; background: var(--bk-accent); color: var(--bk-on-accent); display: grid; place-items: center; animation: bk-pop .5s cubic-bezier(.3, 1.6, .5, 1) both; }
.bk-ok-icon svg { width: 34px; height: 34px; }
@keyframes bk-pop { from { transform: scale(.4); opacity: 0; } }
.bk-ok h3 { font-size: 1.6rem; }
.bk-ok-when { font-weight: 700; font-size: 1.08rem; margin: 6px 0 8px; color: var(--bk-accent-text, var(--bk-accent)); }
.bk-ok-note { color: var(--bk-muted); margin: 0 auto; max-width: 440px; font-size: .95rem; }

/* Así funciona por dentro */
.bs { border-top: 1.5px dashed var(--bk-line); padding-top: 24px; }
.bs-kicker { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; text-align: center; margin: 0 0 18px; }
.bs-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.bs-card { min-width: 0; color: #202124; font-family: Roboto, Arial, system-ui, sans-serif; opacity: 0; transform: translateY(18px) scale(.98); transition: opacity .6s ease, transform .6s ease; }
.bs-card.is-shown { opacity: 1; transform: none; }
.bs-card > header { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 8px; font-family: var(--font-body); color: var(--bk-ink); }
.bs-step { width: 24px; height: 24px; border-radius: 50%; background: var(--bk-accent); color: var(--bk-on-accent); display: grid; place-items: center; font-weight: 700; font-size: .78rem; }
.bs-app { font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.bs-what { color: var(--bk-muted); font-size: .85rem; }
.bs-card i { display: inline-block; width: 16px; height: 16px; border-radius: 3px; position: relative; }
.ico-sheets { background: #0f9d58; }
.ico-sheets::after { content: ""; position: absolute; inset: 4px 3px; border: 1.5px solid #fff; border-width: 1.5px 0; box-shadow: inset 0 3px 0 -1.5px #fff; }
.ico-cal { background: #fff; border: 2px solid #1a73e8; }
.ico-cal::after { content: "31"; position: absolute; inset: 0; font: 700 7px/12px Arial, sans-serif; color: #1a73e8; text-align: center; }
.ico-mail { background: #fff; border: 2px solid #d93025; }
.ico-mail::after { content: ""; position: absolute; left: 2px; top: -3px; width: 7px; height: 7px; border: solid #d93025; border-width: 0 2px 2px 0; transform: rotate(45deg); }

.gs, .gc, .gm { background: #fff; border: 1px solid #dadce0; border-radius: 10px; overflow: hidden; box-shadow: 0 6px 18px -10px rgba(60, 64, 67, .35); font-size: 12px; }

/* Hoja de cálculo */
.gs-top { background: #f1f8f4; border-bottom: 1px solid #dadce0; padding: 8px 12px; font-weight: 500; font-size: 13px; }
.gs-top span { color: #5f6368; font-weight: 400; }
.gs-scroll { overflow-x: auto; }
.gs table { border-collapse: collapse; width: 100%; min-width: 520px; }
.gs th, .gs td { border: 1px solid #e2e3e5; padding: 6px 8px; text-align: left; white-space: nowrap; }
.gs th { background: #f8f9fa; color: #5f6368; font-weight: 500; }
.gs tbody tr:first-child td { border-top: 0; }
.gs-new td { background: #e6f4ea; font-weight: 500; }
.is-shown .gs-new td { animation: gs-flash 2s ease .5s both; }
@keyframes gs-flash { 0% { background: #fff; } 25% { background: #fde293; } 100% { background: #e6f4ea; } }
.is-shown .gs-new { animation: gs-row .5s ease .4s both; }
@keyframes gs-row { from { opacity: 0; transform: translateY(-6px); } }
.chip { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 500; }
.chip-green { background: #ceead6; color: #137333; }
.chip-gray { background: #e8eaed; color: #3c4043; }

/* Calendario */
.gc-top { padding: 8px 12px; font-size: 14px; border-bottom: 1px solid #dadce0; }
.gc-head, .gc-body { display: grid; grid-template-columns: 38px repeat(var(--cols), minmax(0, 1fr)); }
.gc-head span { text-align: center; padding: 6px 0; font-size: 10px; color: #70757a; text-transform: uppercase; }
.gc-head b { display: block; font-size: 15px; font-weight: 400; color: #3c4043; margin: 2px auto 0; width: 26px; height: 26px; line-height: 26px; border-radius: 50%; }
.gc-head .is-day { color: #1a73e8; }
.gc-head .is-day b { background: #1a73e8; color: #fff; }
.gc-body { border-top: 1px solid #dadce0; }
.gc-hours span { display: block; height: var(--row); font-size: 9px; color: #70757a; text-align: right; padding-right: 5px; transform: translateY(-5px); white-space: nowrap; }
.gc-hours span:first-child { visibility: hidden; }
.gc-grid { grid-column: 2 / -1; position: relative; height: calc(var(--rows) * var(--row)); background-color: #fff; background-image: repeating-linear-gradient(to bottom, transparent 0 calc(var(--row) - 1px), #eceff1 calc(var(--row) - 1px) var(--row)), repeating-linear-gradient(to right, transparent 0 calc(100% / var(--cols) - 1px), #eceff1 calc(100% / var(--cols) - 1px) calc(100% / var(--cols))); }
.gc-ev { position: absolute; font-size: 10.5px; left: calc(var(--c) * 100% / var(--cols) + 2px); width: calc(100% / var(--cols) - 5px); height: calc(var(--row) * .9); border-radius: 4px; padding: 2px 5px; line-height: 1.2; overflow: hidden; }
.gc-ev-old { background: #e8eaed; color: #5f6368; }
.gc-ev-new { background: #1a73e8; color: #fff; height: calc(var(--row) * 1.7); box-shadow: 0 4px 10px -3px rgba(26, 115, 232, .6); z-index: 1; }
.gc-ev-new b, .gc-ev-new span { display: block; overflow: hidden; text-overflow: ellipsis; }
.gc-ev-new b { font-weight: 500; white-space: nowrap; }
.is-shown .gc-ev-new { animation: gc-drop .6s cubic-bezier(.3, 1.4, .5, 1) .5s both; }
@keyframes gc-drop { from { opacity: 0; transform: scale(.6); } }

/* Correo */
.gm-top { padding: 8px 10px; border-bottom: 1px solid #dadce0; }
.gm-search { display: block; background: #eaf1fb; border-radius: 16px; padding: 6px 12px; color: #5f6368; }
.gm-row { display: grid; grid-template-columns: 90px 1fr auto; gap: 8px; padding: 8px 12px; border-bottom: 1px solid #f1f3f4; color: #5f6368; }
.gm-row > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-row.is-new { background: #f2f6fc; color: #202124; }
.is-shown .gm-row.is-new { animation: gm-in .5s ease .4s both; }
@keyframes gm-in { from { opacity: 0; transform: translateX(-10px); background: #fde293; } }
.gm-open { padding: 12px 14px 14px; color: #3c4043; line-height: 1.5; overflow-wrap: anywhere; }
.gm-open p { margin: 0 0 8px; }
.gm-subject { font-size: 15px; color: #202124; }
.gm-from { color: #5f6368; font-size: 11.5px; word-break: break-word; }
.gm-open ul { margin: 0; padding-left: 18px; }

.bs-foot { text-align: center; font-size: .88rem; color: var(--bk-muted); margin: 20px auto 16px; max-width: 520px; }
.bk-reset { display: flex; margin: 0 auto; }

@media (min-width: 900px) {
  .bk:has(.bk-done:not([hidden])) { max-width: 1100px; }
  .bs-cards { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .bs-sheets { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .bk *, .bk *::before, .bk *::after { animation: none !important; transition: none !important; }
}
