/* V46.34 — Desktop Gateway of MBM shell.
   Desktop only: remove permanent left sidebar, use a full-width Gateway-style workspace,
   keep mobile navigation exactly as before. */
@media (min-width:901px){
  :root{
    --gw-brown:#6d452c;
    --gw-brown-dark:#4f2f1d;
    --gw-ink:#2b211b;
    --gw-muted:#7c746e;
    --gw-paper:#fffdf9;
    --gw-bg:#f6f0e8;
    --gw-soft:#f3ece3;
    --gw-line:#ddd2c6;
    --gw-hover:#f0e2d3;
    --gw-rail:154px;
  }

  /* Desktop: no permanent left navigation. */
  .mbm-web-sidebar{display:none!important}
  body:not(.mbm-entry-assist-on){
    background:var(--gw-bg)!important;
    color:var(--gw-ink)!important;
    padding:78px calc(var(--gw-rail) + 28px) 28px 20px!important;
  }
  body.mbm-gateway-home:not(.mbm-entry-assist-on){padding-right:calc(var(--gw-rail) + 28px)!important}
  body[data-tally-page="bank-reconciliation"]:not(.mbm-entry-assist-on){padding-right:20px!important}

  /* Top desktop header: one clean full-width bar. */
  .mbm-web-top{
    display:grid!important;
    grid-template-columns:240px minmax(280px,1fr) auto!important;
    left:0!important;right:0!important;top:0!important;
    height:64px!important;
    background:linear-gradient(180deg,#765036,#5f3b25)!important;
    border:0!important;border-bottom:1px solid #4c2e1d!important;
    box-shadow:0 2px 10px #3c271b26!important;
    color:#fff!important;
  }
  .mbm-web-brand{
    height:64px!important;background:transparent!important;color:#fff!important;
    padding:0 20px!important;font-size:18px!important;border-right:1px solid #ffffff30!important;
  }
  .mbm-web-brand img{background:#fff!important;border-radius:7px!important;width:34px!important;height:34px!important}
  .mbm-web-company{color:#fff!important;padding-left:22px!important}
  .mbm-web-company strong{color:#fff!important;font-size:14px!important}
  .mbm-web-company span{color:#f4e8de!important}
  .mbm-header-system{color:#f1ddd0!important}
  .mbm-web-status{color:#fff!important;padding-right:18px!important}
  .mbm-web-status .mbm-sync-now,.mbm-web-status button{
    border:1px solid #ead9ca!important;background:#fffaf5!important;color:#5e3a25!important;
    border-radius:6px!important;padding:7px 11px!important;font-weight:800!important
  }

  /* Full-width normal pages. */
  .shell,.shell>.main,.main,main{max-width:none!important;width:100%!important;margin-left:0!important;margin-right:0!important}
  .shell{padding:0!important;background:transparent!important;min-height:calc(100vh - 98px)!important}
  .shell>.main{padding:0!important;border:0!important;background:transparent!important;min-height:0!important}
  .card,.tablewrap,.tally-report-wrap,.mobile-reports-menu .report-menu-layout{
    background:var(--gw-paper)!important;border-color:var(--gw-line)!important;box-shadow:0 2px 8px #5d422f0c!important
  }
  .pagehead,.tally-pagehead{
    background:transparent!important;color:var(--gw-ink)!important;border:0!important;
    padding:8px 0 13px!important;margin:0!important
  }
  .pagehead h1,.pagehead h2,.pagehead h3,.tally-pagehead h2{color:var(--gw-ink)!important;font-size:22px!important}
  .pagehead .btn,.tally-pagehead .btn{background:#fff!important;color:var(--gw-brown-dark)!important;border:1px solid var(--gw-line)!important;border-radius:6px!important;padding:7px 11px!important}
  .tabs,.tally-report-page>.tabs{background:var(--gw-paper)!important;border:1px solid var(--gw-line)!important;border-radius:8px!important;padding:5px!important}
  .tabs a,.tally-report-page>.tabs a{color:#5c493d!important;border-radius:6px!important}
  .tabs a:hover,.tabs a:focus,.tabs a.active{background:var(--gw-hover)!important;color:#3f2b1e!important}
  .tally-report-titlebar{background:var(--gw-brown)!important;border-color:var(--gw-brown-dark)!important;border-radius:7px!important}
  .table th,.tally-report-table th{background:var(--gw-soft)!important;color:#4e4037!important;border-color:#d8cec3!important}
  .table td,.tally-report-table td{background:var(--gw-paper)!important;border-color:#ebe3da!important}
  .table tr:hover td,.table tr.keyboard-selected td,.tally-report-table tr:hover td{background:#fbf1e7!important}
  .btn{background:var(--gw-brown)!important;border-radius:6px!important}.btn.secondary{background:#fff!important;color:var(--gw-brown-dark)!important;border:1px solid var(--gw-line)!important}.btn.good{background:#367a46!important}

  /* Right-side Tally-style action rail on normal desktop pages. */
  .desktop-global-actions{
    display:flex!important;position:fixed!important;z-index:115!important;right:14px!important;top:78px!important;bottom:22px!important;
    width:var(--gw-rail)!important;background:#f7f1e9!important;border:1px solid var(--gw-line)!important;border-radius:8px!important;
    padding:7px!important;gap:5px!important;overflow:auto!important;box-shadow:0 3px 12px #5a3d2912!important
  }
  .desktop-global-actions:before{content:'Shortcuts';display:block;font-size:12px;font-weight:900;color:#3e2d22;padding:3px 4px 7px;border-bottom:1px solid var(--gw-line);margin-bottom:2px}
  .desktop-global-actions .tally-keybtn{
    min-height:34px!important;display:grid!important;grid-template-columns:48px minmax(0,1fr)!important;align-items:center!important;
    background:#fff!important;border:1px solid #e7ddd3!important;border-radius:6px!important;color:#49372c!important;font-size:10px!important;padding:5px 6px!important;text-align:left!important
  }
  .desktop-global-actions .tally-keybtn b{min-width:0!important;color:#63422d!important;font-size:9px!important}
  .desktop-global-actions .tally-keybtn:hover,.desktop-global-actions .tally-keybtn:focus{background:#f4e4d4!important;border-color:#d5bca6!important;outline:0!important}
  .desktop-global-actions .tally-key-sep{height:1px!important;background:var(--gw-line)!important;margin:2px 0!important}

  /* Gateway home layout. */
  .desktop-gateway{display:block!important;min-height:calc(100vh - 108px);color:var(--gw-ink)}
  .desktop-gateway-title{padding:7px 2px 14px}
  .desktop-gateway-title h1{margin:0;font-size:31px;letter-spacing:-.5px;color:#2e2017}
  .desktop-gateway-title p{margin:5px 0 0;color:#7b6d63;font-size:13px}
  .desktop-gateway-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;align-items:start}
  .gateway-section{background:var(--gw-paper);border:1px solid var(--gw-line);border-radius:9px;overflow:hidden;box-shadow:0 2px 8px #5e402a0d}
  .gateway-section-head{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#f3ece4;border-bottom:1px solid #e1d6ca;padding:11px 13px}
  .gateway-section-head>span{display:flex;align-items:center;gap:9px;font-weight:900;font-size:16px;color:#39291f}
  .gateway-section-head .gicon{font-size:21px;width:24px;text-align:center}
  .gateway-section-head kbd{font:700 10px ui-monospace,monospace;border:1px solid #d8cec2;background:#fff;padding:4px 6px;border-radius:5px;color:#5a4639}
  .gateway-section-sub{padding:8px 13px 5px;color:#84776e;font-size:10px}
  .gateway-list{display:grid;gap:5px;padding:7px 12px 12px}
  .gateway-action{
    display:grid;grid-template-columns:24px minmax(0,1fr) auto;align-items:center;gap:8px;min-height:38px;
    padding:7px 9px;border:1px solid #e9e0d8;border-radius:6px;background:#fff;color:#403128;text-decoration:none;font-size:12px
  }
  .gateway-action .ga-icon{width:22px;text-align:center;font-size:15px;color:#6a4a34}.gateway-action small{color:#8b817a;font-size:9px}.gateway-action kbd{font:700 9px ui-monospace,monospace;background:#f4eee7;border:1px solid #ded3c8;border-radius:4px;padding:3px 5px;color:#6a4b37;white-space:nowrap}
  .gateway-action:hover,.gateway-action:focus,.gateway-action.selected{background:#efe0d0!important;border-color:#d5b99f!important;outline:0!important;color:#2e2119!important}
  .gateway-action.selected{box-shadow:inset 3px 0 #7d5032}
  .gateway-mini-status{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:14px;padding:8px 10px;border-top:1px solid #e1d6ca;color:#786b61;font-size:10px}.gateway-mini-status .ready{color:#2f7d43;font-weight:800}

  .mbm-gateway-shortcuts{
    position:fixed;right:14px;top:78px;bottom:22px;width:var(--gw-rail);z-index:114;background:#f7f1e9;border:1px solid var(--gw-line);border-radius:8px;padding:8px;box-shadow:0 3px 12px #5a3d2912;overflow:auto
  }
  .mbm-gateway-shortcuts h3{font-size:12px;margin:0 0 8px;padding:2px 3px 8px;border-bottom:1px solid var(--gw-line);color:#3d2d22}
  .mbm-gateway-shortcuts a{display:grid;grid-template-columns:48px minmax(0,1fr);gap:5px;align-items:center;min-height:36px;margin-bottom:6px;padding:6px;border:1px solid #e5d9cf;border-radius:6px;background:#fff;color:#49372c;text-decoration:none;font-size:10px}
  .mbm-gateway-shortcuts a kbd{font:800 9px ui-monospace,monospace;color:#69472f}.mbm-gateway-shortcuts a:hover,.mbm-gateway-shortcuts a:focus{background:#f0dfcf;outline:0}

  /* Keep old dashboard quick views available when an explicit ?view= link is opened. */
  body.mbm-gateway-home .mbm-dashboard{display:none!important}
  body:not(.mbm-gateway-home) .desktop-gateway,body:not(.mbm-gateway-home) .mbm-gateway-shortcuts{display:none!important}

  /* Entry pages continue to use their dedicated V46.20 right rails/full-width rules. */
  body.mbm-entry-assist-on .mbm-web-top{display:grid!important}
}

@media (max-width:900px){
  .desktop-gateway,.mbm-gateway-shortcuts{display:none!important}
  .mbm-dashboard{display:block!important}
}

@media (min-width:901px) and (max-width:1180px){
  .desktop-gateway-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (min-width:901px){
  body:not(.mbm-entry-assist-on) .mbm-voucher-detail,
  body:not(.mbm-entry-assist-on) .mbm-item-detail,
  body:not(.mbm-entry-assist-on) .mobile-voucher-page,
  body:not(.mbm-entry-assist-on) .mobile-ledger-page,
  body:not(.mbm-entry-assist-on) .mobile-items-page,
  body:not(.mbm-entry-assist-on) .mobile-reports-menu{max-width:none!important;width:100%!important;margin-left:0!important;margin-right:0!important}
}

/* V46.35 — Gateway sections + quick header + direct Home. */
@media (min-width:901px){
  .mbm-web-status{display:flex!important;align-items:center!important;gap:8px!important;white-space:nowrap!important}
  .mbm-header-quick{display:inline-flex;align-items:center;gap:5px;min-height:34px;padding:0 10px;border:1px solid #ead9ca;background:#fffaf5;color:#5e3a25!important;border-radius:6px;text-decoration:none;font-size:10px;font-weight:850}
  .mbm-header-quick b{font-size:9px;color:#80583d}
  .mbm-header-quick:hover,.mbm-header-quick:focus{background:#f4e6da;outline:0}
  .home-keybtn{background:#efe0d0!important;border-color:#d1b69f!important;font-weight:850!important}
  .gateway-section-open{text-decoration:none;color:inherit;cursor:pointer}
  .gateway-section-open:hover,.gateway-section-open:focus{background:#eadbc9!important;outline:0}
  .gateway-open-label{font-size:10px;font-weight:850;color:#6b4b36;background:#fff;border:1px solid #d9cbbb;border-radius:5px;padding:4px 7px;white-space:nowrap}

  .gateway-section-page{min-height:calc(100vh - 106px);padding:2px 0 20px;color:var(--gw-ink)}
  .gateway-breadcrumb{display:flex;align-items:center;gap:8px;font-size:11px;color:#81746b;margin:1px 0 10px}
  .gateway-breadcrumb a{color:#654631;text-decoration:none;font-weight:800}
  .gateway-section-page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:12px}
  .gateway-section-page-head h1{margin:0;color:#2e2017;font-size:30px;letter-spacing:-.4px}
  .gateway-section-page-head p{margin:5px 0 0;color:#7c7067;font-size:12px}
  .gateway-page-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
  .gateway-section-tabs{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px;margin-bottom:12px}
  .gateway-section-tabs a{display:flex;align-items:center;justify-content:center;gap:6px;min-height:38px;padding:6px 8px;background:#fff;border:1px solid var(--gw-line);border-radius:7px;color:#4d392b;text-decoration:none;font-size:11px;font-weight:850}
  .gateway-section-tabs a.active,.gateway-section-tabs a:hover,.gateway-section-tabs a:focus{background:#efe0d0;border-color:#d2b79f;outline:0}
  .gateway-section-page-card{background:var(--gw-paper);border:1px solid var(--gw-line);border-radius:9px;box-shadow:0 2px 8px #5e402a0d;overflow:hidden}
  .gateway-section-page-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0}
  .gateway-section-row{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:10px;min-height:64px;padding:9px 12px;border-bottom:1px solid #ebe3da;border-right:1px solid #ebe3da;background:#fff;color:#3f3027;text-decoration:none}
  .gateway-section-row:nth-child(even){border-right:0}
  .gateway-section-row:hover,.gateway-section-row:focus,.gateway-section-row.selected{background:#f7eadd;outline:0}
  .gateway-section-row.selected{box-shadow:inset 4px 0 #805537}
  .gsr-icon{display:flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:50%;background:#f0e3d6;color:#654631;font-size:15px;font-weight:900}
  .gsr-main{display:grid;gap:3px;min-width:0}.gsr-main b{font-size:13px}.gsr-main small{font-size:9px;color:#867a71;white-space:normal}
  .gateway-section-row kbd,.gsr-open{font:750 9px ui-monospace,monospace;border:1px solid #ded3c8;background:#f7f1ea;border-radius:5px;padding:4px 6px;color:#684a36;white-space:nowrap}
}
@media (min-width:901px) and (max-width:1180px){
  .gateway-section-tabs{grid-template-columns:repeat(3,minmax(0,1fr))}
  .gateway-section-page-list{grid-template-columns:1fr}
  .gateway-section-row{border-right:0}
  .mbm-header-quick{display:none}
}

/* V46.36 — Desktop-wide MBM blue register theme.
   Desktop only. Mobile keeps the existing MBM/Vyapar styling unchanged. */
@media (min-width:901px){
  :root{
    --gw-brown:#0b4b83;
    --gw-brown-dark:#07365f;
    --gw-ink:#102c4a;
    --gw-muted:#60758b;
    --gw-paper:#ffffff;
    --gw-bg:#f3f8fc;
    --gw-soft:#eaf2f9;
    --gw-line:#c8d8e7;
    --gw-hover:#e8f3fd;
  }
  body:not(.mbm-entry-assist-on){background:var(--gw-bg)!important;color:var(--gw-ink)!important}
  .mbm-web-top{background:linear-gradient(180deg,#0d4d85,#083864)!important;border-bottom-color:#062d50!important;box-shadow:0 2px 10px #0a335326!important}
  .mbm-web-brand{border-right-color:#ffffff36!important}
  .mbm-web-status .mbm-sync-now,.mbm-web-status button,.mbm-header-quick{border-color:#b9d1e7!important;background:#f8fcff!important;color:#0b477d!important}
  .mbm-header-quick b{color:#0b5597!important}
  .mbm-header-quick:hover,.mbm-header-quick:focus,.mbm-web-status .mbm-sync-now:hover{background:#e7f2fc!important}
  .desktop-global-actions,.mbm-gateway-shortcuts{background:#eef6fd!important;border-color:#c7d9e9!important;box-shadow:0 3px 12px #0d3c6012!important}
  .desktop-global-actions:before,.mbm-gateway-shortcuts h3{color:#123a60!important;border-color:#c7d9e9!important}
  .desktop-global-actions .tally-keybtn,.mbm-gateway-shortcuts a{background:#fff!important;border-color:#d1e1ef!important;color:#183f63!important}
  .desktop-global-actions .tally-keybtn b,.mbm-gateway-shortcuts a kbd{color:#0b64ad!important}
  .desktop-global-actions .tally-keybtn:hover,.desktop-global-actions .tally-keybtn:focus,.mbm-gateway-shortcuts a:hover,.mbm-gateway-shortcuts a:focus{background:#e4f1fc!important;border-color:#9fc3e2!important}
  .desktop-global-actions .home-keybtn{background:#e5f2fc!important;border-color:#9fc4e2!important}
  .gateway-section,.gateway-section-page-card{border-color:#c8d8e7!important;box-shadow:0 2px 8px #0b3d620d!important}
  .gateway-section-head{background:#eaf3fb!important;border-color:#cbdceb!important}
  .gateway-section-head>span,.gateway-section-page-head h1,.desktop-gateway-title h1{color:#10365a!important}
  .gateway-section-head kbd,.gateway-action kbd,.gateway-section-row kbd,.gsr-open{border-color:#c8d9e8!important;background:#f8fbfe!important;color:#0b5798!important}
  .gateway-action,.gateway-section-row,.gateway-section-tabs a{border-color:#d6e3ee!important;color:#163b5d!important}
  .gateway-action .ga-icon,.gsr-icon{color:#0d5f9f!important;background:#e7f2fb!important}
  .gateway-action:hover,.gateway-action:focus,.gateway-action.selected,.gateway-section-row:hover,.gateway-section-row:focus,.gateway-section-row.selected,.gateway-section-tabs a.active,.gateway-section-tabs a:hover,.gateway-section-tabs a:focus{background:#e7f2fc!important;border-color:#a9c9e4!important;color:#0c3557!important}
  .gateway-action.selected,.gateway-section-row.selected{box-shadow:inset 4px 0 #0b5f9f!important}
  .table th,.tally-report-table th{background:#eaf2f9!important;color:#183d60!important;border-color:#c8d8e7!important}
  .table td,.tally-report-table td{background:#fff!important;border-color:#e0eaf3!important}
  .table tr:hover td,.table tr.keyboard-selected td,.tally-report-table tr:hover td{background:#eaf5ff!important}
  .tally-report-titlebar{background:#0b4b83!important;border-color:#07365f!important}
  .tabs,.tally-report-page>.tabs{border-color:#c8d8e7!important}
  .tabs a,.tally-report-page>.tabs a{color:#244d70!important}
  .tabs a:hover,.tabs a:focus,.tabs a.active{background:#e5f1fb!important;color:#0b426f!important}
  .btn{background:#0b5a98!important}.btn.secondary{background:#fff!important;color:#0b477d!important;border-color:#bdd2e5!important}
  .keys{background:#0b4b83!important;color:#fff!important;border-color:#07365f!important}
  .keys span{color:#fff!important}
}
