/* ─────────────────────────────────────────────────────────────────
   inscripcions.css — ported VERBATIM from inscripcions-v3/inscripcions.html
   (the client-approved design Jaume prefers). Tokens from colors_and_type.css.
   Extra-feature styles (checkout wizard, baixa modal, pendents) appended below
   in the same visual language.
   ───────────────────────────────────────────────────────────────── */

    /* ════════════════════════════════════════════════════════════════
       INSCRIPCIÓ D'EXTRAESCOLARS — v3 · BP design system applied
       Single page admin · 1280+ desktop, mobile companion below.
       ════════════════════════════════════════════════════════════════ */

    *, *::before, *::after { box-sizing: border-box; }
    html, body { margin: 0; padding: 0; }
    body {
      background: #F4F2EE;
      font-family: var(--bp-font-body);
      color: var(--bp-ink);
      font-size: 15px;
      line-height: 1.45;
      -webkit-font-smoothing: antialiased;
      text-rendering: optimizeLegibility;
      padding-bottom: 96px;
    }
    a { color: inherit; text-decoration: none; }
    button { font-family: inherit; cursor: pointer; }
    h1, h2, h3, h4, h5, h6, p { margin: 0; }

    /* ── Page wrapper ─────────────────────────────────────────────── */
    .page {
      max-width: 1480px;
      margin: 0 auto;
      padding: 0 40px;
    }

    /* ── Top bar ──────────────────────────────────────────────────── */
    .topbar {
      display: flex; align-items: center; gap: 24px;
      padding: 14px 0;
      border-bottom: 1px solid var(--bp-red);
      margin-bottom: 32px;
    }
    /* Entire top region (topbar + title + student tabs + filters) stays pinned;
       only the activity grid scrolls beneath it. */
    .stickytop {
      position: sticky; top: 0; z-index: 20;
      background: #F4F2EE;
      padding-bottom: 24px;
    }
    .topbar .logo { display: inline-flex; align-items: center; }
    .topbar .logo img { height: 34px; width: auto; display: block; }
    .topbar .crumb {
      font-family: var(--bp-font-display);
      font-size: 11px; letter-spacing: 0.12em;
      text-transform: uppercase; font-weight: 700;
      color: var(--bp-grey-700);
      padding-left: 24px;
      border-left: 1px solid var(--bp-grey-100);
    }
    .topbar .grow { flex: 1; }
    .topbar .userline {
      display: flex; align-items: center; gap: 12px;
      font-size: 13px;
    }
    .topbar .userline .name { color: var(--bp-ink); font-weight: 500; }
    .topbar .userline .role {
      font-family: var(--bp-font-display);
      font-size: 10px; letter-spacing: 0.10em; text-transform: uppercase;
      color: var(--bp-grey-500); font-weight: 700;
    }
    .topbar .avatar {
      width: 36px; height: 36px;
      background: var(--bp-ink); color: var(--bp-white);
      display: inline-flex; align-items: center; justify-content: center;
      font-family: var(--bp-font-display); font-weight: 700;
      font-size: 13px; letter-spacing: 0.04em;
    }

    /* ── Title block ─────────────────────────────────────────────── */
    .title-block {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 32px;
      align-items: start;
      margin-bottom: 32px;
    }
    .title-block .eyebrow {
      font-family: var(--bp-font-display);
      font-size: 11px; letter-spacing: 0.14em;
      text-transform: uppercase; font-weight: 700;
      color: var(--bp-grey-700);
      margin-bottom: 10px;
    }
    .title-block h1 {
      font-family: var(--bp-font-display);
      font-weight: 700; font-size: 48px; line-height: 0.95;
      letter-spacing: -0.015em;
      color: var(--bp-ink);
      max-width: 780px;
    }
    .title-block h1 em {
      font-style: normal; color: var(--bp-red);
    }

    /* ── Student tabs ────────────────────────────────────────────── */
    .student-tabs {
      display: flex;
      gap: 0;
      border: 1px solid var(--bp-ink);
      background: var(--bp-white);
    }
    .student-tab {
      display: flex; flex-direction: column;
      padding: 12px 18px 10px;
      min-width: 150px;
      background: transparent;
      border: none;
      border-right: 1px solid var(--bp-grey-100);
      text-align: left;
      transition: background 0.12s;
      position: relative;
    }
    .student-tab:last-child { border-right: none; }
    .student-tab:hover { background: #FAF7F2; }
    .student-tab .who {
      font-family: var(--bp-font-display);
      font-size: 14px; font-weight: 700;
      color: var(--bp-ink); letter-spacing: -0.005em;
      line-height: 1.1;
    }
    .student-tab .curs {
      font-family: var(--bp-font-display);
      font-size: 10px; letter-spacing: 0.10em;
      text-transform: uppercase; font-weight: 700;
      color: var(--bp-grey-500);
      margin-top: 4px;
    }
    .student-tab .dot {
      position: absolute;
      top: 12px; right: 12px;
      width: 8px; height: 8px;
    }
    .student-tab.active {
      background: var(--bp-ink);
    }
    .student-tab.active .who { color: var(--bp-white); }
    .student-tab.active .curs { color: rgba(255,255,255,0.6); }
    .stu-ext { display: inline-block; margin-left: 5px; padding: 0 5px; border-radius: 999px;
      font-size: 9px; letter-spacing: 0.02em; color: var(--bp-red); box-shadow: inset 0 0 0 1px var(--bp-red); }
    .student-tab.active .stu-ext { color: var(--bp-white); box-shadow: inset 0 0 0 1px var(--bp-white); }

    /* student colour dots */
    .stu-pol   { background: #2E6BDB; }
    .stu-julia { background: #6A1B9A; }
    .stu-marc  { background: var(--bp-red); }

    /* "Diversos fills" multi-select toggle */
    .multi-toggle {
      display: inline-flex; align-items: center; gap: 8px;
      border: 0; background: none; cursor: pointer; padding: 0;
      color: var(--bp-ink); font-family: inherit;
    }
    .multi-toggle .mt-track {
      position: relative; flex: none; width: 36px; height: 20px;
      border-radius: 999px; background: #C9CDD6; transition: background .15s ease;
    }
    .multi-toggle .mt-thumb {
      position: absolute; top: 2px; left: 2px; width: 16px; height: 16px;
      border-radius: 50%; background: var(--bp-white);
      box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: left .15s ease;
    }
    .multi-toggle.is-on .mt-track { background: var(--bp-red); }
    .multi-toggle.is-on .mt-thumb { left: 18px; }
    .multi-toggle .mt-lbl { font-size: 13px; font-weight: 600; letter-spacing: .01em; }

    /* ── Bottom-fixed basket bar ─────────────────────────────────── */
    .basket-dock {
      position: fixed; left: 0; right: 0; bottom: 0;
      background: var(--bp-white);
      border-top: 1px solid var(--bp-red);
      z-index: 200;
      box-shadow: 0 -12px 32px -16px rgba(20, 14, 6, 0.10);
    }
    /* When a basket is open, swap the red dock-line for ink so the open
       cell + popover read as one continuous panel. */
    .basket-dock:has(.basket-cell.open) { border-top-color: var(--bp-ink); }
    .basket-dock-inner {
      max-width: 1480px;
      margin: 0 auto;
      padding: 0 40px;
      display: grid;
      grid-template-columns: 1fr 1fr auto;
      align-items: stretch;
      gap: 0;
    }
    .basket-cell {
      padding: 16px 24px;
      display: flex; align-items: center; gap: 20px;
      cursor: pointer;
      border-right: 1px solid var(--bp-grey-100);
      position: relative;
      transition: background 0.12s;
    }
    .basket-cell:hover { background: #FAF7F2; }
    .basket-cell .icon {
      width: 44px; height: 44px;
      display: inline-flex; align-items: center; justify-content: center;
      flex-shrink: 0;
    }
    .basket-cell.new .icon { background: var(--bp-red); color: var(--bp-white); }
    .basket-cell.confirmed .icon { background: var(--bp-ink); color: var(--bp-white); }
    .basket-cell .icon svg { width: 22px; height: 22px; stroke-width: 2.2; }
    .basket-cell .meta { flex: 1; min-width: 0; }
    .basket-cell .lab {
      font-family: var(--bp-font-display);
      font-size: 10px; letter-spacing: 0.12em;
      text-transform: uppercase; font-weight: 700;
      color: var(--bp-grey-700);
      line-height: 1;
      margin-bottom: 6px;
    }
    .basket-cell .ttl {
      font-family: var(--bp-font-display);
      font-size: 16px; font-weight: 700;
      color: var(--bp-ink); line-height: 1.1;
      letter-spacing: -0.005em;
    }
    .basket-cell .ttl .count {
      color: var(--bp-grey-500);
      font-weight: 500;
      margin-left: 6px;
    }
    .basket-cell .price {
      font-family: var(--bp-font-display);
      font-weight: 700; font-size: 22px;
      color: var(--bp-ink); line-height: 1;
      letter-spacing: -0.01em;
    }
    .basket-cell.new .price { color: var(--bp-red); }
    .basket-cell .chev {
      width: 14px; height: 14px;
      flex-shrink: 0;
      color: var(--bp-grey-500);
      transition: transform 0.18s;
    }
    .basket-cell.open .chev { transform: rotate(180deg); }

    /* Open-state visual link between trigger cell and its popover.
       Side borders + cream bg so the cell reads as the foot of the panel. */
    .basket-cell.open {
      background: #FAF7F2;
      box-shadow: inset 2px 0 0 var(--bp-ink), inset -2px 0 0 var(--bp-ink);
    }
    .basket-cell.open .lab { color: var(--bp-ink); }

    .basket-finalize {
      display: flex; align-items: center; justify-content: center;
      padding: 16px 0 16px 24px;
    }

    /* Popovers above the dock — sit FLUSH on top of the trigger cell.
       bottom: calc(100% + 1px) lifts the panel above the dock's top-border
       so the dock line, popover, and cell read as one connected unit. */
    .basket-pop {
      position: absolute;
      bottom: calc(100% + 1px);
      left: 0; right: 0;
      background: var(--bp-white);
      border: 2px solid var(--bp-ink);
      border-bottom: none;
      max-height: min(480px, 72vh);
      overflow: hidden;
      display: flex;
      flex-direction: column;
      box-shadow: 0 -16px 40px -8px rgba(20, 14, 6, 0.18);
      display: none;
      z-index: 10;
    }
    .basket-cell.open .basket-pop { display: flex; }
    .basket-pop-inner { padding: 20px 24px 24px; flex: 1; min-height: 0; display: flex; flex-direction: column; }
    /* Header + subtotal + actions stay pinned; only the list scrolls. */
    .basket-pop #llista-cistella, .basket-pop #llista-previes { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
    .basket-pop .section-head { flex: none; }
    .basket-pop .subtotal, .basket-pop .actions { flex: none; }
    .basket-pop .section-head {
      font-family: var(--bp-font-display);
      font-size: 10px; letter-spacing: 0.12em;
      text-transform: uppercase; font-weight: 700;
      color: var(--bp-grey-700);
      padding-bottom: 12px;
      border-bottom: 1px solid var(--bp-grey-100);
      margin-bottom: 12px;
    }
    .basket-pop .empty {
      padding: 28px 0;
      text-align: center;
      font-size: 13px; color: var(--bp-grey-500);
    }
    .basket-pop .item {
      display: grid;
      grid-template-columns: auto 1fr auto auto;
      gap: 12px;
      align-items: start;
      padding: 12px 0;
      border-bottom: 1px solid var(--bp-grey-100);
    }
    .basket-pop .item:last-child { border-bottom: none; }
    .basket-pop .item .stripe {
      width: 4px; align-self: stretch;
      background: var(--bp-grey-200);
    }
    .basket-pop .item .body { min-width: 0; }
    .basket-pop .item .name {
      font-family: var(--bp-font-display);
      font-weight: 700; font-size: 14px;
      color: var(--bp-ink);
      line-height: 1.2;
    }
    .basket-pop .item .meta {
      display: flex; gap: 8px; flex-wrap: wrap;
      align-items: center;
      margin-top: 4px;
      font-size: 12px; color: var(--bp-grey-700);
    }
    .basket-pop .item .price {
      font-family: var(--bp-font-display);
      font-weight: 700; font-size: 14px;
      color: var(--bp-ink); white-space: nowrap;
    }
    .basket-pop .item .price.zero { color: var(--bp-grey-500); }
    .basket-pop .item .rm {
      background: none; border: 1px solid var(--bp-grey-100);
      width: 22px; height: 22px;
      display: inline-flex; align-items: center; justify-content: center;
      color: var(--bp-grey-700);
      font-size: 13px;
      transition: all 0.12s;
    }
    .basket-pop .item .rm:hover { border-color: var(--bp-red); color: var(--bp-red); }
    .basket-pop .actions {
      margin-top: 16px;
      display: flex; flex-direction: column; gap: 10px;
    }
    .basket-pop .subtotal {
      display: flex; justify-content: space-between; align-items: baseline;
      padding-top: 14px; margin-top: 4px;
      border-top: 2px solid var(--bp-ink);
    }
    .basket-pop .subtotal .lab {
      font-family: var(--bp-font-display);
      font-size: 11px; letter-spacing: 0.10em;
      text-transform: uppercase; font-weight: 700;
      color: var(--bp-ink);
    }
    .basket-pop .subtotal .val {
      font-family: var(--bp-font-display);
      font-weight: 700; font-size: 24px;
      color: var(--bp-ink); letter-spacing: -0.01em;
    }

    /* ── Student tag (in basket items) ───────────────────────────── */
    .stu-tag {
      display: inline-flex; align-items: center; gap: 6px;
      font-family: var(--bp-font-display);
      font-size: 9px; letter-spacing: 0.10em;
      text-transform: uppercase; font-weight: 700;
      padding: 3px 7px;
      background: var(--bp-white);
      border: 1px solid var(--bp-grey-100);
      color: var(--bp-grey-700);
      line-height: 1;
    }
    .stu-tag .dotsm { width: 6px; height: 6px; }

    /* ── Buttons ─────────────────────────────────────────────────── */
    .btn {
      font-family: var(--bp-font-display);
      font-weight: 700; font-size: 13px;
      letter-spacing: 0.04em;
      padding: 12px 22px;
      border: 1.5px solid var(--bp-ink);
      background: var(--bp-white);
      color: var(--bp-ink);
      cursor: pointer;
      border-radius: 73px;
      line-height: 1;
      transition: all 0.14s ease;
      white-space: nowrap;
      display: inline-flex; align-items: center; gap: 8px;
      text-decoration: none;
    }
    .btn:hover {
      background: var(--bp-ink); color: var(--bp-white);
    }
    .btn-red {
      background: var(--bp-red); color: var(--bp-white);
      border-color: var(--bp-red);
    }
    .btn-red:hover {
      background: var(--bp-ink); border-color: var(--bp-ink);
    }
    .btn-ink {
      background: var(--bp-ink); color: var(--bp-white);
      border-color: var(--bp-ink);
    }
    .btn-ink:hover { background: var(--bp-red); border-color: var(--bp-red); }
    .btn-ghost {
      background: transparent; border-color: var(--bp-grey-200);
      color: var(--bp-grey-700);
    }
    .btn-ghost:hover {
      background: var(--bp-ink); border-color: var(--bp-ink); color: var(--bp-white);
    }
    .btn-sm { padding: 8px 16px; font-size: 11px; letter-spacing: 0.06em; }
    .btn-lg { padding: 14px 28px; font-size: 14px; }
    .btn.full { width: 100%; justify-content: center; }
    .btn:disabled, .btn[disabled] { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

    /* ── Filters bar ─────────────────────────────────────────────── */
    .filters {
      background: var(--bp-white);
      border: 1px solid var(--bp-grey-100);
      padding: 16px 20px;
      display: flex; flex-wrap: wrap; align-items: end;
      gap: 16px 28px;
      margin-bottom: 0;
    }
    .filters .dt-clear { align-self: end; flex: 0 0 auto; }
    /* Franja + Categoria stretch to fill the remaining width (no wasted space) */
    .filters .filt:nth-child(3), .filters .filt:nth-child(4) { flex: 1 1 0; min-width: 150px; }
    .filt {
      display: flex; flex-direction: column;
      gap: 6px;
    }
    .filt label {
      font-family: var(--bp-font-display);
      font-size: 10px; letter-spacing: 0.12em;
      text-transform: uppercase; font-weight: 700;
      color: var(--bp-grey-700);
    }
    .filt select {
      font-family: var(--bp-font-body);
      font-size: 14px;
      padding: 8px 28px 8px 0;
      background: transparent;
      border: none;
      border-bottom: 1px solid var(--bp-ink);
      color: var(--bp-ink);
      cursor: pointer;
      -webkit-appearance: none; -moz-appearance: none; appearance: none;
      background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231D1D1B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
      background-repeat: no-repeat;
      background-position: right 6px center;
      border-radius: 0;
    }
    .filt select:focus {
      outline: none; border-bottom-color: var(--bp-red);
    }

    /* ── Mobile day strip ────────────────────────────────────────── */
    .day-strip-mobile { display: none; }

    /* ── Grid view ───────────────────────────────────────────────── */
    .day-grid {
      display: grid;
      grid-template-columns: repeat(6, 1fr);
      gap: 14px;
      margin-bottom: 32px;
    }
    .day-col {
      background: var(--bp-white);
      border: 1px solid var(--bp-grey-100);
      padding: 0;
      min-height: 480px;
      display: flex; flex-direction: column;
    }
    .day-head {
      padding: 12px 14px;
      border-bottom: 1px solid var(--bp-grey-100);
      display: flex; align-items: center; justify-content: space-between;
      background: #FAF7F2;
    }
    .day-head .nm {
      font-family: var(--bp-font-display);
      font-size: 11px; letter-spacing: 0.12em;
      text-transform: uppercase; font-weight: 700;
      color: var(--bp-ink);
    }
    .day-head .ct {
      font-family: var(--bp-font-display);
      font-size: 10px; letter-spacing: 0.08em;
      color: var(--bp-grey-500); font-weight: 700;
    }
    .day-body {
      padding: 12px;
      display: flex; flex-direction: column;
      gap: 10px;
      flex: 1;
    }
    .day-empty {
      flex: 1;
      display: flex; align-items: center; justify-content: center;
      font-family: var(--bp-font-display);
      font-size: 10px; letter-spacing: 0.10em;
      text-transform: uppercase; color: var(--bp-grey-200);
      font-weight: 700;
      padding: 32px 0;
    }

    /* ── Activity card (compact, in grid) ─────────────────────────── */
    .act-card {
      background: var(--bp-white);
      border: 1px solid var(--bp-grey-100);
      padding: 12px 12px 12px 16px;
      cursor: pointer;
      transition: border-color 0.12s, transform 0.06s;
      position: relative;
      display: flex; flex-direction: column; gap: 6px;
      text-align: left;
      font: inherit;
    }
    .act-card::before {
      content: "";
      position: absolute;
      left: 0; top: 0; bottom: 0;
      width: 4px;
      background: var(--cat-color, var(--bp-grey-200));
    }
    .act-card:hover { border-color: var(--bp-ink); }
    .act-card .top {
      display: flex; align-items: center; justify-content: space-between;
      gap: 8px;
    }
    .act-card .hr {
      font-family: var(--bp-font-display);
      font-size: 10px; letter-spacing: 0.10em;
      text-transform: uppercase; font-weight: 700;
      color: var(--bp-ink);
      background: var(--bp-cream);
      padding: 3px 6px;
      line-height: 1;
    }
    .act-card .cat {
      font-family: var(--bp-font-display);
      font-size: 9px; letter-spacing: 0.10em;
      text-transform: uppercase; font-weight: 700;
      color: var(--cat-color, var(--bp-grey-700));
    }
    .act-card .name {
      font-family: var(--bp-font-display);
      font-weight: 700; font-size: 14px;
      color: var(--bp-ink);
      letter-spacing: -0.005em;
      line-height: 1.2;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }
    .act-card .badge-line {
      display: flex; gap: 6px; flex-wrap: wrap;
      margin-top: 2px;
    }
    .act-badge {
      font-family: var(--bp-font-display);
      font-size: 9px; letter-spacing: 0.08em;
      text-transform: uppercase; font-weight: 700;
      padding: 3px 6px;
      line-height: 1;
      background: var(--bp-grey-50);
      color: var(--bp-grey-700);
    }
    .act-badge.dark { background: var(--bp-ink); color: var(--bp-white); }
    .act-badge.red { background: var(--bp-red); color: var(--bp-white); }
    .act-badge.green { background: #0E6B2E; color: var(--bp-white); }
    .act-badge.warn { background: var(--bp-yellow); color: var(--bp-ink); }

    /* dim the CONTENT, not the card element — so the :hover tooltip (::after) stays fully opaque */
    .act-card.blocked { cursor: not-allowed; }
    .act-card.blocked > * { opacity: 0.5; }
    .act-card.blocked:hover { border-color: var(--bp-grey-100); }
    .act-card.blocked .name { text-decoration: line-through; }
    .act-card.taken { cursor: not-allowed; background: #F6FBF7; }
    .act-card.taken > * { opacity: 0.7; }
    .act-card.taken::before { background: #0E6B2E; }
    .act-card.taken:hover { border-color: var(--bp-grey-100); }

    /* Category color tokens (used as --cat-color) */
    .cat-Idiomes    { --cat-color: #E07A2B; }   /* warm orange */
    .cat-Musicals   { --cat-color: #5E2DC6; }   /* BP purple */
    .cat-Culturals  { --cat-color: #BC2C65; }   /* magenta */
    .cat-Esportives { --cat-color: #4D7544; }   /* olive */
    .cat-Other      { --cat-color: var(--bp-grey-700); }

    /* ── List view ───────────────────────────────────────────────── */
    .list-grid {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 20px;
      margin-bottom: 32px;
    }
    .list-col h2 {
      font-family: var(--bp-font-display);
      font-size: 12px; letter-spacing: 0.14em;
      text-transform: uppercase; font-weight: 700;
      padding: 10px 14px;
      background: var(--cat-color, var(--bp-ink));
      color: var(--bp-white);
      margin-bottom: 12px;
      text-align: center;
    }
    .list-col .stack { display: flex; flex-direction: column; gap: 10px; }

    .list-item {
      background: var(--bp-white);
      border: 1px solid var(--bp-grey-100);
      padding: 14px 16px 14px 18px;
      cursor: pointer;
      text-align: left; font: inherit;
      transition: border-color 0.12s;
      position: relative;
    }
    .list-item::before {
      content: "";
      position: absolute;
      left: 0; top: 0; bottom: 0;
      width: 4px;
      background: var(--cat-color, var(--bp-grey-200));
    }
    .list-item:hover { border-color: var(--bp-ink); }
    .list-item .nm {
      font-family: var(--bp-font-display);
      font-weight: 700; font-size: 15px;
      color: var(--bp-ink);
      letter-spacing: -0.005em;
      line-height: 1.2;
      margin-bottom: 4px;
    }
    .list-item .hr {
      font-size: 12px; color: var(--bp-grey-700);
      line-height: 1.4;
    }
    .list-item .foot {
      display: flex; align-items: center; gap: 6px;
      margin-top: 8px;
    }
    .list-item.blocked { cursor: not-allowed; background: #FFF9F9; }
    .list-item.blocked > * { opacity: 0.5; }
    .list-item.taken { background: #F6FBF7; cursor: not-allowed; }
    .list-item.taken > * { opacity: 0.7; }
    .list-item.taken::before { background: #0E6B2E; }

    .list-subhead {
      font-family: var(--bp-font-display);
      font-size: 10px; letter-spacing: 0.12em;
      text-transform: uppercase; font-weight: 700;
      color: var(--bp-grey-500);
      margin: 16px 0 8px;
      padding-bottom: 4px;
      border-bottom: 1px solid var(--bp-grey-100);
    }

    .empty-state {
      padding: 64px 32px;
      text-align: center;
      background: var(--bp-white);
      border: 1px dashed var(--bp-grey-100);
    }
    .empty-state .h {
      font-family: var(--bp-font-display);
      font-size: 18px; font-weight: 700; color: var(--bp-ink);
      margin-bottom: 6px;
    }
    .empty-state .b {
      font-size: 14px; color: var(--bp-grey-700);
    }

    /* ── Modal ───────────────────────────────────────────────────── */
    .modal-backdrop {
      display: none;
      position: fixed; inset: 0;
      background: rgba(20, 14, 6, 0.5);
      z-index: 500;
      align-items: center; justify-content: center;
      padding: 32px;
      overflow: hidden;
      animation: fade 0.18s ease-out;
    }
    .modal-backdrop.open { display: flex; }
    @keyframes fade { from { opacity: 0 } to { opacity: 1 } }

    .modal {
      background: var(--bp-white);
      width: 100%;
      max-width: 600px;
      max-height: calc(100vh - 64px);
      display: flex;
      flex-direction: column;
      overflow: hidden;
      border: 1px solid var(--bp-ink);
    }
    .modal-xl { max-width: 1320px; }
    .modal-head {
      padding: 18px 32px 16px;
      position: relative;
      flex: none;
      background: var(--bp-white);
      border-bottom: 1px solid var(--bp-grey-100);
    }
    .modal-head .modal-close { top: 18px; }
    .modal-eyebrow {
      font-family: var(--bp-font-display);
      font-size: 10px; letter-spacing: 0.14em;
      text-transform: uppercase; font-weight: 700;
      color: var(--cat-color, var(--bp-red));
      margin-bottom: 8px;
    }
    .modal-title {
      font-family: var(--bp-font-display);
      font-weight: 700; font-size: 28px;
      color: var(--bp-ink);
      letter-spacing: -0.01em;
      line-height: 1.05;
      max-width: 90%;
    }
    .modal-sub {
      margin-top: 10px;
      font-size: 13px; color: var(--bp-grey-700);
    }
    .modal-close {
      position: absolute;
      top: 22px; right: 22px;
      width: 32px; height: 32px;
      background: transparent;
      border: 1px solid var(--bp-grey-100);
      color: var(--bp-ink);
      font-size: 18px; line-height: 1;
      display: inline-flex; align-items: center; justify-content: center;
      transition: all 0.12s;
    }
    .modal-close:hover { background: var(--bp-ink); color: var(--bp-white); }
    .modal-body { padding: 20px 32px 28px; flex: 1 1 auto; overflow-y: auto; }

    /* Itinerari */
    .itin-block { margin: 16px 0 20px; }
    .itin-lab {
      font-family: var(--bp-font-display);
      font-size: 10px; letter-spacing: 0.12em;
      text-transform: uppercase; font-weight: 700;
      color: var(--bp-grey-700);
      margin-bottom: 10px;
    }
    .itin-line {
      position: relative;
      display: flex; justify-content: space-between;
      padding: 18px 8px 6px;
      background: #FAF7F2;
      border: 1px solid var(--bp-grey-100);
    }
    .itin-line::before {
      content: "";
      position: absolute;
      top: 30px; left: 24px; right: 24px;
      height: 2px;
      background: var(--bp-grey-100);
      z-index: 1;
    }
    .itin-node {
      position: relative;
      z-index: 2;
      display: flex; flex-direction: column;
      align-items: center;
      gap: 6px;
    }
    .itin-node .bubble {
      width: 26px; height: 26px;
      background: var(--bp-grey-100);
      color: var(--bp-grey-500);
      display: flex; align-items: center; justify-content: center;
      font-family: var(--bp-font-display);
      font-size: 10px; font-weight: 700;
      border: 2px solid var(--bp-white);
    }
    .itin-node .lbl {
      font-family: var(--bp-font-display);
      font-size: 9px; letter-spacing: 0.06em;
      text-transform: uppercase; font-weight: 700;
      color: var(--bp-grey-500);
    }
    .itin-node.activa .bubble { background: var(--bp-red); color: var(--bp-white); }
    .itin-node.activa .lbl    { color: var(--bp-red); }
    .itin-node.actual .bubble { background: var(--bp-ink); color: var(--bp-white); box-shadow: 0 0 0 3px var(--bp-yellow); }
    .itin-node.actual .lbl    { color: var(--bp-ink); }

    /* Modal options */
    .opt-stack { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
    /* Autoritzacions block in the enrollment modal (UC-1A-NEW-04) */
    .opt-consent { border: 1px solid var(--bp-grey-100); border-radius: 8px; padding: 12px 14px; margin: 4px 0 14px; }
    .opt-consent .oc-head { font-family: var(--bp-font-display); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--bp-ink); margin-bottom: 8px; }
    .consent-row { display: flex; align-items: flex-start; gap: 8px; padding: 4px 0; cursor: pointer; font-size: 13px; color: var(--bp-ink); }
    .consent-row input { margin-top: 2px; flex: none; accent-color: var(--bp-red); }
    .consent-row .consent-req { font-style: normal; color: var(--bp-red); font-weight: 600; }
    .consent-row .muted { color: var(--bp-grey-500); }
    .oc-warn { display: none; margin-top: 8px; font-size: 12px; color: var(--bp-red); font-weight: 600; }
    .opt-consent.missing { border-color: var(--bp-red); background: rgba(226,0,26,.04); }
    .opt-consent.missing .oc-warn { display: block; }

    .opt-btn {
      display: flex; align-items: center; justify-content: space-between;
      gap: 12px;
      padding: 16px 18px;
      background: var(--bp-white);
      border: 1px solid var(--bp-grey-100);
      cursor: pointer;
      transition: all 0.14s;
      text-align: left;
      width: 100%;
      font-family: inherit;
    }
    .opt-btn:hover { border-color: var(--bp-ink); background: #FAF7F2; }
    .opt-btn.primary {
      background: var(--bp-ink); border-color: var(--bp-ink); color: var(--bp-white);
    }
    .opt-btn.primary:hover { background: var(--bp-red); border-color: var(--bp-red); }
    .opt-btn.primary .opt-sub { color: rgba(255,255,255,0.65); }
    .opt-btn:disabled { opacity: 0.4; cursor: not-allowed; }
    .opt-btn .opt-main {
      font-family: var(--bp-font-display);
      font-weight: 700; font-size: 15px;
      letter-spacing: -0.005em;
    }
    .opt-btn .opt-sub {
      font-size: 12px; color: var(--bp-grey-700);
      margin-top: 3px;
    }
    .opt-btn .opt-price {
      font-family: var(--bp-font-display);
      font-weight: 700; font-size: 18px;
      letter-spacing: -0.005em;
      white-space: nowrap;
    }
    .opt-btn.primary .opt-price { color: var(--bp-white); }

    /* Flexible slot picker */
    .flex-card {
      border: 1px solid var(--bp-grey-100);
      padding: 16px;
    }
    .flex-card .hd {
      display: flex; align-items: center; justify-content: space-between;
      margin-bottom: 10px;
    }
    .flex-card .hd h6 {
      font-family: var(--bp-font-display);
      font-size: 13px; font-weight: 700; color: var(--bp-ink);
    }
    .flex-card .counter {
      font-family: var(--bp-font-display);
      font-size: 10px; letter-spacing: 0.10em;
      text-transform: uppercase; font-weight: 700;
      padding: 4px 8px;
      background: var(--bp-yellow);
      color: var(--bp-ink);
    }
    .flex-card .list {
      display: flex; flex-direction: column;
      gap: 6px;
      margin-bottom: 14px;
    }
    .flex-card .row-pick {
      display: flex; gap: 10px; align-items: center;
      padding: 10px 12px;
      background: #FAF7F2;
      border: 1px solid transparent;
      cursor: pointer;
      transition: border-color 0.12s;
      font-size: 13px;
    }
    .flex-card .row-pick:hover { border-color: var(--bp-ink); }
    .flex-card .row-pick.disabled { opacity: 0.4; cursor: not-allowed; }
    .flex-card .row-pick.is-locked { cursor: default; }
    .flex-card .row-pick.is-locked:hover { border-color: var(--bp-grey-100); }
    .flex-card .row-pick input { margin: 0; }
    .flex-card .row-pick strong { color: var(--bp-ink); font-weight: 700; }
    .flex-card .ft {
      display: flex; justify-content: space-between; align-items: center;
      padding-top: 12px;
      border-top: 1px solid var(--bp-grey-100);
    }
    .flex-card .ft .price {
      font-family: var(--bp-font-display);
      font-size: 22px; font-weight: 700; color: var(--bp-ink);
      letter-spacing: -0.01em;
    }

    /* ── Weekly schedule modal ──────────────────────────────────── */
    .week-grid {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 12px;
    }
    .week-col {
      background: #FAF7F2;
      border: 1px solid var(--bp-grey-100);
      display: flex; flex-direction: column;
      min-height: 480px;
    }
    .week-col .day-head {
      background: var(--bp-ink); color: var(--bp-white);
      border-bottom: none;
      justify-content: center;
    }
    .week-col .day-head .nm { color: var(--bp-white); }
    .week-col .day-body { padding: 10px; gap: 8px; flex: 1; }
    .week-section {
      font-family: var(--bp-font-display);
      font-size: 9px; letter-spacing: 0.12em;
      text-transform: uppercase; font-weight: 700;
      color: var(--bp-grey-700);
      padding: 4px 8px;
      background: var(--bp-white);
      border: 1px solid var(--bp-grey-100);
      text-align: center;
      margin-top: 6px;
    }
    .week-section:first-child { margin-top: 0; }
    /* Fixed franja bands: Migdia (top) + Tarda (bottom) split the column evenly so they line up across days. */
    .week-band { display: flex; flex-direction: column; gap: 8px; flex: 1 1 0; min-height: 0; }
    .week-band + .week-band { margin-top: 8px; }
    .week-band .week-section { margin-top: 0; }
    .week-card {
      background: var(--bp-white);
      border: 1.5px solid var(--cat-color, var(--bp-grey-200));
      padding: 8px 10px;
      display: flex; flex-direction: column;
      gap: 4px;
    }
    .week-card.nova {
      border-style: dashed;
    }
    .week-card .top {
      display: flex; align-items: center; justify-content: space-between;
    }
    .week-card .hr {
      font-family: var(--bp-font-display);
      font-size: 9px; letter-spacing: 0.08em;
      font-weight: 700;
      background: var(--bp-cream); padding: 2px 5px;
      color: var(--bp-ink);
    }
    .week-card .nova-tag {
      font-family: var(--bp-font-display);
      font-size: 8px; letter-spacing: 0.10em;
      text-transform: uppercase; font-weight: 700;
      color: var(--bp-red);
    }
    .week-card .nm {
      font-family: var(--bp-font-display);
      font-size: 12px; font-weight: 700;
      color: var(--bp-ink);
      letter-spacing: -0.005em;
      line-height: 1.2;
    }
    .week-card .ft {
      display: flex; justify-content: space-between; align-items: center;
      margin-top: 4px;
    }
    .week-card .price {
      font-family: var(--bp-font-display);
      font-size: 11px; font-weight: 700; color: var(--bp-ink);
    }
    .week-card .price.zero { color: var(--bp-grey-500); }

    /* ── Demo strip (cross-prototype navigation) ─────────────────── */
    .demo-strip {
      position: sticky;
      top: 0; z-index: 800;
      background: var(--bp-ink); color: var(--bp-white);
      display: flex; align-items: center; gap: 18px;
      padding: 10px 28px;
      font-family: var(--bp-font-display);
      font-size: 11px; letter-spacing: 0.04em;
    }
    .demo-strip .tag {
      background: var(--bp-red); color: var(--bp-white);
      padding: 4px 8px; font-weight: 700; letter-spacing: 0.10em;
      text-transform: uppercase;
    }
    .demo-strip .ttl { font-weight: 700; letter-spacing: 0.05em; }
    .demo-strip .sub { opacity: 0.55; letter-spacing: 0.04em; font-weight: 400; font-size: 11px; }
    .demo-strip .grow { flex: 1; }
    .demo-strip a { color: var(--bp-white); opacity: 0.85; }
    .demo-strip a:hover { opacity: 1; text-decoration: underline; }

    /* ── Responsive ──────────────────────────────────────────────── */
    @media (max-width: 1100px) {
      .day-grid { grid-template-columns: repeat(3, 1fr); }
      .list-grid { grid-template-columns: repeat(3, 1fr); }
      .week-grid { grid-template-columns: repeat(3, 1fr); }
    }
    @media (max-width: 767px) {
      .page { padding: 20px 16px 0; }
      .title-block { grid-template-columns: 1fr; }
      .filters { grid-template-columns: 1fr 1fr; }
      .day-grid {
        display: block;
      }
      .day-strip-mobile {
        display: flex; align-items: center; justify-content: space-between;
        gap: 12px;
        background: var(--bp-white);
        border: 1px solid var(--bp-grey-100);
        padding: 10px 14px;
        margin-bottom: 14px;
      }
      .day-strip-mobile .nm {
        font-family: var(--bp-font-display);
        font-size: 14px; font-weight: 700;
        text-transform: uppercase; letter-spacing: 0.08em;
      }
      .day-col-wrap { display: none; margin-bottom: 14px; }
      .day-col-wrap.active { display: block; }
      .list-grid { grid-template-columns: 1fr; }
      .week-grid { grid-template-columns: 1fr; }
      .basket-dock-inner { grid-template-columns: 1fr 1fr; padding: 0 16px; }
      .basket-finalize { display: none; }
      .basket-cell .price { font-size: 18px; }
    }


/* ═══════════════════════════════════════════════════════════════════
   EXTRA FEATURES (not in v3) — header dropdown, checkout wizard,
   baixa modal, opt description/note, basket baixa/pending.
   Same tokens + boxy language as above.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Header user dropdown ─────────────────────────────────────────── */
.topbar .userwrap { position: relative; }
.topbar .userline { display: flex; align-items: center; gap: 12px; background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; }
.user-menu { position: absolute; top: calc(100% + 12px); right: 0; min-width: 320px; background: var(--bp-white); border: 1px solid var(--bp-ink); box-shadow: var(--bp-shadow-soft); padding: 8px; z-index: 400; display: none; }
.user-menu.open { display: block; }
.user-menu a { display: block; padding: 13px 16px; font-size: 15px; color: var(--bp-ink); text-decoration: none; }
.user-menu a:hover { background: var(--bp-grey-50); }
.user-menu a.danger { color: var(--bp-red); }
.user-menu hr { border: 0; border-top: 1px solid var(--bp-grey-100); margin: 8px 0; }
.um-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; }
.um-label { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--bp-grey-500); font-weight: 700; }
.lang-switch { display: inline-flex; border: 1px solid var(--bp-grey-100); }
.lang-switch button, .user-menu .lang-switch a { border: 0; background: var(--bp-white); padding: 7px 11px; font: inherit; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; cursor: pointer; color: var(--bp-grey-500); white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.lang-switch button + button, .lang-switch a + button, .lang-switch button + a { border-left: 1px solid var(--bp-grey-100); }
.lang-switch button.active, .user-menu .lang-switch a.active { background: var(--bp-ink); color: var(--bp-white); }

/* ── Detail modal: description + note ─────────────────────────────── */
.opt-desc { font-size: 15px; line-height: 1.5; color: var(--bp-grey-700); margin: 0 0 18px; }
.opt-note { background: var(--bp-grey-50); border: 1px solid var(--bp-grey-100); padding: 14px 16px; font-size: 14px; line-height: 1.4; color: var(--bp-ink); margin-bottom: 14px; }

/* ── Basket item: baixa / pending tail ────────────────────────────── */
.item .ins-baixa { border: 0; background: none; color: var(--bp-red); font: inherit; font-size: 12px; font-weight: 600; text-decoration: underline; cursor: pointer; padding: 0; white-space: nowrap; }
.item .ins-chip { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 3px 8px; background: #FEF3E2; color: #9A6412; white-space: nowrap; }
.item.is-dim { opacity: 0.62; }
.week-card .wc-baixa { display: block; margin-top: 8px; border: 0; background: none; color: var(--bp-red); font: inherit; font-size: 11px; font-weight: 600; text-decoration: underline; cursor: pointer; padding: 0; }
/* confirmed weekly card → clickable, opens the inscription detail modal; chevron affordance */
.week-card.is-clickable { cursor: pointer; transition: box-shadow .12s ease, border-color .12s ease; }
.week-card.is-clickable:hover { box-shadow: var(--bp-shadow-card); }
.week-card.is-clickable:focus-visible { outline: 2px solid var(--bp-red); outline-offset: 2px; }
.week-card .wc-chev { display: inline-flex; align-items: center; color: var(--bp-grey-500); flex: none; }
.week-card .wc-chev svg { width: 15px; height: 15px; }
.week-card.is-clickable:hover .wc-chev { color: var(--bp-red); }

/* ── Shared modal footer + actions ────────────────────────────────── */
/* Footer is pinned via sticky (backdrop scrolls, footer never scrolls away). */
.modal-foot { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 32px 20px; border-top: 1px solid var(--bp-grey-100); background: var(--bp-white); }
.modal-foot[hidden] { display: none; }
.foot-actions { display: flex; gap: 10px; }
.checkout-total { font-weight: 700; font-size: 18px; color: var(--bp-ink); }

/* ── Checkout wizard ──────────────────────────────────────────────── */
.modal.modal-checkout { max-width: 720px; }
.stepper { display: flex; align-items: center; gap: 10px; }
.step { display: flex; align-items: center; gap: 8px; color: var(--bp-grey-500); }
.step-num { width: 26px; height: 26px; border: 1px solid var(--bp-grey-200); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.step.is-active .step-num { background: var(--bp-red); color: var(--bp-white); border-color: var(--bp-red); }
.step.is-done .step-num { background: var(--bp-ink); color: var(--bp-white); border-color: var(--bp-ink); }
.step-label { font-size: 13px; }
.step.is-active .step-label { color: var(--bp-ink); font-weight: 700; }
.step-sep { width: 28px; height: 1px; background: var(--bp-grey-200); }

.co-card { border: 1px solid var(--bp-grey-100); margin-bottom: 14px; }
.co-card-head { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--bp-grey-50); border: 0; border-bottom: 1px solid var(--bp-grey-100); font: inherit; text-align: left; cursor: pointer; }
.co-chev { width: 16px; height: 16px; color: var(--bp-grey-500); flex: none; margin-left: 4px; transition: transform 0.18s; }
.co-card.collapsed .co-card-head { border-bottom: 0; }
.co-card.collapsed .co-chev { transform: rotate(-90deg); }
.co-card.collapsed .co-rows { display: none; }
.co-curs { font-size: 12px; color: var(--bp-grey-500); }
.co-subtotal { margin-left: auto; font-weight: 700; }
.co-subtotal small { font-weight: 400; color: var(--bp-grey-500); }
.co-rows { padding: 6px 8px; }
.co-row { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 14px; position: relative; }
.co-row .stripe { position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; }
.co-row .body { flex: 1; }
.co-row .name { font-family: var(--bp-font-display); font-weight: 700; font-size: 14px; }
.co-row .meta { font-size: 12px; color: var(--bp-grey-500); margin-top: 2px; }
.co-row .price { font-weight: 700; font-size: 13px; }
.co-row .price.zero { color: var(--bp-grey-500); font-weight: 400; }
.co-row .rm { border: 0; background: none; font-size: 18px; line-height: 1; color: var(--bp-grey-500); cursor: pointer; padding: 0 2px; }
.co-row .rm:hover { color: var(--bp-red); }

.totals-card { border: 1px solid var(--bp-grey-100); background: var(--bp-cream); padding: 16px; }
.tot-row { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.tot-row.tot-main { font-weight: 700; font-size: 16px; }
.tot-div { height: 1px; background: var(--bp-grey-100); margin: 10px 0; }
.tot-sub { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--bp-grey-500); font-weight: 700; margin-bottom: 4px; }
.tot-label { color: var(--bp-grey-700); }

.pay-head { font-family: var(--bp-font-display); font-weight: 700; font-size: 15px; margin-bottom: 12px; }
.pay-methods { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.pay-tab { border: 1px solid var(--bp-grey-200); background: var(--bp-white); padding: 8px 14px; font: inherit; font-size: 13px; cursor: pointer; }
.pay-tab.active { border-color: var(--bp-ink); background: var(--bp-ink); color: var(--bp-white); }
.pay-form { border: 1px solid var(--bp-grey-100); padding: 16px; margin-bottom: 16px; }
.pay-form .field { display: flex; flex-direction: column; gap: 5px; }
.pay-form .field + .field { margin-top: 12px; }
.pay-form .field label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--bp-grey-500); font-weight: 700; }
.pay-form .field input { border: 0; padding: 9px 0; font: inherit; font-size: 14px; background: transparent; outline: none; }
.stripe-field label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--bp-grey-500); font-weight: 700; margin-bottom: 5px; }
.stripe-input { display: flex; align-items: center; gap: 8px; border: 0; border-bottom: 1px solid var(--bp-grey-200); padding: 0; }
.stripe-input:focus-within { border-bottom-color: var(--bp-red); }
.stripe-input input { flex: 1; border: 0; padding: 9px 2px; font: inherit; font-size: 14px; outline: none; background: none; }
.stripe-row { display: flex; gap: 12px; margin: 12px 0; }
.stripe-row .stripe-field { flex: 1; }
.card-brands { display: inline-flex; gap: 6px; align-items: center; }
.pay-secure { font-size: 12px; color: var(--bp-grey-500); margin: 10px 0 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.4; color: var(--bp-grey-700); }
.check input { margin-top: 3px; flex: none; }

.co-success { text-align: center; padding: 28px 12px; }
.co-success .tick { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; background: #0E6B2E; color: var(--bp-white); font-size: 30px; margin-bottom: 16px; }
.co-success h3 { font-family: var(--bp-font-display); margin: 0 0 8px; font-size: 24px; }
.co-success p { color: var(--bp-grey-700); max-width: 46ch; margin: 0 auto; line-height: 1.5; }

/* ── Baixa modal ──────────────────────────────────────────────────── */
.baixa-label { display: block; font-family: var(--bp-font-display); font-weight: 700; margin-bottom: 8px; }
.baixa-textarea { width: 100%; min-height: 104px; border: 0; border-bottom: 1px solid var(--bp-grey-200); background: var(--bp-grey-50); padding: 12px; font: inherit; font-size: 14px; resize: vertical; box-sizing: border-box; }
.baixa-textarea:focus { outline: none; border-bottom-color: var(--bp-red); }
.baixa-hint { font-size: 13px; color: var(--bp-grey-500); margin: 10px 0 0; line-height: 1.4; }

/* ── Confirmed-enrolment: clickable row + chevron ─────────────────── */
.item.is-clickable { cursor: pointer; }
.item.is-clickable:hover { background: var(--bp-grey-50); }
.item.is-clickable:focus-visible { outline: 2px solid var(--bp-red); outline-offset: -2px; }
.ins-end { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.ins-chev { display: inline-flex; align-items: center; color: var(--bp-grey-500); flex: none; }
.ins-chev svg { width: 16px; height: 16px; }
.item.is-clickable:hover .ins-chev { color: var(--bp-ink); }

/* ── Confirmed-enrolment detail modal ─────────────────────────────── */
.insc-info { border: 1px solid var(--bp-grey-100); }
.info-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 14px; border-bottom: 1px solid var(--bp-grey-100); font-size: 14px; }
.info-row:last-child { border-bottom: 0; }
.info-lab { color: var(--bp-grey-500); }
.info-val { font-weight: 500; text-align: right; }
.info-val small { font-weight: 400; color: var(--bp-grey-500); }

.insc-sec-lab { font-family: var(--bp-font-display); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; color: var(--bp-grey-700); margin: 18px 0 8px; }
.insc-docs { border: 1px solid var(--bp-grey-100); }
.doc-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 14px; border-bottom: 1px solid var(--bp-grey-100); font-size: 13px; }
.doc-row:last-child { border-bottom: 0; }
.doc-chip { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 3px 8px; white-space: nowrap; }
.doc-validat { background: #E8F5EC; color: #0E6B2E; }
.doc-pendent { background: #FEF3E2; color: #9A6412; }
.doc-pujat   { background: #E7EEF9; color: #1F4E9B; }
.doc-rebutjat{ background: #FBE9E9; color: #B3261E; }

.insc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.insc-act { text-align: left; border: 1px solid var(--bp-grey-200); background: var(--bp-white); padding: 12px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; font: inherit; }
.insc-act:hover { border-color: var(--bp-ink); background: var(--bp-cream); }
.insc-act[disabled] { opacity: 0.45; cursor: not-allowed; }
.insc-act[disabled]:hover { border-color: var(--bp-grey-200); background: var(--bp-white); }
.ia-label { font-family: var(--bp-font-display); font-weight: 700; font-size: 14px; }
.ia-sub { font-size: 11px; color: var(--bp-grey-500); line-height: 1.3; }

.insc-notice { background: var(--bp-cream); border: 1px solid var(--bp-grey-100); padding: 12px 14px; font-size: 13px; line-height: 1.45; margin-bottom: 14px; }
.insc-back { border: 0; background: none; color: var(--bp-grey-700); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 0; margin-bottom: 14px; }
.insc-back:hover { color: var(--bp-red); }

.abs-form .field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.abs-form .field label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--bp-grey-500); font-weight: 700; }
.abs-form .field label small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.abs-form .field input, .abs-form .field select { border: 0; border-bottom: 1px solid var(--bp-grey-200); border-radius: 0; padding: 9px 2px; font: inherit; font-size: 14px; background: transparent; }
.abs-form .field textarea { border: 0; border-bottom: 1px solid var(--bp-grey-200); background: var(--bp-grey-50); padding: 10px 12px; font: inherit; font-size: 14px; min-height: 72px; resize: vertical; }
.abs-form .field input:focus, .abs-form .field select:focus, .abs-form .field textarea:focus { outline: none; border-bottom-color: var(--bp-red); }

.canvi-list { display: flex; flex-direction: column; gap: 8px; }
.canvi-opt { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border: 1px solid var(--bp-grey-100); background: var(--bp-white); cursor: pointer; position: relative; text-align: left; font: inherit; }
.canvi-opt .stripe { position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; }
.canvi-opt:hover { border-color: var(--bp-ink); }
.canvi-opt .body { flex: 1; }
.canvi-opt .name { font-family: var(--bp-font-display); font-weight: 700; font-size: 14px; }
.canvi-opt .meta { display: flex; gap: 10px; font-size: 12px; color: var(--bp-grey-500); margin-top: 2px; }
.canvi-opt .price { font-weight: 700; font-size: 13px; white-space: nowrap; }
.canvi-opt .price small { font-weight: 400; color: var(--bp-grey-500); }

/* ── Toast ────────────────────────────────────────────────────────── */
.bp-toast { position: fixed; left: 50%; bottom: 100px; transform: translate(-50%, 16px); background: var(--bp-ink); color: var(--bp-white); padding: 12px 20px; font-size: 14px; font-weight: 500; z-index: 600; opacity: 0; transition: opacity 0.25s ease, transform 0.25s ease; box-shadow: var(--bp-shadow-soft); pointer-events: none; }
.bp-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── Document rows: upload affordance ─────────────────────────────── */
.doc-name { display: flex; flex-direction: column; gap: 2px; }
.doc-flag { font-style: normal; font-size: 11px; color: var(--bp-grey-500); }
.doc-flag--llei { color: var(--bp-red); font-weight: 600; }
/* Confirmed-inscriptions estat filter (UC-1A-16) */
.prev-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.pf-pill { border: 1px solid var(--bp-grey-100); background: var(--bp-white); color: var(--bp-ink); border-radius: 999px; padding: 4px 11px; font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.pf-pill:hover { border-color: var(--bp-grey-500); }
.pf-pill.is-active { background: var(--bp-ink); color: var(--bp-white); border-color: var(--bp-ink); }
.pf-n { font-weight: 700; opacity: .65; }
.doc-file { font-size: 11px; color: var(--bp-grey-500); }
.doc-right { display: flex; align-items: center; gap: 12px; flex: none; }
.doc-up { border: 0; background: none; color: var(--bp-red); font: inherit; font-size: 12px; font-weight: 600; text-decoration: underline; cursor: pointer; padding: 0; white-space: nowrap; }
.doc-up:hover { color: var(--bp-ink); }

/* ── DS date picker ───────────────────────────────────────────────── */
.dp { position: relative; }
.dp-field { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 0; border-bottom: 1px solid var(--bp-grey-200); background: transparent; padding: 9px 2px; font: inherit; font-size: 14px; cursor: pointer; color: var(--bp-ink); text-align: left; }
.dp.open .dp-field { border-bottom-color: var(--bp-red); }
.dp-field svg { width: 18px; height: 18px; color: var(--bp-grey-500); flex: none; }
.dp-value { color: var(--bp-grey-500); }
.dp-value.has-val { color: var(--bp-ink); font-weight: 500; }
.dp-pop { display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; width: 284px; background: var(--bp-white); border: 1px solid var(--bp-ink); box-shadow: var(--bp-shadow-soft); padding: 12px; }
.dp.open .dp-pop { display: block; }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.dp-title { font-family: var(--bp-font-display); font-weight: 700; font-size: 14px; }
.dp-nav { border: 1px solid var(--bp-grey-200); background: var(--bp-white); width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--bp-ink); }
.dp-nav:hover { border-color: var(--bp-ink); background: var(--bp-cream); }
.dp-nav svg { width: 15px; height: 15px; }
.dp-weekdays, .dp-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-weekdays span { text-align: center; font-family: var(--bp-font-display); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 700; color: var(--bp-grey-500); padding: 4px 0; }
.dp-days { margin-top: 2px; }
.dp-day { border: 1px solid transparent; background: var(--bp-white); font: inherit; font-size: 13px; padding: 7px 0; cursor: pointer; color: var(--bp-ink); text-align: center; }
.dp-day:hover { background: var(--bp-grey-50); }
.dp-day.is-we { color: var(--bp-grey-500); }
.dp-day.is-today { border-color: var(--bp-red); color: var(--bp-red); font-weight: 700; }
.dp-day.is-sel { background: var(--bp-red); color: var(--bp-white); border-color: var(--bp-red); font-weight: 700; }
.dp-day.is-sel.is-today { color: var(--bp-white); }

/* ── Vista segmented control (Graella / Llista) — DS boxy, red active ── */
.filters .seg { display: inline-flex; border: 1px solid var(--bp-ink); background: var(--bp-white); align-self: start; }
.filters .seg-btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border: 0; background: var(--bp-white); font: inherit; font-size: 13px; font-weight: 500; color: var(--bp-ink); cursor: pointer; line-height: 1; }
.filters .seg-btn + .seg-btn { border-left: 1px solid var(--bp-grey-200); }
.filters .seg-btn svg { width: 16px; height: 16px; }
.filters .seg-btn:hover { background: #FAF7F2; }
.filters .seg-btn.is-active,
.filters .seg-btn.is-active:hover { background: var(--bp-ink); color: var(--bp-white); }
.filters .seg-btn:disabled,
.filters .seg-btn:disabled:hover { background: var(--bp-grey-100); color: var(--bp-grey-500); cursor: not-allowed; font-weight: 500; }

/* ── Stacked modal (opens over another modal) ─────────────────────── */
.modal-stack { z-index: 700; }

/* ── Document upload modal ────────────────────────────────────────── */
.doc-drop { border: 1px dashed var(--bp-grey-200); background: var(--bp-grey-50); padding: 32px 20px; text-align: center; cursor: pointer; transition: border-color 0.12s, background 0.12s; }
.doc-drop:hover, .doc-drop.is-over { border-color: var(--bp-red); background: var(--bp-cream); }
.doc-drop .dd-icon { display: inline-flex; color: var(--bp-grey-500); margin-bottom: 10px; }
.doc-drop .dd-icon svg { width: 30px; height: 30px; }
.doc-drop .dd-main { font-size: 14px; color: var(--bp-ink); }
.doc-drop .dd-link { color: var(--bp-red); text-decoration: underline; font-weight: 600; }
.doc-drop .dd-sub { font-size: 12px; color: var(--bp-grey-500); margin-top: 6px; }
.doc-picked { display: flex; align-items: center; gap: 12px; border: 1px solid var(--bp-grey-100); padding: 14px 16px; }
.doc-picked .dpk-icon { display: inline-flex; color: var(--bp-grey-700); flex: none; }
.doc-picked .dpk-icon svg { width: 22px; height: 22px; }
.doc-picked .dpk-name { flex: 1; font-size: 14px; font-weight: 500; word-break: break-all; }
.doc-picked .dpk-rm { border: 0; background: none; font-size: 20px; line-height: 1; color: var(--bp-grey-500); cursor: pointer; flex: none; }
.doc-picked .dpk-rm:hover { color: var(--bp-red); }
.doc-hint { font-size: 13px; color: var(--bp-grey-500); line-height: 1.45; margin: 14px 0 0; }

/* ── DS select (custom dropdown, replaces native <select>) ────────── */
.dsel { position: relative; }
.dsel-field { width: 100%; display: flex; align-items: center; gap: 8px; border: 0; border-bottom: 1px solid var(--bp-ink); background: transparent; padding: 8px 2px; font: inherit; font-size: 14px; color: var(--bp-ink); cursor: pointer; text-align: left; }
.dsel.open .dsel-field { border-bottom-color: var(--bp-red); }
.dsel-icon { display: inline-flex; color: var(--bp-grey-500); flex: none; }
.dsel-icon svg { width: 16px; height: 16px; }
.dsel-value { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dsel-chev { width: 16px; height: 16px; color: var(--bp-grey-500); flex: none; transition: transform 0.18s; }
.dsel.open .dsel-chev { transform: rotate(180deg); }
.dsel-pop { display: none; position: absolute; top: calc(100% + 4px); left: 0; right: 0; min-width: 220px; background: var(--bp-white); border: 1px solid var(--bp-ink); box-shadow: var(--bp-shadow-soft); z-index: 30; }
.dsel-list { max-height: 300px; overflow-y: auto; overscroll-behavior: contain; }
.dsel.open .dsel-pop { display: block; }
.dsel-opt { display: block; width: 100%; text-align: left; border: 0; background: var(--bp-white); padding: 10px 14px; font: inherit; font-size: 14px; color: var(--bp-ink); cursor: pointer; }
.dsel-opt:hover { background: var(--bp-grey-50); }
.dsel-opt.is-sel { background: var(--bp-ink); color: var(--bp-white); font-weight: 500; }

/* ── Sticky column/category headers on the main catalog (window scroll,
   no inner scroll — Jaume dislikes inline scrolls). Scoped to #vista-contingut
   so the weekly-modal headers are unaffected. ─────────────────────── */
/* Weekday (graella) + category (llista) headers stick just below the pinned
   .stickytop block. --sticky-h is measured in JS (stickytop height). */
#vista-contingut .day-head { position: sticky; top: var(--sticky-h, 240px); z-index: 5; }
#vista-contingut .list-col h2 { position: sticky; top: var(--sticky-h, 240px); z-index: 5; }

/* ── Top nav (Inscripcions / Familiars) ───────────────────────────── */
.topnav { display: inline-flex; gap: 2px; padding-left: 24px; border-left: 1px solid var(--bp-grey-100); }
.navbtn { border: 0; border-bottom: 2px solid transparent; background: none; font-family: var(--bp-font-display); font-size: 12px; font-weight: 700; letter-spacing: 0.10em; text-transform: uppercase; color: var(--bp-grey-500); padding: 4px 10px 6px; cursor: pointer; }
.navbtn:hover { color: var(--bp-ink); }
.navbtn.is-active { color: var(--bp-ink); border-bottom-color: var(--bp-red); }

/* ── Familiars view ───────────────────────────────────────────────── */
#view-familiars { padding: 32px 0 8px; }
/* In the Familiars view the inscripcions-only spacing (topbar margin + sticky
   weekday-gap padding) is dead space — collapse it. */
.page.view-fam .topbar { margin-bottom: 0; }
.page.view-fam .stickytop { padding-bottom: 0; }
.fam-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 0 0 28px; }
.fam-head h1 { font-family: var(--bp-font-display); font-weight: 700; font-size: 48px; line-height: 0.95; letter-spacing: -0.015em; color: var(--bp-ink); max-width: 780px; }
.fam-head h1 em { font-style: normal; color: var(--bp-red); }
.fam-sub { font-size: 15px; line-height: 1.45; color: var(--bp-grey-700); margin-top: 12px; max-width: 60ch; }
.fam-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.fam-card { background: var(--bp-white); border: 1px solid var(--bp-grey-100); }
.fam-card-top { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-bottom: 1px solid var(--bp-grey-100); }
.fam-av { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; color: var(--bp-white); font-family: var(--bp-font-display); font-weight: 700; font-size: 18px; flex: none; }
.fam-id { flex: 1; min-width: 0; }
.fam-name { font-family: var(--bp-font-display); font-weight: 700; font-size: 18px; color: var(--bp-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fam-curs { display: flex; align-items: center; gap: 5px; flex-wrap: nowrap; min-width: 0; font-size: 9px; letter-spacing: 0.02em; text-transform: uppercase; font-weight: 700; color: var(--bp-grey-500); margin-top: 3px; }
.fam-curs > .fam-curs-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fam-origin { flex: none; padding: 1px 7px; border-radius: var(--bp-radius-pill, 999px); font-size: 9px; letter-spacing: 0.04em; white-space: nowrap; }
.fam-origin.is-intern { background: var(--bp-grey-100); color: var(--bp-grey-700); }
.fam-origin.is-extern { background: var(--bp-cream, #FFF7ED); color: var(--bp-red); box-shadow: inset 0 0 0 1px var(--bp-red); }
.fam-info { padding: 4px 20px 14px; }
.fam-row { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--bp-grey-100); font-size: 13px; }
.fam-row:last-child { border-bottom: 0; }
.fam-lab { color: var(--bp-grey-500); flex: none; }
.fam-val { text-align: right; }

/* ── Add fill/a form ──────────────────────────────────────────────── */
.fill-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.fill-form .field { display: flex; flex-direction: column; gap: 5px; }
.fill-form .field.col-2 { grid-column: 1 / -1; }
.fill-form label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--bp-grey-500); font-weight: 700; }
.fill-form label .req { color: var(--bp-red); }
.fill-form input { border: 0; border-bottom: 1px solid var(--bp-grey-200); padding: 9px 2px; font: inherit; font-size: 14px; background: transparent; }
.fill-form input:focus { outline: none; border-bottom-color: var(--bp-red); }
.fill-form textarea.baixa-textarea { min-height: 60px; }

/* date-picker year+month nav groups */
.dp-navs { display: inline-flex; gap: 4px; }

/* ── Familiars card kebab menu ────────────────────────────────────── */
.fam-kebab-wrap { margin-left: auto; position: relative; }
.fam-kebab { border: 0; background: none; padding: 4px; cursor: pointer; color: var(--bp-grey-500); display: inline-flex; }
.fam-kebab:hover { color: var(--bp-ink); }
.fam-kebab svg { width: 20px; height: 20px; }
.fam-menu { display: none; position: absolute; top: calc(100% + 4px); right: 0; min-width: 210px; background: var(--bp-white); border: 1px solid var(--bp-ink); box-shadow: var(--bp-shadow-soft); z-index: 400; }
.fam-menu.open { display: block; }
.fam-menu button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 11px 14px; font: inherit; font-size: 13px; color: var(--bp-ink); cursor: pointer; }
.fam-menu button:hover { background: var(--bp-grey-50); }
.fam-menu button.danger { color: var(--bp-red); border-top: 1px solid var(--bp-grey-100); }

/* Dock: give the first cell (A tramitar) a left border to match Ja registrades. */
.basket-cell.new { border-left: 1px solid var(--bp-grey-100); }

/* ── Confirmation modal ───────────────────────────────────────────── */
.modal.modal-sm { max-width: 460px; }
.confirm-msg { font-size: 15px; line-height: 1.55; color: var(--bp-grey-700); margin: 0; }

/* ── Profile menu items with icons ────────────────────────────────── */
.user-menu a, .user-menu button[role="menuitem"] { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 16px; font: inherit; font-size: 15px; color: var(--bp-ink); background: none; border: 0; text-align: left; cursor: pointer; text-decoration: none; }
.user-menu button[role="menuitem"]:hover { background: var(--bp-grey-50); }
.user-menu a svg, .user-menu button svg { width: 18px; height: 18px; flex: none; color: var(--bp-grey-500); }
.user-menu a.danger svg { color: var(--bp-red); }

/* ── Privacitat i dades (RGPD) modal ──────────────────────────────── */
.rgpd-list { display: flex; flex-direction: column; }
.rgpd-item { display: flex; align-items: flex-start; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--bp-grey-100); }
.rgpd-item:first-child { padding-top: 2px; }
.rgpd-item:last-child { border-bottom: 0; padding-bottom: 2px; }
.rgpd-ic { flex: none; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; background: var(--bp-grey-50); color: var(--bp-ink); }
.rgpd-ic svg { width: 18px; height: 18px; }
.rgpd-txt { flex: 1; min-width: 0; }
.rgpd-h { font-family: var(--bp-font-display); font-weight: 700; font-size: 15px; color: var(--bp-ink); }
.rgpd-txt p { font-size: 13px; line-height: 1.45; color: var(--bp-grey-700); margin: 4px 0 0; }
.rgpd-item > .btn { flex: none; align-self: center; }
.btn.rgpd-danger { color: var(--bp-red); border-color: var(--bp-red); }
.btn.rgpd-danger:hover { background: var(--bp-red); color: var(--bp-white); }
.rgpd-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--bp-ink); margin-top: 8px; }
.rgpd-check input { flex: none; }

/* ── Form field with leading icon (DS line input) ─────────────────── */
.fi { display: flex; align-items: center; gap: 9px; border-bottom: 1px solid var(--bp-grey-200); }
.fi:focus-within { border-bottom-color: var(--bp-red); }
.fi > svg { width: 16px; height: 16px; flex: none; color: var(--bp-grey-500); }
.fi input, .fi textarea { flex: 1; border: 0; background: transparent; padding: 9px 0; font: inherit; font-size: 14px; outline: none; color: var(--bp-ink); }
.fi.fi-area { align-items: flex-start; }
.fi.fi-area > svg { margin-top: 11px; }
.fi textarea { resize: vertical; min-height: 58px; padding-top: 10px; }

/* leading icons inside stripe-inputs / secure note */
.lead-ic { width: 16px; height: 16px; flex: none; color: var(--bp-grey-500); }
.pay-secure { display: flex; align-items: center; gap: 8px; }

/* ── List: "Altres activitats" sub-headings ───────────────────────── */
.list-subhead { font-family: var(--bp-font-display); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; color: var(--bp-grey-500); margin: 16px 0 8px; }
.list-col > .list-subhead:first-of-type { margin-top: 0; }

/* ── Blocked-card tooltip (why you can't select) ──────────────────── */
.list-item { position: relative; }
.act-card[data-tip]:hover::after, .list-item[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%);
  background: var(--bp-ink); color: var(--bp-white);
  font-family: var(--bp-font-body); font-weight: 400; font-size: 11px; line-height: 1.4;
  letter-spacing: 0; text-transform: none; text-align: center;
  padding: 7px 10px; width: max-content; max-width: 210px;
  z-index: 40; box-shadow: var(--bp-shadow-soft); pointer-events: none;
}
.act-card[data-tip]:hover::before, .list-item[data-tip]:hover::before {
  content: ""; position: absolute; left: 50%; bottom: calc(100% + 3px); transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: var(--bp-ink); z-index: 40; pointer-events: none;
}

/* ── Internal-billing note (intern/treballador checkout — no online payment) ── */
.internal-note { display: flex; gap: 12px; align-items: flex-start; background: var(--bp-grey-50); border: 1px solid var(--bp-grey-100); padding: 14px 16px; margin-top: 18px; font-size: 14px; line-height: 1.5; color: var(--bp-ink); }
.internal-note svg { width: 20px; height: 20px; flex: none; color: var(--bp-grey-700); margin-top: 1px; }
.internal-note strong { font-weight: 600; }

/* ── Worker-discount row in checkout totals (treballador) ── */
.tot-disc .tot-label, .tot-disc span:last-child { color: var(--bp-red); }

/* gap between the internal-billing note and the conditions checkbox */
.internal-note + .check { margin-top: 16px; }
