
:root{
 color-scheme:dark;
 --bg:#060a17;--surface:#091321;--surface-2:#0d1b30;
 --text:#f1f5fc;--muted:#acbed9;--border:#253d5b;
 --purple:#2872db;--purple-dark:#235ac0;
 --green:#52ddb2;--red:#fda4af;
 --cyan:#25cff3;
 background:var(--bg);color:var(--text);
}
:root[data-theme=light]{
 color-scheme:light;
 --bg:#f5f8fc;--surface:#fff;--surface-2:#edf5fc;
 --text:#14233d;--muted:#526580;--border:#ccdaea;
 --green:#087b5a;--red:#b42342;--cyan:#006e98;
 --purple:#2563eb;--purple-dark:#1d4ed8;
}
body{background:var(--bg);color:var(--text);font-size:16px}
button,input,select,textarea{font:inherit}
button,.button{
 min-height:48px;
 border-radius:12px;
 background:var(--surface-2);
 color:var(--text);
 border-color:var(--border);
 font-size:14px;
 transition:transform .15s,background .15s,box-shadow .15s;
}
button:hover{background:var(--surface-2)}
button:active{transform:translateY(2px)}
button:focus-visible,a:focus-visible,summary:focus-visible,
input:focus-visible,select:focus-visible,textarea:focus-visible{
 outline:3px solid var(--cyan);outline-offset:3px;
}
.primary,.primary:hover{
 background:linear-gradient(110deg,#087fce,#6550e8);
 color:#fff;border-color:#4c80d1;
 box-shadow:0 3px 0 #14356c,0 10px 25px #1657a51a;
}
.primary:active{box-shadow:0 1px 0 #14356c}
.danger,.danger:hover{background:#a52c48;color:#fff;border-color:#d36b82}
.quiet{background:transparent}
input,select,textarea{
 min-height:52px;padding:12px 14px;
 border:1px solid var(--border);
 border-radius:12px;
 background:var(--bg);color:var(--text);font-size:16px;
 max-width:100%;
}
input::placeholder,textarea::placeholder{color:var(--muted);opacity:1}
input[type=checkbox],input[type=radio]{
 min-height:24px;width:24px;height:24px;accent-color:#2563eb;
}
label{font-size:14px;color:var(--text)}
small,.muted,.optional,.period-note,.account-label{color:var(--muted)}
.muted{font-size:14px}
.topbar{
 min-height:86px;height:auto;padding:18px 30px;
 background:var(--bg);border-color:var(--border);gap:16px;
}
.brand{
 display:flex;align-items:center;gap:12px;
 color:var(--text);font-size:24px;letter-spacing:3px;
 line-height:1;text-decoration:none;
}
.brand .premium-symbol{width:42px;height:42px;object-fit:contain}
.brand .premium-wordmark{display:block;font-weight:800}
.brand small{
 display:block;font-size:8px;letter-spacing:3px;
 color:var(--muted);margin-top:7px;line-height:1.2;
}
.test-label{
 background:var(--surface-2);border:1px solid var(--border);
 color:var(--muted);margin-left:auto;
}
.topbar #logout{font-size:13px;min-height:44px}
.sidebar{
 background:var(--bg);border-color:var(--border);
}
.company-switch{
 border:1px solid var(--border);border-radius:16px;
 padding:15px;background:var(--surface);
}
.company-switch label{color:var(--muted)}
.company-switch select{font-weight:700}
.nav-caption{color:var(--muted)}
.nav-item{color:var(--muted)}
.nav-item:hover{background:var(--surface-2);color:var(--text)}
.nav-item.active{
 background:#10304d;border:1px solid #356594;color:#8edcff;
}
:root[data-theme=light] .nav-item.active{
 color:#14578c;background:#e6f3ff;border-color:#b6d7f2;
}
.sidebar-note{
 border:1px solid var(--border);border-radius:16px;
 background:linear-gradient(145deg,var(--surface-2),var(--surface));
 color:var(--text);
}
.sidebar-note p{color:var(--muted)}
.content{min-width:0;background:var(--bg)}
h1{font-size:clamp(28px,3vw,42px);line-height:1.17;letter-spacing:-1px}
h2{font-size:21px;line-height:1.35}
.eyebrow{color:var(--cyan);font-size:10px;letter-spacing:1.7px}
.panel,.card,.stat-card,.metric-card{
 background:var(--surface);color:var(--text);
 border-color:var(--border);border-radius:20px;
 box-shadow:0 12px 35px #00000012;
}
.cards>*{
 background:var(--surface);color:var(--text);
 border:1px solid var(--border);border-radius:18px;
 box-shadow:0 4px 0 #11233c22;
}
.cards strong{font-variant-numeric:tabular-nums}
.cards p,.cards small{color:var(--muted)}
.toolbar,.list-toolbar,.section-heading,.month-picker{
 border-color:var(--border);color:var(--text);
}
.month-picker{background:var(--surface);border-radius:12px}
.month-picker input{background:transparent;color:var(--text)}
.search-box input,.status-filter select{background:var(--surface)}
table{color:var(--text)}
thead,th{background:var(--surface-2);color:var(--muted)}
td,tr,tbody,.entry-row,.connection-row{border-color:var(--border)}
td,tbody,.entry-row,.connection-row{background:transparent}
tbody tr:hover{background:var(--surface-2)}
.income,.positive,.income-key{color:var(--green)}
.expense,.negative,.expense-key,.text-danger{color:var(--red)}
.status{border:1px solid var(--border)}
.status.pending{background:#1b3150;color:#c4dcff}
.status.settled{background:#0b4738;color:#a8f4d8}
.status.late{background:#501e32;color:#ffd1dc}
.soft-tag,.sticker,.welcome-tags span{
 background:var(--surface-2);color:var(--muted);
 border:1px solid var(--border);
}
.auth{background:var(--bg)}
.welcome{color:var(--text)}
.welcome p{color:var(--muted)}
.welcome em{
 font-style:normal;color:#3db9f6;
 background:linear-gradient(100deg,#00c5ef,#aa83fa);
 background-clip:text;-webkit-background-clip:text;
 -webkit-text-fill-color:transparent;
}
.auth .panel{background:var(--surface)}
dialog{
 max-width:calc(100vw - 24px);
 max-height:calc(100dvh - 24px);
 overflow:auto;background:var(--surface);color:var(--text);
 border:1px solid var(--border);border-radius:20px;
 box-shadow:0 30px 100px #00000050;
}
dialog::backdrop{background:#020617a8}
dialog .dialog-heading,dialog .form-actions,dialog footer{
 background:var(--surface);color:var(--text);border-color:var(--border);
}
dialog h2,dialog label{color:var(--text)}
.icon-button{min-width:48px;min-height:48px;color:var(--text)}
.photo-capture{
 background:var(--surface-2);border:1px solid var(--border);
 border-radius:16px;
}
.photo-capture p,.photo-capture small{color:var(--muted)}
.supplier-quick,.bill-row,.inset{
 background:var(--surface-2);color:var(--text);border-color:var(--border);
}
.supplier-quick p,.bill-controls p{color:var(--muted)}
.bill-controls input,.bill-controls select{background:var(--bg)}
.bill-paid input{width:24px;min-height:24px}
.bill-total{color:var(--text)}
.notice{
 background:var(--surface-2);color:var(--text);
 border:1px solid var(--border);
}
.notice.error,.form-error{
 color:var(--red);
}
.empty-icon,.mini-icon{background:var(--surface-2);color:var(--cyan)}
#chart{color:var(--muted)}
.chart-footer,.chart-panel,.recent-panel,.account-list{border-color:var(--border)}
.premium-tools{display:flex;gap:8px}
.premium-tools button{min-width:44px;padding:9px 12px}
.premium-back{margin-bottom:14px}
.premium-actions{
 display:grid;grid-template-columns:repeat(4,minmax(0,1fr));
 gap:15px;margin:0 0 26px;
}
.premium-action-wrap{position:relative}
.premium-action{
 width:100%;min-height:145px;display:flex;
 flex-direction:column;align-items:flex-start;text-align:left;
 padding:20px;
 background:linear-gradient(145deg,var(--surface-2),var(--surface));
 border:1px solid var(--border);border-radius:16px;
 box-shadow:0 4px 0 #1a355933;
}
.premium-action strong{font-size:17px;margin-top:10px}
.premium-action small{font-size:12px;font-weight:400}
.premium-icon{
 width:42px;height:42px;border-radius:12px;
 display:flex;align-items:center;justify-content:center;
 background:linear-gradient(145deg,#78e4fa,#3a85e9);
 color:#09223f;box-shadow:inset 0 1px 0 #ffffff80,0 4px 12px #00000020;
}
.premium-icon svg{width:25px;height:25px}
.premium-help{
 position:absolute;right:8px;top:8px;
 min-height:44px;min-width:44px;padding:0;border-radius:50%;
}
.premium-ai{
 display:inline-block;font-size:10px;font-weight:750;
 letter-spacing:1px;color:var(--cyan);
 border:1px solid var(--border);border-radius:6px;
 padding:5px 9px;background:var(--surface-2);
}
.premium-dialog{width:480px;padding:25px}
.premium-dialog-top{
 display:flex;align-items:center;justify-content:space-between;
 gap:14px;margin-bottom:24px;
}
.premium-dialog p{line-height:1.65;color:var(--muted)}
.premium-dialog label{display:block;margin:18px 0}
.premium-dialog button{margin:5px}
.premium-switch{
 display:flex!important;align-items:center;justify-content:space-between;
 gap:20px;padding:18px 0;border-block:1px solid var(--border);
}
.premium-switch input{flex-shrink:0}
.premium-menu{display:grid;gap:10px}
.premium-menu button{width:100%;justify-content:flex-start}
.premium-bottom{display:none}
.premium-alert-item{
 border-bottom:1px solid var(--border);padding:14px 0;
}
.premium-alert-item strong,.premium-alert-item small{display:block}
@media(max-width:1100px){
 .premium-actions{gap:10px}
 .premium-action{padding:15px}
}
@media(max-width:760px){
 .topbar{padding:14px 16px;min-height:76px;gap:10px;flex-wrap:wrap}
 .brand{font-size:21px;gap:9px}
 .brand .premium-symbol{width:34px;height:34px}
 .brand small{font-size:7px;letter-spacing:2.5px}
 .topbar .test-label{display:none}
 .premium-tools{margin-left:auto;gap:6px}
 .topbar #logout{padding:8px;font-size:12px}
 .app-layout{display:block}
 .sidebar{
  position:static;width:auto;min-height:0;
  padding:14px 16px;border:0;background:var(--bg);
 }
 .sidebar .nav-caption,.sidebar nav,.sidebar-note,
 .sidebar .account-label{display:none}
 .company-switch{padding:12px;margin:0}
 .company-switch select{width:100%;font-size:16px}
 .company-switch #add-company{margin-top:8px}
 .content{
  padding:14px 16px calc(110px + env(safe-area-inset-bottom));
  width:auto;margin:0;
 }
 .page-heading{flex-wrap:wrap;gap:14px}
 .page-heading h1{font-size:29px}
 .page-heading .primary{width:100%}
 .page-heading>button{max-width:100%}
 .premium-actions{grid-template-columns:1fr 1fr;gap:14px}
 .premium-action{padding:18px;min-height:150px}
 .premium-action small{font-size:12px}
 .cards{gap:12px}
 .cards>*{min-width:0}
 .dashboard-grid{display:block}
 .panel{padding:20px;margin-bottom:18px}
 .toolbar,.list-toolbar{flex-wrap:wrap;gap:12px}
 .toolbar>*{max-width:100%}
 .month-picker{max-width:100%;display:flex;align-items:center}
 .month-picker input{min-width:0}
 .month-picker button{flex-shrink:0;min-width:44px}
 .search-box,.status-filter{width:100%}
 .drawer{width:100%;max-width:100vw;max-height:100dvh;border-radius:18px 18px 0 0}
 dialog form{max-width:100%}
 .form-grid{grid-template-columns:1fr}
 .form-actions{flex-wrap:wrap;gap:10px}
 .form-actions button{flex:1;min-width:120px}
 .premium-bottom{
  display:grid;grid-template-columns:repeat(5,minmax(0,1fr));
  position:fixed;bottom:0;left:0;right:0;
  padding:8px 7px calc(8px + env(safe-area-inset-bottom));
  background:var(--surface);border-top:1px solid var(--border);
  z-index:15;box-shadow:0 -8px 30px #02061718;
 }
 .premium-bottom button{
  display:flex;flex-direction:column;gap:4px;
  padding:6px 2px;min-height:57px;
  border-color:transparent;background:transparent;
  font-size:10px;border-radius:12px;
 }
 .premium-bottom svg{width:23px;height:23px}
 .premium-bottom button.active{background:var(--surface-2);color:var(--cyan)}
 .premium-bottom .premium-launch{
  background:linear-gradient(110deg,#087fce,#6550e8);
  color:#fff;border:1px solid #4c80d1;box-shadow:0 3px 0 #14356c;
 }
 .premium-bottom .premium-launch.active{color:#fff}
 #message.notice{position:relative;z-index:1}
}
@media(prefers-reduced-motion:reduce){
 *,*::before,*::after{
  animation:none!important;transition:none!important;
  scroll-behavior:auto!important;
 }
}

.voice-dialog{text-align:center}
.voice-dialog button{margin-top:12px}
.voice-mic{
 display:flex;align-items:center;justify-content:center;
 width:96px;height:96px;margin:24px auto;
 border-radius:28px;border:1px solid #3b8dbe;
 background:linear-gradient(140deg,#153f70,#17234a);
 color:#67e8f9;box-shadow:0 5px 0 #061124;
}
.voice-mic svg{width:44px;height:44px}
.voice-mic.recording{
 border-color:#fb7185;color:#fda4af;background:#431c36;
}
.voice-review p{white-space:pre-wrap;overflow-wrap:anywhere}


/* DASHBOARD_CONTRAST_V2 */
:root{
 --dashboard-card:#0d1b30;
 --dashboard-number:#f4f8ff;
 --dashboard-label:#c0d1e8;
 --dashboard-negative:#ffafbf;
}
:root[data-theme=light]{
 --dashboard-card:#ffffff;
 --dashboard-number:#10233f;
 --dashboard-label:#435b78;
 --dashboard-negative:#a71f40;
}
#overview-cards > *,
#account-cards > *{
 background:var(--dashboard-card)!important;
 background-image:none!important;
 color:var(--dashboard-number)!important;
 border:1px solid var(--border)!important;
 box-shadow:0 5px 0 #12305220;
 min-height:154px;
 padding:22px;
}
#overview-cards > * *,
#account-cards > * *{
 color:var(--dashboard-number)!important;
}
#overview-cards > * p,
#overview-cards > * small,
#account-cards > * p,
#account-cards > * small{
 color:var(--dashboard-label)!important;
 opacity:1!important;
}
#overview-cards .premium-figure,
#account-cards .premium-figure{
 color:var(--dashboard-number)!important;
 font-size:clamp(27px,2.5vw,36px)!important;
 font-weight:800!important;
 line-height:1.2!important;
 letter-spacing:-.7px;
 font-variant-numeric:tabular-nums;
 opacity:1!important;
 overflow-wrap:anywhere;
}
#overview-cards .premium-figure.premium-negative,
#account-cards .premium-figure.premium-negative{
 color:var(--dashboard-negative)!important;
}
.sidebar nav button[data-view="payable"]{
 min-height:58px;
 padding:15px 16px;
 font-size:16px;
 font-weight:800;
 border:1px solid #397dba;
 background:linear-gradient(110deg,#103c65,#20234f);
 color:#f4f8ff;
 margin-block:8px;
 box-shadow:0 3px 0 #07182c;
}
.sidebar nav button[data-view="payable"]:hover,
.sidebar nav button[data-view="payable"].active{
 background:linear-gradient(110deg,#136fae,#5044bd);
 color:#fff;
}
#view-payable,
#premium-payable-access{
 min-height:56px!important;
 font-size:16px!important;
 font-weight:800!important;
 padding:14px 20px!important;
 background:linear-gradient(110deg,#087fce,#6550e8)!important;
 border:1px solid #5886d4!important;
 color:#fff!important;
 box-shadow:0 4px 0 #15376d;
 border-radius:13px;
}
#premium-payable-access{
 width:100%;
 margin:0 0 24px;
 display:flex;
 align-items:center;
 justify-content:center;
 gap:12px;
}
#premium-payable-access svg{
 width:25px;height:25px;flex-shrink:0;
}
@media(max-width:760px){
 #overview-cards .premium-figure,
 #account-cards .premium-figure{
  font-size:30px!important;
 }
}

.document-reference label{display:block;margin:12px 0}
.document-reference input,.document-reference select{width:100%}
#fluxyn-whatsapp-support{
 position:fixed;right:20px;bottom:22px;z-index:14;
 display:flex;align-items:center;justify-content:center;gap:9px;
 min-height:50px;padding:12px 18px;border-radius:16px;
 background:#075e45;color:#fff;border:1px solid #43c59c;
 box-shadow:0 5px 0 #033c2c,0 12px 25px #00000030;
 text-decoration:none;font-size:14px;font-weight:750;
}
#fluxyn-whatsapp-support svg{width:25px;height:25px}
#fluxyn-whatsapp-support:focus-visible{
 outline:3px solid var(--cyan);outline-offset:4px;
}
@media(max-width:760px){
 #fluxyn-whatsapp-support{
  bottom:calc(92px + env(safe-area-inset-bottom));
  right:14px;min-height:48px;padding:10px 14px;
 }
}

.document-check-status{
 padding:14px;border:1px solid var(--border);
 border-radius:12px;background:var(--surface);
 color:var(--text)!important;font-size:14px;line-height:1.6;
}
.document-check-status:empty{display:none}
.duplicate-note-dialog{
 border:2px solid var(--dashboard-negative);
}
.duplicate-note-dialog h2{color:var(--dashboard-negative)}
