:root {
  --navy: #09115a;
  --blue: #4159a8;
  --muted: #7284b5;
  --orange: #ff4e28;
  --line: #e7ecf5;
  --green: #00ba83;
  --purple: #8151ff;
  --surface: #fafbfe;
  --rail: 58px;
  --dossier: 160px;
  --right: 335px;
  --record-field-value-size: 15px;
  color: var(--navy);
  font-family: 'Roboto Condensed', 'Arial Narrow', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  font-synthesis: none;
}
:root[data-theme='dark'] {
  --navy: #e7ecf7;
  --blue: #6f8be0;
  --muted: #8a98c0;
  --orange: #ff7a5a;
  --line: #1c2238;
  --green: #2bd8a0;
  --purple: #a07cff;
  --surface: #0f1322;
  color-scheme: dark;
  color: #e7ecf7;
  background: #0f1322;
}
:root[data-theme='dark'] body {
  background: #0f1322;
  color: #e7ecf7;
}
:root[data-theme='dark'] .layout,
:root[data-theme='dark'] .topbar,
:root[data-theme='dark'] .modules,
:root[data-theme='dark'] .dossier,
:root[data-theme='dark'] .right-panel,
:root[data-theme='dark'] main,
:root[data-theme='dark'] .card,
:root[data-theme='dark'] .data-table,
:root[data-theme='dark'] .modal-card,
:root[data-theme='dark'] .menu-list .btn,
:root[data-theme='dark'] .settings-hub,
:root[data-theme='dark'] fieldset,
:root[data-theme='dark'] .theme-fieldset,
:root[data-theme='dark'] .theme-option,
:root[data-theme='dark'] .preferences-form,
:root[data-theme='dark'] .status-pill,
:root[data-theme='dark'] .details dt,
:root[data-theme='dark'] .details dd,
:root[data-theme='dark'] .field-help,
:root[data-theme='dark'] input,
:root[data-theme='dark'] select,
:root[data-theme='dark'] textarea {
  background-color: #141a2e;
  color: #e7ecf7;
  border-color: #1c2238;
}
:root[data-theme='dark'] .module-group > button {
  background-color: #141a2e;
}
:root[data-theme='dark'] .module-submenu {
  background-color: #141a2e;
  border-color: #1c2238;
}
:root[data-theme='dark'] .icon-btn {
  background-color: transparent;
  color: #e7ecf7;
}
:root[data-theme='dark'] .card,
:root[data-theme='dark'] .settings-hub,
:root[data-theme='dark'] .theme-fieldset,
:root[data-theme='dark'] fieldset {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
:root[data-theme='dark'] .status-pill.tone-success {
  background: #163327;
  color: #6cf3c0;
}
:root[data-theme='dark'] .status-pill.tone-warn {
  background: #3a2a13;
  color: #ffc87a;
}
:root[data-theme='dark'] .status-pill.tone-danger {
  background: #3b1818;
  color: #ff8d8d;
}
:root[data-theme='dark'] .status-pill.tone-info {
  background: #14243f;
  color: #8fb1ff;
}
:root[data-theme='dark'] .theme-swatch-light {
  background: linear-gradient(135deg, #ffffff, #d8def0);
}
:root[data-theme='dark'] .theme-swatch-dark {
  background: linear-gradient(135deg, #1a2040, #06081a);
}
@media (min-width: 1550px) {
  :root {
    --record-field-value-size: 13px;
  }
}
body[data-view] .record-field-stats .stat strong {
  font-size: var(--record-field-value-size);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #fff;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #4378ff;
  outline-offset: 3px;
}
button {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}
input,
select,
textarea {
  color: var(--blue);
  background: #fff;
  border: 1px solid #dfe6f2;
  border-radius: 6px;
  padding: 9px 12px;
  min-width: 0;
}
input[type='checkbox'] {
  appearance: none;
  width: 15px;
  height: 15px;
  padding: 0;
  border: 1px solid #9fb2dd;
  border-radius: 3px;
  vertical-align: middle;
  cursor: pointer;
  background: white;
}
input[type='checkbox']:checked {
  background: var(--orange);
  border-color: var(--orange);
  box-shadow: inset 0 0 0 3px #fff;
}
select {
  padding-right: 30px;
}
small {
  font-size: 12px;
  color: var(--muted);
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.65px;
}
h2 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--blue);
}
h3 {
  font-size: 14px;
  font-weight: 500;
}
.icon {
  width: 20px;
  height: 20px;
  flex: none;
  vertical-align: middle;
}
.icon-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 8px;
  border: 0;
  background: transparent;
  min-width: 34px;
}
.btn {
  min-height: 35px;
  padding: 7px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--blue);
  white-space: nowrap;
  background: #fff;
}
.btn:hover {
  background: #f7f9fe;
  border-color: #cbd7f0;
}
.btn .icon {
  width: 17px;
  height: 17px;
}
.btn.small {
  min-height: 28px;
  padding: 4px 10px;
  font-size: 12px;
}
.btn.primary {
  color: white;
  border-color: var(--orange);
  background: var(--orange);
}
.btn.primary:hover {
  background: color-mix(in srgb, var(--orange) 88%, black);
}
.btn.soft {
  color: var(--orange);
  background: #fff3ee;
  border-color: #ffded1;
}
.btn.square {
  width: 36px;
  padding: 7px;
}
.btn.danger {
  color: #f22d34;
}
.purple-button {
  color: #fff !important;
  background: linear-gradient(110deg, #925cff, #7851ef) !important;
  border: 0 !important;
}
.topbar {
  height: 54px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 18px;
  background: #fff;
  position: relative;
  z-index: 5;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 210px;
}
.brand > svg {
  width: 31px;
  height: 35px;
}
.brand strong {
  font-family: 'Roboto Condensed', Arial, sans-serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.4px;
}
.global-search {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: auto;
  width: min(46vw, 740px);
  height: 35px;
  background: #f9fafe;
  color: var(--muted);
  text-align: left;
  padding: 7px 11px;
}
.global-search span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.global-search .icon {
  width: 17px;
}
.global-search kbd {
  margin-left: auto;
  white-space: nowrap;
  border: 1px solid #e5eafa;
  border-radius: 4px;
  padding: 0 5px;
  background: white;
  color: var(--blue);
}
.top-create {
  flex: 0 0 auto;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}
.top-actions .icon-btn {
  color: var(--blue);
  padding: 4px;
  min-width: 24px;
}
.notification {
  position: relative;
}
.notification:after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 100%;
  background: #ff4b35;
  position: absolute;
  top: 0;
  right: 2px;
  border: 1px solid #fff;
}
.company {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 35px;
  padding: 5px 10px;
  color: var(--blue);
  white-space: nowrap;
}
.company > .icon {
  width: 16px;
}
.profile {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 0;
  padding: 0;
  text-align: left;
  white-space: nowrap;
}
.profile > b {
  font-size: 14px;
}
.profile small {
  display: block;
  font-size: 11px;
}
.profile > .icon {
  width: 14px;
  margin-left: 12px;
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  overflow: hidden;
}
.profile .avatar {
  width: 36px;
  height: 36px;
}
.avatar.initials {
  font-size: 14px;
  font-weight: 600;
}
.mint {
  color: #008a66;
  background: #d0f4e7;
}
.lavender {
  color: #6536d5;
  background: #ece1ff;
}
.peach {
  color: #ff5631;
  background: #ffe7df;
}
.ice {
  color: #2970d8;
  background: #dfebff;
}
.photo.avatar {
  width: 32px;
  height: 32px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 5px;
}
.photo {
  display: block;
  overflow: hidden;
  width: 100%;
  height: 100%;
  border-radius: 6px;
}
.layout {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr) var(--right);
  height: calc(100vh - 54px);
}
.layout.with-dossier {
  grid-template-columns: var(--rail) var(--dossier) minmax(0, 1fr) var(--right);
}
.layout.without-right-panel {
  grid-template-columns: var(--rail) minmax(0, 1fr);
}
.layout.with-dossier.without-right-panel {
  grid-template-columns: var(--rail) var(--dossier) minmax(0, 1fr);
}
.layout.with-left-panel.without-right-panel {
  grid-template-columns: var(--rail) 220px minmax(0, 1fr);
}
.layout.with-left-panel {
  grid-template-columns: var(--rail) 220px minmax(0, 1fr) var(--right);
}
.context-left-panel {
  min-width: 0;
  overflow: auto;
  padding: 12px 10px;
  border-right: 1px solid var(--line);
  background: #fbfaf8;
}
.context-left-panel .card { margin-bottom: 12px; }
.modules {
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0 14px;
  gap: 6px;
  background: linear-gradient(90deg, #fafafa, #fff);
  position: relative;
}
.modules > a,
.modules > button {
  width: 42px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #2f4a9e;
}
.modules > a.active {
  background: #fff1e9;
  color: var(--orange);
  border-radius: 9px;
}
.modules .module-group {
  flex: none;
}
.modules > .bottom {
  margin-top: auto;
}
.modules-expanded {
  --rail: 155px;
}
.modules-expanded .modules > a {
  width: 100%;
  justify-content: flex-start;
  padding-left: 15px;
  gap: 9px;
}
.modules-expanded .modules > a:after {
  content: attr(aria-label);
  font-size: 13px;
}
.dossier {
  overflow: auto;
  background: linear-gradient(90deg, #faf9f7, #fff);
  border-right: 1px solid var(--line);
  padding: 10px 7px 12px;
}
.dossier > h2 {
  font-size: 15px;
  line-height: 1.35;
  padding: 0 7px 7px;
}
.dossier > h2 .dossier-client {
  display: block;
  margin-bottom: 2px;
}
.dossier > h2 .dossier-client small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}
.dossier > h2 .dossier-project-title {
  display: flex;
  align-items: flex-start;
  gap: 5px;
}
.dossier-project-icon {
  width: 15px;
  height: 15px;
  flex: none;
  margin-top: 2px;
  color: var(--blue);
}
.dossier nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dossier nav > a {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 48px;
  padding: 4px;
  border-radius: 6px;
  border-left: 2px solid transparent;
}
.dossier nav > a.active {
  background: #fff0e9;
  border-left-color: var(--orange);
  color: var(--orange);
}
.dossier nav > a b {
  display: block;
  font-size: 13px;
  line-height: 1.25;
}
.dossier nav > a small {
  display: block;
  color: #7184bc;
  margin-top: 2px;
  font-size: 12px;
}
.doc-icon {
  width: 28px;
  height: 28px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dossier-link-icon {
  width: 22px;
  height: 22px;
  color: #334b9c;
}
.mini-document {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 4px;
  background: white;
  position: relative;
  gap: 4px;
}
.mini-document i {
  font-size: 5px;
  font-style: normal;
  color: var(--navy);
  font-weight: 700;
}
.mini-document b {
  height: 7px;
  width: 100%;
  background: linear-gradient(90deg, #e9eef8 40%, #fff 40%, #dce5f6 80%);
  margin-bottom: 3px;
}
.mini-document em {
  height: 2px;
  background: #d9e1ed;
  display: block;
}
.mini-document em:nth-child(4) {
  width: 72%;
}
.mini-document em:nth-child(6) {
  background: #ffe1d3;
}
.mini-document:after {
  content: '';
  background: #e7ebf2;
  height: 1px;
  position: absolute;
  bottom: 2px;
  width: 90%;
}
main {
  padding: 14px 16px 18px;
  overflow: auto;
  min-width: 0;
  background: linear-gradient(130deg, #fff 65%, #fdfdfd);
}
.right-panel {
  position: relative;
  min-width: 0;
  border-left: 1px solid var(--line);
  padding: 10px 11px 16px;
  background: linear-gradient(90deg, #fbfaf8, #fff);
  overflow: visible;
}
.right-tabs {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
  position: relative;
  background: #fff;
  z-index: 2;
}
.right-tabs > button {
  border: 0;
  border-bottom: 2px solid transparent;
  flex: 1;
  padding: 11px 2px;
  color: var(--blue);
  border-radius: 6px 6px 0 0;
  white-space: nowrap;
  font-size: 14px;
}
.right-tabs > button[aria-selected='true'] {
  background: #fff;
  color: var(--primary, #4f46e5);
  border-bottom-color: var(--primary, #4f46e5);
}
.right-panel-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--primary, #4f46e5);
}
.mailbox-list {
  display: grid;
  gap: 6px;
}
.mailbox-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  text-decoration: none;
  color: inherit;
}
.mailbox-row:hover {
  background: #f9fafb;
}
.mailbox-row-email {
  font-weight: 600;
  font-size: 13px;
  word-break: break-all;
}
.mailbox-row-kind {
  font-size: 11px;
  color: #6b7280;
  text-transform: uppercase;
}
.badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
}
.badge-active { background: #dcfce7; color: #166534; }
.badge-error_auth { background: #fee2e2; color: #991b1b; }
.badge-error_network { background: #fef3c7; color: #92400e; }
.badge-paused { background: #e5e7eb; color: #374151; }
.mailbox-linked {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}
.mailbox-linked li {
  display: grid;
  gap: 2px;
  padding: 6px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
}
.mailbox-linked small { color: #6b7280; font-size: 11px; }
.toolbar { display: flex; gap: 8px; align-items: center; }
#right-content {
  height: calc(100% - 48px);
  overflow: auto;
  scrollbar-width: thin;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.panel-toggle {
  position: absolute;
  left: -26px;
  top: 22px;
  width: 26px;
  height: 48px;
  border-radius: 6px 0 0 6px;
  background: #eef1ff;
  border: 1px solid #a8b5ed;
  box-shadow: 0 2px 6px #1423601f;
  z-index: 3;
  color: #334b9c;
}
.panel-toggle:hover,
.panel-toggle:focus-visible {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}
.panel-toggle .icon {
  width: 15px;
}
.right-hidden {
  --right: 0px;
}
.right-hidden .right-panel {
  padding: 0;
  border: 0;
}
.right-hidden .right-tabs,
.right-hidden #right-content {
  display: none;
}
.right-hidden .right-panel .panel-toggle {
  left: -27px;
  transform: rotate(180deg);
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 4px 0 17px;
}
.page-heading > div {
  display: flex;
  align-items: center;
  gap: 16px;
}
.page-heading p {
  font-size: 16px;
  color: var(--muted);
  margin-top: 5px;
}
.page-icon .icon {
  width: 41px;
  height: 41px;
  color: var(--orange);
}
.favorite {
  color: #ff761c;
  width: 25px;
  height: 25px;
  vertical-align: baseline;
  margin-left: 7px;
  stroke-width: 1.4;
}
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  color: #7284bd;
  margin: 0 0 6px;
  font-size: 14px;
}
.record-breadcrumb-line {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  margin-bottom: 6px;
}
.record-breadcrumb-line .breadcrumb {
  flex: 1 1 auto;
  min-width: 0;
  margin-bottom: 0;
}
.record-breadcrumb-line .record-save-status {
  flex: 0 0 auto;
  margin: 0;
  color: var(--muted);
  white-space: nowrap;
}
.breadcrumb > .icon {
  width: 12px;
  height: 12px;
}
.record-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 14px;
}
.record-heading .page-heading {
  margin: 0;
}
.record-heading > small {
  text-align: right;
  font-size: 13px;
  line-height: 1.6;
}
.record-header-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  margin-right: 30px;
  white-space: nowrap;
}
.record-header-meta > span {
  display: inline-flex;
  align-items: flex-start;
  color: var(--muted);
}
.record-header-main {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  white-space: nowrap;
}
.record-header-meta small {
  font-size: 12px;
}
.record-header-meta strong {
  color: var(--navy);
  font-size: 20px;
}
.record-header-link {
  color: var(--blue);
  text-decoration: none;
}
.record-header-link:hover,
.record-header-link:focus-visible {
  text-decoration: underline;
}
.record-header-amount {
  min-width: 190px;
  flex-direction: column;
  align-items: flex-start !important;
  gap: 1px !important;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}
.record-header-amount > .record-save-status {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 10px;
  gap: 4px;
}
.record-header-amount > .record-save-status > .record-save-icon {
  width: 12px;
  height: 12px;
  display: inline-block;
  visibility: visible;
  color: var(--blue);
  stroke-width: 2.2;
}
.record-heading .page-heading p {
  font-size: 16px;
  line-height: 22px;
  margin-top: 2px;
}
.record-inline-value {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: text;
}
.record-inline-value:hover,
.record-inline-value:focus-visible,
.record-inline-heading:hover,
.record-inline-heading:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 3px;
}
.record-inline-heading { cursor: text; }
.record-inline-editor {
  width: min(100%, 28rem);
  min-height: 2rem;
  padding: 4px 7px;
  border: 1px solid var(--blue);
  border-radius: 4px;
  background: var(--surface);
  color: var(--navy);
  font: inherit;
}
textarea.record-inline-editor { min-height: 6rem; }
.record-heading .badge {
  margin-left: 12px;
  vertical-align: middle;
}
.record-heading h1 {
  font-size: 31px;
}
.tabs {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: auto;
  min-height: 41px;
  background: linear-gradient(#fcfdff, #f7f9fd);
  margin: 12px 0 8px;
  scrollbar-width: thin;
}
.tabs > button {
  background: none;
  border: 0;
  border-right: 1px solid #ebeff7;
  border-bottom: 2px solid transparent;
  flex: 1;
  border-radius: 0;
  padding: 10px 13px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--blue);
  min-width: max-content;
}
.tabs > button:last-child {
  border-right: 0;
}
.tabs > button.active {
  background: linear-gradient(#fff1e9, #fff);
  border-bottom-color: var(--orange);
  color: var(--orange);
}
.tabs > button.inactive-feature-tab {
  background: #f0f2f5;
  color: #687387;
}
.tabs > button.inactive-feature-tab.active {
  background: #e7eaf0;
  border-bottom-color: #8993a3;
  color: #4f5a6c;
}
.tabs > button > .icon {
  width: 18px;
  height: 18px;
}
.article-disabled-features {
  display: grid;
  gap: 8px;
}
.article-disabled-feature {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e1e5eb;
  border-radius: 6px;
  background: #f6f7f9;
  color: #596476;
}
.article-disabled-feature p {
  margin: 3px 0 0;
  color: #687387;
}
.article-disabled-action {
  flex: none;
}
.article-disabled-card .card-heading {
  color: #687387;
}
.tabs.compact {
  width: max-content;
  max-width: 100%;
}
.tabs.tabs-icon-only {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
}
.tabs.tabs-icon-only > button {
  flex: none;
  padding: 10px 16px;
}
.filters {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  margin: 12px 0;
  background: #fff;
}
.filters > select,
.filters > .search-field {
  flex: 1;
  min-width: 0;
  height: 38px;
  font-size: 13px;
}
.filters > .search-field {
  flex: 1.5;
}
.search-field {
  display: flex;
  align-items: center;
  border: 1px solid #dfe6f2;
  border-radius: 6px;
  padding-left: 12px;
  background: #fff;
  color: var(--blue);
}
.search-field input {
  border: 0;
  width: 100%;
  background: transparent;
  padding-left: 10px;
}
.search-field .icon {
  width: 17px;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}
.toolbar .spacer {
  flex: 1;
}
.toolbar > strong {
  font-size: 16px;
}
.toolbar.wrap {
  flex-wrap: wrap;
}
.section-space {
  margin-top: 14px;
}
.collection-head {
  padding: 8px 4px 0;
}
.collection-head .page-heading {
  margin-bottom: 14px;
}
.collection-head .tabs {
  width: max-content;
}
.collection-head .tabs > button {
  min-width: 125px;
}
.personal-task-controls .catalogue-filters {
  display: grid;
  grid-template-columns: 2fr repeat(4, minmax(120px, 1fr));
  gap: 10px;
}
.personal-task-controls .catalogue-filters > label {
  min-width: 0;
}
.personal-task-controls input,
.personal-task-controls select {
  width: 100%;
}
.personal-task-calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 14px;
  align-items: start;
}
.personal-task-calendar-layout > .card { min-width: 0; }
.personal-calendar-planner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.personal-calendar-planner label { display: flex; align-items: center; gap: 8px; }
.personal-calendar-drop { flex: 1; min-width: 170px; padding: 10px; border: 1px dashed var(--line); border-radius: 7px; text-align: center; }
.sirene-lookup { display: grid; gap: 8px; }
.sirene-lookup > .btn { justify-self: start; }
.sirene-lookup [data-sirene-results] { display: grid; gap: 6px; }
.sirene-result { display: grid; gap: 2px; width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; background: #fff; text-align: left; cursor: pointer; }
.sirene-result:hover, .sirene-result:focus-visible { border-color: var(--orange); }
.sirene-result small { color: var(--muted); }
.company-essential-grid,
.company-extra-grid,
.contact-extra-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.company-essential-grid > .sirene-lookup,
.company-extra-grid > .full-width,
.contact-extra-grid > .full-width { grid-column: 1 / -1; }
.company-extra-fields > summary,
.contact-extra-fields > summary { cursor: pointer; color: var(--blue); font-weight: 600; }
.company-extra-grid,
.contact-extra-grid { margin-top: 12px; }
.company-logo-live-preview:empty { display: none; }
.company-logo-live-preview img { width: 48px; height: 48px; object-fit: contain; vertical-align: middle; margin-right: 8px; }
.contact-record-type { margin: 0; font-weight: 600; }
@media (max-width: 600px) {
  .company-essential-grid,
  .company-extra-grid,
  .contact-extra-grid { grid-template-columns: minmax(0, 1fr); }
}
.personal-task-calendar-row {
  display: grid;
  grid-template-columns: 120px minmax(220px, 1fr) max-content 120px;
  gap: 14px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.personal-task-calendar-row:last-child {
  border-bottom: 0;
}
.personal-task-calendar-row div {
  min-width: 0;
}
.personal-task-calendar-row small {
  display: block;
  margin-top: 4px;
}
@media (min-width: 1101px) {
  .personal-task-calendar-row { grid-template-columns: 90px minmax(0, 1fr) max-content; gap: 8px; }
  .personal-task-calendar-row > span:last-child { display: none; }
}
.personal-task-recommendations {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.personal-task-recommendation {
  margin: 0;
}
.personal-task-recommendation .card-body > strong {
  display: block;
  margin-bottom: 7px;
}
@media (max-width: 1100px) {
  .personal-task-calendar-layout { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .personal-task-controls .catalogue-filters {
    grid-template-columns: 1fr 1fr;
  }
  .personal-task-recommendations {
    grid-template-columns: 1fr 1fr;
  }
  .personal-task-calendar-row {
    grid-template-columns: 105px minmax(180px, 1fr) max-content;
  }
  .personal-task-calendar-row > span:last-child {
    display: none;
  }
}
@media (max-width: 600px) {
  .personal-task-controls .catalogue-filters,
  .personal-task-recommendations {
    grid-template-columns: 1fr;
  }
  .personal-task-calendar-row {
    grid-template-columns: 1fr;
  }
  .personal-task-calendar-row > span:last-child {
    display: block;
  }
  .personal-task-calendar-row .badge {
    justify-self: start;
  }
}
.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  min-width: 0;
  overflow: hidden;
}
.card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px 9px;
  min-height: 42px;
}
.card-heading h2 {
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-heading h2 > .icon {
  color: var(--orange);
  width: 22px;
  height: 22px;
}
.card-body {
  padding: 6px 14px 14px;
}
.card p {
  color: var(--muted);
}
.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 0 9px 10px;
}
.quick-actions-more {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.quick-actions-more[hidden] {
  display: none;
}
.btn.quick {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  min-height: 36px;
  padding: 7px 10px;
  font-size: 14px;
  white-space: normal;
}
.btn.quick.primary {
  color: white;
  border-color: var(--orange);
  background: var(--orange);
}
.btn.quick.primary > .icon:first-child,
.btn.quick.primary > .icon.quick-arrow {
  color: white;
}
.btn.quick-more-toggle {
  color: var(--blue);
  background: #f1f4ff;
  border-color: #cbd4fa;
}
.btn.quick > .icon {
  width: 21px;
  height: 21px;
  color: var(--purple);
  margin-right: 5px;
}
.btn.quick > .icon.quick-arrow {
  width: 12px;
  height: 12px;
  margin-left: auto;
  margin-right: 0;
  color: var(--blue);
}
.actions-card {
  flex-shrink: 0;
}
.ai-card {
  background: linear-gradient(120deg, #f8f3ff, #f1edff);
  border: 1px solid #efe6ff;
  border-radius: 8px;
  padding: 15px 13px;
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 8px;
  color: var(--navy);
}
.ai-card > .icon {
  width: 30px;
  height: 30px;
  color: var(--purple);
}
.ai-card p {
  color: #5b68b1;
  font-size: 14px;
  line-height: 1.35;
  margin-top: 5px;
}
.ai-card > .btn {
  grid-column: 1/-1;
  width: 100%;
  margin-top: 4px;
  min-height: 38px;
}
.ai-card .btn .icon {
  order: 2;
  margin-left: 10px;
}
.right-panel .card-heading {
  padding: 10px 12px;
}
.right-panel .details {
  padding: 0 14px 10px;
}
.right-panel .details > div {
  padding: 6px 0;
}
.right-panel .details dd {
  font-size: 16px;
  font-weight: 700;
}
.right-panel .details dt {
  font-size: 14px;
}
.details {
  margin: 0;
  padding: 0 15px 12px;
}
.details > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  border-bottom: 1px solid #eef1f7;
  padding: 6px 0;
  min-height: 32px;
}
.details > div:last-child {
  border: 0;
}
.details dt {
  color: var(--muted);
}
.details dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
}
.details.left dd {
  text-align: left;
}
.details a {
  color: #175dff;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  line-height: 1.25;
  white-space: nowrap;
  padding: 5px 12px;
  border-radius: 16px;
  font-weight: 400;
}
.badge > .icon {
  width: 12px;
  height: 12px;
  stroke-width: 3;
}
.green {
  color: #00aa75;
}
.badge.green {
  background: #def9ef;
  color: #009d6c;
}
.blue {
  color: #1760ff;
}
.badge.blue {
  background: #e8f0ff;
  color: #1457f5;
}
.red {
  color: #ff2929;
}
.badge.red {
  background: #ffe4e7;
  color: #ef2028;
}
.purple {
  color: var(--cx-ink-accent);
}
.badge.purple {
  background: #eee7ff;
  color: #793aff;
}
.yellow {
  color: #a35e00;
}
.badge.yellow {
  background: #fff4d8;
  color: #a96404;
}
.badge.grey {
  background: #edf0f6;
  color: #657394;
}
.tag-chip {
  padding: 4px 12px;
  border-radius: 14px;
  background: #dff8ef;
  color: #00866f;
  display: inline-block;
  font-size: 12px;
  margin: 3px 4px 0 0;
}
.tag-chip:nth-child(4n + 1) {
  background: #fff4d9;
  color: #915609;
}
.tag-chip:nth-child(4n + 3) {
  background: #e9e3ff;
  color: #7140d9;
}
.meter {
  display: block;
  height: 8px;
  background: #edf0f6;
  border-radius: 20px;
  overflow: hidden;
  width: 100%;
}
.meter > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #20d398, #06bf7d);
  border-radius: 20px;
}
.meter.blue > i {
  background: #4a89ff;
}
.meter.orange > i {
  background: var(--orange);
}
.meter.red > i {
  background: #ff3e39;
}
.meter.purple > i {
  background: #aa76f7;
}
.meter.yellow > i {
  background: #ffc83d;
}
.summary-stats {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.stat {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  min-width: 0;
}
.stat-icon {
  color: var(--orange);
}
.stat-icon > .icon {
  width: 29px;
  height: 29px;
}
.stat > div {
  min-width: 0;
}
.stat small {
  font-size: 13px;
  display: block;
}
.stat strong {
  font-size: 20px;
  display: block;
  margin: 3px 0;
  line-height: 1.15;
}
.stat > div > span {
  font-size: 13px;
  display: block;
  color: var(--muted);
}
.stat .green strong {
  color: var(--green);
}
.summary-stats .stat {
  padding: 10px 12px;
  height: 82px;
  gap: 10px;
}
.summary-stats .stat strong {
  font-size: 17px;
  white-space: nowrap;
}
.summary-stats .stat:first-child strong {
  white-space: normal;
  font-size: 15px;
}
.summary-stats .stat > div > span {
  font-size: 12px;
  white-space: nowrap;
}
.summary-stats .stat small {
  font-size: 12px;
}
.record-field-stats .stat strong {
  font-size: var(--record-field-value-size);
}
.hero-card {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 11px;
  display: grid;
  grid-template-columns: 225px minmax(180px, 1.2fr) minmax(280px, 1.7fr);
  gap: 20px;
  background: #fff;
}
.hero-photo {
  height: 145px;
}
.hero-info {
  padding: 1px 2px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.hero-person {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.hero-person > .icon {
  width: 30px;
  height: 30px;
  color: var(--navy);
  margin-top: 6px;
}
.hero-person strong {
  font-size: 17px;
  display: block;
}
.hero-person small {
  font-size: 14px;
}
.hero-description {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}
.hero-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.hero-metrics > .stat {
  border: 0;
  border-radius: 0;
  border-left: 1px solid #eef2f8;
  padding: 7px 12px;
  align-items: flex-start;
}
.hero-metrics > .stat:nth-child(n + 3) {
  border-top: 1px solid #eef2f8;
}
.hero-metrics .stat strong {
  font-size: 20px;
}
.hero-metrics .stat-icon > .icon {
  width: 26px;
  height: 26px;
}
.hero-metrics .meter {
  margin-top: 6px;
}
.grid {
  display: grid;
  gap: 12px;
}
.grid.three {
  grid-template-columns: 1.2fr 1fr 0.9fr;
}
.grid.opportunity-overview-grid {
  grid-template-columns: 1.4fr 1fr;
}
.opportunity-overview-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.grid.equal {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid.two {
  grid-template-columns: 1fr 1fr;
}
.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.wide-two {
  grid-column: span 2;
}
.full {
  grid-column: 1/-1;
}
.need-text {
  white-space: pre-line;
  font-size: 14px;
  line-height: 1.55;
  padding: 3px 14px 7px;
}
.card p.need-text {
  color: var(--navy);
}
.tags {
  padding: 0 14px 14px;
}
.bant-summary {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}
.bant-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}
.bant-row span {
  color: var(--muted);
}
.bant-row select {
  max-width: 65%;
}
.bant-suggestion {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid #edf1f7;
}
.person-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid #edf1f7;
}
.person-row:last-child {
  border: 0;
}
.person-row .avatar {
  width: 44px;
  height: 44px;
}
.person-row > div {
  flex: 1;
  min-width: 0;
}
.person-row strong {
  display: block;
  font-size: 14px;
}
.person-row p {
  font-size: 13px;
}
.person-row a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}
.person-row a > .icon {
  width: 13px;
  height: 13px;
}
.person-row .btn {
  margin-left: auto;
}
.event-detail {
  padding: 5px 14px 12px;
}
.event-detail h3 {
  font-size: 15px;
}
.event-detail p {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 13px;
  margin-top: 8px;
}
.event-detail p > .icon {
  width: 15px;
}
.event-detail > .description {
  line-height: 1.45;
  font-size: 14px;
  margin: 13px 0 10px;
}
.avatar-group {
  display: flex;
  gap: 3px;
}
.avatar-group .avatar {
  width: 28px;
  height: 28px;
}
.stage-track {
  display: flex;
  justify-content: space-between;
  padding: 12px 20px 15px;
}
.stage-track > :is(button, span) {
  position: relative;
  flex: 1;
  border: 0;
  background: none;
  padding: 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.stage-track > :is(button, span):before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  top: 10px;
  background: #d8deeb;
}
.stage-track > :is(button, span):first-child:before {
  left: 50%;
}
.stage-track > :is(button, span):last-child:before {
  right: 50%;
}
.stage-track i {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #bcc5d6;
  border: 2px solid #fff;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  margin: 0 auto 4px;
  color: white;
}
.stage-track .done i {
  background: var(--orange);
}
.stage-track .current i {
  border: 2px solid var(--orange);
  background: white;
  color: var(--orange);
}
.stage-track .current {
  color: var(--navy);
  font-weight: 700;
}
.stage-track i > .icon {
  width: 13px;
  height: 13px;
}
.next-step {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 9px 12px;
  margin: 0 10px 10px;
  background: #fff2e9;
  border-radius: 6px;
  font-size: 13px;
}
.next-step > .icon {
  color: var(--orange);
  width: 24px;
  height: 24px;
}
.next-step > div {
  flex: 1;
}
.next-step b {
  font-weight: 500;
  color: var(--orange);
}
.next-step small {
  display: block;
}
.document-list > button {
  display: flex;
  width: 100%;
  border: 0;
  border-top: 1px solid #edf1f7;
  border-radius: 0;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  text-align: left;
  background: white;
  font-size: 13px;
}
.document-list > button > .icon {
  color: var(--orange);
  width: 17px;
}
.document-list > button > span {
  flex: 1;
}
.document-list small {
  display: block;
  font-size: 12px;
}
.activity-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 9px 14px;
  border-bottom: 1px solid #f0f2f7;
  font-size: 13px;
}
.activity-row:last-child {
  border: 0;
}
.activity-row > .icon {
  color: #3f60ff;
  width: 19px;
  height: 19px;
}
.activity-row > div {
  flex: 1;
}
.activity-row p {
  font-size: 12px;
  margin-top: 3px;
}
.activity-row > small {
  white-space: nowrap;
}
.table-scroll {
  overflow: auto;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.data-table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  background: #fff;
  color: var(--blue);
  font-size: 13px;
}
.data-table th {
  background: linear-gradient(#fafbfd, #f4f6fa);
  font-weight: 400;
  white-space: nowrap;
  padding: 12px 13px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid #eef1f7;
}
.data-table td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid #eef1f7;
  padding: 6px 13px;
}
.data-table tr:last-child > td {
  border-bottom: 0;
}
.data-table th:last-child,
.data-table td:last-child {
  border-right: 0;
}
.data-table td strong {
  font-size: 14px;
  color: var(--navy);
  font-weight: 500;
}
.data-table td small {
  display: block;
  font-size: 13px;
  line-height: 1.4;
}
.data-table td .btn {
  font-size: 12px;
  padding: 3px;
  min-height: 24px;
}
.data-table tbody tr:hover:not(.group-row) {
  background: #fcfdff;
}
.quote-subscription-summary,
.quote-subscription-fields {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}
.quote-subscription-fields .form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.quote-subscription-fields .form-grid[hidden] {
  display: none;
}
.subscription-schedule {
  max-width: 100%;
  overflow-x: auto;
}
.data-table .num {
  text-align: right;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .quote-subscription-fields .form-grid {
    grid-template-columns: 1fr;
  }
}
.quote-lines th {
  padding: 8px 12px;
  text-align: center;
  font-size: 12px;
}
.quote-lines td {
  padding: 3px 10px;
  line-height: 1.2;
  height: 26px;
}
.quote-lines td .btn {
  border: 0;
  background: transparent;
  min-height: 16px;
  height: 16px;
  padding: 0;
  width: 22px;
}
.quote-lines td .btn:disabled {
  opacity: 1;
}
.quote-lines td:nth-child(3) {
  min-width: 195px;
}
.quote-lines th:first-child,
.quote-lines td:first-child {
  width: 34px;
}
.quote-lines td:nth-child(2) {
  width: 50px;
}
.quote-lines .group-row td {
  color: var(--navy);
  font-weight: 700;
  background: #e8f2ff;
  height: 27px;
  padding: 4px 12px;
}
.quote-lines .group-row.group-1 td {
  background: #e3f8ef;
}
.quote-lines .group-row.group-2 td {
  background: #fff4d3;
}
.quote-lines td .icon {
  width: 14px;
  height: 14px;
}
.quote-totals {
  display: grid;
  grid-template-columns: 1.8fr 1fr 0.9fr 0.9fr;
  gap: 8px;
  margin-top: 12px;
}
.quote-totals.quote-commercial-totals {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}
.quote-total-main {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.quote-total-main > strong {
  font-size: 14px;
  max-width: 110px;
}
.quote-total-main > .icon {
  color: var(--orange);
  width: 30px;
  height: 30px;
}
.quote-total-main .details {
  flex: 1;
  padding: 0;
}
.quote-total-main .details > div {
  padding: 0;
  border: 0;
  min-height: 18px;
  font-size: 13px;
}
.quote-totals .stat {
  padding: 12px;
  background: #eef9f5;
  border: 1px solid #e6f3ed;
}
.quote-totals .stat:nth-child(3) {
  background: #f0f6ff;
  border-color: #e5edfd;
}
.quote-totals .stat:nth-child(4) {
  background: #f6f1ff;
  border-color: #eee6ff;
}
.quote-totals .stat strong {
  font-size: 16px;
}
.quote-totals .stat small {
  font-size: 12px;
}
.quote-totals .stat > .stat-icon .icon {
  width: 21px;
  height: 21px;
}
.quote-category-breakdown {
  background: #f7f8fc;
  border: 1px solid #e6e9f2;
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  grid-row: span 2;
}
.quote-category-breakdown > h4 {
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.quote-category-breakdown > ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.quote-category-row {
  display: grid;
  grid-template-columns: 1fr auto 56px;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.quote-category-row > .num {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.quote-category-row > .muted {
  text-align: right;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.quote-line-category {
  font-size: 11px;
  text-transform: none;
  letter-spacing: 0;
}
.pagination {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 13px;
}
.pagination > span {
  margin-right: auto;
}
.pagination > button {
  min-width: 32px;
  height: 36px;
  color: var(--blue);
}
.pagination > button.active {
  color: var(--orange);
  border-color: #ffe5d8;
  background: #fff0e8;
}
.pagination > select {
  margin-left: 15px;
}
.kanban {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(152px, 1fr);
  gap: 7px;
  overflow-x: auto;
  align-items: start;
}
.kanban-column {
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: #f9fafb;
  padding-bottom: 5px;
  min-width: 0;
}
.kanban-heading {
  padding: 11px 12px 10px;
  position: relative;
  background: #e9edf2;
}
.kanban-heading.blue-bg {
  background: #e0eeff;
}
.kanban-heading.yellow-bg {
  background: #fff4d8;
}
.kanban-heading.orange-bg {
  background: #ffe3d8;
}
.kanban-heading.green-bg {
  background: #dcf7ed;
}
.kanban-heading.red-bg {
  background: #ffe0e8;
}
.kanban-heading > button {
  position: absolute;
  right: 8px;
  top: 11px;
  border: 0;
  background: transparent;
  padding: 0;
}
.kanban-heading h2 {
  font-size: 16px;
  margin-bottom: 3px;
}
.kanban-heading small {
  display: block;
  color: #536991;
  font-size: 13px;
}
.kanban-heading strong {
  display: block;
  font-size: 16px;
  margin-top: 2px;
}
.kanban-card {
  margin: 5px 5px 0;
  padding: 11px 10px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  cursor: grab;
  min-height: 155px;
  font-size: 13px;
  position: relative;
  box-shadow: 0 1px 1px #09115a02;
}
.kanban-card:active {
  cursor: grabbing;
}
.kanban-card h3 {
  font-size: 14px;
  line-height: 1.2;
  padding-right: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}
.kanban-card .card-more {
  position: absolute;
  right: 6px;
  top: 9px;
  border: 0;
  background: none;
  padding: 0;
}
.kanban-card .card-more .icon {
  width: 16px;
}
.kanban-card p {
  color: var(--blue);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 4px;
}
.kanban-card strong {
  display: block;
  font-size: 16px;
  margin: 5px 0 3px;
}
.kanban-card .due {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}
.kanban-card .due .icon {
  width: 14px;
  height: 14px;
}
.kanban-card .badge {
  padding: 4px 8px;
  margin-top: 7px;
  font-size: 12px;
}
.kanban-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--muted);
  gap: 10px;
}
.kanban-card footer > .avatar {
  width: 24px;
  height: 24px;
  font-size: 12px;
}
.kanban-card footer > span {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
}
.kanban-card footer .icon {
  width: 13px;
  height: 13px;
}
.kanban-column > .btn {
  margin: 5px;
  width: calc(100% - 10px);
  font-size: 12px;
  min-height: 31px;
  padding: 6px;
  background: #f1f3f7;
  white-space: normal;
}
.drop-active {
  outline: 2px solid var(--orange);
  outline-offset: -2px;
  background: #fff5ef;
}
.empty {
  padding: 35px 20px;
  text-align: center;
  color: var(--muted);
}
.contact-hero {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 8px 10px 18px;
}
.contact-hero > .photo {
  width: 110px;
  height: 110px;
  border-radius: 50%;
}
.contact-hero > div {
  flex: 1;
}
.contact-hero h1 {
  font-size: 34px;
}
.contact-hero p {
  font-size: 20px;
  color: #6076b0;
  margin-top: 4px;
}
.contact-hero p a {
  color: #1a62ff;
}
.contact-tags {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.contact-tags > .badge {
  border-radius: 7px;
  padding: 9px 13px;
  font-size: 13px;
}
.relation-box {
  width: 215px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 16px;
  flex: 0 !important;
  min-width: 205px;
}
.relation-box small {
  font-size: 14px;
}
.relation-box strong {
  display: block;
  font-size: 25px;
}
.dots {
  display: flex;
  gap: 5px;
  margin: 5px 0;
}
.dots > i {
  width: 10px;
  height: 10px;
  background: #10c9a3;
  border-radius: 50%;
}
.dots > i:last-child {
  background: #d8dce7;
}
.company-logo {
  background: #ddfaee;
  border-radius: 7px;
  color: #08a877;
  width: 65px;
  height: 65px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.company-logo .icon {
  width: 37px;
  height: 37px;
}
.company-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 15px 12px;
}
.company-row h3 {
  font-size: 20px;
}
.company-row p {
  font-size: 14px;
  line-height: 1.3;
  margin-top: 3px;
}
.contact-grid .details > div {
  justify-content: flex-start;
  gap: 12px;
  min-height: 35px;
}
.contact-grid .details dt {
  width: 35%;
  flex: none;
}
.contact-grid .details dd {
  text-align: left;
  flex: 1;
}
.contact-grid .card-heading h2 > .icon {
  color: #2852c4;
}
.note {
  background: #fff8e4;
  border-left: 3px solid #ffc734;
  padding: 8px 12px;
  margin: 0 12px 12px;
  font-size: 13px;
  color: var(--muted);
}
.linked-record {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin: 0 12px 6px;
}
.linked-record > .icon {
  color: var(--orange);
  width: 25px;
  height: 25px;
}
.linked-record > div {
  flex: 1;
}
.linked-record .photo {
  width: 40px;
  height: 36px;
}
.linked-record h3 {
  font-size: 14px;
}
.linked-record p {
  font-size: 13px;
}
.linked-record > .badge {
  font-size: 11px;
  padding: 5px 10px;
}
dialog {
  width: fit-content;
  max-width: calc(100vw - 40px);
  border: 1px solid var(--line);
  padding: 0;
  border-radius: 12px;
  color: var(--navy);
  box-shadow: 0 20px 80px #07125330;
  max-height: calc(100dvh - 32px);
}
dialog[open] {
  display: flex;
  flex-direction: column;
}
dialog:has(.dialog-body form) {
  width: min(660px, calc(100vw - 40px));
}
@media (max-width: 600px) {
  .dialog-body form:has([name='first_name']) {
    grid-template-columns: minmax(0, 1fr);
  }
  .dialog-body form:has([name='first_name']) label {
    min-width: 0;
  }
  .dialog-body form:has([name='first_name']) input,
  .dialog-body form:has([name='first_name']) select {
    max-width: 100%;
    min-width: 0;
  }
}
dialog::backdrop {
  background: #09134d45;
  backdrop-filter: blur(2px);
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.dialog-head h2 {
  font-size: 23px;
}
.dialog-body {
  padding: 20px 22px;
  min-height: 0;
  overflow: auto;
}
@media (max-width: 768px) {
  body.dialog-page-open #app { display: none !important; }
  dialog.dialog-page {
    position: relative;
    inset: auto;
    display: flex;
    flex-direction: column;
    width: 100% !important;
    max-width: none;
    min-height: 100dvh;
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
  }
  dialog.dialog-page .dialog-head { position: sticky; top: 0; z-index: 1; background: #fff; }
  dialog.dialog-page .dialog-body { flex: 1; overflow: visible !important; }
}
.dialog-body form,
.task-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.task-date-inputs,
.task-duration-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  grid-column: 1 / -1;
}
.task-project-create { align-self: end; }
.dialog-body label,
.task-editor label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--blue);
  font-size: 14px;
}
.dialog-body [data-task-group-field][hidden],
.task-editor [data-task-group-field][hidden] {
  display: none;
}
.dialog-body label:has(textarea),
.task-editor label:has(textarea),
.task-editor .full-width,
.task-editor .dependency-picker,
.task-editor-actions {
  grid-column: 1/-1;
}
.collection-list-tasks .link-button {
  display: inline-block;
}
.task-editor {
  margin-top: 16px;
}
.task-editor label {
  min-width: 0;
}
.task-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
@media (max-width: 700px) {
  .task-editor {
    grid-template-columns: minmax(0, 1fr);
  }
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 15px 22px;
  border-top: 1px solid var(--line);
  background: #fafbfe;
}
.dialog-error {
  color: #d72d30;
  background: #fff0f0;
  border-radius: 6px;
  padding: 10px;
  grid-column: 1/-1;
}
.dialog-error:empty {
  display: none;
}
dialog.article-quick-create-dialog {
  width: min(1040px, calc(100vw - 24px));
}
dialog.article-quick-create-dialog .dialog-body form {
  display: block;
}
.article-quick-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.article-quick-form > .article-quick-intro,
.article-quick-form > .article-quick-handoff {
  grid-column: 1 / -1;
}
.article-quick-panel {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  gap: 14px;
  min-width: 0;
}
.article-quick-panel > fieldset,
.article-quick-panel > .article-quick-task,
.article-quick-panel > .article-quick-components,
#dialog:has(.article-supply-settings) .dialog-body form > fieldset {
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.article-quick-panel > .article-quick-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 12px;
}
.article-quick-choice > legend,
.article-quick-choice > p,
.article-quick-choice > .toolbar,
.article-quick-choice > input {
  grid-column: 1 / -1;
}
.article-quick-choice > p {
  margin: 0;
  line-height: 1.45;
}
.article-quick-feature-fields {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.article-quick-information > .article-quick-components,
.article-quick-information > .article-quick-task,
.article-quick-information > .article-quick-handoff {
  grid-column: 1 / -1;
}
.article-quick-tabs {
  display: flex;
  grid-column: 1 / -1;
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: linear-gradient(#fcfdff, #f7f9fd);
  scrollbar-width: thin;
}
.article-quick-tabs > button {
  display: flex;
  flex: 1 0 auto;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 13px;
  border: 0;
  border-right: 1px solid #ebeff7;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: none;
  color: var(--blue);
  white-space: nowrap;
}
.article-quick-tabs > button.active {
  background: linear-gradient(#fff1e9, #fff);
  border-bottom-color: var(--orange);
  color: var(--orange);
}
.article-quick-tabs > button.inactive-feature-tab {
  background: #f0f2f5;
  color: #687387;
}
.article-quick-tabs > button.inactive-feature-tab.active {
  background: #e7eaf0;
  border-bottom-color: #8993a3;
  color: #4f5a6c;
}
.article-quick-disabled-panel {
  grid-template-columns: minmax(0, 1fr);
}
.article-quick-disabled-list {
  display: grid;
  gap: 8px;
}
.article-quick-disabled-feature {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e1e5eb;
  border-radius: 6px;
  background: #f6f7f9;
  color: #596476;
}
.article-quick-disabled-feature p {
  margin: 3px 0 0;
  color: #687387;
}
.article-quick-disabled-feature > button {
  flex: none;
}
.article-quick-task-fields,
.article-quick-supply [data-article-quick-stock-fields],
.article-quick-supply [data-article-quick-purchase-fields] {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.article-quick-form .full-width,
.article-quick-intro,
.article-quick-handoff,
.article-quick-help,
.article-field-help {
  grid-column: 1 / -1;
}
.article-quick-intro,
.article-quick-handoff {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}
.article-quick-help,
.article-field-help {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.article-quick-form [hidden],
#dialog:has(.article-supply-settings) [hidden] {
  display: none !important;
}
dialog.article-quick-create-dialog .dialog-actions {
  flex-wrap: wrap;
}
dialog.article-quick-create-dialog [data-article-full-form] {
  margin-left: auto;
}
@media (max-width: 900px) {
  .article-quick-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .article-quick-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  dialog.article-quick-create-dialog {
    width: calc(100vw - 16px);
  }
  .article-quick-form,
  .article-quick-panel,
  .article-quick-task-fields,
  .article-quick-feature-fields,
  #dialog:has(.article-supply-settings) .dialog-body form,
  #dialog:has(.article-supply-settings) .article-components,
  #dialog:has(.article-supply-settings) .article-task-rule,
  #dialog:has(.article-supply-settings) .article-service-contract,
  #dialog:has(.article-supply-settings) .article-supply-settings,
  #dialog:has(.article-supply-settings) [data-article-task-fields],
  #dialog:has(.article-supply-settings) [data-article-stock-fields],
  #dialog:has(.article-supply-settings) [data-article-purchase-fields] {
    grid-template-columns: minmax(0, 1fr);
  }
  dialog.article-quick-create-dialog .dialog-actions {
    justify-content: space-between;
  }
  dialog.article-quick-create-dialog .dialog-actions [data-action='close-dialog'] {
    display: none;
  }
  dialog.article-quick-create-dialog [data-article-full-form] {
    flex: 1 1 100%;
    margin: 0;
  }
  dialog.article-quick-create-dialog .dialog-actions [type='submit'] {
    flex: 1 1 auto;
  }
}
#dialog:has(.article-supply-settings) {
  width: min(920px, calc(100vw - 32px));
}
#dialog:has(.article-supply-settings) .dialog-body form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
#dialog:has(.article-supply-settings) .article-type-widget,
#dialog:has(.article-supply-settings) .article-routings {
  grid-column: 1 / -1;
}
#dialog:has(.article-supply-settings) .article-components,
#dialog:has(.article-supply-settings) .article-task-rule,
#dialog:has(.article-supply-settings) .article-service-contract,
#dialog:has(.article-supply-settings) .article-supply-settings {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
#dialog:has(.article-supply-settings) [data-article-task-fields],
#dialog:has(.article-supply-settings) [data-article-stock-fields],
#dialog:has(.article-supply-settings) [data-article-purchase-fields] {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
/* Ces règles suivent celles du formulaire complet : sur mobile la fiche article
   passe en une seule colonne, sinon la grille à deux colonnes écrase le
   passage précédent et le widget de nature déborde. */
@media (max-width: 600px) {
  #dialog:has(.article-supply-settings) .dialog-body form,
  #dialog:has(.article-supply-settings) .article-components,
  #dialog:has(.article-supply-settings) .article-task-rule,
  #dialog:has(.article-supply-settings) .article-service-contract,
  #dialog:has(.article-supply-settings) .article-supply-settings,
  #dialog:has(.article-supply-settings) [data-article-task-fields],
  #dialog:has(.article-supply-settings) [data-article-stock-fields],
  #dialog:has(.article-supply-settings) [data-article-purchase-fields] {
    grid-template-columns: minmax(0, 1fr);
  }
}
#toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 20px;
  border-radius: 8px;
  background: var(--navy);
  color: white;
  box-shadow: 0 4px 22px #09115a20;
  opacity: 0;
  pointer-events: none;
  z-index: 99;
  transition: opacity 0.15s;
  max-width: calc(100vw - 32px);
  width: max-content;
  overflow-wrap: anywhere;
}
#toast.visible {
  opacity: 1;
  pointer-events: auto;
}
.feedback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.dialog-error .btn {
  margin: 8px 0 0 8px;
}
.loading {
  padding: 50px;
  color: var(--muted);
}
.document-preview {
  white-space: pre-wrap;
  background: #f9faff;
  border: 1px solid var(--line);
  padding: 22px;
  min-height: 200px;
  font-family: inherit;
}
.search-results {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 15px;
}
.search-results > a {
  border: 1px solid var(--line);
  padding: 10px;
  border-radius: 5px;
}
.search-results small {
  display: block;
}
.full-width {
  width: 100%;
}
@media (min-width: 1550px) {
  :root {
    --right: 335px;
    --dossier: 160px;
  }
  .topbar {
    gap: 30px;
  }
  .brand {
    min-width: 350px;
  }
  .layout.with-dossier main {
    padding: 13px 16px;
  }
  .right-panel {
    padding: 10px 12px;
  }
  .quote-lines td {
    height: 27px;
  }
  .contact-hero {
    margin-bottom: 3px;
  }
}
@media (max-width: 1450px) {
  :root {
    --right: 335px;
    --dossier: 155px;
  }
  .brand {
    min-width: 180px;
  }
  .topbar {
    gap: 18px;
  }
  .top-actions {
    gap: 10px;
  }
  .company {
    display: none;
  }
  .hero-card {
    grid-template-columns: 180px 1.1fr 1.4fr;
    gap: 12px;
  }
  .hero-photo {
    height: 141px;
  }
  .hero-metrics > .stat {
    padding: 6px 9px;
    gap: 9px;
  }
  .hero-metrics .stat-icon > .icon {
    width: 23px;
  }
  .hero-metrics .stat strong {
    font-size: 18px;
  }
  .grid.three {
    grid-template-columns: 1.15fr 1fr 0.9fr;
  }
  .record-heading h1 {
    font-size: 29px;
  }
  .record-heading > small {
    font-size: 12px;
  }
  .summary-stats .stat {
    padding: 11px 10px;
    gap: 9px;
  }
  .summary-stats .stat strong {
    font-size: 17px;
  }
  .summary-stats .stat-icon > .icon {
    width: 24px;
  }
  .quote-lines td {
    padding: 4px 7px;
  }
  .quote-lines th {
    padding: 8px 7px;
  }
  .quote-lines td:nth-child(3) {
    min-width: 170px;
  }
  .quote-totals {
    grid-template-columns: 1.8fr 1fr 1fr;
  }
  .quote-totals > .stat:last-child {
    display: none;
  }
  .dossier {
    padding-inline: 7px;
  }
  .dossier nav > a {
    gap: 6px;
  }
  .kanban {
    grid-auto-columns: minmax(154px, 1fr);
  }
  .contact-hero {
    gap: 20px;
    padding-inline: 2px;
  }
  .contact-hero > .photo {
    width: 100px;
    height: 100px;
  }
  .contact-hero h1 {
    font-size: 32px;
  }
  .contact-tags > .badge {
    padding: 7px 10px;
  }
  .contact-grid .details dt {
    width: 34%;
  }
}
@media (max-width: 1200px) {
  :root {
    --dossier: 145px;
    --right: 270px;
  }
  .profile > span,
  .top-actions > .icon-btn:nth-child(3) {
    display: none;
  }
  .brand {
    min-width: 145px;
  }
  .topbar {
    gap: 15px;
  }
  .hero-card {
    grid-template-columns: 150px 1fr;
  }
  .hero-metrics {
    grid-column: 1/-1;
  }
  .hero-photo {
    height: 125px;
  }
  .hero-metrics > .stat {
    border-top: 1px solid var(--line);
    min-height: 70px;
  }
  .hero-metrics {
    grid-template-columns: repeat(4, 1fr);
  }
  .grid.three,
  .grid.equal {
    grid-template-columns: 1fr 1fr;
  }
  .grid.three > .card:last-child {
    grid-column: auto;
  }
  .grid.opportunity-overview-grid {
    grid-template-columns: 1fr;
  }
  .summary-stats {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, 1fr);
  }
  .dossier nav > a b {
    font-size: 13px;
  }
  .dossier nav > a small {
    font-size: 12px;
  }
  .record-heading > small {
    display: none;
  }
  .record-heading {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px 14px;
  }
  .record-header-meta {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
  .record-header-amount {
    padding-left: 0;
    border-left: 0;
  }
  .contact-hero > .relation-box {
    display: none;
  }
  .filters {
    flex-wrap: wrap;
  }
  .filters > * {
    min-width: 130px !important;
  }
}
@media (max-width: 900px) {
  :root {
    --right: 0px;
    --dossier: 0px;
  }
  .layout,
  .layout.with-dossier,
  .layout.without-right-panel,
  .layout.with-dossier.without-right-panel {
    grid-template-columns: var(--rail) minmax(0, 1fr);
  }
  .layout.with-left-panel {
    grid-template-columns: var(--rail) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }
  .layout.with-left-panel > .modules { grid-row: 1 / 3; }
  .layout.with-left-panel > .context-left-panel { grid-column: 2; grid-row: 1; }
  .layout.with-left-panel > main { grid-column: 2; grid-row: 2; }
  .right-panel,
  .dossier {
    display: none;
  }
  .global-search {
    width: auto;
    min-width: 0;
    flex: 1;
  }
  .top-actions {
    gap: 5px;
  }
  .brand {
    min-width: 130px;
  }
  .brand strong {
    font-size: 21px;
  }
  .brand > svg {
    width: 26px;
  }
  .global-search span {
    max-width: 30vw;
  }
  .topbar {
    padding-inline: 10px;
    gap: 10px;
  }
  .quote-totals {
    grid-template-columns: 1fr 1fr;
  }
  .quote-total-main {
    grid-column: 1/-1;
  }
  .record-heading h1 {
    font-size: 26px;
  }
  .contact-hero {
    gap: 14px;
  }
  .contact-hero h1 {
    font-size: 28px;
  }
}
@media (max-width: 600px) {
  .global-search kbd {
    display: none;
  }
  .top-create {
    min-width: 36px;
    padding-inline: 8px;
  }
  .top-create span {
    display: none;
  }
}
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background: linear-gradient(145deg, #f5f8ff, #fff7f2);
}
.auth-card {
  width: min(430px, 100%);
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 22px 70px #10245a18;
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 25px;
  color: var(--navy);
}
.auth-mark {
  width: 31px;
  height: 34px;
  display: block;
  background: linear-gradient(150deg, #ff976a 0 34%, #ff4d21 35% 67%, #ffbd9f 68%);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.auth-eyebrow {
  margin: 30px 0 8px;
  color: var(--orange);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.auth-card h1 {
  font-size: 31px;
  margin-bottom: 8px;
}
.auth-card > p:not(.auth-eyebrow),
.auth-card > small {
  color: var(--muted);
  line-height: 1.45;
}
.auth-card form {
  display: grid;
  gap: 15px;
  margin: 27px 0 19px;
}
.auth-card label {
  display: grid;
  gap: 7px;
  color: var(--blue);
  font-size: 14px;
}
.auth-card input {
  min-height: 44px;
  border: 1px solid var(--cx-line-strong);
  border-radius: 7px;
  padding: 10px 12px;
  font: inherit;
  color: var(--navy);
}
/* Le thème « ai-harness » efface les bordures de tous les champs (`border: 0`)
   et la charte ne redonne qu'une couleur : le champ mot de passe devient
   invisible sur l'écran de connexion. On rétablit un cadre explicite, avec la
   priorité nécessaire pour passer devant la règle générique du thème. */
:root[data-density='ai-harness'] .auth-card input {
  border: 1px solid var(--cx-line-strong);
  background: var(--surface);
  color: var(--text);
}
:root[data-density='ai-harness'] .auth-card input:focus {
  border-color: var(--cx-ink);
}
.auth-card .btn {
  min-height: 45px;
  justify-content: center;
}
.auth-error {
  min-height: 20px;
  color: #c72c35;
  font-size: 13px;
}
.auth-error:empty {
  min-height: 0;
}
.auth-demo {
  margin: 0 0 16px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.55;
}
.auth-demo b {
  color: var(--text);
  font-weight: 600;
}
.auth-demo-fill {
  display: inline-flex;
  align-items: center;
  margin-top: 9px;
  min-height: 32px;
  font-size: 12px;
}
/* Le bouton est posé sur un panneau gris : sans bordure visible, la charte
   le rendait invisible (fond gris sur fond gris). */
body .auth-card .auth-demo .auth-demo-fill {
  background: var(--surface) !important;
  border: 1px solid var(--cx-line-strong) !important;
  color: var(--text) !important;
  box-shadow: none !important;
}
body .auth-card .auth-demo .auth-demo-fill:hover {
  background: var(--surface-2) !important;
  border-color: var(--cx-line-strong) !important;
}
.auth-card > small {
  display: block;
  font-size: 12px;
  text-align: center;
}
.auth-switch {
  text-align: center;
  font-size: 13px;
  margin: 0 0 19px;
}
.auth-switch a {
  color: var(--orange);
  font-weight: 600;
}
@media (max-width: 600px) {
  .auth-page {
    padding: 16px;
  }
  .auth-card {
    padding: 28px 22px;
  }
  .auth-card h1 {
    font-size: 27px;
  }
}
.onboarding-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
}
.onboarding-visual {
  background-size: cover;
  background-position: center;
}
.onboarding-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  overflow-y: auto;
}
.onboarding-card {
  width: min(680px, 100%);
}
.onboarding-dots {
  display: flex;
  gap: 7px;
  margin-bottom: 22px;
}
.onboarding-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
}
.onboarding-dot.done {
  background: var(--orange);
}
.onboarding-card h1 {
  font-size: 31px;
  margin-bottom: 8px;
}
.onboarding-card p {
  color: var(--muted);
  line-height: 1.5;
}
.onboarding-card form {
  display: grid;
  gap: 15px;
  margin: 27px 0 0;
}
.onboarding-card label {
  display: grid;
  gap: 7px;
  color: var(--blue);
  font-size: 14px;
}
.onboarding-card input,
.onboarding-card select,
.onboarding-card textarea {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
  font: inherit;
  color: var(--navy);
  background: white;
}
.onboarding-card textarea {
  min-height: 118px;
  resize: vertical;
}
.onboarding-card .btn {
  min-height: 45px;
  justify-content: center;
}
.onboarding-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}
.onboarding-section {
  display: grid;
  gap: 13px;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
}
.onboarding-section h2 {
  margin: 0;
  font-size: 17px;
  color: var(--navy);
}
.onboarding-summary,
.onboarding-hint {
  margin: 0;
  padding: 13px 15px;
  border-radius: 8px;
  background: var(--cream);
}
.onboarding-summary strong {
  color: var(--navy);
}
.onboarding-summary ul {
  display: grid;
  gap: 6px;
  margin: 9px 0 0;
  padding-left: 18px;
}
.onboarding-hint {
  border: 1px dashed var(--line);
  background: transparent;
}
.onboarding-file input[type='file'] {
  min-height: auto;
  padding: 8px 0;
  border: 0;
  border-radius: 0;
}
.onboarding-card small {
  color: var(--muted);
  line-height: 1.4;
}
.onboarding-inline-actions {
  display: flex;
  justify-content: flex-start;
}
.onboarding-inline-actions .btn {
  min-height: 38px;
}
.onboarding-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 4px;
}
.onboarding-choices {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.onboarding-choices legend {
  padding: 0 5px;
  color: var(--blue);
  font-size: 14px;
}
.onboarding-card .onboarding-choice {
  display: flex;
  grid-template-columns: none;
  align-items: flex-start;
  gap: 10px;
  color: var(--navy);
}
.onboarding-card .onboarding-choice input {
  min-height: 18px;
  width: 18px;
  margin: 2px 0 0;
  padding: 0;
}
.onboarding-choice span {
  display: grid;
  gap: 3px;
}
.onboarding-mail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.onboarding-mail-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.onboarding-mail-card:has(input:checked) {
  border-color: #4f46e5;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}
.onboarding-mail-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.onboarding-mail-card-icon {
  font-size: 24px;
}
.onboarding-mail-card-body {
  font-size: 13px;
  color: #4b5563;
  margin: 0;
}
.onboarding-mail-card-body code {
  background: #f3f4f6;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
}
.onboarding-mail-card button {
  margin-top: 4px;
}
.onboarding-mail-imap {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  margin-top: 16px;
}
.onboarding-mail-imap h2 {
  margin-top: 0;
  font-size: 16px;
}
.onboarding-choice-disabled {
  opacity: 0.56;
}
.onboarding-assembly[hidden] {
  display: none;
}
.onboarding-assembly > p {
  margin: 0;
}
.onboarding-component-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.onboarding-component-row:last-child {
  border-bottom: 0;
}
.onboarding-component-row .onboarding-grid {
  margin: 0;
}
.onboarding-field-error input,
.onboarding-field-error select,
.onboarding-field-error textarea {
  border-color: #c72c35;
  box-shadow: 0 0 0 2px rgba(199, 44, 53, 0.12);
}
.onboarding-field-error small {
  color: #c72c35;
}
@media (max-width: 900px) {
  .onboarding-page {
    grid-template-columns: 1fr;
  }
  .onboarding-visual {
    display: none;
  }
  .onboarding-panel {
    padding: 28px 22px;
  }
}
@media (max-width: 600px) {
  .onboarding-grid {
    grid-template-columns: 1fr;
  }
  .onboarding-panel {
    align-items: flex-start;
    padding: 24px 16px;
  }
  .onboarding-actions,
  .onboarding-inline-actions {
    display: grid;
  }
  .onboarding-actions .btn,
  .onboarding-inline-actions .btn {
    width: 100%;
  }
}
.user-permissions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}
.organization-user footer {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 12px;
}
@media (max-width: 600px) {
  .user-permissions-grid {
    grid-template-columns: 1fr;
  }
}
@media print {
  .topbar,
  .modules,
  .dossier,
  .right-panel,
  .toolbar,
  .filters,
  .tabs,
  .pagination {
    display: none !important;
  }
  .layout,
  .layout.with-dossier {
    display: block;
    height: auto;
  }
  main {
    overflow: visible;
    padding: 0;
  }
  body {
    font-size: 11px;
  }
  .data-table td {
    padding: 5px;
  }
  .card {
    break-inside: avoid;
  }
  h1 {
    font-size: 25px;
  }
}
.collection-pagination {
  margin: 10px 0;
}
.collection-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
}
.collection-toolbar .collection-pagination {
  margin: 0;
  flex-shrink: 0;
}
.view-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.collection-toolbar > .view-controls {
  flex-basis: 100%;
}

/* Administration du catalogue : mêmes cartes et en-tête que les collections canoniques. */
#portal-catalogue-admin-root {
  display: grid;
  gap: 12px;
  min-width: 0;
}
#portal-catalogue-admin-root .collection-head,
#portal-catalogue-admin-root .collection-toolbar {
  min-width: 0;
}
.portal-admin-toolbar nav,
.portal-admin-toolbar > span {
  display: flex;
  align-items: center;
  gap: 8px;
}
.portal-admin-toolbar > span {
  color: var(--muted);
}
.portal-admin-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.portal-admin-steps .portal-admin-step {
  height: auto;
  min-width: 0;
  padding: 12px;
  justify-content: flex-start;
  text-align: left;
  white-space: normal;
}
.portal-admin-step > span:last-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.portal-admin-step small {
  color: var(--muted);
  font-weight: 400;
}
.portal-admin-step[aria-current='step'] {
  border-color: var(--blue);
  color: var(--blue);
  background: color-mix(in srgb, var(--blue) 8%, var(--card, #fff));
}
.portal-admin-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.portal-admin-panel[hidden] {
  display: none;
}
.portal-admin-step-heading {
  display: grid;
  gap: 6px;
}
.portal-admin-step-heading > p,
.portal-admin-step-actions small,
.portal-admin-hint {
  color: var(--muted);
}
.portal-admin-step-heading h2 {
  font-size: 18px;
}
.portal-admin-step-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.portal-admin-panel .card-body > .portal-admin-guide {
  margin-bottom: 12px;
}
.portal-admin-panel .portal-admin-guide .toolbar {
  margin-top: 10px;
}
.portal-admin-publications,
.portal-admin-contacts {
  max-width: 100%;
}
.portal-admin-contacts td:last-child .btn {
  margin: 3px;
}
@media (max-width: 1000px) {
  .portal-admin-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .portal-admin-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .portal-admin-step-actions > .btn {
    flex: 1 1 140px;
    white-space: normal;
    height: auto;
    min-height: 38px;
  }
  .portal-admin-publications table,
  .portal-admin-publications tbody,
  .portal-admin-publications tr,
  .portal-admin-publications td,
  .portal-admin-contacts table,
  .portal-admin-contacts tbody,
  .portal-admin-contacts tr,
  .portal-admin-contacts td {
    display: block;
    width: 100%;
    min-width: 0;
    white-space: normal;
  }
  .portal-admin-publications thead {
    display: none;
  }
  .portal-admin-publications tr,
  .portal-admin-contacts tr {
    border-bottom: 1px solid var(--line);
    padding-block: 8px;
  }
  .portal-admin-publications td,
  .portal-admin-contacts td {
    border: 0;
    overflow-wrap: anywhere;
  }
  .portal-admin-publications td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
  }
  .portal-admin-publications select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
}
.portal-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}
.portal-admin-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}
.portal-admin-form > label,
.portal-admin-subfields > label {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
  color: var(--blue);
  font-weight: 600;
}
.portal-admin-form input:not([type='checkbox']),
.portal-admin-form select,
.portal-admin-subfields input:not([type='checkbox']),
.portal-admin-subfields select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.portal-admin-form .portal-admin-checkbox {
  display: flex;
  align-items: center;
  align-self: end;
  min-height: 38px;
  gap: 8px;
}
.portal-admin-form .portal-admin-checkbox input {
  flex: none;
}
.portal-admin-form .full,
.portal-admin-form-actions,
.portal-admin-subfields,
.portal-admin-guide {
  grid-column: 1 / -1;
}
.portal-admin-subfields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}
.portal-admin-subfields[hidden] {
  display: none;
}
.portal-admin-form-actions {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}
.portal-admin-feedback {
  flex: 1;
  min-width: min(220px, 100%);
}
.portal-admin-field-error,
.portal-admin-feedback .form-error,
.portal-admin-global-error {
  color: #c72c35;
}
.portal-admin-field-error:empty,
.portal-admin-feedback .form-error:empty,
.portal-admin-global-error:empty {
  display: none;
}
.portal-admin-form [aria-invalid='true'] {
  border-color: #c72c35;
  box-shadow: 0 0 0 2px #c72c3518;
}
.portal-admin-success {
  color: #087a59;
  font-weight: 600;
}
.portal-admin-guide,
.portal-admin-rule-preview,
.portal-admin-options {
  border: 1px solid #dfe6f2;
  border-radius: 7px;
  background: var(--surface);
  padding: 11px 12px;
}
.portal-admin-guide p,
.portal-admin-options p {
  margin-top: 4px;
}
.portal-admin-rule-preview {
  color: var(--navy);
}
.portal-admin-existing details,
.portal-admin-list {
  border: 1px solid var(--line);
  border-radius: 7px;
  min-width: 0;
}
.portal-admin-existing details + details,
.portal-admin-list + .portal-admin-list {
  margin-top: 8px;
}
.portal-admin-existing summary,
.portal-admin-list > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  min-width: 0;
}
.portal-admin-existing summary {
  cursor: pointer;
}
.portal-admin-existing summary strong,
.portal-admin-list > header > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.portal-admin-existing summary span,
.portal-admin-list > header > span {
  flex: none;
  color: var(--muted);
}
.portal-admin-existing details > .portal-admin-form,
.portal-admin-existing details > .portal-admin-options {
  margin: 0 12px 12px;
}
.portal-admin-list {
  padding-bottom: 12px;
}
.portal-admin-list > details,
.portal-admin-rules {
  margin-inline: 12px;
}
.portal-admin-list > details > .portal-admin-form {
  margin-top: 10px;
}
.portal-admin-rules {
  margin-top: 10px;
}
.portal-admin-rules > details > .portal-admin-form {
  margin-top: 4px;
}

