/* SAWMBooks v0.3.13 layout review r2. Visual structure only; no money or permissions logic. */
:root { --ink:#192e3a; --muted:#65747d; --workspace-text:#192e3a; --workspace-bg:#fff; --brand-orange:#ee651e; --brand-navy:#15354a; }
html,body,.app-layout,.app-main,.main-content { background:#fff; }
.app-layout { align-items:stretch; }
.global-rail {
  width:76px; flex:0 0 76px; position:sticky; top:0; align-self:flex-start;
  height:100vh; min-height:100vh; z-index:32; background:#f5f7f7;
  border-right:1px solid #e2e6e6; display:flex; align-items:center; flex-direction:column;
  padding:16px 6px 13px;
}
.rail-brand { display:flex;align-items:center;justify-content:center;width:38px;height:38px;flex-shrink:0;
  border-radius:11px;color:#fff;background:#183b50;font-size:24px;letter-spacing:-.11em;
  font-weight:800;padding-right:4px;margin:0 0 26px; }
.rail-brand span { color:#ff873d; }
.rail-links { display:flex; align-items:stretch;flex-direction:column;gap:12px;width:100%; }
.rail-link,.rail-settings { width:100%; border:0; border-radius:9px; background:transparent;min-height:61px;
  color:#4b5960; display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;
  font-size:10px;font-weight:550;line-height:1.2;text-align:center;padding:5px 2px; }
.rail-link svg,.rail-settings svg { fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;width:23px;height:23px; }
.rail-link:hover:not(:disabled),.rail-settings:hover { background:#e9edec; color:#193c4b; }
.rail-link-current,.rail-link-current:hover { background:#183f37 !important;color:#fff !important; }
.rail-divider { border-top:1px solid #dce1e0;margin:8px 10px 3px; }
.rail-settings { margin-top:auto; }
.app-sidebar { width:221px;flex:0 0 221px;background:#fff;border-right:1px solid #e4e7e7;
  padding:17px 9px 12px;box-shadow:none;overflow-y:auto;scrollbar-width:thin; }
.context-header { padding:9px 12px 18px;border-bottom:1px solid #edf0f0;margin:0 2px 12px; }
.context-wordmark {font-weight:770;color:#1d3442;font-size:16px;letter-spacing:-.45px; }
.context-header p {font-size:11px;color:#7d868c;margin:3px 0 0;}
.app-sidebar .brand {display:none;}
.sidebar-collapse { height:34px; min-height:34px;padding:7px 9px;margin:0 8px 16px;width:calc(100% - 16px);
  justify-content:center;border:1px solid #eceeed;background:#fafafa;font-size:11px;}
.app-nav { gap:0; }
.nav-overline { padding:5px 12px 8px;font-size:10px;letter-spacing:.06em;color:#6e7b80;font-weight:770; }
.nav-overline.inner { padding-top:19px;padding-bottom:8px; }
.app-nav .nav-item { font-size:12.5px;min-height:37px;padding:8px 11px;border-radius:7px;gap:10px;
  line-height:1.3;color:#3e5059; }
.app-nav .nav-item svg {height:17px;width:17px;}
.app-nav .nav-item .nav-icon {width:17px;height:17px;flex-basis:17px;color:#667781; }
.app-nav .nav-item:hover:not(:disabled) {background:#f4f5f3;color:#1d3648;}
.app-nav .nav-item.is-active {background:#e9ebea;color:#21343f;font-weight:735;}
.app-nav .nav-item.is-active::before {display:none;}
.app-nav .nav-item.is-active .nav-icon {color:#e96620;}
.app-sidebar .future-label { font-size:9px;margin-left:auto;white-space:nowrap;color:#7e888a; }
.app-sidebar .nav-count { margin-left:auto; }
.sidebar-bottom {border-top:1px solid #edf0ef;padding:12px 7px 3px;gap:7px;}
.sidebar-bottom strong {font-size:11px;}.sidebar-bottom small{font-size:9.5px;}
.sidebar-avatar {width:29px;height:29px;flex-basis:29px;}
/* Existing collapse button now hides contextual navigation; primary icon rail remains. */
@media(min-width:741px) {
  .app-layout.is-compact .app-sidebar {width:0 !important;flex-basis:0 !important;padding:0 !important;border:0 !important;overflow:hidden !important;}
  .app-layout.is-compact .app-main {min-width:0;}
}
.app-main {min-width:0;flex:1;background:#fff;}
.topbar {height:68px;padding:0 clamp(17px,2vw,32px);gap:20px;min-width:0;background:#fff;box-shadow:none;}
.topbar-left { min-width:0; }
.breadcrumb-current,.breadcrumb {font-size:12px;}
.workspace-search {max-width:660px;min-width:150px; height:38px;border:0;background:#f2f4f4;border-radius:6px;}
.workspace-search:hover { background:#eaeff0;border-color:transparent; }
.workspace-search .search-placeholder {font-size:12px;color:#69777d;}
.topbar-right {gap:10px;}
.topbar select {font-size:12px;min-width:130px;}
.environment {display:none !important;}
.main-content {max-width:none;padding:27px clamp(19px,2.3vw,38px) 50px;}
.page-heading {align-items:flex-end;gap:12px;margin-bottom:17px;}
#view-dashboard .page-heading h1 {font-size:clamp(26px,2.7vw,35px);font-weight:730;letter-spacing:-.04em;}
.dashboard-welcome {color:#364854;font-size:13px;margin:0 0 5px;}
#view-dashboard .subheading {margin:6px 0 0;color:#6c797d;font-size:12.5px;}
#view-dashboard .heading-actions {align-self:center;}
#view-dashboard .heading-actions button {padding:9px 15px;font-size:12px;min-height:37px;}
/* Top quick-actions live where QuickBooks puts them, rather than an oversized promo banner. */
.home-create-actions {display:flex;align-items:center;flex-wrap:wrap;column-gap:9px;row-gap:8px;
  padding:14px 0 20px;border-bottom:1px solid #eff1ef;margin:0 0 20px;}
.home-create-actions strong {font-size:12.5px;color:#2a3c47;margin-right:5px;}
.home-action {display:inline-flex;align-items:center;justify-content:center;border:1px solid #d1d9d9;
  border-radius:999px;background:white;color:#274653;padding:7px 13px;min-height:34px;
  font-size:12px;font-weight:645;white-space:nowrap;box-shadow:none;}
.home-action:hover {border-color:#f0a16c;background:#fff9f4;color:#a54711;}
/* Compact Advisor quick link integrated into section heading, not a full-screen marketing card. */
.dashboard-section-heading { display:flex;align-items:center;justify-content:space-between;gap:15px;
  margin:0 0 12px; }
.dashboard-section-heading > div:first-child h2 {font-size:17px;letter-spacing:-.025em;color:#22323d;}
.dashboard-section-heading > div:first-child span {display:block;margin-top:3px;font-size:11px;color:#758086;}
.advisor-inline {display:flex;align-items:center;gap:8px;border:1px solid #f2ddd0;
  background:#fffaf7;padding:6px 7px;border-radius:9px;max-width:315px;min-width:0;}
.advisor-inline img {height:34px;width:34px;object-fit:cover;border-radius:50%;flex-shrink:0;}
.advisor-inline > div {display:flex;flex-direction:column;gap:2px;min-width:0;}
.advisor-inline strong {font-size:11.5px;color:#243c47;white-space:nowrap;}
.advisor-inline small {color:#7d7772;font-size:10px;line-height:1.2;white-space:nowrap;}
.advisor-inline-action {border:1px solid #e99e73;background:#fff;color:#9d4515;border-radius:6px;min-height:28px;
  font-size:11px;font-weight:720;padding:5px 10px;margin-left:4px;white-space:nowrap; }
.advisor-inline-action:hover {background:#ef681e;color:#fff;border-color:#ef681e;}
/* Financial numbers get priority: less boxed-in, more generous width and stronger dividers. */
#view-dashboard .workspace-explain {margin:0 0 11px;background:transparent;border:0;padding:0;color:#758187;font-size:11px;}
#view-dashboard .explain-icon {margin-right:4px;}
#view-dashboard .metrics {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:25px;}
#view-dashboard .metric {border:1px solid #dfe5e4;min-height:132px;padding:16px 17px;
  border-radius:10px;box-shadow:0 1px 3px rgba(14,32,40,.03);}
#view-dashboard .metric p {font-size:11.5px;font-weight:700;color:#4c5d64;margin:0 0 18px;}
#view-dashboard .metric strong {font-size:clamp(23px,2vw,30px);font-weight:745;color:#192f40;}
#view-dashboard .metric small {color:#7b888e;font-size:10.5px;margin-top:8px;}
#view-dashboard .metric-icon {top:13px;right:14px;}
.home-subsection-heading {display:flex;align-items:baseline;justify-content:space-between;gap:14px;
  margin:2px 0 12px;}
.home-subsection-heading h2 {font-size:17px;color:#263943;}
.home-subsection-heading span {font-size:11px;color:#7b878d;}
#view-dashboard .surface {border:1px solid #e1e7e5;border-radius:10px;box-shadow:none;}
#view-dashboard .panel-head {padding:17px 19px 10px;}
#view-dashboard .panel-head h2 {font-size:15px;}
#view-dashboard .panel-head p {font-size:11px;}
#view-dashboard .dashboard-intelligence {grid-template-columns:minmax(0,1.23fr) minmax(0,.92fr);gap:15px;margin-bottom:25px;}
#view-dashboard .dashboard-split {grid-template-columns:minmax(0,1.14fr) minmax(0,.85fr);gap:15px;margin-bottom:21px;}
#view-dashboard .analysis-empty {text-align:left;padding:15px 19px 20px;color:#7c898c;}
#view-dashboard .analysis-track {background:#f0f1ef;}
#view-dashboard .data-table th {background:#f7f8f7;color:#556368;}
#view-dashboard .data-table td {font-size:12px;}
#view-dashboard .dashboard-steps .quick-action {padding:9px 14px;}
#view-dashboard .dashboard-steps .action-symbol {height:31px;width:31px;flex-basis:31px;}
#view-dashboard .dashboard-steps .action-symbol svg {width:16px;height:16px;}
#view-dashboard .dashboard-steps .quick-action strong {font-size:11.5px;}
#view-dashboard .dashboard-steps .quick-action small {font-size:10.5px;}
/* White records pages and high-contrast tabular layouts. */
#view-expenses .surface,#view-banking .surface,#view-inbox .surface,#view-advisor .surface,
#view-emailbills .surface,#view-review .surface {border-radius:9px;box-shadow:none;}
.data-table th {background:#f5f7f7;font-size:10.5px;}
.data-table td {font-size:12px;}
#view-advisor .advisor-suggestions {gap:7px;}
#view-advisor .advisor-suggestions button {border-radius:8px;}
/* Maintain mobile drawer and hide primary rail at phone widths. */
@media(max-width:1230px){
  .app-sidebar {width:201px;flex-basis:201px;}
  .global-rail {width:69px;flex-basis:69px;}
  .topbar {gap:10px;}
  #view-dashboard .metrics {grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:1000px){
  #view-dashboard .dashboard-intelligence,#view-dashboard .dashboard-split {grid-template-columns:1fr;}
  .advisor-inline {max-width:260px;}
  .advisor-inline small {display:none;}
}
@media(max-width:740px){
  .global-rail {display:none;}
  .app-sidebar {width:min(300px,87vw);flex-basis:auto;position:fixed;top:0;bottom:0;left:0;}
  .topbar {height:auto; min-height:58px;padding:8px 13px;}
  .main-content {padding:20px 15px 40px;}
  #view-dashboard .dashboard-section-heading {align-items:flex-start;}
  #view-dashboard .advisor-inline {padding:5px;}
  #view-dashboard .dashboard-section-heading > div:first-child span {display:none;}
  .context-header {padding-top:12px;}
  .home-create-actions {margin-bottom:18px;}
}
@media(max-width:520px){
  .dashboard-section-heading {flex-wrap:wrap;}
  .advisor-inline {margin-left:auto;max-width:100%;}
  #view-dashboard .metrics {grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;}
  #view-dashboard .metric {padding:13px 12px;min-height:124px;}
  #view-dashboard .metric p {margin-bottom:12px;padding-right:17px;}
  #view-dashboard .metric strong {font-size:22px;}
  .home-create-actions strong {width:100%;}
  .home-action {font-size:11px;padding:6px 10px;}
}
@media(max-width:360px){
  #view-dashboard .metrics {grid-template-columns:1fr 1fr;}
  #view-dashboard .metric strong {font-size:20px;}
  .advisor-inline {max-width:100%;}
}
