:root{--navy:#0b2f5b;--blue:#0f5fa8;--sky:#e8f2ff;--line:#c9d8ee;--ink:#172033;--muted:#65758b;--bg:#f4f8fd;--card:#fff;--danger:#b42318;--success:#087443;--warn:#b7791f;--shadow:0 10px 30px rgba(15,47,91,.08)}*{box-sizing:border-box}body{margin:0;font-family:Inter,Segoe UI,Arial,sans-serif;background:var(--bg);color:var(--ink);font-size:14px}.topbar{height:54px;background:linear-gradient(90deg,var(--navy),var(--blue));color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 18px;position:sticky;top:0;z-index:3;box-shadow:var(--shadow)}.topbar strong{font-size:18px;margin-right:12px}.topbar .muted{color:#cfe3ff}.top-actions{display:flex;gap:8px}.top-actions a{color:#fff;text-decoration:none;background:rgba(255,255,255,.14);padding:8px 12px;border-radius:8px}.app-shell{display:grid;grid-template-columns:220px minmax(0,1fr) 160px;gap:14px;max-width:1600px;margin:0 auto;padding:14px}.meta-panel,.shortcut-panel,.card,.login-card{background:var(--card);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow)}.meta-panel{padding:16px;min-height:calc(100vh - 86px);position:sticky;top:68px;align-self:start}.logo-text{width:58px;height:58px;border-radius:18px;background:linear-gradient(135deg,var(--blue),#08233f);color:#fff;font-weight:800;font-size:22px;display:flex;align-items:center;justify-content:center;margin-bottom:12px}.meta-panel h3{margin:0 0 8px;font-size:18px}.meta-panel p{color:var(--muted);line-height:1.45}.meta-panel span{color:var(--blue);font-weight:700}.main-panel{min-width:0}.shortcut-panel{padding:14px;display:flex;flex-direction:column;gap:8px;position:sticky;top:68px;align-self:start}.shortcut-panel b{color:var(--navy)}.shortcut-panel a{display:block;text-decoration:none;color:var(--blue);background:var(--sky);border:1px solid var(--line);border-radius:10px;padding:8px}.nav-tabs{display:flex;gap:6px;overflow:auto;margin-bottom:12px}.nav-link{white-space:nowrap;text-decoration:none;color:var(--navy);background:#fff;border:1px solid var(--line);padding:10px 12px;border-radius:999px;font-weight:650}.nav-link.active{background:var(--blue);color:#fff;border-color:var(--blue)}h1{font-size:26px;color:var(--navy);margin:8px 0 14px}h2{color:var(--navy);margin:0 0 12px}.card{padding:16px;margin-bottom:14px}.login-card{max-width:440px;margin:9vh auto;padding:28px}.brand-large{font-size:32px;font-weight:800;color:var(--navy);margin-bottom:8px}.hint,.muted{color:var(--muted)}.toast{padding:12px 14px;border-radius:12px;margin-bottom:12px;border:1px solid}.toast.success{background:#ecfdf3;border-color:#a6f4c5;color:var(--success)}.toast.error{background:#fef3f2;border-color:#fecdca;color:var(--danger)}.kpi-grid{display:grid;grid-template-columns:repeat(5,minmax(150px,1fr));gap:12px;margin-bottom:14px}.kpi{background:#fff;border:1px solid var(--line);border-radius:14px;padding:16px;box-shadow:var(--shadow)}.kpi span{display:block;color:var(--muted);font-weight:700}.kpi b{font-size:22px;color:var(--navy)}.kpi.warn b{color:var(--warn)}.gateway{display:grid;grid-template-columns:repeat(4,minmax(180px,1fr));gap:14px;margin-bottom:14px}.gateway section{background:#fff;border:1px solid var(--line);border-radius:14px;padding:16px;box-shadow:var(--shadow)}.gateway a{display:block;text-decoration:none;color:var(--blue);padding:9px 10px;border-radius:9px;border:1px solid transparent}.gateway a:hover{background:var(--sky);border-color:var(--line)}.grid-form{display:grid;grid-template-columns:repeat(3,minmax(180px,1fr));gap:12px;align-items:end}label span{display:block;font-weight:700;color:#294263;margin-bottom:6px}input,select,textarea{width:100%;border:1px solid #b8c8dd;border-radius:10px;padding:10px 11px;background:#fff;color:var(--ink);outline:none}input:focus,select:focus,textarea:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(15,95,168,.12)}textarea{min-height:78px;resize:vertical}.wide{grid-column:1/-1}.check{display:flex;gap:8px;align-items:center}.check input{width:auto}.form-actions,.action-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:8px}.btn{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--line);border-radius:10px;padding:9px 12px;background:#fff;color:var(--navy);text-decoration:none;font-weight:700;cursor:pointer}.btn.primary{background:var(--blue);color:#fff;border-color:var(--blue)}.btn.small{font-size:12px;padding:6px 8px;border-radius:8px}.btn:hover{filter:brightness(.97)}.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:12px}.data-table{width:100%;border-collapse:collapse;background:#fff;min-width:720px}.data-table th{background:#dcecff;color:var(--navy);text-align:left;border-bottom:1px solid var(--line);padding:10px;font-size:13px}.data-table td{border-bottom:1px solid #ecf1f7;padding:9px;vertical-align:top}.data-table tr:hover td{background:#f8fbff}.empty{text-align:center;color:var(--muted)}.danger{color:var(--danger)}.invoice-form .table-wrap{margin:12px 0}.invoice-lines input,.invoice-lines select,.journal-lines input,.journal-lines select{min-width:100px}.totals-box{margin-left:auto;max-width:360px;background:var(--sky);border:1px solid var(--line);border-radius:14px;padding:14px;display:grid;gap:8px}.totals-box>div{display:flex;justify-content:space-between}.grand{font-size:18px;color:var(--navy);border-top:1px solid var(--line);padding-top:8px}.filter-form{display:flex;align-items:center;gap:8px;flex-wrap:wrap;background:#fff;border:1px solid var(--line);border-radius:12px;padding:12px;margin-bottom:12px}.pnl{max-width:520px}.pnl div{display:flex;justify-content:space-between;border-bottom:1px solid var(--line);padding:12px}.error-box{border-color:#fecdca;background:#fef3f2}.invoice-paper{background:#fff;border:1px solid #ccd8e6;border-radius:14px;padding:24px;max-width:920px;margin:0 auto}.invoice-title{display:flex;justify-content:space-between;gap:16px;border-bottom:3px solid var(--blue);padding-bottom:14px;margin-bottom:14px}.invoice-title h2{font-size:28px}.bill-box{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:12px 0}.bill-box>div{border:1px solid var(--line);padding:12px;border-radius:10px}.print-table{width:100%;border-collapse:collapse;margin:14px 0}.print-table th,.print-table td{border:1px solid #b8c8dd;padding:8px;text-align:left}.print-table th{background:#eaf3ff}.print-totals{margin-left:auto;max-width:280px;border:1px solid var(--line);border-radius:10px;padding:10px}.print-totals div{display:flex;justify-content:space-between;padding:4px 0}.thank{text-align:center;color:var(--muted);margin-top:24px}@media(max-width:1100px){.app-shell{grid-template-columns:1fr}.meta-panel,.shortcut-panel{position:static;min-height:auto}.meta-panel{display:grid;grid-template-columns:70px 1fr 1fr;gap:8px}.shortcut-panel{display:grid;grid-template-columns:repeat(4,1fr)}.kpi-grid{grid-template-columns:repeat(2,1fr)}.gateway{grid-template-columns:repeat(2,1fr)}}@media(max-width:700px){.topbar{height:auto;align-items:flex-start;flex-direction:column;gap:8px;padding:12px}.app-shell{padding:8px}.grid-form{grid-template-columns:1fr}.gateway{grid-template-columns:1fr}.kpi-grid{grid-template-columns:1fr}.meta-panel{display:block}.shortcut-panel{display:none}.nav-tabs{padding-bottom:4px}.invoice-title,.bill-box{grid-template-columns:1fr;display:block}.invoice-paper{padding:12px}.top-actions{flex-wrap:wrap}.totals-box{max-width:100%;margin-left:0}}@media print{body{background:#fff}.topbar,.meta-panel,.shortcut-panel,.nav-tabs,.card.action-row,h1{display:none!important}.app-shell{display:block;padding:0}.main-panel{width:100%}.invoice-paper{border:0;border-radius:0;box-shadow:none;max-width:100%;padding:0}.print-body{margin:0}.toast{display:none}.print-table th,.print-table td{font-size:12px}@page{size:A4;margin:12mm}body.print-body .invoice-paper{font-family:Arial,sans-serif}.thank{font-size:11px}}
@media print and (max-width:400px){@page{size:80mm auto;margin:4mm}.invoice-paper{font-size:11px}.invoice-title{display:block;border-bottom:1px dashed #000}.invoice-title h2{font-size:16px}.bill-box{display:block}.print-table th:nth-child(1),.print-table td:nth-child(1),.print-table th:nth-child(5),.print-table td:nth-child(5),.print-table th:nth-child(6),.print-table td:nth-child(6){display:none}.print-table th,.print-table td{padding:3px;font-size:10px}.print-totals{max-width:100%;border:0;padding:0}.thank{font-size:10px}}

/* Updates requested: live shortcuts, back button, improved login, delete confirmations, print sizes */
.app-guest .app-shell{display:block;max-width:1180px;margin:0 auto;padding:28px 18px}.app-guest .main-panel h1{display:none}.login-page{min-height:calc(100vh - 56px);display:grid;grid-template-columns:420px minmax(0,1fr);gap:28px;align-items:center}.login-page .login-card{margin:0;max-width:none;padding:34px;border-radius:22px}.login-subtitle{color:var(--muted);margin:0 0 22px;line-height:1.5}.login-art{background:linear-gradient(135deg,#073763,#0f5fa8);border-radius:28px;min-height:520px;color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:24px;padding:40px;box-shadow:0 24px 70px rgba(15,47,91,.22);overflow:hidden;position:relative}.login-art:before{content:"";position:absolute;inset:-80px -80px auto auto;width:260px;height:260px;border-radius:50%;background:rgba(255,255,255,.12)}.login-art img{width:min(520px,92%);position:relative;z-index:1;filter:drop-shadow(0 18px 24px rgba(0,0,0,.25))}.login-art div{position:relative;z-index:1;text-align:center}.login-art b{display:block;font-size:28px;margin-bottom:8px}.login-art span{display:block;color:#d9ebff}.back-btn{border:1px solid var(--line);background:#fff;color:var(--navy);border-radius:999px;padding:8px 12px;font-weight:800;cursor:pointer;margin-bottom:8px;box-shadow:var(--shadow)}.back-btn:hover{background:var(--sky)}.inline-form{display:inline-flex;vertical-align:middle;margin:0 2px}.danger-btn{border-color:#f4b6b0!important;background:#fff5f4!important;color:var(--danger)!important}.danger-btn:hover{background:#fee4e2!important}.info-card{background:#eef6ff;color:#294263;border-color:#b8d8ff}.shortcut-panel a.active-key{background:#cfe5ff;border-color:#7fb6f0;box-shadow:0 0 0 3px rgba(15,95,168,.12)}.invoice-paper.cancelled{opacity:.88}.print-body.print-thermal{background:#fff}.print-body.print-thermal .invoice-paper{max-width:80mm;border:0;border-radius:0;padding:0;font-size:11px}.print-body.print-thermal .invoice-title{display:block;border-bottom:1px dashed #000;margin-bottom:8px;padding-bottom:8px}.print-body.print-thermal .invoice-title h2{font-size:16px;margin:0 0 5px}.print-body.print-thermal .bill-box{display:block}.print-body.print-thermal .bill-box>div{border:0;border-bottom:1px dashed #ccc;border-radius:0;padding:6px 0}.print-body.print-thermal .print-table th:nth-child(1),.print-body.print-thermal .print-table td:nth-child(1),.print-body.print-thermal .print-table th:nth-child(5),.print-body.print-thermal .print-table td:nth-child(5),.print-body.print-thermal .print-table th:nth-child(6),.print-body.print-thermal .print-table td:nth-child(6){display:none}.print-body.print-thermal .print-table th,.print-body.print-thermal .print-table td{padding:3px;font-size:10px}.print-body.print-thermal .print-totals{max-width:100%;border-top:1px dashed #000;border-left:0;border-right:0;border-bottom:0;border-radius:0;padding:6px 0}.print-body.print-thermal .thank{font-size:10px;margin-top:10px}@media(max-width:900px){.login-page{grid-template-columns:1fr}.login-art{min-height:320px;padding:28px}.login-art img{width:min(400px,90%)}}@media(max-width:700px){.app-guest .app-shell{padding:14px 10px}.login-page .login-card{padding:24px}.login-art{display:none}.inline-form{display:inline-flex}.back-btn{margin-top:4px}}

/* Ledger and company selection refinements */
.top-company{display:inline-block;margin-left:12px;color:#d9ebff;font-size:13px;font-weight:600}.summary-grid{display:grid;grid-template-columns:repeat(4,minmax(160px,1fr));gap:12px;margin-bottom:14px}.summary-card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px;box-shadow:var(--shadow)}.summary-card span{display:block;color:var(--muted);font-weight:700;margin-bottom:6px}.summary-card b{display:block;color:var(--navy);font-size:18px;line-height:1.25}.no-print{print-color-adjust:exact}.filter-form label{margin:0;min-width:180px}.filter-form label span{display:none}.meta-panel .btn{margin-top:8px}.data-table a{color:var(--blue);font-weight:700;text-decoration:none}@media(max-width:900px){.summary-grid{grid-template-columns:repeat(2,1fr)}.top-company{display:block;margin-left:0;margin-top:3px}}@media(max-width:600px){.summary-grid{grid-template-columns:1fr}.top-company{font-size:12px}}@media print{.no-print,.back-btn,.filter-form,.top-actions,.topbar,.shortcut-panel,.meta-panel,.nav-tabs{display:none!important}.summary-grid{grid-template-columns:repeat(4,1fr)}.summary-card{box-shadow:none}.card,.summary-card{border-color:#bbb}}
.gateway-home{grid-template-columns:minmax(260px,1fr) minmax(320px,1.25fr);align-items:stretch}.gateway-home section{border-radius:8px}.gateway-company{background:linear-gradient(180deg,#fff,var(--sky));display:flex;flex-direction:column;justify-content:center}.gateway-company p{margin:6px 0;color:var(--muted);font-size:15px}.gateway-company b{color:var(--navy);font-size:18px}.gateway-menu a,.module-gateway a{font-weight:800;color:var(--navy);border-bottom:1px solid #ecf1f7;border-radius:6px}.gateway-menu a:last-child,.module-gateway a:last-child{border-bottom:0}.gateway-menu a:hover,.module-gateway a:hover{color:var(--blue)}.module-gateway{grid-template-columns:minmax(280px,520px);justify-content:center}.module-gateway section{border-radius:8px}@media(max-width:700px){.gateway-home{grid-template-columns:1fr}.module-gateway{grid-template-columns:1fr}}
.app-auth .app-shell{grid-template-columns:220px minmax(0,1fr)}.page-dashboard .app-shell{display:block;max-width:1200px;min-height:calc(100vh - 54px);padding:0 10px 14px}.page-dashboard .main-panel{min-height:calc(100vh - 68px)}.tally-gateway{display:grid;grid-template-columns:minmax(0,1fr) 330px;min-height:calc(100vh - 76px);border:1px solid var(--line);background:#fff}.tally-company{padding:22px 28px;background:linear-gradient(180deg,#fff,var(--bg));border-right:1px solid var(--navy)}.tally-period{display:grid;grid-template-columns:1fr 1fr;gap:18px;text-align:center;margin-bottom:28px}.tally-period span{display:block;color:var(--muted);font-weight:800;font-size:13px}.tally-period b{display:block;color:var(--navy);font-size:14px;margin-top:4px}.tally-company h3{text-align:center;color:var(--navy);font-size:15px;text-decoration:underline;margin:0 0 18px}.tally-company-row{display:grid;grid-template-columns:1fr 1fr;gap:16px;color:var(--muted);font-weight:800}.tally-company-value{margin-top:16px;color:var(--navy);font-size:15px}.tally-menu{align-self:start;margin:18px 18px 0 0;border:2px solid var(--navy);background:var(--sky);box-shadow:var(--shadow)}.tally-menu-title{background:var(--navy);color:#fff;text-align:center;font-weight:900;padding:8px 10px}.tally-menu-body{padding:16px 78px 22px}.tally-menu h4{margin:12px 0 4px;color:var(--navy);font-size:14px}.tally-menu a{display:block;color:var(--navy);text-decoration:none;font-weight:700;padding:3px 4px;border-radius:2px}.tally-menu a:hover,.tally-menu a:focus{background:var(--blue);color:#fff}.tally-menu a:first-of-type{background:rgba(15,95,168,.14);color:var(--danger)}@media(max-width:900px){.app-auth .app-shell{grid-template-columns:1fr}.tally-gateway{grid-template-columns:1fr}.tally-company{border-right:0;border-bottom:1px solid var(--navy)}.tally-menu{margin:14px}.tally-menu-body{padding:14px 24px}}@media(max-width:600px){.tally-period,.tally-company-row{grid-template-columns:1fr;text-align:left}.tally-company{padding:16px}.page-dashboard .app-shell{padding:0 8px 10px}}
.page-dashboard .app-shell{display:block;max-width:1280px;padding:14px}.page-dashboard .main-panel{min-height:auto}.clean-gateway{grid-template-columns:minmax(0,1fr) 360px;align-items:start;gap:14px}.clean-gateway section{border-radius:14px;box-shadow:var(--shadow);background:#fff;border:1px solid var(--line);padding:18px}.clean-gateway h2{margin-bottom:16px}.clean-gateway h3{margin:18px 0 12px;color:var(--navy);font-size:16px}.gateway-info-grid,.gateway-company-table{display:grid;grid-template-columns:1fr 1fr;gap:12px}.gateway-info-grid>div,.gateway-company-table>div{background:var(--sky);border:1px solid var(--line);border-radius:12px;padding:14px}.gateway-info-grid span,.gateway-company-table span{display:block;color:var(--muted);font-weight:800;margin-bottom:6px}.gateway-info-grid b,.gateway-company-table b{display:block;color:var(--navy);font-size:16px}.clean-gateway .gateway-menu h4{margin:14px 0 4px;color:var(--navy);font-size:14px}.clean-gateway .gateway-menu a{display:block;text-decoration:none;color:var(--blue);padding:9px 10px;border-radius:9px;border:1px solid transparent;font-weight:800}.clean-gateway .gateway-menu a:hover{background:var(--sky);border-color:var(--line);color:var(--navy)}@media(max-width:900px){.clean-gateway{grid-template-columns:1fr}.gateway-info-grid,.gateway-company-table{grid-template-columns:1fr}}@media(max-width:600px){.page-dashboard .app-shell{padding:8px}.clean-gateway section{padding:14px}}
.module-gateway{justify-content:start;grid-template-columns:minmax(280px,650px)}.module-gateway section{padding:18px}.module-gateway a,.gateway-menu a,.clean-gateway .gateway-menu a{font-weight:600}.module-gateway h2,.clean-gateway h2{font-weight:700}.company-detail-panel{background:var(--sky);border:1px solid var(--line);border-radius:12px;padding:16px}.company-detail-panel .gateway-info-grid,.company-detail-panel .gateway-company-table{gap:0}.company-detail-panel .gateway-info-grid>div,.company-detail-panel .gateway-company-table>div{background:transparent;border:0;border-radius:0;padding:8px 10px}.company-detail-panel .gateway-info-grid{border-bottom:1px solid var(--line);padding-bottom:8px;margin-bottom:14px}.company-detail-panel h3{text-align:center;text-decoration:underline;margin:8px 0 14px}.company-detail-panel span{font-weight:600}.company-detail-panel b{font-weight:700}.clean-gateway .gateway-menu h4{font-weight:700}.nav-link{font-weight:600}@media(max-width:900px){.module-gateway{grid-template-columns:1fr}.company-detail-panel .gateway-info-grid,.company-detail-panel .gateway-company-table{grid-template-columns:1fr}}
.access-note{background:var(--sky);border:1px solid var(--line);border-radius:12px;padding:14px;margin-top:10px;color:var(--muted)}.access-note h3{margin:0 0 6px;color:var(--navy);font-size:16px;font-weight:700}.access-note p{margin:0;line-height:1.45;font-weight:500}
/* Tally-inspired Account Info */
.account-info-card{padding:0;overflow:hidden}.account-info-card h2{padding:16px 18px;margin:0;border-bottom:1px solid var(--line)}.account-info-card .table-wrap{border:0;border-radius:0}.account-info-table{min-width:680px}.account-info-table th{background:var(--navy);color:#fff;padding:12px 14px}.account-info-table th:last-child,.account-info-table td:last-child{text-align:right}.account-info-table td{padding:12px 14px}.account-info-name,.account-info-amount{display:block;text-decoration:none;font-weight:800}.account-info-name{color:var(--navy)}.account-info-amount{color:var(--blue);font-variant-numeric:tabular-nums}.account-info-table tr:hover td{background:var(--sky)}.account-info-path{display:flex;align-items:center;gap:8px;margin:0 0 12px;color:var(--muted)}.account-info-path a{color:var(--blue);font-weight:800;text-decoration:none}.account-info-filter{display:grid;grid-template-columns:repeat(3,minmax(150px,1fr)) max-content max-content;align-items:end;gap:10px;width:100%}.account-info-filter label{width:100%;min-width:0;margin:0}.account-info-filter label span{display:block}.account-info-filter input,.account-info-filter select{width:100%;min-width:0}.account-info-filter>.btn{width:auto;min-width:82px;height:41px;margin:0;padding:9px 14px;white-space:nowrap}.account-info-add summary{cursor:pointer;color:var(--navy);font-weight:800;font-size:16px}.account-info-add[open] summary{margin-bottom:14px}.account-info-add .grid-form{margin-top:4px}@media(max-width:900px){.account-info-filter{grid-template-columns:repeat(2,minmax(0,1fr))}.account-info-filter>.btn{width:100%}}@media(max-width:600px){.account-info-filter{grid-template-columns:1fr}.account-info-filter label,.account-info-filter>.btn{width:100%}}

/* Account Info uses the full page width and has no company sidebar. */
.page-accounting_info .app-shell{grid-template-columns:minmax(0,1fr);max-width:1600px}
.page-report_pnl .app-shell,.page-report_balance_sheet .app-shell{grid-template-columns:minmax(0,1fr);max-width:1200px}
.two-column-table{min-width:680px}
.two-column-table th:nth-child(2),.two-column-table th:nth-child(4),.two-column-table td:nth-child(2),.two-column-table td:nth-child(4){text-align:right}
.two-column-table .total-row td{background:var(--sky);border-top:2px solid var(--navy)}
/* Account Info: show filter confirmation and scroll directly to filtered results */
.filter-applied-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 16px 0 10px;
    padding: 13px 16px;
    border: 1px solid #b8dfc6;
    border-left: 5px solid #168447;
    border-radius: 10px;
    background: #eefaf2;
    box-shadow: 0 6px 18px rgba(20, 94, 54, 0.08);
    scroll-margin-top: 92px;
    animation: accountInfoFilterFlash .55s ease-out;
}

.filter-applied-notice b {
    color: #116a39;
    white-space: nowrap;
}

.filter-applied-notice span {
    color: var(--text);
    text-align: right;
}

.account-info-filter-results {
    scroll-margin-top: 92px;
}

@keyframes accountInfoFilterFlash {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 600px) {
    .filter-applied-notice {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .filter-applied-notice span {
        text-align: left;
    }
}

/* =========================================================
   GLOBAL FULL-WIDTH LAYOUT
   ========================================================= */

.app-shell {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
}

.main-panel {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
    box-sizing: border-box;
}

.main-panel > .card,
.main-panel > .gateway,
.main-panel > .summary-grid,
.main-panel > .filter-form,
.main-panel > .action-row {
    width: 100%;
    max-width: none !important;
    box-sizing: border-box;
}

.two-column-account {
    width: 100% !important;
    max-width: none !important;
}

.two-column-table {
    width: 100% !important;
}


/* =========================================================
   STANDARD FILTER STYLE
   Accounting Info style throughout the software
   ========================================================= */

.standard-period-filter {
    display: grid !important;
    grid-template-columns:
        repeat(3, minmax(160px, 1fr))
        auto
        auto !important;
    gap: 14px !important;
    align-items: end !important;
    width: 100% !important;
    box-sizing: border-box;
}

.standard-period-filter label {
    min-width: 0;
}

.standard-period-filter label span {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
}

.standard-period-filter input,
.standard-period-filter select {
    width: 100%;
    box-sizing: border-box;
}


/* Ledger filters contain one additional View field */

.ledger-period-filter {
    grid-template-columns:
        repeat(4, minmax(150px, 1fr))
        auto
        auto !important;
}


/* =========================================================
   RESPONSIVE FILTERS
   ========================================================= */

@media (max-width: 900px) {
    .standard-period-filter,
    .ledger-period-filter {
        grid-template-columns: 1fr 1fr !important;
    }
}

@media (max-width: 560px) {
    .main-panel {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    .standard-period-filter,
    .ledger-period-filter {
        grid-template-columns: 1fr !important;
    }
}

/* =========================================================
   ACCOUNTING VOUCHERS / BANKS / REGISTERS — CLIENT UPDATE
   ========================================================= */

.page-accounting_vouchers .voucher-creation-buttons {
    display: grid;
    grid-template-columns: repeat(7, minmax(140px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.page-accounting_vouchers .voucher-creation-buttons .btn {
    min-height: 54px;
    padding: 12px 14px;
    border-radius: 12px;
    text-align: center;
    line-height: 1.25;
    box-shadow: 0 5px 16px rgba(15, 47, 91, 0.07);
}

.page-accounting_vouchers .voucher-creation-buttons .btn.primary {
    background: linear-gradient(135deg, var(--navy), var(--blue));
}

.page-accounting_vouchers .voucher-creation-buttons .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 9px 22px rgba(15, 47, 91, 0.12);
}

.page-accounting_vouchers .summary-grid {
    grid-template-columns: repeat(6, minmax(150px, 1fr));
}

.page-accounting_vouchers .summary-card {
    position: relative;
    overflow: hidden;
    min-height: 92px;
}

.page-accounting_vouchers .summary-card::after {
    content: "";
    position: absolute;
    right: -22px;
    bottom: -28px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(15, 95, 168, 0.07);
}

.page-accounting_vouchers .summary-card b {
    font-variant-numeric: tabular-nums;
}

.page-accounting_vouchers .account-info-filter-results .table-wrap {
    max-height: 68vh;
}

.page-accounting_vouchers .account-info-filter-results .data-table {
    min-width: 1320px;
}

.page-accounting_vouchers .account-info-filter-results .data-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    box-shadow: inset 0 -1px 0 var(--line);
}

.page-accounting_vouchers .account-info-filter-results .data-table td:nth-child(6),
.page-accounting_vouchers .account-info-filter-results .data-table td:nth-child(7),
.page-accounting_vouchers .account-info-filter-results .data-table td:nth-child(8) {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.page-accounting_vouchers .account-info-filter-results .data-table th:nth-child(6),
.page-accounting_vouchers .account-info-filter-results .data-table th:nth-child(7),
.page-accounting_vouchers .account-info-filter-results .data-table th:nth-child(8) {
    text-align: right;
}

.page-accounting_vouchers .account-info-filter-results .data-table td:last-child {
    min-width: 190px;
    white-space: nowrap;
}

.voucher-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--sky);
}

.voucher-search {
    width: min(440px, 100%);
    background: #fff;
}

.voucher-result-count {
    color: var(--muted);
    font-weight: 700;
    white-space: nowrap;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    padding: 5px 9px;
    border-radius: 999px;
    border: 1px solid;
    font-size: 12px;
    font-weight: 800;
    text-transform: capitalize;
}

.status-posted,
.status-active {
    color: var(--success);
    background: #ecfdf3;
    border-color: #a6f4c5;
}

.status-cancelled,
.status-inactive {
    color: var(--danger);
    background: #fef3f2;
    border-color: #fecdca;
}

#invoicePartyBalance,
#paymentPartyBalance {
    margin: 12px 0;
    min-height: 48px;
    display: flex;
    align-items: center;
    font-weight: 800;
    color: var(--navy);
}

#invoicePartyBalance.balance-ready,
#paymentPartyBalance.balance-ready {
    border-left: 5px solid var(--blue);
}

.invoice-form select[name="account_id"],
form select[name="from_account_id"],
form select[name="to_account_id"] {
    border-width: 2px;
    background: #fbfdff;
}

.bank-transfer-preview {
    grid-column: 1 / -1;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--sky);
    color: var(--navy);
    font-weight: 700;
}

.bank-transfer-preview.is-error {
    color: var(--danger);
    background: #fef3f2;
    border-color: #fecdca;
}

.page-accounting_info .summary-grid {
    align-items: stretch;
}

.page-accounting_info .summary-card b {
    font-variant-numeric: tabular-nums;
}

.page-accounting_info .account-info-table td:last-child,
.page-accounting_info .data-table td:nth-last-child(2) {
    font-variant-numeric: tabular-nums;
}

.page-reports .account-info-filter-results + .card {
    overflow: hidden;
}

.register-chart {
    display: grid;
    gap: 10px;
}

.register-chart-row {
    display: grid;
    grid-template-columns: minmax(110px, 180px) minmax(180px, 1fr) 120px;
    gap: 12px;
    align-items: center;
}

.register-chart-label {
    color: var(--navy);
    font-weight: 700;
}

.register-chart-track {
    height: 24px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #eef2f7;
}

.register-chart-bar {
    height: 100%;
    min-width: 2px;
    border-radius: 5px;
    background: linear-gradient(90deg, #9f1d20, #d33);
    transition: width .35s ease;
}

.register-chart-value {
    text-align: right;
    color: var(--navy);
    font-variant-numeric: tabular-nums;
}

@media (max-width: 1280px) {
    .page-accounting_vouchers .voucher-creation-buttons {
        grid-template-columns: repeat(4, minmax(150px, 1fr));
    }

    .page-accounting_vouchers .summary-grid {
        grid-template-columns: repeat(3, minmax(150px, 1fr));
    }
}

@media (max-width: 760px) {
    .page-accounting_vouchers .voucher-creation-buttons {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .page-accounting_vouchers .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .voucher-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .voucher-search {
        width: 100%;
    }

    .voucher-result-count {
        white-space: normal;
    }

    .register-chart-row {
        grid-template-columns: 1fr;
        gap: 5px;
        padding-bottom: 10px;
        border-bottom: 1px solid var(--line);
    }

    .register-chart-value {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .page-accounting_vouchers .voucher-creation-buttons,
    .page-accounting_vouchers .summary-grid {
        grid-template-columns: 1fr;
    }
}

@media print {
    .voucher-toolbar,
    .voucher-creation-buttons {
        display: none !important;
    }

    .page-accounting_vouchers .account-info-filter-results .table-wrap {
        max-height: none;
    }
}

/* =========================================================
   TALLY-STYLE PURCHASE REGISTER
   LIGHT BLUE THEME VERSION
   ========================================================= */

.page-report_purchase .main-panel {
    max-width: 1500px !important;
    margin: 0 auto !important;
}

.tally-register-summary {
    grid-template-columns: repeat(4, minmax(170px, 1fr));
}

.tally-register-card {
    padding: 0;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #fff;
}

.tally-register-heading {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(300px, .65fr);
    border-bottom: 2px solid var(--line);
    background: var(--sky);
}

.tally-register-heading > div {
    min-height: 92px;
    padding: 15px 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tally-register-heading > div + div {
    border-left: 1px solid var(--line);
    text-align: center;
}

.tally-register-heading b {
    color: var(--navy);
    font-size: 18px;
}

.tally-register-heading span {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-weight: 700;
}

.tally-register-wrap {
    border: 0;
    border-radius: 0;
}

.tally-register-table {
    min-width: 760px;
    border-collapse: collapse;
    background: #fff;
}

.tally-register-table th,
.tally-register-table td {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid #dbe6f3;
    padding: 10px 14px;
}

.tally-register-table th:last-child,
.tally-register-table td:last-child {
    border-right: 0;
}

.tally-register-table thead th {
    background: #eaf3ff;
    color: var(--navy);
    text-align: center;
    font-weight: 900;
    vertical-align: middle;
}

.tally-register-table thead th:first-child {
    text-align: left;
}

.tally-register-table .transactions-heading {
    border-bottom: 1px solid var(--line);
}

.tally-register-table tbody tr:nth-child(even):not(.tally-grand-total) td {
    background: #f8fbff;
}

.tally-register-table tbody tr:hover:not(.tally-grand-total) td {
    background: #eef6ff;
}

.tally-register-table .money-cell {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.tally-register-table .tally-grand-total td {
    background: #eaf3ff;
    border-top: 2px solid var(--blue);
    border-bottom: 2px solid var(--blue);
    color: var(--navy);
    font-weight: 900;
}

.tally-particular {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.tally-particular small {
    color: var(--muted);
    font-weight: 600;
}

.tally-period-link {
    color: var(--navy) !important;
    font-weight: 900 !important;
    text-decoration: none;
}

.tally-period-link:hover {
    color: var(--blue) !important;
    text-decoration: underline;
}

.tally-register-chart-card {
    overflow: hidden;
    background: #fff;
}

.tally-chart-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.tally-chart-title h2 {
    margin: 0;
    color: var(--navy);
}

.tally-chart-title span {
    color: var(--muted);
    font-weight: 700;
}

.tally-register-chart {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    min-height: 310px;
}

.tally-chart-axis {
    height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    padding: 4px 10px 30px 0;
    border-right: 2px solid var(--line);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.tally-chart-scroll {
    overflow-x: auto;
    padding-bottom: 4px;
}

.tally-chart-bars {
    min-width: 100%;
    width: max-content;
    height: 260px;
    display: flex;
    align-items: stretch;
    gap: 14px;
    padding: 8px 18px 0;
    border-bottom: 2px solid var(--line);
    background:
        linear-gradient(to bottom,
            transparent 0,
            transparent calc(50% - .5px),
            #d7e4f5 calc(50% - .5px),
            #d7e4f5 calc(50% + .5px),
            transparent calc(50% + .5px),
            transparent 100%);
}

.tally-chart-item {
    width: 72px;
    min-width: 72px;
    height: 100%;
    display: grid;
    grid-template-rows: 24px minmax(0, 1fr) 28px;
    align-items: end;
    justify-items: center;
}

.tally-chart-value {
    width: 100%;
    overflow: hidden;
    color: var(--navy);
    font-size: 10px;
    font-weight: 800;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tally-chart-bar {
    width: 46px;
    height: var(--bar-height);
    max-height: 100%;
    min-height: 0;
    align-self: end;
    border: 2px solid #8b1010;
    border-bottom: 0;
    background: linear-gradient(180deg, #ef4444, #b91c1c);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.2);
}

.tally-chart-label {
    align-self: center;
    color: var(--navy);
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

#purchase-detail {
    scroll-margin-top: 82px;
}

#purchase-detail .data-table td:nth-child(5),
#purchase-detail .data-table td:nth-child(6),
#purchase-detail .data-table td:nth-child(7),
#purchase-detail .data-table th:nth-child(5),
#purchase-detail .data-table th:nth-child(6),
#purchase-detail .data-table th:nth-child(7) {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 850px) {
    .tally-register-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tally-register-heading {
        grid-template-columns: 1fr;
    }

    .tally-register-heading > div + div {
        border-left: 0;
        border-top: 1px solid var(--line);
        text-align: left;
    }

    .tally-register-chart {
        grid-template-columns: 68px minmax(0, 1fr);
    }

    .tally-chart-axis {
        padding-right: 6px;
        font-size: 10px;
    }
}

@media (max-width: 520px) {
    .tally-register-summary {
        grid-template-columns: 1fr;
    }

    .tally-register-heading > div {
        min-height: auto;
        padding: 12px;
    }
}

@media print {
    .page-report_purchase .main-panel {
        padding: 0 !important;
    }

    .tally-register-card,
    .tally-register-chart-card {
        break-inside: avoid;
        box-shadow: none;
    }

    #purchase-detail {
        break-before: page;
    }

    .tally-chart-scroll {
        overflow: visible;
    }

    .tally-chart-bars {
        width: 100%;
    }
}