:root {
  --bg: #F8F9FA;
  --surface: #FFFFFF;
  --surface2: #F1F3F4;
  --border: #DADCE0;
  --text: #202124;
  --muted: #5F6368;
  --accent-start: #4285F4;
  --accent-end: #34A853;
  --accent: linear-gradient(90deg, var(--accent-start), var(--accent-end));
  --urgente: #EA4335;
  --medio: #F29900;
  --ok: #34A853;
  --pomodoro: linear-gradient(135deg, #FF8A65, #EA4335);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --shadow: 0 20px 60px rgba(60, 64, 67, 0.12);
  --shadow-soft: 0 2px 10px rgba(60, 64, 67, 0.15);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

body {
  overflow-x: hidden;
}

button, input, select, textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.app-header {
  padding: 24px 28px 12px;
  background: transparent;
}

.header-inner {
  display: grid;
  grid-template-columns: minmax(210px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(66, 133, 244, 0.16), rgba(52, 168, 83, 0.14));
  color: var(--accent-start);
  font-weight: 700;
}

.brand-label {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.header-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.header-nav {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.header-actions {
  position: static;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: center;
  min-width: 0;
}

/* Separar visualmente los botones de cuenta (Google/Iniciar/Registrarse)
   del botón principal "Nueva tarea", para que no se sientan pegados. */
#btn-nueva-tarea {
  margin-left: 8px;
}

.header-actions .welcome {
  color: var(--muted);
  font-weight: 600;
  max-width: min(310px, 32vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-actions .countdown {
  color: var(--muted);
  font-size: 13px;
}

.nav-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.nav-btn:hover,
.nav-btn.active {
  background: rgba(66, 133, 244, 0.1);
  border-color: rgba(66, 133, 244, 0.35);
}

.home-summary {
  margin-bottom: 24px;
  display: grid;
  gap: 18px;
}

.home-summary__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.summary-card {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: var(--surface2);
  border: 1px solid var(--border);
}

.summary-card__label {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.stat-card {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.stat-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 10px;
}

.stat-card strong {
  font-size: 28px;
  display: block;
}

.app-main {
  padding: 0 28px 120px;
}

.view {
  display: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.view.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* ── Hero ─────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  overflow: hidden;
  margin: 28px 0 40px;
  padding: 56px 40px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 15% 20%, rgba(66, 133, 244, 0.14), transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(52, 168, 83, 0.1), transparent 45%),
    linear-gradient(160deg, #FFFFFF 0%, #F8F9FA 100%);
  border: 1px solid var(--border);
}

.hero__dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(32, 33, 36, 0.08) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.5;
  pointer-events: none;
}

.hero__content {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero__eyebrow {
  color: var(--accent-start);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.hero__title {
  font-size: 40px;
  line-height: 1.15;
  margin: 0 0 16px;
}

.hero__subtitle {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 24px;
  max-width: 440px;
}

.hero__cta {
  margin-bottom: 32px;
}

.hero__features {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.hero__feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
}

.hero__feature img {
  width: 32px;
  height: 32px;
}

.hero__integrations {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.hero__integrations-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hero__integrations-icons {
  display: flex;
  gap: 8px;
}

.integration-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease;
}

.integration-icon:hover {
  transform: translateY(-2px);
}

.integration-icon svg {
  width: 20px;
  height: 20px;
}

.hero__mockup {
  position: relative;
}

.mockup-frame {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transform: perspective(1000px) rotateY(-4deg);
}

.mockup-frame__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 14px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}

.mockup-frame__bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
}

.mockup-frame__bar span:nth-child(1) { background: var(--urgente); }
.mockup-frame__bar span:nth-child(2) { background: var(--medio); }
.mockup-frame__bar span:nth-child(3) { background: var(--ok); }

.mockup-frame__badge {
  margin-left: auto;
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 3px 10px;
}

.mockup-frame__body {
  padding: 20px;
}

.mockup-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.mockup-stat {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
}

.mockup-stat small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.mockup-stat strong {
  font-size: 18px;
}

.mockup-tasks {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mockup-task {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px;
}

.mockup-task__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-start);
  flex-shrink: 0;
}

.mockup-task--urgent .mockup-task__dot { background: var(--urgente); }
.mockup-task--done .mockup-task__dot { background: var(--ok); }
.mockup-task--done .mockup-task__title { color: var(--muted); text-decoration: line-through; }

.mockup-task__title {
  flex: 1;
}

.mockup-task__tag {
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 860px) {
  .hero {
    padding: 36px 24px;
  }
  .hero__content {
    grid-template-columns: 1fr;
  }
  .hero__title {
    font-size: 30px;
  }
  .mockup-frame {
    transform: none;
  }
}

.home-panel, .dashboard-header {
  margin-top: 40px;
  margin-bottom: 24px;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 8px;
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.chip-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.chip-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.home-panel h2,
  .dashboard-header h2,
  .how-to h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
  }

  .brand-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
  }

  .how-to {
    margin: 26px 0 24px;
    padding: 24px;
    border-radius: var(--radius-lg);
    background: var(--surface2);
    border: 1px solid var(--border);
  }

  .how-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
  }

  .how-card {
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    border-radius: var(--radius-lg);
    padding: 18px;
    display: grid;
    gap: 14px;
    align-items: center;
    text-align: center;
  }

  .how-card img {
    width: 68px;
    height: 68px;
    margin: 0 auto;
  }

  .how-card h3 {
    margin: 0;
    font-size: 18px;
  }

  .how-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.8;
  }

  .how-card {
    min-height: 220px;
  }

  .how-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }

