/* =====================================================================
   BUREAU — skin BRUTALIST POP (style maison 7G, cf. Suivi Affaires)
   Crème + noir + jaune vif, bordures franches, hard shadows (blur 0),
   coins carrés, titres Syne majuscules, corps Space Grotesk.
   Univers : 7G = bleu ciel · Hub Lemaire = jaune · Perso = émeraude.
   ===================================================================== */
:root {
  --bg: #FBF6E9;
  --bg2: #FFFFFF;           /* surfaces / cartes */
  --bg3: #F1EAD6;           /* hover */
  --ink: #111111;
  --muted: #555555;
  --faint: #8A8578;
  --pop: #FFE100;
  --line: #111111;
  --line2: #111111;
  --accent: #111111;
  --danger: #FF3B30;
  --ok: #00C853;
  --u-7g: #0ea5e9;
  --u-7g-bg: #DCF1FC;
  --u-hub: #E3B300;
  --u-hub-bg: #FFF3B8;
  --u-perso: #10b981;
  --u-perso-bg: #D9F4EA;
  --shadow: 3px 3px 0 var(--ink);
  --shadow-lg: 6px 6px 0 var(--ink);
  --r: 0px;
  --sidebar-w: 240px;
  --pad: 1rem;
  --font-title: 'Syne', 'Arial Black', sans-serif;
  --font-body: 'Space Grotesk', 'Segoe UI', sans-serif;
}
[data-theme="dark"] {
  --bg: #161616;
  --bg2: #232323;
  --bg3: #2E2C24;
  --ink: #FBF6E9;
  --muted: #A9A398;
  --faint: #7A766B;
  --u-7g-bg: #12293a;
  --u-hub-bg: #33290f;
  --u-perso-bg: #0e2e24;
}
[data-density="compact"] { --pad: 0.55rem; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  font-family: var(--font-body);
  background: var(--bg); color: var(--ink);
  height: 100%; font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
/* quadrillage papier technique */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(color-mix(in srgb, var(--ink) 5%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--ink) 5%, transparent) 1px, transparent 1px);
  background-size: 28px 28px;
}
#app, #login-view, #drawer, #palette, #note-modal, #review-modal, #help-modal, #focus-overlay, #toast, #plan-menu { position: relative; z-index: 1; }
.hidden { display: none !important; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
::placeholder { color: var(--faint); }
kbd {
  background: var(--pop); color: #111; border: 2px solid var(--ink);
  padding: 0 5px; font-size: .78em; font-weight: 700; box-shadow: 2px 2px 0 var(--ink);
}
code { background: var(--bg3); border: 1px solid var(--ink); padding: 1px 5px; font-size: .85em; }

/* boutons pressables génériques */
.pressy, #btn-quick-add, #login-form button, .crm-actions button, .set-row button, .set-btn,
.week-nav button, .cal-nav button, .crm-head button, .notes-toolbar button, .drawer-actions button,
.focus-controls button, .mini-actions button, .nm-toolbar button {
  transition: transform .1s ease, box-shadow .1s ease;
}

/* ========== LOGIN ========== */
#login-view {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: var(--bg); z-index: 100; padding: 1rem;
}
#login-view::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(color-mix(in srgb, var(--ink) 5%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--ink) 5%, transparent) 1px, transparent 1px);
  background-size: 28px 28px;
}
.login-card {
  background: var(--bg2); border: 3px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink); padding: 2.4rem 2.2rem; width: 100%; max-width: 400px;
  text-align: center; animation: pop .25s ease; position: relative;
}
.login-logo {
  font-size: 2rem; width: 72px; height: 72px; margin: 0 auto .8rem;
  display: flex; align-items: center; justify-content: center;
  background: var(--pop); color: #111; border: 3px solid var(--ink); box-shadow: var(--shadow);
  font-weight: 800;
}
.login-card h1 {
  font-family: var(--font-title); font-weight: 800; text-transform: uppercase;
  font-size: 1.9rem; letter-spacing: -.02em;
}
.login-sub { color: var(--muted); font-size: .8rem; margin: .3rem 0 1.4rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 600; }
#login-form { display: flex; flex-direction: column; gap: .8rem; }
#login-form input {
  padding: .8rem .9rem; border: 2px solid var(--ink);
  background: var(--bg); outline: none;
}
#login-form input:focus { box-shadow: inset 0 0 0 2px var(--pop); }
#login-form button {
  padding: .85rem; background: var(--pop); color: #111; border: 2px solid var(--ink);
  font-family: var(--font-title); font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  box-shadow: var(--shadow);
}
#login-form button:hover { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--ink); }
#login-form button:active { transform: translate(2px,2px); box-shadow: 0 0 0 var(--ink); }
#login-error { color: var(--danger); font-size: .85rem; min-height: 1rem; font-weight: 700; }
.login-foot { color: var(--faint); font-size: .72rem; margin-top: 1.2rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }

/* ========== LAYOUT ========== */
#app { display: flex; height: 100dvh; overflow: hidden; }
#sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  background: var(--bg2); border-right: 3px solid var(--ink);
  display: flex; flex-direction: column; padding: .8rem .6rem;
  transition: margin-left .22s ease;
  z-index: 40;
}
#app.sb-collapsed #sidebar { margin-left: calc(-1 * var(--sidebar-w)); }
.sb-brand { display: flex; align-items: center; gap: .5rem; padding: .3rem .5rem .8rem; }
.sb-logo {
  background: var(--pop); color: #111; border: 2px solid var(--ink);
  width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; box-shadow: 2px 2px 0 var(--ink);
}
.sb-name { font-family: var(--font-title); font-weight: 800; text-transform: uppercase; font-size: 1.05rem; flex: 1; }
#sb-collapse { color: var(--ink); border: 2px solid var(--ink); width: 26px; height: 26px; font-weight: 700; background: var(--bg2); }
#sb-collapse:hover { background: var(--pop); color: #111; }

