/* Shared fluid desktop frame; keep dialogs and form reading widths independent. */
:root { --ow-page-width:1920px; --ow-page-gap:18px; --ow-page-radius:12px; }
@media screen { .main { padding-inline:clamp(24px,2vw,40px); } }
@media screen and (max-width:760px) { .main { padding-inline:16px; } }
.main>.section { width:100%; max-width:var(--ow-page-width); min-width:0; margin-left:auto; margin-right:auto; }
.main>.ow-workspace-bar { width:100%; max-width:var(--ow-page-width); margin-left:auto; margin-right:auto; }
.main>.section>.topbar { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:16px; margin:0 0 23px; }
.main>.section>.topbar>.ow-page-title { flex:1 1 280px; min-width:0; }
.main>.section>.topbar h2 { margin:0 0 7px; color:#243b50; font-size:26px; line-height:1.5; font-weight:700; letter-spacing:-.035em; overflow-wrap:anywhere; }
.main>.section>.topbar p { margin:0; color:#788b99; font-size:12px; line-height:1.5; }
.ow-page-actions { display:flex; flex:0 1 auto; flex-wrap:wrap; justify-content:flex-end; align-items:center; gap:8px; min-width:0; max-width:65%; }
.ow-page-actions>div { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:8px; min-width:0; max-width:100%; }
.ow-page-actions>:is(button,select,input),.ow-page-actions>div>:is(button,select,input) { max-width:100%; }
.ow-page-actions .field { min-width:0; min-height:38px; font-size:12px; }
.ow-page-actions .btn { white-space:normal; }
.main>.section>.panel,.main>.section>.cards>.card,.main>.section .health-card { border-radius:var(--ow-page-radius); }
.main>.section>.cards { gap:13px; margin-bottom:var(--ow-page-gap); }
.main>.section>.cards>.card { padding:18px; box-shadow:0 2px 6px #17304704; }
.main>.section>.cards>.card>small,.main>.section .health-card>small { font-size:11px; line-height:1.5; font-weight:400; letter-spacing:0; text-transform:none; color:#748895; }
.main>.section>.cards>.card>strong { margin-top:9px; color:#243b50; font-size:29px; line-height:1.3; letter-spacing:-.035em; font-weight:650; }
.main>.section>.cards>.card>.sub { margin-top:6px; font-size:10px; line-height:1.5; color:#80929d; }
.main>.section .health-card { padding:18px; }
.main>.section .health-card>strong { margin-top:9px; color:#243b50; font-weight:650; }
.main>.section>.panel+.panel { margin-top:var(--ow-page-gap); }
.main>.section>.panel>.panel-head { padding:15px 18px; }
.main>.section>.panel>.panel-head:has(.filters) { flex-wrap:wrap; gap:12px; }
.main>.section .table-wrap { width:100%; min-width:0; max-width:100%; overflow-x:auto; }
.main>.section .table { border-collapse:collapse; }
.main>.section .table th { padding:12px 15px; font-weight:650; }
.main>.section .table td { padding:14px 15px; }
#customers .table td:nth-child(4) { min-width:145px; }
#customers .table td:nth-child(8),#maintenance .table td:nth-child(6),#maintenance .table td:nth-child(9) { white-space:nowrap; }
.main>.section .table-wrap>.calendar-grid { width:100%; }
/* One set of corners and surface treatments; calendar views keep their own grid. */
#calendar .ow-cal-controls,#calendar .ow-cal-surface { border-radius:var(--ow-page-radius); box-shadow:0 2px 6px #17304704; }
#calendar .ow-cal-controls { margin-bottom:var(--ow-page-gap); }
#calendar .ow-cal-totals { color:var(--m); }
#calendar .ow-cal-totals strong { color:var(--t); }
#documentsForms .ow-form-library { padding:18px; }
#settings .settings-grid { gap:var(--ow-page-gap); }
#settings .settings-box { border-radius:var(--ow-page-radius); }
#customerProfile>.back-link { margin-bottom:18px; }
.main>.section .split,.main>.section .profile-grid { gap:var(--ow-page-gap); }
.main>.section :is(.split,.profile-grid,.detail-grid)>* { min-width:0; }
.main>.section .detail { overflow-wrap:anywhere; }
@media screen {
  html[data-ow-theme="dark"] .main>.section>.topbar h2,
  html[data-ow-theme="dark"] .main>.section>.cards>.card>strong,
  html[data-ow-theme="dark"] .main>.section .health-card>strong { color:var(--t); }
  html[data-ow-theme="dark"] .main>.section>.topbar p,
  html[data-ow-theme="dark"] .main>.section>.cards>.card>small,
  html[data-ow-theme="dark"] .main>.section>.cards>.card>.sub,
  html[data-ow-theme="dark"] .main>.section .health-card>small { color:var(--m); }
}
@media(max-width:1180px) { .ow-page-actions { max-width:100%; } }
@media(max-width:760px) {
  .main>.section>.topbar { align-items:flex-start; gap:14px; margin-bottom:20px; }
  .main>.section>.topbar>.ow-page-title { flex-basis:100%; }
  .main>.section>.topbar h2 { font-size:24px; }
  .ow-page-actions { flex-basis:100%; width:100%; justify-content:flex-start; }
  .ow-page-actions>div { justify-content:flex-start; }
  .ow-page-actions .field { font-size:16px; }
  .main>.section>.cards { gap:10px; }
  .main>.section>.cards>.card,.main>.section .health-card { padding:15px; }
  .main>.section>.cards>.card>strong { font-size:25px; }
  #documentsForms .ow-form-library { padding:16px; }
  /* Preserve the existing stacked mobile table presentation. */
  .main>.section .table.v13-card-table td { padding:8px 2px; }
}