.chip:hover,
.chip.chip--active {
  background: rgba(66, 133, 244, 0.12);
  background: color-mix(in srgb, currentColor 16%, var(--surface));
  border-color: currentColor;
  transform: translateY(-1px);
}

.chip:active {
  transform: translateY(0) scale(0.96);
}

.chip-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.task-section {
  display: grid;
  gap: 18px;
}

/* ── Acerca de ────────────────────────────────────────────────────────── */

.about-section {
  margin-top: 48px;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.about-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(60, 64, 67, 0.14);
}

.about-card__icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(66, 133, 244, 0.1);
  color: var(--accent-start);
  margin-bottom: 14px;
}

.about-card__icon svg {
  width: 22px;
  height: 22px;
}

.about-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.about-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
}

.task-list {
  display: grid;
  gap: 18px;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.task-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  animation: cardIn 0.3s ease backwards;
}

.task-card:nth-child(1) { animation-delay: 0.02s; }
.task-card:nth-child(2) { animation-delay: 0.06s; }
.task-card:nth-child(3) { animation-delay: 0.1s; }
.task-card:nth-child(4) { animation-delay: 0.14s; }
.task-card:nth-child(5) { animation-delay: 0.18s; }
.task-card:nth-child(6) { animation-delay: 0.22s; }

.task-card:hover {
  transform: translateY(-4px);
  border-color: rgba(66, 133, 244, 0.4);
  box-shadow: 0 24px 48px rgba(60, 64, 67, 0.16);
}

.task-card__top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.task-card__status {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.task-card__status svg {
  display: block;
  width: 100%;
  height: 100%;
}

.task-card__title {
  flex: 1;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
}

.task-card__vence {
  flex-shrink: 0;
}

.task-card__vence {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.task-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.vence--hoy { color: var(--urgente); }
.vence--pronto { color: var(--medio); }
.vence--normal { color: var(--muted); }

.materia-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  background: var(--surface2);
}

.materia-pill__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge--danger { background: rgba(234, 67, 53, 0.12); color: var(--urgente); }
.badge--warning { background: rgba(242, 153, 0, 0.14); color: var(--medio); }
.badge--success { background: rgba(52, 168, 83, 0.14); color: var(--ok); }

.urgency-bar {
  height: 10px;
  border-radius: 999px;
  background: var(--surface2);
  overflow: hidden;
  margin-bottom: 16px;
}

.urgency-bar__fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.35s ease;
}

.urgency-bar__fill--alta { background: var(--urgente); }
.urgency-bar__fill--media { background: var(--medio); }
.urgency-bar__fill--baja { background: var(--ok); }

.task-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.task-card__pomodoro {
  color: var(--muted);
  font-size: 13px;
}

.task-play-btn {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: none;
  background: var(--pomodoro);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 16px 40px rgba(255, 138, 101, 0.3);
}

.task-card--done {
  opacity: 0.65;
}

.task-card--done .task-card__title {
  text-decoration: line-through;
}

.empty-state {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
}

.empty-state__icon {
  font-size: 40px;
  display: block;
  margin-bottom: 18px;
}

.empty-state__photo {
  width: 100%;
  max-width: 320px;
  height: 160px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin: 0 auto 18px;
  display: block;
}

.empty-state__text {
  color: var(--muted);
  font-size: 15px;
}

.modal__hero {
  width: calc(100% + 52px);
  margin: -26px -26px 20px;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  display: block;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 24px;
}

.weekly-col {
  display: grid;
  align-items: end;
  justify-items: center;
  gap: 8px;
}

.weekly-bar-fill {
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent-start), var(--accent-end));
  transition: height 0.3s ease;
}

.weekly-col-label {
  color: var(--muted);
  font-size: 12px;
}

.dashboard-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-card h3 {
  margin: 0 0 18px;
  font-size: 18px;
}

.bar-chart {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  align-items: end;
  min-height: 220px;
}

