/* BILLIA: navy navigation, quiet working surfaces, orange primary actions. */
:root {
  --brand-blue:#2563eb; --brand-blue-dark:#1d4ed8; --brand-blue-soft:#edf4ff;
  --brand-orange:#ff791c; --brand-orange-dark:#d95000;
  --aurora-violet:#2563eb; --aurora-blue:#397cf5; --aurora-teal:#15803d; --aurora-pink:#d95000;
  --color-bg:#f5f7fb; --color-surface:#fff; --color-card:#fff;
  --color-border:#dbe2ec; --color-text:#12213a; --color-text-muted:#53627a;
  --glass-bg:#fff; --glass-strong:#fff; --glass-border:#dbe2ec; --glass-blur:none;
  --lg-tint:none; --lg-tint-strong:none; --lg-blur:none; --lg-border:1px solid #dbe2ec;
  --lg-edge:none; --lg-depth:0 8px 24px #09102010; --lg-depth-lg:0 16px 48px #09102024;
  --radius:14px; --radius-sm:8px;
  --shadow-sm:0 2px 6px #09102006; --shadow:0 8px 24px #0910200a;
  --shadow-lg:0 20px 48px #09102026; --ring:0 0 0 3px #2563eb28;
}
body { background:var(--color-bg); line-height:1.5; }
body::before,body::after,.af-aurora { display:none; }
::selection { background:#cfe0ff; color:#12213a; }
input,textarea { caret-color:var(--brand-blue); }
button,input,select,textarea { font-family:var(--f-body); }
button:disabled { cursor:not-allowed; opacity:.55; }
:focus-visible { outline:3px solid #397cf5; outline-offset:3px; }
input::placeholder,textarea::placeholder { color:#65738a; opacity:1; }
.brand-ia { background:none; color:#397cf5; -webkit-text-fill-color:currentColor; }
.header { background:#fff; border-bottom:1px solid var(--color-border); box-shadow:none; backdrop-filter:none; }
.sidebar { background:#091020; color:#c3cfe1; border:0; box-shadow:none; backdrop-filter:none; }
.nav-item,.nav-group-header,.nav-subgroup-header { color:#c3cfe1; border-radius:7px; }
.nav-group-header { font-size:12px; font-weight:700; letter-spacing:.035em; }
.nav-group { border-color:#233149; }
.nav-chevron { color:#97aac6; }
.nav-item:hover,.nav-group-header:hover,.nav-subgroup-header:hover { background:#17253c; color:#fff; }
.nav-item.active { color:#fff; background:#1c3559; box-shadow:none; }
.sidebar::-webkit-scrollbar-thumb { background:#344661; }
.header-empresa { font-weight:600; }
.btn-menu,.btn-mostrar-menu { color:#12213a; background:#fff; }
.btn-logout { color:#53627a; background:#f3f6fa; box-shadow:none; }
.content { padding:32px; min-width:0; background:var(--color-bg); }
.card { background:#fff; border:1px solid var(--color-border); box-shadow:none; backdrop-filter:none; }
.card h2 { font-size:20px; letter-spacing:-.025em; }
.card:hover { border-color:#dbe2ec; box-shadow:none; }
.cfg-card { background:#fff; box-shadow:none; border:1px solid #dbe2ec; border-radius:12px; }
.bottomnav { background:#fff; box-shadow:none; border-top:1px solid #dbe2ec; }
.bn-item.active svg { filter:none; }
.form-group input[type=checkbox],.form-group input[type=radio] { min-height:0; }
#btn-confirmar-venta { background:#ff791c; color:#12213a; min-height:48px; }
.card .card { background:#f8fafc; border-radius:8px; }
.form-group label { color:#43526a; font-weight:600; font-size:13px; }
.form-group input,.form-group select,.form-group textarea { background:#fff; color:#12213a; border-color:#b9c5d6; min-height:42px; }
.btn { min-height:40px; border-radius:8px; box-shadow:none; }
.btn-primary { background:#2563eb; color:#fff; box-shadow:none; }
.btn-accent { background:#ff791c; color:#12213a; box-shadow:none; }
.btn-success { background:#15803d; box-shadow:none; }
.btn-danger { background:#b91c1c; box-shadow:none; }
.btn-secondary { background:#fff; border:1px solid #c7d2e1; color:#34445e; backdrop-filter:none; }
.btn-scan { background:#edf4ff; color:#1d4ed8; border:1px solid #b9d1fa; }
.btn:hover { box-shadow:none; filter:brightness(.96); }
.tabs .btn { border-radius:7px; }
th { background:#f5f7fb; color:#53627a; font-size:12px; text-transform:none; letter-spacing:0; }
td { font-size:13px; font-variant-numeric:tabular-nums; }
th,td { padding:13px 14px; border-color:#e5eaf2; }
tbody tr:hover { background:#f5f8ff; }
.pos-total { color:#12213a; background:none; -webkit-text-fill-color:currentColor; font-size:32px; }
.home-layout { max-width:1440px; margin:0 auto; }
.home-greeting { background:none; color:#12213a; padding:0; box-shadow:none; border:0; display:flex; flex-direction:row; text-align:left; align-items:center; justify-content:space-between; gap:20px; }
.home-card::after,.cfg-card::after { display:none; }
.home-recent-heading { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:12px; }
.home-recent-heading h2 { margin:0; }.home-recent-empty { color:#53627a; padding:24px 0; }
.home-greeting h1 { font-size:32px; letter-spacing:-.035em; }
.home-greeting p { color:#53627a; margin-top:6px; }
.home-greeting .home-primary { display:inline-flex; width:auto; min-width:150px; min-height:46px; background:#ff791c; color:#12213a; padding:12px 20px; border:0; border-radius:8px; gap:10px; flex-direction:row; }
.home-primary svg { width:20px; height:20px; }
.home-section { margin-bottom:24px; }
.home-section-title { color:#53627a; font-size:12px; letter-spacing:.04em; }
.home-cards { grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:10px; }
.home-card { background:#fff; color:#12213a; border:1px solid #dbe2ec; border-radius:10px; box-shadow:none; min-height:74px; padding:16px; flex-direction:row; justify-content:flex-start; text-align:left; gap:12px; font-size:13px; }
.home-card .home-card-icon { color:#2563eb; }
.home-card .home-card-icon svg { width:21px; height:21px; }
.home-card:hover { background:#edf4ff; border-color:#afc8ed; transform:translateY(-1px); box-shadow:none; }
.kpi-card { border:1px solid #dbe2ec; border-radius:12px; padding:20px; text-align:left; background:#fff; cursor:pointer; }
.kpi-card strong { display:block; color:#12213a; font-size:28px; font-variant-numeric:tabular-nums; letter-spacing:-.025em; }
.kpi-card span { display:block; color:#53627a; font-size:13px; margin-top:5px; }
.kpi-card:hover { border-color:#8eacd4; }
.home-assistant { display:flex; align-items:center; gap:16px; padding:18px 24px; background:#edf4ff; border-radius:12px; margin:0 0 28px; }
.home-assistant svg { width:45px; height:56px; flex-shrink:0; }
.home-assistant p { color:#53627a; font-size:13px; }
.home-assistant button { margin-left:auto; flex-shrink:0; }
#af-panel { background:#fff; background-image:none; border:1px solid #dbe2ec; backdrop-filter:none; box-shadow:0 16px 48px #09102024; border-radius:16px; }
.af-header,.af-input-zona { background:#f8fafc; }
.af-msg-bot { background:#f0f4fa; box-shadow:none; }
.af-msg-user { background:#2563eb; color:#fff; box-shadow:none; }
.af-capsula { background:#fff; border:1px solid #c7d2e1; box-shadow:none; }
.af-chip { background:#fff; border:1px solid #dbe2ec; box-shadow:none; }
.toast { background:#12213a; backdrop-filter:none; }
.toast.error { background:#991b1b; }.toast.success { background:#166534; }
/* Authentication keeps the same identity as the public website. */
#login-screen { background:#fff; padding:0; align-items:stretch; justify-content:flex-start; min-height:100dvh; }
.auth-story { width:43%; flex-shrink:0; background:#091020; color:#fff; padding:54px clamp(28px,5vw,90px); display:flex; flex-direction:column; gap:32px; justify-content:center; }
.auth-story .brand { font-size:34px; margin-bottom:auto; padding-bottom:24px; }
.auth-story h1 { font-size:clamp(34px,3.8vw,58px); line-height:1.12; letter-spacing:-.035em; }
.auth-story p { color:#c3cfe1; max-width:34ch; line-height:1.7; }
.auth-story ul { list-style:none; display:grid; gap:18px; color:#c3cfe1; }
.auth-story li { display:flex; gap:12px; align-items:center; }
.auth-story li svg { color:#70a6ff; width:20px; height:20px; flex-shrink:0; }
.auth-billy { display:flex; align-items:center; gap:22px; margin-top:auto; padding-top:28px; }
.auth-billy svg { width:78px; height:100px; }
.login-card { width:57%; max-width:none; border:0; box-shadow:none; backdrop-filter:none; border-radius:0; background:#fff; color:#12213a; padding:48px clamp(28px,7vw,120px); align-self:center; }
.login-logo { display:none; }
.login-form { max-width:460px; margin:0 auto; }
.auth-title { font-size:36px; line-height:1.15; letter-spacing:-.035em; margin-bottom:12px; }
.auth-description { color:#53627a; margin-bottom:28px; }
.auth-progress { color:#53627a; font-size:13px; margin-bottom:26px; display:flex; gap:20px; }
.auth-progress [aria-current=step] { color:#1d4ed8; font-weight:700; }
.login-form label { color:#34445e; font-weight:600; margin-top:18px; font-size:14px; }
.login-form input,.login-form select { width:100%; min-height:48px; border:1px solid #b9c5d6; background:#fff; color:#12213a; border-radius:8px; padding:12px 14px; font-size:15px; }
.login-form input::placeholder { color:#65738a; }
.login-form input:focus { color:#12213a; background:#fff; border-color:#2563eb; }
.btn-login { background:#ff791c; color:#12213a; min-height:48px; box-shadow:none; border-radius:8px; margin-top:24px; }
.btn-login:hover { background:#f06b0c; box-shadow:none; transform:none; }
.login-error { color:#b91c1c; }
.auth-note { color:#53627a; font-size:13px; margin-top:16px; line-height:1.6; }
.auth-back { display:block; width:max-content; margin:32px auto 0; color:#53627a; font-size:13px; }
.auth-back:hover { color:#1d4ed8; }
.auth-business-back { background:none; color:#1d4ed8; border:0; cursor:pointer; margin-top:14px; font-size:14px; }
[hidden] { display:none !important; }
@media(max-width:1000px) { .content { padding:22px; } .auth-story { padding:36px; }.login-card { padding:40px; } }
@media(max-width:760px) {
  #login-screen { flex-direction:column; }.auth-story { width:100%; padding:22px 24px; gap:0; }
  .auth-story .brand { font-size:26px; margin:0; padding:0; }.auth-story h1,.auth-story>p,.auth-story ul,.auth-billy { display:none; }
  .login-card { width:100%; padding:30px 24px; }.auth-title { font-size:30px; }
  .content { padding:18px 14px calc(90px + env(safe-area-inset-bottom,0px)); }.home-greeting { flex-wrap:wrap; }.home-greeting h1 { font-size:27px; }
  .home-cards { grid-template-columns:repeat(2,minmax(0,1fr)); }.home-card { min-width:0; padding:13px; }
  .home-assistant { flex-wrap:wrap; padding:16px; }.home-assistant button { margin-left:0; }
  th,td { padding:10px; }.card { padding:17px; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none !important; transition:none !important; scroll-behavior:auto !important; } }

#billia-notificaciones { position:fixed; right:20px; bottom:24px; width:min(440px,calc(100vw - 40px)); display:flex; flex-direction:column; gap:10px; z-index:12000; max-height:70vh; overflow:auto; }
#billia-notificaciones .toast { position:static; transform:none; padding:16px; display:flex; align-items:flex-start; gap:14px; width:auto; }
#billia-notificaciones .toast span { flex:1; overflow-wrap:anywhere; }
#billia-notificaciones button { border:1px solid currentColor; background:transparent; color:inherit; border-radius:5px; padding:6px; cursor:pointer; }
.ux-confirm { border:1px solid #cbd5e1; border-radius:14px; padding:28px; max-width:540px; width:calc(100% - 32px); color:#17283f; background:#fff; }
.ux-confirm::backdrop { background:#07132699; }.ux-confirm h2 { margin:0 0 16px; }.ux-confirm p { margin:10px 0; overflow-wrap:anywhere; }.ux-confirm-actions { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:12px; margin-top:24px; }
.setup-checklist summary { font-weight:700; cursor:pointer; font-size:18px; }.setup-checklist>p { color:#53657e; margin:14px 0; }.setup-step { display:flex; align-items:center; justify-content:space-between; gap:14px; border-top:1px solid #e0e7ef; padding:12px 0; }.setup-step label { display:flex; align-items:center; gap:12px; margin:0; }.setup-step input { width:18px; height:18px; flex-shrink:0; accent-color:#2563eb; }
.config-group { margin-top:28px; }.config-group h3 { margin-bottom:14px; }.config-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(240px,100%),1fr)); gap:14px; }
.help-actions { display:flex; flex-wrap:wrap; gap:12px; margin:20px 0; }#page-soporte details,.advanced-fields { border-top:1px solid #d9e2ee; padding:16px 0; }#page-soporte summary,.advanced-fields summary { cursor:pointer; font-weight:600; }#page-soporte details p { line-height:1.65; max-width:70ch; margin:14px 0; }
.page button:focus-visible,.page a:focus-visible,summary:focus-visible { outline:3px solid #2563eb; outline-offset:3px; }
@media(max-width:700px) { #billia-notificaciones { bottom:84px; right:12px; width:calc(100vw - 24px); }.page input,.page select,.page textarea { font-size:16px; }.setup-step .btn { min-height:44px; }.page .btn { min-height:40px; } }

#page-compras .table-responsive table { min-width:760px; }
#page-compras table input,#page-compras table select { min-height:42px; border:1px solid #c9d5e4; border-radius:6px; padding:9px; font:14px var(--font-body, Inter, sans-serif); color:#1b2e48; background:#fff; }
#page-compras table input { width:110px; }#page-compras table select { min-width:190px; max-width:260px; }
#cxc-pago-form .payment-fields { margin:20px 0 8px; }#cxc-pago-form .form-group { min-width:180px; flex:1; }#cxc-resumen { gap:20px; margin:18px 0; }#cxc-resumen strong { margin-left:8px; }
#page-compras caption { text-align:left; font-weight:600; padding:12px 0; }
@media(max-width:700px) { #page-compras table input,#page-compras table select { font-size:16px; }#cxc-pago-form .form-group { flex-basis:100%; } }

/* Background work stays visible without covering the working area. */
#billia-activity { position:fixed; top:68px; right:16px; z-index:1100; max-width:calc(100vw - 32px); padding:9px 14px; border:1px solid #b8cbea; border-radius:8px; background:#eff5ff; color:#183d78; font-size:13px; pointer-events:none; }
#billia-activity[hidden] { display:none; }
.page-loading { padding:28px; min-height:220px; color:#344762; }
.loading-lines { display:grid; gap:18px; margin-top:28px; max-width:720px; }
.loading-lines span { display:block; height:18px; border-radius:4px; background:#e5ebf3; }
.loading-lines span:nth-child(2) { width:82%; }.loading-lines span:nth-child(3) { width:60%; }
.page button:active,.nav-item:active,.bn-item:active { filter:brightness(.94); }
@media(max-width:700px) { #billia-activity { top:auto; bottom:78px; right:12px; max-width:calc(100vw - 24px); }.page-loading { padding:20px 8px; } }

/* Cotizaciones: bounded list, visible search and compact mobile layout. */
.cot-datos { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.cot-buscador { display:flex; align-items:end; flex-wrap:wrap; gap:12px; }
.cot-buscador label { flex-basis:100%; font-weight:600; }
.cot-buscador input { flex:1; min-width:180px; min-height:44px; padding:10px 12px; border:1px solid #c7d2e1; border-radius:8px; background:#fff; color:#12213a; font:inherit; }
.cot-paginacion { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:16px; }
.cot-documento { display:block; color:#53627a; margin-top:4px; }
#cot-lista-estado { margin:12px 0; color:#53627a; }
@media(max-width:640px) {
 .cot-datos { grid-template-columns:1fr; }
 #cot-historial .tabla-scroll { overflow:visible; }
 #cot-historial table, #cot-historial tbody { display:block; width:100%; min-width:0; }
 #cot-historial thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
 #cot-historial tr { display:grid; grid-template-columns:1fr auto; padding:16px 0; border-bottom:1px solid #dbe2ec; }
 #cot-historial td { display:block; padding:4px 0; border:0; white-space:normal; overflow-wrap:anywhere; }
 #cot-historial td:nth-child(3), #cot-historial td:last-child { grid-column:1 / -1; }
 #cot-historial td:last-child { margin-top:10px; }
 #cot-historial .btn { min-height:44px; }
}

.home-quick { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:20px 0 24px; }
.home-quick .home-quick-item { min-width:0; min-height:64px; display:flex; flex-direction:row; justify-content:flex-start; gap:10px; padding:12px 14px; text-align:left; background:#fff; border:1px solid #dbe2ec; border-radius:10px; color:#12213a; box-shadow:none; }
.home-quick .home-card-icon { width:24px; height:24px; flex-shrink:0; background:none; color:#2457cf; }
.home-quick .home-card-icon svg { width:24px; height:24px; }
@media(max-width:900px) {
 .bottomnav { grid-template-columns:repeat(5,minmax(0,1fr)); }
 .bottomnav .bn-item { flex:1; min-width:0; }
}
@media(max-width:600px) {
 .home-quick { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:14px; }
 .home-quick .home-quick-item { font-size:13px; padding:10px; }
}
