:root{--bg:#000;--grp:#1c1c1e;--grp2:#2c2c2e;--fill:rgba(118,118,128,.24);--sep:rgba(84,84,88,.6);--label:#fff;--label2:rgba(235,235,245,.6);--label3:rgba(235,235,245,.3);--tint:#f5b73f;--tint-ink:#1a1200;--green:#30d158;--orange:#ff9f0a;--red:#ff453a;--purple:#bf5af2;--teal:#64d2ff;--pink:#ff375f;--yellow:#ffd60a;}
*{box-sizing:border-box;}
html{scrollbar-gutter:stable;-webkit-text-size-adjust:100%;}
body{margin:0;background:var(--bg);color:var(--label);font-family:-apple-system,BlinkMacSystemFont,system-ui,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:17px;line-height:1.3;-webkit-font-smoothing:antialiased;letter-spacing:-.022em;}
a{color:var(--tint);text-decoration:none;}a:hover{color:#ffd27a;}
button{font:inherit;color:inherit;}
input,select,textarea{font-size:16px;font-family:inherit;}
select{appearance:none;-webkit-appearance:none;min-height:44px;min-width:0;max-width:100%;border:1px solid var(--sep);border-radius:10px;padding:0 36px 0 12px;background:var(--grp2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%239c9ca3' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;color:var(--label);color-scheme:dark;cursor:pointer;}
select:focus-visible{outline:2px solid var(--tint);outline-offset:2px;}
select:disabled{opacity:.45;cursor:not-allowed;}
.mono,.num{font-family:ui-monospace,"SF Mono",Menlo,monospace;font-variant-numeric:tabular-nums;letter-spacing:0;}
.page{max-width:1100px;margin:0 auto;padding:0 16px calc(env(safe-area-inset-bottom,0px) + 96px);}
.navbar{position:sticky;top:0;z-index:20;background:rgba(0,0,0,.85);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);margin:0 -16px 12px;padding:max(env(safe-area-inset-top),12px) 16px 8px;}
.navbar .tr{display:flex;justify-content:space-between;align-items:flex-end;gap:12px;}
.navbar .lt{margin:0;font-size:34px;font-weight:700;letter-spacing:.37px;line-height:41px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.navbar .acts{display:flex;gap:14px;align-items:center;padding-bottom:6px;flex:0 0 auto;}
.act{font-size:17px;color:var(--tint);background:none;border:0;padding:0;cursor:pointer;min-height:44px;display:inline-flex;align-items:center;gap:6px;text-decoration:none;}
.act:disabled{opacity:.45;cursor:not-allowed;}
.act.red{color:var(--red);}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:50px;padding:0 16px;border-radius:12px;background:var(--tint);color:var(--tint-ink);font-size:17px;font-weight:600;border:0;cursor:pointer;text-decoration:none;}
.btn.gray{background:var(--fill);color:var(--tint);}
.btn.red{background:var(--fill);color:var(--red);}
.btn.small{min-height:36px;font-size:15px;padding:0 12px;border-radius:9px;}
.btn:disabled{opacity:.45;cursor:not-allowed;}
.btn svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
.status{font-size:15px;color:var(--label2);}
.status.ok{color:var(--green);}.status.warn{color:var(--tint);}.status.err{color:var(--red);}
[aria-busy="true"]{opacity:.5;transition:opacity .15s ease-out;}
.sh{font-size:13px;color:var(--label2);text-transform:uppercase;letter-spacing:-.08px;padding:0 16px 7px;margin:22px 0 0;}
.sf{font-size:13px;color:var(--label2);padding:7px 16px 0;}
.grp{background:var(--grp);border-radius:10px;overflow:hidden;}
.cell{display:flex;align-items:center;gap:12px;min-height:44px;padding:11px 16px;position:relative;width:100%;text-align:left;background:none;border:0;color:inherit;text-decoration:none;}
.cell + .cell::before,.cell + a.cell::before{content:'';position:absolute;left:16px;right:0;top:0;height:.5px;background:var(--sep);}
.cell.inset + .cell.inset::before{left:52px;}
.cell .t{flex:1;min-width:0;font-size:17px;color:var(--label);}
.cell .t .s{display:block;font-size:15px;color:var(--label2);margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.cell .v{color:var(--label2);font-size:17px;flex:0 0 auto;}
.cell .chev{width:8px;height:14px;stroke:var(--label3);fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto;}
.cell input[type="text"],.cell input[type="number"]{background:none;border:0;color:var(--label2);text-align:right;min-height:44px;padding:0;max-width:50%;}
.cell select{max-width:50%;text-align:left;}
.cell input:focus{outline:none;color:var(--label);}
.sw{appearance:none;-webkit-appearance:none;width:51px;height:31px;border-radius:16px;background:#39393d;position:relative;flex:0 0 auto;cursor:pointer;margin:0;border:0;}
.sw::after{content:'';position:absolute;top:2px;left:2px;width:27px;height:27px;border-radius:50%;background:#fff;box-shadow:0 3px 8px rgba(0,0,0,.15),0 3px 1px rgba(0,0,0,.06);transition:left .15s ease;}
.sw:checked{background:var(--green);}
.sw:checked::after{left:22px;}
.chk{appearance:none;-webkit-appearance:none;width:22px;height:22px;border-radius:50%;border:1.5px solid var(--label3);flex:0 0 auto;margin:0;cursor:pointer;position:relative;}
.chk:checked{background:var(--tint);border-color:var(--tint);}
.chk:checked::after{content:'';position:absolute;left:7px;top:3px;width:5px;height:10px;border:solid var(--tint-ink);border-width:0 2px 2px 0;transform:rotate(45deg);}
.search{height:44px;border-radius:10px;background:var(--fill);display:flex;align-items:center;gap:6px;padding:0 10px;color:var(--label2);margin:0 0 12px;}
.search svg{width:16px;height:16px;stroke:var(--label2);fill:none;stroke-width:2;stroke-linecap:round;flex:0 0 auto;}
.search input{flex:1;min-width:0;background:none;border:0;color:var(--label);font-size:17px;outline:none;}
.search input::placeholder{color:var(--label2);}
.seg{display:flex;background:var(--fill);border-radius:9px;padding:2px;height:36px;margin-bottom:12px;}
.seg button,.seg span{flex:1;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:500;color:var(--label);border-radius:7px;background:none;border:0;cursor:pointer;padding:0;}
.seg .on{background:#636366;box-shadow:0 3px 8px rgba(0,0,0,.12);font-weight:600;}
.stats{display:grid;grid-template-columns:repeat(3, minmax(0, 1fr));gap:10px;margin-bottom:14px;}
.stat{background:var(--grp);border-radius:12px;padding:12px 14px 10px;border:0;text-align:left;color:inherit;}
.stat .l{font-size:13px;color:var(--label2);}
.stat .v{font-size:24px;font-weight:700;margin-top:2px;font-variant-numeric:tabular-nums;letter-spacing:.35px;}
.badge{display:inline-flex;align-items:center;gap:5px;font-size:13px;color:var(--label2);white-space:nowrap;}
.badge b{width:8px;height:8px;border-radius:50%;display:inline-block;background:var(--label3);}
.badge.confirmed b{background:var(--green);}.badge.pending b{background:var(--purple);}.badge.json-only b{background:var(--orange);}.badge.pdf-only b{background:var(--teal);}.badge.accounts b{background:var(--pink);}
.badge.dte-factura{color:var(--green);}.badge.dte-credito-fiscal{color:var(--teal);}.badge.dte-nota-remision{color:var(--purple);}.badge.dte-nota-credito{color:var(--orange);}.badge.dte-nota-debito{color:var(--red);}.badge.dte-retencion{color:#5dd5b4;}.badge.dte-liquidacion,.badge.dte-doc-liquidacion{color:#8aa0ff;}.badge.dte-exportacion{color:var(--pink);}.badge.dte-sujeto-excluido{color:#ffa66c;}.badge.dte-donacion{color:var(--green);}.badge.dte-unknown{color:var(--label2);}
.tag{display:inline-block;font-size:12px;font-weight:600;padding:2px 6px;border-radius:5px;background:var(--fill);color:var(--label2);white-space:nowrap;}
.dot{width:10px;height:10px;border-radius:50%;display:inline-block;flex:0 0 auto;background:var(--label3);}
.dot.confirmed{background:var(--green);}.dot.pending{background:var(--purple);}.dot.json-only{background:var(--orange);}.dot.pdf-only{background:var(--teal);}.dot.accounts{background:var(--pink);}
.empty{text-align:center;color:var(--label2);padding:40px 16px;font-size:15px;}
dialog{color:var(--label);padding:0;border:0;background:var(--grp);border-radius:14px;width:calc(100% - 32px);max-width:420px;}
dialog::backdrop{background:rgba(0,0,0,.6);}
.ccfdialog p{padding:22px 20px 8px;font-size:17px;line-height:1.35;text-align:center;margin:0;}
.ccfdialog .actions{display:flex;gap:8px;padding:12px 16px calc(16px + env(safe-area-inset-bottom));}
.ccfdialog .actions .btn{flex:1;}
.sheet{max-width:720px;max-height:92dvh;display:none;flex-direction:column;overflow:hidden;}
.sheet[open]{display:flex;}
.sheet .grab{width:36px;height:5px;border-radius:3px;background:rgba(255,255,255,.3);margin:6px auto 0;flex:0 0 auto;}
.sheet .body{overflow-y:auto;flex:1;padding:0 16px calc(16px + env(safe-area-inset-bottom));}
.sheet h2{margin:16px 0 4px;font-size:22px;font-weight:700;letter-spacing:.35px;line-height:28px;word-break:break-word;}
@media (max-width:760px){.sheet{position:fixed;inset:auto 0 0 0;margin:0;width:100%;max-width:100%;border-radius:10px 10px 0 0;max-height:94dvh;}}
.toast{position:fixed;left:50%;bottom:calc(env(safe-area-inset-bottom,0px) + 96px);transform:translateX(-50%);z-index:60;display:flex;align-items:center;gap:16px;background:var(--grp2);color:var(--label);padding:12px 16px;border-radius:12px;box-shadow:0 8px 30px rgba(0,0,0,.5);font-size:15px;max-width:calc(100% - 32px);}
.toast button{background:none;border:0;color:var(--tint);font-weight:600;cursor:pointer;min-height:44px;padding:0 4px;}
.tabbar{position:fixed;left:0;right:0;bottom:0;z-index:30;height:calc(49px + env(safe-area-inset-bottom,0px));padding:6px 0 env(safe-area-inset-bottom,0px);background:rgba(28,28,30,.85);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);border-top:.5px solid var(--sep);display:flex;}
.tab{flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;font-size:10px;font-weight:500;color:var(--label2);letter-spacing:.12px;text-decoration:none;}
.tab svg{width:26px;height:26px;stroke:currentColor;fill:none;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;}
.tab.active{color:var(--tint);}
.side{display:none;}
.desktop{display:none;}
@media (min-width:761px){
  body{display:flex;min-height:100vh;align-items:flex-start;}
  .side{display:flex;flex-direction:column;gap:2px;width:220px;flex:0 0 220px;position:sticky;top:0;height:100vh;padding:20px 10px;background:var(--grp);border-right:.5px solid var(--sep);}
  .side .brand{font-weight:700;font-size:15px;padding:6px 10px 16px;display:flex;gap:10px;align-items:center;color:var(--label);}
  .side .brand i{width:22px;height:22px;border-radius:6px;background:var(--tint);display:inline-block;}
  .side .nav{display:flex;align-items:center;gap:10px;height:34px;padding:0 10px;border-radius:8px;color:var(--label2);font-size:14px;text-decoration:none;}
  .side .nav svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round;}
  .side .nav.active{background:rgba(255,255,255,.12);color:var(--tint);}
  .tabbar{display:none;}
  .desktop{display:block;}
  .page{flex:1;min-width:0;padding:0 28px 48px;}
  .navbar{margin:0 -28px 16px;padding-left:28px;padding-right:28px;}
  .navbar .lt{font-size:28px;line-height:34px;}
  .stats{grid-template-columns:repeat(6, minmax(0, 1fr));}
  .toast{bottom:32px;}
}
@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:0s !important;transition-duration:0s !important;}}
