/* V09 desktop shell and Home. Presentation only; the approved phone and tablet
   CSS, DOM, routes, events, data and official vector assets remain unchanged. */
@media (min-width:1025px) {
  body.tricios-erp {
    --tricios-header-height:80px;
    --mr-shell-w:232px;
    --tricios-ui-font:-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
    --tricios-desktop-gap:22px;
    font:400 14px/1.5 var(--tricios-ui-font)!important;
    padding-left:var(--mr-shell-w)!important;
    padding-top:var(--tricios-header-height)!important;
    padding-bottom:0!important;
    min-height:100dvh;
  }
  .tricios-erp :is(h1,h2,h3,h4) {
    font-family:var(--tricios-ui-font)!important;
    font-weight:650!important;
    letter-spacing:-.025em;
  }
  .tricios-erp h1 {font-size:clamp(28px,2.2vw,36px)!important;line-height:1.2!important}
  .tricios-erp h2 {font-size:22px!important;line-height:1.3!important}
  .tricios-erp h3 {font-size:17px!important;line-height:1.4!important}
  .tricios-erp :is(main.wrap,.dashboard,.pipeline-page,.project-page,.doc-main,.tc-wrap,.fin-page,.att-page) {
    width:100%;max-width:1600px!important;min-width:0;
    padding:36px clamp(28px,3vw,52px) 64px!important;
    margin:0 auto!important;
  }
  .tricios-erp :is(.panel-top,.project-top,.doc-top) {padding:18px clamp(28px,3vw,52px)}
  .tricios-erp .tricios-demo-disclaimer {max-width:1600px;margin:0 auto;padding:0 clamp(28px,3vw,52px) 28px;line-height:1.6}

  /* The original five app tabs become a full-size desktop rail. */
  .tricios-erp>.tricios-header {
    display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;
    height:80px;min-height:80px;max-height:80px;
    padding:18px 32px;gap:24px;
    background:var(--tricios-background)!important;
    border-bottom:1px solid var(--tricios-line)!important;
  }
  .tricios-erp .tricios-header-identity {min-width:0;gap:0}
  .tricios-erp>.tricios-header .tricios-brand {width:180px;min-height:44px;padding:0;max-width:100%}
  .tricios-erp>.tricios-header .tricios-brand img {max-height:43px;object-fit:contain}
  .tricios-erp .tricios-header-actions {gap:12px;min-width:0}
  .tricios-erp .tricios-header .tricios-app-header-search {
    width:44px;height:44px;min-height:44px;padding:10px!important;
    background:transparent!important;border:0!important;border-radius:50%!important;
  }
  .tricios-erp .tricios-header .tricios-app-header-search:hover {background:var(--tricios-surface)!important}
  .tricios-erp .tricios-header .tricios-account-link {
    width:44px;height:44px;min-height:44px;padding:10px;
    background:var(--tricios-surface)!important;border:0!important;border-radius:50%;
    color:var(--tricios-ink)!important;
  }
  .tricios-erp .mr-shell {
    top:var(--tricios-header-height)!important;
    width:var(--mr-shell-w)!important;
    padding:28px 16px!important;
    background:var(--tricios-background)!important;
    border-right:1px solid var(--tricios-line)!important;
    scrollbar-width:thin;
  }
  .tricios-erp .mr-mobile-nav {gap:8px!important}
  .tricios-erp .mr-mobile-nav>.mr-shell-link {
    display:flex;flex-direction:row;align-items:center;justify-content:flex-start;
    gap:14px;min-height:52px;padding:14px 16px!important;
    border-radius:16px!important;
    font:500 14px/1.5 var(--tricios-ui-font)!important;
    color:var(--tricios-muted)!important;
  }
  .tricios-erp .mr-mobile-nav>.mr-shell-link.active,
  .tricios-erp .mr-mobile-nav>.mr-shell-link.active:hover {
    background:var(--tricios-app-soft-wine)!important;
    color:var(--tricios-app-wine)!important;
  }
  .tricios-erp .mr-mobile-nav>.mr-shell-link:hover {
    background:var(--tricios-surface)!important;color:var(--tricios-ink)!important;
  }
  html[data-theme="dark"] .tricios-erp .mr-mobile-nav>.mr-shell-link.active,
  html[data-theme="dark"] .tricios-erp .mr-mobile-nav>.mr-shell-link.active:hover {
    background:var(--tricios-accent)!important;color:#FFFFFF!important;
  }
  .tricios-erp .mr-mobile-nav .mr-shell-label {font-size:14px;font-weight:500;line-height:1.5;text-align:left}
  .tricios-erp :is(a,button,input,select,textarea,summary):focus-visible {
    outline:2px solid var(--tricios-app-wine)!important;
    outline-offset:3px;
  }

  /* More and search retain the native modal and original keyboard handling. */
  .tricios-erp .mr-mobile-menu {
    width:min(980px,calc(100vw - 80px));max-height:calc(100dvh - 80px)!important;
    border:1px solid var(--tricios-line)!important;border-radius:28px!important;
    box-shadow:0 24px 90px #00000028!important;
  }
  .tricios-erp .mr-mobile-menu>header {padding:24px 28px!important;min-height:88px;border-bottom:1px solid var(--tricios-line)!important}
  .tricios-erp .mr-mobile-menu>header h2 {font-size:28px!important;letter-spacing:-.03em}
  .tricios-erp .mr-mobile-menu-links {grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;padding:24px 28px 28px}
  .tricios-erp .tricios-app-menu-group h3 {margin:0 4px 12px;font-size:13px!important}
  .tricios-erp .tricios-app-menu-group :is(.tricios-app-menu-link,.tricios-app-setting) {min-height:60px;padding:11px 14px}
  .tricios-erp .tricios-app-setting select {width:116px;min-width:116px;max-width:130px;flex-shrink:0;padding:8px 10px!important}
  .tricios-erp .tricios-app-menu-group>.tricios-app-menu-link:hover {background:var(--tricios-surface)!important}
  .tricios-erp .tricios-app-menu-group>.tricios-app-menu-link:focus-visible {outline-offset:-3px}
  .tricios-erp .tricios-app-menu-footer {padding-top:0;margin-top:0}
  .tricios-erp .mr-global-search {padding:clamp(32px,8vh,88px) 40px 40px}
  .tricios-erp .mr-global-search-card {width:min(860px,100%);border-radius:28px!important;max-height:calc(100dvh - 100px);box-shadow:0 24px 90px #00000028!important}
  .tricios-erp .mr-global-search-head {padding:26px 28px 18px;align-items:center}
  .tricios-erp .mr-global-search-head h2 {font-size:28px!important;margin:0}
  .tricios-erp .mr-global-search-eyebrow {font-size:11px!important;letter-spacing:0!important;text-transform:none;line-height:1.5}
  .tricios-erp .mr-global-search-close {width:44px;height:44px;border:0!important;border-radius:50%!important}
  .tricios-erp .mr-global-search-box {margin:0 28px;padding:0 16px;border-radius:16px!important;gap:12px}
  .tricios-erp .mr-global-search-box input {height:56px!important;min-height:56px!important;padding:0!important;background:transparent!important;font-weight:400!important}
  .tricios-erp .mr-global-search-box>span {color:var(--tricios-muted)}
  .tricios-erp .mr-global-search-box kbd {border:1px solid var(--tricios-line);background:var(--tricios-card);color:var(--tricios-muted);font-weight:500}
  .tricios-erp .mr-global-search-meta {padding:12px 30px 14px;font-size:12px;line-height:1.6}
  .tricios-erp .mr-global-search-results {padding:12px 18px 22px}
  .tricios-erp .mr-global-search-result {padding:14px 12px;min-height:72px;gap:14px;border-radius:16px}
  .tricios-erp .mr-global-search-result:hover,
  .tricios-erp .mr-global-search-result.active {background:var(--tricios-surface)!important;border-color:var(--tricios-line)!important}
  .tricios-erp .mr-global-search-copy strong {font-size:15px;color:var(--tricios-ink);font-weight:600;line-height:1.4}
  .tricios-erp .mr-global-search-copy small {font-size:12px;line-height:1.5}
  .tricios-erp .mr-global-search-type {font-size:10px;font-weight:500;letter-spacing:.03em}
  .tricios-erp .mr-global-search-side {font-size:12px}
  .tricios-erp .mr-global-search-type-icon {border-radius:50%;color:var(--tricios-ink)!important}
  .tricios-erp .mr-global-search-go {color:var(--tricios-muted)}
  .tricios-erp .mr-global-search-empty {margin:0 10px;border-radius:18px;gap:10px;padding:28px}
  .tricios-erp .mr-global-search-empty b {font-size:16px;color:var(--tricios-ink)}
  .tricios-erp .mr-global-search-empty span {font-size:13px;line-height:1.6}
  .tricios-erp .mr-global-search-loading span {background:var(--tricios-app-wine)}

  /* Existing Home data becomes a balanced desktop workspace: financial overview
     on the left; today's work and priorities on the right. No duplicate widgets. */
  body.mr-panel-home .dashboard {
    max-width:1480px!important;
    display:grid;grid-template-columns:minmax(0,.95fr) minmax(0,1.2fr);
    align-items:start;gap:var(--tricios-desktop-gap);
  }
  body.mr-panel-home .tricios-app-home {display:contents}
  body.mr-panel-home .tricios-app-home-head {
    grid-column:1/-1;grid-row:1;min-height:46px;margin:0 0 6px;gap:20px;
  }
  body.mr-panel-home .tricios-app-home-head h1 {font-size:clamp(28px,2.2vw,36px)!important;line-height:1.2!important;letter-spacing:-.035em}
  body.mr-panel-home .tricios-app-scope {padding:11px 16px;border-radius:14px;font-size:13px;font-weight:500;line-height:1.4;white-space:normal;text-align:center}
  body.mr-panel-home .tricios-app-scope:hover {background:var(--tricios-app-soft-wine);color:var(--tricios-app-wine)}
  html[data-theme="dark"] body.mr-panel-home .tricios-app-scope:hover {background:var(--tricios-accent);color:#FFFFFF}
  body.mr-panel-home .tricios-app-balance {
    grid-column:1;grid-row:2;padding:28px 28px 24px;border-radius:24px;
    background:var(--tricios-card);border:1px solid var(--tricios-line);text-align:left;
    min-width:0;
  }
  body.mr-panel-home .tricios-app-balance-label {font-size:15px;line-height:1.5}
  body.mr-panel-home .tricios-app-balance-number {font-size:clamp(38px,3.5vw,60px);line-height:1.12;margin:12px 0 10px;letter-spacing:-.045em}
  body.mr-panel-home .tricios-app-balance-status {font-size:13px;line-height:1.5;margin:0}
  body.mr-panel-home #triciosHomeCurrency {max-width:200px;min-height:44px!important;margin-top:16px}
  body.mr-panel-home #triciosHomeCurrencyNote {font-size:12px;line-height:1.5}
  body.mr-panel-home .tricios-app-quickactions {
    grid-column:1;grid-row:3;grid-template-columns:repeat(3,minmax(0,1fr));
    gap:12px;margin:0;padding:2px 0;
  }
  body.mr-panel-home .tricios-app-quickaction {min-height:104px;gap:11px;padding:4px;justify-content:flex-start;font-size:13px;font-weight:500;line-height:1.4;border-radius:16px}
  body.mr-panel-home .tricios-app-quickaction>span:first-child {width:62px;height:62px;border-radius:50%;background:var(--tricios-app-soft-wine);color:var(--tricios-app-wine)}
  body.mr-panel-home .tricios-app-quickaction:hover>span:first-child {background:var(--tricios-accent);color:#FFFFFF}
  body.mr-panel-home .tricios-app-quickaction svg {width:25px;height:25px;stroke-width:1.6}
  body.mr-panel-home .tricios-app-today-card {
    grid-column:2;grid-row:2/4;align-self:stretch;
    margin:0;padding:24px;border-radius:24px;
    background:var(--tricios-card);border:1px solid var(--tricios-line);
    min-width:0;
  }
  body.mr-panel-home .tricios-app-section-head {margin:0 0 14px;gap:16px}
  body.mr-panel-home .tricios-app-section-head h2 {font-size:21px!important;line-height:1.3!important}
  body.mr-panel-home .tricios-app-section-head a {min-height:44px;font-size:13px;font-weight:500}
  html[data-theme="dark"] body.mr-panel-home .tricios-app-section-head a {color:var(--tricios-ink)}
  body.mr-panel-home #triciosHomeToday {padding:0 18px;border-radius:18px;background:var(--tricios-background)}
  body.mr-panel-home .tricios-app-agenda-row {min-height:88px;padding:17px 0;gap:14px}
  body.mr-panel-home .tricios-app-agenda-icon {width:42px;height:42px;flex-basis:42px}
  body.mr-panel-home .tricios-app-agenda-copy strong {font-size:15px;font-weight:600;line-height:1.4}
  body.mr-panel-home .tricios-app-agenda-copy small {font-size:13px;line-height:1.5}
  body.mr-panel-home .tricios-app-empty {padding:24px 6px;font-size:14px;line-height:1.6}
  body.mr-panel-home .tricios-app-empty strong {font-size:16px}
  body.mr-panel-home .tricios-app-finance-mini {
    grid-column:1;grid-row:4;gap:14px;margin:0;
  }
  body.mr-panel-home .tricios-app-finance-mini>a {padding:22px 20px;border:1px solid var(--tricios-line);border-radius:22px;background:var(--tricios-card);min-height:146px}
  body.mr-panel-home .tricios-app-finance-mini>a:hover {background:var(--tricios-surface)}
  body.mr-panel-home .tricios-app-finance-mini span {font-size:13px;line-height:1.5}
  body.mr-panel-home .tricios-app-finance-mini strong {font-size:clamp(24px,2vw,32px);line-height:1.3;margin-top:16px;letter-spacing:-.03em;font-variant-numeric:tabular-nums}
  body.mr-panel-home #triciosHomeDrafts {grid-column:1;grid-row:5;min-height:60px;margin:0;padding:16px 18px;border-radius:18px;font-size:13px;line-height:1.5}
  html[data-theme="dark"] body.mr-panel-home #triciosHomeDrafts {color:var(--tricios-ink)}
  body.mr-panel-home .tricios-app-refresh {grid-column:1;grid-row:6;justify-self:start;width:auto;min-height:44px;margin:0;padding:10px 16px;border-radius:14px!important;background:var(--tricios-surface)!important;font-size:13px}
  body.mr-panel-home .tricios-app-refresh:hover {color:var(--tricios-ink)!important}
  body.mr-panel-home .home-main-grid {grid-column:2;grid-row:4/7;margin:0;padding:0;min-width:0}
  body.mr-panel-home .home-priority-panel {padding:24px!important;border:1px solid var(--tricios-line)!important;border-radius:24px!important;background:var(--tricios-card)!important}
  body.mr-panel-home .home-priority-panel .panel-head {padding:0 0 18px!important;align-items:center;gap:14px;background:transparent!important;border:0!important}
  body.mr-panel-home .home-priority-panel h2 {font-size:21px!important;line-height:1.3!important}
  body.mr-panel-home .home-priority-panel .panel-summary {font-size:12px;line-height:1.4;white-space:normal;text-align:right;max-width:110px;background:var(--tricios-surface)!important;color:var(--tricios-muted)!important;border:1px solid var(--tricios-line)!important}
  body.mr-panel-home .priority-list {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:0}
  body.mr-panel-home .priority-row {grid-template-columns:32px minmax(0,1fr) 14px;align-items:start;gap:12px;min-height:110px;padding:18px!important;border-radius:18px!important;line-height:1.5}
  body.mr-panel-home .priority-row:hover {background:var(--tricios-surface)!important}
  body.mr-panel-home .priority-row:first-child:hover {background:var(--tricios-accent-hover)!important}
  body.mr-panel-home .priority-count {font-size:17px;font-weight:600;line-height:1}
  body.mr-panel-home .priority-copy b {display:block;font-size:14px;line-height:1.4;font-weight:600!important}
  body.mr-panel-home .priority-copy small {font-size:12px;line-height:1.5;margin-top:5px}
  body.mr-panel-home .priority-row i {padding-top:6px;font-size:14px;line-height:1;font-style:normal}
  body.mr-panel-home .priority-clear {grid-column:1/-1;align-items:center;padding:24px;gap:16px}
  body.mr-panel-home .priority-clear>span {display:grid;place-items:center;width:44px;height:44px;flex:0 0 44px;border-radius:50%;font-family:var(--tricios-ui-font)!important;font-size:20px}
  body.mr-panel-home .priority-clear b {font-family:var(--tricios-ui-font)!important;font-size:16px;font-weight:600!important}
  body.mr-panel-home .priority-clear p {margin:5px 0 0;font-size:13px;line-height:1.5}
  body.mr-panel-home .load-error.show {grid-column:1/-1;grid-row:7;margin:0;padding:18px 20px;border-radius:18px;font-size:13px;line-height:1.5}
}

@media (min-width:1025px) and (max-width:1199px) {
  body.tricios-erp {--mr-shell-w:160px}
  .tricios-erp>.tricios-header {padding-inline:20px}
  .tricios-erp>.tricios-header .tricios-brand {width:138px}
  .tricios-erp .mr-shell {padding:24px 12px!important}
  .tricios-erp .mr-mobile-nav>.mr-shell-link {gap:10px;padding:14px 12px!important;font-size:13px!important}
  .tricios-erp .mr-mobile-nav .mr-shell-label {font-size:13px}
}

/* At compact desktop widths retain readable priorities and bounded currency
   figures. These overrides still never apply to tablet or phone widths. */
@media (min-width:1025px) and (max-width:1350px) {
  body.mr-panel-home .dashboard {grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);gap:18px}
  body.mr-panel-home .tricios-app-balance {padding:24px}
  body.mr-panel-home .tricios-app-balance-number {font-size:clamp(34px,3.3vw,44px)}
  body.mr-panel-home .tricios-app-today-card,
  body.mr-panel-home .home-priority-panel {padding:20px!important}
  body.mr-panel-home .priority-list {grid-template-columns:minmax(0,1fr)}
  body.mr-panel-home .priority-row {min-height:88px;padding:16px!important}
  body.mr-panel-home .tricios-app-finance-mini {grid-template-columns:minmax(0,1fr)}
  body.mr-panel-home .tricios-app-finance-mini>a {min-height:0;padding:20px}
  body.mr-panel-home .tricios-app-finance-mini strong {font-size:28px;margin-top:10px}
}
