@font-face {
  font-family: "Caveat";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/caveat-600.woff2?v=16") format("woff2"),
       url("/fonts/caveat-600.ttf?v=16") format("truetype");
}
:root {
  --bg: #EEF1FF;
  --ink: #0F1535;
  --muted: #4E5878;
  --card: #ffffff;
  --line: #D5DCF5;
  --green: #3A3FD9;
  --green-ink: #fff;
  --amber: #a86b10;
  --red: #9d342c;
  --blue: #0E7C86;
  --teal: #14B8A6;
  --accent: #2E8BFF;
  --shadow: 0 8px 24px rgba(15, 21, 53, 0.08);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; max-width: 100%; overflow-x: hidden; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }
img { max-width: 100%; height: auto; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}
a { color: var(--blue); }
header.top {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; padding: 16px 18px; background: #0F1535; color: #fff;
}
header.top strong { font-size: 18px; letter-spacing: 0.02em; }
header.top nav { display: flex; gap: 8px; flex-wrap: wrap; }
header.top a.brand { border: 0; padding: 0; background: transparent; border-radius: 0; }
header.top a, header.top button.link {
  color: #fff; text-decoration: none; background: transparent; border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px; padding: 8px 12px; font: inherit; cursor: pointer;
}
main { max-width: 980px; margin: 0 auto; padding: 18px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px;
}
h1 { font-size: 28px; margin: 0 0 8px; }
h2 { font-size: 20px; margin: 0 0 10px; }
.muted { color: var(--muted); }
.stack { display: grid; gap: 12px; }
label { display: grid; gap: 6px; font-weight: 600; }
input, select, textarea {
  font: inherit; padding: 14px 12px; border-radius: 12px; border: 1px solid #cfc6b8;
  background: #fff; width: 100%;
}
button, .btn {
  font: inherit; font-weight: 700; border: 0; border-radius: 14px; padding: 16px 18px;
  cursor: pointer; min-height: 56px;
}
button.primary, .btn.primary { background: var(--green); color: var(--green-ink); }
button.amber { background: #f3d7a1; color: #5c3b04; }
button.red { background: var(--red); color: #fff; }
button.ghost, .btn.ghost { background: #E0E6FF; color: var(--ink); }
button:disabled { opacity: 0.45; cursor: not-allowed; }
.big { min-height: 84px; font-size: 22px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1; }
.est {
  display: block; width: 100%; text-align: left; background: #fff; border: 2px solid var(--line);
  border-radius: 16px; padding: 18px; min-height: 72px;
}
.est strong { display: block; font-size: 20px; }
.banner { padding: 12px 14px; border-radius: 12px; background: #fde8e4; color: #6d241e; }
.ok { background: #e5f6ef; color: #0d5a46; padding: 12px 14px; border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs button { min-height: 44px; background: #E0E6FF; color: var(--ink); }
.tabs button.on { background: #3A3FD9; color: #fff; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 700px) {
  .grid2 { grid-template-columns: 1fr; }
  header.top { align-items: stretch; flex-direction: column; width: 100%; }
  main { padding: 12px; }
}
.kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.kpi div { background: #EEF1FF; border-radius: 12px; padding: 10px; }
.kpi b { display: block; font-size: 20px; }
.err { color: var(--red); font-weight: 700; }

.install-hint {
  position: static; display: flex; align-items: center; gap: 8px;
  margin: 0 0 12px; padding: 8px 10px 8px 12px;
  background: #0F1535; color: #fff; border-radius: 12px;
}
.install-hint p { margin: 0; font-size: 13px; line-height: 1.3; flex: 1; }
.install-hint .x { min-height: 36px; width: 36px; padding: 0; background: transparent; color: #fff; font-size: 22px; }

.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pad button { font-size: 28px; min-height: 64px; border-radius: 14px; border: 1px solid var(--line); background: #fff; }
.staff button { width: 100%; text-align: left; font-size: 22px; padding: 16px; margin-bottom: 8px; border-radius: 14px; border: 1px solid var(--line); background: #fff; }
video.cam { width: 160px; height: 120px; object-fit: cover; border-radius: 12px; background: #111; }

/* Lockup width is definite so iOS does not use the SVG's 444px intrinsic width. */
.brand, .logo-lockup {
  position: relative;
  display: block;
  min-width: 0;
  max-width: 100%;
  line-height: 1;
  text-decoration: none;
}
.brand { width: min(148px, 62vw); }
.logo-lockup { width: min(210px, 100%); }
.brand img, .logo-light {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}
/* 65.9% is the horizontal midpoint of the word "Workplan". */
.byline {
  display: block;
  width: max-content;
  max-width: none;
  margin: -0.22em 0 0 65.9%;
  font-family: "Caveat", cursive;
  font-style: normal;
  font-weight: 600;
  font-size: clamp(15px, 4.2vw, 22px);
  line-height: 0.85;
  letter-spacing: 0.01em;
  color: #0E7C86;
  white-space: nowrap;
}
header.top .byline {
  color: #D7DCF2;
  font-size: clamp(13px, 3.4vw, 16px);
  margin-top: -0.18em;
}
html.no-byline .byline { display: none; }
.install-hint img { height: 36px; width: 36px; max-width: 36px; display: block; margin-bottom: 8px; }
header.top { width: 100%; }
header.top > * { min-width: 0; max-width: 100%; }

/* Combo-style mobile planning */
body.app { background: #F7F8FF; }
.weekhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 4px 0 10px; }
.weekhead h2 { margin: 0; font-size: 26px; }
.estpick { background: #E7F6F4; color: #0E7C86; border: 0; border-radius: 999px; padding: 8px 12px; font-weight: 700; font-size: 13px; width: auto; max-width: 58%; }
.weekstrip { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 12px; }
.weekstrip button { flex: 1; min-width: 42px; min-height: 64px; background: transparent; color: var(--ink); border-radius: 16px; padding: 6px 2px; }
.weekstrip button small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: lowercase; }
.weekstrip button.on { background: #3A3FD9; color: #fff; }
.weekstrip button.on small { color: #EEF1FF; }
.teamhead { display: flex; justify-content: space-between; align-items: center; background: #fff; border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; font-weight: 800; }
.pub { color: #0E7C86; font-weight: 700; font-size: 14px; }
.shiftcard { background: color-mix(in srgb, var(--poste) 18%, white); border-left: 6px solid var(--poste); border-radius: 16px; padding: 12px 12px 12px 14px; margin-bottom: 10px; }
.shiftrow { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.shiftrow b { font-size: 16px; }
.timepill { background: #fff; border-radius: 999px; padding: 6px 10px; font-weight: 800; font-size: 13px; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { display: inline-block; color: #fff; border-radius: 999px; padding: 4px 10px; font-size: 13px; font-weight: 700; }
.notebubble { margin-top: 8px; background: #fff; border-radius: 12px; padding: 8px 10px; color: var(--ink); }
.fab { position: fixed; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); width: 56px; height: 56px; border-radius: 50%; background: #0F1535; color: #fff; font-size: 32px; line-height: 1; z-index: 5; }
.tabbar { display: none; }
@media (max-width: 800px) {
  body.app header.top, body.app .tabs { display: none; }
  body.app { padding-bottom: calc(108px + env(safe-area-inset-bottom)); }
  body.app.has-fab { padding-bottom: calc(168px + env(safe-area-inset-bottom)); }
  body.app.has-fab #view > h2, body.app.has-fab #shift { margin-right: 72px; }
  body.app #view.card { background: transparent; border: 0; box-shadow: none; padding: 0; }
  .estpick { max-width: 100%; }
  .desk-only { display: none; }
}
@media (min-width: 801px) {
  .fab { bottom: 24px; }
  .tabbar { display: none !important; }
}

.nowclock { font-size: 44px; font-weight: 800; margin: 0; letter-spacing: -0.03em; }
.soft { color: #4E5878; margin: 4px 0 8px; font-size: 15px; }

/* ---------- Planning editor ---------- */
body.wide main { max-width: none; }
body.wide #view.card { padding: 14px; }
.sm { min-height: 36px !important; padding: 6px 12px !important; font-size: 14px !important; }
.pl-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.pl-nav { display: flex; align-items: center; gap: 6px; }
.pl-title { font-size: 17px; min-width: 190px; text-align: center; text-transform: capitalize; }
.pl-seg { display: inline-flex; background: #EEF1FF; border-radius: 999px; padding: 3px; }
.pl-seg button { border: 0; background: transparent; border-radius: 999px; padding: 6px 14px; font: inherit; font-weight: 700; color: #4E5878; cursor: pointer; min-height: 32px; }
.pl-seg button.on { background: #fff; color: #3A3FD9; box-shadow: 0 1px 4px rgba(15,21,53,.12); }
.pl-est { width: auto; min-height: 36px; padding: 6px 10px; font-weight: 700; }
.pl-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pl-draft { background: #FFF4E0; color: #8A4B00; border-radius: 999px; padding: 4px 10px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.pl-ok { color: #0E7C86; font-weight: 700; font-size: 14px; }
.pl-warns { background: #FFF8EC; border: 1px solid #F3D9A6; border-radius: 12px; padding: 8px 12px; margin-bottom: 10px; font-size: 14px; }
.pl-warns summary { cursor: pointer; font-weight: 700; color: #8A4B00; }
.pl-warns ul { margin: 6px 0 0; padding-left: 18px; }
.pl-body { display: flex; gap: 12px; align-items: flex-start; }
.pl-gridwrap { flex: 1; min-width: 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.pl-grid { min-width: 980px; }
.pl-row { display: grid; grid-template-columns: 210px repeat(7, minmax(108px, 1fr)); border-bottom: 1px solid #E6EAF8; }
.pl-headrow { position: sticky; top: 0; z-index: 3; background: #F7F8FE; }
.pl-corner { padding: 8px 10px; font-size: 12px; font-weight: 800; color: #4E5878; }
.pl-dayhead { padding: 8px 6px; text-align: center; font-size: 13px; color: #4E5878; border-left: 1px solid #E6EAF8; }
.pl-dayhead b { color: var(--ink); }
.pl-dayhead.today b { background: #0F1535; color: #fff; border-radius: 999px; padding: 2px 8px; }
.pl-dayhead small { display: block; color: #8A4B00; font-size: 11px; font-weight: 700; }
.pl-dayhead.hol, .pl-cell.hol { background: #FFF8EC; }
.pl-teamhead { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #EEF1FF; border-bottom: 1px solid #E6EAF8; font-size: 15px; }
.pl-label { padding: 8px 10px; font-size: 12px; color: #4E5878; font-weight: 700; }
.pl-notes .pl-cell { min-height: 30px; }
.pl-open { background: #FBFBFF; }
.pl-cell { position: relative; border-left: 1px solid #E6EAF8; padding: 4px; min-height: 64px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; }
.pl-cell:hover { background: #F5F7FF; }
.pl-cell.drop { background: #E4E7FF; outline: 2px dashed #3A3FD9; outline-offset: -3px; }
.pl-plus { position: absolute; right: 4px; bottom: 4px; width: 26px; height: 26px; min-height: 26px !important; padding: 0 !important; border-radius: 50%; border: 0; background: #3A3FD9; color: #fff; font-size: 18px; line-height: 1; opacity: 0; transition: opacity .12s; cursor: pointer; }
.pl-cell:hover .pl-plus, .pl-cell:focus-within .pl-plus { opacity: 1; }
body.pl-dragging .pl-plus { display: none; }
.pl-person { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; }
.pl-person b { display: block; font-size: 14px; line-height: 1.2; }
.pl-person small { display: block; color: #4E5878; font-size: 12px; margin: 2px 0; }
.pl-avatar { flex: 0 0 28px; height: 28px; border-radius: 50%; background: #E4E7FF; color: #3A3FD9; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.pl-badge { display: inline-block; border-radius: 999px; padding: 1px 8px; font-size: 12px; font-weight: 800; }
.pl-badge.eq { background: #DDF3EF; color: #0B5F66; }
.pl-badge.neg { background: #FFE9D6; color: #8A4B00; }
.pl-badge.pos { background: #FDE2E2; color: #9D342C; }
.pl-shift { background: color-mix(in srgb, var(--poste) 16%, white); border-left: 4px solid var(--poste); border-radius: 8px; padding: 4px 6px; font-size: 12px; cursor: grab; }
.pl-shift:focus { outline: 2px solid #3A3FD9; outline-offset: 1px; }
.pl-shift.draft { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--poste) 10%, white) 0 6px, color-mix(in srgb, var(--poste) 18%, white) 6px 12px); outline: 1px dashed color-mix(in srgb, var(--poste) 70%, white); outline-offset: -1px; }
.pl-time { font-weight: 800; display: flex; gap: 4px; align-items: center; }
.pl-warn { color: #B45309; }
.pl-chips { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 3px; }
.pl-chip { color: #fff; border-radius: 999px; padding: 1px 6px; font-size: 11px; font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-note { margin-top: 3px; background: #fff; border-radius: 6px; padding: 2px 5px; color: var(--ink); }
.pl-abs { background: repeating-linear-gradient(135deg, #E8EAF2, #E8EAF2 6px, #F2F3F8 6px, #F2F3F8 12px); border-radius: 6px; padding: 3px 6px; font-size: 12px; font-weight: 700; color: #4E5878; }
.pl-abs.pending { background: #fff; border: 1px dashed #A0A8C3; }
.pl-notetag { display: inline-flex; gap: 4px; align-items: center; background: #FFF4E0; border-radius: 6px; padding: 1px 6px; font-size: 12px; }
.pl-notetag button { border: 0; background: transparent; min-height: 0; padding: 0; cursor: pointer; color: #8A4B00; }
.pl-addnote { border: 0; background: transparent; color: #8C95B5; min-height: 0 !important; padding: 0 4px !important; cursor: pointer; align-self: flex-start; opacity: 0; }
.pl-notecell:hover .pl-addnote { opacity: 1; }
.pl-empty { padding: 8px 12px; }
.pl-palette { flex: 0 0 236px; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px; }
.pl-palhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.pl-palteam > small { display: block; font-weight: 800; color: #4E5878; margin: 8px 0 4px; text-transform: uppercase; letter-spacing: .04em; font-size: 11px; }
.pl-fav { position: relative; background: color-mix(in srgb, var(--poste) 16%, white); border-left: 5px solid var(--poste); border-radius: 10px; padding: 6px 26px 6px 8px; margin-bottom: 6px; cursor: grab; }
.pl-fav:hover { box-shadow: 0 2px 8px rgba(15,21,53,.12); }
.pl-favname { display: block; font-weight: 800; font-size: 13px; }
.pl-favtime { display: block; font-size: 12px; color: #4E5878; }
.pl-favx { position: absolute; right: 4px; top: 4px; border: 0; background: transparent; min-height: 0 !important; padding: 0 4px !important; color: #8C95B5; cursor: pointer; opacity: 0; }
.pl-fav:hover .pl-favx { opacity: 1; }
.pl-help { font-size: 13px; margin-top: 8px; }
.pl-pop { position: absolute; z-index: 40; width: 260px; background: #fff; border-radius: 14px; box-shadow: 0 12px 32px rgba(15,21,53,.22); padding: 8px; max-height: 360px; overflow-y: auto; }
.pl-pophead { padding: 4px 6px 8px; }
.pl-pophead small { display: block; color: #4E5878; text-transform: capitalize; }
.pl-popfav { display: flex; justify-content: space-between; align-items: center; width: 100%; text-align: left; border: 0; border-left: 5px solid var(--poste); background: color-mix(in srgb, var(--poste) 12%, white); border-radius: 10px; padding: 8px 10px; margin-bottom: 4px; font: inherit; font-weight: 700; cursor: pointer; min-height: 40px; color: var(--ink); }
.pl-popfav:hover { background: color-mix(in srgb, var(--poste) 24%, white); }
.pl-popfav small { color: #4E5878; font-weight: 600; }
.pl-popcustom { width: 100%; border: 1px dashed #A0A8C3; background: #fff; border-radius: 10px; padding: 8px; font: inherit; font-weight: 700; color: #3A3FD9; cursor: pointer; min-height: 40px; }
.pl-backdrop { position: fixed; inset: 0; background: rgba(15,21,53,.35); z-index: 50; }
.pl-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); background: #fff; z-index: 51; display: flex; flex-direction: column; box-shadow: -12px 0 32px rgba(15,21,53,.2); }
.pl-dhead { display: flex; justify-content: space-between; align-items: flex-start; padding: 16px 18px 8px; }
.pl-dhead h2 { margin: 0 0 4px; }
.pl-status { display: inline-block; background: #EEF1FF; color: #4E5878; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 700; }
.pl-status.on { background: #DDF3EF; color: #0B5F66; }
.pl-close { border: 0; background: transparent; font-size: 28px; min-height: 0 !important; padding: 0 6px !important; cursor: pointer; color: var(--ink); }
.pl-tabs2 { display: flex; background: #EEF1FF; border-radius: 999px; padding: 3px; margin: 4px 18px 8px; }
.pl-tabs2 button { flex: 1; border: 0; background: transparent; border-radius: 999px; font: inherit; font-weight: 700; padding: 8px; cursor: pointer; color: #4E5878; }
.pl-tabs2 button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(15,21,53,.12); }
.pl-dbody { flex: 1; overflow-y: auto; padding: 4px 18px 12px; }
.pl-field { margin-bottom: 12px; }
.pl-field > label { display: flex; align-items: center; gap: 6px; font-weight: 700; margin-bottom: 6px; }
.pl-count, .pl-pill { background: #EEF1FF; border-radius: 999px; padding: 0 8px; font-size: 12px; font-weight: 700; color: #4E5878; }
.pl-favpick { display: flex; flex-wrap: wrap; gap: 6px; }
.pl-favpick button { border: 0; border-left: 4px solid var(--poste); background: color-mix(in srgb, var(--poste) 14%, white); border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; min-height: 36px; color: var(--ink); }
.pl-multi { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 6px; }
.pl-multi select { flex: 1; min-width: 160px; border: 0; min-height: 36px; padding: 4px; }
.pl-tag { display: inline-flex; gap: 4px; align-items: center; background: #EEF1FF; border-radius: 999px; padding: 3px 4px 3px 10px; font-size: 13px; font-weight: 700; }
.pl-tag button { border: 0; background: transparent; min-height: 0 !important; padding: 0 6px !important; cursor: pointer; }
.pl-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.pl-days button { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 6px 0; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; min-height: 44px; color: var(--ink); }
.pl-days button small { display: block; font-size: 11px; color: #4E5878; }
.pl-days button.on { background: #3A3FD9; color: #fff; border-color: #3A3FD9; }
.pl-days button.on small { color: #fff; }
.pl-otherdates { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.pl-otherdates input { width: auto; min-height: 36px; padding: 4px 8px; }
.pl-box { border: 1px solid var(--line); border-radius: 16px; padding: 12px; margin-bottom: 12px; }
.pl-pgroup small { display: block; color: #4E5878; font-size: 12px; margin: 4px 0; }
.pl-pgroup div { display: flex; flex-wrap: wrap; gap: 6px; }
.pl-ptoggle { border: 2px solid var(--poste); background: #fff; color: var(--ink); border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; min-height: 34px; }
.pl-ptoggle.on { background: var(--poste); color: #fff; }
.pl-times { display: flex; gap: 8px; align-items: center; }
.pl-times input { width: 120px; }
.pl-break { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.pl-break input { width: 90px; }
.pl-addline { border: 0; background: transparent; color: var(--ink); font: inherit; font-weight: 700; padding: 6px 0; cursor: pointer; min-height: 36px; }
.pl-switch { display: flex; justify-content: space-between; align-items: center; font-weight: 700; cursor: pointer; margin: 6px 0 2px; }
.pl-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pl-switch i { width: 46px; height: 26px; border-radius: 999px; background: #C9CFE3; position: relative; transition: background .15s; flex: 0 0 46px; }
.pl-switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .15s; }
.pl-switch input:checked + i { background: #3A3FD9; }
.pl-switch input:checked + i::after { left: 23px; }
.pl-switch input:focus-visible + i { outline: 2px solid #3A3FD9; outline-offset: 2px; }
.pl-soft { background: #FFF8EC; color: #8A4B00; border-radius: 10px; padding: 8px 10px; font-size: 13px; margin: 8px 0; }
.pl-mwarn { margin-top: -6px; }
.pl-dfoot { display: flex; gap: 8px; align-items: center; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); flex-wrap: wrap; }
.pl-dfoot .pl-spacer { flex: 1; }
.pl-dfoot button { min-height: 44px; }
.danger { color: #9D342C !important; }
.pl-toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: #0F1535; color: #fff; border-radius: 12px; padding: 10px 14px; display: flex; gap: 14px; align-items: center; z-index: 60; box-shadow: 0 10px 24px rgba(15,21,53,.3); max-width: calc(100vw - 24px); }
.pl-toast.bad { background: #9D342C; }
.pl-toast button { border: 0; background: transparent; color: #B9BEFF; font: inherit; font-weight: 800; cursor: pointer; min-height: 32px; padding: 0 4px; }
.pl-modalwrap { position: fixed; inset: 0; background: rgba(15,21,53,.4); z-index: 55; display: grid; place-items: center; padding: 16px; }
.pl-modal { background: #fff; border-radius: 18px; padding: 20px; width: min(720px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; box-shadow: 0 20px 50px rgba(15,21,53,.3); }
.pl-modal h2 { margin-top: 0; }
.pl-big { font-size: 22px; font-weight: 800; margin: 10px 0; }
.pl-check { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.pl-check input { width: auto; }
.pl-mfoot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.pl-pubgrid { width: 100%; border-collapse: collapse; margin: 8px 0 14px; }
.pl-pubgrid th, .pl-pubgrid td { padding: 8px; border-bottom: 1px solid #E6EAF8; text-align: center; font-size: 13px; }
.pl-pubgrid tbody th { text-align: left; font-size: 14px; }
.pl-pubgrid input { width: 20px; height: 20px; accent-color: #3A3FD9; }
.pl-pubbox { background: #F7F8FE; border-radius: 14px; padding: 12px; }
.pl-pubbox textarea { margin-top: 8px; min-height: 70px; }
.pl-day { min-width: 900px; }
.pl-tl-row { display: grid; grid-template-columns: 210px 1fr; border-bottom: 1px solid #E6EAF8; min-height: 52px; }
.pl-tl { position: relative; border-left: 1px solid #E6EAF8; background-image: repeating-linear-gradient(90deg, transparent 0, transparent calc(100% / 9 - 1px), #EEF0F8 calc(100% / 9 - 1px), #EEF0F8 calc(100% / 9)); }
.pl-tl-head .pl-tl span { position: absolute; top: 8px; font-size: 12px; color: #4E5878; transform: translateX(-50%); }
.pl-tl-head { min-height: 32px; background: #F7F8FE; }
.pl-bar { position: absolute; top: 10px; height: 32px; background: color-mix(in srgb, var(--poste) 22%, white); border-left: 5px solid var(--poste); border-radius: 8px; padding: 6px 8px; font-size: 12px; font-weight: 700; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; }
.pl-bar.draft { outline: 1px dashed var(--poste); }
.pl-tl .pl-abs { position: absolute; inset: 10px 4px; display: flex; align-items: center; }
.pl-holline { background: #FFF8EC; color: #8A4B00; border-radius: 10px; padding: 6px 10px; font-weight: 700; }
.pl-month { min-width: 960px; }
.pl-mrow { display: grid; grid-template-columns: 170px repeat(var(--n), minmax(24px, 1fr)); border-bottom: 1px solid #E6EAF8; }
.pl-mhead { text-align: center; font-size: 12px; padding: 4px 0; border-left: 1px solid #EEF0F8; }
.pl-mhead small { display: block; color: #4E5878; }
.pl-mhead.we, .pl-mcell.we { background: #F7F8FE; }
.pl-mhead.hol, .pl-mcell.hol { background: #FFF8EC; }
.pl-mcell { border-left: 1px solid #EEF0F8; min-height: 36px; display: flex; flex-wrap: wrap; gap: 2px; align-content: center; justify-content: center; padding: 2px; cursor: pointer; position: relative; }
.pl-mcell:hover { background: #F0F2FF; }
.pl-mdot { width: 10px; height: 10px; border-radius: 3px; }
.pl-mdot.draft { opacity: .45; }
.pl-mabs { position: absolute; left: 0; right: 0; bottom: 3px; height: 6px; background: #A0A8C3; }
.pl-mbar { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 10px; }
.pl-mfavs { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.pl-sheethead small { color: #4E5878; text-transform: capitalize; }
.pl-sheethead h2 { margin: 0; }
@media (max-width: 800px) {
  .pl-drawer { top: auto; left: 0; width: 100vw; max-height: 92vh; border-radius: 22px 22px 0 0; box-shadow: 0 -12px 32px rgba(15,21,53,.25); }
  .pl-modalwrap.sheet { place-items: end stretch; padding: 0; }
  .pl-modalwrap.sheet .pl-modal { border-radius: 22px 22px 0 0; width: 100%; padding-bottom: calc(20px + env(safe-area-inset-bottom)); max-height: 85vh; }
  .pl-dfoot { justify-content: flex-end; }
  .pl-dfoot .ghost { padding: 8px 10px; }
  .pl-pubgrid th, .pl-pubgrid td { padding: 6px 2px; font-size: 11px; }
  .pl-toast { bottom: calc(96px + env(safe-area-inset-bottom)); }
}

.pl-favchosen { display: flex; justify-content: space-between; align-items: center; background: color-mix(in srgb, var(--poste) 14%, white); border-left: 5px solid var(--poste); border-radius: 10px; padding: 8px 10px; }
.pl-favchosen .link { min-height: 32px; }

/* ---- Planning: Combo option inventory ---- */
.pl-viewsel { width: auto; min-height: 34px; padding: 4px 10px; border-radius: 999px; font-weight: 700; }
.pl-alertbtn b { font-weight: 800; }
.pl-alertbtn.has { color: #9D342C; border-color: #F1C9C4; background: #FFF4F2; }
button.ghost.on { background: #EEF1FF; color: #3A3FD9; border-color: #3A3FD9; }
button.danger, .link.danger { color: #B42318; }
.link { border: 0; background: none; color: #3A3FD9; font: inherit; font-weight: 700; cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 2px; }
.pl-shift { position: relative; }
.pl-shift.sel { outline: 2px solid #3A3FD9; outline-offset: 0; box-shadow: 0 0 0 3px rgba(58,63,217,.18); }
.pl-shift.other { opacity: .55; cursor: default; border-left-style: dotted; }
.pl-shift.noshow { opacity: .6; text-decoration: line-through; }
.pl-tick { position: absolute; top: 2px; right: 4px; font-size: 13px; }
.pl-who { font-weight: 800; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-brk { margin-left: 4px; font-size: 10px; color: #4E5878; font-weight: 700; }
.pl-eve, .pl-noteic, .pl-ok2, .pl-ns { margin-left: 3px; font-size: 11px; }
.pl-ok2 { color: #0B7A55; font-weight: 900; }
.pl-ns { color: #B42318; font-weight: 900; }
.pl-rc { display: inline-block; margin-left: 4px; font-size: 11px; font-weight: 700; color: #4E5878; background: #F2F4FB; border-radius: 999px; padding: 1px 6px; }
.pl-ctype { display: inline-block; font-size: 10px; font-weight: 800; color: #5B21B6; background: #F1EAFE; border-radius: 999px; padding: 1px 6px; margin-left: 2px; vertical-align: middle; }
.pl-ic { border: 0; background: transparent; cursor: pointer; font-size: 13px; padding: 4px 6px; border-radius: 8px; color: #4E5878; min-height: 30px; }
.pl-ic:hover { background: #fff; }
.pl-ic:disabled { opacity: .3; cursor: default; }
.pl-teamhead .pl-spacer { flex: 1; }
.pl-abs { cursor: pointer; border-left: 4px solid var(--abs, #A0A8C3); }
.pl-mabsrow { display: block; width: 100%; text-align: left; border: 0; border-left: 4px solid var(--abs, #A0A8C3); background: #fff; border-radius: 10px; padding: 10px 12px; margin: 6px 0; font: inherit; cursor: pointer; }
.pl-seg2 { display: inline-flex; background: #EEF1FF; border-radius: 999px; padding: 3px; flex: 0 0 auto; }
.pl-seg2 button { border: 0; background: transparent; border-radius: 999px; padding: 6px 12px; font: inherit; font-weight: 700; color: #4E5878; cursor: pointer; min-height: 34px; }
.pl-seg2 button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(15,21,53,.12); }
.pl-arow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pl-arow input[type=date] { flex: 1 1 150px; min-width: 0; }
.pl-arow input[type=number] { width: 90px; }
.pl-dur b { font-size: 18px; }
.pl-trash { border: 0; background: transparent; cursor: pointer; color: #B42318; font-size: 15px; padding: 4px; min-height: 32px; }
.pl-break select { flex: 1; }
.pl-break .pl-bmin { width: 80px; }
.pl-break .pl-bt { width: 100px; }
.pl-break .link { font-size: 12px; white-space: nowrap; }
.pl-tip { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #EEF1FF; color: #3A3FD9; font-size: 12px; font-weight: 800; cursor: help; margin-left: 4px; }
.pl-right { float: right; font-weight: 400; color: #4E5878; font-size: 13px; }
.pl-all { float: right; font-size: 12px; }
.pl-vhead { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.pl-vtable { border: 1px solid #E6EAF8; border-radius: 12px; overflow: hidden; margin-bottom: 14px; }
.pl-vtable > div { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; font-size: 14px; }
.pl-vtable > div + div { border-top: 1px solid #E6EAF8; }
.pl-vtable b { text-align: right; font-weight: 600; }
.pl-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.pl-none { color: #B45309; }
.pl-vreal { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pl-vreal h3 { margin: 6px 0; font-size: 18px; }
.pl-switch.inline { gap: 10px; margin: 0; font-weight: 600; font-size: 14px; }
.pl-modalwrap.wide .pl-modal { width: min(760px, 100%); }
.pl-modalwrap.side { place-items: stretch end; padding: 0; }
.pl-modalwrap.side .pl-modal { width: min(420px, 100vw); height: 100vh; max-height: 100vh; border-radius: 0; }
.pl-mhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pl-mhead h2 { margin: 0; }
.pl-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 12px 0 4px; }
.pl-steps i { height: 4px; border-radius: 4px; background: #E6EAF8; }
.pl-steps i.on { background: #3A3FD9; }
.pl-stepl { font-size: 13px; color: #4E5878; margin: 4px 0 10px; }
.pl-radio { display: flex; gap: 10px; align-items: flex-start; border: 1px solid #E6EAF8; border-radius: 12px; padding: 12px; margin: 8px 0; cursor: pointer; }
.pl-radio.on { border-color: #3A3FD9; background: #F7F8FF; }
.pl-radio input { width: auto; margin-top: 3px; }
.pl-radio small { display: block; color: #4E5878; margin-top: 2px; }
.pl-weekpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 12px; }
.pl-dupteam { border: 1px solid #E6EAF8; border-radius: 12px; padding: 8px 12px; margin: 8px 0; }
.pl-duphead { display: flex; justify-content: space-between; align-items: center; }
.pl-tools { display: grid; gap: 8px; margin-top: 12px; }
.pl-tools button { text-align: left; border: 1px solid #E6EAF8; background: #fff; border-radius: 12px; padding: 12px 14px; font: inherit; cursor: pointer; }
.pl-tools button:hover { border-color: #3A3FD9; background: #F7F8FF; }
.pl-tools small { display: block; color: #4E5878; margin-top: 2px; }
.pl-agroup { border-bottom: 1px solid #E6EAF8; padding: 8px 0; }
.pl-agroup summary { cursor: pointer; }
.pl-aitem { display: block; width: 100%; text-align: left; border: 0; background: #F7F8FC; border-radius: 8px; padding: 8px 10px; margin: 6px 0; font: inherit; cursor: pointer; }
.pl-aitem:hover { background: #EEF1FF; }
.pl-order { padding-left: 22px; }
.pl-order li { display: flex; align-items: center; gap: 6px; padding: 6px 0; border-bottom: 1px solid #F0F2FA; }
.pl-order li span { flex: 1; }
.pl-dsec { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: #4E5878; margin: 16px 0 4px; }
.set-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 16px; }
.set-note { font-size: 13px; color: #4E5878; }
.tagusers { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 12px; }
.tagusers label { display: inline-flex; align-items: center; gap: 4px; border: 1px solid #E6EAF8; border-radius: 999px; padding: 4px 10px; font-size: 13px; }
.tagusers input { width: auto; }
.tagusers button { border: 0; background: none; cursor: pointer; color: #C9CFE3; font-size: 15px; padding: 0; }
.tagusers button.on { color: #E3A008; }

/* ---- Gestion simplifiée (v11) ---- */
.headrow { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.headrow h2 { margin: 0; }
#view h3 { margin: 22px 0 8px; font-size: 15px; color: #4E5878; text-transform: uppercase; letter-spacing: .04em; }
button.small, .ghost.small, .primary.small { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.ucard { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: #fff; color: var(--ink); border: 1px solid #E6EAF8; border-left: 5px solid var(--poste, #C9D0EA); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; font: inherit; box-shadow: none; }
.ucard.warn { border-left-color: #D9480F; background: #FFF6F0; }
.ucard-main { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.ucard-main b { font-size: 16px; }
.ucard-main span { font-size: 14px; }
.ucard-act { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ucard.person { cursor: pointer; border-left-width: 1px; }
.avatar { flex: 0 0 42px; height: 42px; border-radius: 50%; background: #E0E6FF; color: #3A3FD9; display: grid; place-items: center; font-weight: 800; }
.chev { color: #8C95B5; font-size: 24px; }
.tchip { display: inline-block; background: #EEF1FF; color: #2D3290; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 700; }
.tchip.c { background: #E8F6F1; color: #0B6B53; }
.state { font-size: 13px; font-weight: 800; border-radius: 999px; padding: 4px 10px; white-space: nowrap; background: #F1F3FA; color: #4E5878; }
.state.ok { background: #E3F7EC; color: #0B7A3E; }
.state.bad { background: #FDE8E8; color: #B42318; }
.stat3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0 12px; }
.stat3 > * { background: #fff; border: 1px solid #E6EAF8; border-radius: 14px; padding: 12px 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--ink); font: inherit; min-height: 0; }
.stat3 b { font-size: 28px; line-height: 1; }
.stat3 span { font-size: 12px; color: #4E5878; font-weight: 700; }
.stat3 .bad b { color: #B42318; }
.stat3 .todo { border-color: #3A3FD9; background: #F3F4FF; }
.banner.linkish { display: block; width: 100%; text-align: left; border: 0; font: inherit; cursor: pointer; }
.okbox { background: #E8F6F1; color: #0B4F3C; border-radius: 14px; padding: 14px 16px; }
.okbox.big { font-size: 18px; line-height: 1.7; }
.hgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.hcard { display: flex; flex-direction: column; gap: 10px; text-align: left; background: #fff; color: var(--ink); border: 1px solid #E6EAF8; border-radius: 16px; padding: 14px; font: inherit; cursor: pointer; min-height: 0; }
.hname { display: flex; flex-direction: column; gap: 2px; }
.hname b { font-size: 17px; }
.hname .muted { font-size: 13px; }
.h3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.h3 > span { background: #F6F7FC; border-radius: 12px; padding: 8px; display: flex; flex-direction: column; align-items: center; }
.h3 small { font-size: 12px; color: #4E5878; font-weight: 700; }
.h3 b { font-size: 20px; font-variant-numeric: tabular-nums; }
.h3.big b { font-size: 26px; }
.h3 .pos { background: #E3F7EC; } .h3 .pos b, td.pos { color: #0B7A3E; }
.h3 .neg { background: #FDE8E8; } .h3 .neg b, td.neg { color: #B42318; }
td.pos, td.neg { font-weight: 800; }
.daytable td, .daytable th { font-variant-numeric: tabular-nums; }
.daytable tr.future td { color: #8C95B5; }
.monthnav { display: flex; align-items: center; gap: 8px; text-transform: capitalize; }
details.adv { margin: 14px 0; border: 1px solid #E6EAF8; border-radius: 14px; background: #fff; padding: 0 14px; }
details.adv > summary { cursor: pointer; padding: 12px 0; font-weight: 800; color: #4E5878; }
details.adv[open] > summary { border-bottom: 1px solid #E6EAF8; margin-bottom: 10px; }
details.adv.big > summary { font-size: 16px; }
.setcard { background: #fff; border: 1px solid #E6EAF8; border-radius: 16px; padding: 14px; margin-bottom: 10px; }
.setcard h3 { margin-top: 0 !important; }
.setcard.poste details summary { cursor: pointer; color: #3A3FD9; font-weight: 700; margin-top: 8px; }
.colorpick { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.colorpick input { width: 44px; height: 34px; padding: 0; border: 0; background: none; }
.daygrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 10px; }
.daygrid label { font-size: 12px; text-align: center; font-weight: 700; }
.daygrid input { text-align: center; padding: 8px 2px; }
.setnav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.setnav a { background: #EEF1FF; color: #2D3290; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; text-decoration: none; }
.savedmsg { font-weight: 700; }
.set-note { font-size: 13px; color: #4E5878; margin: 2px 0 8px; }
.atypes .arow { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 6px; }
fieldset.seg { border: 0; padding: 0; margin: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
fieldset.seg legend { font-weight: 700; margin-bottom: 6px; padding: 0; }
fieldset.seg label { display: flex; align-items: center; gap: 6px; background: #F1F3FA; border-radius: 999px; padding: 8px 16px; }
fieldset.seg input { width: auto; }
.menu { display: flex; flex-direction: column; gap: 8px; }
.menu > * { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; background: #fff; color: var(--ink); border: 1px solid #E6EAF8; border-radius: 14px; padding: 14px 16px; font: inherit; text-decoration: none; min-height: 0; }
.menu b { font-size: 16px; }
.menu span { font-size: 13px; color: #4E5878; }
.modal-back { position: fixed; inset: 0; background: rgba(15,21,53,.4); z-index: 60; display: grid; place-items: center; padding: 16px; }
.modal-back .modal { background: #F6F7FC; border-radius: 18px; padding: 18px; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; box-shadow: 0 20px 50px rgba(15,21,53,.3); }
.modal-back .modal.wide { width: min(760px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.modal-head h2 { margin: 0; }
.modal-head .link { font-size: 22px; min-height: 40px; }
@media (max-width: 800px) {
  .modal-back { place-items: end stretch; padding: 0; }
  .modal-back .modal { border-radius: 22px 22px 0 0; width: 100%; max-height: 92vh; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .hgrid { grid-template-columns: 1fr; }
  .headrow .primary { width: 100%; }
  .daygrid input { font-size: 15px; }
  .atypes .arow { grid-template-columns: 1fr; padding-bottom: 8px; border-bottom: 1px solid #E6EAF8; }
}

/* ---- App mobile modèle Combo (Compte, Équipe, Profil) ---- */
body.cl main { max-width: 640px; margin: 0 auto; padding: 0 14px; }
.cl-page { padding-top: 6px; }
.cl-top { display: flex; align-items: center; gap: 10px; min-height: 56px; position: sticky; top: 0; z-index: 4; background: var(--bg); margin: 0 -14px; padding: 8px 14px; }
.cl-top h1 { font-size: 24px; margin: 0; letter-spacing: -0.02em; flex: 1; }
.cl-page:not(.full) .cl-top:has(.cl-round) h1 { text-align: center; padding-right: 46px; }
.cl-round { width: 44px; height: 44px; min-height: 44px; border-radius: 50%; background: #fff; color: var(--ink); font-size: 26px; line-height: 1; padding: 0; box-shadow: 0 4px 14px rgba(15,21,53,.12); flex: 0 0 44px; }
.cl-h1 { font-size: 26px; margin: 12px 0 6px; letter-spacing: -0.02em; }
.cl-sec { font-size: 13px; font-weight: 800; color: #6B7391; text-transform: uppercase; letter-spacing: .05em; margin: 18px 4px 8px; }
.cl-sec.cap { text-transform: capitalize; letter-spacing: 0; font-size: 15px; color: var(--ink); }
.cap { text-transform: capitalize; }
.cl-list { background: #fff; border: 1px solid #E3E7F5; border-radius: 16px; margin-bottom: 12px; overflow: hidden; }
.cl-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; min-height: 58px; color: var(--ink); text-decoration: none; position: relative; width: 100%; background: transparent; border: 0; font: inherit; text-align: left; border-radius: 0; box-shadow: none; }
.cl-row + .cl-row::before, .cl-row + label.cl-row::before { content: ""; position: absolute; top: 0; left: 70px; right: 14px; border-top: 1px solid #E8EBF6; }
.cl-row.head { padding: 14px; }
.cl-row.danger span { color: #C92A2A; font-weight: 600; }
.cl-row.muted .cl-txt span { color: #6B7391; }
.cl-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cl-txt > span { font-size: 16px; }
.cl-txt small { color: #8C93AD; font-size: 13px; }
.cl-txt b { font-weight: 600; font-size: 16px; }
.cl-ico { flex: 0 0 40px; height: 40px; border-radius: 10px; background: #EEF1FF; color: #3A3FD9; display: grid; place-items: center; }
.cl-ico svg { width: 22px; height: 22px; }
.cl-chev { color: #6B7391; font-size: 26px; line-height: 1; }
.cl-plus { color: #6B7391; font-size: 26px; font-weight: 300; line-height: 1; }
.cl-badge { background: #C92A2A; color: #fff; border-radius: 999px; padding: 2px 8px; font-size: 13px; font-weight: 800; }
.cl-av { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 10px; background: #EEF1FF; color: #3A3FD9; display: grid; place-items: center; font-weight: 800; font-size: 15px; overflow: hidden; }
.cl-av img { width: 100%; height: 100%; object-fit: cover; }
.cl-av.big { flex-basis: 56px; width: 56px; height: 56px; border-radius: 14px; font-size: 20px; }
.cl-avwrap { position: relative; cursor: pointer; }
.cl-avplus { position: absolute; right: -6px; bottom: -6px; width: 22px; height: 22px; border-radius: 50%; background: #3A3FD9; color: #fff; display: grid; place-items: center; font-weight: 800; border: 2px solid #fff; font-size: 14px; }
.cl-roundsm { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid #E3E7F5; display: grid; place-items: center; color: var(--ink); }
.cl-roundsm svg { width: 22px; height: 22px; }
.cl-dot { flex: 0 0 12px; height: 12px; border-radius: 50%; margin: 0 14px; }
.cl-lock { font-size: 13px; }
.cl-today { font-size: 12px; font-weight: 800; background: color-mix(in srgb, var(--poste) 18%, white); color: var(--ink); border-radius: 999px; padding: 3px 8px; white-space: nowrap; }
.cl-search { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #E3E7F5; border-radius: 14px; padding: 0 12px; margin: 4px 0 12px; }
.cl-search svg { width: 20px; height: 20px; color: #8C93AD; }
.cl-search input { border: 0; background: transparent; padding: 12px 0; font-size: 16px; box-shadow: none; outline: none; }
.cl-add { display: block; text-align: center; margin-bottom: 12px; text-decoration: none; padding: 12px; border-radius: 14px; }
.cl-cards { display: flex; flex-direction: column; gap: 10px; }
.cl-card { display: flex; justify-content: space-between; align-items: center; background: #fff; border: 1px solid #E3E7F5; border-radius: 16px; padding: 16px; color: var(--ink); text-decoration: none; font-size: 16px; }
.cl-card b { text-transform: capitalize; }
.cl-val { font-weight: 700; font-variant-numeric: tabular-nums; }
.cl-h3 { margin: 6px 0 8px; }
.cl-form { display: flex; flex-direction: column; gap: 4px; }
.cl-row.pick { cursor: pointer; }
.cl-row.pick select, .cl-row.pick input[type=date] { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; font-size: 16px; }
.cl-lab { display: flex; flex-direction: column; gap: 6px; color: #6B7391; font-size: 14px; margin: 6px 2px 10px; }
.cl-lab textarea, .cl-lab input, .cl-lab select { background: #fff; border: 1px solid #E3E7F5; border-radius: 14px; padding: 12px; font-size: 16px; color: var(--ink); }
.cl-page.full { padding-bottom: 90px; }
.cl-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 7; background: #fff; border-top: 1px solid #E3E7F5; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
.cl-cta .primary { width: 100%; min-height: 52px; border-radius: 999px; font-size: 17px; max-width: 610px; display: block; margin: 0 auto; }
body.cl:has(.cl-cta) .tabbar { display: none !important; }
body.cl:has(.cl-cta) { padding-bottom: 90px; }
.cl-row.tog .switch { flex: 0 0 auto; }
input.switch { appearance: none; -webkit-appearance: none; width: 52px; height: 32px; min-height: 32px; border-radius: 999px; background: #D5DAEA; position: relative; cursor: pointer; transition: background .2s; padding: 0; border: 0; }
input.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
input.switch:checked { background: #3A3FD9; }
input.switch:checked::after { transform: translateX(20px); }
.cl-cal { flex: 0 0 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; }
.cl-cal.apple { background: #fff; border: 1px solid #E3E7F5; }
.cl-cal.google { background: #E8F0FE; color: #1A73E8; }
.cl-or { display: flex; align-items: center; gap: 10px; color: #8C93AD; margin: 6px 14px; font-size: 13px; }
.cl-or::before, .cl-or::after { content: ""; flex: 1; border-top: 1px solid #E8EBF6; }
.cl-small { font-size: 13px; color: #6B7391; margin: 6px 14px; }
.cl-copy { display: flex; gap: 8px; padding: 0 14px 8px; }
.cl-copy input { flex: 1; font-size: 13px; background: #F6F7FC; border-radius: 12px; }
#cl-rotate { margin: 0 14px 12px; font-size: 13px; }
.cl-toast { position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: #0F1535; color: #fff; padding: 12px 18px; border-radius: 999px; z-index: 90; font-weight: 600; max-width: 90vw; text-align: center; }
.cl-toast.bad { background: #C92A2A; }
@media (min-width: 801px) { body.cl .cl-cta { position: sticky; } }

/* ---- Bouton de pointage rond (power) ---- */
.pwr-wrap { display: flex; flex-direction: column; align-items: center; margin: 22px 0 10px; }
.pwr { --c: #3A3FD9; --c2: #14B8A6; position: relative; width: 200px; height: 200px; min-height: 200px; border-radius: 50%; padding: 0; border: 0; cursor: pointer;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--c2) 70%, white) 0%, var(--c) 70%);
  color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  box-shadow: 0 14px 34px color-mix(in srgb, var(--c) 45%, transparent), inset 0 -6px 14px rgba(0,0,0,.18), inset 0 6px 12px rgba(255,255,255,.25);
  transition: transform .15s ease, box-shadow .2s ease; -webkit-tap-highlight-color: transparent; }
.pwr-ring { position: absolute; inset: -10px; border-radius: 50%; border: 4px solid color-mix(in srgb, var(--c) 30%, transparent); pointer-events: none; }
.pwr-icon svg { width: 64px; height: 64px; display: block; }
.pwr-label { font-size: 20px; font-weight: 800; letter-spacing: .01em; }
.pwr-time { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; opacity: .95; }
.pwr.on { --c: #12935A; --c2: #34D399; }
.pwr.on .pwr-ring { border-color: #22C55E; animation: pwr-pulse 2.4s ease-out infinite; }
.pwr.paused { --c: #B7791F; --c2: #F6C453; }
.pwr.blocked { --c: #9AA1B5; --c2: #C6CBD8; cursor: not-allowed; box-shadow: inset 0 -6px 14px rgba(0,0,0,.1); }
.pwr.blocked .pwr-ring { border-color: #D5DAEA; }
.pwr:not(.blocked):active, .pwr.pressed { transform: scale(.94); }
.pwr.done { --c: #12935A; --c2: #34D399; animation: pwr-pop .5s ease; }
.pwr.done .pwr-ring { border-color: #22C55E; animation: pwr-burst .9s ease-out forwards; }
.pwr-sub { text-align: center; color: #4E5878; margin: 14px 10px 0; max-width: 320px; }
.pwr-actions { display: flex; justify-content: center; gap: 10px; margin: 6px 0 12px; }
.pwr-actions .ghost { min-width: 140px; border-radius: 999px; }
@keyframes pwr-pulse { 0% { transform: scale(1); opacity: 1; } 70% { transform: scale(1.12); opacity: 0; } 100% { opacity: 0; } }
@keyframes pwr-pop { 0% { transform: scale(.94); } 50% { transform: scale(1.06); } 100% { transform: scale(1); } }
@keyframes pwr-burst { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.35); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pwr, .pwr-ring { animation: none !important; transition: none; } }

/* Rôles : le responsable ne voit pas les réglages communs (le serveur refuse aussi). */
body.is-manager #pl-display, body.is-manager [data-teamadd], body.is-manager [data-teamorder], body.is-manager .admin-only { display: none !important; }
.tchip.mgr { background: #E6F4F1; color: #0E7C86; }
.checks { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.checks label { display: flex; flex-direction: row; align-items: center; gap: 8px; font-weight: 500; margin: 0; }
.checks input[type=checkbox] { width: 20px; height: 20px; min-height: 0; margin: 0; flex: none; }

/* ================= v12 : barre du haut, menu du bas, finitions (style app iOS) ================= */
:root { --brand: #3A3FD9; --brand-2: #14B8A6; --brand-soft: #ECEEFF; --teal-soft: #E3F7F4; --hair: rgba(15, 21, 53, .08); --card-shadow: 0 1px 2px rgba(15,21,53,.04), 0 6px 18px rgba(15,21,53,.05); }
body.app { background: #F5F6FC; }

/* Barre du haut */
.appbar { display: none; }
body.cl .appbar { display: block; }
@media (max-width: 800px) { body.app .appbar { display: block; } }
.appbar {
  position: sticky; top: 0; z-index: 25;
  background: rgba(245, 246, 252, .88); -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--hair); padding-top: env(safe-area-inset-top);
}
.appbar-in { max-width: 980px; margin: 0 auto; min-height: 56px; padding: 6px 12px; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 8px; }
.appbar h1 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.01em; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar.root .appbar-in { grid-template-columns: 34px 1fr 44px; }
.appbar.root h1 { text-align: left; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.appbar-logo { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #fff; box-shadow: var(--card-shadow); }
.appbar-logo img { width: 24px; height: 24px; display: block; }
.appbar-back { width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--brand); border: 1px solid var(--hair); box-shadow: 0 2px 8px rgba(15,21,53,.06); }
.appbar-back:active { transform: scale(.92); background: var(--brand-soft); }
.appbar-side { display: flex; justify-content: flex-end; }
body.cl .cl-top { display: none; }
@media (max-width: 800px) {
  /* le titre est dans la barre : pas de doublon dans la page */
  body.has-appbar #view > h2:first-child, body.has-appbar #view > .headrow > h2 { display: none; }
  body.has-appbar #view > .headrow { justify-content: flex-end; }
  body.app main { padding-top: 12px; }
}

/* Menu du bas */
@media (max-width: 800px) {
  body.app { padding-bottom: calc(104px + env(safe-area-inset-bottom)); }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; align-items: stretch; justify-content: space-around;
    padding: 6px 4px calc(4px + env(safe-area-inset-bottom)); background: transparent; border: 0;
    filter: drop-shadow(0 -1px 0 rgba(15,21,53,.07)) drop-shadow(0 -8px 18px rgba(15,21,53,.06));
  }
  .tabbar::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #fff; }
  .tabbar a {
    flex: 1 1 0; min-width: 0; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    color: #6B7391; text-decoration: none; font-size: 10.5px; font-weight: 600; letter-spacing: .01em; -webkit-tap-highlight-color: transparent; border-radius: 14px;
  }
  .tabbar .ti { display: grid; place-items: center; width: 54px; height: 30px; border-radius: 999px; transition: background .2s, transform .15s; }
  .tabbar .ti svg { width: 23px; height: 23px; }
  .tabbar .tl { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar a.on { color: var(--brand); font-weight: 700; }
  .tabbar a.on .ti { background: var(--brand-soft); }
  .tabbar a.on .ti svg { stroke-width: 2.2; }
  .tabbar a:active .ti { transform: scale(.9); }
  .tabbar a.clock { flex: 0 0 78px; justify-content: flex-end; color: #4E5878; }
  .tabbar a.clock .ti {
    width: 66px; height: 66px; margin-top: -32px; border-radius: 50%; color: #fff; border: 4px solid #fff;
    background: linear-gradient(150deg, #4A50EE 0%, var(--brand) 45%, var(--brand-2) 130%);
    box-shadow: 0 10px 22px rgba(58,63,217,.35), inset 0 1px 0 rgba(255,255,255,.3);
  }
  .tabbar a.clock .ti svg { width: 28px; height: 28px; stroke-width: 2.4; }
  .tabbar a.clock.on { color: var(--brand); }
  .tabbar a.clock.on .ti { background: linear-gradient(150deg, var(--brand), var(--brand-2)); box-shadow: 0 0 0 3px rgba(20,184,166,.35), 0 10px 22px rgba(58,63,217,.35); }
  .tabbar a.clock:active .ti { transform: scale(.93); }
  .fab { bottom: calc(96px + env(safe-area-inset-bottom)); }
}
@media (max-width: 340px) {
  .tabbar .ti { width: 44px; }
  .tabbar a { font-size: 9.5px; }
  .tabbar a.clock { flex-basis: 70px; }
  .appbar.root h1 { font-size: 20px; }
}

/* Cartes et espacements */
body.app .card, body.app .ucard, body.app .cl-list, body.app .setcard, body.app .hcard, body.app .cl-card, body.app .stat3 > *, body.app .teamhead {
  border: 1px solid #E6E9F5; border-radius: 18px; box-shadow: var(--card-shadow); background: #fff;
}
body.app #view.card { box-shadow: none; }
body.app .ucard { padding: 14px 16px; margin-bottom: 10px; border-left: 5px solid var(--poste, #C9D0EA); }
body.app .cl-sec, body.app #view h3 { font-size: 12.5px; font-weight: 800; color: #6B7391; text-transform: uppercase; letter-spacing: .06em; margin: 22px 4px 8px; }
body.app #view h2 { font-size: 19px; font-weight: 800; letter-spacing: -.01em; margin: 24px 2px 10px; }
body.app .modal h2, body.app .modal h3 { text-transform: none; letter-spacing: 0; }
body.app button.primary, body.app .btn.primary { background: var(--brand); box-shadow: 0 6px 14px rgba(58,63,217,.22); }
body.app button.primary:active { transform: scale(.98); }
body.app button.ghost, body.app .btn.ghost { background: var(--brand-soft); color: var(--brand); }
body.app input:not([type=checkbox]):not([type=radio]):not(.switch), body.app select, body.app textarea { border-color: #DDE1F0; border-radius: 12px; }
body.app input:focus, body.app select:focus, body.app textarea:focus { outline: 2px solid rgba(58,63,217,.35); outline-offset: 1px; }
body.app .okbox { background: var(--teal-soft); color: #0B6B61; border: 0; border-radius: 16px; }
body.app .setnav a { background: #fff; border: 1px solid #E6E9F5; color: var(--brand); }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); }
.savedmsg { display: inline-block; margin-left: 10px; color: #0B6B61; background: var(--teal-soft); padding: 6px 10px; border-radius: 999px; font-size: 13px; }

@media (max-width: 480px) {
  /* cartes avec boutons : les boutons passent dessous, en pleine largeur */
  body.app .ucard:has(.ucard-act button, .ucard-act a) { flex-wrap: wrap; }
  body.app .ucard:has(.ucard-act button, .ucard-act a) .ucard-act { width: 100%; display: flex; gap: 8px; }
  body.app .ucard:has(.ucard-act button, .ucard-act a) .ucard-act > * { flex: 1; }
}

/* v13 : Informations légales */
.legal-hero { text-align: center; padding: 18px 0 6px; }
.legal-hero img { width: 180px; height: auto; }
.legal-hero p { color: #6B7391; margin: 6px 0 0; font-size: 14px; }
.legal-box { padding: 4px 16px; }
.legal-box p { margin: 12px 0; line-height: 1.5; font-size: 15px; }
.legal-box dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0 0 14px; font-size: 15px; }
.legal-box dt { color: #6B7391; }
.legal-box dd { margin: 0; font-weight: 600; }
.legal-foot { text-align: center; color: #8C93AD; font-size: 12.5px; margin: 18px 0 8px; }
.legal-link { text-align: center; font-size: 13px; color: #8C93AD; margin: 18px 0 6px; }
.legal-link a { color: #6B7391; text-decoration: underline; text-underline-offset: 3px; }
body.legal main { max-width: 640px; }
body.legal.public { padding-bottom: 24px; }

/* v14 : connexion neutre (sans bandeau, logo unique centré) */
body.auth { min-height: 100vh; min-height: 100dvh; background: radial-gradient(120% 60% at 50% 0%, #E4E7FF 0%, #F4F5FB 60%); }
.auth-main {
  max-width: 420px; margin: 0 auto; min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(28px + env(safe-area-inset-top)) 18px calc(20px + env(safe-area-inset-bottom));
  box-sizing: border-box;
}
.auth-brand { display: flex; justify-content: center; margin: 0 0 26px; }
.auth-brand .logo-lockup { width: min(220px, 64vw); }
.auth-card { border: 0; border-radius: 22px; padding: 24px 20px; box-shadow: 0 10px 30px rgba(31, 38, 120, 0.10), 0 1px 3px rgba(31, 38, 120, 0.06); }
.auth-card h1 { margin: 0; font-size: 26px; }
.auth-card > .muted { margin-top: -4px; }
.auth-main .legal-link { margin-top: 22px; }
.auth-main .install-hint { margin: 0 0 18px; }

/* v15 : contrôle qualité */
header.top a, header.top button.link { display: inline-flex; align-items: center; justify-content: center; line-height: 1.2; min-height: 40px; }
header.top nav a.on { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .45); font-weight: 700; }
@media (min-width: 801px) {
  .appbar-logo { display: none; }
  .appbar.root .appbar-in { grid-template-columns: 1fr 44px; }
}
.weekstrip { gap: 2px; }
.weekstrip button { min-width: 0; }
.modal-head .link { text-decoration: none; min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; color: var(--ink); border-radius: 999px; }
.modal-head .link:hover { background: var(--brand-soft, #EEF1FF); }
[data-star] { min-width: 32px; min-height: 32px; }
@media (max-width: 800px) {
  .pl-favpick { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding-bottom: 4px; scrollbar-width: none; }
  .pl-favpick button { flex: 0 0 auto; white-space: nowrap; }
}
.auth-forgot { display: block; text-align: center; margin-top: 4px; padding: 10px; color: var(--brand, #3A3FD9); font-weight: 600; text-decoration: none; }
.auth-forgot:hover { text-decoration: underline; }
.auth-card .banner.ok { background: #E6F7F4; color: #0E5E57; border-radius: 12px; padding: 12px 14px; }
.btnlink { display: flex; align-items: center; justify-content: center; text-decoration: none; text-align: center; }
.mail-log { font-size: 13px; }
.mail-log li { margin: 4px 0; }
header.top > .brand { flex: 0 0 auto; display: block; min-height: 0; padding: 0; border: 0; }
header.top nav { justify-content: flex-end; }
.auth-card [hidden], .auth-main [hidden] { display: none !important; }

/* v16 — Dossier : documents */
.cl-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cl-tag { display: inline-flex; align-items: center; border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 700; background: #EEF0F8; color: #4A5272; white-space: nowrap; }
.cl-tag.warn { background: #FFF1D6; color: #8A5A00; }
.cl-tag.bad { background: #FDE2E2; color: #A61E1E; }
.cl-tag.share { background: #E3F4EA; color: #1E7A45; }
.cl-row .cl-tag + .cl-count, .cl-row .cl-tag { margin-right: 6px; }
.cl-count { color: #6B7391; font-weight: 700; font-size: 15px; margin-right: 4px; }
.cl-row.doc .cl-txt b { overflow-wrap: anywhere; }
.cl-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cl-two .cl-lab { margin-left: 2px; margin-right: 2px; min-width: 0; }
.cl-two .cl-lab input { min-width: 0; width: 100%; box-sizing: border-box; }
@media (max-width: 360px) { .cl-two { grid-template-columns: 1fr; gap: 0; } }
.cl-row.tog .cl-txt small { display: block; color: #6B7391; font-size: 13px; margin-top: 2px; }