.sb-universes { display: flex; gap: .35rem; padding: 0 .3rem .9rem; flex-wrap: wrap; }
.uchip {
  display: inline-flex; align-items: center; gap: .35rem;
  border: 2px solid var(--ink);
  padding: .2rem .55rem; font-size: .72rem; font-weight: 700; color: var(--ink);
  text-transform: uppercase; letter-spacing: .03em;
  background: var(--bg2); box-shadow: 2px 2px 0 var(--ink);
  transition: transform .1s, box-shadow .1s, background .1s;
}
.uchip:hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--ink); }
.uchip:active { transform: translate(1px,1px); box-shadow: 0 0 0 var(--ink); }
.uchip.active { background: var(--ink); color: var(--bg2); }
.udot { width: 9px; height: 9px; border: 1px solid var(--ink); }
.uchip.u-7g .udot { background: var(--u-7g); }
.uchip.u-hub .udot { background: var(--u-hub); }
.uchip.u-perso .udot { background: var(--u-perso); }
.uchip.u-7g.active { background: var(--u-7g); color: #fff; }
.uchip.u-hub.active { background: var(--pop); color: #111; }
.uchip.u-perso.active { background: var(--u-perso); color: #fff; }
.uchip.all.active { background: var(--pop); color: #111; }
.uchip.active .udot { background: currentColor; }

.sb-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; overflow-y: auto; }
.sb-nav button, .sb-foot > button {
  display: flex; align-items: center; gap: .6rem; width: 100%;
  padding: .45rem .55rem; font-size: .85rem; font-weight: 700;
  color: var(--ink); text-align: left; border: 2px solid transparent;
  text-transform: uppercase; letter-spacing: .02em;
  transition: background .1s, border-color .1s, transform .1s;
}
.sb-nav button:hover, .sb-foot > button:hover { border-color: var(--ink); background: var(--bg3); }
.sb-nav button.active {
  background: var(--pop); color: #111; border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink);
}
.nv-ic { width: 20px; text-align: center; font-size: .95rem; }
.nv-badge {
  margin-left: auto; font-size: .68rem; font-weight: 800; color: var(--ink);
  background: var(--bg2); border: 2px solid var(--ink); padding: 0 6px; min-width: 20px; text-align: center;
}
.nv-badge:empty { display: none; }
.nv-badge.pop { background: var(--ink); color: var(--pop); }
.sb-nav button.active .nv-badge { background: #111; color: var(--pop); border-color: #111; }
.sb-foot { border-top: 3px solid var(--ink); padding-top: .6rem; display: flex; flex-direction: column; gap: 4px; }
.sb-user {
  display: flex; align-items: center; gap: .4rem; padding: .5rem .55rem .1rem;
  color: var(--muted); font-size: .8rem; font-weight: 700;
}
.sb-user span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-user button { border: 2px solid var(--ink); padding: .2rem .4rem; background: var(--bg2); box-shadow: 2px 2px 0 var(--ink); }
.sb-user button:hover { background: var(--pop); color: #111; }
.sb-user button:active { transform: translate(1px,1px); box-shadow: 0 0 0 var(--ink); }

/* ========== MAIN / TOPBAR ========== */
#main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
#topbar {
  display: flex; align-items: center; gap: .7rem;
  padding: .7rem 1.2rem; border-bottom: 3px solid var(--ink);
  background: var(--bg);
}
#btn-burger { display: none; font-size: 1.1rem; border: 2px solid var(--ink); padding: .15rem .5rem; background: var(--bg2); box-shadow: 2px 2px 0 var(--ink); }
#view-title {
  font-family: var(--font-title); font-size: 1.15rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: -.01em; white-space: nowrap;
  display: flex; align-items: center; gap: .5rem;
}
#view-title::before { content: ""; width: 13px; height: 13px; background: var(--pop); border: 2px solid var(--ink); }
.top-search { flex: 1; max-width: 420px; margin-left: auto; }
.top-search input {
  width: 100%; padding: .5rem .8rem; border: 2px solid var(--ink);
  background: var(--bg2); outline: none; font-size: .88rem; font-weight: 500;
  box-shadow: 2px 2px 0 var(--ink);
}
.top-search input:focus { box-shadow: 2px 2px 0 var(--ink), inset 0 -3px 0 var(--pop); }
.top-search input::placeholder { text-transform: uppercase; font-size: .78rem; letter-spacing: .05em; font-weight: 600; }
#btn-palette {
  border: 2px solid var(--ink); padding: .45rem .6rem; background: var(--bg2);
  color: var(--ink); font-size: .8rem; font-weight: 800; box-shadow: 2px 2px 0 var(--ink);
}
#btn-palette:hover { background: var(--pop); color: #111; }
#btn-quick-add {
  background: var(--pop); color: #111; border: 2px solid var(--ink);
  padding: .5rem .95rem; font-family: var(--font-title); font-weight: 800; font-size: .85rem;
  text-transform: uppercase; white-space: nowrap; box-shadow: var(--shadow);
}
#btn-quick-add:hover { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--ink); }
#btn-quick-add:active { transform: translate(2px,2px); box-shadow: 0 0 0 var(--ink); }

.quick-add-bar {
  padding: .7rem 1.2rem; border-bottom: 3px solid var(--ink); background: var(--pop);
  display: flex; align-items: center; gap: .8rem;
  animation: slideDown .18s ease;
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
#quick-add-input {
  flex: 1; padding: .65rem .9rem; border: 2px solid #111;
  background: #fff; color: #111; outline: none; box-shadow: 3px 3px 0 #111;
}
.qa-hint { color: #111; font-size: .72rem; white-space: nowrap; font-weight: 700; text-transform: uppercase; }

#view { flex: 1; overflow-y: auto; padding: 1.2rem 1.4rem 3rem; scroll-behavior: smooth; }

/* ========== GÉNÉRIQUE ========== */
@keyframes pop { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.card {
  background: var(--bg2); border: 3px solid var(--ink);
  box-shadow: var(--shadow-lg);
}
.section-title {
  font-family: var(--font-title); font-size: .95rem; font-weight: 800; text-transform: uppercase;
  color: var(--ink); margin: 1.5rem 0 .7rem; display: flex; align-items: center; gap: .55rem;
}
.section-title::before { content: ""; width: 12px; height: 12px; background: var(--pop); border: 2px solid var(--ink); flex: 0 0 auto; }
.section-title::after { content: ""; flex: 1; height: 2px; background: var(--ink); }
.section-title:first-child { margin-top: 0; }
.section-title .count { color: var(--muted); font-weight: 700; font-family: var(--font-body); }
.empty {
  color: var(--muted); font-size: .88rem; padding: 1.2rem; font-weight: 500;
  border: 2px dashed var(--ink); text-align: center;
  animation: fadeUp .2s ease; background: var(--bg2);
}

/* ========== CARTE TÂCHE ========== */
.task {
  display: flex; align-items: flex-start; gap: .6rem;
  background: var(--bg2); border: 2px solid var(--ink);
  padding: var(--pad); margin-bottom: .55rem;
  box-shadow: var(--shadow);
  transition: transform .1s ease, box-shadow .1s ease, opacity .2s;
  animation: fadeUp .18s ease backwards;
  cursor: grab; position: relative;
}
.task:hover { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--ink); }
.task:active { cursor: grabbing; }
.task.dragging { opacity: .4; }
.task.done-task { opacity: .6; box-shadow: 2px 2px 0 var(--ink); }
.task.done-task .t-title { text-decoration: line-through; color: var(--muted); }
.task.overdue { border-left: 6px solid var(--danger); }
.task.pinned-task { border-left: 6px solid var(--pop); }
.t-check {
  width: 22px; height: 22px; flex: 0 0 22px; margin-top: 1px;
  border: 2px solid var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 800; color: transparent; transition: all .12s; cursor: pointer;
  background: var(--bg);
}
.t-check:hover { background: var(--pop); color: #111; }
.task[data-status="doing"] .t-check { background: var(--u-7g); }
.task[data-status="done"] .t-check { background: var(--ok); border-color: var(--ink); color: #fff; }
.t-main { flex: 1; min-width: 0; }
.t-title { font-weight: 700; font-size: .92rem; line-height: 1.35; word-break: break-word; }
.t-title[contenteditable="true"] { outline: 2px dashed var(--ink); background: var(--pop); color: #111; padding: 0 3px; }
.t-chips { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .35rem; }
.chip {
  display: inline-flex; align-items: center; gap: .25rem;
  font-size: .66rem; font-weight: 700; color: var(--ink);
  background: var(--bg); border: 1.5px solid var(--ink); padding: 1px 6px;
  text-transform: uppercase; letter-spacing: .02em;
}
.chip.u-7g { background: var(--u-7g-bg); }
.chip.u-hub { background: var(--u-hub-bg); }
.chip.u-perso { background: var(--u-perso-bg); }
.chip.p1 { background: var(--danger); color: #fff; border-color: var(--ink); }
.chip.p3 { color: var(--muted); }
.chip.late { background: var(--danger); color: #fff; }
.chip.crm { background: var(--ink); color: var(--pop); }
.chip.doing-chip { background: var(--u-7g); color: #fff; }
.t-actions { display: flex; gap: .25rem; opacity: 0; transition: opacity .12s; }
.task:hover .t-actions, .task:focus-within .t-actions { opacity: 1; }
.t-actions button {
  width: 27px; height: 27px; border: 2px solid var(--ink); background: var(--bg2);
  color: var(--ink); font-size: .8rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 2px 2px 0 var(--ink);
}
.t-actions button:hover { background: var(--pop); color: #111; }
.t-actions button:active { transform: translate(1px,1px); box-shadow: 0 0 0 var(--ink); }

/* ========== AUJOURD'HUI ========== */
.greeting { margin-bottom: 1.1rem; animation: fadeUp .2s ease; }
.greeting h3 {
  font-family: var(--font-title); font-size: 1.7rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: -.02em;
  display: inline-block; background: var(--pop); color: #111;
  border: 3px solid var(--ink); box-shadow: var(--shadow); padding: .15rem .7rem;
}
.greeting p { color: var(--muted); font-size: .9rem; margin-top: .55rem; font-weight: 600; }
.today-progress {
  height: 12px; background: var(--bg2); border: 2px solid var(--ink); overflow: hidden; margin: .7rem 0 .3rem;
}
.today-progress > div { height: 100%; background: var(--ok); border-right: 2px solid var(--ink); transition: width .4s ease; }
.today-cols { display: grid; grid-template-columns: 2fr 1fr; gap: 1.4rem; align-items: start; }
@media (max-width: 900px) { .today-cols { grid-template-columns: 1fr; } }
.objectives { padding: var(--pad); }
.objectives h4 { font-family: var(--font-title); font-size: .82rem; text-transform: uppercase; margin-bottom: .5rem; }
.objectives .obj { display: flex; gap: .5rem; align-items: center; padding: .32rem 0; font-size: .88rem; font-weight: 600; }
.objectives .obj input[type=checkbox] { accent-color: var(--ok); width: 16px; height: 16px; }
.objectives .obj.done-obj span { text-decoration: line-through; color: var(--muted); }
.obj-add input {
  width: 100%; border: 0; border-top: 2px dashed var(--ink); background: none; outline: none;
  padding: .5rem 0 0; font-size: .85rem; margin-top: .35rem; font-weight: 500;
}
.suggest { padding: var(--pad); margin-top: 1rem; background: var(--u-7g-bg); }
.suggest h4 { font-family: var(--font-title); font-size: .82rem; text-transform: uppercase; margin-bottom: .5rem; }
.suggest .sg { display: flex; align-items: center; gap: .5rem; padding: .28rem 0; font-size: .86rem; font-weight: 500; }
.suggest .sg button {
  margin-left: auto; font-size: .7rem; font-weight: 800; color: #111; text-transform: uppercase;
  border: 2px solid var(--ink); background: var(--pop); padding: 2px 8px; box-shadow: 2px 2px 0 var(--ink);
}
.suggest .sg button:hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--ink); }
.suggest .sg button:active { transform: translate(1px,1px); box-shadow: 0 0 0 var(--ink); }
.mini-actions { display: flex; gap: .6rem; margin: .8rem 0 1.1rem; flex-wrap: wrap; }
.mini-actions button {
  font-size: .74rem; font-weight: 800; color: var(--ink); text-transform: uppercase;
  border: 2px solid var(--ink); background: var(--bg2); padding: .35rem .75rem;
  box-shadow: 2px 2px 0 var(--ink);
}
.mini-actions button:hover { background: var(--pop); color: #111; transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--ink); }
.mini-actions button:active { transform: translate(1px,1px); box-shadow: 0 0 0 var(--ink); }

/* ========== SEMAINE ========== */
.week-nav { display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; flex-wrap: wrap; }
.week-nav h3 { font-family: var(--font-title); font-size: 1rem; font-weight: 800; text-transform: uppercase; }
.week-nav button, .cal-nav button {
  border: 2px solid var(--ink); background: var(--bg2); padding: .28rem .65rem;
  font-size: .8rem; font-weight: 800; box-shadow: 2px 2px 0 var(--ink);
}
.week-nav button:hover, .cal-nav button:hover { background: var(--pop); color: #111; }
.week-nav button:active, .cal-nav button:active { transform: translate(1px,1px); box-shadow: 0 0 0 var(--ink); }
.week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: .6rem; min-height: 55vh; }
@media (max-width: 1100px) { .week-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 700px) { .week-grid { grid-template-columns: repeat(2, 1fr); } }
.day-col {
  background: var(--bg2); border: 2px solid var(--ink);
  padding: .5rem; display: flex; flex-direction: column; gap: .1rem; min-height: 140px;
  transition: background .12s;
}
.day-col.today-col { border-width: 3px; box-shadow: var(--shadow); background: var(--u-hub-bg); }
.day-col.dropover { background: var(--pop); border-style: dashed; }
.day-head { display: flex; align-items: baseline; gap: .35rem; padding: .1rem .2rem .45rem; border-bottom: 2px solid var(--ink); margin-bottom: .45rem; }
.day-head .dh-name { font-family: var(--font-title); font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.day-head .dh-num { font-family: var(--font-title); font-size: 1rem; font-weight: 800; }
.day-head .dh-load { margin-left: auto; font-size: .66rem; color: var(--muted); font-weight: 700; }
.day-col .task { padding: .5rem .55rem; margin-bottom: .4rem; box-shadow: 2px 2px 0 var(--ink); }
.day-col .task:hover { box-shadow: 4px 4px 0 var(--ink); }
.day-col .t-chips { margin-top: .2rem; }
.week-backlog { margin-top: 1.3rem; }

/* ========== CALENDRIER ========== */
.cal-nav { display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; }
.cal-nav h3 { font-family: var(--font-title); font-size: 1.05rem; font-weight: 800; text-transform: uppercase; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-dow { font-family: var(--font-title); font-size: .66rem; font-weight: 800; text-transform: uppercase; color: var(--muted); text-align: center; padding: .3rem 0; }
.cal-cell {
  min-height: 86px; background: var(--bg2); border: 2px solid var(--ink);
  padding: .3rem .4rem; cursor: pointer; transition: background .1s, transform .1s, box-shadow .1s;
  display: flex; flex-direction: column; gap: 2px;
}
.cal-cell:hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--ink); }
.cal-cell.other-month { opacity: .35; }
.cal-cell.today-cell { border-width: 3px; background: var(--u-hub-bg); box-shadow: var(--shadow); }
.cal-cell.selected { background: var(--pop); }
.cal-cell.selected .cal-num { color: #111; }
.cal-cell.dropover { background: var(--pop); border-style: dashed; }
.cal-num { font-family: var(--font-title); font-size: .78rem; font-weight: 800; color: var(--ink); }
.cal-task-line {
  font-size: .63rem; font-weight: 700; color: #111;
  border: 1px solid var(--ink); border-left: 4px solid var(--ink); padding: 0 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: var(--bg2);
}
.cal-task-line.u-7g { border-left-color: var(--u-7g); background: var(--u-7g-bg); }
.cal-task-line.u-hub { border-left-color: var(--u-hub); background: var(--u-hub-bg); }
.cal-task-line.u-perso { border-left-color: var(--u-perso); background: var(--u-perso-bg); }
[data-theme="dark"] .cal-task-line { color: var(--ink); }
.cal-task-line.done-line { text-decoration: line-through; opacity: .5; }
.cal-more { font-size: .62rem; color: var(--muted); font-weight: 800; }
.cal-day-panel { margin-top: 1rem; }

/* ========== BACKLOG ========== */
.backlog-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.1rem; align-items: start; }
.bl-group { padding: var(--pad); }
.bl-group-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .7rem; border-bottom: 2px solid var(--ink); padding-bottom: .45rem; }
.bl-group-head .udot { width: 12px; height: 12px; border: 2px solid var(--ink); }
.bl-group-head h4 { font-family: var(--font-title); font-size: .95rem; font-weight: 800; text-transform: uppercase; flex: 1; }
.bl-group-head .count { color: var(--muted); font-size: .8rem; font-weight: 800; }
.bl-add input {
  width: 100%; border: 0; border-top: 2px dashed var(--ink); background: none;
  outline: none; padding: .55rem 0 0; font-size: .85rem; margin-top: .3rem; font-weight: 500;
}
#backlog-dropzone {
  margin-bottom: 1rem; padding: .8rem; border: 3px dashed var(--ink);
  color: var(--muted); font-size: .78rem; text-align: center; font-weight: 800; text-transform: uppercase;
  background: var(--bg2);
}
#backlog-dropzone.dropover { background: var(--pop); color: #111; }

/* ========== ENTRANTES CRM ========== */
.crm-head { display: flex; align-items: center; gap: .7rem; margin-bottom: 1.1rem; flex-wrap: wrap; }
.crm-head p { color: var(--muted); font-size: .86rem; flex: 1; min-width: 200px; font-weight: 500; }
.crm-head p b { color: var(--ink); }
.crm-head button {
  border: 2px solid var(--ink); background: var(--bg2); padding: .35rem .7rem;
  font-size: .76rem; font-weight: 800; text-transform: uppercase; box-shadow: 2px 2px 0 var(--ink);
}
.crm-head button:hover { background: var(--pop); color: #111; }
.crm-card { padding: var(--pad); margin-bottom: .7rem; border-left: 7px solid var(--u-7g); animation: fadeUp .2s ease backwards; }
.crm-card.state-accepted { border-left-color: var(--ok); opacity: .7; }
.crm-card.state-dismissed { border-left-color: var(--muted); opacity: .55; }
.crm-top { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.crm-top h4 { font-family: var(--font-title); font-size: 1rem; font-weight: 800; text-transform: uppercase; flex: 1; }
.crm-desc { color: var(--ink); font-size: .86rem; margin-top: .4rem; white-space: pre-wrap; font-weight: 500; }
.crm-meta { color: var(--muted); font-size: .72rem; margin-top: .45rem; font-weight: 700; text-transform: uppercase; }
.crm-actions { display: flex; gap: .55rem; margin-top: .7rem; flex-wrap: wrap; }
.crm-actions button {
  font-size: .76rem; font-weight: 800; text-transform: uppercase; padding: .4rem .85rem;
  border: 2px solid var(--ink); background: var(--bg2); box-shadow: 2px 2px 0 var(--ink);
}
.crm-actions .acc { background: var(--pop); color: #111; }
.crm-actions button:hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--ink); }
.crm-actions button:active { transform: translate(1px,1px); box-shadow: 0 0 0 var(--ink); }

/* ========== NOTES ========== */
.notes-toolbar { display: flex; gap: .6rem; margin-bottom: 1.1rem; }
.notes-toolbar button {
  background: var(--pop); color: #111; border: 2px solid var(--ink); padding: .5rem .95rem;
  font-family: var(--font-title); font-weight: 800; font-size: .85rem; text-transform: uppercase;
  box-shadow: var(--shadow);
}
.notes-toolbar button:hover { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--ink); }
.notes-toolbar button:active { transform: translate(2px,2px); box-shadow: 0 0 0 var(--ink); }
.notes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: 1rem; }
.note-card {
  padding: .9rem; cursor: pointer; min-height: 120px; display: flex; flex-direction: column;
  border-top: 7px solid var(--ink);
  transition: transform .12s ease, box-shadow .12s ease; animation: fadeUp .2s ease backwards;
}
.note-card:hover { transform: translate(-2px,-2px); box-shadow: 8px 8px 0 var(--ink); }
.note-card.u-7g { border-top-color: var(--u-7g); }
.note-card.u-hub { border-top-color: var(--u-hub); }
.note-card.u-perso { border-top-color: var(--u-perso); }
.note-card h4 { font-family: var(--font-title); font-size: .92rem; font-weight: 800; text-transform: uppercase; margin-bottom: .4rem; display: flex; gap: .4rem; align-items: center; }
.note-card .nc-body { color: var(--muted); font-size: .8rem; line-height: 1.5; overflow: hidden; flex: 1; max-height: 110px; font-weight: 500; }
.note-card .nc-date { color: var(--faint); font-size: .68rem; margin-top: .55rem; font-weight: 700; text-transform: uppercase; }

/* ========== TERMINÉES ========== */
.done-day h4 { font-family: var(--font-title); font-size: .85rem; font-weight: 800; text-transform: uppercase; margin: 1.1rem 0 .5rem; color: var(--muted); }

/* ========== STATS ========== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.1rem; }
.stat-card { padding: 1.1rem; animation: fadeUp .2s ease backwards; }
.stat-card h4 { font-family: var(--font-title); font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: .7rem; }
.stat-big { font-family: var(--font-title); font-size: 2.2rem; font-weight: 800; letter-spacing: -.02em; }
.stat-sub { color: var(--muted); font-size: .8rem; margin-top: .25rem; font-weight: 600; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 90px; margin-top: .5rem; }
.bar { flex: 1; background: var(--pop); border: 2px solid var(--ink); border-bottom: 0; min-height: 4px; position: relative; transition: height .4s ease; }
.bar span { position: absolute; bottom: -18px; left: 0; right: 0; text-align: center; font-size: .6rem; color: var(--muted); font-weight: 800; }
.bar b { position: absolute; top: -17px; left: 0; right: 0; text-align: center; font-size: .68rem; color: var(--ink); }
.donut-wrap { display: flex; align-items: center; gap: 1rem; }
.donut { width: 110px; height: 110px; border-radius: 50%; flex: 0 0 110px; position: relative; border: 3px solid var(--ink); }
.donut::after { content: ""; position: absolute; inset: 24px; background: var(--bg2); border-radius: 50%; border: 3px solid var(--ink); }
.donut-legend { font-size: .8rem; display: flex; flex-direction: column; gap: .4rem; font-weight: 700; }
.donut-legend .udot { display: inline-block; margin-right: .4rem; border: 1px solid var(--ink); }
.heatmap { display: grid; grid-template-rows: repeat(7, 12px); grid-auto-flow: column; gap: 3px; margin-top: .6rem; }
.hm-cell { width: 12px; height: 12px; background: var(--bg); border: 1px solid var(--ink); }
.hm-cell.l1 { background: #b7e4c7; } .hm-cell.l2 { background: #4cc98a; } .hm-cell.l3 { background: #00C853; }
[data-theme="dark"] .hm-cell.l1 { background: #1d4230; } [data-theme="dark"] .hm-cell.l2 { background: #256d47; } [data-theme="dark"] .hm-cell.l3 { background: #2ea86a; }

/* ========== RÉGLAGES ========== */
.settings-wrap { max-width: 660px; display: flex; flex-direction: column; gap: 1.1rem; }
.set-card { padding: 1.1rem; }
.set-card h4 { font-family: var(--font-title); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; margin-bottom: .7rem; border-bottom: 2px solid var(--ink); padding-bottom: .4rem; }
.set-row { display: flex; align-items: center; gap: .7rem; padding: .45rem 0; font-size: .9rem; flex-wrap: wrap; }
.set-row label { flex: 1; min-width: 180px; font-weight: 700; }
.set-row .hint { display: block; color: var(--muted); font-size: .74rem; font-weight: 500; }
.set-row select, .set-row input[type=text] { border: 2px solid var(--ink); padding: .35rem .6rem; background: var(--bg); outline: none; }
.set-row button, .set-btn {
  border: 2px solid var(--ink); background: var(--bg2); color: var(--ink); padding: .4rem .8rem;
  font-size: .78rem; font-weight: 800; text-transform: uppercase; box-shadow: 2px 2px 0 var(--ink);
  text-decoration: none; display: inline-block;
}
.set-row button:hover, .set-btn:hover { background: var(--pop); color: #111; }
.set-row button:active, .set-btn:active { transform: translate(1px,1px); box-shadow: 0 0 0 var(--ink); }
.switch { position: relative; width: 44px; height: 24px; flex: 0 0 44px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; background: var(--bg); border: 2px solid var(--ink); transition: background .15s; cursor: pointer; }
.switch i::before {
  content: ""; position: absolute; width: 14px; height: 14px;
  background: var(--ink); top: 3px; left: 3px; transition: transform .15s;
}
.switch input:checked + i { background: var(--pop); }
.switch input:checked + i::before { transform: translateX(20px); }
.activity-list { font-size: .8rem; color: var(--muted); max-height: 260px; overflow-y: auto; font-weight: 500; }
.activity-list div { padding: .28rem 0; border-bottom: 1px dashed var(--ink); }
.activity-list b { color: var(--ink); font-weight: 800; }
.trash-item { display: flex; align-items: center; gap: .6rem; padding: .38rem 0; font-size: .85rem; border-bottom: 1px dashed var(--ink); font-weight: 500; }
.trash-item span { flex: 1; }
.trash-item button { font-size: .72rem; font-weight: 800; text-transform: uppercase; border: 2px solid var(--ink); background: var(--pop); color: #111; padding: 2px 8px; box-shadow: 2px 2px 0 var(--ink); }

/* ========== BACKDROPS ========== */
#drawer-backdrop, #palette-backdrop, #note-modal-backdrop, #help-modal-backdrop, #review-modal-backdrop {
  position: fixed; inset: 0; background: color-mix(in srgb, #111 45%, transparent); z-index: 60; animation: ccFade .15s ease;
}
@keyframes ccFade { from { opacity: 0; } to { opacity: 1; } }

/* ========== DRAWER ========== */
#drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 94vw); z-index: 61;
  background: var(--bg); border-left: 3px solid var(--ink);
  padding: 1rem 1.2rem 2rem; overflow-y: auto;
  animation: drawerIn .2s cubic-bezier(.3,1,.4,1);
  box-shadow: -6px 0 0 color-mix(in srgb, var(--ink) 22%, transparent);
}
@keyframes drawerIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .8rem; }
.drawer-universe { width: 44px; height: 12px; border: 2px solid var(--ink); background: var(--bg2); }
.drawer-universe.u-7g { background: var(--u-7g); } .drawer-universe.u-hub { background: var(--u-hub); } .drawer-universe.u-perso { background: var(--u-perso); }
#drawer-close, #nm-close {
  width: 32px; height: 32px; border: 2px solid var(--ink); background: var(--ink); color: var(--bg);
  font-weight: 800; box-shadow: 2px 2px 0 var(--pop);
}
.d-title {
  width: 100%; border: 0; outline: none; background: none;
  font-family: var(--font-title); font-size: 1.3rem; font-weight: 800; margin-bottom: 1rem;
}
.d-row { display: flex; align-items: center; gap: .7rem; margin-bottom: .75rem; flex-wrap: wrap; }
.d-row > label, .d-grid label, .d-section > label {
  font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
  min-width: 64px;
}
.seg { display: inline-flex; border: 2px solid var(--ink); background: var(--bg2); box-shadow: 2px 2px 0 var(--ink); }
.seg button { padding: .35rem .7rem; font-size: .78rem; font-weight: 800; text-transform: uppercase; color: var(--ink); border-right: 2px solid var(--ink); transition: background .1s; }
.seg button:last-child { border-right: 0; }
.seg button:hover { background: var(--bg3); }
.seg button.active { background: var(--ink); color: var(--bg2); }
#d-universe button[data-v="7g"].active { background: var(--u-7g); color: #fff; }
#d-universe button[data-v="hub"].active { background: var(--pop); color: #111; }
#d-universe button[data-v="perso"].active { background: var(--u-perso); color: #fff; }
.d-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem .8rem; margin-bottom: .8rem; }
.d-grid input, #d-recurrence {
  width: 100%; border: 2px solid var(--ink); padding: .4rem .5rem;
  background: var(--bg2); outline: none; font-size: .85rem; margin-top: .25rem;
}
#d-recurrence { width: auto; margin-top: 0; }
.d-pin { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 700; color: var(--ink); text-transform: uppercase; }
.d-pin input { accent-color: var(--pop); width: 16px; height: 16px; }
.d-section { margin: 1.1rem 0; }
#d-checklist { margin-top: .4rem; }
.check-item { display: flex; align-items: center; gap: .5rem; padding: .28rem 0; font-size: .88rem; font-weight: 500; }
.check-item input[type=checkbox] { accent-color: var(--ok); width: 16px; height: 16px; }
.check-item span { flex: 1; }
.check-item span.done { text-decoration: line-through; color: var(--muted); }
.check-item button { color: var(--muted); font-size: .8rem; font-weight: 800; }
.check-item button:hover { color: var(--danger); }
#d-check-input, #d-notes {
  width: 100%; border: 2px solid var(--ink); padding: .5rem .6rem;
  background: var(--bg2); outline: none; font-size: .86rem; margin-top: .4rem; resize: vertical;
}
.d-meta { color: var(--faint); font-size: .72rem; margin: .6rem 0 1rem; line-height: 1.6; font-weight: 600; }
.drawer-actions { display: flex; gap: .55rem; flex-wrap: wrap; }
.drawer-actions button {
  border: 2px solid var(--ink); background: var(--bg2); padding: .45rem .8rem;
  font-size: .76rem; font-weight: 800; text-transform: uppercase; box-shadow: 2px 2px 0 var(--ink);
}
.drawer-actions button:hover { background: var(--pop); color: #111; transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--ink); }
.drawer-actions button:active { transform: translate(1px,1px); box-shadow: 0 0 0 var(--ink); }
.drawer-actions .danger { background: var(--danger); color: #fff; }
.drawer-actions .danger:hover { background: var(--danger); color: #fff; }

/* ========== MENU PLANIFIER ========== */
#plan-menu {
  position: fixed; z-index: 80; background: var(--bg2); border: 3px solid var(--ink);
  box-shadow: var(--shadow-lg); padding: .4rem; min-width: 200px;
  animation: pop .12s ease;
}
#plan-menu button {
  display: flex; width: 100%; gap: .5rem; align-items: center;
  padding: .45rem .6rem; font-size: .84rem; font-weight: 700; text-align: left;
}
#plan-menu button:hover { background: var(--pop); color: #111; }
#plan-menu .pm-sep { border-top: 2px solid var(--ink); margin: .3rem 0; }
#plan-menu input[type=date] { width: 100%; border: 2px solid var(--ink); padding: .35rem; font-size: .82rem; background: var(--bg); }

/* ========== PALETTE ========== */
#palette {
  position: fixed; top: 12vh; left: 50%; transform: translateX(-50%);
  width: min(560px, 92vw); z-index: 70;
  background: var(--bg2); border: 3px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink); overflow: hidden; animation: pop .13s ease;
}
#palette-input {
  width: 100%; border: 0; outline: none; background: var(--pop); color: #111;
  padding: .9rem 1.1rem; font-size: 1rem; font-weight: 700; border-bottom: 3px solid var(--ink);
}
#palette-input::placeholder { color: #4a4a00; }
#palette-results { max-height: 46vh; overflow-y: auto; padding: .4rem; }
.pal-item {
  display: flex; align-items: center; gap: .6rem; width: 100%;
  padding: .5rem .7rem; font-size: .88rem; text-align: left; font-weight: 600;
  border: 2px solid transparent;
}
.pal-item .pi-ic { width: 22px; text-align: center; }
.pal-item .pi-sub { margin-left: auto; color: var(--faint); font-size: .7rem; text-transform: uppercase; font-weight: 700; }
.pal-item:hover, .pal-item.sel { background: var(--bg3); border-color: var(--ink); }