@media (max-width: 700px) {
  #portal-catalogue-admin-root .page-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }
  #portal-catalogue-admin-root .page-heading > div {
    min-width: 0;
  }
  #portal-catalogue-admin-root .page-heading > .btn {
    justify-self: start;
  }
  .portal-admin-grid,
  .portal-admin-form,
  .portal-admin-subfields {
    grid-template-columns: minmax(0, 1fr);
  }
  .portal-admin-toolbar,
  .portal-admin-toolbar nav {
    align-items: stretch;
  }
  .portal-admin-toolbar nav {
    width: 100%;
  }
  .portal-admin-toolbar nav .btn {
    flex: 1;
  }
  .portal-admin-existing summary,
  .portal-admin-list > header {
    align-items: flex-start;
  }
}
.view-control-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
  align-items: center;
  min-width: 0;
  max-width: 100%;
}
.view-control-actions > [role='group'] {
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
}
.view-controls .search-field {
  flex: 1;
  min-width: 160px;
  max-width: 320px;
}
.view-filter-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  flex-basis: 100%;
}
.view-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 6px 5px 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #f5f8ff;
  color: var(--blue);
  font-size: 12px;
}
.view-filter-chip .icon {
  width: 13px;
  height: 13px;
}
.view-filter-chip .btn.square {
  min-width: 20px;
  height: 20px;
  padding: 0;
}
.view-choice-list {
  display: grid;
  gap: 6px;
}
.view-choice-list .btn {
  justify-content: flex-start;
}
.view-choice-list .btn[aria-current='true'] {
  border-color: var(--orange);
  color: var(--orange);
  background: #fff1e9;
}
.view-filter-builder {
  grid-column: 1/-1;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 600px) {
  .view-filter-builder {
    grid-template-columns: 1fr;
  }
}
.directory-kanban {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  align-items: start;
}
.directory-kanban > section {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f9fafb;
}
.directory-kanban > section > h2 {
  font-size: 15px;
  margin-bottom: 8px;
}
.collection-stat-scope {
  padding-bottom: 0;
  color: var(--blue);
}
@media (max-width: 600px) {
  body[data-view='crm-admin'] .page-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  body[data-view='crm-admin'] .page-heading > div {
    min-width: 0;
    flex: 1;
  }
  body[data-view='crm-admin'] .page-heading > .btn {
    margin-left: auto;
  }
}
.menu-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.table-sort {
  background: none;
  border: 0;
  padding: 0;
  min-height: 0;
  font-size: 12px;
}
.pagination > .page-number {
  margin-right: 0;
  background: #fff0e9;
  color: var(--orange);
  padding: 6px 10px;
  border-radius: 6px;
}

