/* ==========================================================================
   Inside Studio — système de design
   ========================================================================== */

:root {
  --ink: #14161a;
  --ink-soft: #3d434c;
  --muted: #7b8089;
  --line: #e4dfd6;
  --line-soft: #efeae3;
  --paper: #f5f2ec;
  --surface: #ffffff;
  --surface-2: #faf8f4;
  --sidebar: #121316;
  --accent: #cf4820;
  --accent-dark: #b23c19;
  --accent-soft: #fbe9e2;
  --green: #2b6a51;
  --green-soft: #e6f1eb;
  --amber: #9a6209;
  --amber-soft: #fbf1dd;
  --red: #ad2a1c;
  --red-soft: #fbe8e5;
  --blue: #2a548c;
  --blue-soft: #e9eff8;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(20, 22, 26, 0.05);
  --shadow: 0 10px 30px -12px rgba(20, 22, 26, 0.18);
  --shadow-lg: 0 30px 70px -25px rgba(20, 22, 26, 0.35);
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sidebar-w: 252px;
  --tabbar-h: 64px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { min-height: 100vh; }
h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent-soft); }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 12.5px; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-size: 10.5px;
  font-weight: 650;
  color: var(--muted);
}

.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-14 { width: 14px; height: 14px; }
.icon-16 { width: 16px; height: 16px; }
.icon-18 { width: 18px; height: 18px; }
.icon-22 { width: 22px; height: 22px; }

/* ==========================================================================
   Connexion
   ========================================================================== */

.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  background: var(--paper);
}

.login-visual {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 12% 8%, #3b3129 0%, #1b1815 55%, #111 100%);
  color: #f4f1ec;
  padding: clamp(28px, 4vw, 56px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  isolation: isolate;
}

.login-visual-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: url("/img/studio.jpg");
  background-size: cover;
  background-position: center 42%;
  opacity: 0.5;
  filter: grayscale(0.25) contrast(1.05) brightness(0.85);
  transform: scale(1.02);
}

.login-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(12, 12, 12, 0.55) 0%, rgba(12, 12, 12, 0.15) 35%, rgba(12, 12, 12, 0.85) 100%),
    linear-gradient(90deg, rgba(12, 12, 12, 0.5), transparent 60%);
}

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

.login-logo {
  width: 46px; height: 46px;
  object-fit: contain;
  mix-blend-mode: screen;
  flex: none;
}

.logo-mark {
  width: 30px; height: 30px;
  position: relative;
  display: inline-block;
  border: 1.5px solid currentColor;
  border-radius: 8px;
  flex: none;
}
.logo-mark::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}
.logo-mark::after {
  content: "";
  position: absolute;
  width: 3px; height: 3px;
  background: currentColor;
  border-radius: 50%;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

.wordmark {
  font-size: 15px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 500;
}
.wordmark b { font-weight: 700; margin-left: 0.18em; }

.login-quote { max-width: 34ch; }
.login-quote .eyebrow { color: rgba(244, 241, 236, 0.62); margin-bottom: 18px; }
.login-quote h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 3.3vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin-bottom: 20px;
}
.login-quote p.muted { color: rgba(244, 241, 236, 0.72); max-width: 42ch; font-size: 14px; line-height: 1.65; }

.login-stats {
  display: flex;
  gap: clamp(20px, 4vw, 56px);
  border-top: 1px solid rgba(244, 241, 236, 0.16);
  padding-top: 22px;
}
.login-stats b { display: block; font-family: var(--serif); font-size: 26px; font-weight: 400; line-height: 1; margin-bottom: 6px; }
.login-stats span { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.09em; color: rgba(244, 241, 236, 0.58); }

.login-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 4vw, 56px);
  gap: 28px;
}