/* ========== FOCUS ========== */
#focus-overlay {
  position: fixed; inset: 0; z-index: 90; background: var(--bg);
  display: flex; align-items: center; justify-content: center; animation: ccFade .2s ease;
}
#focus-overlay::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(color-mix(in srgb, var(--ink) 5%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--ink) 5%, transparent) 1px, transparent 1px);
  background-size: 28px 28px;
}
#focus-close {
  position: absolute; top: 1.2rem; right: 1.4rem; font-weight: 800; text-transform: uppercase;
  border: 2px solid var(--ink); background: var(--bg2); padding: .35rem .8rem; box-shadow: 2px 2px 0 var(--ink);
}
#focus-close:hover { background: var(--pop); color: #111; }
.focus-inner { text-align: center; max-width: 620px; padding: 1rem; position: relative; }
.focus-label { font-family: var(--font-title); font-size: .78rem; font-weight: 800; letter-spacing: .35em; color: var(--muted); margin-bottom: 1.2rem; }
#focus-title { font-family: var(--font-title); font-size: 1.5rem; font-weight: 800; text-transform: uppercase; margin-bottom: 1.6rem; }
#focus-timer {
  font-family: var(--font-title); font-size: 4.6rem; font-weight: 800; font-variant-numeric: tabular-nums;
  letter-spacing: -.02em; line-height: 1.1; display: inline-block;
  background: var(--pop); color: #111; border: 4px solid var(--ink); box-shadow: 8px 8px 0 var(--ink);
  padding: .3rem 1.4rem;
}
.focus-phase { color: var(--muted); font-weight: 800; margin: 1.1rem 0 1.6rem; text-transform: uppercase; font-size: .8rem; letter-spacing: .18em; }
.focus-controls { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; }
.focus-controls button {
  border: 2px solid var(--ink); background: var(--bg2); padding: .6rem 1.1rem;
  font-weight: 800; font-size: .85rem; text-transform: uppercase; box-shadow: var(--shadow);
}
.focus-controls button:hover { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--ink); }
.focus-controls button:active { transform: translate(2px,2px); box-shadow: 0 0 0 var(--ink); }
#focus-start, #focus-done { background: var(--pop); color: #111; }
.focus-pomodoros { margin-top: 1.5rem; font-size: 1.2rem; letter-spacing: .3em; }