.bar-day {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.bar-day__stacks {
  width: 100%;
  display: grid;
  gap: 4px;
  align-items: end;
}

.bar-stack-seg {
  width: 100%;
  border-radius: 999px;
}

.bar-day__label {
  color: var(--muted);
  font-size: 12px;
}

.bar-day--overload .bar-day__label {
  color: var(--urgente);
}

.pom-stat {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.pom-stat__num {
  font-size: 24px;
  font-weight: 700;
}

.pom-stat__label {
  color: var(--muted);
  margin-top: 8px;
}

.mat-prog-row {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.mat-prog-name {
  font-weight: 700;
}

.mat-prog-bar {
  height: 10px;
  background: var(--surface2);
  border-radius: 999px;
  overflow: hidden;
}

.mat-prog-fill {
  height: 100%;
  border-radius: 999px;
}

.mat-prog-pct {
  text-align: right;
  font-size: 12px;
  color: var(--muted);
}

/* Modal styles */

.modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(32, 33, 36, 0.55);
  backdrop-filter: blur(8px);
  z-index: 40;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: overlayIn 0.18s ease;
}

.modal-overlay.open {
  display: flex;
}

@keyframes overlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal {
  width: min(680px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 26px;
  max-height: min(90vh, 900px);
  overflow-y: auto;
  animation: modalIn 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal--form {
  max-width: 720px;
}

.modal--detalle {
  max-width: 760px;
}

.modal__header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.modal__title {
  margin: 0;
  font-size: 28px;
}

.modal__form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 10px;
}

.field--toggle .toggle-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

#recordatorio-opts {
  display: block;
}

.detalle-body {
  display: grid;
  gap: 20px;
}

.detalle-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.detalle-meta-card {
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--surface2);
  border: 1px solid var(--border);
}

.detalle-desc {
  color: var(--muted);
  line-height: 1.7;
}

.pomodoro-section {
  display: grid;
  gap: 18px;
  justify-items: center;
}

.pomodoro-ring {
  position: relative;
  width: 180px;
  height: 180px;
  display: grid;
  place-items: center;
}

.pomodoro-svg {
  width: 100%;
  height: 100%;
}

.ring-bg {
  fill: none;
  stroke: var(--surface2);
  stroke-width: 10;
}

.ring-progress {
  fill: none;
  stroke: var(--ok);
  stroke-width: 10;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: center;
  transition: stroke-dashoffset 0.9s linear, stroke 0.4s ease;
}

.pomodoro-center {
  position: absolute;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 8px;
}

.pomodoro-time {
  font-size: 28px;
  font-weight: 700;
}

.pomodoro-label {
  color: var(--muted);
  font-size: 13px;
}

.pomodoro-controls {
  display: flex;
  justify-content: center;
  gap: 14px;
}

.pom-btn {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  cursor: pointer;
  font-size: 18px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.pom-btn:hover {
  background: var(--border);
  transform: translateY(-1px);
}

.pom-btn--main {
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  border: none;
  color: #fff;
}

.pomodoro-sessions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.session-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--border);
}

.session-dot.done {
  background: var(--ok);
}

.session-dot.active {
  box-shadow: 0 0 0 4px rgba(52, 168, 83, 0.16);
}

.detalle-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.detalle-secondary-actions {
  display: flex;
  gap: 12px;
}

.modal__form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 10px;
}

.field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface2);
  color: var(--text);
  padding: 14px 16px;
  outline: none;
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.range-value {
  color: var(--muted);
  font-size: 13px;
}

.priority-buttons {
  display: flex;
  gap: 10px;
}

.priority-btn {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface2);
  color: var(--muted);
  padding: 12px 0;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.priority-btn:active {
  transform: scale(0.95);
}

.priority-btn.active,
.priority-btn:hover {
  background: rgba(66, 133, 244, 0.14);
  color: var(--accent-start);
}

.field--toggle .toggle-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.switch {
  position: relative;
  width: 46px;
  height: 26px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border);
  border-radius: 999px;
  transition: background 0.2s ease;
}

.slider::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #fff;
  transition: transform 0.2s ease;
}

.switch input:checked + .slider {
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
}

.switch input:checked + .slider::before {
  transform: translateX(20px);
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.modal__actions--split {
  justify-content: space-between;
}

.btn {
  appearance: none;
  border: none;
  border-radius: var(--radius-pill);
  padding: 14px 22px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0) scale(0.97);
}

.btn--secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--social {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#btn-google-login {
  display: inline-flex;
  align-items: center;
}

.btn--small {
  padding: 10px 16px;
  font-size: 13px;
}

.task-timer {
  margin: 14px 0 12px;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface2);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  flex-wrap: wrap;
}

.task-timer.timer-urgent {
  border-color: var(--urgente);
  background: rgba(234, 67, 53, 0.1);
  color: var(--urgente);
}

.task-timer.timer-medium {
  border-color: var(--medio);
  background: rgba(242, 153, 0, 0.1);
  color: var(--medio);
}

.task-timer.timer-low {
  border-color: var(--ok);
  background: rgba(52, 168, 83, 0.1);
  color: var(--ok);
}

.timer-countdown {
  font-weight: 700;
  flex: 1 1 auto;
  min-width: 160px;
}

.clock-icon {
  display: inline-flex;
  width: 22px;
  justify-content: center;
  font-size: 16px;
}

.timer-blink {
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.fab {
  position: fixed;
  bottom: 26px;
  right: 26px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  color: #fff;
  font-size: 30px;
  cursor: pointer;
  box-shadow: 0 16px 36px rgba(66, 133, 244, 0.35);
  display: grid;
  place-items: center;
  z-index: 20;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.fab:hover {
  transform: scale(1.08) rotate(90deg);
  box-shadow: 0 20px 44px rgba(66, 133, 244, 0.45);
}

.fab:active {
  transform: scale(0.94) rotate(90deg);
}

.select-filter {
  min-width: 220px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 12px 14px;
}

.select-filter option,
.field select option {
  color: #111;
  background: #fff;
}

.special-filters {
  display: flex;
  align-items: center;
}

.social-login {
  margin-top: 16px;
}

.google-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: 10px;
  border-radius: 6px;
  background: #fff;
  padding: 3px;
  flex-shrink: 0;
  vertical-align: middle;
}

.google-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.auth-note {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--muted);
}

.header-countdown {
  color: var(--muted);
  font-size: 13px;
}

.btn--ghost {
  background: var(--surface2);
  color: var(--text);
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  color: #fff;
  box-shadow: 0 12px 28px rgba(66, 133, 244, 0.3);
}

.btn--success {
  background: rgba(52, 168, 83, 0.14);
  color: var(--ok);
}

.btn--danger {
  background: rgba(234, 67, 53, 0.14);
  color: var(--urgente);
}

