/* =============================================================================
   Floware AI theme - clean, compact, full-screen layout.
   Same brand as the current site (purple gradient bar, purple table headers),
   with tighter spacing so lists and the order grid use the whole screen.
   ============================================================================= */
:root {
    --fw-purple: #6f3c96;
    --fw-purple-dark: #57307a;
    --fw-purple-soft: #f3edf9;
    --fw-purple-line: #8a5cae;
    --fw-grad: linear-gradient(90deg, #667eea, #764ba2);
    --fw-bg: #f3f4f8;
    --fw-card: #ffffff;
    --fw-border: #e3e5ec;
    --fw-text: #1f2430;
    --fw-muted: #6b7280;
    --fw-pink: #c2337a;
    --fw-unmatched: #fbe3b5;
    --fw-green: #16875a;
    --fw-surface-2: #fafafc;
    --fw-surface-3: #eef0f4;
    --fw-border-strong: #d6d9e2;
    --fw-shadow: 0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.06);
    --fw-shadow-lg: 0 12px 32px rgba(30,20,60,.14);
    --fw-radius: 12px;
    --fw-nav-h: 52px;
}

html, body { height: 100%; }
body {
    background: var(--fw-bg); color: var(--fw-text);
    font-family: var(--fw-font); font-size: 15px;
    display: flex; flex-direction: column; min-height: 100vh;
}

/* ---------- Top bar ---------- */
.fw-nav { background: var(--fw-grad); padding: 0 14px; min-height: var(--fw-nav-h); flex: 0 0 auto;
          box-shadow: 0 2px 8px rgba(70, 40, 110, .25); }