/* ========== NOTE MODAL ========== */
#note-modal {
  position: fixed; top: 8vh; left: 50%; transform: translateX(-50%);
  width: min(680px, 94vw); max-height: 84vh; z-index: 70;
  background: var(--bg2); border: 3px solid var(--ink);
  box-shadow: 10px 10px 0 var(--ink); padding: 1.1rem 1.3rem; overflow-y: auto; animation: pop .14s ease;
  display: flex; flex-direction: column; gap: .7rem;
}
.nm-head { display: flex; gap: .6rem; align-items: center; }
#nm-title { flex: 1; border: 0; outline: none; background: none; font-family: var(--font-title); font-size: 1.25rem; font-weight: 800; }
.nm-toolbar { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; font-size: .8rem; color: var(--ink); font-weight: 700; }
.nm-toolbar label { text-transform: uppercase; font-size: .74rem; display: inline-flex; gap: .3rem; align-items: center; }
.nm-toolbar input[type=checkbox] { accent-color: var(--pop); width: 15px; height: 15px; }
.nm-toolbar button {
  border: 2px solid var(--ink); background: var(--bg2); padding: .3rem .6rem;
  font-size: .74rem; font-weight: 800; text-transform: uppercase; box-shadow: 2px 2px 0 var(--ink);
}
.nm-toolbar button:hover { background: var(--pop); color: #111; }
.nm-toolbar .danger { background: var(--danger); color: #fff; }
.nm-toolbar .danger:hover { background: var(--danger); color: #fff; }
#nm-body {
  width: 100%; min-height: 280px; border: 2px solid var(--ink);
  padding: .8rem; background: var(--bg); outline: none; resize: vertical; line-height: 1.6; font-size: .92rem;
}
#nm-preview { line-height: 1.65; font-size: .92rem; padding: .6rem; border: 2px dashed var(--ink); background: var(--bg); }
#nm-preview li { margin-left: 1.2rem; }
#nm-preview a { color: var(--ink); font-weight: 700; background: var(--pop); padding: 0 3px; }

/* ========== REVUE HEBDO ========== */
#review-modal {
  position: fixed; top: 7vh; left: 50%; transform: translateX(-50%);
  width: min(640px, 94vw); max-height: 86vh; z-index: 70; overflow-y: auto;
  background: var(--bg2); border: 3px solid var(--ink);
  box-shadow: 10px 10px 0 var(--ink); padding: 1.4rem 1.5rem; animation: pop .14s ease;
}
#review-modal h3 { font-family: var(--font-title); font-size: 1.25rem; font-weight: 800; text-transform: uppercase; margin-bottom: .3rem; }
#review-modal .rv-sub { color: var(--muted); font-size: .85rem; margin-bottom: 1rem; font-weight: 600; }
#review-modal .rv-block { margin: 1rem 0; }
#review-modal .rv-block h4 { font-family: var(--font-title); font-size: .8rem; text-transform: uppercase; margin-bottom: .45rem; border-bottom: 2px solid var(--ink); padding-bottom: .3rem; }
#review-modal .rv-close {
  position: absolute; top: .9rem; right: .9rem; width: 32px; height: 32px;
  background: var(--ink); color: var(--bg2); font-weight: 800; box-shadow: 2px 2px 0 var(--pop);
}