.login-card {
  width: min(390px, 100%);
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.login-head { margin-bottom: 10px; }
.login-head h2 { font-family: var(--serif); font-size: 34px; font-weight: 400; letter-spacing: -0.015em; margin: 8px 0 6px; }

.login-hint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  color: var(--muted);
}
.login-hint > span { text-transform: uppercase; letter-spacing: 0.08em; font-size: 10px; font-weight: 600; }
.login-hint .link { font-size: 12px; }

.login-foot { font-size: 11px; color: var(--muted); text-align: center; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login-visual { min-height: 38vh; padding: 24px; }
  .login-quote h1 { font-size: 27px; }
  .login-quote p.muted, .login-stats { display: none; }
  .login-panel { padding: 28px 20px 40px; justify-content: flex-start; }
  .login-head h2 { font-size: 28px; }
}

/* ==========================================================================
   Structure de l'application
   ========================================================================== */

.app { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--sidebar);
  color: #c9ccd2;
  display: flex;
  flex-direction: column;
  padding: 20px 14px 14px;
  z-index: 50;
}

.sidebar-head {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #f6f3ee;
  padding: 4px 10px 22px;
}
.sidebar-head .logo-mark { width: 26px; height: 26px; border-radius: 7px; }
.sidebar-head .wordmark { font-size: 12.5px; letter-spacing: 0.2em; }

.nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; margin: 0 -4px; padding: 0 4px; }
.nav::-webkit-scrollbar { width: 0; }

