:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#17243e;background:#f5f7fc;font-synthesis:none;--ink:#17243e;--muted:#758198;--purple:#6757e9;--line:#e7ebf4;--mint:#17b89a;--sidebar:#111c33;--shadow:0 14px 40px rgba(38,50,89,.045)}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;min-height:100vh;font-size:14px}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.45;cursor:not-allowed}h1,h2,h3,p{margin-top:0}h1{font-size:29px;letter-spacing:-.9px;margin:4px 0 0}h2{font-size:16px;letter-spacing:-.25px}h3{font-size:14px;margin:22px 0 14px}.muted,.subtle{color:var(--muted)}.subtle{font-size:12px}.hint{color:#8490a4;font-size:12px;line-height:1.75}.shell{min-height:100vh;display:flex}.sidebar{position:fixed;inset:0 auto 0 0;width:252px;background:var(--sidebar);display:flex;flex-direction:column;color:#97a5be;z-index:30;padding:27px 18px}.brand{display:flex;gap:11px;align-items:center;font-weight:800;letter-spacing:-.65px;color:white;font-size:20px;margin:0 6px 52px}.brand-icon{background:linear-gradient(140deg,#927dfa,#5544c9);height:35px;width:35px;display:grid;place-items:center;color:white;border-radius:11px;font-size:20px;box-shadow:0 6px 18px #6252e554}.nav-group{margin:0 17px 13px;letter-spacing:2px;font-weight:700;font-size:10px;color:#5b6986}.sidebar nav{display:flex;flex-direction:column;gap:5px;overflow:auto;scrollbar-width:thin}.nav{display:flex;align-items:center;gap:14px;border-radius:10px;padding:11px 14px;white-space:nowrap;font-weight:550;transition:all .12s}.nav:hover{color:#fff;background:#253450}.nav.active{color:white;background:#6956e6;box-shadow:0 6px 14px rgba(91,71,202,.22)}.ico{font-size:18px;width:20px;text-align:center}.sidebar-foot{margin-top:auto;border-top:1px solid #2b3752;padding:22px 12px 6px;font-size:12px;display:flex;gap:10px;align-items:center}.online{background:#40d2aa;border-radius:50%;height:7px;width:7px;box-shadow:0 0 0 4px #40d2aa1e}.workspace{margin-left:252px;min-width:0;flex:1}.topbar{height:77px;background:white;border-bottom:1px solid #edf0f7;padding:0 40px;display:flex;align-items:center;justify-content:space-between;gap:12px}.breadcrumb{font-size:12px;color:#8c97aa;font-weight:600}.breadcrumb span{color:#c3cbd8;padding:0 9px}.profile{display:flex;align-items:center;gap:10px}.profile-text{display:grid;gap:2px}.profile-text strong{font-size:12px}.profile-text small{color:var(--muted);font-size:11px}.avatar{background:#f0edff;color:#6655d6;border-radius:11px;width:36px;height:36px;display:grid;place-items:center;font-weight:800}.logout{border:0;background:#f3f5fa;color:#5a6580;padding:10px 12px;border-radius:9px;margin-left:12px;font-size:12px;font-weight:700}.logout:hover{background:#ebeefa}.content{max-width:1600px;margin:0 auto;padding:35px 40px 55px}.page-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:30px}.eyebrow{font-size:10px;font-weight:800;letter-spacing:2px;color:#8172db}.today{color:#8792a5;font-size:12px}.kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:17px;margin-bottom:23px}.kpi{background:#fff;border:1px solid #eef0f8;padding:23px;min-width:0;border-radius:15px;box-shadow:var(--shadow)}.kpi-top{display:flex;justify-content:space-between;align-items:center;color:#758298;font-size:12px;font-weight:650;margin-bottom:17px}.kpi-icon{height:32px;width:32px;border-radius:10px;background:#f1efff;color:#6656df;display:grid;place-items:center;font-size:17px}.kpi strong{font-size:24px;letter-spacing:-.9px;display:block;overflow-wrap:anywhere}.kpi small{color:#9aa5b7;font-size:11px;display:block;margin-top:9px}.panel{background:#fff;border:1px solid #edf0f7;border-radius:15px;padding:24px;margin-bottom:20px;box-shadow:var(--shadow);min-width:0}.panel-heading{display:flex;gap:12px;align-items:center;justify-content:space-between;margin-bottom:20px}.panel-heading h2{margin-bottom:0}.charts{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-bottom:4px}.chart-panel{padding:25px 25px 18px}.legend{font-size:11px;color:#7c879c;display:flex;gap:12px;flex-wrap:wrap}.legend span{display:flex;align-items:center;gap:6px}.dot{height:8px;width:8px;border-radius:50%;display:inline-block}.mint{background:#28c3ac}.purple{background:#978df6}.chart{width:100%;max-height:250px;overflow:visible}.bar-income{fill:#23c6a6}.bar-expense{fill:#9990f5}.axis{stroke:#dfe4ee}.chart-label{font-size:12px;fill:#8792a7}.toolbar{display:flex;gap:8px;justify-content:flex-end;margin-bottom:15px}.btn{padding:10px 15px;border-radius:9px;display:inline-flex;align-items:center;justify-content:center;gap:7px;border:1px solid transparent;font-size:12px;font-weight:750;transition:all .15s;line-height:1.3;text-align:center}.btn:hover{transform:translateY(-1px);filter:brightness(.97)}.btn.primary{background:#6756e8;color:white;box-shadow:0 5px 12px #6756e821}.btn.secondary{background:#f2f3fb;color:#6757b8;border-color:#e8e5fd}.btn.tiny{padding:7px 9px;border:1px solid #e4e7f3;background:white;color:#6659a7;font-size:11px;margin:1px 2px}.btn.danger{color:#e04c5e;border-color:#ffe0e5;background:#fff4f5}.btn.danger.solid{background:#dc4a5b;color:white;border-color:#dc4a5b}.btn.wide{width:100%;margin-top:10px;padding:14px}.table-scroll{overflow-x:auto;max-width:100%}table{border-collapse:collapse;width:100%;font-size:12px;min-width:650px}th{text-align:left;color:#8994a9;font-size:10px;text-transform:uppercase;letter-spacing:.9px;font-weight:750;background:#f8f9fd;padding:14px 12px;white-space:nowrap}th:first-child{border-radius:8px 0 0 8px}th:last-child{border-radius:0 8px 8px 0}td{padding:16px 12px;line-height:1.5;border-bottom:1px solid #f0f2f7;color:#5b6880}td strong{color:#25314c}tr:last-child td{border-bottom:0}.num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}.actions{white-space:nowrap}.empty{text-align:center;padding:40px;color:#9aa5b7}.status{display:inline-block;border-radius:20px;color:#0e9d7f;background:#e2f8f2;padding:5px 9px;font-size:10px;font-weight:800;text-transform:capitalize}.type-chip{font-size:11px;border-radius:6px;padding:4px 7px;background:#f3f4fc;color:#6c669e}.opening td,.closing td{background:#f8f9ff;font-weight:800}.form-panel{max-width:920px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:19px}.field{display:flex;flex-direction:column;gap:8px;margin-bottom:18px;color:#58657d;font-size:12px;font-weight:700}.field input,.field select,.field textarea,.filters input,.filters select{width:100%;border:1px solid #dfe4ef;border-radius:9px;background:#fff;outline:0;padding:12px;color:#25304a;max-width:100%;transition:border-color .15s,box-shadow .15s}.field input:focus,.field select:focus,.field textarea:focus,.filters input:focus,.filters select:focus{border-color:#7d6bee;box-shadow:0 0 0 3px #7d6bee20}.field textarea{resize:vertical}.form-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:22px}.filters{display:flex;flex-wrap:wrap;gap:12px;align-items:end;margin-bottom:16px}.filters label{color:#637088;font-size:12px;font-weight:650;display:grid;gap:7px;min-width:145px}.filters .btn{min-height:42px}.report-link{display:flex;gap:10px;align-items:center;justify-content:space-between;border-bottom:1px solid #f0f2f8;padding:15px 3px;color:#485777}.report-link:hover{color:#6757e9}.report-link strong{text-align:right}.quick-links{display:flex;flex-wrap:wrap;gap:10px}.quick-links a{background:white;border:1px solid #e5e7f2;border-radius:9px;padding:13px 17px;color:#6e5cde;font-weight:700;font-size:12px}.cards-two{display:grid;grid-template-columns:1fr 1fr;gap:20px}.cards-two .panel{min-width:0}.feature-icon{height:45px;width:45px;display:grid;place-items:center;border-radius:14px;background:#f1eeff;color:#6756e8;font-size:24px;margin-bottom:22px}.notice{background:#f5f5fd;border:1px solid #eae9fa;color:#69728c;border-radius:10px;padding:16px;line-height:1.7;font-size:12px;margin-top:15px}.notice code{background:#e8e7fa;padding:2px 5px;border-radius:3px}.check{display:flex;gap:9px;align-items:center;margin:16px 0;font-size:12px;color:#647087}.check input{accent-color:#6756e8}.endpoint{display:block;background:#f4f5fb;border-radius:9px;padding:15px;font-size:12px;overflow-wrap:anywhere}.secret{border:1px dashed #7066e0;background:#f7f6ff;padding:15px;border-radius:10px;margin:16px 0;overflow-wrap:anywhere}.ai-output{line-height:1.9;color:#34415b;white-space:normal}.alert{background:#e8f8f2;border:1px solid #c4eedf;color:#12816c;border-radius:9px;padding:12px 16px;font-weight:650;font-size:12px;margin-bottom:20px}.alert.error{background:#fff0f1;color:#b84758;border-color:#fcd7da}.auth-shell{min-height:100vh;display:grid;place-items:center;padding:25px;background:radial-gradient(circle at 9% 14%,#e6e2ff,transparent 35%),radial-gradient(circle at 90% 91%,#eafcf7,transparent 34%),#f5f6fc}.auth-card{background:#fff;border:1px solid #ebedf8;border-radius:19px;box-shadow:0 30px 100px #2b375122;padding:43px;width:100%;max-width:450px}.auth-card .brand{color:#24314d;margin:0 0 36px;font-size:23px}.auth-card h1{font-size:26px;margin-bottom:9px}.auth-card .muted{margin-bottom:29px;line-height:1.65}.auth-card .form-panel{max-width:none}.install-card{max-width:760px}.requirements{display:grid;grid-template-columns:repeat(2,1fr);gap:8px 20px}.requirements div{display:flex;justify-content:space-between;padding:10px;background:#f9faff;border-radius:8px}.green{color:#0ba68b}.red{color:#e55366}hr{height:1px;border:0;background:#eceff6;margin:25px 0}.menu-toggle{display:none;border:0;background:#f0eeff;color:#5c4cdc;border-radius:9px;height:36px;width:38px;font-size:19px}.delete-panel{max-width:700px}.delete-panel p{color:#738098;line-height:1.7}@media(max-width:1200px){.kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.charts,.cards-two{grid-template-columns:1fr}}@media(max-width:900px){.sidebar{transform:translateX(-100%);transition:transform .25s;box-shadow:15px 0 30px #121c3420}.sidebar.open{transform:translateX(0)}.workspace{margin-left:0}.menu-toggle{display:block}.topbar{padding:0 23px}.content{padding:29px 23px}.breadcrumb{margin-right:auto}.page-title h1{font-size:24px}}@media(max-width:560px){.content{padding:23px 13px}.topbar{padding:0 13px;height:68px}.breadcrumb,.profile-text{display:none}.page-title{margin-bottom:23px}.today{font-size:10px}.kpis{gap:10px}.kpi{padding:16px;border-radius:12px}.kpi strong{font-size:19px}.kpi-top{font-size:10px;gap:6px}.kpi-icon{height:26px;width:26px}.kpi small{font-size:10px}.panel{padding:15px;border-radius:12px}.panel-heading{align-items:flex-start}.form-grid,.requirements{grid-template-columns:1fr;gap:0}.filters{align-items:stretch}.filters label{min-width:100%;width:100%}.filters .btn{width:100%}.auth-card{padding:27px 20px}.auth-shell{padding:12px}.report-link{flex-direction:column;align-items:start}.report-link strong{text-align:left}.logout{margin-left:1px}.chart-label{font-size:12px}}