/* Les étoiles conservent les dimensions des références. */
.favorite-toggle {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  vertical-align: baseline;
  line-height: 1;
}
.favorite-toggle[aria-pressed='true'] .favorite {
  fill: #fff0dc;
}
.favorite-toggle:hover .favorite {
  fill: #fff5ea;
}
.favorites-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.favorite-row {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 6px 0;
}
.favorite-row > a,
.favorite-row > span {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.favorite-row > a {
  display: flex;
  gap: 10px;
  align-items: center;
}
.favorite-row > a > .icon {
  color: #ff761c;
}
.favorite-row > .icon-btn {
  flex: none;
}
.search-results .favorite-row a {
  border: 0;
  padding: 5px 0;
}

/* Calendriers commerciaux : mêmes surfaces, couleurs et typographie que les vues de référence. */
.sr-only {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.commercial-calendar {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.commercial-calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 16px;
}
.commercial-calendar-toolbar h2 {
  font-size: 23px;
  text-transform: capitalize;
  margin-bottom: 4px;
}
.commercial-calendar-toolbar p {
  color: var(--muted);
}
.commercial-calendar-toolbar .toolbar {
  margin: 0;
  gap: 7px;
  flex-wrap: wrap;
}
.commercial-calendar-toolbar .month-picker {
  display: block;
}
.month-picker input {
  padding: 6px 9px;
  height: 35px;
  max-width: 165px;
}
.commercial-calendar-scroll {
  overflow-x: auto;
}
.commercial-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  min-width: 740px;
  border-top: 1px solid var(--line);
}
.commercial-weekday {
  padding: 10px;
  text-align: center;
  background: #fafbfe;
  border-right: 1px solid var(--line);
  font-weight: 500;
}
.commercial-day {
  min-height: 112px;
  padding: 8px;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.commercial-day:nth-child(7n) {
  border-right: 0;
}
.commercial-day.outside {
  background: #fafbfe;
}
.commercial-day.outside > time {
  color: #99a5be;
}
.commercial-day > time {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  width: 26px;
  height: 26px;
  font-size: 13px;
}
.commercial-day > time.today {
  background: var(--orange);
  color: white;
  border-radius: 7px;
}
.commercial-event {
  display: flex;
  flex-direction: column;
  gap: 3px;
  border: 1px solid #dfe7f7;
  border-left: 3px solid #89b8ff;
  border-radius: 6px;
  background: #f2f7ff;
  padding: 8px;
  min-width: 0;
  line-height: 1.25;
  font-size: 12px;
}
.commercial-event:hover {
  border-color: #89b8ff;
  background: #eaf2ff;
}
.commercial-event > strong,
.commercial-event > span,
.commercial-event > small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.commercial-event > b {
  font-size: 13px;
  margin: 2px 0;
}
.commercial-event .badge {
  align-self: flex-start;
  font-size: 11px;
  padding: 3px 5px;
  max-width: 100%;
}
.commercial-event .badge .icon {
  width: 12px;
  height: 12px;
}
.commercial-event.green-event {
  background: #e9fbf2;
  border-left-color: var(--green);
}
.commercial-event.red-event {
  background: #fff0f2;
  border-left-color: #f35c76;
}
.commercial-calendar-hint {
  padding: 12px 16px;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid var(--line);
}
.quote-overview-scope {
  margin: 0 0 14px;
  color: var(--muted);
}
.quote-overview-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.quote-overview-metric {
  padding: 16px;
}
.quote-overview-metric h2 {
  font-size: 14px;
  font-weight: 500;
  color: var(--blue);
}
.quote-overview-metric > strong {
  display: block;
  font-size: 23px;
  margin: 10px 0 5px;
  overflow-wrap: anywhere;
}
.quote-overview-metric p {
  font-size: 12px;
  color: var(--muted);
}
.quote-overview-panels {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 14px;
}
.quote-overview-panels > .card {
  min-width: 0;
}
.quote-status-breakdown {
  display: grid;
  padding: 8px 14px 14px;
}
.quote-status-breakdown > button {
  display: grid;
  grid-template-columns: 120px minmax(25px, 1fr) 60px 102px;
  align-items: center;
  gap: 8px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  text-align: left;
  padding: 13px 0;
  font-size: 12px;
}
.quote-status-breakdown > button:hover {
  background: #fafbfe;
}
.quote-status-breakdown > button:disabled {
  opacity: 1;
  color: var(--muted);
}
.quote-status-breakdown > button > strong {
  text-align: right;
}
.quote-status-breakdown .badge {
  justify-self: start;
  font-size: 12px;
  padding: 4px 7px;
}
.quote-status-track {
  height: 7px;
  background: #f0f3f8;
  border-radius: 5px;
  overflow: hidden;
}
.quote-status-track > i {
  display: block;
  height: 100%;
  background: #89b8ff;
  border-radius: 5px;
}
.quote-monthly-table td {
  height: 47px !important;
}
.quote-monthly-table {
  min-width: 360px !important;
}
.quote-monthly-table .btn {
  text-transform: capitalize;
}
@media (max-width: 1500px) {
  .quote-overview-panels {
    grid-template-columns: 1fr;
  }
  .commercial-calendar-toolbar {
    flex-wrap: wrap;
  }
  .quote-overview-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.commercial-event {
  gap: 3px;
  padding: 6px 7px;
  min-height: 44px;
}
.commercial-event > span {
  font-size: 12px;
}
.commercial-event > .sr-only {
  position: absolute;
}
.commercial-day-more {
  padding: 3px 0;
  min-height: 23px;
  font-size: 11px;
  border: 0;
  white-space: normal;
  background: transparent;
  justify-content: flex-start;
  text-align: left;
  color: var(--blue);
}
.commercial-day-more:hover {
  background: #eef4ff;
}
.commercial-day-list {
  display: grid;
  gap: 10px;
}
.commercial-day-list > a {
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
}
.commercial-day-list > a > div {
  flex: 1;
  min-width: 0;
}
.commercial-day-list p {
  color: var(--muted);
  font-size: 12px;
}
.commercial-day-list > a > strong {
  white-space: nowrap;
}
.commercial-day-list > a:hover {
  background: #f8faff;
}
/* Manufacturing operations retain their own dates and resources. */
.mfg-schedule-switch {
  margin: 12px 0;
}
.mfg-schedule-switch .active {
  background: #fff1ea;
  color: #ff4b24;
  border-color: #ffd1c0;
}
.mfg-schedule-controls {
  padding: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}
.mfg-schedule-controls label {
  display: grid;
  gap: 5px;
  color: #627cb5;
  min-width: 160px;
}
.mfg-schedule-controls select {
  min-height: 36px;
  padding: 7px;
  border: 1px solid #dfe5f2;
  border-radius: 5px;
  color: #233d81;
  background: white;
}
.mfg-schedule-controls .toolbar {
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}
.mfg-schedule-controls [data-action='mfg-period-prev'] svg {
  transform: rotate(180deg);
}
.mfg-schedule-count {
  padding: 0 12px 12px;
  margin: 0;
  color: #7084b4;
}
.mfg-schedule-scroll {
  overflow-x: auto;
  max-width: 100%;
}
.mfg-schedule {
  min-width: 700px;
  color: #233d81;
}
.mfg-schedule-head,
.mfg-schedule-row {
  display: grid;
  grid-template-columns: 50% 50%;
  border-top: 1px solid #e7edf7;
}
.mfg-schedule-head {
  background: #f8faff;
  font-size: 12px;
}
.mfg-schedule-label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px 85px;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 0;
  border-right: 1px solid #e7edf7;
  background: transparent;
  text-align: left;
  color: inherit;
  font: inherit;
  min-width: 0;
}
.mfg-schedule-label strong {
  display: block;
  overflow-wrap: anywhere;
}
.mfg-schedule-label small {
  display: block;
  color: #7188b7;
  font-size: 12px;
  margin: 3px 0;
}
.mfg-schedule-label time {
  font-size: 12px;
}
.mfg-schedule-label .badge {
  font-size: 11px;
  padding: 4px 7px;
}
.mfg-schedule-row button.mfg-schedule-label:hover {
  background: #f2f6ff;
}
.mfg-schedule-months,
.mfg-schedule-weeks,
.mfg-schedule-grid {
  display: flex;
}
.mfg-schedule-months span,
.mfg-schedule-weeks span {
  border-right: 1px solid #e7edf7;
  text-align: center;
  overflow: hidden;
  padding: 8px 0;
  white-space: nowrap;
}
.mfg-schedule-head.weeks {
  height: 30px;
}
.mfg-schedule-weeks span {
  padding: 5px 0;
}
.mfg-schedule-body,
.mfg-schedule-track {
  position: relative;
}
.mfg-schedule-row {
  min-height: 54px;
}
.mfg-schedule-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.mfg-schedule-grid span {
  border-right: 1px solid #edf1f8;
}
.mfg-schedule-bar {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 20px;
  min-width: 4px;
  border: 0;
  border-radius: 5px;
  cursor: pointer;
}
.mfg-schedule-bar.green {
  background: #61cfb1;
}
.mfg-schedule-bar.blue {
  background: #80b2ff;
}
.mfg-schedule-bar.purple {
  background: #bc91fb;
}
.mfg-schedule-bar:hover {
  filter: brightness(0.94);
}
.mfg-schedule-today {
  position: absolute;
  top: 0;
  bottom: 0;
  border-left: 1px dashed #ff6844;
  pointer-events: none;
}
/* Contact notes keep their original line breaks and author/date visible. */
.logistics-config-layout {
  display: grid;
  grid-template-columns: minmax(290px, 1fr) minmax(260px, 0.85fr);
  gap: 12px;
}
.logistics-location-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}
.logistics-location-summary > div {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 13px 14px;
}
.logistics-location-summary small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.logistics-location-summary strong {
  display: block;
  margin-top: 3px;
  color: var(--navy);
  font-size: 21px;
}
.logistics-config-tree a {
  padding: 8px 10px;
  align-items: center;
}
.logistics-config-tree a > span {
  min-width: 0;
  flex: 1;
}
.logistics-config-tree a strong,
.logistics-config-tree a small {
  display: block;
}
.logistics-config-tree a em {
  font-style: normal;
  background: #edf2ff;
  color: var(--blue);
  border-radius: 99px;
  padding: 2px 7px;
  font-size: 12px;
}
.location-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 2px 14px 12px;
}
.location-form-grid label {
  display: grid;
  gap: 5px;
  font-size: 13px;
  color: var(--muted);
}
.location-form-grid label[hidden] {
  display: none;
}
.location-form-grid input,
.location-form-grid select {
  min-width: 0;
  width: 100%;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 9px;
  color: var(--navy);
  font: inherit;
  background: #fff;
}
.location-form-grid .full-width {
  grid-column: 1/-1;
}
.location-form-actions {
  display: flex;
  justify-content: flex-end;
  padding: 0 14px 14px;
}
.location-form-actions .btn {
  min-height: 36px;
}
@media (max-width: 900px) {
  .logistics-config-layout {
    grid-template-columns: 1fr;
  }
  .location-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .logistics-location-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .location-form-grid {
    grid-template-columns: 1fr;
  }
  .logistics-location-summary {
    grid-template-columns: 1fr 1fr;
  }
  .location-form-actions .btn {
    width: 100%;
  }
}
.wms-intro,
.wms-pedagogy {
  border: 1px solid #ffd7ca;
  background: #fff7f3;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.wms-intro strong,
.wms-pedagogy strong {
  color: var(--navy);
}
.wms-intro p,
.wms-pedagogy p {
  margin: 5px 0 0;
  color: var(--muted);
}
.wms-template-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.wms-template-card {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  padding: 16px;
  display: grid;
  gap: 14px;
}
.wms-template-card header {
  display: flex;
  gap: 10px;
}
.wms-template-card header > span {
  color: var(--orange);
}
.wms-template-card h3 {
  margin: 0;
  color: var(--navy);
}
.wms-template-card p {
  margin: 4px 0;
  color: var(--muted);
}
.wms-template-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.wms-template-card footer small {
  color: var(--muted);
}
.wms-flow-diagram {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  padding: 10px 2px;
}
.wms-flow-node {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: max-content;
  padding: 9px 11px;
  border: 1px solid #cfe0ff;
  border-radius: 7px;
  background: #f5f8ff;
  color: var(--navy);
}
.wms-flow-node .icon {
  color: var(--blue);
}
.wms-flow-arrow {
  color: var(--muted);
}
.wms-setup-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  margin-bottom: 14px;
}
.wms-setup-steps span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px;
  color: var(--muted);
  border-right: 1px solid var(--line);
  white-space: nowrap;
}
.wms-setup-steps span:last-child {
  border: 0;
}
.wms-setup-steps b {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: #eef2f8;
}
.wms-setup-steps .active {
  color: var(--orange);
  background: #fff5f0;
}
.wms-setup-steps .active b,
.wms-setup-steps .done b {
  background: var(--orange);
  color: #fff;
}
.wms-setup-stage {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  padding: 16px;
  min-height: 360px;
}
.wms-selected-template {
  text-align: center;
  padding: 32px;
}
.wms-selected-template p {
  color: var(--muted);
}
.wms-setup-form {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(280px, 0.8fr);
  gap: 14px;
}
.wms-setup-form .wms-pedagogy,
.wms-setup-form .wms-save-row {
  grid-column: 1/-1;
}
.wms-setup-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.wms-setup-fields label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
}
.wms-setup-fields input,
.wms-setup-fields select {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 9px;
  min-width: 0;
}
.wms-location-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.wms-location-preview > div {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
}
.wms-location-preview span {
  color: var(--blue);
}
.wms-location-preview span.mobile {
  color: #8055e8;
}
.wms-location-preview strong,
.wms-location-preview small {
  display: block;
  margin-top: 3px;
}
.wms-location-preview small {
  color: var(--muted);
}
.wms-save-row,
.wms-setup-footer,
.wms-lifecycle-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.wms-setup-footer {
  padding: 12px 0;
}
.wms-route-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.wms-route-list > div {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
}
.wms-route-list b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #edf3ff;
  color: var(--blue);
}
.wms-route-list span:nth-child(2) {
  flex: 1;
}
.wms-route-list strong,
.wms-route-list small {
  display: block;
}
.wms-route-list small {
  color: var(--muted);
}
.wms-automation-sentence {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
  padding: 45px 10px;
}
.wms-automation-sentence span {
  color: var(--orange);
  font-weight: 700;
}
.wms-automation-sentence strong {
  border: 1px solid #d8c9ff;
  background: #f7f2ff;
  border-radius: 7px;
  padding: 10px 12px;
}
.wms-advanced-note {
  text-align: center;
  color: var(--muted);
}
.wms-review-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.wms-review-grid section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px;
  background: #fafcff;
}
.wms-review-grid h3 {
  margin: 0 0 9px;
  font-size: 14px;
}
.wms-review-grid strong {
  display: block;
  font-size: 22px;
  color: var(--navy);
}
.wms-review-grid small {
  color: var(--muted);
}
.wms-lifecycle-actions {
  padding-top: 20px;
}
.wms-success {
  color: #059669;
  font-weight: 700;
}
@media (max-width: 1000px) {
  .wms-template-grid,
  .wms-setup-form {
    grid-template-columns: 1fr;
  }
  .wms-review-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .wms-template-grid,
  .wms-setup-fields,
  .wms-location-preview,
  .wms-review-grid {
    grid-template-columns: 1fr;
  }
  .wms-template-card footer {
    align-items: stretch;
    flex-direction: column;
  }
  .wms-setup-steps {
    display: flex;
    overflow-x: auto;
  }
  .wms-setup-steps span {
    min-width: 145px;
  }
  .wms-setup-stage {
    padding: 11px;
  }
  .wms-setup-footer .btn,
  .wms-lifecycle-actions .btn {
    flex: 1;
  }
  .wms-selected-template {
    padding: 18px 4px;
  }
}
.contact-note {
  display: block;
}
.contact-note-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.contact-note footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}
.contact-note footer small {
  margin: 0;
}
.contact-note footer .btn {
  flex: none;
  min-height: 26px;
  padding: 3px 6px;
}
.rich-note-editor {
  border: 1px solid var(--border, #d8d2c5);
  border-radius: 8px;
  padding: 8px 10px 10px;
  background: var(--card, #fff);
  margin-bottom: 10px;
}
.rich-note-error:not(:empty) {
  display: block;
  color: var(--red, #b13a2a);
  font-size: 0.85rem;
  margin-top: 6px;
}
.rich-note-editor:has(.rich-note-error:not(:empty)) {
  border-color: var(--red, #b13a2a);
}
.rich-note-editor:focus-within {
  border-color: var(--accent, #a76b3f);
  box-shadow: 0 0 0 2px rgba(167, 107, 63, 0.15);
}
.rich-note-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--border, #d8d2c5);
}
.rich-note-toolbar-btn,
.rich-note-color {
  appearance: none;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  font: inherit;
  cursor: pointer;
  padding: 4px 8px;
  min-width: 28px;
  min-height: 28px;
  line-height: 1;
  color: inherit;
}
.rich-note-toolbar-btn:hover,
.rich-note-color:hover {
  background: var(--surface-soft, #f5ede3);
  border-color: var(--border, #d8d2c5);
}
.rich-note-toolbar-btn:focus,
.rich-note-color:focus-within {
  outline: 2px solid var(--accent, #a76b3f);
  outline-offset: 1px;
}
.rich-note-toolbar-sep {
  display: inline-block;
  width: 1px;
  height: 18px;
  margin: 0 4px;
  background: var(--border, #d8d2c5);
}
.rich-note-color {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.rich-note-color input[type='color'] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.rich-note-color-bar {
  width: 14px;
  height: 2px;
  background: currentColor;
}
.rich-note-content {
  min-height: 150px;
  outline: none;
  font: inherit;
  line-height: 1.45;
  color: inherit;
}
.rich-note-content:focus {
  outline: none;
}
.rich-note-content a,
.contact-note-text a {
  color: var(--accent, #a76b3f);
  text-decoration: underline;
}
.rich-note-content pre,
.contact-note-text pre {
  white-space: pre-wrap;
  background: var(--surface-soft, #f5ede3);
  padding: 8px;
  border-radius: 4px;
}
.rich-note-content table,
.contact-note-text table {
  border-collapse: collapse;
  max-width: 100%;
}
.rich-note-content td,
.rich-note-content th,
.contact-note-text td,
.contact-note-text th {
  border: 1px solid var(--border, #d8d2c5);
  padding: 4px 8px;
}
.rich-note-content:empty::before,
.rich-note-content h2:empty,
.rich-note-content p:empty {
  content: attr(data-placeholder);
  color: var(--muted, #8a7e6d);
}
.rich-note-content p {
  margin: 0 0 6px;
}
.rich-note-content h2 {
  font-size: 1.1rem;
  margin: 6px 0 4px;
  font-weight: 600;
}
.rich-note-content h3 {
  font-size: 1rem;
  margin: 6px 0 4px;
  font-weight: 600;
  color: var(--muted, #5e5446);
}
.rich-note-content ul,
.rich-note-content ol {
  margin: 0 0 6px 22px;
  padding: 0;
}
.rich-note-content blockquote {
  border-left: 3px solid var(--accent, #a76b3f);
  padding-left: 10px;
  margin: 0 0 6px;
  color: var(--muted, #5e5446);
}
.rich-note-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  color: var(--muted, #8a7e6d);
  font-size: 0.85rem;
}
.rich-note-delete {
  appearance: none;
  background: transparent;
  border: 1px solid var(--border, #d8d2c5);
  border-radius: 4px;
  padding: 3px 10px;
  cursor: pointer;
  color: var(--red, #b13a2a);
}
.rich-note-delete:hover {
  background: var(--red-bg, #fdecea);
  border-color: var(--red, #b13a2a);
}
.rich-note-post {
  margin-left: auto;
  border: 0;
  border-radius: 20px;
  background: var(--accent, #a76b3f);
  color: #fff;
  padding: 6px 16px;
  cursor: pointer;
}
.rich-note-post:disabled {
  opacity: 0.5;
  cursor: default;
}
.rich-note-mount-btn {
  display: block;
  width: 100%;
  margin-top: 4px;
  background: transparent;
  border: 1px dashed var(--border, #d8d2c5);
  border-radius: 6px;
  padding: 8px 12px;
  font: inherit;
  color: var(--accent, #a76b3f);
  cursor: pointer;
}
.rich-note-mount-btn:hover {
  background: var(--surface-soft, #f5ede3);
  border-style: solid;
}
.wms-empty-warehouse {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  margin-bottom: 12px;
  border: 1px solid #ffd7ca;
  border-radius: 7px;
  background: #fff7f3;
}
.wms-empty-warehouse > span {
  color: var(--orange);
}
.wms-empty-warehouse p {
  flex: 1;
  color: var(--muted);
}
.wms-empty-warehouse strong {
  color: var(--navy);
}
@media (max-width: 600px) {
  .wms-empty-warehouse {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .wms-empty-warehouse .btn {
    width: 100%;
  }
}
.wms-warehouse-settings,
.wms-location-designer,
.wms-route-designer,
.wms-object-editor {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  padding: 14px;
  margin-bottom: 14px;
}
.wms-warehouse-settings .wms-setup-fields {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.wms-section-title,
.wms-object-editor > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.wms-section-title h2,
.wms-object-editor h2 {
  font-size: 17px;
  color: var(--navy);
}
.wms-section-title p,
.wms-object-editor header p {
  color: var(--muted);
  margin-top: 4px;
}
.wms-location-canvas,
.wms-route-canvas {
  display: flex;
  align-items: stretch;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 2px 10px;
  scrollbar-width: thin;
}
.wms-location-block,
.wms-route-block {
  flex: 0 0 190px;
  min-height: 118px;
  padding: 13px;
  text-align: left;
  display: grid;
  align-content: start;
  gap: 5px;
  border: 2px solid #cfe0ff;
  background: linear-gradient(145deg, #f7faff, #edf4ff);
  color: var(--navy);
  box-shadow: 0 4px 12px #10245a0b;
}
.wms-location-block.mobile {
  border-color: #d9ccff;
  background: linear-gradient(145deg, #faf7ff, #f1ebff);
}
.wms-location-block.selected,
.wms-route-block.selected {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px #ffede6;
}
.wms-location-block > span:first-child {
  color: var(--blue);
}
.wms-location-block.mobile > span:first-child {
  color: var(--purple);
}
.wms-location-block small,
.wms-route-block small {
  display: block;
  color: var(--muted);
}
.wms-location-block .badge {
  justify-self: start;
  margin-top: 4px;
}
.wms-plan-link {
  align-self: center;
  color: #8ca1cd;
  flex: none;
}
.wms-plan-link .icon {
  width: 15px;
}
.wms-route-block {
  flex-basis: 255px;
  grid-template-columns: 30px 1fr;
  min-height: 94px;
}
.wms-route-block > b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e8f0ff;
  color: var(--blue);
}
.wms-route-block > .badge {
  grid-column: 2;
  justify-self: start;
}
.wms-editor-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.wms-editor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.wms-editor-grid label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
}
.wms-editor-grid input,
.wms-editor-grid select {
  width: 100%;
  height: 36px;
}
.wms-editor-grid .full {
  grid-column: 1/-1;
}
.wms-editor-grid .wms-check {
  display: flex;
  align-items: center;
  align-self: end;
  min-height: 36px;
  color: var(--navy);
}
.wms-editor-grid .wms-check input {
  width: 15px;
  height: 15px;
}
.wms-object-editor .wms-save-row {
  margin-top: 12px;
}
.wms-preview-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.wms-preview-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.wms-preview-list h3 {
  padding: 10px 12px;
  background: #f7f9fd;
  display: flex;
  justify-content: space-between;
}
.wms-preview-list h3 span {
  background: #e7efff;
  color: var(--blue);
  border-radius: 99px;
  padding: 1px 7px;
}
.wms-preview-list > div {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-top: 1px solid var(--line);
}
.wms-preview-list > div > .icon {
  color: var(--orange);
}
.wms-preview-list > div span {
  min-width: 0;
}
.wms-preview-list > div strong,
.wms-preview-list > div small {
  display: block;
  overflow-wrap: anywhere;
}
.wms-preview-list > p {
  padding: 12px;
  color: var(--muted);
}
@media (max-width: 1000px) {
  .wms-warehouse-settings .wms-setup-fields,
  .wms-editor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .wms-preview-details {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .wms-warehouse-settings .wms-setup-fields,
  .wms-editor-grid {
    grid-template-columns: 1fr;
  }
  .wms-section-title,
  .wms-object-editor > header {
    display: grid;
  }
  .wms-section-title .btn,
  .wms-editor-actions {
    width: 100%;
  }
  .wms-editor-actions .btn {
    flex: 1;
  }
  .wms-location-block {
    flex-basis: 160px;
  }
  .wms-route-block {
    flex-basis: 225px;
  }
  .wms-editor-grid .full {
    grid-column: auto;
  }
}

.invoice-mobile-actions {display:none}
@media(max-width:900px){.invoice-mobile-actions{display:flex;flex-wrap:wrap}}

.mailbox-body-loading{opacity:0.6}

.mailbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin: 12px 0;
}

.mailbox-card {
  background: #fff;
  border: 1px solid #dce2ec;
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mailbox-card-head {display:flex; align-items:center; gap:6px; flex-wrap:wrap;}
.mailbox-card .mailbox-email {font-weight:600; font-size:14px; word-break:break-all; color:#172033;}
.mailbox-card .mailbox-display {margin:0; font-size:13px; color:#5b6478;}
.mailbox-card .mailbox-error {margin:0; font-size:12px; color:#a93c39;}
.mailbox-card .mailbox-actions {display:flex; gap:6px; margin-top:6px;}
.mailbox-card .badge {display:inline-block; padding:2px 8px; border-radius:4px; background:#eef2ff; color:#315ee8; font-size:11px; font-weight:600; text-transform:uppercase;}
.mailbox-card .badge-active {background:#e8f6ed; color:#1e6b3b;}
.mailbox-card .badge-paused {background:#f3f4f6; color:#5b6478;}
.mailbox-card .badge-error {background:#fde8e8; color:#a93c39;}

.mailbox-empty-card {
  background: #fff;
  border: 1px dashed #c7d0df;
  border-radius: 10px;
  padding: 24px;
  text-align: center;
  margin: 12px 0;
  display:flex; flex-direction:column; gap:10px; align-items:center;
}
.mailbox-empty-card h3 {margin:0;}
.mailbox-empty-card .hint {color:#5b6478; font-size:13px; margin:0;}

.card-error {color:#a93c39; padding:12px; background:#fdf3f3; border:1px solid #f0c8c6; border-radius:6px;}

.btn.small.danger {color:#fff; background:#d9534f; border-color:#d9534f;}
.btn.small.danger:hover {background:#b94340; border-color:#b94340;}

/* ----- Mailbox wizard (modal) ----- */
.mailbox-wizard {display:flex; flex-direction:column; gap:18px; min-width:520px;}
.wizard-steps {list-style:none; padding:0; margin:0; display:flex; gap:6px; font-size:13px; color:#5b6478;}
.wizard-steps li {padding:6px 12px; border-radius:999px; background:#f1f3f8;}
.wizard-steps li.active {background:#315ee8; color:#fff;}

.wizard-pane {display:flex; flex-direction:column; gap:12px;}
.wizard-pane > p {margin:0; color:#172033;}

.provider-grid {display:grid; grid-template-columns:repeat(auto-fit, minmax(220px, 1fr)); gap:10px;}
.provider-card {background:#fff; border:1px solid #dce2ec; border-radius:8px; padding:12px; display:flex; flex-direction:column; gap:3px; cursor:pointer;}
.provider-card:hover {border-color:#315ee8;}
.provider-card input[type=radio] {display:none;}
.provider-card:has(input:checked) {border-color:#315ee8; background:#f4f7ff; box-shadow:0 0 0 2px rgba(49,94,232,0.18);}
.provider-card .provider-title {font-weight:600; font-size:14px;}
.provider-card .provider-sub {font-size:12px; color:#5b6478;}

.wizard-pane .form-grid {display:grid; grid-template-columns:repeat(auto-fit, minmax(240px, 1fr)); gap:10px;}
.wizard-pane .form-grid label,
.wizard-pane .form-grid fieldset {display:flex; flex-direction:column; gap:4px; margin:0; padding:12px 14px; background:#fafbfd; border:1px solid #e6eaf3; border-radius:8px;}
.wizard-pane .form-grid label.full,
.wizard-pane .form-grid fieldset.full {grid-column:1 / -1;}
.wizard-pane .form-grid label.checkbox {flex-direction:row; align-items:center; background:transparent; border:0; padding:0;}
.wizard-pane .form-grid legend {padding:0 6px; font-weight:600; color:#315ee8; font-size:12px;}
.wizard-pane .form-grid span {font-size:12px; color:#5b6478;}
.wizard-pane .form-grid input {padding:7px 10px; border:1px solid #c7d0df; border-radius:6px; background:#fff;}
.wizard-pane .form-grid input:focus {outline:none; border-color:#315ee8; box-shadow:0 0 0 2px rgba(49,94,232,0.18);}

.wizard-actions {display:flex; gap:10px; flex-wrap:wrap;}
.wizard-log {background:#0f172a; color:#d6e1ff; padding:12px 14px; border-radius:6px; font-family:ui-monospace, "SFMono-Regular", Menlo, monospace; font-size:12px; max-height:240px; overflow:auto; white-space:pre-wrap; word-break:break-word; margin:0;}
.wizard-footer {display:flex; gap:10px; justify-content:flex-end;}

@media (max-width: 720px) {
  .mailbox-wizard {min-width: 0;}
}

.wizard-pane[hidden] {display:none !important;}

/* --- Client mail 3-panneaux (boîtes | messages | lecteur) ---------------- */
.mailbox-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.mailbox-toolbar-info {
  margin-left: auto;
  color: #5b6478;
  font-size: 12px;
}
.mailbox-client {
  display: grid;
  grid-template-columns: 220px 360px 1fr;
  background: #fff;
  border: 1px solid #dce2ec;
  border-radius: 12px;
  min-height: 520px;
}
.mailbox-pane {
  border-right: 1px solid #e6eaf3;
  padding: 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.mailbox-pane:last-child {border-right: 0;}
.mailbox-pane-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #5b6478;
  margin: 4px 0 8px;
  font-weight: 600;
}
.mailbox-select {
  width: 100%;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #c7d0df;
  background: #fff;
  font: inherit;
  margin-bottom: 12px;
}
.mailbox-folder-list, .mailbox-message-list {
  list-style: none;
  padding: 0;
  margin: 0;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.mailbox-folder {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: #172033;
}
.mailbox-folder:hover {background: #f5f7fb;}
.mailbox-folder.active {background: #eef2ff; color: #315ee8; font-weight: 600;}
.mailbox-folder-count {
  background: #315ee8;
  color: #fff;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 999px;
  font-weight: 600;
}
.mailbox-message {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-bottom: 1px solid #f1f3f8;
  cursor: pointer;
}
.mailbox-message:hover {background: #f5f7fb;}
.mailbox-message.active {background: #eef2ff;}
.mailbox-message.unread .mailbox-message-subject {font-weight: 700;}
.mailbox-message.unread .mailbox-message-from {font-weight: 700;}
.mailbox-message.flagged::before {
  content: "★";
  color: #e3a13b;
  margin-right: 6px;
}
.mailbox-message.attachments::after {
  content: "📎";
  margin-left: 6px;
  font-size: 11px;
}
.mailbox-message-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: #172033;
}
.mailbox-message-date {
  font-size: 11px;
  color: #5b6478;
  white-space: nowrap;
}
.mailbox-message-subject {
  font-size: 13px;
  color: #172033;
}
.mailbox-message-snippet {
  font-size: 12px;
  color: #5b6478;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mailbox-empty {
  color: #5b6478;
  font-size: 13px;
  padding: 12px;
  text-align: center;
  list-style: none;
}
.mailbox-reader-body {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 4px;
}
.mailbox-reader-header {
  border-bottom: 1px solid #e6eaf3;
  padding-bottom: 12px;
}
.mailbox-reader-subject {
  margin: 0 0 8px;
  font-size: 18px;
  color: #172033;
}
.mailbox-reader-meta {
  display: grid;
  gap: 4px;
  font-size: 13px;
  color: #5b6478;
  margin-bottom: 12px;
}
.mailbox-reader-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.mailbox-reader-text {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: 14px;
  color: #172033;
  margin: 0;
  background: #f9fafd;
  padding: 14px;
  border-radius: 8px;
}
.mailbox-reader-html {
  font-size: 14px;
  color: #172033;
}
.mailbox-reader-html img {max-width: 100%; height: auto;}
.mailbox-composer {
  display: grid;
  gap: 10px;
  min-width: 540px;
}
.mailbox-composer label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: #5b6478;
}
.mailbox-composer input,
.mailbox-composer textarea {
  padding: 8px 10px;
  border: 1px solid #c7d0df;
  border-radius: 6px;
  background: #fff;
  font: inherit;
  color: #172033;
}
.mailbox-composer input:focus,
.mailbox-composer textarea:focus {
  outline: none;
  border-color: #315ee8;
  box-shadow: 0 0 0 2px rgba(49, 94, 232, 0.18);
}
.mailbox-composer textarea {
  resize: vertical;
  min-height: 180px;
}
.mailbox-composer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}
@media (max-width: 1100px) {
  .mailbox-client {
    grid-template-columns: 200px 280px 1fr;
  }
}
@media (max-width: 860px) {
  .mailbox-client {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }
  .mailbox-pane {border-right: 0; border-bottom: 1px solid #e6eaf3;}
  .mailbox-pane:last-child {border-bottom: 0;}
}

/* === Param�tres : Pr�f�rences === */
.preferences-form {
  display: grid;
  gap: 16px;
}
.preferences-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.preferences-form select,
.preferences-form input[type='text'] {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 14px;
  color: var(--navy);
}
.task-unit-settings-form {
  display: grid;
  gap: 16px;
}
.task-unit-settings-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.task-unit-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(160px, 1fr) auto;
  align-items: end;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.price-unit-row {
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
}
.pdf-studio { margin: 18px 0 32px; min-width: 0; }
.pdf-studio-intro { margin-bottom: 18px; }
.pdf-studio-intro h2 { margin: 0 0 6px; color: var(--navy); }
.pdf-studio-intro p { margin: 0; color: var(--muted); }
.pdf-studio-grid { display: grid; grid-template-columns: minmax(330px, .78fr) minmax(0, 1fr); gap: 22px; align-items: start; }
#pdf-templates-form, .pdf-studio-preview { min-width: 0; background: var(--card, #fff); border: 1px solid var(--line); border-radius: 12px; }
.pdf-studio-tabs { display: flex; flex-wrap: wrap; gap: 7px; padding: 16px; border-bottom: 1px solid var(--line); }
.pdf-studio-tabs button { border: 1px solid var(--line); border-radius: 7px; background: var(--surface, #f6f8fb); color: var(--navy); padding: 8px 10px; cursor: pointer; font: inherit; font-size: .86rem; }
.pdf-studio-tabs button.active { border-color: var(--orange, #ff4d21); background: #fff0e9; color: var(--navy); font-weight: 700; }
.pdf-studio-tabs button:focus-visible, .pdf-studio-layout-choice:focus-within, .pdf-studio-accent-choice:focus-within { outline: 2px solid var(--orange, #ff4d21); outline-offset: 2px; }
.pdf-studio-editor { padding: 18px; }
.pdf-studio-fields { display: grid; gap: 20px; }
.pdf-studio-fields[hidden] { display: none; }
.pdf-studio-fields > label { display: grid; gap: 7px; min-width: 0; font-weight: 600; }
.pdf-studio-fields select, .pdf-studio-fields textarea { width: 100%; box-sizing: border-box; font: inherit; }
.pdf-studio-choices { margin: 0; padding: 0; border: 0; min-width: 0; }
.pdf-studio-choices legend { margin-bottom: 10px; font-weight: 700; }
.pdf-studio-layouts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.pdf-studio-layout-choice { display: grid; gap: 6px; justify-items: center; cursor: pointer; border: 1px solid var(--line); border-radius: 9px; padding: 9px 5px; text-align: center; font-size: .8rem; }
.pdf-studio-layout-choice:has(input:checked), .pdf-studio-accent-choice:has(input:checked) { border-color: var(--orange, #ff4d21); background: #fff4ef; }
.pdf-studio-layout-choice input, .pdf-studio-accent-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pdf-layout-thumb { width: 47px; height: 64px; border: 1px solid #d6dce6; border-radius: 2px; background: #fff; box-shadow: 0 2px 5px #14243b18; display: flex; flex-direction: column; gap: 5px; padding: 7px; box-sizing: border-box; }
.pdf-layout-thumb i { height: 3px; background: #ccd3dd; display: block; }
.pdf-layout-thumb i:first-child { width: 70%; height: 7px; background: #ff4d21; margin-bottom: 4px; }
.pdf-layout-thumb i:nth-child(2) { width: 95%; }
.pdf-layout-thumb i:nth-child(3) { width: 80%; }
.pdf-layout-thumb i:nth-child(4) { width: 90%; margin-top: auto; }
.pdf-layout-modern i:first-child { width: 100%; background: #038c91; }
.pdf-layout-minimal i:first-child { background: #16355b; height: 3px; }
.pdf-layout-boxed { border: 2px solid #ff4d21; }
.pdf-layout-boxed i:first-child { background: #e6ebf0; }
.pdf-layout-bold i:first-child { width: 100%; height: 13px; background: #16355b; }
.pdf-layout-striped i:nth-child(2), .pdf-layout-striped i:nth-child(4) { background: #dbe9eb; height: 7px; width: 100%; }
.pdf-layout-wave { background: radial-gradient(ellipse at 90% 0%, #d3f3f2 0 24%, transparent 25%), #fff; }
.pdf-layout-wave i:first-child { border-radius: 50% 5% 35% 5%; }
.pdf-layout-inherit { background: linear-gradient(135deg,#fff 48%,#f1f5f9 49%); }
.pdf-studio-accents { display: flex; flex-wrap: wrap; gap: 8px; }
.pdf-studio-accent-choice { display: grid; justify-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 8px; padding: 7px; min-width: 55px; cursor: pointer; font-size: .74rem; }
.pdf-studio-swatch { width: 25px; height: 25px; border: 2px solid #fff; outline: 1px solid #ccd3dd; border-radius: 50%; background: var(--swatch); }
.pdf-studio-save { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--line); }
.pdf-studio-save p { margin: 0; font-size: .85rem; }
.pdf-studio-preview { position: sticky; top: 14px; padding: 16px; }
.pdf-studio-preview-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.pdf-studio-preview-head div { display: grid; gap: 3px; }
.pdf-studio-preview-head small { color: var(--muted); }
.pdf-studio-preview-head [hidden] { display: none; }
.pdf-studio-paper { width: 100%; aspect-ratio: 210 / 297; background: #e9edf3; border: 1px solid var(--line); padding: 10px; box-sizing: border-box; }
@font-face { font-family: PdfRoboto; src: url('/assets/roboto-ui-400.ttf'); }
@font-face { font-family: PdfManrope; src: url('/assets/manrope-variable.ttf'); }
.pdf-studio-sheet { display: flex; flex-direction: column; box-sizing: border-box; width: 100%; height: 100%; padding: clamp(14px, 2.2vw, 34px); background: #fff; color: #18283c; box-shadow: 0 3px 12px #14243b18; font-size: clamp(8px, .85vw, 12px); }
.pdf-studio-sheet header { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; padding-bottom: 16px; border-bottom: 2px solid var(--pdf-accent); }
.pdf-studio-sheet header div { display: grid; gap: 4px; min-width: 0; }
.pdf-studio-sheet header b { font-size: 1.8em; letter-spacing: -.03em; }
.pdf-studio-sheet .pdf-sheet-brand { display: flex; align-items: flex-start; gap: 10px; }
.pdf-studio-sheet .pdf-sheet-brand img { width: 66px; height: 48px; object-fit: contain; object-position: left top; }
.pdf-studio-sheet .pdf-sheet-brand span { display: grid; gap: 4px; min-width: 0; }
.pdf-studio-sheet header strong { font-size: 1.05em; }
.pdf-studio-sheet header small { white-space: pre-line; color: #617087; }
.pdf-studio-sheet header > span { color: var(--pdf-accent); font-weight: 800; font-size: 1.6em; text-align: right; text-transform: uppercase; }
.pdf-studio-sheet .pdf-sheet-document { display: grid; gap: 3px; text-align: right; }
.pdf-studio-sheet .pdf-sheet-document strong { color: var(--pdf-accent); font-size: 1.7em; text-transform: uppercase; }
.pdf-studio-sheet .pdf-sheet-document small { font-size: .85em; }
.pdf-sheet-modern header { border-bottom-width: 3px; }
.pdf-sheet-minimal header { border-width: 1px; }
.pdf-sheet-minimal header > span { font-weight: 500; }
.pdf-sheet-boxed header { border: 2px solid var(--pdf-accent); padding: 12px; }
.pdf-sheet-bold header { background: #16355b; color: #fff; padding: 14px; border-bottom: 0; }
.pdf-sheet-bold header > span, .pdf-sheet-bold header small { color: #fff; }
.pdf-sheet-bold .pdf-sheet-document strong { color: #fff; }
.pdf-sheet-striped header { border-bottom: 4px solid var(--pdf-accent); }
.pdf-sheet-wave header { position: relative; border-bottom: 0; }
.pdf-sheet-wave header::before { content: ''; position: absolute; right: -15px; top: -18px; width: 105px; height: 55px; border-radius: 50%; background: color-mix(in srgb, var(--pdf-accent) 13%, white); z-index: 0; }
.pdf-sheet-wave header > * { position: relative; }
.pdf-studio-sheet .pdf-sheet-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 9%; margin: 18px 0 17px; }
.pdf-studio-sheet .pdf-sheet-parties > div { display: grid; align-content: start; gap: 5px; min-width: 0; }
.pdf-studio-sheet .pdf-sheet-parties b { color: var(--pdf-accent); font-size: .78em; text-transform: uppercase; letter-spacing: .08em; }
.pdf-studio-sheet .pdf-sheet-parties strong { font-size: 1.12em; }
.pdf-studio-sheet .pdf-sheet-parties small { color: #617087; line-height: 1.45; }
.pdf-studio-sheet .pdf-sheet-summary { border-left: 4px solid var(--pdf-accent); background: #f3f6f9; padding: 9px 12px; margin-bottom: 15px; }
.pdf-studio-sheet .pdf-sheet-summary h3 { margin: 0 0 3px; }
.pdf-studio-sheet .pdf-sheet-summary small { color: #617087; }
.pdf-sheet-meta { display: flex; justify-content: space-between; gap: 12px; margin: 20px 0; }
.pdf-sheet-meta div { display: grid; gap: 4px; }
.pdf-sheet-meta div:last-child { text-align: right; }
.pdf-sheet-meta small { color: #617087; }
.pdf-studio-sheet h3 { margin: 0 0 14px; font-size: 1.25em; }
.pdf-studio-sheet table { border-collapse: collapse; width: 100%; font-size: 1em; }
.pdf-studio-sheet th { text-align: left; color: #53647d; border-bottom: 1px solid #cfd8e4; padding: 8px 4px; }
.pdf-studio-sheet td { border-bottom: 1px solid #e3e8ef; padding: 9px 4px; }
.pdf-studio-sheet th:not(:first-child), .pdf-studio-sheet td:not(:first-child) { text-align: right; }
.pdf-sheet-classic tbody tr:nth-child(odd) { background: #f4f6f9; }
.pdf-sheet-modern tbody tr:nth-child(odd) { background: #f0f7f8; }
.pdf-sheet-striped tbody tr:nth-child(odd) { background: #eff4f6; }
.pdf-sheet-striped th { border-left: 4px solid var(--pdf-accent); }
.pdf-sheet-boxed th { background: #eff2f6; border-bottom: 1px solid var(--pdf-accent); }
.pdf-sheet-bold th { color: #fff; background: #16355b; }
.pdf-sheet-wave th { background: color-mix(in srgb, var(--pdf-accent) 12%, white); }
.pdf-sheet-total { display: flex; justify-content: flex-end; gap: 24px; margin-top: 15px; font-size: 1.1em; }
.pdf-sheet-total strong { color: var(--pdf-accent); }
.pdf-sheet-note { margin-top: 18px; }
.pdf-studio-sheet footer { margin-top: auto; border-top: 1px solid #cfd8e4; padding-top: 10px; color: #617087; white-space: pre-line; font-size: .84em; }
.pdf-studio-preview [data-pdf-preview-status] { margin: 8px 0 0; min-height: 1em; font-size: .82rem; }
.pdf-studio-preview > .field-help { margin: 10px 0 0; }
@media (max-width: 1050px) { .pdf-studio-grid { grid-template-columns: minmax(0, 1fr); } .pdf-studio-preview { position: static; } }
@media (max-width: 600px) { .pdf-studio-layouts { gap: 5px; } .pdf-studio-layout-choice { padding: 7px 2px; font-size: .72rem; } .pdf-studio-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } .pdf-studio-tabs button { white-space: normal; } .pdf-studio-preview-head { flex-wrap: wrap; } }
.pdf-builder { display: grid; gap: 16px; min-width: 0; }
.pdf-builder-intro { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 24px; background: var(--surface, #fff); border: 1px solid var(--line); border-radius: 12px; }
.pdf-builder-intro h2 { margin: 0 0 5px; font-size: 1.25rem; }
.pdf-builder-intro p { margin: 0; color: var(--muted); }
.pdf-builder-kinds { display: flex; flex-wrap: wrap; gap: 8px; }
.pdf-builder-kinds button { border: 1px solid var(--line); border-radius: 9px; background: var(--surface, #fff); color: inherit; padding: 9px 17px; font: inherit; cursor: pointer; }
.pdf-builder-kinds button[aria-pressed="true"] { color: var(--orange, #ff4d21); border-color: var(--orange, #ff4d21); font-weight: 700; }
.pdf-builder-grid { display: grid; grid-template-columns: minmax(360px, .88fr) minmax(430px, 1.12fr); gap: 18px; align-items: start; }
#pdf-builder-form, .pdf-builder-preview { min-width: 0; background: var(--surface, #fff); border: 1px solid var(--line); border-radius: 12px; }
.pdf-builder-panel { padding: 20px 22px; border-bottom: 1px solid var(--line); }
.pdf-builder-panel h3 { margin: 0 0 14px; font-size: 1.03rem; }
.pdf-builder-panel > label, .pdf-builder-inline label { display: grid; gap: 6px; margin: 11px 0; font-weight: 600; }
.pdf-builder-panel input:not([type="checkbox"]), .pdf-builder-panel select, .pdf-builder-panel textarea { width: 100%; box-sizing: border-box; font: inherit; padding: 8px 10px; color: inherit; background: var(--surface, #fff); border: 1px solid var(--line); border-radius: 7px; }
.pdf-builder-panel input[type="color"] { height: 42px; padding: 3px; }
.pdf-builder-inline { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pdf-builder-panel .pdf-builder-check { display: flex; align-items: center; gap: 8px; }
.pdf-builder-presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0; }
.pdf-builder-presets button { display: grid; justify-items: center; gap: 6px; min-width: 0; padding: 10px 5px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface, #fff); color: inherit; font: inherit; cursor: pointer; }
.pdf-builder-presets button[aria-pressed="true"] { border: 2px solid var(--orange, #ff4d21); }
.pdf-builder-presets small { color: var(--muted); text-align: center; font-size: .74rem; }
.pdf-builder-blocks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pdf-builder-blocks li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; }
.pdf-builder-blocks label { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pdf-builder-blocks small { color: var(--muted); font-size: .7rem; }
.pdf-builder-move { display: flex; gap: 3px; }
.pdf-builder-move button { border: 1px solid var(--line); border-radius: 5px; color: inherit; background: var(--surface, #fff); cursor: pointer; min-width: 29px; height: 29px; }
.pdf-builder-move button:disabled { opacity: .35; cursor: default; }
.pdf-builder-fields { display: flex; flex-wrap: wrap; gap: 7px; }
.pdf-builder-fields label { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 7px; padding: 7px 10px; }
.pdf-builder-actions { position: sticky; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 20px; background: var(--surface, #fff); border-radius: 0 0 12px 12px; }
.pdf-builder-actions [role="status"] { flex-basis: 100%; font-size: .82rem; color: var(--muted); }
.pdf-builder-actions [hidden] { display: none; }
.pdf-builder-preview { position: sticky; top: 16px; padding: 14px; }
.pdf-builder-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.pdf-builder-preview-head div { display: grid; gap: 3px; }
.pdf-builder-preview-head small { color: var(--muted); }
.pdf-builder-preview [data-pdf-test][hidden] { display: none; }
.pdf-builder-preview-modes { display: flex; gap: 6px; margin-bottom: 10px; }
.pdf-builder-preview-modes button { border: 1px solid var(--line); border-radius: 7px; padding: 7px 10px; background: var(--surface, #fff); color: inherit; cursor: pointer; }
.pdf-builder-preview-modes button[aria-pressed="true"] { border-color: var(--orange, #ff4d21); color: var(--orange, #ff4d21); font-weight: 700; }
.pdf-builder-paper { width: 100%; aspect-ratio: 210 / 297; padding: 12px; box-sizing: border-box; background: #e9edf3; border: 1px solid var(--line); }
.pdf-builder-preview [hidden] { display: none; }
.pdf-builder-preview iframe { display: block; width: 100%; height: min(76vh, 850px); min-height: 520px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.pdf-builder-preview [role="status"] { margin: 8px 0 0; color: var(--muted); font-size: .82rem; }
@media (max-width: 1050px) { .pdf-builder-grid { grid-template-columns: 1fr; } .pdf-builder-preview { position: static; } }
@media (max-width: 600px) { .pdf-builder-intro { align-items: flex-start; flex-direction: column; padding: 16px; } .pdf-builder-panel { padding: 16px; } .pdf-builder-presets small { display: none; } .pdf-builder-actions { position: static; } .pdf-builder-preview-head { flex-wrap: wrap; } .pdf-builder-preview iframe { min-height: 480px; height: 62vh; } }
.organization-profile { margin: 18px 0 32px; min-width: 0; }
.organization-profile-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(300px, .8fr); gap: 22px; align-items: start; }
.organization-profile-fields, .organization-profile-preview { min-width: 0; background: var(--card, #fff); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.organization-profile-fields { display: grid; gap: 18px; }
.organization-profile-fields fieldset { margin: 0; padding: 0; border: 0; }
.organization-profile-fields legend { margin-bottom: 12px; font-weight: 700; }
.organization-profile-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.organization-profile-field-grid label { display: grid; gap: 6px; min-width: 0; font-weight: 600; }
.organization-profile-field-grid input { width: 100%; box-sizing: border-box; }
.organization-profile-field-grid small { color: var(--muted); font-weight: 400; }
.organization-profile-logo-actions { margin-top: 8px; }
.organization-profile-logo-actions [hidden] { display: none; }
.organization-profile-preview { position: sticky; top: 14px; display: grid; gap: 16px; }
.organization-profile-letter { min-height: 280px; background: #fff; border: 1px solid #e0e5ed; box-shadow: 0 4px 12px #10244214; padding: 26px; color: #192b41; }
.organization-profile-letter-head { display: flex; gap: 14px; align-items: center; border-bottom: 3px solid; padding-bottom: 18px; }
.organization-profile-letter-head img, .organization-profile-monogram { width: 62px; height: 62px; object-fit: contain; flex: 0 0 auto; }
.organization-profile-monogram { display: grid; place-items: center; background: #eef2f7; border-radius: 8px; font-weight: 800; }
.organization-profile-letter-head div { display: grid; gap: 6px; overflow-wrap: anywhere; }
.organization-profile-letter-head small { line-height: 1.5; }
.organization-profile-letter p { margin-top: 24px; line-height: 1.7; }
@media (max-width: 1050px) { .organization-profile-grid { grid-template-columns: minmax(0, 1fr); } .organization-profile-preview { position: static; } }
@media (max-width: 600px) { .organization-profile-field-grid { grid-template-columns: minmax(0, 1fr); } }
.task-unit-settings-form input[type='number'] {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--navy);
}
@media (max-width: 700px) {
  .task-unit-row,
  .price-unit-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .task-unit-row > button {
    justify-self: start;
  }
}
.theme-fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 16px 16px;
  background: var(--surface);
}
.theme-fieldset legend {
  font-weight: 600;
  padding: 0 6px;
}
.theme-toggle {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.theme-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  text-align: left;
  min-width: 180px;
}
.theme-option.active {
  border-color: var(--orange);
  box-shadow: 0 0 0 2px rgba(255, 78, 40, 0.18);
}
.theme-option b {
  display: block;
  font-size: 14px;
}
.theme-option small {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.theme-swatch {
  display: inline-block;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.theme-swatch-light {
  background: linear-gradient(135deg, #ffffff, #d8def0);
}
.theme-swatch-dark {
  background: linear-gradient(135deg, #1a2040, #06081a);
}
.preference-row {
  flex-direction: row !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.preference-row:last-child {
  border-bottom: 0;
}
.preference-row span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.preference-row b {
  font-size: 14px;
}
.preference-row small {
  font-size: 12px;
  color: var(--muted);
}
.preference-row input[type='checkbox'] {
  transform: scale(1.2);
}

/* === Abonnement === */
.subscription-summary {
  display: grid;
  gap: 16px;
}
.subscription-summary-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.subscription-summary-head h3 {
  margin: 0;
  font-size: 18px;
}
.subscription-summary-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.subscription-summary-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.subscription-summary-grid > div {
  background: var(--surface);
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.subscription-summary-grid small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.subscription-summary-grid b {
  display: block;
  margin-top: 4px;
  font-size: 14px;
}
.plan-yes {
  color: var(--green);
  font-weight: 600;
}
.plan-yes.highlight {
  color: var(--orange);
}
.plan-no {
  color: var(--muted);
}
.highlight {
  background: rgba(255, 78, 40, 0.08);
  border-radius: 6px;
  padding: 0 4px;
}

/* === Quotas / usage === */
.usage-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.usage-list li {
  display: grid;
  gap: 6px;
  grid-template-columns: 1fr auto;
  align-items: center;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}
.usage-list li:last-child {
  border-bottom: 0;
}
.usage-list progress {
  grid-column: 1 / -1;
  width: 100%;
  height: 8px;
}
.settings-document-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

/* === Responsive === */
@media (max-width: 720px) {
  .theme-toggle {
    flex-direction: column;
  }
  .theme-option {
    min-width: 0;
  }
  .subscription-summary-grid {
    grid-template-columns: 1fr;
  }
}

/* === Swatches densit� visuelle === */
.density-swatch {
  display: inline-block;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.density-swatch-soonply {
  background: linear-gradient(135deg, #ff976a, #ff4d21);
}
.density-swatch-soonply::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  right: 4px;
  bottom: 4px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 4px;
}
.density-swatch-harness {
  background: #f5f6f8;
  border-color: #c8ccd6;
}
.density-swatch-harness::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  bottom: 6px;
  background: #1f2433;
  border-radius: 1px;
}
.density-swatch-ai-harness {
  background: #fbfaf7;
  border-color: #ece9e3;
}
.density-swatch-ai-harness::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  bottom: 6px;
  background: #ff7a5a;
  border-radius: 8px;
}
.density-fieldset {
  margin-top: 16px;
}
.ged-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
.ged-links .btn {
  white-space: normal;
  overflow-wrap: anywhere;
}
@media (max-width: 900px) {
  body[data-view='document-library'] .page-heading {
    flex-direction: column;
    align-items: stretch;
  }
  body[data-view='document-library'] .collection-pagination {
    display: flex;
    width: 100%;
    min-width: 0;
    flex-wrap: wrap;
    flex-shrink: 1;
  }
}
/* Choix du type de produit à la création d’un article. */
.article-type-widget {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.article-quick-panel > .article-type-widget {
  grid-column: 1 / -1;
}
.article-type-widget > p {
  margin: 0;
  color: var(--muted);
}
.article-type-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
  gap: 10px;
}
.article-type-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
}
.article-type-option:has(input:checked) {
  border-color: var(--orange);
  background: linear-gradient(#fff1e9, #fff);
  box-shadow: inset 0 0 0 1px var(--orange);
}
.article-type-option > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.article-type-option small {
  color: var(--muted);
  font-size: 0.82em;
  line-height: 1.35;
}
/* Gamme de fabrication : opérations de la nomenclature d’un article. */
.article-routings {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.article-routing-list {
  display: grid;
  gap: 8px;
}
.article-routing-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 0.6fr) auto;
  align-items: end;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}
.article-routing-row > label {
  display: grid;
  gap: 4px;
  min-width: 0;
}
@media (max-width: 768px) {
  .article-routing-row {
    grid-template-columns: minmax(0, 1fr);
  }
}
