/* ════════════════════════════════════════════════════════════════
   FORMACIÓ DE GRUPS · interactive editor
   Brand tokens from design-system/colors_and_type.css.
   ═══════════════════════════════════════════════════════════════ */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bp-grey-50); }

.fg-page { min-height: 100vh; background: var(--bp-grey-50); padding: 24px; display: flex; justify-content: center; }
.fg-shell {
  width: 100%; max-width: 1560px; background: var(--bp-white);
  border: 1px solid #E0DCD4; box-shadow: 0 24px 48px -16px rgba(20,14,6,0.18), 0 2px 6px rgba(20,14,6,0.06);
  position: relative; overflow: hidden;
}
.fg-display { font-family: var(--bp-font-display); }

/* topbar */
.fg-top { background: var(--bp-red); color: var(--bp-white); display: flex; align-items: center; gap: 24px; padding: 13px 24px; }
.fg-top .brand { font-family: var(--bp-font-display); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.fg-top .brand span { font-weight: 400; opacity: 0.85; }
.fg-top nav { display: flex; gap: 22px; flex: 1; }
.fg-top nav a { font-family: var(--bp-font-display); font-size: 12px; letter-spacing: 0.10em; text-transform: uppercase; color: rgba(255,255,255,0.85); text-decoration: none; cursor: pointer; position: relative; }
.fg-top nav a.on { color: #fff; }
.fg-top nav a.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -17px; height: 2px; background: #fff; }
.fg-top .who { font-family: var(--bp-font-display); font-weight: 700; font-size: 12px; }

/* operational banner */
.fg-opsbanner { display: flex; align-items: center; gap: 14px; padding: 11px 24px; background: #FFF2E0; border-bottom: 1px solid #E89F00; color: #8A4A00; }
.fg-opsbanner svg { width: 18px; height: 18px; flex-shrink: 0; }
.fg-opsbanner .t { font-family: var(--bp-font-display); font-weight: 700; font-size: 13px; flex: 1; }
.fg-opsbanner .t strong { color: #5C3000; }
.fg-opsbanner button { font-family: var(--bp-font-display); font-weight: 700; font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer; padding: 7px 14px; border-radius: var(--bp-radius-pill); border: 1.5px solid #8A4A00; background: #8A4A00; color: #fff; }
.fg-opsbanner .dismiss { background: transparent; color: #8A4A00; border-color: transparent; padding: 7px 6px; }

/* header */
.fg-head { display: flex; align-items: center; gap: 24px; padding: 18px 24px; border-bottom: 1px solid var(--bp-grey-100); }
/* hero header */
.fg-hero { display: flex; align-items: stretch; border-bottom: 1px solid var(--bp-grey-100); }
.fg-hero-main { flex: 1; padding: 22px 26px; display: flex; flex-direction: column; }
.fg-hero-sub { font-family: var(--bp-font-body); font-size: 13px; color: var(--bp-grey-700); margin-top: 6px; }
.fg-hero .fg-summary { margin-left: 0; margin-top: 16px; gap: 30px; }
.fg-hero .fg-summary .s { text-align: left; }
.fg-hero-side { width: 340px; flex-shrink: 0; border-left: 1px solid var(--bp-grey-100); background: #FAFAF7; padding: 20px 24px; display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.fg-scn-label { font-family: var(--bp-font-display); font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bp-grey-500); display: flex; align-items: center; gap: 6px; }
.fg-scn-label svg { width: 12px; height: 12px; color: var(--bp-red); }
.fg-scnsel { appearance: none; cursor: pointer; width: 100%; font-family: var(--bp-font-display); font-weight: 700; font-size: 12.5px; color: var(--bp-ink); background: #fff; border: 1.5px solid var(--bp-grey-200); padding: 10px 30px 10px 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%231D1D1B' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; }
.fg-hero-side .fg-confirm { width: 100%; }

/* tone banners */
.fg-banner { display: flex; align-items: center; gap: 14px; padding: 11px 24px; border-bottom: 1px solid; }
.fg-banner svg { width: 18px; height: 18px; flex-shrink: 0; }
.fg-banner .t { font-family: var(--bp-font-display); font-weight: 700; font-size: 13px; flex: 1; }
.fg-banner button { font-family: var(--bp-font-display); font-weight: 700; font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer; padding: 7px 14px; border-radius: var(--bp-radius-pill); border: 1.5px solid; background: transparent; }
.fg-banner .dismiss { border-color: transparent; padding: 7px 6px; }
.fg-banner.tone-ops { background: #FFF2E0; border-bottom-color: #E89F00; color: #8A4A00; }
.fg-banner.tone-ops button { border-color: #8A4A00; background: #8A4A00; color: #fff; }
.fg-banner.tone-ops .dismiss { background: transparent; color: #8A4A00; }
.fg-banner.tone-danger { background: #FCE9E8; border-bottom-color: #E5908C; color: #B5302C; }
.fg-banner.tone-danger button { color: #B5302C; }
.fg-banner.tone-info { background: var(--bp-cream); border-bottom-color: #E6D9C4; color: #5A4A2E; }
.fg-banner.tone-info button { color: #5A4A2E; }

/* big empty state */
.fg-emptybig { border: 1.5px dashed var(--bp-grey-200); background: #FAFAF7; border-radius: 8px; padding: 54px 24px; text-align: center; }
.fg-emptybig .ico { width: 48px; height: 48px; border-radius: 50%; background: var(--bp-cream); color: var(--bp-red); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.fg-emptybig .t { font-family: var(--bp-font-display); font-weight: 700; font-size: 17px; color: var(--bp-ink); }
.fg-emptybig .d { font-family: var(--bp-font-body); font-size: 13px; color: var(--bp-grey-700); margin-top: 6px; max-width: 420px; margin-left: auto; margin-right: auto; line-height: 1.45; }
.fg-actsel { appearance: none; cursor: pointer; font-family: var(--bp-font-display); font-weight: 700; font-size: 22px; letter-spacing: -0.01em; color: var(--bp-ink); border: none; background: transparent; padding: 4px 30px 4px 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231D1D1B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right center; }
.fg-eyebrow { font-family: var(--bp-font-display); font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--bp-red); margin-bottom: 3px; }
.fg-summary { display: flex; gap: 26px; margin-left: auto; }
.fg-summary .s { text-align: right; }
.fg-summary .s .v { font-family: var(--bp-font-display); font-weight: 700; font-size: 22px; letter-spacing: -0.01em; color: var(--bp-ink); line-height: 1; }
.fg-summary .s .v small { font-size: 12px; color: var(--bp-grey-500); font-weight: 400; }
.fg-summary .s .k { font-family: var(--bp-font-display); font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bp-grey-500); margin-top: 4px; }
.fg-confirm { font-family: var(--bp-font-display); font-weight: 700; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer; padding: 13px 22px; border-radius: var(--bp-radius-pill); border: 1.5px solid var(--bp-red); background: var(--bp-red); color: #fff; white-space: nowrap; }
.fg-confirm:disabled { background: var(--bp-grey-200); border-color: var(--bp-grey-200); color: var(--bp-grey-500); cursor: not-allowed; }

/* helper note */
.fg-note { padding: 10px 24px; background: var(--bp-cream); border-bottom: 1px solid #E6D9C4; font-family: var(--bp-font-body); font-size: 12.5px; color: #5A4A2E; display: flex; gap: 9px; align-items: center; }
.fg-note svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--bp-red); }
.fg-note strong { color: var(--bp-ink); }

/* two-column body */
.fg-body { display: grid; grid-template-columns: 340px 1fr; min-height: 640px; }
.fg-pool { border-right: 1px solid var(--bp-grey-100); background: #FAFAF7; display: flex; flex-direction: column; max-height: 78vh; }
.fg-pool-head { padding: 16px 18px 12px; border-bottom: 1px solid var(--bp-grey-100); }
.fg-pool-head .h { display: flex; justify-content: space-between; align-items: baseline; }
.fg-pool-head .h .title { font-family: var(--bp-font-display); font-weight: 700; font-size: 15px; color: var(--bp-ink); }
.fg-pool-head .h .count { font-family: var(--bp-font-display); font-weight: 700; font-size: 12px; color: var(--bp-red); }
.fg-search { width: 100%; margin-top: 12px; padding: 9px 12px; border: 1px solid var(--bp-grey-200); background: #fff; font-family: var(--bp-font-body); font-size: 13px; color: var(--bp-ink); }
.fg-search::placeholder { color: var(--bp-grey-500); }
.fg-poolfilters { display: flex; gap: 7px; margin-top: 10px; }
.fg-poolfilters select { flex: 1; appearance: none; cursor: pointer; font-family: var(--bp-font-display); font-size: 11px; font-weight: 700; color: var(--bp-ink); background: #fff; border: 1px solid var(--bp-grey-200); padding: 6px 22px 6px 9px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%231D1D1B' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 7px center; }
.fg-pool-list { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 7px; }
.fg-pool-list.drop-on { background: #FFF7F6; outline: 2px dashed var(--bp-red); outline-offset: -6px; }
.fg-pool-empty { padding: 40px 18px; text-align: center; color: var(--bp-grey-500); font-family: var(--bp-font-body); font-size: 13px; }

/* avatar */
.fg-av { border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-family: var(--bp-font-display); font-weight: 700; flex-shrink: 0; box-shadow: 0 0 0 1px rgba(0,0,0,0.04); letter-spacing: 0.01em; }

/* student card (pool) */
.fg-stu { background: #fff; border: 1px solid var(--bp-grey-100); border-radius: 4px; padding: 9px 11px; cursor: grab; position: relative; box-shadow: 0 1px 2px rgba(20,14,6,0.04); transition: box-shadow 120ms, transform 90ms, border-color 120ms; }
.fg-stu:hover { box-shadow: 0 5px 14px -5px rgba(20,14,6,0.28); transform: translateY(-1px); border-color: var(--bp-grey-200); }
.fg-stu:active { cursor: grabbing; }
.fg-stu.dragging { opacity: 0.4; }
.fg-stu .row1 { display: flex; align-items: center; gap: 9px; }
.fg-stu .nm { font-family: var(--bp-font-display); font-weight: 700; font-size: 13.5px; color: var(--bp-ink); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fg-stu .row2 { display: flex; align-items: center; gap: 6px; margin-top: 7px; margin-left: 37px; flex-wrap: wrap; }
.course-chip { font-family: var(--bp-font-display); font-weight: 700; font-size: 9.5px; color: var(--bp-grey-700); background: var(--bp-grey-50); padding: 2px 6px; }
.lvl-chip { font-family: var(--bp-font-display); font-weight: 700; font-size: 9.5px; letter-spacing: 0.02em; padding: 2px 6px; }
.lvl-Inicial { background: #E2EEF6; color: #0F62A5; }
.lvl-Mitjà { background: #FFF2E0; color: #8A4A00; }
.lvl-Avançat { background: #EDE4FB; color: #5E2DC6; }
.fg-stu .pref { font-family: var(--bp-font-body); font-size: 11px; color: var(--bp-grey-700); }
.icon-badge { width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; flex-shrink: 0; }
.icon-allergy { background: #FFF2E0; color: #8A4A00; font-weight: 700; }
.icon-sibling { background: #E2EEF6; color: #0F62A5; }
.icon-sibling svg { width: 11px; height: 11px; }

/* groups column */
.fg-groups-wrap { padding: 18px 20px; overflow-y: auto; max-height: 78vh; }
.fg-groups-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.fg-groups-top .h { font-family: var(--bp-font-display); font-weight: 700; font-size: 15px; color: var(--bp-ink); }
.fg-newgrp { font-family: var(--bp-font-display); font-weight: 700; font-size: 12px; letter-spacing: 0.03em; text-transform: uppercase; cursor: pointer; padding: 9px 16px; border-radius: var(--bp-radius-pill); border: 1.5px solid var(--bp-ink); background: #fff; color: var(--bp-ink); display: inline-flex; align-items: center; gap: 7px; }
.fg-newgrp:hover { background: var(--bp-ink); color: #fff; }
.fg-newgrp svg { width: 14px; height: 14px; }
.fg-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(338px, 1fr)); gap: 16px; align-items: start; }

/* group box */
.fg-grp { background: #fff; border: 1.5px solid var(--bp-grey-200); border-radius: 5px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 2px 6px rgba(20,14,6,0.06); transition: box-shadow 140ms, border-color 140ms; position: relative; }
.fg-grp::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--grp-color, var(--bp-grey-300)); z-index: 1; }
.fg-grp:hover { box-shadow: 0 10px 26px -10px rgba(20,14,6,0.24); }
.fg-grp.over { border-color: #E89F00; }
.fg-grp.danger { border-color: var(--bp-red); }
.fg-grp.drop-on { border-color: var(--bp-red); box-shadow: 0 0 0 3px rgba(255,0,0,0.12), 0 10px 26px -10px rgba(20,14,6,0.24); }
.fg-grp-head { padding: 14px 14px 11px; border-bottom: 1px solid var(--bp-grey-100); }
.fg-grp-topline { display: flex; align-items: center; gap: 8px; }
.fg-grp-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--grp-color, var(--bp-grey-300)); flex-shrink: 0; box-shadow: 0 0 0 3px color-mix(in srgb, var(--grp-color, #ccc) 18%, transparent); }
.fg-grp-name { font-family: var(--bp-font-display); font-weight: 700; font-size: 15px; color: var(--bp-ink); border: 1px solid transparent; background: transparent; padding: 3px 5px; margin: -3px -5px 0; width: 100%; }
.fg-grp-name:hover { border-color: var(--bp-grey-100); }
.fg-grp-name:focus { border-color: var(--bp-ink); outline: none; background: var(--bp-cream); }
.fg-grp-del { background: transparent; border: none; cursor: pointer; color: var(--bp-grey-500); padding: 2px; flex-shrink: 0; }
.fg-grp-del:hover { color: var(--bp-red); }
.fg-grp-del svg { width: 15px; height: 15px; }
.fg-grp-selects { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 11px; }
.fg-grp-field { display: flex; flex-direction: column; gap: 3px; }
.fg-grp-field.full { grid-column: 1 / -1; }
.fg-grp-field label { font-family: var(--bp-font-display); font-size: 9px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bp-grey-500); }
.fg-grp-field select { appearance: none; cursor: pointer; font-family: var(--bp-font-display); font-size: 12px; font-weight: 700; color: var(--bp-ink); background: #fff; border: 1px solid var(--bp-grey-200); padding: 7px 22px 7px 9px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%231D1D1B' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 7px center; }
.fg-grp-field select.rain { border-color: #9CC4DA; background-color: #F2F8FC; }
.fg-grp-field .pendval { display: flex; align-items: center; gap: 6px; font-family: var(--bp-font-display); font-weight: 700; font-size: 11.5px; color: #8A4A00; background: #FFF2E0; padding: 7px 9px; }
.fg-grp-field .pendval svg { width: 12px; height: 12px; }

/* duplicate conflict line */
.fg-dup { display: flex; align-items: center; gap: 7px; margin-top: 10px; padding: 7px 10px; background: #FFF7F6; border: 1px solid #F0C9C7; color: var(--bp-red); font-family: var(--bp-font-display); font-weight: 700; font-size: 11px; }
.fg-dup svg { width: 13px; height: 13px; flex-shrink: 0; }

/* occupancy */
.fg-cap { padding: 10px 14px; border-bottom: 1px solid var(--bp-grey-100); }
.fg-cap-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.fg-cap-head .lbl { font-family: var(--bp-font-display); font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bp-grey-500); }
.fg-cap-head .num { font-family: var(--bp-font-display); font-weight: 700; font-size: 16px; color: var(--bp-ink); letter-spacing: -0.01em; }
.fg-cap-head .num.over { color: #8A4A00; } .fg-cap-head .num.danger { color: var(--bp-red); } .fg-cap-head .num.ok { color: #0E7A3D; } .fg-cap-head .num small { font-size: 11px; color: var(--bp-grey-500); font-weight: 400; }
.fg-cap-track { height: 8px; background: var(--bp-grey-50); position: relative; border-radius: 999px; }
.fg-cap-fill { position: absolute; inset: 0 auto 0 0; background: #0E7A3D; transition: width 160ms cubic-bezier(.4,0,.2,1); border-radius: 999px; }
.fg-cap-fill.over { background: #E89F00; } .fg-cap-fill.danger { background: var(--bp-red); }
.fg-cap-tick { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--bp-grey-300); border-radius: 2px; }
.fg-cap-tick::after { content: "mín"; position: absolute; top: -13px; left: 50%; transform: translateX(-50%); font-family: var(--bp-font-display); font-weight: 700; font-size: 7.5px; letter-spacing: 0.04em; color: var(--bp-grey-500); }
.fg-grp-alert { display: flex; gap: 8px; align-items: flex-start; padding: 9px 14px; font-family: var(--bp-font-display); font-size: 11.5px; font-weight: 700; line-height: 1.3; }
.fg-grp-alert.over, .fg-grp-alert.under { background: #FFF8EC; color: #8A4A00; border-bottom: 1px solid #F0E0BE; }
.fg-grp-alert.danger { background: #FFF7F6; color: var(--bp-red); border-bottom: 1px solid #F0C9C7; }
.fg-grp-alert svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 1px; }

/* assigned students list (drop target) */
.fg-grp-list { padding: 8px; min-height: 78px; display: flex; flex-direction: column; gap: 4px; }
.fg-grp-empty { padding: 22px 10px; text-align: center; color: var(--bp-grey-500); font-family: var(--bp-font-body); font-size: 12px; border: 1.5px dashed var(--bp-grey-200); }
.fg-assigned { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center; padding: 6px 9px; background: #FAFAF7; border: 1px solid var(--bp-grey-100); cursor: grab; }
.fg-assigned:active { cursor: grabbing; }
.fg-assigned.dragging { opacity: 0.4; }
.fg-assigned { border-radius: 4px; transition: background 100ms, box-shadow 100ms; }
.fg-assigned:hover { background: #fff; box-shadow: 0 2px 7px -3px rgba(20,14,6,0.2); }
.fg-assigned .nm { font-family: var(--bp-font-display); font-weight: 700; font-size: 12px; color: var(--bp-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 7px; }
.fg-assigned .ic { display: flex; gap: 4px; align-items: center; }
.fg-remove { width: 20px; height: 20px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  border: none; background: transparent; color: var(--bp-grey-400); cursor: pointer; border-radius: 50%; padding: 0; }
.fg-remove:hover { background: var(--bp-red); color: #fff; }
.fg-badtime { font-family: var(--bp-font-display); font-weight: 700; font-size: 8.5px; letter-spacing: 0.02em; text-transform: uppercase; background: var(--bp-red); color: #fff; padding: 2px 5px; white-space: nowrap; }

/* toast */
.fg-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 90; background: var(--bp-ink); color: #fff; display: flex; align-items: center; gap: 16px; padding: 12px 16px 12px 18px; box-shadow: 0 12px 30px rgba(0,0,0,0.3); }
.fg-toast .msg { font-family: var(--bp-font-display); font-weight: 700; font-size: 13px; }
.fg-toast button { font-family: var(--bp-font-display); font-weight: 700; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; background: transparent; border: 1.5px solid rgba(255,255,255,0.5); color: #fff; padding: 6px 12px; border-radius: var(--bp-radius-pill); }

/* tooltip */
.fg-tip { position: fixed; z-index: 95; background: var(--bp-ink); color: #fff; padding: 9px 12px; max-width: 230px; pointer-events: none; box-shadow: 0 8px 20px rgba(0,0,0,0.3); }
.fg-tip .tnm { font-family: var(--bp-font-display); font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.fg-tip .trow { font-family: var(--bp-font-body); font-size: 11.5px; color: rgba(255,255,255,0.85); line-height: 1.5; }
.fg-tip .trow b { color: #fff; font-weight: 700; }

/* modal */
.fg-scrim { position: fixed; inset: 0; background: rgba(20,14,6,0.45); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; }
.fg-modal { background: #fff; max-width: 540px; width: 100%; max-height: 88vh; overflow-y: auto; box-shadow: 0 30px 70px rgba(0,0,0,0.35); }
.fg-modal-head { padding: 22px 24px 16px; border-bottom: 1px solid var(--bp-grey-100); }
.fg-modal-head .ttl { font-family: var(--bp-font-display); font-weight: 700; font-size: 21px; letter-spacing: -0.01em; color: var(--bp-ink); }
.fg-modal-head .sub { font-family: var(--bp-font-body); font-size: 13px; color: var(--bp-grey-700); margin-top: 5px; line-height: 1.45; }
.fg-modal-body { padding: 18px 24px; }
.fg-notif-group { margin-bottom: 16px; }
.fg-notif-group:last-child { margin-bottom: 0; }
.fg-notif-h { display: flex; align-items: center; gap: 8px; font-family: var(--bp-font-display); font-weight: 700; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--bp-red); margin-bottom: 7px; }
.fg-notif-h svg { width: 15px; height: 15px; }
.fg-notif-card { background: #FAFAF7; border: 1px solid var(--bp-grey-100); border-left: 3px solid var(--bp-red); padding: 11px 13px; font-family: var(--bp-font-body); font-size: 12.5px; color: #3D3A33; line-height: 1.5; }
.fg-notif-card b { font-family: var(--bp-font-display); color: var(--bp-ink); }
.fg-modal-foot { padding: 16px 24px 20px; border-top: 1px solid var(--bp-grey-100); display: flex; gap: 10px; justify-content: flex-end; }
.fg-btn { font-family: var(--bp-font-display); font-weight: 700; font-size: 12.5px; letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer; padding: 12px 20px; border-radius: var(--bp-radius-pill); border: 1.5px solid var(--bp-ink); background: #fff; color: var(--bp-ink); }
.fg-btn.primary { background: var(--bp-red); border-color: var(--bp-red); color: #fff; }
.fg-btn.ghost { border-color: var(--bp-grey-200); color: var(--bp-grey-700); }
.fg-warnbox { display: flex; gap: 10px; align-items: flex-start; background: #FFF8EC; border: 1px solid #F0E0BE; padding: 13px 15px; margin-bottom: 16px; }
.fg-warnbox svg { width: 18px; height: 18px; color: #8A4A00; flex-shrink: 0; margin-top: 1px; }
.fg-warnbox .wt { font-family: var(--bp-font-body); font-size: 13px; color: #5C3000; line-height: 1.45; }
.fg-warnbox .wt b { font-family: var(--bp-font-display); }

/* ── responsive · mòbil / tauletes ─────────────────────────────────── */
@media (max-width: 720px) {
  .fg-page { padding: 0; }
  .fg-shell { border: none; box-shadow: none; }
  /* stack pool + groups */
  .fg-body { grid-template-columns: 1fr; min-height: 0; }
  .fg-pool { border-right: none; border-bottom: 1px solid var(--bp-grey-100); max-height: 46vh; }
  .fg-groups-wrap { max-height: none; }
  /* one group card per row */
  .fg-groups { grid-template-columns: 1fr; }
  /* each group field full width so Franja (dia) és ben tocable */
  .fg-grp-selects { grid-template-columns: 1fr; gap: 12px; }
  /* tap targets ≥44px, 16px evita el zoom automàtic a iOS */
  .fg-grp-field select,
  .fg-poolfilters select,
  .fg-search { min-height: 44px; font-size: 16px; }
  .fg-grp-field .pendval { min-height: 44px; }
}