.table-link strong{color:#6b58df}.table-link:hover strong{text-decoration:underline}.edit-card{max-width:970px}
.pagination{padding-top:18px;display:flex;justify-content:space-between;align-items:center;gap:15px;font-size:12px;color:#8893a5}.pagination>div{display:flex;gap:8px}

/* LedgerFlow 2.0 — responsive private workspace */
:root{--purple:#5746cf;--sidebar:#121c32;--mint:#0aa58d;--ink:#202b46;--muted:#71819d;--line:#e5eaf4;--shadow:0 12px 32px rgba(37,54,91,.055)}
body{background:#f5f7fb;color:var(--ink);line-height:1.55}
.sidebar{background:linear-gradient(165deg,#14223b,#17223a 72%,#202341);box-shadow:5px 0 25px rgba(10,25,59,.035)}
.brand{letter-spacing:-.55px}.brand-icon{background:linear-gradient(145deg,#8d7efc,#554bd4)}
.nav{font-size:13px;min-height:42px}.nav.active{background:linear-gradient(92deg,#6857e8,#5c52d4)}
.content{max-width:1630px}.page-title h1{font-size:clamp(22px,2.3vw,31px);line-height:1.25}
.kpi{border-radius:17px;border:1px solid #e8edf6;box-shadow:0 9px 28px rgba(32,45,75,.035)}
.kpi:nth-child(1) .kpi-icon{background:#e6f9f3;color:#009c7f}
.kpi:nth-child(2) .kpi-icon{background:#ecedff;color:#5848d0}
.kpi:nth-child(3) .kpi-icon{background:#eaf3ff;color:#3380c7}
.kpi:nth-child(4) .kpi-icon{background:#fff5e4;color:#b27619}
.kpi strong{font-variant-numeric:tabular-nums}
.panel{border-radius:17px;border:1px solid #e8edf6}
.chart{max-height:250px}.navy{background:#243f68}.profit-line{stroke:#243f68;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}.profit-point{fill:#243f68;stroke:#fff;stroke-width:1}
.sidebar-scrim{display:none}.toolbar{flex-wrap:wrap}
.btn{min-height:38px}.btn:focus-visible,.nav:focus-visible,.menu-toggle:focus-visible,.logout:focus-visible{outline:3px solid #968aff;outline-offset:2px}
.btn.primary{background:#5949d5}.status{background:#e9f9f2;color:#137d64}
.filters label{flex:1 1 160px}.filters input,.filters select{min-height:42px}
.table-scroll{scrollbar-width:thin}.table-scroll table{table-layout:auto}.table-scroll td{overflow-wrap:anywhere}
.report-link:last-child{border-bottom:0}
@media(max-width:900px){
 body.nav-open{overflow:hidden}.sidebar-scrim{display:block;position:fixed;inset:0;background:rgba(9,17,34,.58);opacity:0;visibility:hidden;z-index:28;transition:opacity .2s,visibility .2s}
 body.nav-open .sidebar-scrim{opacity:1;visibility:visible}
 .sidebar{z-index:29;width:min(88vw,290px);box-shadow:13px 0 50px rgba(0,0,0,.23)}
 .topbar{position:sticky;top:0;z-index:22;box-shadow:0 5px 17px #19274a09}
}
@media(max-width:650px){
 body{font-size:13px}.content{padding:18px 12px 56px}.topbar{padding:0 12px;height:64px}
 .page-title{align-items:flex-start;gap:12px}.page-title h1{font-size:24px}.today{display:none}
 .panel{padding:17px 14px;margin-bottom:15px}.panel-heading{flex-wrap:wrap;align-items:center}
 .panel-heading .btn{flex:0 0 auto}.kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-bottom:15px}
 .kpi{padding:13px;min-height:115px}.kpi strong{font-size:clamp(16px,4.2vw,20px)}.kpi small{font-size:10px}
 .cards-two{gap:0}.form-actions{flex-direction:column}.form-actions .btn{width:100%}
 .filters label{flex:1 1 100%;width:100%;min-width:0}.filters .btn{width:100%}
 .table-scroll{overflow:visible}.table-scroll table{min-width:0;width:100%;border-collapse:separate;border-spacing:0}
 .table-scroll thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
 .table-scroll tbody{display:grid;gap:11px}.table-scroll tbody tr{display:block;border:1px solid #e9ecf4;border-radius:12px;padding:7px 11px;background:#fff}
 .table-scroll tbody td{display:flex;justify-content:space-between;align-items:flex-start;text-align:right;padding:10px 3px;font-size:12px;min-height:35px;border-bottom:1px solid #f0f2f8;gap:12px;white-space:normal}
 .table-scroll tbody td::before{content:attr(data-label);font-weight:750;flex:0 0 37%;text-align:left;color:#8794aa;text-transform:uppercase;letter-spacing:.03em;font-size:10px}
 .table-scroll tbody tr td:last-child{border-bottom:0}.table-scroll tbody .actions{display:flex;justify-content:flex-end;flex-wrap:wrap}
 .table-scroll tbody .actions .btn{margin:1px}.table-scroll tbody .num{text-align:right;white-space:normal}
 .table-scroll tbody tr.table-summary-row{background:#f3f4fe}.table-scroll tbody tr.table-summary-row td{display:flex;justify-content:space-between;width:100%;font-weight:800}.table-scroll tbody tr.table-summary-row td::before{content:none}
 .chart-panel{overflow:hidden;padding:14px}.chart-panel h2{font-size:13px}.chart-label{font-size:13px}
 .pagination{flex-direction:column;align-items:flex-start}.pagination .btn{padding:10px}
 .secret,.endpoint{word-break:break-all}.auth-card{max-width:100%;padding:22px 17px}.auth-card .brand{margin-bottom:24px}
}
@media(max-width:360px){.kpis{grid-template-columns:1fr}.kpi{min-height:auto}.profile{gap:5px}.logout{padding:8px}.avatar{width:30px;height:30px}.panel{padding:13px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*:before,*:after{transition:none!important;animation:none!important}}

/* Mobile app navigation and focus states — LedgerFlow v3 */
.mobile-tabs{display:none}
.status.warning{background:#fff2df;color:#9a560c}
.report-actions{margin:0 0 12px}
@media(max-width:650px){
 .content{padding-bottom:calc(105px + env(safe-area-inset-bottom))}
 .mobile-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));position:fixed;bottom:0;left:0;right:0;z-index:24;background:rgba(255,255,255,.97);box-shadow:0 -7px 35px rgba(17,32,67,.10);border-top:1px solid #e8ebf4;backdrop-filter:blur(16px);padding:7px max(5px,env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(5px,env(safe-area-inset-left));}
 .mobile-tab{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;min-height:49px;color:#72809c;border-radius:10px;font-weight:750}
 .mobile-tab span{font-size:21px;line-height:1}
 .mobile-tab small{font-size:10px;overflow:hidden;text-overflow:ellipsis;max-width:100%}
 .mobile-tab.active{background:#f1efff;color:#5645ce}
 .mobile-tab:focus-visible{outline:2px solid #6757e9;outline-offset:-2px}
 .panel-heading{gap:8px}
 .panel-heading h2{font-size:15px}
 .page-title{margin-bottom:18px}
 .form-actions .btn{min-height:43px}
 .table-scroll tbody td .btn{min-height:33px}
 .filters label{min-width:0}
 .chart{min-height:175px}
}
@media(max-width:380px){.mobile-tab small{font-size:9px}.mobile-tab span{font-size:19px}}

/* LedgerFlow 4 — responsive polish, touch ergonomics, and long-label safety. */
:root{color-scheme:light;--surface:#fff;--surface-alt:#f8f9fd;--stroke:#e7eaf3;--accent:#5746cf}
*,*::before,*::after{box-sizing:border-box}
img,svg,canvas{max-width:100%}
html{-webkit-text-size-adjust:100%}
body{overflow-x:hidden}
.sidebar{display:flex;flex-direction:column;max-height:100dvh}
.sidebar nav{overflow-y:auto;min-height:0;scrollbar-width:thin;overscroll-behavior:contain}
.sidebar-foot{margin-top:auto}
.brand{min-width:0;overflow-wrap:anywhere}
.content,.workspace,.panel,.kpi,.table-scroll,.form-panel{min-width:0}
.form-grid>*{min-width:0}
input,select,textarea,button{font:inherit;max-width:100%}
.field input,.field select,.field textarea,.filters input,.filters select{width:100%}
input[type="file"]{width:100%;overflow:hidden}
input[type="checkbox"]{width:auto}
.endpoint,.secret{overflow-wrap:anywhere;user-select:text}
.panel-heading>div,.profile{min-width:0}
.panel-heading h2{overflow-wrap:anywhere}
.btn,.logout,.menu-toggle,.mobile-tab{touch-action:manipulation}
.btn[disabled]{opacity:.55;cursor:not-allowed}
:where(input,select,textarea,.mobile-tab):focus-visible{outline:3px solid #978bf7;outline-offset:2px}
.ai-output{overflow-wrap:anywhere}
@media(min-width:651px) and (max-width:1100px){
 .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .table-scroll{overflow-x:auto;overscroll-behavior-x:contain}
 .table-scroll table{min-width:780px}
}
@media(max-width:900px){
 .sidebar{max-height:100dvh;padding-bottom:max(15px,env(safe-area-inset-bottom))}
 .content{width:100%}
}
@media(max-width:650px){
 html,body{max-width:100%}
 .page-title{flex-wrap:wrap}
 .page-title h1{overflow-wrap:anywhere}
 .profile{margin-left:auto;gap:8px}
 .topbar{gap:9px}
 .btn,.menu-toggle,.logout{min-height:44px}
 .btn.tiny{min-height:37px}
 .filters,.form-actions,.toolbar{gap:10px}
 .form-panel{width:100%}
 .table-scroll tbody td{min-width:0;gap:8px;align-items:flex-start}
 .table-scroll tbody td>*{max-width:65%}
 .table-scroll tbody .actions{align-items:center;gap:5px}
 .table-scroll tbody .actions::before{align-self:center}
 .table-scroll tbody td.num{font-variant-numeric:tabular-nums}
 .report-link span,.report-link strong{max-width:100%;overflow-wrap:anywhere}
 .mobile-tab{min-height:52px}
 .mobile-tabs{padding-bottom:max(9px,env(safe-area-inset-bottom))}
 .secret code{font-size:11px;word-break:break-all}
 .kpi strong{overflow-wrap:anywhere;font-size:clamp(15px,4vw,19px)}
 .auth-card{box-shadow:0 15px 35px rgba(37,54,91,.12)}
}
@media(max-width:420px){
 .kpis{grid-template-columns:1fr 1fr}
 .page-title h1{font-size:21px}
 .panel{padding:13px 11px}
 .table-scroll tbody tr{padding:7px 9px}
 .table-scroll tbody .actions{flex-wrap:wrap;justify-content:flex-end}
 .table-scroll tbody td{font-size:11px}
 .kpi{min-width:0;padding:12px}
}
@media(max-width:335px){
 .kpis{grid-template-columns:1fr}
 .table-scroll tbody td::before{flex-basis:39%}
 .mobile-tab small{font-size:8px}
}
@media print{
 body{background:white}
 .sidebar,.topbar,.mobile-tabs,.sidebar-scrim,.filters,.toolbar,.form-actions,.btn{display:none!important}
 .workspace{margin:0!important}
 .content{max-width:100%;padding:0!important}
 .panel,.kpi{box-shadow:none;break-inside:avoid}
 .table-scroll{overflow:visible}
}

/* LedgerFlow 5: finance-workspace visual refinements and compact-device resilience. */
:root{--purple:#5949d6;--mint:#079b82;--sidebar:#121c32}
.panel,.kpi{transition:box-shadow .18s ease,border-color .18s ease}
@media(hover:hover) and (prefers-reduced-motion:no-preference){.panel:hover,.kpi:hover{box-shadow:0 16px 42px rgba(30,43,77,.075);border-color:#dde2f0}}
.sidebar .nav.active{background:linear-gradient(100deg,#6555e0,#4e53c5)}
.sidebar .nav .ico{font-weight:650;opacity:.9}
.profile-text a{color:inherit;text-decoration:none}.profile-text a:hover{text-decoration:underline}
.panel-heading>div{min-width:0}.panel-heading .btn{white-space:normal}
.field span{line-height:1.5}.table-scroll td .subtle{overflow-wrap:anywhere}
.notice{overflow-wrap:anywhere}
@media(max-width:650px){
 .content{padding-inline:max(12px,env(safe-area-inset-left)) max(12px,env(safe-area-inset-right))}
 .page-title{padding-inline:2px}.page-title .eyebrow{font-size:9px;letter-spacing:1.6px}
 .topbar .profile{max-width:calc(100% - 58px)}
 .kpi{background:linear-gradient(145deg,#fff,#fafbff)}
 .table-scroll tbody td::before{line-height:1.4;overflow-wrap:anywhere}
 .table-scroll tbody td.actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap}
 .table-scroll tbody td.actions .btn{white-space:normal}
 .field input,.field select,.field textarea,.filters input,.filters select{font-size:16px}
 .quick-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 .quick-links a{display:flex;align-items:center;justify-content:center;min-height:54px;text-align:center;padding:10px;font-size:11px}
}
@media(max-width:360px){.quick-links{grid-template-columns:1fr}.sidebar{width:min(94vw,290px)}}

/* ==========================================================
   PRIME PULSE / LEDGERFLOW PREMIUM UI ENHANCEMENTS
   - AdminLTE Style Sidebar Fold / Unfold (Desktop & Mobile)
   - Premium Brand Logo in Sidebar & Login Card
   - Luxury 4K Corporate Fintech Login Background & Glassmorphic Card
   ========================================================== */

/* Brand Logo */
.brand {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  font-weight: 800 !important;
  letter-spacing: -0.5px !important;
  color: #ffffff !important;
  font-size: 19px !important;
  margin: 0 4px 38px !important;
  user-select: none !important;
}
.brand-img {
  height: 40px !important;
  width: 40px !important;
  border-radius: 11px !important;
  object-fit: cover !important;
  box-shadow: 0 6px 18px rgba(103, 87, 233, 0.45) !important;
  flex-shrink: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}
.brand-name {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  letter-spacing: -0.3px !important;
}

/* Topbar Left & Menu Toggle (Always Visible & Functional) */
.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.menu-toggle {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid #e1e7f5 !important;
  background: #f4f6fc !important;
  color: #5544c9 !important;
  border-radius: 10px !important;
  height: 40px !important;
  width: 42px !important;
  font-size: 20px !important;
  cursor: pointer !important;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1) !important;
  flex-shrink: 0 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}
.menu-toggle:hover {
  background: #ebeeff !important;
  color: #4332b8 !important;
  border-color: #cbdaf7 !important;
  transform: translateY(-1px) scale(1.03) !important;
  box-shadow: 0 4px 12px rgba(85, 68, 201, 0.16) !important;
}
.menu-toggle:active {
  transform: scale(0.96) !important;
}

/* Sidebar Footer & Quick Collapse Arrow Button */
.sidebar-foot {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 18px 10px 8px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}
.sidebar-collapse-btn {
  margin-left: auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #9eb1d4;
  border-radius: 8px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.sidebar-collapse-btn:hover {
  background: rgba(103, 87, 233, 0.35);
  color: #ffffff;
  border-color: #6757e9;
  transform: scale(1.08);
}

/* Sidebar & Workspace Transition */
.sidebar {
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), padding 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.workspace {
  transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* AdminLTE-Style Folded / Collapsed Sidebar (Desktop) */
@media (min-width: 901px) {
  body.sidebar-collapsed .sidebar,
  .shell.sidebar-collapsed .sidebar {
    width: 76px !important;
    padding: 24px 10px !important;
  }
  body.sidebar-collapsed .workspace,
  .shell.sidebar-collapsed .workspace {
    margin-left: 76px !important;
  }
  body.sidebar-collapsed .brand,
  .shell.sidebar-collapsed .brand {
    justify-content: center !important;
    margin: 0 0 32px !important;
    gap: 0 !important;
  }
  body.sidebar-collapsed .brand .brand-name,
  .shell.sidebar-collapsed .brand .brand-name {
    display: none !important;
  }
  body.sidebar-collapsed .brand-img,
  .shell.sidebar-collapsed .brand-img {
    height: 38px !important;
    width: 38px !important;
  }
  body.sidebar-collapsed .nav-group,
  .shell.sidebar-collapsed .nav-group {
    display: none !important;
  }
  body.sidebar-collapsed .sidebar-foot .foot-text,
  .shell.sidebar-collapsed .sidebar-foot .foot-text {
    display: none !important;
  }
  body.sidebar-collapsed .sidebar-foot .online,
  .shell.sidebar-collapsed .sidebar-foot .online {
    display: none !important;
  }
  body.sidebar-collapsed .sidebar-foot,
  .shell.sidebar-collapsed .sidebar-foot {
    justify-content: center !important;
    padding: 14px 0 !important;
    gap: 0 !important;
  }
  body.sidebar-collapsed .sidebar-collapse-btn,
  .shell.sidebar-collapsed .sidebar-collapse-btn {
    margin: 0 auto !important;
  }
  body.sidebar-collapsed .nav,
  .shell.sidebar-collapsed .nav {
    justify-content: center !important;
    padding: 11px 0 !important;
    gap: 0 !important;
    position: relative !important;
  }
  body.sidebar-collapsed .nav .nav-text,
  .shell.sidebar-collapsed .nav .nav-text {
    display: none !important;
  }
  body.sidebar-collapsed .nav .ico,
  .shell.sidebar-collapsed .nav .ico {
    margin: 0 !important;
    font-size: 20px !important;
  }
  /* Floating hover tooltips for folded icons */
  body.sidebar-collapsed .nav:hover::after,
  .shell.sidebar-collapsed .nav:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 80px;
    top: 50%;
    transform: translateY(-50%);
    background: #0f172a;
    color: #ffffff;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 6px 22px rgba(0,0,0,0.38);
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    animation: lfFadeIn 0.15s ease-out;
  }
  @keyframes lfFadeIn {
    from { opacity: 0; transform: translateY(-50%) translateX(-4px); }
    to { opacity: 1; transform: translateY(-50%) translateX(0); }
  }
}

/* ==========================================================
   PREMIUM LOGIN PAGE STYLING (Luxury Background & Glassmorphic Card)
   ========================================================== */
.auth-shell {
  min-height: 100vh !important;
  display: grid !important;
  place-items: center !important;
  padding: 24px !important;
  background: linear-gradient(135deg, rgba(8, 14, 29, 0.72) 0%, rgba(12, 19, 38, 0.84) 100%), url('login-bg.jpg') center center / cover no-repeat fixed !important;
  position: relative !important;
  overflow: hidden !important;
}
.auth-shell::before {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background: radial-gradient(circle at 15% 20%, rgba(103, 87, 233, 0.28), transparent 45%), radial-gradient(circle at 85% 85%, rgba(23, 184, 154, 0.22), transparent 40%) !important;
  pointer-events: none !important;
}
.auth-card {
  position: relative !important;
  background: rgba(255, 255, 255, 0.94) !important;
  border: 1px solid rgba(255, 255, 255, 0.65) !important;
  border-radius: 24px !important;
  box-shadow: 0 35px 90px -15px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.4) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  padding: 44px 42px !important;
  width: 100% !important;
  max-width: 460px !important;
  z-index: 10 !important;
}
.auth-card .brand {
  color: #0f172a !important;
  margin: 0 0 28px !important;
  font-size: 22px !important;
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
}
.auth-card .brand-img {
  height: 48px !important;
  width: 48px !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 24px rgba(103, 87, 233, 0.38) !important;
}
.auth-card .brand-name {
  font-weight: 800 !important;
  letter-spacing: -0.6px !important;
}
.auth-card h1 {
  font-size: 27px !important;
  font-weight: 800 !important;
  letter-spacing: -0.8px !important;
  margin-bottom: 8px !important;
  color: #0f172a !important;
}
.auth-card .muted {
  color: #64748b !important;
  margin-bottom: 26px !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
}
.auth-card .field input {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  padding: 13px 16px !important;
  border-radius: 11px !important;
  font-size: 14px !important;
  transition: all 0.15s ease !important;
}
.auth-card .field input:focus {
  background: #ffffff !important;
  border-color: #6756e8 !important;
  box-shadow: 0 0 0 4px rgba(103, 86, 232, 0.16) !important;
}
.auth-card .btn.primary {
  background: linear-gradient(135deg, #6756e8, #5243d6) !important;
  border-radius: 11px !important;
  padding: 14px 20px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  box-shadow: 0 8px 20px rgba(103, 86, 232, 0.32) !important;
  transition: all 0.18s ease !important;
}
.auth-card .btn.primary:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 12px 28px rgba(103, 86, 232, 0.42) !important;
  filter: brightness(1.04) !important;
}
