/* Company activity report. Keep these rules after app.css so its print defaults cannot remove the palette. */
@media (min-width: 751px) {
  .shell { display: flex; flex-direction: column; min-height: 100dvh; }
  .shell > main { flex: 1; width: 100%; }
  .shell > footer { margin-top: auto; }
}
.piece-plan-actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 20px 20px; }
.stock-item-card.archived { opacity: .75; border-style: dashed; }
.workspace b img,.avatar img,.account-avatar img,.contact-avatar img{display:block;width:100%;height:100%;object-fit:cover;border-radius:inherit}
.workspace b{overflow:hidden;flex:none}
.workspace > .workspace-mark{box-sizing:border-box;display:grid;place-items:center;width:42px;min-width:42px;max-width:42px;height:42px;min-height:42px;max-height:42px;padding:0;flex:0 0 42px;overflow:hidden;border-radius:11px;line-height:1}
.workspace > .workspace-mark img{display:block;width:100%;max-width:100%;height:100%;max-height:100%;object-fit:contain;border-radius:0}
@media(max-width:750px){.workspace{gap:7px}.workspace > .workspace-mark{display:grid;width:32px;min-width:32px;max-width:32px;height:32px;min-height:32px;max-height:32px;flex-basis:32px}.workspace > span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}
.avatar,.account-avatar,.contact-avatar{overflow:hidden}
.piece-material{display:flex;flex-wrap:wrap;gap:9px;align-items:center;margin:0 20px 16px;padding:10px 13px;border:1px solid #5daac4;border-radius:12px;background:#126789;color:#edfaff}.piece-material strong{color:#ffb2b8;font-size:.78rem}.piece-material span{overflow-wrap:anywhere}
.workshop-members{display:flex;flex-wrap:wrap;gap:.45rem;margin:.75rem 0}
.member-chip,.article-count{display:inline-flex;align-items:center;padding:.35rem .7rem;border-radius:999px;background:rgba(255,255,255,.11);color:inherit;font-size:.78rem}
.assignment-list{display:grid;gap:.55rem;max-height:45vh;overflow:auto;margin:1rem 0}
.assignment-choice{display:flex;align-items:center;gap:.8rem;padding:.8rem 1rem;border:1px solid var(--line,rgba(255,255,255,.15));border-radius:1rem;background:rgba(255,255,255,.06)}
.assignment-choice input{width:1.15rem;height:1.15rem;flex:none}
.assignment-choice span{display:grid;gap:.15rem}.assignment-choice small{opacity:.7}
.article-bubbles{display:grid;gap:.65rem}.article-bubble{width:100%;display:grid;gap:.22rem;text-align:left;padding:1rem 1.15rem;border:1px solid var(--line,rgba(255,255,255,.15));border-radius:1.1rem;background:rgba(255,255,255,.06);color:inherit;cursor:pointer}.article-bubble:hover{border-color:var(--coral,#ff6066);transform:translateY(-1px)}.article-bubble strong{font-size:1.02rem}.article-bubble small{opacity:.75}.article-bubble span{color:var(--coral,#ff6066);font-size:.8rem}
.material-category-card{border-color:#69b9d3;background:linear-gradient(145deg,#0d7197,#0b5279);box-shadow:0 10px 26px #003c5a36}.material-category-card .stock-category-icon{color:#ff929a}.material-category-card strong{color:#fff}
.stock-access-trigger{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;padding:9px 13px;white-space:nowrap}.stock-access-trigger svg{width:18px;height:18px;color:#ff8f98}
.stock-access-choices{display:grid;gap:9px;max-height:min(55dvh,460px);overflow-y:auto;padding:2px 3px 5px}.stock-access-choice{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0;padding:13px 15px;border:1px solid #59a4c1;border-radius:14px;background:#12668a;color:#fff;font-weight:650}.stock-access-choice input{flex:none;width:22px;height:22px;margin:0;accent-color:#ff6974}
.message-shortcut{position:fixed;right:24px;bottom:24px;z-index:19;display:grid;place-items:center;width:56px;height:56px;padding:0;border:1px solid #8dc9df;border-radius:18px;background:linear-gradient(145deg,#1786b0,#075276);color:#fff;box-shadow:0 10px 26px #003a5e73;cursor:pointer}.message-shortcut:hover{transform:translateY(-2px);background:linear-gradient(145deg,#209ac1,#08618b)}.message-shortcut svg{width:27px;height:27px}.message-shortcut .nav-count{position:absolute;top:-7px;right:-7px;border:2px solid #0b709d;color:#fff}.message-shortcut:focus-visible{outline:3px solid #ff8d8e;outline-offset:3px}
body:has(dialog[open]) .message-shortcut{display:none}
@media(max-width:750px){.message-shortcut{right:16px;bottom:calc(84px + env(safe-area-inset-bottom))}.phone-shell .message-shortcut{right:max(16px,calc((100vw - 540px)/2 + 16px));bottom:calc(100px + env(safe-area-inset-bottom))}}
@media print{.message-shortcut{display:none!important}}
.legacy-teams{margin-top:1.2rem;padding:1rem 1.2rem}.legacy-teams summary{cursor:pointer;font-weight:700}.legacy-teams .team-list{margin:.8rem 0}
.report-intro {
  padding: 24px 27px;
  border: 1px solid #62acc6;
  border-left: 6px solid #ff6974;
  border-radius: 22px;
  background: linear-gradient(125deg, #0a547c, #0b709d 72%, #1387ab);
  box-shadow: 0 16px 35px #023b5a30;
}
.report-intro .eyebrow { color: #ffafb5; }
.report-intro h1 { font: 800 clamp(1.6rem, 3vw, 2.4rem) Manrope, sans-serif; color: #fff; line-height: 1.12; margin: 8px 0 4px; overflow-wrap: anywhere; }
.report-intro h2 { font-size: 1rem; font-weight: 650; color: #e9f8ff; margin: 0 0 11px; }
.report-intro p { color: #d5eef8; max-width: 750px; }
.report-intro button { flex: none; border-color: #9ed6e9; color: #fff; }
.report-overview { margin: 22px 0 32px; }
.report-overview-head { margin: 0 0 14px; }
.report-overview-head .eyebrow { color: #ff9099; }
.report-overview-head h2 { font: 750 1.28rem Manrope, sans-serif; color: #f6fcff; margin: 3px 0 5px; }
.report-overview-head p { font-size: .8rem; color: #b8dce9; margin: 0; }
.report-trend-panel {
  border: 1px solid #4e9fbe;
  border-radius: 20px;
  background: linear-gradient(145deg, #0d5c86, #084264);
  padding: 18px;
  margin: 0 0 13px;
  box-shadow: 0 10px 24px #023e5b24;
  break-inside: avoid-page;
}
.report-trend-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.report-trend-panel h3 { font-size: 1.05rem; color: #fff; margin: 3px 0; }
.report-trend-panel header p { font-size: .77rem; color: #c4e7f4; margin: 0; }
.report-trend-panel header > strong { font-size: .76rem; color: #fff; border-radius: 30px; background: #147da4; padding: 9px 12px; text-align: right; }
.report-trend-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.report-trend-card { display: grid; align-content: start; gap: 5px; min-width: 0; min-height: 126px; padding: 13px; border-radius: 15px; background: #165e83; border: 1px solid #5fa8c0; color: #fff; }
.report-trend-card > span { font-size: .73rem; color: #dcf3fa; }
.report-trend-card > strong { font: 800 1.35rem Manrope, sans-serif; overflow-wrap: anywhere; }
.report-trend-card small { font-size: .7rem; color: #e7f6fb; }
.report-trend-card small em { font-style: normal; font-weight: 750; display: block; }
.report-trend-before { opacity: .76; }
.report-trend-card.better { background: #0c665f; border-color: #75d3bd; }
.report-trend-card.better small em { color: #b9ffdd; }
.report-trend-card.worse { background: #874252; border-color: #ff9a9c; }
.report-trend-card.worse small em { color: #ffe0df; }
.report-trend-card.stable { background: #245f82; }
.report-trend-card.unknown { background: #385c70; border-color: #709caf; }
.report-section > h2 { color: #eaf7ff; border-left: 4px solid #ff6974; padding-left: 11px; }
.report-bubble, .report-detail-bubble { background: linear-gradient(145deg, #0e608a, #0a496e); border-color: #50a2bf; color: #f7fdff; }
.report-bubble > span, .report-detail-row { color: #d0eaf4; }
.report-bubble small, .report-detail-bubble small { color: #b7dce9; }
@media (max-width: 840px) {
  .report-trend-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-trend-panel > header { display: block; }
  .report-trend-panel header > strong { display: inline-block; text-align: left; margin-top: 10px; }
}
@media (max-width: 430px) {
  .report-intro { padding: 19px; }
  .report-trend-panel { padding: 14px; }
  .report-trend-card { min-height: 125px; padding: 10px; }
  .report-trend-card > strong { font-size: 1.1rem; }
  .report-trend-panel header p { line-height: 1.45; }
}
@media print {
  #print-area:has(.range-report-print) { max-width: none !important; width: 100% !important; display: block !important; }
  #print-area .range-report-print, #print-area .range-report-print * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  #print-area .range-report-print { font: 9pt Arial, sans-serif; color: #17374a !important; background: #fff !important; }
  #print-area .report-intro { display: block; background: #0b709d !important; border: 0 !important; border-left: 5mm solid #ff6974 !important; border-radius: 4mm; padding: 6mm; margin: 0 0 5mm; box-shadow: none !important; break-inside: avoid-page; page-break-inside: avoid; }
  #print-area .report-intro .eyebrow { color: #ffbec3 !important; }
  #print-area .report-intro h1 { font: 800 24pt Arial, sans-serif; color: #fff !important; margin: 2mm 0 1mm; }
  #print-area .report-intro h2 { font: 700 11pt Arial, sans-serif; color: #e7f7ff !important; margin: 0 0 3mm; }
  #print-area .report-intro p { font-size: 7.5pt; line-height: 1.4; color: #d5effa !important; margin: 0; }
  #print-area .report-intro button { display: none !important; }
  #print-area .report-overview { margin: 0 0 5mm; }
  #print-area .report-overview-head { margin: 0 0 3mm; }
  #print-area .report-overview-head .eyebrow { color: #ce4d60 !important; }
  #print-area .report-overview-head h2 { color: #0b5279 !important; font: 700 13pt Arial, sans-serif; margin: 1mm 0; }
  #print-area .report-overview-head p { color: #3e6578 !important; font-size: 7.5pt; }
  #print-area .report-trend-panel { background: #e9f4fa !important; border: 1px solid #a5ccdf !important; border-left: 3mm solid #0b709d !important; border-radius: 3mm; padding: 3mm; margin: 0 0 3mm; box-shadow: none !important; break-inside: avoid-page; page-break-inside: avoid; }
  #print-area .report-trend-panel > header { display: flex; align-items: center; min-height: 0 !important; height: auto !important; padding: 0 !important; margin-bottom: 2mm; gap: 4mm; background: transparent !important; border: 0 !important; box-shadow: none !important; color: #17374a !important; }
  #print-area .report-trend-panel > header .eyebrow { color: #0b709d !important; }
  #print-area .report-trend-panel h3 { font: 700 10pt Arial, sans-serif; color: #0a5076 !important; margin: 0; }
  #print-area .report-trend-panel header p { font-size: 6.8pt; color: #3e6478 !important; }
  #print-area .report-trend-panel header > strong { font-size: 7pt; color: #0a5076 !important; background: transparent !important; padding: 0; max-width: 45mm; }
  #print-area .report-trend-grid { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 2mm; }
  #print-area .report-trend-card { min-height: 0; padding: 2.5mm; background: #fff !important; color: #17374a !important; border: 1px solid #b4d0de !important; border-radius: 2mm; gap: 1mm; break-inside: avoid-page; }
  #print-area .report-trend-card.better { background: #d8f3e7 !important; border-color: #56b38e !important; }
  #print-area .report-trend-card.worse { background: #ffe3e3 !important; border-color: #e67880 !important; }
  #print-area .report-trend-card.unknown { background: #e5edf1 !important; }
  #print-area .report-trend-card > span, #print-area .report-trend-card > strong, #print-area .report-trend-card small { color: #163a50 !important; }
  #print-area .report-trend-card > strong { font: 700 12pt Arial, sans-serif; }
  #print-area .report-trend-card small { font-size: 6.7pt; }
  #print-area .report-trend-card.better small em { color: #086746 !important; }
  #print-area .report-trend-card.worse small em { color: #a52937 !important; }
  #print-area .report-section { margin: 5mm 0; break-inside: auto; }
  #print-area .report-section > h2 { font: 700 11pt Arial, sans-serif; color: #0b5279 !important; border: 0; border-left: 2mm solid #ff6974 !important; padding: 1mm 0 1mm 2mm; margin: 0 0 2mm; break-after: avoid-page; page-break-after: avoid; }
  #print-area .report-card-grid { display: block !important; font-size: 0; }
  #print-area .report-bubble, #print-area .report-detail-bubble { display: inline-block; vertical-align: top; box-sizing: border-box; width: calc(33.333% - 2mm); margin: 0 2mm 2mm 0; padding: 3mm; background: #ecf6fb !important; border: 1px solid #b6d7e6 !important; border-left: 1.2mm solid #2587ae !important; border-radius: 2.5mm; color: #17374a !important; font-size: 8pt; break-inside: avoid-page !important; page-break-inside: avoid !important; box-shadow: none !important; }
  #print-area .report-detail-bubble { width: calc(50% - 2mm); background: #f1f8fb !important; }
  #print-area .report-bubble > span, #print-area .report-detail-bubble > span, #print-area .report-bubble strong, #print-area .report-detail-bubble strong, #print-area .report-detail-row span, #print-area .report-detail-row b, #print-area .report-bubble small, #print-area .report-detail-bubble small { color: #17374a !important; }
  #print-area .report-bubble > span, #print-area .report-bubble strong, #print-area .report-bubble small, #print-area .report-detail-bubble > strong, #print-area .report-detail-bubble > small { display: block; margin-bottom: 1mm; }
  #print-area .report-bubble strong { font: 700 13pt Arial, sans-serif !important; }
  #print-area .report-detail-row { display: flex; justify-content: space-between; gap: 3mm; margin: 1.2mm 0; font-size: 7.2pt; line-height: 1.2; }
  #print-area .report-detail-row b { text-align: right; overflow-wrap: anywhere; }
  #print-area .time-split { height: 3mm; border: 0 !important; background: #d8e9f0 !important; margin: 0 0 2mm; }
  #print-area .time-work { background: #1bb49e !important; }
  #print-area .time-pause { background: #ff9d68 !important; }
  #print-area .time-wait { background: #6e95aa !important; }
  #print-area .report-detail-bubble .badge { display: inline-block; background: #e5eef3 !important; border: 1px solid #a5c2d0 !important; color: #23465a !important; margin: 1mm 1mm 0 0; }
  #print-area .report-detail-bubble.urgency-late { background: #ffeded !important; border-left-color: #dc5262 !important; }
  #print-area .report-detail-bubble.urgency-soon { background: #fff2df !important; border-left-color: #e79b32 !important; }
}
/* Le logo importé reste dans son emplacement, même sur l'écran d'accueil iPhone. */
.phone-wordmark > .phone-logo.company-phone-logo {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 3px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 11px;
  background: rgba(255,255,255,.08);
}
.phone-wordmark > .phone-logo.company-phone-logo img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform: none;
  filter: none;
  mix-blend-mode: normal;
}
.phone-wordmark .phone-brand-label,
.manager-header-brand span { min-width: 0; max-width: min(45vw, 230px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 750px) {
  .auth-content .wizard-actions {
    position: sticky;
    bottom: 0;
    z-index: 4;
    display: grid;
    grid-template-columns: minmax(90px, 1fr) minmax(0, 2fr);
    gap: 10px;
    margin-top: 22px;
    margin-inline: -22px;
    padding: 12px 22px calc(12px + env(safe-area-inset-bottom));
    background: #0b709d;
    box-shadow: 0 -9px 20px #064f7255;
  }
  .auth-content .wizard-actions button { min-width: 0; min-height: 50px; }
  .auth-content .password-line input { min-width: 0; }
  .auth-content .password-toggle { flex: none; min-width: 74px; padding-inline: 10px; }
}