.fw-nav .container-fluid { padding: 0; }
.fw-brand { color: #fff; font-weight: 700; font-size: 20px; display: flex; align-items: center; gap: 8px; text-decoration: none; margin-right: 18px; }
.fw-brand:hover { color: #fff; }
.fw-menu { gap: 2px; }
.fw-menu .nav-link { color: rgba(255,255,255,.9) !important; font-weight: 600; font-size: 15px; padding: 7px 11px !important;
                     white-space: nowrap; border-radius: 7px; }
.fw-menu .nav-link i { opacity: .85; margin-right: 3px; }
.fw-menu .nav-link.active { background: rgba(255,255,255,.22); color: #fff !important; }
.fw-menu .nav-link:hover { background: rgba(255,255,255,.14); color: #fff !important; }
.fw-menu .dropdown-menu { border: 0; border-radius: var(--fw-radius); box-shadow: 0 12px 32px rgba(30,20,60,.18); padding: 6px; font-size: 15px; }
.fw-menu .dropdown-item { border-radius: 6px; padding: 7px 12px; }
.fw-menu .dropdown-item i { width: 20px; color: var(--fw-purple); }
.fw-menu .dropdown-item:hover { background: var(--fw-purple-soft); }
.fw-user { color: rgba(255,255,255,.8); font-size: 14px; }
.fw-logout { border: 1px solid rgba(255,255,255,.8); color: #fff; border-radius: 20px; padding: 4px 14px; font-weight: 600; font-size: 14px; background: none; }
.fw-logout:hover { background: rgba(255,255,255,.18); }

/* ---------- Page area: fills the screen below the bar ---------- */
main.fw-main { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding: 14px 18px 16px; gap: 12px; }
main.fw-main > * { flex-shrink: 0; margin-top: 0; margin-bottom: 0; }
main.fw-main > .row { margin-top: calc(-1 * var(--bs-gutter-y)); }
main.fw-main > .alert { padding: 8px 14px; border-radius: 8px; font-size: 15px; }
@media (min-width: 992px) {
    body { height: 100vh; overflow: hidden; }
    main.fw-main { overflow: auto; }
    .fill { flex: 1 1 0 !important; min-height: 240px; }          /* grows to the bottom of the screen */
}
@media (max-width: 991.98px) {
    .fill { max-height: 75vh; }
}

/* ---------- Page heading row: title on the left, filters/actions on the right ---------- */
.fw-head { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; }
.page-title { font-size: 20px; font-weight: 700; margin: 0; display: flex; gap: 9px; align-items: center; color: var(--fw-text); white-space: nowrap; }
.page-title > i { color: var(--fw-purple); font-size: 18px; }
.page-title .fa-whatsapp { color: #25a244; }
.page-title .count { font-size: 13px; font-weight: 600; color: var(--fw-muted); background: var(--fw-surface-3); border-radius: 20px; padding: 2px 9px; }
.fw-head .note { color: var(--fw-muted); font-size: 14px; }

/* Inline filter bar */
.fw-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-left: auto; }
.fw-toolbar .fld { display: flex; align-items: center; gap: 6px; }
.fw-toolbar .fld > label { font-size: 13px; font-weight: 600; color: var(--fw-muted); white-space: nowrap; margin: 0; }
.fw-toolbar .form-control, .fw-toolbar .form-select { width: auto; min-width: 140px; }
.fw-toolbar input[type=date] { min-width: 132px; }
.fw-toolbar .grow { flex: 1 1 200px; }
.fw-toolbar .grow .form-control { width: 100%; }

/* ---------- Cards ---------- */
.fw-card { background: var(--fw-card); border: 1px solid var(--fw-border); border-radius: var(--fw-radius); padding: 14px 16px;
           box-shadow: 0 1px 2px rgba(20,20,50,.04); }
.fw-card + .fw-card { margin-top: 12px; }
.card-title { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--fw-purple-dark);
              margin: -2px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--fw-border); display: flex; align-items: center; gap: 8px; }
.card-title i { color: var(--fw-purple); }
.card-sub { font-size: 13px; font-weight: 700; color: var(--fw-muted); text-transform: uppercase; letter-spacing: .04em; margin: 14px 0 8px; }
.fw-help { font-size: 14px; color: var(--fw-muted); }
.fw-help b { color: var(--fw-text); }
.fw-help ol { padding-left: 18px; margin: 0; }
.fw-help li { margin-bottom: 4px; }

/* ---------- Form controls: compact everywhere ---------- */
.fw-main .form-control, .fw-main .form-select { font-size: 15px; padding: 5px 10px; border-radius: 7px; border-color: var(--fw-border-strong); min-height: 34px; }
.fw-main .form-select { padding-right: 30px; }
.fw-main .form-control:focus, .fw-main .form-select:focus { border-color: #9b73c4; box-shadow: 0 0 0 3px rgba(118,75,162,.15); }
.fw-main .form-label { font-size: 13px; font-weight: 600; color: var(--fw-muted); margin-bottom: 3px; }
.fw-main .form-text { font-size: 13px; }
.fw-main .form-check-label { font-size: 15px; }
.fw-main .form-check-input:checked { background-color: var(--fw-purple); border-color: var(--fw-purple); }
.fw-main .btn { font-size: 15px; padding: 5px 14px; border-radius: 7px; font-weight: 600; }
.fw-main .btn-sm { font-size: 14px; padding: 3px 10px; }
.fw-main .input-group .btn { border-radius: 0 7px 7px 0; }

.btn-fw { background: var(--fw-grad); color: #fff; border: 0; }
.btn-fw:hover, .btn-fw:focus { color: #fff; filter: brightness(1.06); }
.btn-success { background: var(--fw-green); border-color: var(--fw-green); }
.btn-map { background: linear-gradient(90deg, #b569e0, #ec4f97); color: #fff; border: 0; }
.btn-map:hover { color: #fff; filter: brightness(1.06); }
.btn-view { background: #5b7fd6; color: #fff; border: 0; }
.btn-view:hover { color: #fff; background: #4c6fc4; }
.btn-del { background: #e05260; color: #fff; border: 0; }
.btn-del:hover { color: #fff; background: #c9424f; }
.btn-unblock { background: #b07a24; color: #fff; border: 0; }
.btn-unblock:hover { color: #fff; background: #976618; }
.btn-icon { width: 34px; padding-left: 0 !important; padding-right: 0 !important; }

/* ---------- Tables ---------- */
.fw-table-wrap { background: var(--fw-card); border: 1px solid var(--fw-border); border-radius: var(--fw-radius); overflow: auto; }
.fw-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14.5px; }
.fw-table thead th { background: var(--fw-purple); color: #fff; text-transform: uppercase; font-weight: 700; font-size: 12.5px; letter-spacing: .04em;
                     padding: 9px 10px; border-right: 1px solid var(--fw-purple-line); position: sticky; top: 0; z-index: 2; white-space: nowrap; }
.fw-table thead th:last-child { border-right: 0; }
.fw-table td { padding: 6px 10px; border-bottom: 1px solid var(--fw-border); vertical-align: middle; }
.fw-table tbody tr:nth-child(even) td { background: var(--fw-surface-2); }
.fw-table tbody tr:hover td { background: var(--fw-purple-soft); }
.fw-table .empty td { text-align: center; color: var(--fw-muted); padding: 36px; background: var(--fw-card) !important; }
.fw-table td.num, .fw-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.fw-table .btn-sm { padding: 2px 10px; font-size: 13.5px; }
.fw-table form { margin: 0; }
.from { color: var(--fw-pink); font-family: Consolas, Menlo, monospace; font-size: 14px; }
.status { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 2px 8px; border-radius: 20px; background: var(--fw-surface-3); color: var(--fw-muted); }
.status.new { background: #e7eefc; color: #3155a6; }
.status.chk { background: #fff3d6; color: #8a5a00; }
.status.exp { background: #dcf3e8; color: #13724b; }
.status.err { background: #fde2e4; color: #b42335; }

/* ---------- Dashboard ---------- */
.stat { background: var(--fw-card); border: 1px solid var(--fw-border); border-radius: var(--fw-radius); padding: 12px 14px; height: 100%;
        display: flex; align-items: center; gap: 12px; transition: box-shadow .15s; }
a .stat:hover { box-shadow: 0 4px 14px rgba(60,30,100,.12); }
.stat .ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; color: #fff; flex: 0 0 40px; background: var(--fw-purple); }
.stat .n { font-size: 23px; font-weight: 700; line-height: 1.1; }
.stat .l { color: var(--fw-muted); font-size: 13.5px; }
.svc-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid #f0f1f5; }
.svc-row:last-child { border-bottom: 0; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: #c4c7d0; margin-right: 6px; }
.dot.on { background: #22a35a; }

.fw-toast { position: fixed; right: 18px; bottom: 18px; background: var(--fw-green); color: #fff; padding: 11px 16px; border-radius: 8px;
            display: none; z-index: 2000; max-width: 420px; box-shadow: 0 6px 20px rgba(0,0,0,.2); font-size: 15px; }
.fw-toast.err { background: #dc3545; }
.badge-src { font-size: 11.5px; font-weight: 700; padding: 2px 7px; border-radius: 4px; color: #fff; background: #6c757d; }
.badge-src.wa { background: #25a244; } .badge-src.mail { background: #5b7fd6; }

/* ---------- Order Parsing (full screen) ---------- */
.orders-page { flex: 1 1 0; min-height: 0; display: flex; gap: 14px; }
.orders-left { flex: 0 0 31%; max-width: 31%; min-width: 0; display: flex; flex-direction: column; }
.orders-right { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
@media (min-width: 1600px) { .orders-left { flex-basis: 27%; max-width: 27%; } }
@media (max-width: 1199.98px) {
    .orders-page { flex-direction: column; }
    .orders-left, .orders-right { max-width: 100%; flex-basis: auto; }
}
.panel { background: var(--fw-card); border: 1px solid var(--fw-border); border-radius: var(--fw-radius); display: flex; flex-direction: column; min-height: 0; flex: 1 1 0; overflow: hidden; }
.panel-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--fw-border); }
.panel-head .page-title { font-size: 17px; }
.panel-body { padding: 10px 12px; flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; overflow: auto; }

.fw-tabs { display: flex; gap: 2px; padding: 6px 8px 0; border-bottom: 1px solid var(--fw-border); overflow-x: auto; background: var(--fw-surface-2); }
.fw-tabs .nav-link { border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--fw-muted); font-size: 14.5px; font-weight: 600; padding: 7px 10px; white-space: nowrap; background: none; }
.fw-tabs .nav-link:hover { color: var(--fw-purple); }
.fw-tabs .nav-link.active { color: var(--fw-purple); border-bottom-color: var(--fw-purple); background: none; }
.fw-tabs .wa { color: #25a244; }
section[data-pane] { display: flex; flex-direction: column; flex: 1 1 0; min-height: 0; }
section[data-pane].d-none { display: none !important; }
.mail-list { flex: 1 1 0; min-height: 200px; overflow: auto; border: 1px solid var(--fw-border); border-radius: 8px; }
.mail-list tr { cursor: pointer; }
.mail-list tr.sel td { background: var(--fw-purple-soft) !important; box-shadow: inset 3px 0 0 var(--fw-purple); }
.mail-list table { table-layout: fixed; }
.mail-list .subj, .mail-list .from { font-family: Consolas, Menlo, monospace; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-list tr.unchecked .subj { font-weight: 700; }
.read-frame { width: 100%; flex: 1 1 0; min-height: 300px; border: 1px solid var(--fw-border); border-radius: 8px; background: var(--fw-card); }
section[data-pane] textarea { flex: 1 1 0; min-height: 200px; resize: none; }

.od { background: var(--fw-card); border: 1px solid var(--fw-border); border-radius: var(--fw-radius); padding: 10px 12px; }
.od-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px 12px; align-items: end; }
.od-grid .f { display: flex; flex-direction: column; min-width: 0; }
.od-grid .f > label { font-size: 12.5px; font-weight: 700; color: var(--fw-muted); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 3px; white-space: nowrap; }
.od-grid .c2 { grid-column: span 2; } .od-grid .c3 { grid-column: span 3; } .od-grid .c4 { grid-column: span 4; }
.od-grid .c1 { grid-column: span 1; } .od-grid .c5 { grid-column: span 5; } .od-grid .c6 { grid-column: span 6; }
@media (max-width: 1399.98px) { .od-grid .c2, .od-grid .c1 { grid-column: span 3; } .od-grid .c4, .od-grid .c5 { grid-column: span 6; } }
.od .ai-cust { font-size: 14px; padding: 6px 0 0; min-height: 34px; }
.od .ai-cust b { color: var(--fw-text); }
.grid-wrap { flex: 1 1 0; min-height: 200px; border: 1px solid var(--fw-border); border-radius: var(--fw-radius); margin-top: 10px; overflow: auto; background: var(--fw-card); }
.grid { min-width: 1150px; }
.grid td { padding: 4px 6px; }
.grid tr.nomatch td { background: var(--fw-unmatched) !important; }
.grid tr.mapped-other td { background: #fff3cd !important; }
.grid input, .grid select { font-size: 14px !important; min-height: 30px !important; padding: 3px 7px !important; }
.ac { position: relative; }
.ac-list { position: absolute; z-index: 50; background: var(--fw-card); border: 1px solid var(--fw-border-strong); border-radius: 8px; box-shadow: 0 12px 30px rgba(0,0,0,.15);
           max-height: 300px; overflow: auto; min-width: 320px; display: none; }
.ac-list div { padding: 7px 10px; cursor: pointer; font-size: 14.5px; border-bottom: 1px solid #f1f1f4; }
.ac-list div:hover, .ac-list div.on { background: var(--fw-purple-soft); }
.ac-list small { color: var(--fw-muted); }
.actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.actions .btn { color: #fff; font-weight: 600; flex: 1 1 auto; border: 0; padding: 8px 12px; font-size: 15px; white-space: nowrap; }
.actions .btn:hover { filter: brightness(1.07); color: #fff; }
.a1 { background: #2f8f9d; } .a2 { background: var(--fw-grad); } .a3 { background: linear-gradient(90deg, #b569e0, #ec4f97); }
.a4 { background: var(--fw-green); } .a5 { background: #2c7a8c; } .a6 { background: #e59c00; } .a7 { background: #e0566a; }
.actions .a7, .actions .a7:disabled { color: #fff; opacity: 1; background: #e0566a; font-variant-numeric: tabular-nums; }
.src-pill { display: inline-block; color: #fff; border-radius: 4px; font-size: 13px; font-weight: 600; padding: 2px 8px; }
.src-pill.wa { background: #25a244; } .src-pill.mail { background: #5b7fd6; } .src-pill.direct { background: #6c757d; }
.src-pill.done { background: var(--fw-green); }
.busy { opacity: .6; pointer-events: none; }
textarea.prompt { font-family: Consolas, Menlo, monospace; font-size: 14px; line-height: 1.5; }

/* ---------- Prompts page ---------- */
.prompt-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.prompt-card .fw-tabs { padding-top: 6px; }
.prompt-card form { flex: 1 1 0; display: flex; flex-direction: column; padding: 12px; gap: 10px; min-height: 0; }
.prompt-card textarea { flex: 1 1 0; min-height: 260px; resize: none; }

/* ---------- Sign-in pages ---------- */
.auth-wrap { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; padding: 24px 0; }
.auth-box { width: 100%; max-width: 400px; }
.auth-box .fw-card { padding: 24px; box-shadow: 0 10px 40px rgba(60,30,100,.10); }
.auth-logo { width: 56px; height: 56px; border-radius: 16px; background: var(--fw-grad); color: #fff; display: grid; place-items: center; font-size: 25px; margin: 0 auto 12px; }
.auth-title { font-size: 23px; font-weight: 700; text-align: center; }
.auth-sub { color: var(--fw-muted); text-align: center; margin-bottom: 18px; }

/* ---------- Setup status ---------- */
.status-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px 16px; list-style: none; padding: 0; margin: 0; }
.status-list li { display: flex; gap: 8px; align-items: flex-start; font-size: 14.5px; }
.status-list li i { margin-top: 3px; }
.step { width: 24px; height: 24px; border-radius: 50%; background: var(--fw-purple); color: #fff; font-size: 13px; font-weight: 700; display: inline-grid; place-items: center; }

/* Phones and small tablets: normal page scrolling instead of the fixed full-screen layout */
@media (max-width: 991.98px) {
    .orders-page { flex: none; }
    .panel { flex: none; min-height: 460px; }
    .grid-wrap { flex: none; height: 60vh; }
}

/* ---------- View Mail pop-up ---------- */
.mail-modal { height: 88vh; border: 0; border-radius: 12px; overflow: hidden; }
.mail-modal .modal-header { background: var(--fw-purple-soft); border-bottom: 1px solid var(--fw-border); padding: 10px 16px; }
.mail-modal .modal-title { font-size: 17px; font-weight: 700; }
.mail-modal .modal-body { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; overflow: hidden; }
.mail-modal .modal-footer { padding: 8px 12px; border-top: 1px solid var(--fw-border); }
.mail-modal-frame { flex: 1 1 0; min-height: 200px; width: 100%; border: 1px solid var(--fw-border); border-radius: 8px; background: var(--fw-card); }
.mail-modal-img { max-width: 100%; max-height: 32vh; border-radius: 8px; display: block; }
.mail-modal-pdf { width: 100%; height: 40vh; border: 1px solid var(--fw-border); border-radius: 8px; }
.min-w-0 { min-width: 0; }

.read-pdf { width: 100%; height: 42vh; border: 1px solid var(--fw-border); border-radius: 8px; background: var(--fw-card); }
.folder-status { font-size: 13px; margin: 2px 0 8px; }
.folder-status.ok { color: var(--fw-green); }
.folder-status.bad { color: #b45309; }

/* =============================================================================
   v26 - cleaner, bigger text, colour-coded order columns, 40% / 60% Orders screen
   ============================================================================= */
body { font-size: 16px; }
.fw-main .form-control, .fw-main .form-select { font-size: 16px; min-height: 36px; }
.fw-main .btn { font-size: 15.5px; }
.fw-main .btn-sm { font-size: 14.5px; }
.fw-table { font-size: 15.5px; }
.fw-table thead th { font-size: 13.5px; padding-top: 9px; padding-bottom: 9px; }
.fw-menu .nav-link { font-size: 16px; }
.page-title { font-size: 21px; }

/* Chips: small coloured labels */
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; font-weight: 700; padding: 3px 10px; border-radius: 20px; white-space: nowrap; line-height: 1.4; }
.chip.blue   { color: #1e4e8c; background: #dce8f7; }
.chip.purple { color: var(--fw-purple-dark); background: #e6daf3; }
.chip.teal   { color: #11706f; background: #d3eeee; }
.chip.green  { color: #16875a; background: #d3efdd; }
.chip.orange { color: #9a5b00; background: #fde6c4; }
.chip.amber  { color: #8a5a00; background: #fff3b0; }
.chip.red    { color: #c0392b; background: #fdd8d6; }
.chip.done   { color: #fff; background: var(--fw-green); }
.chip.total  { color: #fff; background: var(--fw-green); font-size: 15px; padding: 5px 14px; font-variant-numeric: tabular-nums; }

/* ---------- Layout: 40% mail, 60% order ---------- */
.orders-left, .orders-left[class] { flex: 0 0 40%; max-width: 40%; }
@media (min-width: 1600px) { .orders-left { flex-basis: 40%; max-width: 40%; } }
@media (max-width: 1199.98px) { .orders-left { max-width: 100%; flex-basis: auto; } }
.orders-left .panel { overflow: hidden; }
.fw-tabs .nav-link { font-size: 15.5px; padding: 9px 12px; }
.pane-pad { padding: 12px; }

/* List: whole left side; only a few rows high when a mail is open on top */
.list-pane { padding: 8px 10px 10px; }
.list-bar { display: flex; gap: 6px; margin-bottom: 8px; }
.list-bar .form-control { flex: 1 1 auto; }
.has-preview .list-pane { flex: 0 0 255px !important; border-top: 3px solid var(--fw-purple-soft); }
.mail-list { min-height: 120px; }
.mail-list .from { font-family: inherit; font-size: 14.5px; font-weight: 700; color: var(--fw-purple-dark); }
.mail-list .subj { font-family: inherit; font-size: 14.5px; color: var(--fw-text); }
.mail-list td.dt { font-size: 13.5px; color: var(--fw-muted); white-space: nowrap; }
.mail-list tr.unchecked .subj { font-weight: 600; }
.mail-list tr.checked td { background: #e6f4ec; }
.mail-list tr.noorder td { background: var(--fw-surface-2); color: var(--fw-muted); }
.mail-list tr.noorder .from { color: var(--fw-muted); }

/* Preview on top of the list: whole A4 page */
.preview { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; background: var(--fw-card); }
.preview.d-none { display: none !important; }
.pv-bar { display: flex; gap: 5px; align-items: center; padding: 6px 8px; background: var(--fw-purple-soft); border-bottom: 1px solid #e6daf3; flex-wrap: wrap; }
.pv-btn { border: 1px solid var(--fw-border-strong); background: var(--fw-card); color: var(--fw-text); border-radius: 7px; font-size: 15px; font-weight: 600; padding: 4px 12px; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.pv-btn:hover { border-color: var(--fw-purple); color: var(--fw-purple); }
.pv-btn.on { background: var(--fw-purple); border-color: var(--fw-purple); color: #fff; }
.pv-btn.sm { padding: 4px 9px; }
.pv-btn.danger { color: #c0392b; }
.pv-sep { width: 1px; height: 22px; background: var(--fw-border-strong); margin: 0 3px; }
.pv-caption { padding: 5px 10px; font-size: 14px; color: var(--fw-muted); border-bottom: 1px solid var(--fw-border); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-caption b { color: var(--fw-text); margin-right: 6px; }
.pv-link { display: flex; gap: 8px; align-items: center; padding: 6px 10px; border-bottom: 1px solid #dce8f7; background: #f1f6fc; color: #1e4e8c; }
.pv-link.d-none { display: none !important; }
.pv-link-title { font-weight: 700; color: #1e4e8c; }
.pv-link-url { flex: 1 1 auto; min-width: 0; font-size: 14px; color: var(--fw-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-media { padding: 0 8px; }
.pv-media:not(:empty) { padding: 8px; }
.pv-media img { max-width: 100%; max-height: 100%; border-radius: 8px; display: block; margin: 0 auto; }
.pv-body { flex: 1 1 0; min-height: 0; position: relative; overflow: hidden; }
.pv-body.d-none { display: none !important; }
.pv-body iframe { position: absolute; left: 0; top: 0; width: 100%; height: 100%; border: 0; background: var(--fw-card); transform-origin: 0 0; }

/* ---------- Order (right) ---------- */
.od { padding: 10px 14px; }
.od-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.od-title { font-size: 19px; font-weight: 700; color: var(--fw-purple-dark); display: flex; gap: 8px; align-items: center; }
.od-title i { color: var(--fw-purple); }
.od-grid .f > label { font-size: 13px; color: var(--fw-purple-dark); }
.od-grid .c1h { grid-column: span 1; min-width: 140px; }
@media (max-width: 1599.98px) { .od-grid .c4 { grid-column: span 6; } .od-grid .c3 { grid-column: span 6; } .od-grid .c2, .od-grid .c1h { grid-column: span 4; } }
#assign.need { background: #fff3b0; border-color: #e0b400; }
.od .ai-cust { padding-top: 4px; }
.od-add { display: flex; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--fw-border); align-items: center; }
.legend { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 8px 2px 0; }
.legend .chip { font-size: 12.5px; padding: 2px 8px; }
.legend .k { font-size: 13.5px; color: var(--fw-muted); }

.grid-wrap { margin-top: 8px; }
.grid { min-width: 1000px; }
.grid td { padding: 5px 6px; vertical-align: middle; }
.grid input, .grid select { font-size: 15px !important; min-height: 32px !important; }
.grid thead th { position: sticky; top: 0; z-index: 2; text-transform: none; letter-spacing: 0; font-size: 14px; }
.grid thead th.h-st   { background: var(--fw-surface-3); color: var(--fw-text); }
.grid thead th.h-ai   { background: #dce8f7; color: #1e4e8c; }
.grid thead th.h-it   { background: #e6daf3; color: var(--fw-purple-dark); }
.grid thead th.h-uom  { background: #d3eeee; color: #11706f; }
.grid thead th.h-qty  { background: #d3efdd; color: #16875a; }
.grid thead th.h-pr   { background: #fde6c4; color: #9a5b00; }
.grid thead th.h-note { background: var(--fw-surface-3); color: var(--fw-muted); }
.grid tr.mapped td.c-ai   { background: #f1f6fc !important; color: #1e4e8c; }
.grid tr.mapped td.c-it   { background: #f7f2fc !important; }
.grid tr.mapped td.c-uom  { background: #f0f9f9 !important; }
.grid tr.mapped td.c-qty  { background: #ecf8f0 !important; }
.grid tr.mapped td.c-pr   { background: #fff7eb !important; }
.grid tr.mapped td.c-tot  { background: #e8f6ee !important; }
.grid tr.mapped td.c-note, .grid tr.mapped td.c-st { background: var(--fw-card) !important; }
.grid tr.nomatch td { background: #fff3b0 !important; }
.grid tr:hover td { filter: brightness(.97); }
.grid td.code { font-weight: 700; color: var(--fw-purple); white-space: nowrap; }
.grid td.c-it .it { font-weight: 600; color: var(--fw-purple-dark); min-width: 220px; }
.grid tr.nomatch td.c-it .it { border-color: #e0b400; background: #fffbe0; color: #8a5a00; font-weight: 400; }
.grid td.c-uom select { min-width: 100px; color: #11706f; }
.grid td.c-qty .q { width: 84px; font-size: 16px !important; font-weight: 700; color: #16875a; text-align: right; }
.grid td.c-qty .q.noqty { background: #fdd8d6; border-color: #e57373; color: #c0392b; }
.grid td.c-pr .p { width: 96px; color: #9a5b00; text-align: right; }
.grid td.c-tot { font-weight: 700; color: #16875a; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.grid td.c-note .r { min-width: 130px; color: var(--fw-muted); }
.ac-list div { font-size: 15px; }
.ac-list .code { color: var(--fw-purple); margin-right: 6px; }
.ac-list .pr { float: right; color: var(--fw-green); font-weight: 700; margin-left: 10px; }

.actions { align-items: center; }
.actions .btn { flex: 0 0 auto; padding: 9px 18px; }
.act-save { background: var(--fw-purple); }
.act-export { background: var(--fw-green); }
.act-reopen { background: #e59c00; }
.act-items { background: #5b7fd6; }
.summary { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* =============================================================================
   v40 - bigger, clearer text and labels everywhere; Accounts pages use the whole screen
   ============================================================================= */
body { font-size: 17px; line-height: 1.5; color: var(--fw-text); }
h4, .h4 { font-size: 25px; font-weight: 700; }
h5, .h5 { font-size: 21px; font-weight: 700; }
h6, .h6 { font-size: 18px; font-weight: 700; color: var(--fw-purple-dark); }
.page-title { font-size: 24px; }
.small, small { font-size: 15.5px; }
.text-muted { color: var(--fw-muted) !important; }

/* Menu */
.fw-brand { font-size: 22px; }
.fw-menu .nav-link { font-size: 17px; padding: 9px 13px !important; }
.fw-menu .dropdown-menu, .dropdown-menu { font-size: 16.5px; }
.fw-user, .fw-logout { font-size: 15.5px; }

/* Labels: dark, bold, readable (also the ones marked "small") */
.fw-main .form-label, .fw-main .form-label.small, .fw-main label.small, .fw-toolbar .fld > label, .od-grid .f > label {
    font-size: 15.5px !important; font-weight: 600; color: #374151; margin-bottom: 5px; letter-spacing: 0; text-transform: none; }
.fw-main .form-check-label, .fw-main .form-check-label.small { font-size: 16.5px !important; color: #1f2937; }
.fw-main .form-text, .fw-help { font-size: 15.5px; color: var(--fw-muted); }

/* Inputs and buttons */
.fw-main .form-control, .fw-main .form-select { font-size: 17px; min-height: 42px; padding: 7px 12px; color: var(--fw-text); }
.fw-main .form-control-sm, .fw-main .form-select-sm { font-size: 16px !important; min-height: 36px !important; padding: 5px 9px !important; }
.fw-main .form-control::placeholder { color: #9ca3af; }
.fw-main .btn { font-size: 16.5px; padding: 8px 18px; }
.fw-main .btn-sm { font-size: 15.5px; padding: 5px 12px; }
.fw-main .btn-link { font-size: 15.5px; }
.badge { font-size: 14px; font-weight: 600; padding: 5px 9px; }

/* Cards */
.fw-card { padding: 18px 20px; }
.fw-card h6 { margin-bottom: 12px; }
.card-title { font-size: 16px; }
.alert { font-size: 16.5px; }
details > summary { font-size: 16.5px; cursor: pointer; }

/* Tables */
.fw-table, .fw-table td, .fw-table th { font-size: 16.5px; }
.fw-table thead th { font-size: 14.5px; padding: 11px 12px; }
.fw-table td { padding: 9px 12px; }
.fw-table.table-sm td { padding: 8px 10px; }
.fw-table .btn-sm { font-size: 15px; padding: 4px 11px; }
.fw-table tfoot th { font-size: 17px; padding: 9px 12px; background: var(--fw-surface-2); }
.fw-small { font-size: 15px !important; color: var(--fw-muted) !important; }
.stat .n { font-size: 27px; } .stat .l { font-size: 15.5px; }
.status, .chip { font-size: 14.5px; }
.fw-tabs .nav-link { font-size: 16.5px; }
.nav-tabs .nav-link { font-size: 16.5px; font-weight: 600; }
.grid input, .grid select { font-size: 16px !important; min-height: 36px !important; }

/* ---------- Accounts: full screen ---------- */
main.fw-acc { padding: 14px 20px 18px; }
.fw-acc .nav-pills { gap: 4px; background: var(--fw-card); border: 1px solid var(--fw-border); border-radius: var(--fw-radius); padding: 6px; font-size: 17px !important; }
.fw-acc .nav-pills .nav-link { font-weight: 600; color: #374151; padding: 8px 14px; border-radius: 8px; }
.fw-acc .nav-pills .nav-link:hover { background: var(--fw-purple-soft); color: var(--fw-purple-dark); }
.fw-acc .nav-pills .nav-link.active { background: var(--fw-grad); color: #fff; }
.fw-acc .fw-card { margin-bottom: 14px; }
.fw-acc .acc-scroll { overflow: auto; }
.fw-acc .acc-pick { width: 100%; max-width: 640px; }
.fw-acc .fw-card h4 { font-size: 27px; margin-bottom: 0; }
.fw-acc .table { margin-bottom: 0; }
.fw-acc .text-end { font-variant-numeric: tabular-nums; }
@media (min-width: 992px) {
    .fw-acc .acc-scroll { max-height: calc(100vh - 215px); }
}

/* ---------- Inbox (every user): list on the left, the message on the right ---------- */
.inbox .inbox-list { overflow: auto; }
.inbox .inbox-mail { width: 100%; height: 60vh; border: 0; display: block; background: var(--fw-card); }
.inbox .table-active td { background: var(--fw-purple-soft) !important; box-shadow: inset 3px 0 0 var(--fw-purple); }
.inbox .chip { font-size: 13.5px; }
@media (min-width: 1200px) {
    .inbox .inbox-list { max-height: calc(100vh - 230px); }
    .inbox .inbox-mail { height: calc(100vh - 420px); min-height: 360px; }
}

/* =============================================================================
   v41 Orders page (Orders.aspx + Scripts/orders.js): mails 40% left with preview, order 60% right
   ============================================================================= */
.op { flex: 1 1 0 !important; min-height: 560px; display: flex; gap: 0; font-size: 16px; }
.op.dragging, .op.dragging * { cursor: col-resize !important; user-select: none; }
.op.dragging iframe { pointer-events: none; }
.op-left { flex: 0 0 40%; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.op-right { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; background: var(--fw-card); border: 1px solid var(--fw-border);
            border-radius: var(--fw-radius); padding: 12px 14px; overflow: hidden; }
.op-split { flex: 0 0 10px; cursor: col-resize; position: relative; }
.op-split::after { content: ""; position: absolute; left: 4px; top: 30%; bottom: 30%; width: 2px; border-radius: 2px; background: #cfc4dd; }
.op-split:hover::after { background: var(--fw-purple); }

/* tabs */
.op-tabs { display: flex; gap: 4px; background: var(--fw-card); border: 1px solid var(--fw-border); border-radius: var(--fw-radius); padding: 4px; }
.op-tabs button { flex: 1 1 0; border: 0; background: none; padding: 7px 6px; border-radius: 7px; font-weight: 600; color: var(--fw-muted); font-size: 15.5px; white-space: nowrap; }
.op-tabs button:hover { background: var(--fw-purple-soft); color: var(--fw-purple-dark); }
.op-tabs button.on { background: var(--fw-purple); color: #fff; }
.op-badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: #c2337a; color: #fff; font-size: 13px; line-height: 18px; }
.op-tabs button.on .op-badge { background: var(--fw-card); color: #c2337a; }

/* preview */
.op-preview { flex: 1 1 0; min-height: 260px; display: flex; flex-direction: column; background: var(--fw-card); border: 1px solid var(--fw-border); border-radius: var(--fw-radius); overflow: hidden; }
.op-pvbar { display: flex; align-items: center; gap: 6px; padding: 6px 8px; background: var(--fw-purple-soft); border-bottom: 1px solid var(--fw-border); flex-wrap: wrap; }
.op-pvmodes { display: flex; gap: 4px; flex-wrap: wrap; }
.op-pvmodes button, .op-pvtools button, .op-pvtools a { border: 1px solid var(--fw-border-strong); background: var(--fw-card); color: var(--fw-purple-dark); border-radius: 7px; padding: 4px 10px; font-size: 15px; font-weight: 600; text-decoration: none; }
.op-pvmodes button.on { background: var(--fw-purple); border-color: var(--fw-purple); color: #fff; }
.op-pvtools { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.op-pvcap { padding: 5px 10px; font-size: 15px; color: #374151; border-bottom: 1px solid var(--fw-border); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.op-pvbody { flex: 1 1 0; min-height: 0; position: relative; display: flex; flex-direction: column; overflow: hidden; }
.pv-pdf { flex: 1 1 0; width: 100%; border: 0; min-height: 200px; }
.pv-fit { flex: 1 1 0; min-height: 0; overflow: auto; }
.pv-mail { border: 0; display: block; background: var(--fw-card); }
.pv-text { margin: 0; padding: 12px 14px; white-space: pre-wrap; font-family: var(--fw-font); font-size: 16px; color: var(--fw-text); background: var(--fw-card); }
.pv-media { flex: 1 1 0; overflow: auto; padding: 10px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.pv-media img { max-width: 100%; max-height: 60vh; border-radius: 8px; border: 1px solid var(--fw-border); }
.pv-media audio { width: 100%; }
.pv-linkbar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: #f0f9f9; border-bottom: 1px solid var(--fw-border); font-size: 15px; }
.pv-linkbar span { flex: 1 1 auto; min-width: 0; }
.pv-convert { display: flex; gap: 10px; align-items: center; padding: 6px 10px; border-top: 1px solid var(--fw-border); background: var(--fw-surface-2); flex-wrap: wrap; }

/* list */
.op-listbar { display: flex; gap: 6px; }
.op-listbar .form-control { flex: 1 1 auto; }
.op-listbar .form-select { flex: 0 0 150px; }
.op-list { flex: 1 1 0; min-height: 150px; overflow: auto; background: var(--fw-card); border: 1px solid var(--fw-border); border-radius: var(--fw-radius); }
.op-list table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.op-list td { padding: 7px 8px; border-bottom: 1px solid var(--fw-border); vertical-align: top; }
.op-list tr { cursor: pointer; }
.op-list tr:hover td { background: var(--fw-surface-2); }
.op-list .from { font-weight: 700; color: var(--fw-purple-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 16px; }
.op-list .subj { color: #1f2937; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15.5px; }
.op-list .subj i { color: #9ca3af; }
.op-list .dt { font-size: 14.5px; color: var(--fw-muted); white-space: nowrap; }
.op-list tr.checked td, .op-list tr.sent td { background: #ecf8f0; }
.op-list tr.noorder td { color: #6b7280; }
.op-list tr.noorder .from { color: #6b7280; }
.op-list tr.unchecked .subj { font-weight: 700; }
.op-list tr.sel td { background: var(--fw-purple-soft) !important; box-shadow: inset 4px 0 0 var(--fw-purple); }
.op-list .btn-sm { font-size: 14px; padding: 2px 8px; }
.mini { display: inline-block; font-size: 13px; font-weight: 700; padding: 1px 7px; border-radius: 10px; background: var(--fw-surface-3); color: var(--fw-muted); margin-top: 2px; white-space: nowrap; }
.mini.green { background: #d3efdd; color: #16875a; } .mini.amber { background: #fff3b0; color: #8a5a00; } .mini.red { background: #fdd8d6; color: #c0392b; }
.mini.blue { background: #dce8f7; color: #1e4e8c; } .mini.teal { background: #d3eeee; color: #11706f; } .mini.purple { background: #e6daf3; color: var(--fw-purple-dark); }
.op-empty { padding: 24px; text-align: center; color: #6b7280; }

/* right: order */
.op-none { margin: auto; text-align: center; color: var(--fw-muted); display: flex; flex-direction: column; gap: 14px; align-items: center; font-size: 17px; max-width: 520px; }
.op-none > i { font-size: 45px; color: #c9b6dc; }
#ord { display: flex; flex-direction: column; gap: 9px; min-height: 0; flex: 1 1 0; }
#ord[hidden] { display: none; }
.op-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.op-head h4 { font-size: 24px; color: var(--fw-purple-dark); }
.op-alert { padding: 7px 12px; border-radius: 8px; font-size: 15.5px; }
.op-alert.bad { background: #fde2e4; color: #9b1c2c; } .op-alert.warn { background: #fff3cd; color: #7a5200; }
.op-fields { display: grid; grid-template-columns: minmax(240px, 2.2fr) minmax(150px, 1.4fr) 1fr 1fr 1fr 1.4fr; gap: 8px 10px; align-items: end; }
.op-fields .f { display: flex; flex-direction: column; min-width: 0; }
.op-fields label { font-size: 15px; font-weight: 600; color: #374151; margin-bottom: 4px; }
.op-fields .form-control { min-height: 40px; }
#cust.need { background: #fff3b0; border-color: #e5c100; }
.op-airead { min-height: 40px; display: flex; align-items: center; gap: 6px; overflow: hidden; white-space: nowrap; }
.op-add { display: flex; gap: 6px; background: var(--fw-surface-2); border: 1px dashed var(--fw-border-strong); border-radius: 8px; padding: 6px; }
.op-add[hidden] { display: none; }
.op-add .op-uom { flex: 0 0 90px; background: #f0f9f9; }
.op-add .op-num { flex: 0 0 100px; }
.op-key { display: flex; gap: 6px; flex-wrap: wrap; font-size: 14px; }
.op-key .k { padding: 2px 9px; border-radius: 6px; border: 1px solid #e5e7eb; }
.op-key .ai { background: #f1f6fc; color: #1e4e8c; } .op-key .item { background: #f7f2fc; color: var(--fw-purple-dark); font-weight: 700; }
.op-key .uom { background: #f0f9f9; color: #11706f; } .op-key .qty { background: #ecf8f0; color: #16875a; font-weight: 700; }
.op-key .price { background: #fff7eb; color: #9a5b00; } .op-key .nomap { background: #fff3b0; color: #8a5a00; } .op-key .zero { background: #fdd8d6; color: #c0392b; }

.op-grid { flex: 1 1 0; min-height: 180px; overflow: auto; border: 1px solid var(--fw-border); border-radius: 8px; }
.op-table { width: 100%; min-width: 1080px; border-collapse: separate; border-spacing: 0; font-size: 16px; }
.op-table thead th { position: sticky; top: 0; z-index: 1; background: var(--fw-purple-dark); color: #fff; font-size: 14.5px; font-weight: 600; padding: 9px 8px; white-space: nowrap; }
.op-table td { padding: 3px 6px; border-bottom: 1px solid var(--fw-border); height: 38px; vertical-align: middle; }
.op-table td.ai { background: #f1f6fc; color: #1e4e8c; }
.op-table td.item { background: #f7f2fc; color: var(--fw-purple-dark); font-weight: 700; }
.op-table td.uom { background: #f0f9f9; color: #11706f; }
.op-table td.qty { background: #ecf8f0; }
.op-table td.price { background: #fff7eb; }
.op-table td.tot { color: #16875a; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.op-table td.rem { background: #f9fafb; }
.op-table tr.nomap td { background: #fff3b0 !important; }
.op-table input { width: 100%; border: 1px solid transparent; background: transparent; border-radius: 6px; padding: 5px 7px; font-size: 16px; color: inherit; font-weight: inherit; }
.op-table input:hover:not(:disabled) { border-color: var(--fw-border-strong); background: var(--fw-card); }
.op-table input:focus { border-color: var(--fw-purple); background: var(--fw-card); outline: 0; box-shadow: 0 0 0 2px rgba(111,60,150,.15); }
.op-table .g-qty { font-size: 17.5px; font-weight: 700; color: #16875a; text-align: right; }
.op-table .g-price { text-align: right; }
.op-table tr.zero .g-qty { color: #c0392b; background: #fdd8d6; }
.op-table .c-st { width: 104px; } .op-table .c-aic { width: 90px; } .op-table .c-ain { width: 20%; } .op-table .c-aiu { width: 100px; }
.op-table .c-code { width: 90px; } .op-table .c-item { width: 24%; } .op-table .c-uom { width: 70px; } .op-table .c-qty { width: 86px; }
.op-table .c-price { width: 90px; } .op-table .c-tot { width: 90px; } .op-table .c-rem { width: 13%; } .op-table .c-del { width: 40px; }

.op-foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding-top: 2px; }
.op-sum { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.op-sum .op-saving { display: none; }
.op-sum.saving .op-saving { display: inline-flex; }
.chip.pink { color: #fff; background: #c2337a; }

/* type-ahead list */
.ta-list { position: absolute; z-index: 2000; background: var(--fw-card); border: 1px solid var(--fw-border-strong); border-radius: 8px; box-shadow: 0 12px 30px rgba(30,20,60,.18);
           max-height: 340px; overflow: auto; padding: 4px; font-size: 16px; }
.ta-row { display: flex; gap: 10px; align-items: baseline; padding: 6px 9px; border-radius: 6px; cursor: pointer; }
.ta-row.on, .ta-row:hover { background: var(--fw-purple-soft); }
.ta-code { flex: 0 0 auto; min-width: 70px; color: var(--fw-purple); font-weight: 700; }
.ta-name { flex: 1 1 auto; color: var(--fw-text); }
.ta-uom { flex: 0 0 auto; color: #6b7280; font-size: 14.5px; }
.ta-price { flex: 0 0 auto; color: #16875a; font-weight: 700; min-width: 56px; text-align: right; }
.ta-none { padding: 8px 10px; color: #6b7280; }

/* messages */
.op-toast { position: fixed; right: 20px; bottom: 20px; z-index: 3000; max-width: 460px; padding: 12px 16px; border-radius: 10px; color: #fff; font-size: 16px;
            box-shadow: 0 10px 30px rgba(0,0,0,.2); transition: opacity .5s; }
.op-toast.good { background: #16875a; } .op-toast.bad { background: #b42335; } .op-toast.go { opacity: 0; }
#mmBody .mm-in { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--fw-border); border-radius: 8px; }

@media (max-width: 1100px) {
    .op { flex-direction: column; }
    .op-left { flex-basis: auto !important; }
    .op-split { display: none; }
    .op-right { min-height: 600px; }
    .op-fields { grid-template-columns: 1fr 1fr; }
}

/* v42 Orders page: left side as two tabs - Messages / Open message (full height) */
.op-views { display: flex; gap: 0; border-bottom: 2px solid var(--fw-border-strong); }
.op-views button { border: 0; background: none; padding: 8px 16px; font-weight: 700; font-size: 16.5px; color: var(--fw-muted); border-bottom: 3px solid transparent;
                   margin-bottom: -2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.op-views button#vPrev { flex: 1 1 auto; min-width: 0; text-align: left; max-width: 75%; }
.op-views button:hover:not(:disabled) { color: var(--fw-purple-dark); }
.op-views button.on { color: var(--fw-purple); border-bottom-color: var(--fw-purple); }
.op-views button:disabled { color: #b8bcc6; }
.op-listview { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.op-listview[hidden], .op-preview[hidden] { display: none !important; }
.op-preview { flex: 1 1 0; min-height: 0; }

/* =============================================================================
   v43 - font: Inter (Google Fonts), Segoe UI as fall-back; everything one size up
   ============================================================================= */
:root { --fw-font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; }
html { font-size: 17px; }
body, button, input, select, textarea, .btn, .form-control, .form-select, .dropdown-menu, .modal, .tooltip, .popover {
    font-family: var(--fw-font); }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; letter-spacing: -0.005em; }
h1, h2, h3, h4, h5, h6, .page-title, .fw-brand { font-family: var(--fw-font); letter-spacing: -0.015em; }
/* Numbers line up in tables and money boxes. */
table, .text-end, .chip.total, .op-table input, .stat .n { font-variant-numeric: tabular-nums; }
code, pre.code, textarea.prompt { font-family: "Cascadia Mono", Consolas, Menlo, monospace; }

/* v44 - version number next to the brand */
.fw-ver { font-size: 12.5px; font-weight: 600; letter-spacing: 0; padding: 1px 7px; margin-left: 4px; border-radius: 10px;
          background: rgba(255,255,255,.2); color: #fff; vertical-align: middle; }
.fw-version-line { font-size: 14px; color: #6b7280; text-align: center; margin-top: 8px; }

/* v45 Clara - telephone assistants */
.clara-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; margin-bottom: 12px; }
.clara-agent { margin: 0; border-left: 5px solid #d1d5db; display: flex; flex-direction: column; gap: 6px; }
.clara-agent.free { border-left-color: #16875a; }
.clara-agent.busy { border-left-color: #e0a100; background: #fffbea; }
.clara-agent.off { opacity: .65; }
.clara-agent.add { border: 2px dashed var(--fw-border-strong); align-items: center; justify-content: center; text-align: center; color: var(--fw-purple-dark); font-weight: 700; min-height: 140px; }
.clara-agent.add i { font-size: 30px; }
.clara-agent.add:hover { background: var(--fw-purple-soft); }
.clara-avatar { flex: 0 0 46px; height: 46px; border-radius: 50%; background: var(--fw-grad); color: #fff; font-weight: 700; font-size: 21px;
                display: flex; align-items: center; justify-content: center; }
.clara-name { font-weight: 700; font-size: 19px; color: var(--fw-purple-dark); }
.clara-state { font-weight: 600; }
.clara-agent.free .clara-state { color: #16875a; } .clara-agent.busy .clara-state { color: #8a5a00; } .clara-agent.off .clara-state { color: #6b7280; }
.clara-chat { display: flex; flex-direction: column; gap: 8px; max-height: 520px; overflow: auto; padding: 4px; }
.clara-chat > div { max-width: 78%; padding: 9px 13px; border-radius: 12px; line-height: 1.45; }
.clara-chat > div b { display: block; font-size: 13px; margin-bottom: 2px; }
.clara-chat .me { align-self: flex-start; background: var(--fw-purple-soft); color: #2d1846; }
.clara-chat .them { align-self: flex-end; background: #ecf8f0; color: #0f3d29; }

/* v45.1 Import (Sysware Accounts: products, customers, suppliers) */
.imp-steps { display: flex; gap: 6px; flex-wrap: wrap; }
.imp-steps > div { display: flex; align-items: center; gap: 8px; padding: 7px 14px 7px 8px; border-radius: 20px; background: var(--fw-surface-3); color: #6b7280; font-weight: 600; }
.imp-steps > div span { width: 26px; height: 26px; border-radius: 50%; background: #d1d5db; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.imp-steps > div.on { background: var(--fw-purple-soft); color: var(--fw-purple-dark); } .imp-steps > div.on span { background: var(--fw-purple); }
.imp-steps > div.done { background: #ecf8f0; color: #16875a; } .imp-steps > div.done span { background: #16875a; }
.imp-drop { border: 2px dashed #cfc4dd; border-radius: 12px; padding: 28px 16px; text-align: center; background: var(--fw-surface-2); cursor: pointer; transition: background .15s; }
.imp-drop i { font-size: 38px; color: #9b7fbf; display: block; margin-bottom: 6px; }
.imp-drop.over { background: var(--fw-purple-soft); border-color: var(--fw-purple); }
.imp-rows { max-height: calc(100vh - 380px); min-height: 240px; overflow: auto; }

/* v46.5 Clara dashboard */
.cl-tabs .nav-link { font-weight: 600; }
.cl-board { margin-top: 0; }
.cl-list { max-height: calc(100vh - 240px); overflow-y: auto; }
.cl-item { display: block; padding: 10px 14px; border-bottom: 1px solid var(--fw-border); color: inherit; text-decoration: none; }
.cl-item:hover { background: #f7f8fb; }
.cl-item.sel { background: #efeafd; border-left: 4px solid var(--fw-purple); }

/* v47.2 Sysware logo */
.fw-logo { height: 30px; width: auto; display: block; }
.auth-logo-img { text-align: center; margin: 0 auto 12px; }
.auth-logo-img img { height: 72px; width: auto; }
