/* Clinical Focus — desktop workspace, 2026-10-30.
 * Presentation-only: never alter the clinical, billing, stock or cashier engines.
 * Swift Desk mobile and all print templates retain their own layout.
 */
@media screen and (min-width:851px) {
  :root {
    --ink:#253b46;
    --muted:#657a84;
    --teal:#176e84;
    --teal-dark:#135c72;
    --bg:#f3f6f8;
    --paper:#fff;
    --stroke:#e0e8ed;
    --shadow:0 4px 18px rgba(26,53,66,.035);
    --warn:#fff7e8;
  }
  html{font-size:15px}
  body{font-size:14px;line-height:1.55}
  body.cf-authenticated .topbar{
    position:fixed;inset:0 auto 0 0;width:232px;height:100dvh;
    background:#1e3341;border-right:1px solid #35505f;border-bottom:0;
    color:#d0dfe6;z-index:40;box-shadow:3px 0 18px #213b4810;
  }
  body.cf-authenticated .top-inner{
    height:100%;min-height:0;max-width:none;margin:0;
    padding:24px 13px 16px;gap:20px;display:flex;flex-direction:column;align-items:stretch;
  }
  body.cf-authenticated .brand{
    min-width:0;width:100%;padding:2px 6px 17px;gap:11px;
    border-bottom:1px solid #385363;color:#fff;
  }
  body.cf-authenticated .brand-logo{
    flex:0 0 40px;width:40px;height:40px;border-radius:11px;
    background:#2d8698;color:#fff;font-size:23px;
  }
  body.cf-authenticated .brand b{
    display:block;font-size:12px;letter-spacing:.5px;line-height:1.4;
    overflow-wrap:anywhere;
  }
  body.cf-authenticated .brand small{
    font-size:10px;letter-spacing:0;color:#a5bfc9;line-height:1.5;margin-top:2px;
  }
  body.cf-authenticated #main-navigation{
    display:flex;flex:1;min-height:0;width:100%;overflow-y:auto;overflow-x:hidden;
    flex-direction:column;flex-wrap:nowrap;align-items:stretch;gap:3px;
    scrollbar-width:thin;scrollbar-color:#4e6878 transparent;
  }
  body.cf-authenticated #main-navigation .cf-nav-label{
    padding:12px 11px 6px;color:#9bb2c0;font-size:10px;
    font-weight:750;letter-spacing:1.35px;text-transform:uppercase;
  }
  body.cf-authenticated #main-navigation a{
    width:100%;display:flex;align-items:center;gap:11px;
    min-height:43px;border-radius:9px;padding:10px 12px;
    color:#cfdee5;font-size:13px;font-weight:600;line-height:1.3;white-space:normal;
  }
  body.cf-authenticated #main-navigation a::before{
    content:"·";font-size:20px;font-weight:400;width:19px;line-height:1;
    text-align:center;flex:0 0 19px;color:#a7bfcb;
  }
  body.cf-authenticated #main-navigation .cf-nav-queue::before{content:"◷"}
  body.cf-authenticated #main-navigation .cf-nav-patients::before{content:"♙"}
  body.cf-authenticated #main-navigation .cf-nav-billing::before{content:"▤"}
  body.cf-authenticated #main-navigation .cf-nav-cashier::before{content:"⇄"}
  body.cf-authenticated #main-navigation .cf-nav-stock::before{content:"▦"}
  body.cf-authenticated #main-navigation .cf-nav-phrases::before{content:"✎"}
  body.cf-authenticated #main-navigation .cf-nav-settings::before{content:"⚙"}
  body.cf-authenticated #main-navigation .cf-nav-access::before{content:"◇"}
  body.cf-authenticated #main-navigation .cf-nav-admin::before{content:"⌘"}
  body.cf-authenticated #main-navigation a:hover,
  body.cf-authenticated #main-navigation a:focus-visible{
    color:#fff;background:#294958;text-decoration:none;
  }
  body.cf-authenticated #main-navigation a[aria-current="page"]{
    background:#355565;color:#fff;box-shadow:inset 3px 0 #62b6bf;
    font-weight:750;
  }
  body.cf-authenticated #main-navigation a[aria-current="page"]::before{color:#b4edf0}
  body.cf-authenticated .userbar{
    margin-top:auto;padding:15px 6px 0;border-top:1px solid #395463;
    align-items:flex-start;justify-content:space-between;flex-direction:column;
    gap:8px;white-space:normal;
  }
  body.cf-authenticated .userbar .user-chip{
    display:block;max-width:100%;overflow-wrap:anywhere;
    border-radius:8px;background:#294a59;color:#e0edf1;padding:8px 10px;
  }
  body.cf-authenticated .userbar form{margin:0}
  body.cf-authenticated .userbar .nav-logout{
    border:1px solid #456574;border-radius:9px;min-height:40px;
    padding:8px 12px;color:#d5e3e9;
  }
  body.cf-authenticated .userbar .nav-logout:hover{background:#304e5e}
  body.cf-authenticated .shell{
    margin-left:232px;margin-right:0;max-width:none;
    padding:36px clamp(22px,3.1vw,52px) 90px;
    min-height:calc(100vh - 60px);
  }
  body.cf-authenticated .footer{margin-left:232px}
  .shell>.heading-row{margin-bottom:24px;align-items:flex-start}
  .shell>.heading-row h1{font-size:30px;letter-spacing:-.9px}
  .shell>.heading-row .eyebrow{letter-spacing:1.3px}
  .shell>.heading-row p.muted{max-width:780px;font-size:13px;margin:8px 0 0}
  .heading-actions{gap:9px}
  .btn{min-height:40px;border-radius:9px;font-size:13px;padding:10px 15px;transition:background-color .15s,border-color .15s}
  .btn.tiny{min-height:32px;padding:7px 11px;font-size:11px}
  .btn.secondary{background:#edf6f8;border-color:#d2e5eb;color:#175f76}
  .btn.quiet{background:#fff;border-color:#e0e8ed;color:#506a78}
  .btn:focus-visible,button:focus-visible,a:focus-visible,summary:focus-visible{
    outline:3px solid #76b6cd;outline-offset:2px;
  }
  .panel{border-radius:14px;box-shadow:0 3px 15px #253e4a08}
  .panel.pad{padding:24px}
  .section-header{padding:21px 24px 12px}
  .section-header h2{font-size:17px}
  .stats{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:18px}
  .stat{padding:17px 20px;border-radius:13px}
  .stat strong{font-size:28px;letter-spacing:-.8px}
  .stat span{font-size:12px}
  .stat:nth-child(2){border-left:3px solid #d4a552}
  .stat:nth-child(3){border-left:3px solid #59a487}
  .control,input.control,select.control,textarea.control{
    min-height:44px;border-radius:10px;border-color:#d2e0e6;
    font-size:14px;color:#253b46;
  }
  .control:focus-visible{outline:2px solid #74b1c5;outline-offset:1px}
  .field label{font-size:12px}
  textarea.control{line-height:1.55}
  .table-wrap{border-radius:0 0 13px 13px}
  th{background:#f7fafc;color:#637d8b;font-size:10px;padding:12px 16px}
  td{padding:15px 16px;border-color:#e9eff2}
  tbody tr:hover>td{background:#f8fbfc}
  td.actions{gap:6px}
  table small{max-width:260px}
  details.panel>summary{
    cursor:pointer;list-style:none;padding:1px 0;
    color:#264554;display:flex;align-items:center;gap:8px;
    font-size:14px;
  }
  details.panel>summary::-webkit-details-marker{display:none}
  details.panel>summary::before{
    content:"›";font-size:21px;color:#6d8792;
    width:16px;flex:0 0 16px;line-height:1;
    transition:transform .15s;
  }
  details.panel[open]>summary::before{transform:rotate(90deg)}
  details.panel[open]>summary{margin-bottom:8px}
  /* Clinic operations: the queue is the primary task; calendar and recents follow it. */
  .queue-controls{padding:18px 22px!important;margin-bottom:14px}
  .queue-control-top{margin:0;gap:8px}
  .queue-date-form{gap:10px;margin-top:10px}
  .queue-date-form .field{margin:0;min-width:135px;max-width:180px}
  .queue-date-form .control{min-height:40px}
  .queue-period-nav strong{color:#233e49}
  .swift-queue-list{margin-bottom:20px}
  .swift-queue-list tbody td:nth-child(2){font-weight:650}
  .queue-dashboard-grid{grid-template-columns:minmax(0,1.55fr) minmax(255px,.65fr);gap:18px}
  .queue-calendar .section-header{padding:0 0 16px}
  .queue-calendar .calendar-day{min-height:64px}
  .recent-patients .section-header{padding:0 0 14px}
  .recent-patients .recent-list{max-height:320px}
  /* Patient chart: concise demographics, detailed clinical history alongside. */
  .two-col{grid-template-columns:minmax(290px,.77fr) minmax(0,1.3fr);gap:18px}
  .info-list{grid-template-columns:112px minmax(0,1fr)}
  .credit-profile-notice{border-left:4px solid #d39a40;background:#fffdfa;margin-bottom:16px}
  .credit-profile-notice .heading-row{margin-bottom:8px}
  .credit-profile-notice h2{font-size:17px}
  .credit-profile-notice .credit-mini-list{font-size:12px}
  .patient-bill-mini .patient-bill-scroll{max-height:250px;overflow:auto}
  /* Doctor's workspace: prioritize writing; keep phrases available. */
  .editor-layout{grid-template-columns:minmax(0,1fr) 310px;align-items:start;gap:18px}
  .editor-layout>.column-stack{gap:17px}
  .editor-layout .panel.pad{padding:23px 24px}
  .clinical-visit-head{background:linear-gradient(120deg,#fff,#f6fbfd);border-color:#c9dce6}
  .clinical-patient-name{font-size:22px}
  .clinical-patient-details{gap:8px 22px}
  .clinical-history p{font-size:13px}
  .clinical-history p:first-child{
    padding:7px 11px;border-left:3px solid #dba260;background:#fff8eb;
    border-radius:5px;overflow-wrap:anywhere;
  }
  .clinical-visit-head .clinical-divider{border-top:1px solid #d9e8ec}
  .note-field textarea{min-height:132px;font-size:15px;line-height:1.65}
  .note-field label{font-size:13px;color:#284554}
  .note-field{margin-bottom:18px}
  .plan-fieldset{background:#fbfdfe;border-color:#d8e6ec}
  .phrase-panel{
    position:sticky;top:16px;max-height:calc(100dvh - 32px);
    border-color:#dce7eb;box-shadow:none;
  }
  .phrase-panel-header{background:#fafcfd;border-bottom:1px solid #e7eef1}
  .phrase-panel .phrase-chip{border-color:#dce7eb;background:#fff}
  .phrase-panel .phrase-chip:hover{background:#edf6f9;border-color:#8fb9c8}
  .finalize{border-color:#b8d6df}
  /* POS: search, line items and payable total remain the visual focus. */
  #unified-new-bill{display:flex;flex-direction:column;gap:14px}
  #unified-new-bill>.panel{margin-bottom:0}
  #unified-new-bill #new-bill-autosave-panel{background:#f9fbfc}
  #unified-new-bill #bill-customer-details{background:#fff}
  #unified-new-bill .billing-layout{grid-template-columns:minmax(0,1fr) 325px;gap:18px}
  #unified-new-bill .invoice-summary{position:sticky;top:20px}
  #unified-new-bill .bill-cart-table th{font-size:11px}
  #unified-new-bill .bill-cart-table td{padding-top:13px;padding-bottom:13px}
  #unified-new-bill .bill-create-item-grid{gap:12px}
  /* Cashier and inventory: separate task controls from audit data. */
  #cashier-session-control-v56{border-left:4px solid #3a92a2}
  #cashier-session-control-v56>.cashier-session-buttons-v56{margin-top:16px}
  .cashbook-table-v56 tbody tr:hover>td{filter:brightness(.985)}
  .stock-warning,.callout.warning{color:#80521e}
  .tag.status-waiting{color:#8c5d19}
  .tag.status-in_consultation{color:#2e6198}
}
@media screen and (min-width:851px) and (max-width:1100px){
  body.cf-authenticated .topbar{width:205px}
  body.cf-authenticated .shell,body.cf-authenticated .footer{margin-left:205px}
  body.cf-authenticated .shell{padding:27px 22px 80px}
  .editor-layout{grid-template-columns:minmax(0,1fr) 265px}
  .queue-dashboard-grid{grid-template-columns:minmax(0,1fr) minmax(210px,.7fr)}
  .two-col{grid-template-columns:minmax(235px,.85fr) minmax(0,1.15fr)}
  .stats{gap:8px}
  .stat{padding:14px 12px}
}
@media screen and (max-width:850px){
  .cf-nav-label{display:none!important}
}
@media print{
  body.cf-authenticated .topbar,body.cf-authenticated .footer{display:none!important}
  body.cf-authenticated .shell{margin:0!important;padding:0!important;max-width:none!important}
}
@media(prefers-reduced-motion:reduce){
  .btn,details.panel>summary::before{transition:none!important}
}
