/* Quiet, high-contrast record workspace; loaded after the legacy screens. */
html, body { background: var(--background); }
html { scroll-padding-top: 240px; }
button, a, input, select, textarea { touch-action: manipulation; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid #84966d; outline-offset: 3px;
}
.app-shell { grid-template-columns: 224px minmax(0, 1fr); }
.sidebar { background: #f9faf6; border-right: 1px solid var(--border); }
.brand strong { font-size: 12px; line-height: 1.5; white-space: normal; }
.brand small { font-size: 11px; }
.brand-mark { background: #59634d; flex-shrink: 0; }
.nav-item { min-height: 44px; border-radius: 7px; }
.nav-item.active { background: #e9eddf; color: #35432c; box-shadow: none; }
.nav-item:hover { background: #eef0e8; }
.topbar { background: #fff; position: relative; top: auto; box-shadow: none; }
.dossier-open .topbar { z-index: 25; }
.topbar h2 { font-size: 20px; }
.view-root { padding: 24px; }
.workspace { overflow-x: clip; }
.local-admin-banner { padding: 8px 24px; background: #e9eddf; color: #33432f; border-bottom: 1px solid #d3dcc7; font-size: 12px; font-weight: 600; }
.panel, .filter-card { box-shadow: none; border-color: var(--border); }
.wedding-record-link { color: var(--text-primary); font-weight: 650; text-decoration: none; }
.wedding-record-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.contracts-table tbody tr:hover { background: #f4f6ee; }
.dossier-open .contract-context { display: none; }
.dossier-open .view-root { padding-top: 0; }
.wedding-dossier { max-width: 1600px; margin: 0 auto; }
.dossier-hero { position: sticky; top: 0; z-index: 12; background: #f5f5f2; padding: 17px 0 0; border-bottom: 1px solid var(--border); }
.dossier-breadcrumb { display: flex; gap: 10px; align-items: center; font-size: 12px; color: var(--muted); margin-bottom: 16px; }
.dossier-breadcrumb a { display: inline-flex; gap: 7px; align-items: center; color: var(--text-primary); text-decoration: none; }
.dossier-breadcrumb svg { width: 14px; height: 14px; }
.dossier-record-number { margin-left: auto; }
.dossier-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.dossier-title-row h1 { font: 650 28px/1.25 var(--body-font); letter-spacing: -.8px; margin: 0 0 10px; overflow-wrap: anywhere; }
.dossier-title-row p { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; color: var(--text-secondary); margin: 0; font-size: 13px; }
.dossier-title-row p svg { width: 15px; height: 15px; }
.dossier-divider { margin: 0 4px; color: var(--border); }
.dossier-status-strip { display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 14px 0; font-size: 12px; color: var(--muted); }
.dossier-status-strip span { display: inline-flex; gap: 6px; align-items: center; }
.dossier-status-strip svg { width: 14px; height: 14px; }
.dossier-jumps { display: flex; gap: 3px; overflow-x: auto; scrollbar-width: thin; }
.dossier-jumps button { flex: 0 0 auto; min-height: 42px; color: var(--text-secondary); font-size: 12px; font-weight: 600; padding: 10px 13px; white-space: nowrap; border: 0; border-bottom: 3px solid transparent; border-radius: 6px 6px 0 0; background: transparent; box-shadow: none; transform: none; }
.dossier-jumps button:hover, .dossier-jumps button:focus-visible { color: var(--primary-dark); background: #e9eddf; border-bottom-color: #b5bfa5; box-shadow: none; transform: none; }
.dossier-jumps button.is-active { color: var(--primary-dark); background: #e9eddf; border-bottom-color: var(--primary); }
.dossier-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(250px, 3fr); gap: 24px; padding-top: 24px; align-items: start; }
.dossier-main { min-width: 0; display: grid; gap: 18px; }
.dossier-section { border: 1px solid var(--border); border-radius: 10px; background: white; overflow: hidden; scroll-margin-top: 225px; }
.dossier-section[hidden] { display: none; }
.dossier-section > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 20px; border-bottom: 1px solid var(--border-soft); }
.dossier-section h3, .dossier-alerts h3 { display: flex; gap: 9px; align-items: center; font: 650 14px/1.5 var(--body-font); margin: 0; }
.dossier-section h3 svg { width: 17px; height: 17px; color: var(--text-secondary); }
.dossier-section-body { padding: 20px; }
.dossier-section .small-button { background: transparent; border: 1px solid var(--border); color: var(--text-primary); min-height: 34px; font-size: 12px; padding: 6px 10px; }
.dossier-section .small-button:hover { background: #f0f3e9; }
.contract-preview-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.contract-preview-card small { display: block; color: var(--text-secondary); font-size: 11px; margin-bottom: 5px; }
.contract-preview-card strong { display: block; font-size: 13px; overflow-wrap: anywhere; }
.contract-preview[hidden] { display: none; }
.contract-preview { margin-top: 18px; border-top: 1px solid var(--border-soft); padding-top: 18px; }
.contract-preview-controls { display: flex; justify-content: center; align-items: center; gap: 16px; margin-bottom: 14px; font-size: 12px; }
.contract-preview-image { display: block; width: 100%; max-width: 920px; height: auto; margin: 0 auto; border: 1px solid var(--border); background: white; }
.receipt-summary { margin-top: 12px; }
.receipt-entry { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; padding: 13px 0; border-top: 1px solid var(--border-soft); }
.receipt-entry > div:first-child { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; }
.receipt-entry strong { font-size: 13px; }
.receipt-entry small { color: var(--text-secondary); font-size: 12px; }
.receipt-entry .receipt-last-edit { flex-basis: 100%; font-size: 11px; }
.receipt-entry-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.receipt-preview { flex-basis: 100%; margin-top: 0; }
.finance-review-note { padding: 10px 12px; border-radius: 6px; background: #faf3e4; color: #735821; font-size: 12px; line-height: 1.5; }
.dossier-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 28px; margin: 0; }
.dossier-fields dt { color: var(--text-secondary); font-size: 11px; margin-bottom: 5px; }
.dossier-fields dd { margin: 0; font-size: 13px; font-weight: 550; overflow-wrap: anywhere; }
.unfilled { color: var(--text-muted); font-weight: 400; }
.dossier-table { font-size: 12px; min-width: 420px; }
.dossier-table th { background: #f8f9f5; color: var(--text-secondary); font-weight: 550; padding: 10px; }
.dossier-table td { padding: 13px 10px; vertical-align: middle; }
.dossier-table small { display: block; font-size: 11px; color: var(--text-secondary); margin-top: 4px; }
.dossier-table tr:last-child td { border-bottom: 0; }
.dossier-badge { display: inline-block; color: #586052; background: #f0f1ec; padding: 4px 7px; border-radius: 5px; font-size: 11px; white-space: nowrap; }
.dossier-badge.is-done { color: #376044; background: #edf4ed; }
.dossier-badge.is-pending { color: #806124; background: #faf3e4; }
.dossier-empty { padding: 12px 0; margin: 0; color: var(--text-secondary); font-size: 13px; }
.dossier-hint { font-size: 11px; line-height: 1.7; color: var(--text-secondary); margin: 14px 0 0; }
.dossier-note { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.8; margin: 0; }
.dossier-delivery + .dossier-delivery { border-top: 1px solid var(--border); padding-top: 20px; margin-top: 20px; }
.dossier-delivery .dossier-note { margin-top: 15px; }
.dossier-money { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mold-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.mold-summary > div { padding: 12px 14px; border-radius: 7px; background: #f6f8f2; }
.mold-summary small { display: block; color: var(--text-secondary); font-size: 11px; margin-bottom: 5px; }
.mold-summary strong { font-size: 18px; }
.native-order-list { display: grid; gap: 10px; margin-top: 18px; }
.native-order-list > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px; border: 1px solid var(--border); border-radius: 8px; }
.native-order-list strong, .native-order-list small { display: block; }
.native-order-list small { color: var(--text-secondary); margin-top: 4px; }
.order-print-dialog { width: min(900px, calc(100vw - 32px)); max-height: min(94vh, 1200px); padding: 0; border: 1px solid var(--border); border-radius: 10px; background: #f0f1ec; }
.order-print-toolbar { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--border); background: #fff; }
.order-print-toolbar > div { display: flex; gap: 8px; }
.order-print-sheet { box-sizing: border-box; display: flex; flex-direction: column; width: min(100%, 210mm); min-height: 267mm; margin: 18px auto; padding: 17mm 14mm; color: #253029; background: #fff; box-shadow: 0 3px 18px #29322b18; font-size: 11px; line-height: 1.35; }
.order-print-page-header { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 12px; padding-bottom: 12px; border-bottom: 2px solid #59634d; margin-bottom: 18px; }
.order-print-brand { max-width: 130px; color: #59634d; font-size: 11px; font-weight: 750; line-height: 1.25; }
.order-print-brand img { display: block; width: 130px; height: 66px; max-width: 100%; object-fit: contain; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.order-print-page-header h1 { margin: 0; color: #253029; font-size: 18px; font-weight: 750; text-align: center; white-space: nowrap; }
.order-print-number { font-size: 11px; font-weight: 650; text-align: right; }
.order-print-number small { display: block; color: #667066; font-size: 10px; font-weight: 400; margin-top: 2px; }
.order-paid-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 2px solid #26734d; border-radius: 4px; color: #175537; background: #e7f5ed; font-size: 12px; font-weight: 750; line-height: 1.25; white-space: nowrap; }
.order-paid-badge svg { width: 16px; height: 16px; }
.order-payment-stamp { align-self: flex-end; display: flex; flex-direction: column; align-items: center; gap: 2px; max-width: 100%; margin: 0 0 14px; padding: 7px 14px; border: 4px double #26734d; border-radius: 4px; color: #175537; background: #e7f5ed; text-align: center; print-color-adjust: exact; -webkit-print-color-adjust: exact; break-inside: avoid; }
.order-payment-stamp strong { font-size: 28px; font-weight: 800; line-height: 1.05; }
.order-payment-stamp span { font-size: 10px; font-weight: 650; }
.order-payment-review-list { display: grid; gap: 10px; margin: 16px 0; }
.order-payment-review-list label { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 6px; }
.order-payment-review-list input { width: auto; margin-top: 4px; }
.order-payment-review-list strong, .order-payment-review-list small { display: block; }
.tasting-print-label { margin: 0 0 14px; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.order-print-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; margin: 0; }
.order-print-facts--secondary { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 12px; }
.order-print-facts > div { min-width: 0; }
.order-print-facts dt { color: #657066; font-size: 9px; text-transform: uppercase; letter-spacing: .04em; }
.order-print-facts dd { margin: 2px 0 0; font-weight: 650; overflow-wrap: anywhere; }
.order-print-block { margin-top: 18px; }
.order-print-block h2 { margin: 0 0 8px; padding-bottom: 5px; border-bottom: 1px solid #cad2c8; color: #394931; font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }
.order-print-block p { margin: 5px 0; }
.order-print-sheet table { width: 100%; border-collapse: collapse; font-size: 10px; }
.order-print-sheet th { padding: 6px 5px; color: #536053; background: #f3f5ef; font-size: 9px; text-transform: uppercase; letter-spacing: .03em; }
.order-print-sheet td { padding: 6px 5px; border-bottom: 1px solid #e5e9e2; vertical-align: top; overflow-wrap: anywhere; }
.order-print-sheet th:first-child, .order-print-sheet td:first-child { text-align: left; }
.order-print-sheet th:not(:first-child), .order-print-sheet td:not(:first-child) { text-align: right; white-space: nowrap; }
.order-print-check { width: 60px; font-size: 16px; line-height: 10px; }
.order-print-molds th:last-child, .order-print-molds td:last-child { width: 100px; }
.order-print-totals { width: min(100%, 280px); margin: 16px 0 0 auto; }
.order-print-totals > div { display: flex; justify-content: space-between; gap: 20px; padding: 3px 0; }
.order-print-totals .is-total { border-top: 2px solid #59634d; padding-top: 7px; margin-top: 4px; font-size: 13px; }
.order-print-payment { margin-top: 14px; }
.order-print-notes { white-space: pre-wrap; overflow-wrap: anywhere; }
.order-print-delivery + .order-print-delivery { margin-top: 10px; padding-top: 10px; border-top: 1px solid #d7ded5; }
.order-print-checklist { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.order-print-stamps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 42px; margin-top: auto; padding-top: 32px; }
.order-print-stamps > div { text-align: center; }
.order-print-stamps span { display: block; border-top: 1px solid #49564b; margin-bottom: 7px; }
.order-print-stamps strong { display: block; font-size: 13px; }
.order-print-stamps small { color: #6a746b; font-size: 9px; }
.order-print-sheet--compact { font-size: 10px; }
.order-print-sheet--compact td { padding-top: 3px; padding-bottom: 3px; }
@media (max-width: 650px) { .order-print-sheet { min-height: 0; padding: 22px 18px; } .order-print-page-header { grid-template-columns: 1fr; text-align: center; } .order-print-brand, .order-print-number { max-width: none; text-align: center; } .order-print-facts--secondary { grid-template-columns: repeat(2, minmax(0, 1fr)); } .order-print-toolbar { flex-wrap: wrap; } }
.dossier-money small { display: block; font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.dossier-money strong { font-size: 18px; font-weight: 600; }
.dossier-progress { display: flex; align-items: center; gap: 12px; font-size: 11px; color: var(--muted); margin: 20px 0; }
.dossier-progress progress { flex: 1; width: 0; height: 6px; accent-color: #657754; }
.dossier-files > div { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border-soft); }
.dossier-files > div:last-child { border: 0; }
.dossier-files > div > svg { width: 19px; height: 19px; color: var(--muted); flex-shrink: 0; }
.dossier-files > div > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.dossier-files strong { display: block; font-size: 12px; }
.dossier-files small { color: var(--muted); font-size: 11px; }
.dossier-aside { align-self: stretch; min-width: 0; }
.dossier-aside-sticky { position: sticky; top: 226px; max-height: calc(100vh - 246px); overflow-y: auto; scrollbar-width: thin; }
.dossier-summary { padding: 20px; background: #edf0e6; border: 1px solid #dce2d1; border-radius: 10px; }
.dossier-summary .eyebrow { color: #58644b; font-size: 10px; }
.dossier-countdown { display: block; font-size: 21px; font-weight: 600; margin: 8px 0 22px; }
.dossier-summary .dossier-fields { grid-template-columns: 1fr; gap: 13px; }
.dossier-summary .dossier-fields > div { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 12px; }
.dossier-summary dt { margin: 0; }
.dossier-summary dd { font-size: 12px; }
.dossier-alerts { margin-top: 20px; padding: 0 4px; }
.dossier-alerts h3 > svg { width: 16px; height: 16px; color: #8e7034; }
.dossier-alerts h3 > span { margin-left: auto; background: #e9e5d9; padding: 1px 7px; border-radius: 5px; font-size: 11px; }
.dossier-alerts ul { padding: 0; list-style: none; margin: 12px 0 0; }
.dossier-alerts li { border-bottom: 1px solid var(--border); }
.dossier-alerts a { display: flex; gap: 9px; color: var(--text-primary); text-decoration: none; font-size: 12px; padding: 12px 0; }
.dossier-alerts a:hover { text-decoration: underline; }
.dossier-alerts a svg { width: 14px; height: 14px; flex-shrink: 0; color: #8e7034; margin-top: 2px; }
.dossier-loading { padding: 60px 20px; color: var(--muted); text-align: center; }
.dossier-section .history-item { border-left-color: #dce2d1; }
@media (min-width: 861px) {
  .app-shell.sidebar-collapsed { grid-template-columns: 72px minmax(0, 1fr); }
  .sidebar-collapsed .brand > div, .sidebar-collapsed .nav-item > span, .sidebar-collapsed .sidebar-footer button > span, .sidebar-collapsed #currentUser { display: none; }
  .sidebar-collapsed .nav-item, .sidebar-collapsed .sidebar-footer button { justify-content: center; padding: 10px; }
  .sidebar-collapsed .sidebar { padding: 16px 10px; }
}
@media (max-width: 1100px) {
  .dossier-layout { gap: 16px; grid-template-columns: minmax(0, 1fr) 250px; }
  .dossier-title-row h1 { font-size: 24px; }
  .dossier-money { grid-template-columns: 1fr; gap: 12px; }
  .dossier-money > div { display: flex; justify-content: space-between; align-items: center; }
  .dossier-money small { margin: 0; }
}
@media (max-width: 860px) {
  .app-shell, .app-shell.sidebar-collapsed { grid-template-columns: 1fr; }
  #collapseSidebar { display: none; }
  .view-root { padding: 16px; }
  .dossier-layout { grid-template-columns: minmax(0, 1fr); }
  .dossier-aside { grid-row: 1; }
  .dossier-aside-sticky { position: static; max-height: none; overflow: visible; }
  .dossier-summary { display: none; }
  .dossier-alerts { border: 1px solid var(--border); padding: 14px; border-radius: 8px; margin-top: 0; background: #faf9f4; }
  .dossier-alerts ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
  .dossier-aside-sticky > .dossier-hint { display: none; }
  .dossier-hero { position: sticky; top: 60px; }
  .dossier-section { scroll-margin-top: 300px; }
  html { scroll-padding-top: 15px; }
}
@media (max-width: 560px) {
  .contract-preview-card .small-button { width: 100%; }
  .dossier-title-row { flex-wrap: wrap; }
  .dossier-breadcrumb { display: none; }
  .dossier-title-row > .status-pill { display: none; }
  .dossier-title-row h1 { font-size: 23px; }
  .dossier-section > header, .dossier-section-body { padding: 15px; }
  .dossier-section > header { flex-wrap: wrap; }
  .dossier-fields { gap: 17px; }
  .dossier-alerts ul { grid-template-columns: 1fr; }
  .dossier-status-strip { gap: 10px; }
  .dossier-section .small-button { min-height: 40px; }
  .dossier-record-number { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
@media print {
  body:has(#orderPrintDialog[open]) > *:not(#orderPrintDialog) { display: none !important; }
  #orderPrintDialog[open] { position: static; display: block; width: auto; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: #fff; box-shadow: none; }
  #orderPrintDialog::backdrop, #orderPrintDialog .order-print-toolbar { display: none; }
  #orderPrintDialog .order-print-sheet { width: 182mm; height: 267mm; min-height: 0; margin: 0; padding: 0; box-shadow: none; break-after: page; page-break-after: always; }
  #orderPrintDialog .order-print-sheet:last-child { break-after: auto; page-break-after: auto; }
  #orderPrintDialog.order-print-dialog--tasting .order-print-sheet { height: auto; min-height: 267mm; }
  #orderPrintDialog .order-print-sheet .order-print-page-header { grid-template-columns: 1fr auto 1fr; text-align: initial; }
  #orderPrintDialog .order-print-sheet .order-print-brand { text-align: left; }
  #orderPrintDialog .order-print-sheet .order-print-number { text-align: right; }
  #orderPrintDialog .order-print-sheet .order-print-facts--secondary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  @page { size: A4; margin: 14mm; }
  .dossier-hero, .dossier-aside-sticky { position: static; max-height: none; overflow: visible; }
  .dossier-layout { display: block; }
  .dossier-aside, .dossier-jumps, .dossier-section button { display: none; }
  .dossier-section[hidden] { display: block; }
  .dossier-section { break-inside: avoid; margin-bottom: 12px; }
}

/* Workspace navigation, consultation tables and focused inline editors. */
.sidebar .nav-list { min-height: 0; overflow-y: auto; flex: 1; padding-bottom: 16px; }
.nav-group-label { display: block; margin: 18px 12px 6px; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.sidebar-collapsed .nav-group-label { font-size: 0; margin: 12px 8px 6px; border-top: 1px solid var(--line); }
.workspace-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.workspace-toolbar h3 { margin: 0 0 5px; }
.workspace-toolbar span, .workspace-toolbar > p { color: var(--muted); font-size: 12px; }
.workspace-filters { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 12px; align-items: end; }
.workspace-filters .filter-wide { grid-column: span 2; }
.workspace-filters label { min-width: 0; }
.workspace-filters input, .workspace-filters select { width: 100%; }
.workspace-search { max-width: 450px; }
.wedding-list-panel { padding: 0; overflow: hidden; }
.wedding-list-panel table { min-width: 1400px; }
.wedding-list-panel th:nth-child(2), .wedding-list-panel td:nth-child(2) { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 210px; border-right: 1px solid var(--line); }
.wedding-list-panel th:nth-child(2) { background: #f6f7f4; }
.record-link { display: inline-block; padding: 4px 0; font-weight: 650; color: #3f5144; text-decoration: none; }
.record-link:hover { text-decoration: underline; }
.table-sort { border: 0; background: none; color: inherit; padding: 0; font: inherit; min-height: 30px; box-shadow: none; }
.table-sort:hover { background: transparent; color: #3f5144; }
.pending-dot { display: inline-flex; min-width: 24px; height: 24px; justify-content: center; align-items: center; background: #f8efdd; color: #775b25; border-radius: 20px; }
.pagination-bar { padding: 16px; margin: 0; }
.inline-editor { background: #f6f7f4; border: 1px solid #dce3d9; border-radius: 10px; padding: 20px; margin-top: 20px; }
.inline-editor h4 { font-size: 16px; margin: 0 0 18px; }
.inline-editor .form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.inline-editor textarea { min-height: 100px; }
.inline-editor .actions-row { margin-top: 14px; }
.mold-record, .legal-record, .dossier-delivery { border-bottom: 1px solid var(--line); padding: 18px 0; }
.mold-record:first-child, .legal-record:first-child, .dossier-delivery:first-child { padding-top: 0; }
.mold-reference { display: flex; align-items: center; gap: 16px; margin: 14px 0; }
.mold-reference img { width: 150px; height: 120px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; background: white; }
.dossier-order-summary { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--line); }
.dossier-order-summary p { width: 100%; margin: 0; }
.dossier-order-summary .contract-preview { flex-basis: 100%; width: 100%; }
.dossier-note { white-space: pre-wrap; overflow-wrap: anywhere; }
.note-context { padding: 10px 0; }
.context-note { border-left: 2px solid #dce3d9; padding: 0 0 0 14px; margin: 12px 0; }
.context-note small { color: var(--muted); }
.dossier-files > div { flex-wrap: wrap; }
.dossier-loading { padding: 50px 24px; text-align: center; color: var(--muted); }
.small-button.selected { background: #e5ebe1; border-color: #899c83; }
.calendar-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.wedding-calendar { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); min-width: 760px; }
.calendar-weekday { text-align: center; padding: 12px; font-size: 11px; font-weight: 650; background: #f6f7f4; }
.calendar-day { min-height: 125px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); padding: 9px; }
.calendar-week .calendar-day { min-height: 300px; }
.calendar-day time { font-size: 12px; font-weight: 600; }
.calendar-day.muted-day { background: #fafaf8; color: #999; }
.calendar-day.today { box-shadow: inset 0 3px #798c71; }
.calendar-event { display: block; background: #edf1e9; padding: 9px; border-radius: 6px; margin-top: 8px; text-decoration: none; color: #354638; overflow-wrap: anywhere; }
.calendar-event:hover { background: #e1e8db; }
.calendar-event strong { display: block; font-size: 11px; }
.calendar-event small { display: block; font-size: 10px; margin-top: 5px; }
.pipeline-board { display: flex; gap: 16px; overflow-x: auto; align-items: start; padding-bottom: 18px; }
.pipeline-column { background: #f0f2ed; border-radius: 10px; padding: 14px; min-width: 265px; width: 265px; flex-shrink: 0; }
.pipeline-column > h3 { text-transform: capitalize; font-size: 13px; display: flex; justify-content: space-between; margin: 0 0 15px; }
.pipeline-record { background: white; border: 1px solid var(--line); border-radius: 8px; padding: 15px; margin-top: 10px; }
.pipeline-record p { font-size: 12px; color: var(--muted); line-height: 1.6; }
.pipeline-record select { width: 100%; margin-top: 14px; font-size: 12px; }
.crm-app .section.pipeline-center { min-width: 0; gap: 12px; }
.pipeline-toolbar { display: flex; align-items: end; gap: 16px; flex-wrap: wrap; }
.pipeline-search { width: 260px; max-width: 100%; flex-shrink: 0; }
.pipeline-date-filters { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.pipeline-date-filters label { width: 156px; max-width: 100%; }
.pipeline-date-filters input { width: 100%; }
.pipeline-delivery { display: flex; align-items: center; gap: 6px; color: var(--text-secondary); font-size: 11px; }
.pipeline-delivery svg { width: 14px; height: 14px; flex-shrink: 0; }
.pipeline-seller-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.crm-app .pipeline-center .pipeline-seller-filter { display: inline-flex; align-items: center; gap: 8px; padding: 8px 10px; background: white; border: 1px solid #dce3e6; border-radius: 6px; color: #314958; min-height: 36px; font-size: 12px; }
.crm-app .pipeline-center .pipeline-seller-filter[aria-pressed=true] { border-color: var(--primary); background: var(--primary-light); box-shadow: inset 0 0 0 1px var(--primary); }
.crm-app .pipeline-center .pipeline-seller-filter:hover { background: var(--surface-hover); color: var(--text-primary); }
.pipeline-seller-filter>span { font-variant-numeric: tabular-nums; color: #637783; }
.pipeline-color-dot { width: 14px; height: 14px; flex: 0 0 14px; border-radius: 50%; border: 1px solid #0002; }
.pipeline-feedback { min-height: 18px; margin: 0; color: #476a58; font-size: 12px; }
.pipeline-feedback[role=alert] { color: #b23b35; }
.crm-app .pipeline-center .pipeline-board { gap: 14px; align-items: stretch; overscroll-behavior-x: contain; }
.crm-app .pipeline-center .pipeline-column { display: flex; flex-direction: column; flex: 0 0 286px; width: 286px; min-width: 286px; min-height: 220px; max-height: var(--pipeline-column-height,max(260px,calc(100dvh - 310px))); padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-panel); background: var(--surface-soft); transition: border-color var(--motion-fast) var(--motion-ease), background-color var(--motion-fast) var(--motion-ease); }
.crm-app .pipeline-center .pipeline-column>h3 { min-height: 28px; margin: 0 0 10px; padding: 4px 2px; color: #354e5d; font-weight: 600; }
.pipeline-column>h3>span { min-width: 24px; text-align: center; font-variant-numeric: tabular-nums; }
.pipeline-column-records { position: relative; display: grid; grid-auto-rows: max-content; gap: 10px; overflow-y: auto; min-height: 140px; padding: 4px; scrollbar-gutter: stable; }
.crm-app .pipeline-record { display: grid; grid-template-rows: 60px 34px 20px 28px 34px; gap: 8px; min-width: 0; margin: 0; padding: 12px; border: 1px solid var(--border); border-left: 4px solid var(--seller-color); border-radius: var(--radius-panel); background: #fff; box-shadow: var(--shadow-soft); transition: transform var(--motion-hover) var(--motion-ease), box-shadow var(--motion-hover) var(--motion-ease), opacity var(--motion-fast) var(--motion-ease); }
.crm-app .pipeline-record:not(.is-dragging):not(.is-saving):hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.crm-app .pipeline-record:focus-within { box-shadow: var(--shadow-hover); }
.pipeline-record[draggable=true] { cursor: grab; }
.pipeline-card-heading { display: flex; align-items: start; gap: 6px; min-width: 0; }
.pipeline-card-heading>.record-link { min-width: 0; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; font-size: 13px; line-height: 20px; font-weight: 600; color: var(--text-primary); }
.crm-app .pipeline-record .pipeline-grip { flex: 0 0 24px; width: 24px; height: 24px; min-height: 24px; padding: 2px; border: 0; background: transparent; color: #7c8f9a; cursor: grab; }
.crm-app .pipeline-record .pipeline-grip:is(:hover,:active) { background: var(--surface-soft); color: var(--text-secondary); }
.pipeline-grip:focus-visible { outline: 2px solid #2872a5; outline-offset: 2px; }
.pipeline-grip svg { width: 18px; height: 18px; }
.crm-app .pipeline-record p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; margin: 0; font-size: 11px; line-height: 17px; }
.pipeline-seller { display: inline-flex; width: fit-content; max-width: 100%; align-items: center; gap: 6px; overflow: hidden; white-space: nowrap; border-radius: 6px; padding: 4px 7px; background: var(--seller-tint); color: var(--seller-ink); font-size: 11px; }
.pipeline-seller svg { width: 13px; height: 13px; flex-shrink: 0; }
.crm-app .pipeline-record select { align-self: end; height: 34px; margin: 0; padding-block: 4px; border-color: var(--border); border-radius: 6px; font-size: 11px; }
.pipeline-readonly-stage { align-self: center; color: #607784; font-size: 12px; }
.pipeline-empty { padding: 12px 4px; margin: 0; font-size: 12px; line-height: 1.6; color: var(--text-on-secondary); }
.crm-app .pipeline-center .pipeline-column.is-drop-target { border-color: var(--primary); background: var(--surface-hover); }
.crm-app .pipeline-record.is-dragging { opacity: .3; transform: scale(1.015); box-shadow: var(--shadow-drag); }
.pipeline-record.is-saving { opacity: .6; }
.pipeline-drop-slot { min-height: 206px; border: 1px dashed var(--primary); border-radius: var(--radius-panel); background: var(--surface-hover); }
.pipeline-drop-slot:has(.pipeline-record) { border: 0; background: transparent; }
.pipeline-drop-slot .pipeline-record { opacity: .8; pointer-events: none; }
.crm-app .pipeline-drag-image { position: fixed; left: -10000px; top: 0; pointer-events: none; transform: scale(1.015); box-shadow: var(--shadow-drag); }
.pipeline-color-fields { display: grid; gap: 12px; margin: 12px 0 20px; }
.pipeline-color-fields label { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 20px; min-height: 40px; }
.pipeline-color-fields input[type=color] { width: 64px; height: 38px; flex-shrink: 0; padding: 3px; cursor: pointer; border-radius: 6px; }
@media(max-width:640px) { .pipeline-search { width: 100%; } .crm-app .pipeline-center .pipeline-column { flex-basis: 270px; width: 270px; min-width: 270px; max-height: 65dvh; } }
[hidden] { display: none !important; }
@media (max-width:1100px) { .workspace-filters { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width:680px) { .workspace-filters { grid-template-columns: repeat(2,minmax(0,1fr)); } .inline-editor { padding: 14px; } .inline-editor .form-grid { grid-template-columns: 1fr; } .workspace-toolbar .actions-row { flex-wrap: wrap; } .dossier-files > div > div { min-width: 140px; } }
@media (max-width:860px) { .sidebar.menu-open .nav-list { max-height: 60vh; overflow-y: auto; } .nav-group-label, .sidebar-collapsed .nav-group-label { grid-column: 1/-1; font-size: 10px; border: 0; } }
