/* Shared CRM-inspired presentation for every existing role. No workflow selectors,
   permission changes, field reordering or print/paper-template overrides. */
@media screen {
  body.internal-refined { --refined-ink:#342a35; --refined-muted:#7c6c79; --refined-line:#e9e0e7; --refined-accent:#b8336b; --refined-soft:#fcf4f8; background:#f9f6f8; }
  body.internal-refined .workspace { background:#f9f6f8; }
  body.internal-refined .workspace::before,body.internal-refined .topbar::after { display:none; }
  body.internal-refined .topbar { background:#ffffffed; border-bottom:1px solid var(--refined-line); box-shadow:none; }
  body.internal-refined .breadcrumb { color:#927989; }
  body.internal-refined .breadcrumb strong { color:#4c394b; font-weight:600; }
  body.internal-refined .global-search { border:1px solid #e5dce3; border-radius:10px; background:#fcfafc; box-shadow:none; }
  /* Keep the entire left navigation on its original app.css/responsive.css theme:
     branding, menu states, role picker and account footer are intentionally untouched. */

  /* One title hierarchy, quiet surfaces, no decorative shapes behind data. */
  body.internal-refined #mainContent>.page-head { min-height:0; display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:20px; margin:0 0 26px; padding:4px 0 12px; border:0; border-radius:0; background:transparent; box-shadow:none; }
  body.internal-refined .page-head::before,body.internal-refined .page-head::after,body.internal-refined .page-head h1::after { display:none; }
  body.internal-refined .page-head h1 { max-width:none; margin:8px 0 6px; font-size:28px; font-weight:650; line-height:1.4; letter-spacing:-.02em; color:var(--refined-ink); }
  body.internal-refined .page-head p { margin:0; color:var(--refined-muted); font-size:13px; line-height:1.75; }
  body.internal-refined #mainContent .eyebrow { padding:0; border:0; border-radius:0; background:none; color:#9a7187; box-shadow:none; font-size:10px; font-weight:600; letter-spacing:.08em; }
  body.internal-refined #mainContent .eyebrow::before { display:none; }
  body.internal-refined .smart-work-hero { padding:20px 22px; border:1px solid #e8dbe4; border-radius:16px; background:#fdf8fb; box-shadow:none; }
  body.internal-refined .smart-work-hero h2 { color:#4d384b; font-size:20px; font-weight:600; }
  body.internal-refined .smart-work-hero>div:first-child>span { border:1px solid #e9d6e2; border-radius:12px; color:#9c5b7d; background:#f7eaf1; box-shadow:none; }
  body.internal-refined .smart-work-hero p { color:#8b7484; font-size:12px; }
  body.internal-refined .metric,body.internal-refined .module-card,body.internal-refined .setting-card,body.internal-refined .smart-work-metrics:not(.crm-metrics) article { border:1px solid var(--refined-line); border-radius:15px; background:#fff; box-shadow:0 4px 18px #43273a04; animation:none; }
  body.internal-refined .metric::before,body.internal-refined .metric::after,body.internal-refined .module-card::before,body.internal-refined .module-card::after,body.internal-refined .setting-card::before,body.internal-refined .smart-work-metrics:not(.crm-metrics) article::before { display:none; }
  body.internal-refined .metric { min-height:122px; padding:20px; }
  body.internal-refined .metric strong,body.internal-refined .smart-work-metrics:not(.crm-metrics) strong { color:var(--refined-ink); font-family:inherit; font-size:30px; font-weight:650; }
  body.internal-refined .metric-top { color:#786774; font-weight:550; font-size:12px; }
  body.internal-refined .metric small,body.internal-refined .smart-work-metrics:not(.crm-metrics) small { max-width:none; color:#968391; font-size:11px; white-space:normal; overflow:visible; }
  body.internal-refined .metric-icon,body.internal-refined .module-card .big-icon,body.internal-refined .setting-icon { color:#95617f; background:#f9eff5; border:1px solid #eddce6; box-shadow:none; }
  body.internal-refined .metric-clickable:hover,body.internal-refined .module-card:hover,body.internal-refined .setting-card:hover { transform:none; border-color:#ce9eb7; box-shadow:0 5px 20px #56334808; }
  body.internal-refined .module-card h3 { color:#4e3a4b; font-size:17px; font-weight:600; }
  body.internal-refined .module-card p { color:#877582; font-size:12px; }
  body.internal-refined .panel,body.internal-refined .data-panel,body.internal-refined .smart-work-panel,body.internal-refined .message-inbox-shell { border:1px solid var(--refined-line); border-radius:16px; background:#fff; box-shadow:0 5px 22px #43273a04; }
  body.internal-refined .panel-head { min-height:72px; padding:20px 22px; background:#fff; border-bottom:1px solid #eee6ec; }
  body.internal-refined .panel-head::before { display:none; }
  body.internal-refined .panel-head h2 { color:#4f3c4c; font-size:17px; font-weight:600; }
  body.internal-refined .panel-head p { color:#927e8b; font-size:12px; }
  body.internal-refined .section-title { color:#6a4a61; font-size:16px; font-weight:600; }
  body.internal-refined .section-title::before { width:3px; height:17px; border-radius:3px; background:#be7c9e; box-shadow:none; }
  body.internal-refined .section-title::after { background:#e9dfe7; }
  body.internal-refined .batch-project-card,body.internal-refined .compounding-project-card,body.internal-refined .flow-production-radar { border:1px solid #e5d9e2; border-radius:14px; box-shadow:none; background:#fff; }
  body.internal-refined .flow-production-radar>header { border:0; border-bottom:1px solid #eee4eb; background:#fcf8fa; box-shadow:none; }

  /* Common toolbars/lists; status chips and alert colors remain semantic. */
  body.internal-refined .toolbar { border:1px solid #e7dce4; border-radius:12px; padding:14px; background:#fff; box-shadow:none; }
  body.internal-refined .toolbar>input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),body.internal-refined .toolbar>select,body.internal-refined .smart-work-toolbar>select { min-height:44px; min-width:0; padding:9px 12px; border:1px solid #e1d4de; border-radius:10px; background:#fcfafc; color:#6b5263; font:inherit; font-size:13px; box-shadow:none; }
  body.internal-refined .toolbar>input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) { flex:1 1 220px; }
  body.internal-refined .smart-work-toolbar { padding:16px 20px; gap:12px; background:#fff; border-bottom:1px solid #f0e8ee; }
  body.internal-refined .smart-work-toolbar label { border-color:#e2d6df; background:#fcfafc; border-radius:10px; box-shadow:none; }
  body.internal-refined .smart-work-guidance { background:#fcf7fa; color:#93798a; font-size:11px; }
  body.internal-refined .smart-work-guidance b { border:0; background:#f4e6ee; color:#9c6685; box-shadow:none; font-weight:550; }
  body.internal-refined .smart-work-item:not(.crm-card) { padding:18px 20px; background:#fff; border-color:#eee7ed; box-shadow:none; }
  body.internal-refined .smart-work-item:not(.crm-card):hover { background:#fdf9fb; box-shadow:none; }
  body.internal-refined .smart-work-item:not(.crm-card) .smart-work-main>div { flex-wrap:wrap; }
  body.internal-refined .smart-work-item:not(.crm-card) .smart-work-main strong { font-size:14px; font-weight:600; white-space:normal; overflow-wrap:anywhere; color:#513c4e; }
  body.internal-refined .smart-work-item:not(.crm-card) .smart-work-main p { font-size:12px; white-space:normal; overflow-wrap:anywhere; color:#8a7482; }
  body.internal-refined .smart-work-item:not(.crm-card) .smart-work-main>span { font-size:11px; white-space:normal; overflow-wrap:anywhere; }
  body.internal-refined .smart-work-icon { color:#a16b8b; background:#f8eef4; border-radius:10px; }
  body.internal-refined .data-panel>.table-scroll .data-table th,body.internal-refined .panel>.table-scroll .data-table th { color:#806a7b; background:#faf6f9; font-size:11px; font-weight:600; border-color:#eee5ec; }
  body.internal-refined .data-panel>.table-scroll .data-table td,body.internal-refined .panel>.table-scroll .data-table td { padding:14px 16px; border-color:#f0e8ee; font-size:13px; }
  body.internal-refined .data-panel>.table-scroll .data-table tbody tr:hover td { background:#fcf6fa; box-shadow:none; }
  body.internal-refined .table-scroll { scrollbar-color:#d4bdce #faf7fa; }
  body.internal-refined .empty-state { color:#998391; }
  body.internal-refined .empty-state h3 { font-size:16px; font-weight:600; color:#806577; }
  body.internal-refined .empty-icon { background:#f9f1f6; color:#b28ba1; box-shadow:none; }

  body.internal-refined .head-tools button,body.internal-refined .toolbar button,body.internal-refined .smart-work-side button,body.internal-refined .quick-button,body.internal-refined .smart-work-toolbar>button { min-height:42px; padding:9px 14px; border:1px solid #dfcdd8; border-radius:10px; color:#704e65; background:#fff; box-shadow:none; font-size:13px; font-weight:550; line-height:1.5; white-space:normal; }
  body.internal-refined .head-tools button.primary,body.internal-refined .toolbar button.primary,body.internal-refined .smart-work-side button.primary { color:#fff; border-color:#b8336b; background:#b8336b; }
  body.internal-refined .head-tools button.danger,body.internal-refined .toolbar button.danger,body.internal-refined .toolbar button.danger-soft { color:#a13c51; border-color:#dfb7c1; background:#fff7f8; }
  body.internal-refined .head-tools button:hover,body.internal-refined .toolbar button:hover,body.internal-refined .smart-work-side button:hover { transform:none; border-color:#bf7a9b; box-shadow:none; }
  body.internal-refined .head-tools button:focus-visible,body.internal-refined .toolbar button:focus-visible,body.internal-refined .smart-work-side button:focus-visible { outline:2px solid #a43166; outline-offset:3px; }
  body.internal-refined .head-tools button:disabled,body.internal-refined .toolbar button:disabled { opacity:.55; cursor:not-allowed; }

  /* Only ordinary forms: original sheets, signatures and print layout are excluded. */
  body.internal-refined #quickDialog:not(:has([class*="sheet"],.signature-pad,canvas,.sample-request-form,.crm-detail,.crm-quote-entry)) { border:1px solid #e4d5df; border-radius:20px; background:#fff; box-shadow:0 28px 90px #34223538; }
  body.internal-refined #quickDialog:not(:has([class*="sheet"],.signature-pad,canvas,.sample-request-form,.crm-detail,.crm-quote-entry)) .dialog-head { width:auto; max-width:none; background:#fcf8fb; border-bottom:1px solid #eadfe7; }
  body.internal-refined #quickDialog:not(:has([class*="sheet"],.signature-pad,canvas,.sample-request-form,.crm-detail,.crm-quote-entry)) .dialog-head h2 { color:#473144; font-size:24px; font-weight:650; line-height:1.4; }
  body.internal-refined #quickDialog:not(:has([class*="sheet"],.signature-pad,canvas,.sample-request-form,.crm-detail,.crm-quote-entry)) .dialog-head button { width:auto; min-width:44px; min-height:44px; height:auto; padding:8px 12px; border:1px solid #dfcdd8; border-radius:10px; background:#fff; color:#986380; box-shadow:none; font-size:13px; font-weight:550; white-space:nowrap; }
  body.internal-refined #quickDialog>form:not(:has([class*="sheet"],.signature-pad,canvas)) fieldset { border:1px solid #e8dae4; border-radius:12px; background:#fff; box-shadow:none; }
  body.internal-refined #quickDialog>form:not(:has([class*="sheet"],.signature-pad,canvas)) legend { border:1px solid #eddee7; border-radius:8px; background:#fcf5f9; color:#9b5c80; box-shadow:none; font-size:13px; font-weight:600; }
  body.internal-refined #quickDialog>form:not(:has([class*="sheet"],.signature-pad,canvas)) .form-grid label>span { color:#806577; font-weight:550; letter-spacing:0; }
  body.internal-refined #quickDialog>form:not(:has([class*="sheet"],.signature-pad,canvas)) input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]),body.internal-refined #quickDialog>form:not(:has([class*="sheet"],.signature-pad,canvas)) select,body.internal-refined #quickDialog>form:not(:has([class*="sheet"],.signature-pad,canvas)) textarea { border:1px solid #ded1dc; border-radius:10px; background:#fff; color:#49384a; box-shadow:none; }
  body.internal-refined #quickDialog>form:not(:has([class*="sheet"],.signature-pad,canvas)) input[readonly]:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]),body.internal-refined #quickDialog>form:not(:has([class*="sheet"],.signature-pad,canvas)) input:disabled:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]) { color:#82777e; background:#f4f2f5; }
  body.internal-refined #quickDialog>form:not(:has([class*="sheet"],.signature-pad,canvas)) .form-actions>button { min-height:44px; border-radius:10px; box-shadow:none; font-weight:600; }
  body.internal-refined #quickDialog>form:not(:has([class*="sheet"],.signature-pad,canvas)) .form-actions>button:not(.primary):not(.danger):not(.danger-soft) { padding:10px 16px; border:1px solid #deced8; background:#fff; color:#75536a; font-size:13px; }
  body.internal-refined #quickDialog>form:not(:has([class*="sheet"],.signature-pad,canvas)) .form-actions>button.primary { color:#fff; background:#b8336b; border-color:#b8336b; }
  body.internal-refined .business-detail>div { border:1px solid #eee4eb; border-radius:10px; background:#fcf9fb; }
  body.internal-refined .business-detail strong { font-size:14px; font-weight:550; color:#4c384a; }
  body.internal-refined .business-detail span { color:#947c8c; font-size:11px; }
}
@media screen and (max-width:1199px) {
  body.internal-refined .head-tools button,body.internal-refined .toolbar button,body.internal-refined .quick-button { min-height:44px; }
}
@media screen and (max-width:767px) {
  body.internal-refined #mainContent>.page-head { align-items:stretch; gap:14px; margin-bottom:20px; padding-bottom:8px; }
  body.internal-refined :is(#mainContent,dialog) :is(input,select,textarea) { font-size:16px; }
  body.internal-refined .page-head h1 { font-size:24px; }
  body.internal-refined .metric { min-height:116px; padding:16px; }
  body.internal-refined .panel-head { padding:16px; flex-wrap:wrap; gap:12px; }
  body.internal-refined .toolbar,body.internal-refined .smart-work-toolbar { flex-wrap:wrap; padding:14px; }
  body.internal-refined .toolbar>*,body.internal-refined .smart-work-toolbar>* { min-width:0; max-width:100%; }
  body.internal-refined .smart-work-item:not(.crm-card) { grid-template-columns:32px minmax(0,1fr); padding:16px; gap:12px; }
  body.internal-refined .smart-work-item:not(.crm-card) .smart-work-side { grid-column:2; justify-items:start; width:100%; }
  body.internal-refined .smart-work-item:not(.crm-card) .smart-work-side>div { flex-wrap:wrap; }
  body.internal-refined .smart-work-hero { flex-wrap:wrap; gap:16px; padding:18px; }
  body.internal-refined .smart-work-hero h2 { font-size:18px; }
  body.internal-refined .smart-work-hero .head-tools { width:100%; }
  body.internal-refined .smart-work-hero .head-tools button { flex:1 1 130px; }
  body.internal-refined .business-detail strong { font-size:14px; }
}