.nav-group { margin: 14px 0 6px; padding: 0 10px; font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.13em; color: #6b6f78; font-weight: 650; }
.nav-group:first-child { margin-top: 0; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: 9px;
  font-size: 13px;
  color: #b6bac2;
  transition: background 0.15s ease, color 0.15s ease;
  position: relative;
}
.nav-item .icon { width: 18px; height: 18px; opacity: 0.85; }
.nav-item:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.nav-item.active { background: var(--paper); color: var(--ink); font-weight: 600; }
.nav-item.active .icon { opacity: 1; color: var(--accent); }
.nav-count {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.09);
  color: #dfe1e6;
  padding: 1px 7px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.nav-item.active .nav-count { background: var(--accent); color: #fff; }

.sidebar-foot { border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 12px; margin-top: 10px; }

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: transparent;
  border: 0;
  padding: 8px;
  border-radius: 10px;
  color: #d7d9de;
  text-align: left;
}
.user-chip:hover { background: rgba(255, 255, 255, 0.06); }
.user-meta { display: flex; flex-direction: column; line-height: 1.25; flex: 1; min-width: 0; }
.user-meta b { font-size: 12.5px; font-weight: 600; color: #f2f0ec; }
.user-meta small { font-size: 10.5px; color: #7f838c; }
.user-chip .icon { color: #6b6f78; }

.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: inline-grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex: none;
}
.sidebar .avatar { background: rgba(255, 255, 255, 0.1); color: #f0eee9; }
.avatar-lg { width: 52px; height: 52px; font-size: 17px; }
.avatar-sm { width: 26px; height: 26px; font-size: 10px; }
.avatar-btn { border: 0; }

.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 clamp(16px, 2.4vw, 32px);
  background: rgba(245, 242, 236, 0.86);
  backdrop-filter: blur(12px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.topbar-title { flex: 1; min-width: 0; }
.topbar-title .eyebrow { font-size: 9.5px; margin-bottom: 1px; }
.topbar-title h1 { font-size: 18px; font-weight: 600; letter-spacing: -0.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; align-items: center; gap: 6px; }

.icon-btn {
  width: 36px; height: 36px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  position: relative;
  transition: background 0.15s, border-color 0.15s;
}
.icon-btn:hover { background: rgba(20, 22, 26, 0.05); }
.icon-btn .dot { position: absolute; top: 7px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); border: 1.5px solid var(--paper); }

.view {
  flex: 1;
  padding: clamp(18px, 2.2vw, 30px) clamp(16px, 2.4vw, 32px) 56px;
  width: 100%;
  max-width: 1500px;
  outline: none;
}
.view > * { animation: fade 0.3s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.tabbar { display: none; }

/* ==========================================================================
   En-tête de page
   ========================================================================== */

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.page-head h2 { font-size: clamp(21px, 2.2vw, 26px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.page-head .sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ==========================================================================
   Boutons, badges, champs
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 15px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.08s;
}
.btn:active { transform: translateY(0.5px); }
.btn .icon { width: 16px; height: 16px; }
.btn-primary { background: var(--ink); color: #fbf9f5; border-color: var(--ink); }
.btn-primary:hover { background: #26292f; }
.btn-accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-accent:hover { background: var(--accent-dark); }
.btn-outline { border-color: var(--line); background: var(--surface); color: var(--ink-soft); }
.btn-outline:hover { border-color: #cfc8bc; background: var(--surface); color: var(--ink); }
.btn-ghost { color: var(--ink-soft); }
.btn-ghost:hover { background: rgba(20, 22, 26, 0.05); }
.btn-danger { color: var(--red); background: var(--red-soft); border-color: transparent; }
.btn-danger:hover { background: #f7d9d4; }
.btn-sm { height: 31px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn-icon { width: 32px; height: 32px; padding: 0; border-radius: 8px; color: var(--muted); }
.btn-icon:hover { color: var(--ink); background: rgba(20, 22, 26, 0.05); }

.link { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 550; font-size: 12.5px; }
.link:hover { text-decoration: underline; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  background: #f0ede8;
  color: var(--ink-soft);
}
.badge-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-ink { background: var(--ink); color: #f7f4ef; }
.badge-accent { background: var(--accent-soft); color: var(--accent-dark); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 12px;
  white-space: nowrap;
}
.chip:hover { border-color: #cfc8bc; }
.chip.active { background: var(--ink); color: #f8f5ef; border-color: var(--ink); }
.chip .icon { width: 14px; height: 14px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.07em; font-weight: 650; color: var(--muted); }
.field > span .req { color: var(--accent); }
.input, .select, .textarea {
  width: 100%;
  height: 39px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  font-size: 13.5px;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
}
.select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237b8089' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; padding-right: 30px; }
.textarea { height: auto; min-height: 82px; padding: 9px 11px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: #b9b1a3; box-shadow: 0 0 0 3px rgba(207, 72, 32, 0.1); }
.input::placeholder, .textarea::placeholder { color: #a8a49c; }
.input[disabled] { background: var(--surface-2); color: var(--muted); }
.form-error { font-size: 12.5px; color: var(--red); background: var(--red-soft); padding: 8px 11px; border-radius: 8px; }
.form-hint { font-size: 11.5px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-stack { display: flex; flex-direction: column; gap: 14px; }

.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-soft); }
.switch input { width: 15px; height: 15px; accent-color: var(--accent); }

/* ==========================================================================
   Cartes, grilles, KPI
   ========================================================================== */

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  min-width: 0;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line-soft);
}
.card-head h3 { font-size: 14px; font-weight: 600; letter-spacing: -0.005em; }
.card-head .sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.card-body { padding: 16px 18px; }
.card-body.flush { padding: 0; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--line-soft); font-size: 12px; color: var(--muted); }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px 14px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}
.kpi-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 650; display: flex; align-items: center; gap: 6px; }
.kpi-value { font-size: clamp(23px, 2.2vw, 29px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; margin-top: 8px; font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: 12px; font-weight: 550; color: var(--muted); letter-spacing: 0; margin-left: 3px; }
.kpi-foot { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 11.5px; color: var(--muted); min-height: 18px; }
.kpi-spark { position: absolute; right: 0; bottom: 0; width: 96px; height: 46px; opacity: 0.55; pointer-events: none; }
.kpi-accent { background: linear-gradient(158deg, #fff 0%, #fdf7f3 100%); }
.kpi-accent .kpi-value { color: var(--accent-dark); }

.delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; font-size: 11.5px; }
.delta.up { color: var(--green); }
.delta.down { color: var(--red); }
.delta .icon { width: 13px; height: 13px; }
.delta.flat { color: var(--muted); }

/* ==========================================================================
   Tableaux
   ========================================================================== */

.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th {
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 650;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  background: var(--surface);
}
table.data td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr { transition: background 0.12s; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data tfoot td { padding: 11px 14px; font-weight: 600; background: var(--surface-2); border-top: 1px solid var(--line); }
table.data .cell-strong { font-weight: 550; color: var(--ink); }
table.data .cell-sub { font-size: 11px; color: var(--muted); margin-top: 1px; }
table.data .row-actions { display: flex; gap: 2px; justify-content: flex-end; }
table.data tr.is-clickable { cursor: pointer; }
table.data .num { text-align: right; }
table.data th.num { text-align: right; }

.money-in { color: var(--green); }
.money-out { color: var(--ink); }
.money-muted { color: var(--muted); }

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 46px 24px;
  gap: 8px;
  color: var(--muted);
}
.empty .icon { width: 30px; height: 30px; color: #bdb6aa; margin-bottom: 4px; }
.empty b { color: var(--ink-soft); font-size: 13.5px; font-weight: 600; }
.empty p { font-size: 12.5px; max-width: 40ch; }

/* ==========================================================================
   Listes, timeline, alertes
   ========================================================================== */

.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line-soft); }
.list-item:last-child { border-bottom: 0; }
.list-item:hover { background: var(--surface-2); }
.list-item .main-col { flex: 1; min-width: 0; }
.list-item .title { font-size: 13px; font-weight: 550; color: var(--ink); }
.list-item .meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; display: flex; gap: 8px; flex-wrap: wrap; }
.list-item .end { text-align: right; flex: none; }

.timeline { position: relative; padding-left: 20px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.timeline-item { position: relative; padding: 0 0 16px 0; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { content: ""; position: absolute; left: -18px; top: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--surface); border: 1.5px solid #c8c1b4; }
.timeline-item.hot::before { background: var(--accent); border-color: var(--accent); }
.timeline-item .t-date { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; }
.timeline-item .t-title { font-size: 13px; font-weight: 550; margin-top: 2px; }
.timeline-item .t-text { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }

.alert-list { display: flex; flex-direction: column; }
.alert-item { display: flex; gap: 11px; padding: 12px 18px; border-bottom: 1px solid var(--line-soft); align-items: flex-start; }
.alert-item:last-child { border-bottom: 0; }
.alert-item .alert-icon { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.alert-item .alert-icon .icon { width: 15px; height: 15px; }
.alert-item.danger .alert-icon { background: var(--red-soft); color: var(--red); }
.alert-item.warning .alert-icon { background: var(--amber-soft); color: var(--amber); }
.alert-item.info .alert-icon { background: var(--blue-soft); color: var(--blue); }
.alert-item .a-title { font-size: 12.5px; font-weight: 600; }
.alert-item .a-detail { font-size: 11.5px; color: var(--muted); margin-top: 1px; }

/* ==========================================================================
   Graphiques
   ========================================================================== */

.chart { width: 100%; display: block; overflow: visible; }
.chart text { font-family: var(--sans); fill: var(--muted); font-size: 10px; }
.chart .grid-line { stroke: var(--line-soft); stroke-width: 1; }
.chart .axis-line { stroke: var(--line); stroke-width: 1; }
.chart .series-rev { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chart .series-chg { fill: none; stroke: #b6afa2; stroke-width: 1.6; stroke-dasharray: 4 4; }
.chart .area-rev { fill: url(#gradRev); }
.chart .dot { stroke: #fff; stroke-width: 1.5; }
.chart .bar { fill: #ded7cb; }
.chart .bar.active { fill: var(--ink); }
.chart .bar-rev { fill: var(--accent); }
.chart .bar-chg { fill: #d8d1c4; }

.legend { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-right: 5px; }
.legend .l-rev { background: var(--accent); }
.legend .l-chg { background: #cfc8ba; }

.chart-tip {
  position: absolute;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  padding: 6px 9px;
  border-radius: 7px;
  pointer-events: none;
  transform: translate(-50%, -120%);
  white-space: nowrap;
  z-index: 5;
  box-shadow: var(--shadow);
}
.chart-host { position: relative; }

.bar-list { display: flex; flex-direction: column; gap: 11px; }
.bar-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; }
.bar-row .bl-label { font-size: 12.5px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .bl-value { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bar-track { grid-column: 1 / -1; height: 6px; background: var(--line-soft); border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; background: var(--ink); }
.bar-fill.accent { background: var(--accent); }
.bar-fill.muted { background: #c9c2b6; }

.donut-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.donut { width: 132px; height: 132px; flex: none; }
.donut-legend { display: flex; flex-direction: column; gap: 7px; flex: 1; min-width: 150px; }
.donut-legend .dl { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.donut-legend .dl i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.donut-legend .dl span { flex: 1; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.donut-legend .dl b { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ==========================================================================
   Filtres et barre d'outils
   ========================================================================== */

.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .grow { flex: 1; }
.search-input { position: relative; min-width: 200px; }
.search-input .icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted); }
.search-input .input { padding-left: 32px; height: 36px; width: 100%; }
.month-nav { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); padding: 2px; }
.month-nav button { width: 28px; height: 30px; border: 0; background: none; border-radius: 7px; display: grid; place-items: center; color: var(--muted); }
.month-nav button:hover { background: var(--surface-2); color: var(--ink); }
.month-nav .m-label { padding: 0 8px; font-size: 12.5px; font-weight: 600; text-transform: capitalize; min-width: 118px; text-align: center; }

/* ==========================================================================
   Modale, tiroir, toasts, recherche
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 18, 20, 0.42);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
  animation: fadeIn 0.16s ease both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  width: min(560px, 100%);
  max-height: min(88vh, 900px);
  background: var(--surface);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: pop 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.modal-lg { width: min(850px, 100%); }
.modal-xl { width: min(1040px, 100%); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(0.99); } to { opacity: 1; transform: none; } }

.modal-head { padding: 20px 22px 14px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: flex-start; gap: 12px; }
.modal-head h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.modal-head .sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.modal-head .icon-btn { margin-left: auto; }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line-soft); display: flex; justify-content: flex-end; gap: 8px; background: var(--surface-2); }
.modal-foot .left { margin-right: auto; }

.toast-root { position: fixed; right: 22px; bottom: 22px; display: flex; flex-direction: column; gap: 8px; z-index: 200; pointer-events: none; }
.toast {
  background: var(--ink);
  color: #f8f5ef;
  padding: 10px 15px;
  border-radius: 10px;
  font-size: 12.5px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideIn 0.2s ease both;
  pointer-events: auto;
  max-width: 360px;
}
.toast .icon { width: 15px; height: 15px; color: #9fd3b8; }
.toast.error .icon { color: #f2a08f; }
@keyframes slideIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.search-backdrop { position: fixed; inset: 0; background: rgba(17, 18, 20, 0.35); backdrop-filter: blur(4px); z-index: 120; padding: 10vh 16px 16px; display: flex; justify-content: center; align-items: flex-start; }
.search-panel { width: min(600px, 100%); background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; animation: pop 0.2s ease both; }
.search-panel .sp-input { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
.search-panel .sp-input input { flex: 1; border: 0; outline: none; background: none; font-size: 15px; }
.search-panel .sp-input kbd { font-family: var(--sans); font-size: 10px; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 2px 5px; }
.search-results { max-height: 52vh; overflow-y: auto; }
.sr-group { padding: 10px 16px 4px; font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 650; }
.sr-item { display: flex; align-items: center; gap: 10px; padding: 9px 16px; font-size: 13px; }
.sr-item:hover, .sr-item.active { background: var(--surface-2); }
.sr-item .icon { width: 16px; height: 16px; color: var(--muted); }
.sr-item .sr-meta { margin-left: auto; font-size: 11px; color: var(--muted); }
.search-empty { padding: 26px 16px; text-align: center; color: var(--muted); font-size: 12.5px; }

/* ==========================================================================
   Kanban, agenda, divers composants métier
   ========================================================================== */

.kanban { display: grid; grid-template-columns: repeat(5, minmax(210px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.kanban-col { background: var(--surface-2); border: 1px solid var(--line); border-radius: 13px; padding: 10px; min-height: 120px; }
.kanban-col h4 { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 650; display: flex; justify-content: space-between; padding: 2px 4px 9px; }
.kanban-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 11px; margin-bottom: 8px; box-shadow: var(--shadow-sm); cursor: grab; }
.kanban-card:active { cursor: grabbing; }
.kanban-card .kc-title { font-size: 12.5px; font-weight: 550; line-height: 1.35; }
.kanban-card .kc-meta { font-size: 11px; color: var(--muted); margin-top: 5px; display: flex; gap: 6px; flex-wrap: wrap; }
.kanban-card .kc-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 9px; font-size: 11px; }
.kanban-col.drag-over { outline: 2px dashed var(--accent); outline-offset: -2px; }

.agenda-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.week-grid { display: grid; grid-template-columns: 54px repeat(7, minmax(110px, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.week-grid .wg-head { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: center; background: var(--surface); position: sticky; top: 0; }
.week-grid .wg-head .dow { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 650; }
.week-grid .wg-head .dnum { font-size: 17px; font-weight: 600; margin-top: 2px; }
.week-grid .wg-head.today .dnum { color: var(--accent); }
.week-grid .wg-hour { font-size: 9.5px; color: var(--muted); text-align: right; padding: 4px 6px; border-right: 1px solid var(--line-soft); height: 52px; transform: translateY(-7px); }
.week-grid .wg-cell { border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); height: 52px; position: relative; padding: 2px; }
.week-grid .wg-cell:nth-child(8n) { border-right: 0; }
.week-grid .wg-cell.today { background: #fdf8f4; }

.event {
  position: absolute;
  left: 2px; right: 2px;
  border-radius: 6px;
  padding: 3px 5px;
  font-size: 10px;
  line-height: 1.25;
  overflow: hidden;
  background: var(--blue-soft);
  color: var(--blue);
  border-left: 2px solid var(--blue);
  cursor: pointer;
  z-index: 2;
}
.event.confirmé { background: var(--green-soft); color: var(--green); border-color: var(--green); }
.event.annulé, .event.no-show { background: #f1efec; color: var(--muted); border-color: #c5beb2; text-decoration: line-through; }
.event b { display: block; font-weight: 650; font-size: 10px; }
.event span { display: block; opacity: 0.85; font-size: 9.5px; }

.day-list { display: flex; flex-direction: column; }
.day-item { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.day-item:last-child { border-bottom: 0; }
.day-time { width: 46px; flex: none; font-size: 11px; font-weight: 600; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.day-body { flex: 1; min-width: 0; }
.day-body .t { font-size: 12.5px; font-weight: 550; }

.profile-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.profile-head .p-name { font-size: 19px; font-weight: 600; letter-spacing: -0.015em; }
.profile-head .p-meta { font-size: 12px; color: var(--muted); margin-top: 2px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-radius: 12px; overflow: hidden; }
.stat-row > div { background: var(--surface); padding: 12px 14px; }
.stat-row .s-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); font-weight: 600; }
.stat-row .s-value { font-size: 17px; font-weight: 600; margin-top: 3px; font-variant-numeric: tabular-nums; }

.inline-note { display: flex; gap: 9px; padding: 10px 12px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line-soft); font-size: 12px; color: var(--ink-soft); }
.inline-note .icon { width: 16px; height: 16px; color: var(--muted); flex: none; margin-top: 1px; }
.inline-note.warn { background: var(--amber-soft); border-color: #f0e2c6; color: #7a4e07; }
.inline-note.warn .icon { color: var(--amber); }

/* ==========================================================================
   Factures
   ========================================================================== */

.doc-lines { width: 100%; border-collapse: collapse; }
.doc-lines th { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); font-weight: 650; }
.doc-lines td { padding: 6px 4px; vertical-align: top; }
.doc-lines .input { height: 34px; font-size: 12.5px; }
.doc-lines .line-total { text-align: right; font-variant-numeric: tabular-nums; font-size: 12.5px; padding-top: 10px; white-space: nowrap; }

.totals { margin-left: auto; width: min(300px, 100%); display: flex; flex-direction: column; gap: 6px; }
.totals .t-row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-soft); }
.totals .t-total { display: flex; justify-content: space-between; font-size: 17px; font-weight: 600; padding-top: 8px; border-top: 1px solid var(--line); margin-top: 2px; }

.print-doc { background: #fff; color: #14161a; padding: 32px; border-radius: 12px; border: 1px solid var(--line); }
.print-doc .pd-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; }
.print-doc .pd-brand { font-family: var(--serif); font-size: 22px; letter-spacing: 0.03em; }
.print-doc .pd-brand small { display: block; font-family: var(--sans); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.print-doc .pd-meta { text-align: right; font-size: 11px; color: var(--muted); line-height: 1.6; }
.print-doc .pd-title { font-family: var(--serif); font-size: 26px; margin: 24px 0 4px; font-weight: 400; }
.print-doc .pd-clients { display: flex; gap: 28px; margin: 16px 0 22px; }
.print-doc .pd-clients div { font-size: 12px; line-height: 1.6; }
.print-doc .pd-clients b { display: block; font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 3px; }
.print-doc table { width: 100%; border-collapse: collapse; font-size: 12px; }
.print-doc table th { text-align: left; border-bottom: 1px solid #d8d2c7; padding: 8px 6px; font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); }
.print-doc table td { padding: 8px 6px; border-bottom: 1px solid #f0ece5; }
.print-doc .pd-foot { margin-top: 26px; display: flex; justify-content: space-between; gap: 20px; font-size: 10.5px; color: var(--muted); border-top: 1px solid #e8e3d9; padding-top: 12px; }
.print-doc .pd-note { font-size: 11px; color: var(--ink-soft); margin-top: 14px; max-width: 60ch; }

@media print {
  body { background: #fff; }
  .app, .login, .toast-root, .modal-backdrop, .search-backdrop { display: none !important; }
  #print-area { display: block !important; }
  #print-area .print-doc { border: 0; border-radius: 0; padding: 0; }
  @page { margin: 16mm; }
}
#print-area { display: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */

.only-mobile { display: none; }

@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  :root { --sidebar-w: 0px; }
  .sidebar {
    transform: translateX(-104%);
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    width: 268px;
    box-shadow: var(--shadow-lg);
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(17, 18, 20, 0.35); z-index: 45; }
  .main { margin-left: 0; }
  .only-mobile { display: grid; }
  .topbar { height: 60px; }
  .view { padding-bottom: calc(var(--tabbar-h) + 28px); }
  .tabbar {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.93);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
    z-index: 40;
  }
  .tab-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 9.5px; color: var(--muted); border-radius: 8px; font-weight: 550; }
  .tab-item .icon { width: 20px; height: 20px; }
  .tab-item.active { color: var(--accent); }
  .tab-item.active .icon { stroke-width: 1.9; }
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal { border-radius: 18px 18px 0 0; max-height: 92vh; width: 100%; animation: sheetUp 0.24s cubic-bezier(0.22, 1, 0.36, 1) both; }
  .modal-lg, .modal-xl { width: 100%; }
  @keyframes sheetUp { from { transform: translateY(30px); opacity: 0.6; } to { transform: none; opacity: 1; } }
  .toast-root { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 14px); left: 16px; right: 16px; align-items: stretch; }
  .toast { max-width: none; }
  .week-grid { grid-template-columns: 44px repeat(7, minmax(96px, 1fr)); }
  .kanban { grid-template-columns: repeat(5, 220px); }
  .search-backdrop { padding-top: 4vh; }
}

@media (max-width: 720px) {
  body { font-size: 14px; }
  .grid-2, .grid-3, .grid-4, .span-2, .span-3 { grid-template-columns: 1fr; grid-column: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .page-head { align-items: flex-start; margin-bottom: 16px; }
  .page-head h2 { font-size: 21px; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 13px 14px; }
  .kpi-value { font-size: 21px; }
  .kpi-spark { display: none; }
  .card-head, .card-body { padding-left: 14px; padding-right: 14px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .list-item { padding-left: 14px; padding-right: 14px; }
  .profile-head { gap: 12px; }
  .toolbar .search-input { min-width: 100%; }
  .hide-sm { display: none !important; }
  .print-doc { padding: 18px; }
  .print-doc .pd-head { flex-direction: column; }
  .print-doc .pd-meta { text-align: left; }
}

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

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

/* ==========================================================================
   Compléments UI (badges de navigation, chargement, paires clé/valeur)
   ========================================================================== */

.nav-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: rgba(207, 72, 32, 0.16);
  color: #f0a58c;
  font-size: 10px;
  font-weight: 650;
  display: inline-grid;
  place-items: center;
  line-height: 1;
}

.loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 56px 20px;
  color: var(--muted);
  font-size: 12.5px;
}
.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.kv { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.kv-label {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 650;
}
.kv-value { font-size: 13px; color: var(--ink-soft); overflow-wrap: anywhere; }
.kv-value.strong { font-weight: 600; color: var(--ink); font-size: 14px; }

.inline-fields { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.inline-fields .field { flex: 1; min-width: 130px; }
.mb-0 { margin-bottom: 0 !important; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.stack-12 { display: flex; flex-direction: column; gap: 12px; }
.stack-16 { display: flex; flex-direction: column; gap: 16px; }

/* ==========================================================================
   Agenda — planning hebdomadaire (week board)
   ========================================================================== */

.week-board-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-top: 1px solid var(--line-soft);
}

.week-board {
  display: grid;
  grid-template-columns: 56px repeat(7, minmax(108px, 1fr));
  min-width: 820px;
  background: var(--surface);
}

.wb-corner {
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.wb-day-head {
  padding: 9px 6px 8px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line-soft);
  background: var(--surface);
}
.wb-day-head:last-of-type { border-right: 0; }
.wb-day-head .dow {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 650;
}
.wb-day-head .dnum {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.wb-day-head .dmon { font-size: 9.5px; color: var(--muted); text-transform: capitalize; }
.wb-day-head.today { background: #fdf7f3; }
.wb-day-head.today .dnum { color: var(--accent); }

.wb-rail {
  border-right: 1px solid var(--line-soft);
  background: var(--surface-2);
  padding-top: 0;
}
.wb-hour {
  font-size: 9.5px;
  color: var(--muted);
  text-align: right;
  padding: 2px 7px 0 0;
  border-bottom: 1px solid var(--line-soft);
  font-variant-numeric: tabular-nums;
}

.wb-col { border-right: 1px solid var(--line-soft); }
.wb-col:last-of-type { border-right: 0; }
.wb-col-body { position: relative; }
.wb-col-body.today { background: #fdfaf6; }
.wb-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line-soft);
  pointer-events: none;
}

.wb-col-body .event {
  left: 3px;
  right: 3px;
  padding: 3px 5px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.wb-col-body .event:hover { filter: brightness(0.97); }

@media (max-width: 720px) {
  .week-board { grid-template-columns: 44px repeat(7, minmax(92px, 1fr)); min-width: 700px; }
  .wb-day-head .dnum { font-size: 15px; }
}
