/* Business ERP (a product of Wizeqal) — small layout fixes, v2.1 (both themes). */

/* Developer tools (demo builds only) had no background and sat on top of the
   sidebar navigation. Move it to the bottom-right corner and give it a surface. */
.wz-dev { left: auto; right: 16px; }
.wz-dev > .btn { background: var(--wz-surface); border: 1px solid var(--wz-border-strong); color: var(--wz-text); }
.wz-dev > .btn:hover { border-color: var(--wz-primary); color: var(--wz-primary); }
.wz-dev-panel { left: auto; right: 0; }
@media (max-width: 991.98px) { .wz-dev { left: auto; right: 10px; } }

/* Label/amount rows (e.g. dashboard "Cash & bank"): keep amounts on one line. */
.wz-list-plain > li > span:first-child { min-width: 0; }
.wz-list-plain > li > .tnum { white-space: nowrap; flex: none; text-align: right; }
.wz-card-body > .wz-list-plain > li { padding-left: 0; padding-right: 0; }

/* v1.0.0-rc1: long names in the top-bar switchers end with an ellipsis instead of a hard clip */
.wz-switch .form-select{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}
.wz-switch .form-select:first-child{min-width:12.5rem}
td.num{white-space:nowrap}

/* Developer tools card (demo build only) — Settings → General */
.wz-devcard { margin-top: 1rem; border-style: dashed; }
.wz-devcard-head { display: flex; gap: .85rem; align-items: flex-start; padding-bottom: .9rem; margin-bottom: .9rem; border-bottom: 1px solid var(--wz-border); }
.wz-devcard-ico { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--wz-primary) 12%, transparent); color: var(--wz-primary); font-size: 1.05rem; }
.wz-devcard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem 1.5rem; }
.wz-devcard-item { min-width: 0; }
.wz-devcard-help { font-size: .8rem; color: var(--wz-text-faint, #5B6B82); margin: .35rem 0 0; line-height: 1.45; }
.wz-devcard .btn .bi { margin-right: .35rem; }

/* ===== Sign-in / auth screens (v1.0.0-rc3) ===== */
.wz-auth { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100dvh; }
.wz-auth-art { padding: 40px clamp(32px, 4.5vw, 64px); justify-content: space-between; gap: 28px;
  background: radial-gradient(900px 520px at -10% -10%, rgba(6, 182, 212, .22), transparent 60%), radial-gradient(800px 560px at 115% 105%, rgba(37, 99, 235, .38), transparent 60%), linear-gradient(160deg, #0B1220 0%, #0F172A 55%, #0B1B3A 100%); }
.wz-auth-art::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: linear-gradient(rgba(148, 163, 184, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 184, .07) 1px, transparent 1px); background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(70% 60% at 30% 40%, #000, transparent); mask-image: radial-gradient(70% 60% at 30% 40%, #000, transparent); }
.wz-auth-art > * { position: relative; z-index: 1; }
.wz-auth-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; width: max-content; }
.wz-auth-by { color: #94A3B8; margin-top: 4px; font-size: 11.5px; font-weight: 600; }
.wz-auth-hero { max-width: 520px; }
.wz-auth-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #67E8F9; margin-bottom: 14px; }
.wz-auth-eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: currentColor; }
.wz-auth-art h1 { font-size: clamp(1.75rem, 2.7vw, 2.5rem); max-width: 17ch; margin-bottom: 12px; }
.wz-auth-art p { color: #A3B1C6; }
.wz-auth-art ul { gap: 10px; margin-top: 22px; grid-template-columns: 1fr 1fr; max-width: none; }
.wz-auth-art li { align-items: center; font-size: 13.5px; }
.wz-auth-tick { flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: rgba(34, 211, 238, .1); border: 1px solid rgba(34, 211, 238, .22); }
.wz-auth-tick .bi { color: #22D3EE; font-size: 14px; }
.wz-auth-foot { color: #7F93B0 !important; font-size: 12.5px !important; margin: 0; }
/* mini dashboard preview */
.wz-auth-preview { margin-top: 26px; border-radius: 16px; padding: 14px; background: linear-gradient(180deg, rgba(30, 41, 59, .78), rgba(15, 23, 42, .78)); border: 1px solid rgba(148, 163, 184, .18);
  box-shadow: 0 30px 60px -20px rgba(2, 6, 23, .7), inset 0 1px 0 rgba(255, 255, 255, .06); backdrop-filter: blur(6px); }
.wz-ap-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.wz-ap-bar span { width: 9px; height: 9px; border-radius: 50%; background: #334155; }
.wz-ap-bar span:nth-child(1) { background: #F87171; } .wz-ap-bar span:nth-child(2) { background: #FBBF24; } .wz-ap-bar span:nth-child(3) { background: #34D399; }
.wz-ap-bar em { margin-left: 8px; font-style: normal; font-size: 11.5px; color: #94A3B8; font-weight: 600; }
.wz-ap-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.wz-ap-kpis > div { background: rgba(15, 23, 42, .7); border: 1px solid rgba(148, 163, 184, .14); border-radius: 10px; padding: 9px 10px; min-width: 0; }
.wz-ap-kpis small { display: block; color: #94A3B8; font-size: 10.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wz-ap-kpis b { display: block; color: #F8FAFC; font-size: 15px; margin-top: 2px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wz-ap-kpis i { display: block; font-style: normal; font-size: 10.5px; color: #94A3B8; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wz-ap-kpis i.up { color: #34D399; } .wz-ap-kpis i.warn { color: #FBBF24; }
.wz-ap-chart { display: block; width: 100%; height: 64px; margin-top: 10px; }
/* form side */
.wz-auth-form { flex-direction: column; justify-content: space-between; align-items: stretch; padding: 22px clamp(20px, 4vw, 56px); gap: 24px; background: var(--wz-surface); }
.wz-auth-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.wz-auth-top a { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--wz-text-muted, #475569); text-decoration: none; padding: 6px 10px; border-radius: 8px; }
.wz-auth-top a:hover { color: var(--wz-primary); background: color-mix(in srgb, var(--wz-primary) 8%, transparent); }
.wz-auth-box { max-width: 400px; margin: 0 auto; width: 100%; }
.wz-auth-title { font-size: 1.75rem !important; font-weight: 800; letter-spacing: -.02em; margin-bottom: 6px; }
.wz-auth-sub { color: var(--wz-text-muted, #475569); margin-bottom: 26px; }
.wz-auth-demo-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: #92400E; background: #FEF3C7; border: 1px solid #FDE68A; padding: 4px 10px; border-radius: 999px; margin-bottom: 16px; }
[data-bs-theme="dark"] .wz-auth-demo-pill { color: #FDE68A; background: rgba(251, 191, 36, .12); border-color: rgba(251, 191, 36, .3); }
.wz-auth-fields .form-control { min-height: 46px; border-radius: 10px; }
.wz-auth-fields .form-label { font-weight: 600; font-size: 13.5px; }
.wz-pw { position: relative; }
.wz-pw .form-control { padding-right: 48px; }
.wz-pw-toggle { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--wz-text-muted, #475569); display: grid; place-items: center; cursor: pointer; }
.wz-pw-toggle:hover { color: var(--wz-primary); background: color-mix(in srgb, var(--wz-primary) 8%, transparent); }
.wz-pw-toggle:focus-visible { outline: 3px solid color-mix(in srgb, var(--wz-primary) 50%, transparent); outline-offset: 1px; }
.wz-pw + .invalid-feedback, .wz-pw ~ .invalid-feedback { display: none; }
.was-validated .wz-pw:has(:invalid) ~ .invalid-feedback, .wz-pw:has(.is-invalid) ~ .invalid-feedback { display: block; }
.wz-auth-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: -2px 0 18px; }
.wz-auth-secure { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--wz-text-faint, #5B6B82); }
.wz-auth-secure .bi { color: #059669; }
.wz-auth-submit { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: 10px; font-weight: 700; box-shadow: 0 10px 24px -10px rgba(37, 99, 235, .7); }
.wz-auth-submit .bi { transition: transform .15s ease; } .wz-auth-submit:hover .bi { transform: translateX(3px); }
.wz-auth-signup { margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; border-radius: 12px; text-decoration: none; color: var(--wz-text); border: 1px solid var(--wz-border); background: color-mix(in srgb, var(--wz-primary) 4%, var(--wz-surface)); transition: border-color .15s, transform .15s; }
.wz-auth-signup:hover { border-color: var(--wz-primary); transform: translateY(-1px); color: var(--wz-text); }
.wz-auth-signup > span { display: flex; flex-direction: column; font-size: 13.5px; } .wz-auth-signup b { font-weight: 700; }
.wz-auth-signup > span > span { color: var(--wz-primary); font-weight: 600; }
.wz-auth-signup > .bi { color: var(--wz-primary); }
.wz-auth-demos { margin-top: 22px; border-top: 1px solid var(--wz-border); padding-top: 14px; }
.wz-auth-demos summary { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--wz-text-muted, #475569); list-style: none; margin-bottom: 8px; }
.wz-auth-demos summary::-webkit-details-marker { display: none; }
.wz-auth-demos summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .15s; }
.wz-auth-demos[open] summary::after { transform: rotate(-135deg); }
.wz-auth-demos-n { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--wz-surface-2, #F1F5F9); color: var(--wz-text-muted, #475569); letter-spacing: 0; }
.wz-auth-demos .wz-demo-users { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wz-auth-demos .wz-demo-users button { padding: 8px 10px; gap: 8px; border-radius: 10px; min-width: 0; }
.wz-auth-demos .wz-demo-users .wz-avatar { width: 30px; height: 30px; font-size: 11px; flex: none; }
.wz-auth-demos .who { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wz-auth-demos .what { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wz-auth-legal { text-align: center; font-size: 12px; color: var(--wz-text-faint, #5B6B82); margin: 0; }
.wz-auth-legal a { color: inherit; }
@media (max-width: 1100px) { .wz-auth-art ul { grid-template-columns: 1fr; } }
@media (max-width: 991.98px) {
  .wz-auth { grid-template-columns: 1fr; }
  .wz-auth-art { padding: 20px 20px 22px; gap: 10px; }
  .wz-auth-art h1 { font-size: 1.35rem; max-width: none; margin-bottom: 4px; }
  .wz-auth-art p, .wz-auth-preview, .wz-auth-eyebrow, .wz-auth-foot, .wz-auth-art ul { display: none !important; }
  .wz-auth-form { padding: 14px 18px 22px; }
  .wz-auth-box { padding-top: 4px; }
}
@media (max-width: 420px) { .wz-auth-demos .wz-demo-users { grid-template-columns: 1fr; } .wz-auth-secure span { display: none; } }
.wz-auth-demos .wz-demo-users { grid-template-columns: 1fr; gap: 6px; }
.wz-auth-demos .wz-demo-users button { padding: 7px 10px; }
@media (max-width: 991.98px) { .wz-auth-art { min-height: 0 !important; justify-content: flex-start; } .wz-auth-hero { margin: 0 !important; padding: 0 !important; } .wz-auth-form { justify-content: flex-start; } .wz-auth-box { margin-top: 8px; } .wz-auth-legal { margin-top: auto; } }
@media (max-width: 420px) { .wz-auth-secure { display: none; } .wz-auth-row { justify-content: flex-end; } }
.wz-help-menu button { display: flex !important; align-items: center; gap: 10px; }
.wz-help-menu button .bi { color: var(--wz-primary); font-size: 15px; width: 18px; }
.wz-devcard-tag { display: inline-block; vertical-align: 2px; margin-left: 6px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; color: #92400E; background: #FEF3C7; border: 1px solid #FDE68A; }
[data-bs-theme="dark"] .wz-devcard-tag { color: #FDE68A; background: rgba(251, 191, 36, .12); border-color: rgba(251, 191, 36, .3); }
.b-mock { font-family: inherit !important; letter-spacing: .02em !important; font-weight: 650; }

/* v1.0.0-rc4 — offline sync pill + panel (offline.js) */
.wz-sync-pill{position:fixed;left:16px;bottom:16px;z-index:2050;display:inline-flex;align-items:center;gap:8px;max-width:calc(100vw - 32px);padding:9px 14px;border-radius:999px;border:1px solid var(--wz-border-strong,#cbd5e1);background:var(--wz-surface,#fff);color:var(--wz-text,#0f172a);font-size:13px;font-weight:600;box-shadow:0 10px 30px rgba(15,23,42,.18);cursor:pointer;overflow:hidden}
.wz-sync-pill[hidden]{display:none}
.wz-sync-pill .bi{color:var(--wz-primary,#2563eb);font-size:1rem}
.wz-sync-pill.is-failed{border-color:#fca5a5}.wz-sync-pill.is-failed .bi{color:#dc2626}
.wz-sync-pill.is-syncing .bi{animation:wzspin 1s linear infinite}
.wz-sync-pill:hover{border-color:var(--wz-primary,#2563eb)}
.wz-sync-pill:focus-visible{outline:none;box-shadow:var(--wz-focus,0 0 0 3px rgba(37,99,235,.35))}
.wz-sync-bar{position:absolute;left:0;right:0;bottom:0;height:3px;background:rgba(37,99,235,.15)}
.wz-sync-bar>b{display:block;height:100%;background:linear-gradient(90deg,#2563eb,#06b6d4);transition:width .3s}
@keyframes wzspin{to{transform:rotate(360deg)}}
.wz-sync-list{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.wz-sync-item{display:flex;align-items:center;gap:12px;justify-content:space-between;padding:10px 12px;border:1px solid var(--wz-border,#e2e8f0);border-radius:10px;background:var(--wz-surface-2,#f8fafc)}
.wz-sync-item.is-failed{border-color:#fecaca}
.wz-sync-item.is-failed .wz-sync-st{color:#dc2626;font-weight:600}
.wz-sync-item.is-sending .wz-sync-st{color:var(--wz-primary,#2563eb);font-weight:600}
@media (max-width:767.98px){.wz-sync-pill{left:12px;bottom:76px;font-size:12.5px}}
@media (prefers-reduced-motion:reduce){.wz-sync-pill.is-syncing .bi{animation:none}}
[data-theme=dark] .wz-sync-pill{box-shadow:0 10px 30px rgba(0,0,0,.5)}
[data-theme=dark] .wz-sync-item.is-failed{border-color:rgba(248,113,113,.45)}
[data-theme=dark] .wz-sync-item.is-failed .wz-sync-st{color:#fca5a5}
html.wz-offline .wz-toasts{bottom:88px}