/* ========== AIDE ========== */
#help-modal {
  position: fixed; top: 10vh; left: 50%; transform: translateX(-50%);
  width: min(740px, 94vw); z-index: 70;
  background: var(--bg2); border: 3px solid var(--ink);
  box-shadow: 10px 10px 0 var(--ink); padding: 1.4rem 1.6rem; animation: pop .14s ease;
}
#help-modal h3 { font-family: var(--font-title); font-size: 1.2rem; font-weight: 800; text-transform: uppercase; margin-bottom: 1rem; }
#help-modal h4 { font-family: var(--font-title); font-size: .85rem; font-weight: 800; text-transform: uppercase; margin-bottom: .45rem; border-bottom: 2px solid var(--ink); padding-bottom: .25rem; }
#help-modal p { color: var(--muted); font-size: .84rem; line-height: 1.9; margin-bottom: .6rem; font-weight: 500; }
.help-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1.2rem; }
.hm-close {
  position: absolute; top: .9rem; right: .9rem; width: 32px; height: 32px;
  background: var(--ink); color: var(--bg2); font-weight: 800; box-shadow: 2px 2px 0 var(--pop);
}

/* ========== TOAST ========== */
#toast {
  position: fixed; bottom: 1.4rem; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--bg2); border: 2px solid var(--ink);
  padding: .65rem 1.1rem; font-size: .85rem; font-weight: 700; z-index: 95;
  display: flex; align-items: center; gap: .9rem;
  box-shadow: 4px 4px 0 var(--pop);
  animation: toastIn .2s cubic-bezier(.3,1.4,.4,1);
}
[data-theme="dark"] #toast { background: var(--pop); color: #111; box-shadow: 4px 4px 0 var(--bg2); border-color: #111; }
@keyframes toastIn { from { transform: translateX(-50%) translateY(16px); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } }
#toast-undo { color: var(--pop); font-weight: 800; text-transform: uppercase; }
[data-theme="dark"] #toast-undo { color: #111; text-decoration: underline; }

/* ========== MOBILE ========== */
@media (max-width: 760px) {
  #sidebar {
    position: fixed; top: 0; bottom: 0; left: 0;
    margin-left: calc(-1 * var(--sidebar-w));
    box-shadow: 8px 0 0 color-mix(in srgb, #111 25%, transparent);
  }
  #app.sb-open #sidebar { margin-left: 0; }
  #app.sb-collapsed #sidebar { margin-left: calc(-1 * var(--sidebar-w)); }
  #btn-burger { display: block; }
  #view { padding: .9rem .8rem 3rem; }
  #topbar { padding: .55rem .8rem; flex-wrap: wrap; }
  .top-search { order: 5; max-width: none; flex-basis: 100%; margin-top: .5rem; }
  #drawer { width: 100vw; border-left: 0; }
  .today-cols { grid-template-columns: 1fr; }
  .greeting h3 { font-size: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
