/* Customer profile presentation; original records, handlers and report generators remain. */
#customerProfile { --pr-bg:#fff; --pr-soft:#f6f8fa; --pr-line:#dce5eb; --pr-text:#243b50; --pr-muted:#748596; --pr-green:#478b3c; --pr-tint:#edf5e9; }
#customerProfile [hidden] { display:none !important; }
#customerProfile>.back-link { margin-bottom:16px; }
#customerProfile>.back-link .btn { border:0; background:transparent; padding:4px 0; color:var(--pr-muted); font-size:11px; box-shadow:none; }
#customerProfile>.topbar { gap:20px; }
#customerProfile>.topbar>.ow-page-actions { max-width:none; }
#customerProfile .ow-p-header-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
#customerProfile #profileCards { grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px; margin-bottom:22px; }
#customerProfile #profileCards>.card { padding:17px 18px; min-width:0; box-shadow:none; }
#customerProfile #profileCards>.card strong { display:block; font-size:25px; line-height:1.3; margin-top:10px; overflow-wrap:anywhere; }
#customerProfile #profileCards>.card small { font-size:11px; text-transform:none; letter-spacing:0; color:var(--pr-muted); }
#customerProfile #profileCards .badge { vertical-align:middle; font-size:12px; padding:6px 10px; letter-spacing:0; font-weight:600; }
#customerProfile .ow-p-nav { display:flex; flex-wrap:wrap; gap:5px; padding:0 0 14px; border-bottom:1px solid var(--pr-line); margin-bottom:22px; }
#customerProfile .ow-p-nav button { display:flex; align-items:center; gap:9px; padding:10px 14px; min-height:42px; border:1px solid transparent; border-radius:8px; background:transparent; color:var(--pr-muted); font:500 12px/20px Inter,sans-serif; cursor:pointer; }
#customerProfile .ow-p-nav button[aria-selected="true"] { color:var(--pr-green); background:var(--pr-tint); border-color:color-mix(in srgb,var(--pr-green) 22%,transparent); }
#customerProfile .ow-p-nav button small { display:inline-flex; align-items:center; justify-content:center; min-width:20px; height:20px; padding:0 5px; border-radius:5px; font-size:10px; background:color-mix(in srgb,var(--pr-muted) 10%,transparent); color:inherit; }
#customerProfile .ow-p-pane { min-width:0; }
#customerProfile .ow-p-pane>.panel,#customerProfile .ow-p-pane>.profile-grid,#customerProfile .ow-p-pane>details { margin-bottom:18px !important; }
#customerProfile .ow-p-pane>.panel:last-child,#customerProfile .ow-p-pane>details:last-child { margin-bottom:0 !important; }
#customerProfile .panel { min-width:0; border:1px solid var(--pr-line); border-radius:12px; background:var(--pr-bg); box-shadow:0 2px 6px #17304704; }
#customerProfile .panel-head { padding:17px 20px; gap:14px; flex-wrap:wrap; border-color:var(--pr-line); }
#customerProfile .panel-head b { font-size:13px; font-weight:600; }
#customerProfile .panel-head .muted { font-size:11px; line-height:1.6; color:var(--pr-muted); }
#customerProfile .panel-head .btn { min-height:36px; font-size:11px; }
#customerProfile .profile-grid { grid-template-columns:1fr 1fr; gap:18px; align-items:start; }
#customerProfile .profile-contact { padding:20px; }
#customerProfile .profile-contact h3 { font-size:14px; font-weight:600; margin:0 0 18px; }
#customerProfile .detail-grid { gap:0 22px; }
#customerProfile .detail { padding:13px 0; border:0; border-bottom:1px solid var(--pr-line); border-radius:0; background:transparent; }
#customerProfile .detail small { color:var(--pr-muted); font-size:11px; text-transform:none; letter-spacing:0; margin-bottom:6px; }
#customerProfile .detail b { font-size:13px; font-weight:500; color:var(--pr-text); overflow-wrap:anywhere; }
#customerProfile .list { padding:0 20px; }
#customerProfile .list-item { gap:16px; padding:15px 0; border-color:var(--pr-line); align-items:center; min-width:0; }
#customerProfile .list-item>div { min-width:0; overflow-wrap:anywhere; }
#customerProfile .list-item:last-child { border-bottom:0; }
#customerProfile .list-item .muted { font-size:11px; line-height:1.7; color:var(--pr-muted); }
#customerProfile .list-item b { font-size:12px; font-weight:600; }
#customerProfile .empty { padding:30px 18px; font-size:12px; line-height:1.7; color:var(--pr-muted); }
#customerProfile .ow-p-section-head { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:18px; }
#customerProfile .ow-p-section-head h3 { margin:0 0 5px; font-size:16px; font-weight:600; }
#customerProfile .ow-p-section-head p { margin:0; font-size:11px; color:var(--pr-muted); }
#customerProfile .ow-p-section-tools { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
#customerProfile .ow-p-search { width:260px; max-width:100%; min-height:40px; padding:9px 12px; border:1px solid var(--pr-line); border-radius:8px; color:var(--pr-text); background:var(--pr-bg); font:12px/20px Inter,sans-serif; outline:0; }
#customerProfile .ow-p-text-button { border:0; padding:8px; background:none; color:var(--pr-muted); cursor:pointer; font:500 11px/20px Inter,sans-serif; }
#customerProfile #profileSites { display:grid; gap:18px; margin-bottom:20px; }
#customerProfile .site-profile { overflow:clip; }
#customerProfile .site-profile-head { display:flex; align-items:center; justify-content:space-between; gap:18px; margin:0; padding:18px 20px; border:0; background:var(--pr-bg); }
#customerProfile .ow-p-site-toggle { display:flex; align-items:center; gap:13px; flex:1; min-width:0; padding:0; border:0; background:transparent; font:inherit; text-align:left; cursor:pointer; color:var(--pr-text); }
#customerProfile .ow-p-site-icon { display:grid; place-items:center; width:36px; height:36px; border:1px solid var(--pr-line); border-radius:9px; background:var(--pr-soft); flex-shrink:0; }
#customerProfile .ow-p-site-icon svg { width:19px; height:19px; color:var(--pr-muted); }
#customerProfile .ow-p-site-copy { min-width:0; }
#customerProfile .ow-p-site-copy b { display:block; font-size:14px; font-weight:600; overflow-wrap:anywhere; }
#customerProfile .ow-p-site-copy .profile-stat { margin-top:5px; color:var(--pr-muted); font-size:11px; line-height:1.6; }
#customerProfile .ow-p-site-toggle>svg { width:16px; height:16px; margin-left:auto; color:var(--pr-muted); flex-shrink:0; }
#customerProfile .ow-p-site-toggle[aria-expanded="true"]>svg { transform:rotate(180deg); }
#customerProfile .ow-p-site-tools { display:flex; align-items:center; gap:10px; flex-shrink:0; }
#customerProfile .ow-p-system-count { border:1px solid var(--pr-line); border-radius:6px; padding:5px 8px; color:var(--pr-muted); font-size:10px; white-space:nowrap; }
#customerProfile .ow-p-site-body { border-top:1px solid var(--pr-line); }
#customerProfile .ow-p-site-body>.table-wrap { overflow-x:auto; }
#customerProfile .ow-p-systems { table-layout:fixed; min-width:850px; width:100%; }
#customerProfile .ow-p-systems th { background:var(--pr-soft); text-transform:none; font-size:10px; letter-spacing:0; color:var(--pr-muted); font-weight:500; padding:12px 18px; }
#customerProfile .ow-p-systems td { padding:17px 18px; vertical-align:top; font-size:12px; border-color:var(--pr-line); overflow-wrap:anywhere; }
#customerProfile .ow-p-systems .muted { color:var(--pr-muted); font-size:10px; line-height:1.7; margin-top:4px; }
#customerProfile .ow-p-systems tr:last-child td { border-bottom:0; }
#customerProfile .ow-p-systems th:nth-child(1) { width:19%; }
#customerProfile .ow-p-systems th:nth-child(2) { width:9%; }
#customerProfile .ow-p-systems th:nth-child(3) { width:24%; }
#customerProfile .ow-p-systems th:nth-child(4) { width:13%; }
#customerProfile .ow-p-systems th:nth-child(5) { width:22%; }
#customerProfile .ow-p-systems th:nth-child(6) { width:13%; }
#customerProfile .ow-p-system-name { border:0; background:transparent; padding:0; color:var(--pr-text); text-align:left; font:600 12px/1.6 Inter,sans-serif; cursor:pointer; }
#customerProfile .ow-p-system-name:hover { color:var(--pr-green); text-decoration:underline; text-underline-offset:3px; }
#customerProfile .ow-p-row-actions { display:flex; align-items:center; flex-wrap:wrap; gap:6px; }
#customerProfile .ow-p-row-actions .btn { min-height:34px; padding:7px 10px; border-radius:7px; font-size:10px; }
#customerProfile .ow-p-more { display:inline-flex; align-items:center; justify-content:center; min-width:32px; height:34px; min-height:34px; padding:4px 8px; border:1px solid var(--pr-line); border-radius:7px; background:var(--pr-bg); color:var(--pr-muted); cursor:pointer; font:500 12px/20px Inter,sans-serif; }
#customerProfile .ow-p-more svg { width:16px; height:16px; }
.ow-profile-menu { position:fixed; inset:auto; margin:0; padding:6px; width:210px; max-width:calc(100vw - 24px); max-height:calc(100dvh - 24px); overflow:auto; border:1px solid #dce5eb; border-radius:10px; background:#fff; color:#243b50; box-shadow:0 12px 38px #10233b26; font:12px/1.5 Inter,sans-serif; }
.ow-profile-menu:popover-open { display:grid; gap:3px; }
.ow-profile-menu>.btn { display:block; width:100%; min-height:38px; margin:0; padding:9px 11px; text-align:left; border:0; border-radius:6px; background:transparent; color:inherit; font:inherit; box-shadow:none; }
.ow-profile-menu>.btn:hover { background:#f0f5ed; }
.ow-profile-menu>.btn.danger { color:#bb4557; border-top:1px solid #dce5eb; margin-top:4px; padding-top:12px; border-radius:0 0 6px 6px; }
#customerProfile .ow-p-disclosure { border:1px solid var(--pr-line); background:var(--pr-bg); border-radius:12px; overflow:clip; }
#customerProfile .ow-p-disclosure>summary { display:flex; gap:12px; align-items:center; padding:17px 20px; list-style:none; cursor:pointer; color:var(--pr-text); font-size:12px; font-weight:600; }
#customerProfile .ow-p-disclosure>summary::-webkit-details-marker { display:none; }
#customerProfile .ow-p-disclosure>summary::after { content:'+'; margin-left:auto; color:var(--pr-muted); font-size:18px; font-weight:400; }
#customerProfile .ow-p-disclosure[open]>summary::after { content:'−'; }
#customerProfile .ow-p-disclosure>.panel { margin:0 !important; border:0; border-top:1px solid var(--pr-line); border-radius:0; box-shadow:none; }
#customerProfile .ow-p-disclosure .panel-head { padding-block:12px; }
#customerProfile .ow-p-disclosure .panel-head b { font-size:12px; color:var(--pr-muted); }
#customerProfile #v141CustomerFile>.filters { display:flex; flex-wrap:wrap; gap:10px; padding:18px 20px; margin:0 !important; border-bottom:1px solid var(--pr-line); }
#customerProfile #v141CustomerFile>.filters>.ow-select-trigger { flex:0 1 220px; width:220px; }
#customerProfile #v141FileSearch { flex:1 1 260px; min-width:0; height:40px; margin:0; padding:9px 12px; border:1px solid var(--pr-line); border-radius:8px; background:var(--pr-bg); color:var(--pr-text); font-size:12px; }
#customerProfile .ow-select-trigger { display:flex; align-items:center; justify-content:space-between; gap:12px; max-width:100%; min-height:40px; padding:9px 12px; border:1px solid var(--pr-line); border-radius:8px; background:var(--pr-bg); color:var(--pr-text); text-align:left; cursor:pointer; font:12px/20px Inter,sans-serif; }
#customerProfile .ow-select-trigger>svg { color:var(--pr-muted); }
#customerProfile #v141FileSummary { display:flex; flex-wrap:wrap; align-items:center; gap:8px 22px; padding:14px 20px; margin:0; border-bottom:1px solid var(--pr-line); background:var(--pr-soft); }
#customerProfile #v141FileSummary>.card { display:flex; align-items:baseline; gap:8px; padding:0; margin:0; border:0; border-radius:0; background:transparent; box-shadow:none; }
#customerProfile #v141FileSummary small { color:var(--pr-muted); font-size:11px; text-transform:none; letter-spacing:0; }
#customerProfile #v141FileSummary strong { color:var(--pr-text); font-size:14px; font-weight:600; }
#customerProfile .ow-p-file-row { gap:14px; }
#customerProfile .ow-p-file-icon { display:grid; place-items:center; width:36px; height:40px; flex-shrink:0; border:1px solid var(--pr-line); border-radius:8px; background:var(--pr-soft); color:var(--pr-muted); }
#customerProfile .ow-p-file-icon svg { width:18px; height:18px; }
#customerProfile .ow-p-file-copy { flex:1; min-width:0; }
#customerProfile .ow-p-file-name.btn { padding:0; border:0; background:transparent; color:var(--pr-text); text-align:left; white-space:normal; line-height:1.7; font-size:12px; font-weight:600; box-shadow:none; border-radius:0; }
#customerProfile .ow-p-file-name:hover { color:var(--pr-green); text-decoration:underline; text-underline-offset:3px; }
#customerProfile .ow-p-file-kind { flex-shrink:0; padding:4px 7px; font-size:9px; border:1px solid var(--pr-line); border-radius:5px; color:var(--pr-muted); }
#customerProfile .v100-timeline { padding:0 20px; }
#customerProfile .v100-time { padding:15px 0; gap:12px; border-color:var(--pr-line); font-size:12px; line-height:1.7; }
#customerProfile .v100-time b { font-weight:600; }
#customerProfile .v100-time .muted { font-size:10px; margin-left:7px; }
#customerProfile .v100-dot { width:7px; height:7px; margin-top:7px; }
#customerProfile .table th,#customerProfile .table td { border-color:var(--pr-line); }
#customerProfile .profile-notes { font-size:12px; line-height:1.8; }
#customerProfile :is(button,input,summary):focus-visible { outline:2px solid var(--pr-green); outline-offset:3px; }
@media screen {
  html[data-ow-theme="dark"] #customerProfile { --pr-bg:#192431; --pr-soft:#131e2a; --pr-line:#35475a; --pr-text:#e5ecf4; --pr-muted:#a5b4c5; --pr-green:#a5d496; --pr-tint:#2c4034; }
  html[data-ow-theme="dark"] .ow-profile-menu { background:#192431; color:#e5ecf4; border-color:#43556a; box-shadow:0 15px 45px #0006; }
  html[data-ow-theme="dark"] .ow-profile-menu>.btn:hover { background:#2c4034; }
  html[data-ow-theme="dark"] .ow-profile-menu>.btn.danger { color:#f3a4af; border-color:#35475a; }
}
@media(max-width:1180px) { #customerProfile .profile-grid { grid-template-columns:minmax(0,1fr); } }
@media(max-width:760px) {
  #customerProfile #profileCards { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  #customerProfile #profileCards>.card { padding:14px; }
  #customerProfile #profileCards>.card strong { font-size:23px; }
  #customerProfile .ow-p-nav { gap:5px; }
  #customerProfile .ow-p-nav button { flex:1 1 45%; justify-content:center; padding:9px 6px; font-size:11px; }
  #customerProfile .panel-head,#customerProfile .profile-contact { padding:16px; }
  #customerProfile .detail-grid { gap:0 14px; }
  #customerProfile .list { padding-inline:16px; }
  #customerProfile .ow-p-section-tools { width:100%; }
  #customerProfile .ow-p-search { width:100%; font-size:16px; }
  #customerProfile .site-profile-head { padding:15px 14px; gap:10px; flex-wrap:wrap; }
  #customerProfile .ow-p-site-icon { display:none; }
  #customerProfile .ow-p-site-toggle { flex-basis:100%; }
  #customerProfile .ow-p-site-tools { margin-left:auto; }
  #customerProfile .ow-p-systems,#customerProfile .ow-p-systems.v13-card-table { display:block; table-layout:auto; width:100%; min-width:0; }
  #customerProfile .ow-p-systems thead { display:none; }
  #customerProfile .ow-p-systems tbody { display:grid; gap:0; }
  #customerProfile .ow-p-systems tr { display:block; padding:12px 14px; margin:0; border:0; border-bottom:1px solid var(--pr-line); border-radius:0; background:var(--pr-bg); }
  #customerProfile .ow-p-systems td,#customerProfile .ow-p-systems.v13-card-table td { display:grid; grid-template-columns:90px minmax(0,1fr); width:100%; gap:10px; padding:9px 0 !important; border:0 !important; text-align:left !important; }
  #customerProfile .ow-p-systems td::before { content:attr(data-v13-label); color:var(--pr-muted); font-size:10px; text-transform:none; font-weight:400; letter-spacing:0; }
  #customerProfile .ow-p-systems td:first-child { display:block; }
  #customerProfile .ow-p-systems td:first-child::before { display:none; }
  #customerProfile .ow-p-systems td[colspan] { display:block; }
  #customerProfile .ow-p-systems td[colspan]::before { display:none; }
  #customerProfile .ow-p-systems .badge { justify-self:start; }
  #customerProfile #v141CustomerFile>.filters { padding:16px; }
  #customerProfile #v141CustomerFile>.filters>.ow-select-trigger { flex:1 1 100%; width:100%; font-size:16px; }
  #customerProfile #v141FileSearch { flex-basis:100%; width:100%; font-size:16px; }
  #customerProfile #v141FileSummary { padding:13px 16px; gap:8px 16px; }
  #customerProfile .ow-p-file-icon { display:none; }
  #customerProfile .ow-p-file-kind { align-self:flex-start; margin-top:5px; }
  #customerProfile .ow-p-disclosure>summary { padding:16px; }
  #customerProfile .ow-p-disclosure .table-wrap { max-width:100%; }
  #customerProfile .v100-time .muted { display:block; margin-left:0; }
}
