/* EMENS ERP – visual system. Brand per EGL-LH-02: teal #004555, light teal #0E7C86, Arial. */
:root {
  --brand: #004555;
  --brand-2: #0E7C86;
  --brand-3: #13a3a8;
  --brand-dark: #00262f;
  --accent: #f5a524;
  --ink: #17262a;
  --muted: #5f7175;
  --line: #e2e9eb;
  --bg: #f2f6f7;
  --card: #ffffff;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 40, 46, .06), 0 4px 16px rgba(16, 40, 46, .06);
  --shadow-lg: 0 8px 30px rgba(16, 40, 46, .12);
  --sidebar-w: 262px;
  --topbar-h: 62px;
  --bs-body-font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  --bs-body-color: #17262a;
  --bs-link-color: #0E7C86;
  --bs-link-color-rgb: 14, 124, 134;
  --bs-link-hover-color: #004555;
  --bs-border-color: #e2e9eb;
  --bs-primary: #0E7C86;
  --bs-primary-rgb: 14, 124, 134;
}
html, body { background: var(--bg); }
body { font-family: var(--bs-body-font-family); font-size: .92rem; color: var(--ink); }
a { text-decoration: none; }
a:hover { text-decoration: underline; }
.env-banner { background: linear-gradient(90deg, #b45309, #d97706); color: #fff; text-align: center; font-weight: bold; font-size: .78rem; padding: 3px; letter-spacing: .02em; }

/* ---------------- top bar ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 1030; height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between; padding: 0 1rem;
  background: linear-gradient(90deg, var(--brand-dark), var(--brand) 55%, var(--brand-2));
  color: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
}
.brand { display: flex; align-items: center; gap: .65rem; color: #fff; text-decoration: none !important; }
.brand img { background: #fff; border-radius: 8px; padding: 3px; }
.brand span { font-size: 1.15rem; letter-spacing: .02em; line-height: 1; }
.brand small { display: block; font-size: .66rem; letter-spacing: .18em; opacity: .7; margin-top: 3px; }
.btn-icon { color: #fff; font-size: 1.5rem; padding: 0 .3rem; border: 0; }
.btn-icon:hover { color: var(--accent); }
.topbar-icon { position: relative; color: #fff; font-size: 1.25rem; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; transition: background .15s; }
.topbar-icon:hover { background: rgba(255, 255, 255, .12); color: #fff; text-decoration: none; }
.dot-badge { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #e5484d; color: #fff; font-size: .65rem; font-weight: bold; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--brand); }
.user-chip { display: flex; align-items: center; gap: .55rem; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); color: #fff; border-radius: 999px; padding: 3px 12px 3px 3px; font-size: .85rem; }
.user-chip:hover, .user-chip[aria-expanded="true"] { background: rgba(255, 255, 255, .2); }
.user-chip small { font-size: .7rem; opacity: .75; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--brand-dark); display: grid; place-items: center; font-weight: bold; font-size: .8rem; }
.conn { padding: 2px 10px; border-radius: 999px; font-size: .72rem; font-weight: bold; letter-spacing: .03em; }
.conn::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.conn-online { background: rgba(25, 135, 84, .25); color: #b9f6d3; }
.conn-online::before { background: #34d399; box-shadow: 0 0 6px #34d399; }
.conn-offline { background: #dc3545; color: #fff; }
.conn-offline::before { background: #fff; }

/* ---------------- shell & sidebar ---------------- */
.shell { display: flex; align-items: stretch; min-height: calc(100vh - var(--topbar-h)); }
.sidebar {
  flex: 0 0 var(--sidebar-w); width: var(--sidebar-w); max-width: 85vw;
  background: linear-gradient(180deg, var(--brand-dark), #013640) !important; color: #cfe3e6;
  display: flex; flex-direction: column;
}
@media (min-width: 992px) {
  .sidebar { position: sticky; top: var(--topbar-h); height: calc(100vh - var(--topbar-h)); overflow-y: auto; }
}
/* phones/tablets: the slide-out menu scrolls inside itself (header and footer stay put) */
@media (max-width: 991.98px) {
  .sidebar { height: 100vh; height: 100dvh; }
  .sidebar .offcanvas-header { flex: 0 0 auto; }
  .sidebar-nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y; }
  .sidebar-foot { flex: 0 0 auto; }
}

/* "Install app" banner (PWA) */
.install-banner {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 1080; max-width: 520px; margin: 0 auto;
  display: flex; align-items: center; gap: .75rem; padding: .75rem .9rem; border-radius: 14px;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand-2)); color: #fff;
  box-shadow: 0 10px 30px rgba(0, 40, 50, .35); padding-bottom: calc(.75rem + env(safe-area-inset-bottom));
}
.install-banner.d-none { display: none !important; }
.install-banner img { border-radius: 10px; background: #fff; flex: 0 0 auto; }
.install-banner .small { color: #cfe8eb; }
.min-w-0 { min-width: 0; }
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .15); border-radius: 3px; }
.sidebar-nav { padding: .6rem 0 1rem; flex: 1; }
.menu-section { font-size: .66rem; text-transform: uppercase; letter-spacing: .14em; color: #7fb3ba; padding: 1rem 1.25rem .35rem; font-weight: bold; }
.menu-link {
  display: flex; align-items: center; gap: .7rem; margin: 1px .6rem; padding: .48rem .75rem; border-radius: 8px;
  color: #d9eaec; font-size: .88rem; transition: background .15s, color .15s;
}
.menu-link i { font-size: 1.05rem; width: 1.2rem; text-align: center; opacity: .85; }
.menu-link:hover { background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none; }
.menu-link.active { background: linear-gradient(90deg, var(--brand-2), var(--brand-3)); color: #fff; font-weight: bold; box-shadow: 0 3px 10px rgba(14, 124, 134, .45); }
.menu-link.active i { opacity: 1; }
.menu-badge { margin-left: auto; background: var(--accent); color: var(--brand-dark); border-radius: 999px; font-size: .68rem; font-weight: bold; padding: 1px 7px; }
.sidebar-foot { font-size: .68rem; color: #6f9ea4; padding: .8rem 1.25rem; border-top: 1px solid rgba(255, 255, 255, .07); }
.main-content { flex: 1 1 auto; min-width: 0; padding: 1.5rem; }
@media (max-width: 575px) { .main-content { padding: 1rem .75rem; } }

/* ---------------- page header ---------------- */
.page-title { color: var(--brand); font-size: 1.45rem; font-weight: bold; margin-bottom: .25rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.page-sub { color: var(--muted); margin-bottom: 1.1rem; max-width: 1100px; }
h2.h6 { color: var(--brand); font-weight: bold; text-transform: uppercase; letter-spacing: .06em; font-size: .8rem; margin-top: 1.4rem; }

/* ---------------- cards, KPIs ---------------- */
.card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card-header { background: #fff; font-weight: bold; color: var(--brand); border-bottom: 1px solid var(--line); padding: .8rem 1rem; }
.card-footer { background: #fafcfc; }
details.card > summary { cursor: pointer; padding: .2rem 0; }
.kpi {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem;
  height: 100%; box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s; overflow: hidden;
}
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, var(--brand-3), var(--brand)); }
a:hover .kpi { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
a:has(.kpi) { text-decoration: none; }
.kpi .v { font-size: 1.5rem; font-weight: bold; color: var(--brand); line-height: 1.2; }
.kpi .l { font-size: .78rem; color: var(--muted); margin-top: .2rem; }
.kpi.warn::before { background: linear-gradient(180deg, #fbbf24, #d97706); }
.kpi.warn .v { color: #b45309; }
.kpi.bad::before { background: linear-gradient(180deg, #f87171, #b91c1c); }
.kpi.bad .v { color: #b02a37; }

/* ---------------- tables ---------------- */
.table { --bs-table-bg: #fff; margin-bottom: 1rem; }
.table-responsive > .table, .table.bg-white { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.card .table { box-shadow: none; border: 0; border-radius: 0; margin-bottom: 0; }
.table thead th { background: #eef5f6; color: #26464c; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; border-bottom: 2px solid #d6e5e8; padding-top: .6rem; padding-bottom: .6rem; }
.table tbody tr { transition: background .1s; }
.table-hover tbody tr:hover > * { --bs-table-bg-state: #f3fafb; }
.table td { vertical-align: middle; border-color: #edf2f3; }
.table tfoot td, .table tfoot th { background: #f7fbfb; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------------- buttons, forms, badges ---------------- */
.btn { border-radius: 8px; font-weight: 600; }
.btn-brand { background: linear-gradient(180deg, var(--brand-2), var(--brand)); color: #fff; border: 0; box-shadow: 0 2px 6px rgba(0, 69, 85, .3); }
.btn-brand:hover, .btn-brand:focus { background: linear-gradient(180deg, var(--brand-3), var(--brand-2)); color: #fff; }
.btn-brand:disabled { background: #9bb7bb; box-shadow: none; }
.form-label { font-weight: 600; font-size: .84rem; color: #33494e; margin-bottom: .3rem; }
.form-control, .form-select { border-radius: 8px; border-color: #cfdcdf; }
.form-control:focus, .form-select:focus { border-color: var(--brand-3); box-shadow: 0 0 0 .2rem rgba(19, 163, 168, .2); }
.form-check-input:checked { background-color: var(--brand-2); border-color: var(--brand-2); }
.badge { font-weight: 600; letter-spacing: .02em; border-radius: 6px; padding: .35em .6em; }
.alert { border-radius: var(--radius); border: 0; box-shadow: var(--shadow); }
.flash { animation: slideIn .25s ease-out; }
@keyframes slideIn { from { transform: translateY(-6px); opacity: 0; } to { transform: none; opacity: 1; } }
.list-group-item-action:hover { background: #f3fafb; }
.nav-tabs .nav-link.active { color: var(--brand); font-weight: bold; border-top: 3px solid var(--brand-2); }
.nav-tabs .nav-link { color: var(--muted); }
.dropdown-menu { border-radius: 10px; border-color: var(--line); }

/* role picker (user form) */
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .6rem; }
.role-card { display: flex; gap: .6rem; align-items: flex-start; border: 1.5px solid var(--line); border-radius: 10px; padding: .65rem .8rem; background: #fff; cursor: pointer; transition: border-color .12s, background .12s; height: 100%; }
.role-card:hover { border-color: var(--brand-3); }
.role-card input { margin-top: .2rem; }
.role-card:has(input:checked) { border-color: var(--brand-2); background: #eaf6f7; }
.role-card .lvl { display: inline-block; font-size: .68rem; font-weight: bold; color: #fff; background: var(--brand-2); border-radius: 5px; padding: 0 6px; margin-right: 4px; }
.role-card small { color: var(--muted); display: block; margin-top: 2px; }

/* report scope banners: never let a sample/filter look like a complete register */
.scope { border-left: 6px solid; padding: .6rem 1rem; margin-bottom: 1rem; background: #fff; font-size: .85rem; border-radius: 0 var(--radius) var(--radius) 0; box-shadow: var(--shadow); }
.scope b { letter-spacing: .03em; }
.scope-complete { border-color: #198754; }
.scope-filtered { border-color: #0d6efd; }
.scope-sample { border-color: #dc3545; background: #fff5f5; }
.scope-summary { border-color: #6c757d; }
.scope-statement { border-color: var(--brand); }

.choice-card { border: 2px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; cursor: pointer; background: #fff; height: 100%; transition: all .15s; }
.choice-card:hover { border-color: var(--brand-3); box-shadow: var(--shadow); }
.btn-check:checked + .choice-card { border-color: var(--brand-2); background: #eaf6f7; box-shadow: 0 0 0 3px rgba(19, 163, 168, .18); }
.stock-ok { color: #198754; font-weight: bold; }
.stock-low { color: #b45309; font-weight: bold; }
.stock-none { color: #b02a37; font-weight: bold; }
.sim-tag { background: #6f42c1; color: #fff; padding: 0 6px; border-radius: 4px; font-size: .75rem; }

/* login page */
.login-bg { min-height: 100vh; background: radial-gradient(circle at 20% 20%, #0E7C86 0, #004555 45%, #00262f 100%); }
.login-card { border: 0; border-radius: 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }

/* ---------------- printed documents (A4) ---------------- */
.doc { background: #fff; max-width: 210mm; margin: 0 auto; padding: 12mm; border: 1px solid #ddd; border-radius: 6px; box-shadow: var(--shadow); }
.doc h1 { font-size: 15pt; color: var(--brand); margin: 0; }
.doc .doc-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 3px solid var(--brand); padding-bottom: 6px; margin-bottom: 8px; }
.doc .co { font-size: 8.5pt; color: #333; text-align: right; }
.doc table { width: 100%; border-collapse: collapse; font-size: 9pt; margin-bottom: 8px; }
.doc th, .doc td { border: 1px solid #777; padding: 3px 5px; vertical-align: top; }
.doc th { background: #e3eff1; text-align: left; }
.doc .sec { background: var(--brand); color: #fff; font-weight: bold; padding: 3px 6px; margin: 10px 0 4px; font-size: 9.5pt; }
.doc .sw { display: block; font-style: italic; font-weight: normal; font-size: 7.5pt; color: #555; }
.doc .sec .sw { color: #d9eef0; display: inline; }
.doc .rules { font-size: 8pt; border: 1px solid #777; padding: 5px; margin-bottom: 6px; }
.doc .sig td { height: 34px; }
.doc .foot { font-size: 7.5pt; color: #555; border-top: 1px solid #aaa; margin-top: 10px; padding-top: 4px; }
@media print {
  @page { size: A4; margin: 10mm; }
  body, html { background: #fff; font-size: 9pt; }
  .no-print, .topbar, .sidebar, .btn, .alert, form.no-print, .env-banner { display: none !important; }
  .main-content { padding: 0 !important; }
  .doc { border: 0; padding: 0; max-width: none; box-shadow: none; }
  .scope, .card, .table { box-shadow: none !important; }
  a { text-decoration: none; color: #000; }
}

/* dashboard hero */
.hero { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; padding: 1.4rem 1.6rem; border-radius: 16px; color: #fff;
  background: radial-gradient(circle at 85% -20%, rgba(245, 165, 36, .35), transparent 40%), linear-gradient(120deg, var(--brand-dark), var(--brand) 50%, var(--brand-2)); box-shadow: var(--shadow-lg); }
.hero-title { font-size: 1.6rem; font-weight: bold; }
.hero-sub { opacity: .8; font-size: .9rem; }
.hero-btn { background: rgba(255, 255, 255, .95); color: var(--brand); border: 0; }
.hero-btn:hover { background: #fff; color: var(--brand-dark); text-decoration: none; }

/* ---------------- small screens ---------------- */
.topbar > div { min-width: 0; }
@media (max-width: 575px) {
  .topbar { padding: 0 .5rem; }
  .conn { font-size: 0; padding: 4px; }                 /* keep only the status dot */
  .conn::before { margin-right: 0; }
  .user-chip { padding: 2px; }
  .user-chip.dropdown-toggle::after { display: none; }
  .topbar-icon { width: 34px; }
  .hero { padding: 1.1rem; }
  .hero-title { font-size: 1.3rem; }
  .card > .table, .card > table { display: block; overflow-x: auto; white-space: nowrap; }
  .page-title { font-size: 1.2rem; }
}

/* product photos */
.prod-thumb { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: inline-grid; place-items: center; background: #fff; }
.prod-thumb-lg { width: 150px; height: 150px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); display: grid; place-items: center; background: #fff; }
.prod-noimg { color: #b8c7ca; font-size: 1.3rem; background: #f4f8f9; }
.prod-thumb-lg.prod-noimg { font-size: 3rem; }

/* ---------------- commercial documents (quotation / proforma / invoice), after the company proforma ---------------- */
.doc.pf { padding: 0; overflow: hidden; color: #1b2a2e; }
.pf-head { display: grid; grid-template-columns: 110px 1fr 110px; align-items: center; gap: 12px; padding: 18px 26px 14px; border-bottom: 4px solid var(--brand); }
.pf-logo img { width: 92px; border: 2px solid var(--brand); padding: 4px; border-radius: 4px; background: #fff; }
.pf-co { text-align: center; }
.pf-brand { font-size: 26pt; font-weight: bold; color: var(--brand); letter-spacing: .02em; line-height: 1; }
.pf-name { font-size: 13pt; font-weight: bold; color: #24383d; letter-spacing: .05em; margin: 4px 0 6px; }
.pf-contacts, .pf-addr { font-size: 8.5pt; color: #333; }
.pf-qr { text-align: center; font-size: 7.5pt; color: #444; }
.pf-qr img { width: 78px; display: block; margin: 0 auto 2px; }
.pf-meta { display: flex; justify-content: space-between; gap: 20px; padding: 16px 26px 10px; font-size: 9.5pt; }
.pf-meta > div > div { margin-bottom: 2px; }
.pf-title { font-size: 17pt; font-weight: bold; color: var(--brand); margin-bottom: 6px; letter-spacing: .02em; }
.pf-billto { text-align: right; }
.pf-label { font-weight: bold; color: #333; margin-bottom: 4px; }
.pf-cust { font-weight: bold; font-size: 10.5pt; }
.pf-cancel { margin: 10px 26px 0; border: 3px solid #b02a37; color: #b02a37; font-weight: bold; text-align: center; padding: 4px; }
.doc .pf-items { width: calc(100% - 52px); margin: 6px 26px 0; border: 2px solid var(--brand); border-radius: 6px; border-collapse: separate; border-spacing: 0; overflow: hidden; position: relative;
  background: url("../img/emens-logo.png") center / 38% no-repeat; }
.doc .pf-items thead th { background: #f2f6f7; border: 0; border-bottom: 1px solid #c9d6d9; border-left: 1.5px solid var(--brand); padding: 7px 8px; font-size: 9pt; vertical-align: bottom; }
.doc .pf-items thead th:first-child, .doc .pf-items td:first-child { border-left: 0; }
.doc .pf-items td { border: 0; border-left: 1.5px solid var(--brand); border-bottom: 1px solid #dfe7e9; padding: 9px 8px; font-size: 9pt; background: rgba(255, 255, 255, .9); }
.doc .pf-items tbody tr:last-child td { border-bottom: 0; }
.pf-no { font-weight: bold; text-align: center; }
.pf-img { width: 96px; height: 96px; object-fit: cover; border: 1px solid #bbb; border-radius: 3px; display: block; margin-bottom: 8px; }
.pf-item-name { font-weight: bold; font-size: 10pt; margin-bottom: 3px; }
.pf-spec { font-size: 8.5pt; color: #333; line-height: 1.45; }
.doc .pf-totals { width: calc(100% - 52px); margin: 0 26px 10px; border-collapse: collapse; }
.doc .pf-totals td { border: 0; border-bottom: 1px solid #e3eaec; padding: 5px 8px; text-align: right; font-size: 9.5pt; }
.doc .pf-totals td:first-child { width: 80%; }
.doc .pf-totals .pf-grand td { font-weight: bold; font-size: 12pt; color: var(--brand); border-top: 2px solid var(--brand); border-bottom: 0; padding-top: 8px; }
.pf-fiscal { padding: 4px 26px 6px; font-size: 9pt; }
.pf-small { font-size: 8pt; color: #444; margin-top: 4px; }
.pf-sign { display: flex; justify-content: space-between; padding: 14px 26px 18px; font-size: 9pt; }
.pf-bank { background: var(--brand-dark); color: #fff; padding: 14px 26px 10px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.pf-bank-title { font-weight: bold; font-size: 11pt; margin-bottom: 8px; letter-spacing: .03em; }
.pf-bank-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 30px; font-size: 8.5pt; }
.pf-bank-grid span { display: block; opacity: .85; }
.pf-bank-note { font-size: 8pt; margin-top: 6px; opacity: .9; }
.pf-thanks { text-align: center; font-size: 8.5pt; margin-top: 10px; border-top: 1px solid rgba(255, 255, 255, .2); padding-top: 6px; }
@media print {
  .doc.pf { border-radius: 0; }
  .pf-items, .pf-head, .pf-bank { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pf-items tr { break-inside: avoid; }
}
@media (max-width: 575px) {
  .pf-head { grid-template-columns: 70px 1fr 70px; padding: 12px; }
  .pf-logo img { width: 62px; } .pf-qr img { width: 56px; } .pf-brand { font-size: 18pt; }
  .pf-meta { flex-direction: column; padding: 12px; } .pf-billto { text-align: left; }
}

/* ---------------- dashboard: business at a glance + charts ---------------- */
.glance-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .75rem; }
.glance {
  display: flex; align-items: center; gap: .85rem; padding: .9rem 1rem; border-radius: var(--radius);
  background: var(--card); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; transition: transform .15s, box-shadow .15s;
}
.glance:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); color: var(--ink); text-decoration: none; }
.glance-ic {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem; color: #fff;
  background: linear-gradient(135deg, var(--brand-3), var(--brand));
}
.glance-v { display: block; font-size: 1.55rem; font-weight: bold; line-height: 1.1; color: var(--brand); }
.glance-l { display: block; font-size: .78rem; color: var(--muted); }

.chart-card .card-body { padding: 1rem 1.1rem .8rem; }
.chart-headline { font-weight: bold; color: var(--brand); font-size: 1.05rem; }
.chart-headline small { font-weight: normal; color: var(--muted); font-size: .75rem; }
.chart-note { font-size: .72rem; color: var(--muted); margin-top: .5rem; }
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-base { stroke: #b9c7ca; stroke-width: 1; }
.chart-tick { fill: var(--muted); font-size: 12px; font-family: var(--bs-body-font-family); }
.chart-bar { fill: var(--brand-2); transition: fill .12s; }
.chart-hit { fill: transparent; }
.chart-col { outline: none; cursor: default; }
.chart-col:hover .chart-hit, .chart-col:focus .chart-hit { fill: rgba(14, 124, 134, .07); }
.chart-col:hover .chart-bar, .chart-col:focus .chart-bar { fill: var(--brand); }

.hbars { display: flex; flex-direction: column; gap: .55rem; }
.hbar { display: grid; grid-template-columns: minmax(0, 7.5rem) 1fr minmax(2.6rem, max-content); align-items: center; gap: .6rem; border-radius: 6px; padding: 2px 4px; outline: none; }
.hbar:hover, .hbar:focus { background: rgba(14, 124, 134, .06); }
.hbar-label { font-size: .8rem; color: var(--ink); line-height: 1.15; overflow: hidden; text-overflow: ellipsis; }
.hbar-label small { display: block; color: var(--muted); font-size: .68rem; }
.hbar-track { height: 10px; background: #edf2f3; border-radius: 0 5px 5px 0; overflow: hidden; }
.hbar-fill { height: 100%; background: var(--brand-2); border-radius: 0 5px 5px 0; }
.hbar-fill.muted { background: #a9b9bc; }
.hbar-val { font-size: .8rem; font-weight: bold; text-align: right; white-space: nowrap; color: var(--ink); font-variant-numeric: tabular-nums; }

.chart-tip {
  position: fixed; z-index: 1090; pointer-events: none; background: var(--brand-dark); color: #fff; font-size: .76rem;
  padding: .35rem .55rem; border-radius: 6px; box-shadow: 0 6px 18px rgba(0, 0, 0, .2); max-width: 260px; white-space: nowrap;
}

/* sale form: EFD exception tucked away under the items (normal sales are always EFD) */
.efd-exception { border-top: 1px dashed var(--line); padding-top: .6rem; }
.efd-exception summary { cursor: pointer; color: var(--muted); font-size: .82rem; list-style: none; display: inline-flex; align-items: center; gap: .35rem; }
.efd-exception summary::-webkit-details-marker { display: none; }
.efd-exception summary::before { content: "\203A"; font-size: 1.1rem; line-height: 1; transition: transform .15s; }
.efd-exception[open] summary::before { transform: rotate(90deg); }
.efd-exception summary:hover { color: var(--brand-2); }
.efd-exception-body { margin-top: .6rem; padding: .9rem 1rem; border-radius: 10px; background: #fff8eb; border: 1px solid #f3dfb8; }

/* special order progress */
.so-steps { display: flex; flex-wrap: wrap; gap: .4rem; }
.so-step { flex: 1 1 150px; display: flex; align-items: center; gap: .45rem; padding: .55rem .75rem; border-radius: 10px; background: var(--card); box-shadow: var(--shadow);
  color: var(--muted); font-size: .8rem; border-top: 3px solid var(--line); }
.so-step i { font-size: 1.05rem; }
.so-step.done { color: var(--brand); border-top-color: var(--brand-2); }
.so-step.done i { color: #198754; }
.so-step.now { color: var(--ink); font-weight: bold; border-top-color: var(--accent); background: #fffaf0; }

/* =====================================================================
   Visual refresh (2026-10-23): softer canvas, modern cards, quick-add pop-ups, push prompt
   ===================================================================== */
:root { --radius: 14px; --ring: 0 0 0 .22rem rgba(19, 163, 168, .22); }
html, body { background: radial-gradient(1200px 500px at 85% -10%, #e3f3f4 0%, transparent 60%), radial-gradient(900px 400px at -10% 110%, #fdf3e1 0%, transparent 55%), var(--bg); background-attachment: fixed; }
.main-content { animation: page-in .28s ease-out; }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .main-content { animation: none; } }

.page-title { font-size: 1.55rem; letter-spacing: -.01em; }
.page-title > .bi { width: 2.1rem; height: 2.1rem; display: inline-grid; place-items: center; border-radius: 10px; font-size: 1.05rem; color: #fff;
  background: linear-gradient(135deg, var(--brand-3), var(--brand)); box-shadow: 0 4px 12px rgba(0, 69, 85, .25); }

.card { border: 1px solid rgba(0, 69, 85, .07); box-shadow: 0 1px 2px rgba(16, 40, 46, .05), 0 8px 24px rgba(16, 40, 46, .06); transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: 0 1px 2px rgba(16, 40, 46, .05), 0 12px 32px rgba(16, 40, 46, .09); }
.card-header { background: linear-gradient(180deg, #fff, #fbfdfd); font-size: .95rem; }

.btn { border-radius: 10px; font-weight: 600; transition: transform .12s, box-shadow .15s, background .15s; }
.btn:active { transform: translateY(1px); }
.btn-brand { background: linear-gradient(135deg, var(--brand-3), var(--brand) 85%); box-shadow: 0 4px 14px rgba(0, 69, 85, .28); }
.btn-brand:hover, .btn-brand:focus { background: linear-gradient(135deg, #18b6bb, var(--brand-2) 85%); box-shadow: 0 6px 18px rgba(0, 69, 85, .34); }
.form-control, .form-select { border-radius: 10px; border-color: #d7e2e4; padding-top: .5rem; padding-bottom: .5rem; transition: border-color .15s, box-shadow .15s; }
.form-control:focus, .form-select:focus { border-color: var(--brand-3); box-shadow: var(--ring); }
.form-control-sm, .form-select-sm { border-radius: 8px; padding-top: .3rem; padding-bottom: .3rem; }
.badge { border-radius: 999px; font-weight: 600; padding: .38em .7em; letter-spacing: .01em; }
.table-responsive > .table, .table.bg-white { border-radius: var(--radius); }
.table tbody td { vertical-align: middle; }
.alert { border-radius: 12px; border: 0; box-shadow: 0 4px 16px rgba(16, 40, 46, .06); }
.dropdown-menu { border-radius: 12px; border: 1px solid rgba(0, 69, 85, .08); padding: .4rem; }
.dropdown-item { border-radius: 8px; padding: .5rem .7rem; }
.dropdown-item:active { background: var(--brand-2); }

/* quick add (+ New) */
.quick-btn { display: inline-flex; align-items: center; height: 38px; padding: 0 .9rem; border-radius: 999px; color: var(--brand-dark); font-weight: 700;
  background: linear-gradient(135deg, #ffd27a, var(--accent)); border: 0; box-shadow: 0 4px 14px rgba(245, 165, 36, .45); }
.quick-btn:hover, .quick-btn:focus, .quick-btn.show { color: var(--brand-dark); background: linear-gradient(135deg, #ffdf9e, #f7b13e); box-shadow: 0 6px 18px rgba(245, 165, 36, .55); }
.quick-btn .bi { font-size: 1.1rem; -webkit-text-stroke: .5px; }
.quick-menu { min-width: 270px; }
.quick-menu .dropdown-item { display: flex; align-items: center; gap: .7rem; white-space: normal; }
.quick-menu .dropdown-item b { display: block; font-size: .9rem; color: var(--ink); }
.quick-menu .dropdown-item small { display: block; color: var(--muted); font-size: .74rem; }
.quick-menu .dropdown-item:hover b, .quick-menu .dropdown-item:active b { color: inherit; }
.qm-ic { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--brand-3), var(--brand)); }

/* pop-up forms */
.modal-backdrop.show { opacity: .45; backdrop-filter: blur(2px); }
.qm .modal-content { border: 0; border-radius: 20px; box-shadow: 0 30px 80px rgba(0, 38, 47, .35); overflow: hidden; }
.qm .modal-header { gap: .8rem; align-items: center; border: 0; padding: 1.2rem 1.4rem .6rem; }
.qm .modal-title { font-size: 1.15rem; font-weight: 800; color: var(--brand); margin: 0; }
.qm .qm-sub { font-size: .78rem; color: var(--muted); }
.qm-head-ic { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 1.3rem; color: #fff;
  background: linear-gradient(135deg, var(--brand-3), var(--brand)); box-shadow: 0 6px 16px rgba(0, 69, 85, .3); }
.qm .modal-body { padding: .6rem 1.4rem 1rem; }
.qm .modal-footer { border: 0; padding: .6rem 1.4rem 1.2rem; background: linear-gradient(180deg, #fff, #f6fafb); }
.qm .form-control, .qm .form-select { padding-top: .6rem; padding-bottom: .6rem; }
.qm-line { display: grid; grid-template-columns: 28px 1fr 72px 110px; gap: .45rem; align-items: center; }
.qm-line-n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 700; color: var(--brand); background: #e6f3f4; }
.qm-note { font-size: .74rem; color: var(--muted); margin-top: -.3rem; }
@media (max-width: 480px) { .qm-line { grid-template-columns: 1fr 1fr; } .qm-line-n { display: none; } .qm-line > input:first-of-type { grid-column: 1 / -1; } }
@media (max-width: 575.98px) { .qm .modal-dialog { margin: auto .5rem; align-items: flex-end; min-height: calc(100% - 1rem); } }

/* "turn on notifications" prompt */
.push-banner { display: flex; align-items: center; gap: .9rem; padding: .85rem 1rem; margin-bottom: 1rem; border-radius: 16px; color: #fff;
  background: linear-gradient(120deg, var(--brand-dark), var(--brand-2) 70%, var(--brand-3)); box-shadow: 0 10px 30px rgba(0, 69, 85, .25); }
.push-banner.d-none { display: none !important; }
.push-banner .small { color: #cfe8eb; }
.push-ic { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.2rem; color: var(--brand-dark); background: linear-gradient(135deg, #ffd27a, var(--accent)); }
@media (max-width: 575.98px) { .push-banner { flex-wrap: wrap; } }

/* show / hide password */
.pw-wrap { position: relative; }
.pw-wrap > input { padding-right: 2.6rem; }
.pw-eye { border: 0; background: transparent; color: var(--muted); line-height: 1; }
.pw-wrap > .pw-eye { position: absolute; top: 50%; right: .45rem; transform: translateY(-50%); padding: .35rem .45rem; border-radius: 8px; }
.pw-eye-addon { border: 1px solid #d7e2e4; border-left: 0; background: #fff; padding: 0 .9rem; }
.pw-eye:hover, .pw-eye:focus-visible { color: var(--brand); background: #eef6f7; }
.pw-eye .bi { font-size: 1.1rem; }

/* =====================================================================
   Colourful icons (2026-10-23): one hue per menu section, varied dashboard tiles
   ===================================================================== */
:root { --c-teal: #13a3a8; --c-amber: #f5a524; --c-violet: #8b5cf6; --c-blue: #3b82f6; --c-rose: #f43f5e; --c-green: #22c55e; --c-orange: #f97316; --c-cyan: #06b6d4; --c-pink: #ec4899; }
/* sidebar: bright icons on the dark panel, colour by section */
.menu-link i { opacity: 1; }
.menu-link.tint-overview i { color: #5eead4; }
.menu-link.tint-sales i { color: #fbbf24; }
.menu-link.tint-cashier-efd i { color: #4ade80; }
.menu-link.tint-inventory i { color: #60a5fa; }
.menu-link.tint-procurement i { color: #c4b5fd; }
.menu-link.tint-finance i { color: #fb923c; }
.menu-link.tint-people-assets i { color: #f9a8d4; }
.menu-link.tint-reports i { color: #67e8f9; }
.menu-link.tint-administration i { color: #fda4af; }
.menu-link.active i { color: #fff; }

/* dashboard "at a glance" tiles: a different gradient for each */
.glance-grid .glance:nth-child(5n+1) .glance-ic { background: linear-gradient(135deg, #2dd4bf, #0e7c86); box-shadow: 0 6px 16px rgba(14, 124, 134, .35); }
.glance-grid .glance:nth-child(5n+2) .glance-ic { background: linear-gradient(135deg, #fbbf24, #ea580c); box-shadow: 0 6px 16px rgba(234, 88, 12, .32); }
.glance-grid .glance:nth-child(5n+3) .glance-ic { background: linear-gradient(135deg, #a78bfa, #6d28d9); box-shadow: 0 6px 16px rgba(109, 40, 217, .32); }
.glance-grid .glance:nth-child(5n+4) .glance-ic { background: linear-gradient(135deg, #60a5fa, #1d4ed8); box-shadow: 0 6px 16px rgba(29, 78, 216, .32); }
.glance-grid .glance:nth-child(5n+5) .glance-ic { background: linear-gradient(135deg, #f472b6, #be185d); box-shadow: 0 6px 16px rgba(190, 24, 93, .3); }
.glance-grid .glance:nth-child(5n+2) .glance-v { color: #c2410c; }
.glance-grid .glance:nth-child(5n+3) .glance-v { color: #6d28d9; }
.glance-grid .glance:nth-child(5n+4) .glance-v { color: #1d4ed8; }
.glance-grid .glance:nth-child(5n+5) .glance-v { color: #be185d; }

/* KPI tiles: coloured accent bar and a soft colour wash per position (warning / alert colours still win) */
.row > div:nth-child(4n+1) > .kpi:not(.warn):not(.bad)::before, .row > div:nth-child(4n+1) > a > .kpi:not(.warn):not(.bad)::before { background: linear-gradient(180deg, #2dd4bf, #0e7c86); }
.row > div:nth-child(4n+2) > .kpi:not(.warn):not(.bad)::before, .row > div:nth-child(4n+2) > a > .kpi:not(.warn):not(.bad)::before { background: linear-gradient(180deg, #a78bfa, #6d28d9); }
.row > div:nth-child(4n+3) > .kpi:not(.warn):not(.bad)::before, .row > div:nth-child(4n+3) > a > .kpi:not(.warn):not(.bad)::before { background: linear-gradient(180deg, #60a5fa, #1d4ed8); }
.row > div:nth-child(4n+4) > .kpi:not(.warn):not(.bad)::before, .row > div:nth-child(4n+4) > a > .kpi:not(.warn):not(.bad)::before { background: linear-gradient(180deg, #4ade80, #15803d); }

/* card headings: coloured icon chips */
.card-header > .bi:first-child, .card-header > span > .bi:first-child { display: inline-grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 8px; margin-right: .45rem !important;
  color: #fff; font-size: .9rem; background: linear-gradient(135deg, #2dd4bf, #0e7c86); vertical-align: middle; }
.chart-card:nth-of-type(n) .card-header .bi-graph-up { background: linear-gradient(135deg, #60a5fa, #1d4ed8); }
.card-header .bi-diagram-3 { background: linear-gradient(135deg, #a78bfa, #6d28d9) !important; }
.card-header .bi-geo-alt { background: linear-gradient(135deg, #f472b6, #be185d) !important; }

/* "+ New" menu: one colour per action */
.quick-menu li:nth-child(5n+1) .qm-ic { background: linear-gradient(135deg, #fbbf24, #ea580c); }
.quick-menu li:nth-child(5n+2) .qm-ic { background: linear-gradient(135deg, #2dd4bf, #0e7c86); }
.quick-menu li:nth-child(5n+3) .qm-ic { background: linear-gradient(135deg, #60a5fa, #1d4ed8); }
.quick-menu li:nth-child(5n+4) .qm-ic { background: linear-gradient(135deg, #a78bfa, #6d28d9); }
.quick-menu li:nth-child(5n+5) .qm-ic { background: linear-gradient(135deg, #f472b6, #be185d); }

/* page-title icon badges: hue follows the module */
.page-title > .bi-bag-check, .page-title > .bi-bag-plus { background: linear-gradient(135deg, #fbbf24, #ea580c); }
.page-title > .bi-printer, .page-title > .bi-cash-coin { background: linear-gradient(135deg, #4ade80, #15803d); }
.page-title > .bi-shop, .page-title > .bi-patch-check { background: linear-gradient(135deg, #a78bfa, #6d28d9); }
.page-title > .bi-cloud-upload, .page-title > .bi-box-arrow-in-down { background: linear-gradient(135deg, #60a5fa, #1d4ed8); }
.page-title > .bi-person-gear { background: linear-gradient(135deg, #f472b6, #be185d); }

/* customer search picker */
.cp-box { position: relative; }
.cp-box .cp-ic { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.cp-box input[data-cp-q] { padding-left: 2.2rem; }
.cp-results { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 1065; display: none; max-height: 320px; overflow-y: auto;
  border-radius: 12px; box-shadow: 0 14px 34px rgba(0, 38, 47, .18); }
.cp-results.show { display: block; }
.cp-results .list-group-item { border-left: 0; border-right: 0; }
.cp-results .list-group-item.active { background: #e6f3f4; color: var(--ink); border-color: var(--line); }
.cust-search .input-group-lg .form-control { border-radius: 12px 0 0 12px; }

/* ---------------- quotation in the company format (sample T793 EJD) ---------------- */
.qd, .qf-paper { max-width: 820px; margin: 0 auto; background: #fff; color: #000; font-family: Arial, Helvetica, sans-serif; box-shadow: var(--shadow); }
.qd { padding: 0 0 6px; }
.qd-head { display: grid; grid-template-columns: 110px 1fr 110px; align-items: center; background: #283238; color: #fff; padding: 10px 14px; border: 1px solid #000; border-bottom: 0;
  -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.qd-logo img { width: 74px; height: 74px; border: 2px solid #fff; padding: 3px; display: block; margin-left: 14px; }
.qd-brand { text-align: center; }
.qd-t1 { font-size: 20pt; font-weight: bold; letter-spacing: .02em; line-height: 1.1; padding-bottom: 8px; border-bottom: 1px solid rgba(255, 255, 255, .55); }
.qd-t2 { font-size: 13pt; font-weight: bold; margin-top: 6px; }
.qd-title { background: #a3b6bf; text-align: center; font-weight: bold; font-size: 17pt; letter-spacing: .02em; padding: 5px; border: 1px solid #000; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.qd-tbl { width: 100%; border-collapse: collapse; font-size: 9.5pt; }
.qd-tbl td, .qd-tbl th { border: 1px solid #000; padding: 2px 6px; vertical-align: middle; }
.qd-tbl .c { text-align: center; } .qd-tbl .r { text-align: right; }
.qd-yellow td, .qf-yellow { background: #fdf7c3; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.qd-yellow td { border-top: 0; border-bottom: 0; font-weight: bold; }
.qd-ref td { font-size: 8pt; font-weight: normal; color: #444; padding-top: 6px; text-align: right; }
.qd-veh td { display: table-cell; padding-top: 10px; border-bottom: 1px solid #000; }
.qd-veh span { margin-right: 22px; white-space: nowrap; }
.qd-b td { font-weight: bold; height: 18px; }
.qd-th th { text-align: center; font-weight: bold; background: #fff; }
.qd-th th span { font-weight: bold; }
.qd-line td { font-weight: bold; }
.qd-pn { display: block; font-weight: normal; font-size: 7.5pt; color: #444; }
.qd-sum td { background: #d0dce2; font-weight: bold; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.qd-tall td { height: 34px; }
.qd-blank td { height: 16px; }
.qd-light { font-weight: normal; color: #333; }
.qd-norm { font-weight: normal; }
.qd-pay { padding: 3px 6px; }
.qd-pay span { display: inline-block; width: 32%; }
.qd-bank td { font-weight: bold; font-family: "Montserrat", Arial, sans-serif; }
.qd-foot td { height: 14px; }
.qd-note { font-size: 8pt; color: #444; padding: 4px 2px; }
@media print {
  .qd, .qf-paper { box-shadow: none; max-width: none; }
  .qd-tbl tr { break-inside: avoid; }
}
@media (max-width: 575px) {
  .qd-head { grid-template-columns: 64px 1fr 10px; padding: 8px; }
  .qd-logo img { width: 52px; height: 52px; margin-left: 0; }
  .qd-t1 { font-size: 15pt; } .qd-t2 { font-size: 10pt; } .qd-title { font-size: 13pt; }
  .qd-tbl { font-size: 8pt; }
  .qd-veh span { display: inline-block; margin-right: 10px; }
  .qd-pay span { width: auto; margin-right: 12px; }
}

/* quick quotation form – looks like the paper quotation */
.qf-paper { padding: 0 0 14px; border-radius: 10px; overflow: hidden; }
.qf-paper > .row, .qf-paper > .small, .qf-paper > .d-flex { margin-left: 0; margin-right: 0; padding-left: 14px; padding-right: 14px; }
.qf-yellow { padding: 10px 14px 12px; border-left: 1px solid #000; border-right: 1px solid #000; border-bottom: 1px solid #000; margin: 0 !important; }
.qf-sec { padding-top: 12px; padding-bottom: 10px; }
.qf-l { font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #3b4a50; margin-bottom: 2px; display: block; }
.qf-date { font-weight: bold; padding: .25rem 0; }
.qf .cust-pick .form-label { display: none; }
.qf-items { margin: 4px 0 0; }
.qf .table-responsive { padding: 0 14px; overflow: visible; }
.qf-items td { vertical-align: top; padding: 4px; position: relative; }
.qf-items tbody { counter-reset: qitem; }
.qf-row { counter-increment: qitem; }
.qf-no::before { content: counter(qitem); font-weight: bold; }
.qf-no { padding-top: 9px !important; }
.qf-items [data-unit], .qf-items [data-linetotal] { padding-top: 9px; }
.qf-svc { background: #fbfcfd; }
.qf-hint { font-weight: normal; font-size: .75rem; color: #667; }
.qf-totals { width: calc(100% - 28px); margin: 6px 14px 0; }
.qf-totals td:first-child { width: 70%; }
.qf-submit { max-width: 820px; margin: 14px auto 70px; position: sticky; bottom: 10px; z-index: 6; }
.qf-submit .btn { box-shadow: 0 8px 24px rgba(0, 60, 75, .35); }
@media (max-width: 767px) {
  .qf .table-responsive { overflow-x: auto; }
  .qf-items { min-width: 640px; }
}

/* WhatsApp */
.btn-wa { background: #25d366; border-color: #25d366; color: #fff; font-weight: 600; }
.btn-wa:hover, .btn-wa:focus { background: #1ebe5b; border-color: #1ebe5b; color: #fff; }
.wa-head { background: #075e54; color: #fff; }
.wa-box { border: 0; overflow: hidden; border-radius: 14px; }
.wa-top i { color: #25d366; }

/* salesperson: big "New quotation" entry on the dashboard + floating button */
.quote-cta { display: grid; grid-template-columns: 1.4fr 1fr; gap: .75rem; }
.qc-main { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.3rem; border-radius: 16px; color: #fff; text-decoration: none;
  background: linear-gradient(120deg, #f59e0b, #f97316 55%, #ef4444); box-shadow: 0 10px 28px rgba(249, 115, 22, .35); transition: transform .15s; }
.qc-main:hover { color: #fff; text-decoration: none; transform: translateY(-2px); }
.qc-ic { width: 56px; height: 56px; border-radius: 14px; background: rgba(255, 255, 255, .22); display: grid; place-items: center; font-size: 1.8rem; flex: none; }
.qc-t { display: block; font-size: 1.35rem; font-weight: 800; }
.qc-s { display: block; font-size: .85rem; opacity: .92; }
.qc-go { margin-left: auto; font-size: 2rem; opacity: .9; }
.qc-side { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.qc-mini { display: flex; flex-direction: column; justify-content: center; padding: .7rem; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; text-align: center; }
.qc-mini b { font-size: 1.5rem; color: #f97316; }
.qc-mini span { font-size: .75rem; color: var(--muted, #667); }
.qc-mini:hover { text-decoration: none; color: var(--ink); box-shadow: var(--shadow-lg); }
.fab-quote { position: fixed; right: 16px; bottom: 18px; z-index: 1040; display: none; align-items: center; gap: .4rem; padding: .7rem 1.05rem; border-radius: 999px;
  background: linear-gradient(120deg, #f59e0b, #f97316); color: #fff; font-weight: 700; text-decoration: none; box-shadow: 0 10px 24px rgba(249, 115, 22, .45); }
.fab-quote i { font-size: 1.25rem; }
.fab-quote:hover { color: #fff; text-decoration: none; }
@media (max-width: 991px) {
  .quote-cta { grid-template-columns: 1fr; }
  .fab-quote { display: inline-flex; }
}
@media (max-width: 575px) { .qc-t { font-size: 1.15rem; } .qc-go { display: none; } }

/* public document page (link opened from WhatsApp) */
.share-body { background: #e9eef0; min-height: 100vh; padding: 14px 10px 40px; }
.share-bar { max-width: 820px; margin: 0 auto 12px; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; }
.share-bar img { height: 34px; }
.share-msg { max-width: 520px; margin: 12vh auto; background: #fff; border-radius: 14px; padding: 28px; text-align: center; box-shadow: var(--shadow); }
.share-body .doc.pf { max-width: 820px; margin: 0 auto; }
@media print { .share-body { background: #fff; padding: 0; } }
.share-inv > .no-print { display: none !important; }
/* quotation form on phones: each line becomes a small card */
@media (max-width: 767px) {
  .qf .table-responsive { overflow: visible; }
  .qf-items { min-width: 0; border: 0; }
  .qf-items thead { display: none; }
  .qf-items, .qf-items tbody { display: block; }
  .qf-items tr.qf-row { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; grid-template-areas: "desc desc desc rm" "qty disc unit amt";
    gap: 4px 6px; border: 1px solid #9aa9af; border-left: 4px solid #283238; border-radius: 8px; padding: 6px 8px; margin-bottom: 8px; background: #fff; }
  .qf-items tr.qf-svc { border-left-color: #f97316; background: #fffaf3; }
  .qf-items tr.qf-row > td { border: 0; padding: 0; display: block; }
  .qf-items tr.qf-row > td:nth-child(1) { display: none; }
  .qf-items tr.qf-row > td:nth-child(2) { grid-area: desc; }
  .qf-items tr.qf-row > td:nth-child(3) { grid-area: qty; }
  .qf-items tr.qf-row > td:nth-child(4) { grid-area: disc; }
  .qf-items tr.qf-row > td:nth-child(5) { grid-area: unit; }
  .qf-items tr.qf-row > td:nth-child(6) { grid-area: amt; }
  .qf-items tr.qf-row > td:nth-child(7) { grid-area: rm; justify-self: end; align-self: center; }
  .qf-items tr.qf-row > td[data-label]::before { content: attr(data-label); display: block; font-size: .62rem; font-weight: 700; text-transform: uppercase; color: #5b6b71; text-align: left; }
  .qf-items .qf-nodisc { visibility: hidden; }
  .qf-items [data-unit], .qf-items [data-linetotal] { padding-top: 0; font-size: .85rem; }
  .qf-items .list-group[data-results] { max-width: calc(100vw - 40px) !important; }
}
/* sale form: VAT on/off */
.vat-switch { display: block; max-width: 520px; border: 1px solid var(--line); border-radius: .5rem; padding: .55rem .8rem; background: #fff; }
.vat-switch .form-check-input { cursor: pointer; }

/* ---- Workshop weekly report / plan (EGL-OPS-WR01) ---- */
.ws-sec { background: #fff; border: 1px solid #dfe7ea; border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.ws-h { font-size: 1rem; font-weight: 700; color: var(--brand); margin: 0 0 8px; }
.ws-h span { font-weight: 400; font-style: italic; color: #557; font-size: .9rem; }
.ws-table { font-size: .82rem; background: #fff; }
.ws-table thead th, .ws-table tfoot th { background: var(--brand); color: #fff; font-weight: 600; vertical-align: top; white-space: normal; }
.ws-table th i, .ws-head th i, .ws-lbl i { display: block; font-weight: 400; font-style: italic; font-size: .72rem; opacity: .85; }
.ws-table .ws-first { background: #e6f0f2; color: #0b3f4f; min-width: 150px; font-weight: 600; }
.ws-table thead .ws-first, .ws-table tfoot .ws-first { background: var(--brand); color: #fff; }
.ws-table td { min-width: 90px; }
.ws-table td .form-control, .ws-table td .form-select { min-width: 110px; }
.ws-table td textarea.form-control { min-width: 170px; }
.ws-n { display: inline-block; min-width: 1.4em; color: #557; }
.ws-auto { display: block; text-align: right; font-weight: 600; padding: 4px 2px; }
.ws-lbl { font-size: .8rem; font-weight: 600; color: #0b3f4f; margin-bottom: 2px; }
.ws-val { border-bottom: 1px solid #dfe7ea; min-height: 1.6em; padding: 2px 0; }
.ws-note { font-size: .78rem; font-style: italic; color: #5b6770; margin: 6px 0 0; }
.ws-actions { position: sticky; bottom: 0; z-index: 5; background: rgba(240, 245, 246, .96); border-top: 1px solid #dfe7ea; padding: 10px 0; display: flex; gap: 8px; justify-content: flex-end; }
.ws-doc { background: #fff; border: 1px solid #dfe7ea; border-radius: 10px; padding: 0 0 12px; }
.ws-doc > *:not(.pf-head) { margin-left: 18px; margin-right: 18px; }
.ws-doc > table { width: calc(100% - 36px); }
.ws-doc .ws-sec { border: 0; border-radius: 0; padding: 4px 0; }
.ws-kicker { font-size: .72rem; letter-spacing: .14em; font-weight: 700; color: #2b7a8a; margin-top: 14px; }
.ws-title { font-size: 1.45rem; font-weight: 800; color: var(--brand); margin: 2px 0 0; }
.ws-subtitle { font-style: italic; color: #557; }
.ws-head { font-size: .85rem; }
.ws-head th { background: #e6f0f2; color: #0b3f4f; width: 22%; }
.ws-summary { background: #f4f8f9; border-left: 4px solid var(--brand); padding: 8px 12px; margin-bottom: 12px; font-size: .9rem; }
@media print {
  .ws-doc { border: 0; }
  .ws-table thead th, .ws-table tfoot th, .ws-table .ws-first, .ws-head th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .ws-sec { break-inside: avoid-page; }
}

/* workshop register */
.table tr.ws-long > td { background: #fff5f5; }
.table tr.ws-long > td:first-child { box-shadow: inset 3px 0 0 #dc3545; }
details > summary.ws-summary-toggle { cursor: pointer; list-style: none; font-weight: 600; }
details > summary.ws-summary-toggle::-webkit-details-marker { display: none; }
details[open] > summary.ws-summary-toggle { border-bottom: 1px solid var(--line); }