.toast-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  gap: 12px;
  z-index: 60;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(14px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.toast {
  padding: 14px 18px;
  border-radius: 16px;
  min-width: 240px;
  color: #fff;
  background: #323232;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: var(--shadow-soft);
  animation: toastIn 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.toast--success { border-color: var(--ok); }
.toast--error { border-color: var(--urgente); }
.toast--warning { border-color: var(--medio); }

@media (max-width: 900px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .header-summary { grid-template-columns: 1fr; }
}

/* Apilar la cabecera cuando el contenido no dispone de ancho suficiente. */
@media (max-width: 1100px) {
  .header-inner { grid-template-columns: 1fr; align-items: start; }
  .header-actions {
    width: 100%;
    margin-top: 14px;
    justify-content: flex-start;
  }
  .header-actions .welcome { max-width: min(420px, 70vw); }
}

@media (max-width: 640px) {
  .app-main { padding: 0 18px 120px; }
  .brand { gap: 10px; }
  .stat-card { padding: 14px; }
  .task-card { padding: 18px; }
  .button, .btn { width: 100%; }
}
/* ── Access-aware UX shell ─────────────────────────────────────────────── */
[hidden] { display: none !important; }
[data-workspace-only] { display: none !important; }
body[data-screen="loading"] [data-public-only],
body[data-screen="loading"] [data-workspace-only],
body[data-screen="loading"] .app-main { display: none !important; }
body[data-screen="loading"]::before {
  content: "Preparando tu espacio de trabajo…";
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  background: var(--background);
  font-weight: 700;
}
body[data-screen="workspace"] [data-public-only] { display: none !important; }
body[data-screen="workspace"] [data-workspace-only] { display: revert !important; }
body[data-screen="workspace"] .fab[data-workspace-only] { display: flex !important; }

.public-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 76px;
  padding: 0 5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid #e8ecf4;
  backdrop-filter: blur(18px);
}
.public-brand { display:flex; align-items:center; gap:10px; color:#17233f; font-weight:800; font-size:1.15rem; text-decoration:none; }
.public-brand img { width:38px; height:38px; }
.public-nav { display:flex; gap:26px; }
.public-nav a,.public-footer a { color:#526078; text-decoration:none; font-weight:600; font-size:.92rem; }
.public-nav a:hover,.public-footer a:hover { color:#4f46e5; }
.public-actions { display:flex; gap:10px; }

.hero__actions { display:flex; gap:12px; flex-wrap:wrap; margin-top:24px; }
.hero__trust { margin:12px 0 0; color:#65728a; font-size:.86rem; }
.access-badge { padding:8px 12px; border-radius:999px; font-size:.78rem; font-weight:800; white-space:nowrap; }
.access-badge--guest { color:#8a4b00; background:#fff1d6; border:1px solid #ffd38a; }
.access-badge--authenticated { color:#146c43; background:#dcfce7; border:1px solid #9de5b8; }
.auth-visual { min-height:140px; padding:26px; display:flex; align-items:end; gap:10px; background:radial-gradient(circle at 80% 20%,#7dd3fc 0 8%,transparent 9%),linear-gradient(135deg,#312e81,#4f46e5 55%,#06b6d4); }
.auth-visual span { padding:9px 12px; border-radius:12px; color:#fff; background:rgba(255,255,255,.16); border:1px solid rgba(255,255,255,.24); font-weight:800; backdrop-filter:blur(8px); }
.auth-visual span:first-child { width:46px; height:46px; display:grid; place-items:center; border-radius:50%; font-size:1.3rem; background:#fff; color:#4f46e5; }

.public-integrations,.workspace-integrations,.contact-section {
  max-width:1200px;
  margin:70px auto;
  padding:0 24px;
}
.public-integrations .section-header,.workspace-integrations .section-header {
  display:flex; justify-content:space-between; gap:24px; align-items:end;
}
.public-integrations .section-header > p { max-width:470px; color:#65728a; }
.integration-showcase { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin-top:28px; }
.integration-showcase article {
  min-height:190px; padding:26px; border-radius:24px; background:#fff;
  border:1px solid #e7ebf3; box-shadow:0 14px 40px rgba(34,48,86,.07);
  transition:transform .2s ease, box-shadow .2s ease;
}
.integration-showcase article:hover { transform:translateY(-4px); box-shadow:0 20px 44px rgba(34,48,86,.12); }
.service-logo { width:46px; height:46px; padding:9px; border-radius:14px; background:#fff; border:1px solid #e7ebf3; box-sizing:border-box; box-shadow:0 8px 18px rgba(20,34,70,.1); }
.integration-showcase h3 { margin:18px 0 8px; color:#17233f; }
.integration-showcase p { color:#65728a; line-height:1.6; }
.app-mark { width:46px; height:46px; border-radius:14px; display:inline-grid; place-items:center; color:#fff; font-weight:900; box-shadow:0 8px 18px rgba(20,34,70,.14); }
.app-mark--google { background:linear-gradient(135deg,#4285f4,#34a853); }
.app-mark--drive { background:#fbbc04; color:#234; }
.app-mark--classroom { background:#1e8e3e; }
.app-mark--teams { background:#6264a7; }
.app-mark--onedrive { background:#0078d4; }
.app-mark--mail { background:#ea4335; }

.workspace-integrations {
  padding:26px; border-radius:24px; background:linear-gradient(135deg,#f4f5ff,#eef9ff);
  border:1px solid #dfe5fb;
}
.workspace-apps { display:flex; gap:14px; align-items:stretch; flex-wrap:wrap; margin-top:22px; }
.workspace-apps > div { min-width:240px; display:grid; grid-template-columns:52px 1fr; padding:18px; background:#fff; border-radius:18px; }
.workspace-apps .app-mark { grid-row:1/3; margin-right:12px; }
.workspace-apps .service-logo { grid-row:1/3; margin-right:12px; }
.workspace-apps small { color:#65728a; }
.guest-lock-message { display:none; align-items:center; padding:16px; color:#805000; background:#fff3d9; border-radius:16px; }
body[data-access="guest"] .guest-lock-message { display:flex; }
body[data-access="guest"] [data-auth-only] { opacity:.55; }

.contact-section { display:grid; grid-template-columns:1fr minmax(320px,520px); gap:54px; align-items:center; padding:48px; border-radius:30px; color:#fff; background:#17233f; }
.contact-section h2 { font-size:clamp(2rem,4vw,3rem); margin:10px 0 18px; }
.contact-section p { color:#c4cce0; line-height:1.7; }
.contact-card { padding:24px; border-radius:22px; background:#fff; color:#17233f; display:grid; gap:14px; }
.contact-card label { display:grid; gap:7px; font-weight:700; font-size:.86rem; }
.contact-card input,.contact-card textarea { width:100%; padding:12px 14px; border:1px solid #d9deea; border-radius:12px; font:inherit; box-sizing:border-box; }
.contact-card small { color:#65728a; }
.public-footer { padding:36px 5vw; display:grid; grid-template-columns:1fr auto auto; gap:32px; align-items:center; border-top:1px solid #e7ebf3; background:#fff; color:#65728a; }
.public-footer div:nth-child(2) { display:flex; gap:20px; }

@media (max-width: 900px) {
  .public-nav { display:none; }
  .integration-showcase { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .contact-section { grid-template-columns:1fr; padding:32px 24px; }
  .public-footer { grid-template-columns:1fr; }
}
@media (max-width: 600px) {
  .public-header { padding:12px 16px; min-height:64px; }
  .public-brand span,.public-actions .btn--ghost { display:none; }
  .integration-showcase { grid-template-columns:1fr; }
  .public-integrations,.workspace-integrations,.contact-section { margin:42px auto; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior:auto !important; animation-duration:.01ms !important; transition-duration:.01ms !important; }
}

/* ── Workspace navigation and tools ────────────────────────────────────── */
.workspace-sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 120; width: 238px; padding: 20px 14px;
  color: #eef2ff; background: #111a33; box-shadow: 14px 0 36px rgba(17,26,51,.14);
  flex-direction: column; gap: 18px; box-sizing: border-box;
}
body[data-screen="workspace"] .workspace-sidebar { display: flex !important; }
.workspace-sidebar__nav { display: grid; gap: 6px; }
.sidebar-toggle,.sidebar-link {
  border: 0; font: inherit; cursor: pointer; color: inherit; background: transparent;
}
.sidebar-toggle { width: 44px; height: 44px; border-radius: 13px; font-size: 1.2rem; background: rgba(255,255,255,.09); }
.sidebar-link { width: 100%; min-height: 46px; padding: 10px 13px; display: flex; align-items: center; gap: 13px; border-radius: 13px; text-align: left; }
.sidebar-link span { width: 24px; display: grid; place-items: center; font-size: 1.15rem; }
.sidebar-link b { font-size: .9rem; white-space: nowrap; }
.sidebar-link:hover,.sidebar-link:focus-visible,.sidebar-link.active { color: #fff; background: rgba(99,102,241,.34); outline: none; }
.sidebar-link--logout { margin-top: auto; color: #fecaca; }
body[data-screen="workspace"] .app-header,
body[data-screen="workspace"] .app-main { margin-left: 238px; transition: margin-left .2s ease; }
body.sidebar-collapsed .workspace-sidebar { width: 76px; }
body.sidebar-collapsed .sidebar-link b { display: none; }
body.sidebar-collapsed .sidebar-link { justify-content: center; padding-inline: 8px; }
body.sidebar-collapsed[data-screen="workspace"] .app-header,
body.sidebar-collapsed[data-screen="workspace"] .app-main { margin-left: 76px; }

.workspace-page { max-width: 1180px; margin: 0 auto; padding: 34px 26px 90px; }
.workspace-page__heading { padding: 28px; border-radius: 26px; color: #fff; background: linear-gradient(130deg,#17233f,#4338ca 68%,#0891b2); }
.workspace-page__heading h2 { margin: 6px 0 10px; font-size: clamp(2rem,4vw,3.2rem); }
.workspace-page__heading p { max-width: 720px; line-height: 1.65; color: #dbeafe; }
.integration-auth-notice { margin: 14px 0 0; padding: 12px 14px; border-left: 3px solid #6d7ff2; border-radius: 8px 12px 12px 8px; color: #526079; background: #f5f7ff; }
.integration-guide { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 20px; }
.integration-guide > div { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border: 1px solid #e2e7f0; border-radius: 16px; background: #f8faff; }
.integration-guide > div > span { flex: 0 0 34px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; color: #3853c7; background: #e8edff; font-weight: 900; }
.integration-guide p { display: grid; gap: 3px; margin: 0; color: #27344f; }
.integration-guide small { color: #69758c; line-height: 1.35; }
.integration-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-top: 24px; }
.integration-card { position: relative; min-height: 180px; padding: 23px; display: grid; grid-template-columns: 62px 1fr; gap: 13px; align-items: start; border: 1px solid #e2e7f0; border-radius: 22px; background: #fff; box-shadow: 0 12px 34px rgba(33,47,82,.07); }
.integration-card > a[aria-label^="Abrir"] { position: relative; width: 58px; height: 58px; display: grid; place-items: center; border: 1px solid #e4e9f2; border-radius: 16px; background: linear-gradient(145deg,#fff,#f6f8fc); box-shadow: 0 7px 18px rgba(33,47,82,.09); text-decoration: none; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.integration-card > a[aria-label^="Abrir"]::after { content: "↗"; position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; display: grid; place-items: center; border: 2px solid #fff; border-radius: 50%; color: #46536d; background: #eef2f8; font-size: .68rem; font-weight: 900; }
.integration-card > a[aria-label^="Abrir"]:hover { transform: translateY(-2px); border-color: #b8c6f5; box-shadow: 0 10px 24px rgba(64,88,166,.16); }
.integration-card > a[aria-label^="Abrir"]:focus-visible { outline: 3px solid rgba(79,110,247,.28); outline-offset: 3px; }
.integration-card > a[aria-label^="Abrir"] img { width: 40px; height: 40px; padding: 0; border: 0; border-radius: 0; background: transparent; box-sizing: border-box; }
.integration-card h3 { margin: 3px 0 7px; color: #17233f; }
.integration-card p { margin: 0 0 9px; color: #65728a; line-height: 1.5; }
.integration-card small { color: #7c879c; }
.integration-card .btn { align-self: end; justify-self: end; grid-column: 2; }
.integration-status { position: absolute; top: 18px; right: 18px; padding: 6px 9px; border-radius: 999px; color: #65728a; background: #eef1f6; font-size: .7rem; font-weight: 800; text-transform: uppercase; }
.integration-status--available { color: #146c43; background: #dcfce7; }
body[data-access="guest"] .integration-action { pointer-events: none; opacity: .48; }
.gmail-compose { margin-top: 20px; padding: 24px; border: 1px solid #e2e7f0; border-radius: 22px; background: #fff; box-shadow: 0 12px 34px rgba(33,47,82,.07); }
.gmail-compose[hidden] { display: none; }
.gmail-compose__help { margin: 0 0 18px; color: #65728a; }
.gmail-compose label { display: grid; gap: 7px; margin-top: 14px; color: #35415b; font-weight: 700; }
.gmail-compose input,.gmail-compose textarea { width: 100%; padding: 12px 14px; border: 1px solid #d9dfeb; border-radius: 12px; color: #17233f; background: #fbfcff; font: inherit; box-sizing: border-box; }
.gmail-compose input:focus,.gmail-compose textarea:focus { border-color: #6179ee; outline: 3px solid rgba(97,121,238,.15); }
.gmail-compose__actions { display: flex; justify-content: flex-end; margin-top: 18px; }

.recorder-layout { display: grid; grid-template-columns: 270px 1fr; gap: 20px; margin-top: 24px; }
.recorder-options { display: grid; gap: 10px; align-content: start; }
.record-source { min-height: 70px; padding: 14px 18px; display: flex; align-items: center; gap: 13px; border: 1px solid #dfe5ee; border-radius: 17px; background: #fff; color: #25324d; font: inherit; font-weight: 700; cursor: pointer; text-align: left; }
.record-source:hover,.record-source:focus-visible { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.12); outline: none; }
.recorder-studio { padding: 18px; border: 1px solid #dfe5ee; border-radius: 24px; background: #fff; }
.recorder-preview { position: relative; min-height: 360px; display: grid; place-items: center; overflow: hidden; border-radius: 18px; color: #cbd5e1; background: #0f172a; }
.recorder-preview video { width: 100%; max-height: 520px; display: block; }
.recorder-placeholder { position: absolute; max-width: 430px; padding: 24px; text-align: center; line-height: 1.6; }
.recording-indicator { position: absolute; top: 16px; left: 16px; padding: 8px 12px; display: flex; align-items: center; gap: 8px; border-radius: 999px; color: #fff; background: rgba(20,24,38,.82); font-size: .8rem; font-weight: 800; }
.recording-indicator i { width: 9px; height: 9px; border-radius: 50%; background: #ef4444; animation: recordPulse 1s infinite; }
@keyframes recordPulse { 50% { opacity: .35; } }
.recorder-controls { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.recorder-status { margin: 15px 3px 3px; color: #65728a; line-height: 1.5; }
.settings-card { margin-top: 24px; padding: 26px; border: 1px solid #dfe5ee; border-radius: 22px; background: #fff; }

@media (max-width: 900px) {
  .workspace-sidebar { inset: auto 0 0 0; width: 100%; height: 70px; padding: 8px; flex-direction: row; overflow-x: auto; }
  .workspace-sidebar__nav { display: flex; gap: 4px; }
  .sidebar-toggle,.sidebar-link b,.sidebar-link--logout { display: none; }
  .sidebar-link { width: 52px; min-width: 52px; justify-content: center; padding: 8px; }
  body[data-screen="workspace"] .app-header,body[data-screen="workspace"] .app-main,
  body.sidebar-collapsed[data-screen="workspace"] .app-header,body.sidebar-collapsed[data-screen="workspace"] .app-main { margin-left: 0; }
  .integration-grid,.integration-guide,.recorder-layout { grid-template-columns: 1fr; }
  .recorder-options { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 560px) {
  .workspace-page { padding-inline: 16px; }
  .integration-grid,.recorder-options { grid-template-columns: 1fr; }
  .integration-card { grid-template-columns: 46px 1fr; padding: 18px; }
  .integration-status { position: static; grid-column: 2; justify-self: start; }
  .recorder-preview { min-height: 240px; }
}

/* ── Public page visual rhythm v2 ──────────────────────────────────────── */
.public-header { min-height: 68px; padding-inline: clamp(18px,4vw,58px); gap: 20px; }
.public-brand img { width: 44px; height: 44px; }
.public-nav { gap: clamp(14px,2vw,28px); }
.public-actions .btn { min-height: 40px; padding: 9px 15px; border-radius: 12px; font-size: .84rem; box-shadow: none; }
.public-actions .btn--primary { box-shadow: 0 8px 18px rgba(66,133,244,.16); }
.hero { margin-top: 34px; padding: clamp(38px,6vw,76px); border: 0; border-radius: 34px; background: linear-gradient(125deg,#f7f8ff 0%,#eef7ff 54%,#eefbf6 100%); box-shadow: 0 24px 70px rgba(47,61,110,.09); }
.hero__content { grid-template-columns: minmax(0,.86fr) minmax(440px,1.14fr); gap: 54px; align-items: center; }
.hero__title { max-width: 620px; font-size: clamp(2.6rem,5vw,4.9rem); letter-spacing: -.045em; }
.hero__subtitle { max-width: 560px; font-size: 1.08rem; }
.hero__mockup { min-height: 430px; display: grid; place-items: center; }
.hero-art { width: 100%; height: auto; max-height: 560px; object-fit: contain; filter: drop-shadow(0 24px 30px rgba(40,77,160,.2)); animation: heroFloat 6s ease-in-out infinite; }
.mockup-frame { display: none; }
@keyframes heroFloat { 50% { transform: translateY(-9px); } }
.how-to,.public-integrations,.about-section,.contact-section { margin-block: 92px; }
.how-to { padding: 64px 46px; border-radius: 32px; background: #f3f6fb; border: 1px solid #e4e9f1; }
.how-grid { gap: 24px; margin-top: 30px; }
.how-card { min-height: 250px; padding: 34px 28px; border: 0; border-radius: 24px; background: #fff; }
.public-integrations { max-width: none; padding: 72px max(5vw,28px); margin-inline: -28px; background: linear-gradient(135deg,#111a33,#263b72); color: #fff; }
.public-integrations .section-header { max-width: 1200px; margin: 0 auto; }
.public-integrations .section-header > p,.public-integrations .section-label { color: #cbd5e1; }
.integration-showcase { max-width: 1200px; margin-inline: auto; }
.about-section { padding: 70px 44px; border-radius: 32px; background: #f4fbf8; border: 1px solid #dceee5; }
.contact-section { background: linear-gradient(125deg,#312e81,#17233f 65%,#0e7490); }
.file-workspace { display:grid; grid-template-columns:minmax(300px,.8fr) minmax(320px,1.2fr); gap:20px; margin-top:24px; }
.workspace-page__heading--files { background:linear-gradient(130deg,#0f766e,#2563eb 65%,#4f46e5); }
.file-dropzone { min-height:260px; padding:32px; display:grid; place-items:center; align-content:center; gap:12px; text-align:center; border:2px dashed #9ba8c3; border-radius:24px; color:#25324d; background:#f8faff; cursor:pointer; }
.file-dropzone:hover,.file-dropzone:focus-within { border-color:#4f46e5; background:#f1f3ff; }
.file-dropzone input { position:absolute; width:1px; height:1px; opacity:0; }
.file-dropzone__icon { width:58px; height:58px; display:grid; place-items:center; border-radius:18px; color:#fff; background:linear-gradient(135deg,#4f46e5,#06b6d4); font-size:1.8rem; }
.file-dropzone small { max-width:360px; color:#6b7890; line-height:1.55; }
.file-actions { display:grid; gap:10px; }
.file-actions a { min-height:74px; padding:14px 18px; display:grid; grid-template-columns:44px 1fr auto; gap:12px; align-items:center; color:#17233f; text-decoration:none; border:1px solid #dfe5ee; border-radius:18px; background:#fff; }
.file-actions a:hover { border-color:#6366f1; transform:translateY(-2px); box-shadow:0 12px 28px rgba(40,54,90,.08); }
.file-actions span { display:grid; gap:4px; }.file-actions small { color:#718096; }
.selected-files { grid-column:1/-1; padding:24px; border:1px solid #dfe5ee; border-radius:22px; background:#fff; }
#workspace-file-list { margin:18px 0 0; padding:0; display:grid; gap:8px; list-style:none; }
#workspace-file-list li { padding:12px; display:grid; grid-template-columns:46px 1fr auto; gap:12px; align-items:center; border-radius:14px; background:#f6f8fc; }
#workspace-file-list li span:nth-child(2) { display:grid; gap:3px; } #workspace-file-list small,#workspace-file-list em { color:#718096; font-size:.78rem; }
.file-type { width:42px; height:42px; display:grid; place-items:center; border-radius:11px; color:#4f46e5; background:#e7e9ff; font-size:.7rem; font-weight:900; }
.btn--youtube { color:#fff; background:#ff0033; text-decoration:none; }
@media(max-width:1100px){.hero__content{grid-template-columns:1fr}.hero__mockup{min-height:280px}.hero-art{max-height:440px}.public-header{flex-wrap:wrap}.public-actions{margin-left:auto}}
@media(max-width:760px){.hero{padding:34px 24px}.how-to,.about-section{padding:42px 22px}.file-workspace{grid-template-columns:1fr}.public-actions .btn{padding:8px 11px}.public-integrations{margin-inline:-18px}.hero__mockup{min-height:220px}}

/* ── Typography and spacing refinement ─────────────────────────────────── */
html { scroll-padding-top: 88px; }
body { font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
h1,h2,h3,.brand-label,.public-brand { font-family: "Plus Jakarta Sans", "Inter", sans-serif; }
section[id] { scroll-margin-top: 88px; }
.public-brand { gap: 13px; }
.public-header { min-height: 64px; }
.public-actions { align-items: center; }
.public-actions [hidden] { display: none !important; }
.public-actions .btn { white-space: nowrap; }
.hero { margin-top: 28px; padding-block: clamp(42px,5vw,66px); }
.hero__content { gap: clamp(34px,4vw,58px); }
.hero__title { max-width: 650px; font-size: clamp(3rem,4.65vw,4.25rem); line-height: 1.06; }
.hero__subtitle { margin-top: 20px; }
.hero__mockup { min-height: 350px; transform: translateY(-8px); }
.hero-art { max-height: 500px; }
.how-to,.product-story,.public-integrations,.about-section,.contact-section { margin-block: 72px; }
.how-to { padding: 50px 46px 54px; }
.how-to > .section-header { margin-bottom: 24px; }
.how-grid { gap: 20px; margin-top: 0; }
.how-card { min-height: 205px; padding: 28px 26px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.how-card img { width: 68px; height: 68px; margin-bottom: 10px; }
.how-card h3 { margin-block: 10px 8px; }
.how-card p { margin-bottom: 0; }
.product-story { display:grid; grid-template-columns:minmax(0,1fr) minmax(280px,430px); gap:clamp(42px,7vw,96px); align-items:center; padding:clamp(42px,6vw,76px); border-radius:32px; background:#fff; border:1px solid #e4e9f1; box-shadow:0 20px 60px rgba(40,54,90,.07); }
.product-story__copy h2 { max-width:720px; margin:10px 0 18px; font-size:clamp(2rem,3.6vw,3.25rem); line-height:1.12; letter-spacing:-.035em; color:#172033; }
.product-story__copy > p:not(.section-label) { max-width:650px; color:#60708b; font-size:1.02rem; line-height:1.75; }
.product-story__steps { display:grid; gap:12px; margin:28px 0 0; padding:0; list-style:none; }
.product-story__steps li { display:grid; grid-template-columns:38px 1fr; gap:13px; align-items:center; }
.product-story__steps li > span { width:38px; height:38px; display:grid; place-items:center; border-radius:12px; color:#fff; background:linear-gradient(135deg,#4285f4,#2eaf68); font-weight:800; }
.product-story__steps div { display:grid; gap:2px; }
.product-story__steps strong { color:#1d2942; }
.product-story__steps small { color:#718096; font-size:.86rem; }
.product-story__media { width:min(100%,360px); margin:0 auto; }
.product-story__video-frame { position:relative; overflow:hidden; padding:8px; border-radius:30px; background:#172033; box-shadow:0 28px 58px rgba(23,32,51,.22); }
.product-story__video-frame::before { content:""; position:absolute; z-index:1; top:16px; left:50%; width:62px; height:6px; border-radius:99px; background:rgba(255,255,255,.68); transform:translateX(-50%); pointer-events:none; }
.product-story video { display:block; width:100%; aspect-ratio:9/16; border-radius:23px; object-fit:cover; background:#eaf0f8; }
.product-story figcaption { margin-top:14px; color:#7a869b; font-size:.74rem; line-height:1.5; text-align:center; }
.product-story figcaption a { color:#5262b7; text-underline-offset:3px; }
.public-integrations { padding-block: 58px 64px; }
.public-integrations .integration-showcase { margin-top: 26px; }
.about-section { padding-block: 58px; }
@media (max-width:1100px) {
  .public-header { padding-block: 10px; }
  .public-nav { order: 3; width: 100%; justify-content: center; }
  .hero__title { max-width: 760px; }
  .product-story { grid-template-columns:minmax(0,1fr) minmax(260px,340px); }
}
@media (max-width:760px) {
  .public-nav { display:none; }
  .hero__title { font-size: clamp(2.55rem,12vw,3.4rem); }
  .hero__mockup { min-height: 210px; transform:none; }
  .how-to,.product-story,.public-integrations,.about-section,.contact-section { margin-block: 48px; }
  .how-to { padding: 36px 20px; }
  .how-card { min-height: 180px; }
  .product-story { grid-template-columns:1fr; padding:38px 22px; }
  .product-story__media { width:min(88%,320px); }
}


/* Acciones de conexión: evita superposición y mantiene controles táctiles claros. */
.integration-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.integration-card__actions .btn {
  min-height: 44px;
}

.integration-disconnect {
  color: var(--urgente);
  border-color: rgba(234, 67, 53, 0.32);
}

.integration-disconnect:hover {
  background: rgba(234, 67, 53, 0.08);
  border-color: var(--urgente);
}

button[aria-busy="true"] {
  cursor: wait;
  opacity: 0.72;
}

@media (max-width: 640px) {
  .integration-card__actions {
    width: 100%;
  }

  .integration-card__actions .btn {
    flex: 1 1 100%;
  }
}
