/* =========================================================================
   Equinox design system - work-management board style (monday.com-like)
   Themed for Equinox Process Solutions (see the EQUINOX brand guidelines).
   ========================================================================= */

:root {
    --eq-dark: #323338;
    --eq-muted: #676879;
    --eq-border: #D0D4E4;
    --eq-row-border: #E6E9EF;
    --eq-header-fill: #F5F6F8;
    --eq-canvas: #F6F7FB;
    --eq-surface: #FFFFFF;
    --eq-hover: #DCDFEC;
    --eq-selected: #CCE5FF;
    --eq-primary: #0073EA;
    --eq-primary-hover: #0060B9;

    --eq-green: #00C875;
    --eq-green-dark: #00A05F;
    --eq-orange: #FDAB3D;
    --eq-red: #E2445C;
    --eq-light-blue: #579BFC;
    --eq-mid-blue: #79AFFD;
    --eq-purple: #A25DDC;
    --eq-grey: #A0A2AA;

    --eq-radius: 8px;
    --eq-shadow: 0 4px 8px rgba(0, 0, 0, .08);
    --eq-font: "Figtree", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    font-family: var(--eq-font);
    font-size: 14px;
    color: var(--eq-dark);
    background: var(--eq-canvas);
}

a { color: var(--eq-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Shell ------------------------------------------------------ */
.eq-shell { display: flex; min-height: 100vh; }

.eq-sidebar {
    width: 248px;
    flex-shrink: 0;
    background: var(--eq-surface);
    border-right: 1px solid var(--eq-border);
    padding: 16px 10px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.eq-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.eq-topbar {
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: var(--eq-surface);
    border-bottom: 1px solid var(--eq-border);
}
.eq-topbar strong { display: block; font-size: 15px; }
.eq-eyebrow { display: block; font-size: 10px; letter-spacing: .08em; color: var(--eq-muted); font-weight: 600; }
.eq-env { font-size: 11px; color: var(--eq-green-dark); font-weight: 600; }

.eq-content {
    flex: 1;
    margin: 12px;
    padding: 24px 28px;
    background: var(--eq-surface);
    border-radius: var(--eq-radius);
    box-shadow: var(--eq-shadow);
}

/* ---------- Sidebar ---------------------------------------------------- */
.eq-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.eq-brand b { display: block; font-size: 12px; letter-spacing: .04em; }
.eq-brand small { display: block; font-size: 11px; color: var(--eq-muted); }
.eq-brand-mark {
    width: 34px; height: 34px; border-radius: 8px;
    background: var(--eq-primary); color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px;
}
.eq-brand-mark span { color: var(--eq-orange); }

.eq-nav-caption { font-size: 11px; font-weight: 600; color: var(--eq-muted); padding: 14px 10px 6px; letter-spacing: .06em; }
.eq-nav { display: flex; flex-direction: column; gap: 2px; }
.eq-nav a {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: 6px;
    color: var(--eq-dark); font-size: 14px;
}
.eq-nav a:hover { background: var(--eq-hover); text-decoration: none; }
.eq-nav a.active { background: var(--eq-selected); font-weight: 600; }
.eq-nav a i { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }

.eq-side-bottom { margin-top: auto; font-size: 11px; color: var(--eq-muted); padding: 10px; }
.eq-side-bottom span { opacity: .8; }

/* ---------- Page head and toolbar -------------------------------------- */
.eq-title { font-size: 24px; font-weight: 700; margin: 0 0 14px; color: var(--eq-dark); }
.eq-title-home { font-size: 28px; }

.eq-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }

.eq-btn {
    display: inline-flex; align-items: center; justify-content: center;
    height: 32px; padding: 0 14px;
    border: 0; border-radius: 4px;
    font: 500 13px var(--eq-font);
    color: #fff; cursor: pointer;
    transition: filter .1s ease;
}
.eq-btn:hover { filter: brightness(.92); text-decoration: none; }
.eq-btn:disabled { opacity: .6; cursor: default; }
.eq-btn-blue   { background: var(--eq-primary); }
.eq-btn-green  { background: var(--eq-green-dark); }
.eq-btn-orange { background: var(--eq-orange); }
.eq-btn-purple { background: var(--eq-purple); }
.eq-btn-red    { background: var(--eq-red); }
.eq-btn-dark   { background: var(--eq-dark); }
.eq-btn-grey   { background: #E6E9EF; color: var(--eq-dark); }

.eq-info { font-size: 12px; color: var(--eq-muted); margin: 6px 0 18px; }

.eq-notice {
    padding: 14px 16px; border-radius: var(--eq-radius);
    background: #F0F6FF; border-left: 4px solid var(--eq-primary);
    color: var(--eq-dark);
}
.eq-banner-error {
    padding: 12px 16px; border-radius: var(--eq-radius);
    background: #FDECEF; border-left: 4px solid var(--eq-red);
    color: var(--eq-red); font-weight: 600;
}

/* ---------- Home dashboard --------------------------------------------- */
.eq-home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 24px; }

.eq-home-panel {
    border: 1px solid var(--eq-row-border);
    border-radius: var(--eq-radius);
    padding: 14px 18px 8px;
    margin-bottom: 24px;
}
.eq-home-panel h2 {
    font-size: 13px; letter-spacing: .06em; font-weight: 700;
    color: var(--accent); margin: 0 0 8px; padding-bottom: 8px;
    border-bottom: 2px solid var(--accent);
}

.eq-stat { width: 100%; border-collapse: collapse; }
.eq-stat td { padding: 8px 4px; border-bottom: 1px solid var(--eq-row-border); }
.eq-stat tr:last-child td { border-bottom: 0; }
.eq-stat .num { text-align: right; white-space: nowrap; width: 90px; }
.eq-stat .strong { font-weight: 700; }
.eq-stat tr.alert td { color: var(--eq-red); font-weight: 600; }
.eq-stat td.late { color: var(--eq-red); font-weight: 700; }
.eq-stat-head td { font-size: 12px; color: var(--eq-muted); }
.eq-dept-bar { display: inline-block; width: 4px; height: 18px; border-radius: 2px; margin-right: 10px; vertical-align: middle; }

.eq-workflow { font-size: 12px; color: var(--eq-muted); margin-top: 8px; }

/* ---------- Status pill (used on every board) -------------------------- */
.eq-pill {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 120px; height: 32px; padding: 0 10px;
    color: #fff; font-size: 13px; font-weight: 500;
}

/* ---------- Blazor error bar ------------------------------------------- */
#blazor-error-ui {
    background: #FFF4CE; bottom: 0; box-shadow: 0 -1px 2px rgba(0, 0, 0, .2);
    display: none; left: 0; padding: .6rem 1.25rem .7rem 1.25rem;
    position: fixed; width: 100%; z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }

.blazor-error-boundary {
    background: var(--eq-red); padding: 1rem; color: #fff;
}
.blazor-error-boundary::after { content: "An error has occurred."; }

/* Validation messages */
.validation-message { color: var(--eq-red); font-size: 12px; }
.invalid { outline: 1px solid var(--eq-red); }

/* ---------- Boards: groups, tables (monday.com style) ------------------ */
.eq-group {
    border-left: 6px solid var(--group, var(--eq-primary));
    border-radius: var(--eq-radius);
    background: var(--eq-surface);
    box-shadow: 0 0 0 1px var(--eq-row-border);
    padding: 14px 18px 16px;
    margin: 0 0 24px;
}
.eq-group-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.eq-group-head h2 { margin: 0; font-size: 18px; font-weight: 700; color: var(--group, var(--eq-dark)); }
.eq-count { color: var(--eq-muted); font-size: 13px; }
.eq-muted { color: var(--eq-muted); }

.eq-toolbar-tight { margin: 8px 0 0; }
.eq-tpl-active { padding: 10px 12px; background: var(--eq-header-fill); border-radius: 6px; margin-bottom: 12px; }

.eq-upload { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.eq-input {
    height: 32px; min-width: 320px; flex: 1; max-width: 520px;
    border: 1px solid var(--eq-border); border-radius: 4px; padding: 0 10px;
    font: 14px var(--eq-font);
}
.eq-input:focus { outline: 2px solid var(--eq-primary); outline-offset: -1px; }
.eq-hidden-file { display: none; }
label.eq-btn { cursor: pointer; }
.eq-btn.is-busy { opacity: .6; pointer-events: none; }

.eq-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; font-weight: 400; }
.eq-chip { font: 12px Consolas, monospace; padding: 2px 8px; border-radius: 10px; }
.eq-chip.ok { background: #DDF6EA; color: #00754A; }
.eq-chip.bad { background: #FDECEF; color: var(--eq-red); }
.eq-notice + .eq-table-scroll, .eq-banner-error + .eq-table-scroll { margin-top: 12px; }

.eq-table-scroll { overflow-x: auto; }
.eq-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.eq-table th {
    background: var(--eq-header-fill); color: var(--eq-muted); font-weight: 600; font-size: 12px;
    text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--eq-row-border); white-space: nowrap;
}
.eq-table td { padding: 0 10px; height: 38px; border-bottom: 1px solid var(--eq-row-border); }
.eq-table tbody tr:hover td { background: #F5F6F8; }
.eq-table td.eq-status-cell {
    color: #fff; text-align: center; font-weight: 500; min-width: 110px; padding: 0 6px;
}
.eq-table tbody tr:hover td.eq-status-cell { filter: brightness(.95); }
.eq-row-actions { white-space: nowrap; text-align: right; }
.eq-row-actions a, .eq-link {
    margin-left: 12px; color: var(--eq-primary); background: none; border: 0; padding: 0;
    font: 13px var(--eq-font); cursor: pointer;
}
.eq-link:hover { text-decoration: underline; }
.eq-pill-sm { min-width: 0; height: 22px; border-radius: 11px; padding: 0 10px; font-size: 12px; margin-right: 6px; }

.eq-ref-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.eq-ref-grid h3 { font-size: 13px; margin: 10px 0 6px; color: var(--eq-dark); }
.eq-ref { display: inline-block; margin: 0 6px 6px 0; padding: 2px 6px; background: var(--eq-header-fill); border-radius: 4px; font-size: 12px; }
code { font-family: Consolas, "Courier New", monospace; }

/* ---------- Editable board cells (Customers, Products...) -------------- */
.eq-search { min-width: 300px; max-width: 360px; flex: 0 1 auto; }
.eq-status { margin-bottom: 14px; }
.eq-clickable { cursor: pointer; user-select: none; }
.eq-caret { color: var(--group, var(--eq-dark)); font-size: 14px; width: 14px; }
.eq-board-table td { padding: 0; height: 38px; border-right: 1px solid var(--eq-row-border); }
.eq-board-table th { border-right: 1px solid var(--eq-row-border); }
.eq-board-table td.eq-code { padding: 0 10px; color: var(--eq-muted); font-size: 12px; white-space: nowrap; }
.eq-board-table td.eq-row-actions { padding: 0 10px; border-right: 0; }
.eq-sortable { cursor: pointer; }
.eq-sortable:hover { color: var(--eq-dark); }
.eq-cell {
    width: 100%; height: 37px; border: 1px solid transparent; background: transparent;
    padding: 0 10px; font: 13px var(--eq-font); color: var(--eq-dark);
}
.eq-cell:hover:not(:disabled) { border-color: var(--eq-border); background: #fff; }
.eq-cell:focus { outline: none; border-color: var(--eq-primary); background: #fff; box-shadow: inset 0 0 0 1px var(--eq-primary); }
.eq-cell:disabled { color: var(--eq-muted); }
.eq-cell-strong { font-weight: 600; }
.eq-add-row td { background: #FAFAFB; }
.eq-add-row .eq-cell::placeholder { color: var(--eq-muted); }
.eq-danger { color: var(--eq-red) !important; }

/* Dropdown cells on boards (e.g. Payment Terms) */
.eq-cell-select { cursor: pointer; appearance: auto; background-color: transparent; }
.eq-cell-select:disabled { cursor: default; }

/* =====================================================================
   Sign-in, account menu, users & permissions (step 3b)
   ===================================================================== */

/* ---------- Account window (top right) ---------- */
.eq-topbar { position: relative; z-index: 20; }
.eq-topbar-right { display: flex; align-items: center; gap: 18px; }

.eq-account { position: relative; }
.eq-account > summary {
    list-style: none;
    display: flex; align-items: center; gap: 10px;
    padding: 5px 10px 5px 5px;
    border-radius: 24px;
    cursor: pointer;
    border: 1px solid transparent;
    user-select: none;
}
.eq-account > summary::-webkit-details-marker { display: none; }
.eq-account > summary:hover,
.eq-account[open] > summary { background: var(--eq-header-fill); border-color: var(--eq-border); }

.eq-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 12px; flex-shrink: 0;
}
.eq-avatar-lg { width: 48px; height: 48px; font-size: 17px; }

.eq-account-name { display: flex; flex-direction: column; line-height: 1.15; }
.eq-account-name b { font-size: 13px; }
.eq-account-name small { font-size: 11px; color: var(--eq-muted); }
.eq-account-caret { color: var(--eq-muted); font-size: 11px; }

.eq-account-panel {
    position: absolute; right: 0; top: calc(100% + 8px);
    width: 310px;
    background: var(--eq-surface);
    border: 1px solid var(--eq-border);
    border-radius: var(--eq-radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .15);
    padding: 16px;
    z-index: 100;
}

.eq-account-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.eq-account-head b { display: block; font-size: 15px; }
.eq-account-head small { display: block; color: var(--eq-muted); font-size: 12px; margin-bottom: 4px; word-break: break-all; }

.eq-account-facts {
    display: grid; grid-template-columns: auto 1fr; gap: 4px 12px;
    margin: 0 0 12px; padding: 10px 0;
    border-top: 1px solid var(--eq-row-border); border-bottom: 1px solid var(--eq-row-border);
    font-size: 12px;
}
.eq-account-facts dt { color: var(--eq-muted); }
.eq-account-facts dd { margin: 0; }

.eq-account-links { display: flex; flex-direction: column; margin-bottom: 10px; }
.eq-account-links a { padding: 7px 8px; border-radius: 6px; color: var(--eq-dark); }
.eq-account-links a:hover { background: var(--eq-header-fill); text-decoration: none; }

.eq-account-signout {
    width: 100%; padding: 8px; border-radius: 6px;
    border: 1px solid var(--eq-red); background: #fff; color: var(--eq-red);
    font-weight: 600; cursor: pointer; font-family: inherit;
}
.eq-account-signout:hover { background: var(--eq-red); color: #fff; }

/* ---------- Login page ---------- */
.eq-login-page {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    background: linear-gradient(135deg, #0073EA 0%, #A25DDC 100%);
}
.eq-login-card {
    width: 100%; max-width: 420px;
    background: var(--eq-surface);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .25);
    padding: 32px 32px 24px;
}
.eq-login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.eq-login-brand b { display: block; font-size: 13px; letter-spacing: .04em; }
.eq-login-brand small { display: block; font-size: 11px; color: var(--eq-muted); }
.eq-login-card h1 { font-size: 22px; margin: 0 0 10px; }
.eq-login-intro { color: var(--eq-muted); font-size: 13px; margin: 0 0 14px; }
.eq-login-form { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.eq-login-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 13px; }
.eq-login-form label small { font-weight: 400; color: var(--eq-muted); }
.eq-login-form .eq-input { width: 100%; padding: 9px 10px; font-size: 14px; }
.eq-login-form label.eq-check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.eq-login-submit { width: 100%; padding: 10px; font-size: 15px; justify-content: center; margin-top: 4px; }
.eq-login-hint { font-size: 12px; margin: 10px 0 0; text-align: center; }

/* ---------- No access ---------- */
.eq-noaccess { max-width: 520px; margin: 40px auto; text-align: center; }
.eq-noaccess-icon { font-size: 42px; }
.eq-noaccess h2 { margin: 8px 0; }
.eq-noaccess p { color: var(--eq-muted); margin-bottom: 18px; }

/* ---------- Cards and forms ---------- */
.eq-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-bottom: 16px; }
.eq-card {
    background: var(--eq-surface);
    border: 1px solid var(--eq-row-border);
    border-radius: var(--eq-radius);
    padding: 16px 18px;
}
.eq-card h2, .eq-card h3 { margin: 0 0 12px; font-size: 16px; }
.eq-card h2 + .eq-account-head { margin-top: 4px; }
.eq-card .eq-card + h2 { margin-top: 16px; }

.eq-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; font-weight: 600; font-size: 13px; }
.eq-field small { font-weight: 400; }
.eq-field .eq-input { width: 100%; max-width: 420px; }
.eq-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 4px 16px; padding: 12px 4px 0; }
.eq-check { display: flex; align-items: center; gap: 8px; font-size: 13px; margin: 6px 0 10px; cursor: pointer; }
.eq-field-check { align-self: end; }
.eq-warn { color: #B26A00; background: #FFF4E5; border-radius: 6px; padding: 6px 10px; font-size: 13px; margin: 6px 0; }
span.eq-warn { display: inline-block; margin: 0 0 0 6px; }
.eq-push-right { margin-left: auto; }
.eq-center { text-align: center; }

/* ---------- Users & permissions ---------- */
.eq-row-selected td { background: var(--eq-selected) !important; }
.eq-user-editor { margin-top: 18px; }
.eq-user-editor .eq-group-head { display: flex; align-items: center; gap: 10px; }
.eq-perm-table td { vertical-align: middle; }
.eq-perm-table input[type=checkbox] { width: 18px; height: 18px; cursor: pointer; }
.eq-perm-off td { color: var(--eq-muted); background: #FAFAFC; }
.eq-perm-list { list-style: none; padding: 0; margin: 0; columns: 2; font-size: 13px; }
.eq-perm-list li { padding: 2px 0; }
.eq-perm-list li.yes { color: var(--eq-green-dark); }
.eq-perm-list li.no { color: var(--eq-muted); }

/* =====================================================================
   Branding, products, materials and suppliers (step 4)
   ===================================================================== */
.eq-brand-logo { width: 42px; height: 42px; border-radius: 9px; object-fit: cover; flex-shrink: 0; display: block; }
.eq-login-brand .eq-brand-logo { width: 54px; height: 54px; border-radius: 11px; }

.eq-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
input.eq-cell.eq-num { text-align: right; }
.eq-small { font-size: 12px; color: var(--eq-muted); }
.eq-money { display: flex; align-items: center; gap: 2px; }
.eq-money span { color: var(--eq-muted); font-size: 12px; min-width: 8px; }
.eq-up { color: var(--eq-red); font-weight: 700; }
.eq-down { color: var(--eq-green-dark); font-weight: 700; }
.eq-finder { margin-bottom: 18px; }
.eq-finder td { vertical-align: top; }
.eq-supplier h2 { margin-bottom: 8px; }
.eq-supplier .eq-btn { position: relative; overflow: hidden; }

/* =====================================================================
   Customer window (record layout, opened in its own window)
   ===================================================================== */
.eq-record-shell { min-height: 100vh; background: var(--eq-canvas); }
.eq-record-top {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 24px; background: var(--eq-surface); border-bottom: 1px solid var(--eq-border);
    position: sticky; top: 0; z-index: 20;
}
.eq-record-brand { padding: 0; }
.eq-record-body { max-width: 1200px; margin: 16px auto; padding: 24px 28px; background: var(--eq-surface);
    border-radius: var(--eq-radius); box-shadow: var(--eq-shadow); }

.eq-record-head { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; flex-wrap: wrap; }
.eq-record-avatar {
    width: 64px; height: 64px; border-radius: 14px; background: var(--eq-purple); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800;
}
.eq-record-title h1 { margin: 0 0 6px; font-size: 26px; }
.eq-chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.eq-record-meta { margin-left: auto; display: flex; flex-direction: column; gap: 4px; text-align: right; color: var(--eq-muted); font-size: 13px; }
.eq-record-meta b { color: var(--eq-dark); }

.eq-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 18px; }
.eq-tile {
    border: 1px solid var(--eq-row-border); border-left: 5px solid var(--tile); border-radius: var(--eq-radius);
    padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; background: var(--eq-surface);
}
.eq-tile-label { font-size: 12px; color: var(--eq-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.eq-tile-value { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.eq-tile-sub { font-size: 12px; color: var(--eq-muted); }

.eq-facts { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; margin: 0; font-size: 14px; }
.eq-facts dt { color: var(--eq-muted); }
.eq-facts dd { margin: 0; word-break: break-word; }
.eq-address { font-style: normal; line-height: 1.6; margin-bottom: 8px; font-size: 14px; }
.eq-notes { white-space: pre-wrap; margin: 0; }
.eq-pad { padding: 8px 4px; }

.eq-history .eq-group-head { display: flex; align-items: center; gap: 10px; }
.eq-tabs { display: inline-flex; border: 1px solid var(--eq-border); border-radius: 6px; overflow: hidden; }
.eq-tabs button { border: 0; background: #fff; padding: 6px 14px; cursor: pointer; font-family: inherit; font-size: 13px; }
.eq-tabs button + button { border-left: 1px solid var(--eq-border); }
.eq-tabs button.active { background: var(--eq-primary); color: #fff; font-weight: 600; }
.eq-table tfoot td { border-top: 2px solid var(--eq-border); background: var(--eq-header-fill); }

.eq-changes { margin-top: 18px; font-size: 13px; }
.eq-changes summary { cursor: pointer; color: var(--eq-muted); font-weight: 600; padding: 6px 0; }

/* Open button / link on the Customers board */
.eq-open { color: var(--eq-primary); font-weight: 600; white-space: nowrap; }
.eq-open span { font-size: 11px; }
.eq-btn-xs { padding: 3px 10px; font-size: 12px; min-height: 0; line-height: 1.4; margin-right: 6px; }
a.eq-btn:hover { text-decoration: none; }

@media print {
    .eq-no-print { display: none !important; }
    .eq-record-shell { background: #fff; }
    .eq-record-top { position: static; border: 0; }
    .eq-record-body { box-shadow: none; margin: 0; max-width: none; }
}

/* =====================================================================
   Quotes board and Quote Editor (step 5)
   ===================================================================== */
.eq-title-sub { font-size: 16px; font-weight: 600; color: var(--eq-muted); margin-left: 10px; }
.eq-overdue { color: var(--eq-red); font-weight: 700; }
.eq-confirm {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    background: #FFF4E5; border: 1px solid #FDAB3D; border-radius: var(--eq-radius);
    padding: 10px 14px; margin: 10px 0;
}
.eq-accept {
    border: 2px solid var(--eq-green); background: #E8FAF2; border-radius: var(--eq-radius);
    padding: 14px 18px; margin: 12px 0;
}
.eq-accept h2 { margin: 0 0 8px; font-size: 17px; }
.eq-quote-head { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 1000px) { .eq-quote-head { grid-template-columns: 1fr; } }
.eq-form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.eq-form-2 .eq-field .eq-input { max-width: none; }
.eq-span-2 { grid-column: span 2; }
.eq-inline { display: flex; gap: 6px; align-items: center; }
.eq-inline select { flex: 1; }
.eq-quote-head textarea { width: 100%; resize: vertical; font-family: inherit; }
.eq-lines td { vertical-align: middle; }
.eq-lines .eq-row-actions button { padding: 0 3px; }
.eq-totals { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; padding: 12px 16px 4px; }
.eq-totals div { display: flex; gap: 24px; min-width: 280px; justify-content: space-between; font-size: 14px; }
.eq-totals b { font-variant-numeric: tabular-nums; }
.eq-totals-grand { border-top: 2px solid var(--eq-dark); padding-top: 6px; font-size: 17px !important; }

/* =====================================================================
   Price calculator, simple quote lines, Financials, Pricing Setup (step 6)
   ===================================================================== */
.eq-input-sm { max-width: 110px; padding: 4px 8px; }
.eq-line-sub { font-size: 12px; color: var(--eq-muted); padding: 2px 8px 0; }
.eq-line-open td { background: #F3F8FF; }
.eq-line-details td { background: #F3F8FF; border-top: 0; }
.eq-detail-grid { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: 0 12px; padding: 4px 0; }
.eq-detail-grid .eq-input { max-width: none; width: 100%; }
.eq-span-3 { grid-column: span 3; }
.eq-span-4 { grid-column: span 4; }
.eq-delivery-row td { background: #F5FFF9; }
.eq-margin { display: inline-block; min-width: 44px; text-align: center; border-radius: 10px; padding: 1px 6px; font-size: 12px; font-weight: 700; color: #fff; }
.eq-margin.ok { background: var(--eq-green); }
.eq-margin.mid { background: var(--eq-orange); }
.eq-margin.low { background: var(--eq-red); }
.eq-warn-text { color: #B26A00; }

.eq-financials { margin-top: 18px; border: 1px solid var(--eq-row-border); border-left: 5px solid #323338; border-radius: var(--eq-radius); padding: 8px 14px; background: #FAFAFC; }
.eq-financials > summary { cursor: pointer; padding: 6px 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.eq-fin-summary { margin-left: auto; font-size: 13px; }
.eq-fin-table td, .eq-fin-table th { font-size: 12px; white-space: nowrap; }
.eq-fin-table td:nth-child(2) { white-space: normal; }
.eq-workings td { background: #fff; }
.eq-workings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 6px 18px; padding: 6px 0; font-size: 12px; }
.eq-workings-grid span { display: block; color: var(--eq-muted); }
.eq-workings-grid small { color: var(--eq-muted); }

.eq-modal-backdrop { position: fixed; inset: 0; background: rgba(30, 32, 40, .45); z-index: 200; display: flex; align-items: flex-start; justify-content: center; padding: 30px 16px; overflow-y: auto; }
.eq-modal { background: var(--eq-surface); border-radius: 12px; box-shadow: 0 20px 50px rgba(0,0,0,.3); width: 100%; max-width: 1080px; padding: 18px 22px; }
.eq-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.eq-modal-head h2 { margin: 0; font-size: 20px; }
.eq-modal-foot { border-top: 1px solid var(--eq-row-border); padding-top: 12px; margin-top: 12px; }
.eq-calc-body { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; }
@media (max-width: 900px) { .eq-calc-body { grid-template-columns: 1fr; } }
.eq-calc-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; align-content: start; }
.eq-calc-inputs .eq-input { max-width: none; width: 100%; }
.eq-calc-finishing { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 10px; }
.eq-calc-finishing .eq-input-sm { max-width: 90px; }
.eq-calc-results .eq-table td { font-size: 13px; }
.eq-calc-total td { font-weight: 800; border-top: 2px solid var(--eq-dark); }
.eq-calc-final { margin-top: 12px; background: #E8FAF2; border: 2px solid var(--eq-green); border-radius: var(--eq-radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.eq-calc-final span { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--eq-muted); }
.eq-calc-final b { font-size: 28px; }
.eq-calc-final small { color: var(--eq-muted); }

.eq-setup-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 14px; padding: 10px 4px 4px; }
.eq-setup-table input.eq-cell { min-width: 70px; }
.eq-setup-table td:first-child input { min-width: 170px; }

.eq-edit-card { margin-bottom: 18px; border-left: 5px solid var(--eq-primary); }
.eq-edit-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 0 14px; }
.eq-edit-grid .eq-input { max-width: none; width: 100%; }
.eq-edit-grid textarea { resize: vertical; font-family: inherit; }
@media (max-width: 800px) { .eq-edit-grid { grid-template-columns: 1fr 1fr; } }

/* =====================================================================
   Item-by-item accept and the Production board (step 7)
   ===================================================================== */
.eq-job-chip { display: inline-block; padding: 2px 10px; border-radius: 11px; color: #fff !important; font-weight: 700; font-size: 12px; white-space: nowrap; }
.eq-job-chip:hover { text-decoration: none; filter: brightness(.95); }
.eq-wrap { flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.eq-due-today { color: #D97A00; font-weight: 700; }
.eq-overdue input, .eq-due-today input { color: inherit; font-weight: inherit; }
.eq-row-done td { opacity: .6; }
.eq-cell-wrap { white-space: normal; min-width: 220px; }
.eq-prod-table td { vertical-align: middle; }
.eq-pill-select {
    width: 100%; border: 0; background: transparent; color: #fff; font-weight: 700; font-family: inherit;
    text-align: center; text-align-last: center; cursor: pointer; padding: 4px 2px; appearance: none;
}
.eq-pill-select option { color: var(--eq-dark); background: #fff; }
.eq-pill-select:disabled { cursor: default; }

/* =====================================================================
   Job ticket (printable, A4)
   ===================================================================== */
.eq-ticket { max-width: 960px; margin: 0 auto; font-size: 14px; }
.eq-ticket h3 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--eq-muted); }
.eq-ticket h3 small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.eq-ticket-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border-bottom: 3px solid var(--eq-dark); padding-bottom: 10px; }
.eq-ticket-label { font-size: 13px; font-weight: 800; letter-spacing: .15em; color: var(--eq-muted); }
.eq-ticket-no { font-size: 38px; font-weight: 900; line-height: 1.05; }
.eq-ticket-links { font-size: 14px; margin-top: 4px; }
.eq-ticket-due { border: 3px solid var(--eq-dark); border-radius: 10px; padding: 8px 16px; text-align: center; min-width: 200px; }
.eq-ticket-due span { display: block; font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.eq-ticket-due b { font-size: 22px; }
.eq-ticket-due small { display: block; font-weight: 800; }
.eq-ticket-due.overdue { border-color: var(--eq-red); color: var(--eq-red); }
.eq-ticket-dept { color: #fff; font-weight: 800; font-size: 18px; padding: 8px 14px; border-radius: 8px; margin: 12px 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
    -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.eq-ticket-pills .eq-pill { border: 1px solid rgba(255,255,255,.6); }
.eq-ticket-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 12px; }
.eq-ticket-box { border: 1px solid var(--eq-border); border-radius: 8px; padding: 10px 14px; margin-bottom: 12px; break-inside: avoid; }
.eq-ticket-cust { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.eq-ticket-desc { font-size: 18px; font-weight: 800; margin-bottom: 10px; }
.eq-ticket-spec { display: flex; gap: 16px; align-items: flex-start; }
.eq-ticket-qty { border: 3px solid var(--eq-dark); border-radius: 10px; padding: 6px 14px; text-align: center; min-width: 120px; }
.eq-ticket-qty span { display: block; font-size: 11px; font-weight: 800; letter-spacing: .1em; }
.eq-ticket-qty b { font-size: 34px; line-height: 1.1; }
.eq-ticket-notes { background: #FFF8D6; border: 2px solid #F2C94C; border-radius: 8px; padding: 10px 14px; margin-bottom: 12px; break-inside: avoid;
    -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.eq-ticket-notes textarea { width: 100%; background: #fff; resize: vertical; font-family: inherit; font-size: 14px; }
.eq-ticket-notes-print { white-space: pre-wrap; font-size: 15px; min-height: 40px; }
.eq-ticket-quote-notes { margin-top: 8px; font-size: 13px; white-space: pre-wrap; }
.eq-print-only { display: none; }
.eq-ruled { border-bottom: 1px solid #BFC3D0; height: 30px; }
.eq-signoff { width: 100%; border-collapse: collapse; }
.eq-signoff th { text-align: left; font-size: 12px; color: var(--eq-muted); padding: 4px 6px; }
.eq-signoff td { border: 1px solid var(--eq-border); height: 34px; padding: 4px 8px; }
.eq-tickbox { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--eq-dark); border-radius: 3px; }
.eq-ticket-order td, .eq-ticket-order th { font-size: 12px; }
.eq-this-job td { font-weight: 800; background: #FFF8D6; }
.eq-ticket-foot { text-align: center; color: var(--eq-muted); font-size: 11px; margin-top: 8px; }

@media print {
    @page { size: A4; margin: 10mm; }
    .eq-print-only { display: block !important; }
    .eq-ticket { max-width: none; font-size: 12px; }
    .eq-ticket-no { font-size: 32px; }
    .eq-ticket a { color: inherit; text-decoration: none; }
}

/* Job ticket - editable */
.eq-ticket-controls { display: grid; grid-template-columns: repeat(4, minmax(140px, 1fr)) 1.2fr; gap: 0 12px; align-items: end;
    background: var(--eq-header-fill); border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; }
.eq-ticket-controls .eq-input { max-width: none; width: 100%; }
.eq-status-select { color: #fff; font-weight: 700; border: 0; }
.eq-status-select option { color: var(--eq-dark); background: #fff; }
.eq-ticket-user { font-size: 13px; padding-bottom: 6px; }
.eq-saved { color: var(--eq-green-dark); font-weight: 600; }
.eq-ticket-textarea { width: 100%; border: 1px solid var(--eq-border); border-radius: 6px; padding: 8px 10px; font-family: inherit; font-size: 15px; resize: vertical; background: #fff; }
.eq-ticket-textarea:focus { outline: 2px solid var(--eq-primary); }
.eq-ruled-area { line-height: 30px; background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 29px, #BFC3D0 29px, #BFC3D0 30px);
    background-attachment: local; padding-top: 0; }
.eq-ruled-print { min-height: 210px; white-space: pre-wrap; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.eq-tick { width: 24px; height: 24px; cursor: pointer; accent-color: var(--eq-green-dark); }
.eq-signed td { background: #E8FAF2; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
@media (max-width: 900px) { .eq-ticket-controls { grid-template-columns: 1fr 1fr; } }

/* ---- Step 8: Completed, Ready to Invoice, Invoices ---- */
.eq-grow { flex: 1 1 auto; }
.eq-textarea { width: 100%; max-width: none; min-height: 110px; resize: vertical; font-family: inherit; }
.eq-ready-summary { display: flex; flex-wrap: wrap; gap: 22px; padding: 10px 16px; margin: 0 0 14px; background: #fff;
    border: 1px solid #E6E9EF; border-radius: 8px; font-size: 14px; }
.eq-ready-summary b { margin-left: 4px; }
.eq-group-head .eq-check { width: 17px; height: 17px; cursor: pointer; }
.eq-group-head .eq-btn { margin-left: auto; }
.eq-group-head h2 a { color: inherit; text-decoration: none; }
.eq-group-head h2 a:hover { text-decoration: underline; }

/* ---- Step 9: customer import, email invoice ---- */
.eq-row-muted td { color: #A0A2AA; }
.eq-email-card { border-left: 4px solid #A25DDC; }
.eq-email-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.eq-email-grid .eq-span-2 { grid-column: span 2; }
.eq-email-grid .eq-field .eq-input { max-width: none; }
.eq-standard-box { margin-top: 16px; padding: 14px 16px; background: #F5F6F8; border-radius: 8px; }
.eq-standard-box .eq-field .eq-input { max-width: none; }
.eq-token-list { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: #676879; }
.eq-token-list code { background: #fff; border: 1px solid #E6E9EF; border-radius: 4px; padding: 1px 5px; color: #323338; }
@media (max-width: 800px) { .eq-email-grid { grid-template-columns: 1fr; } .eq-email-grid .eq-span-2 { grid-column: span 1; } }

/* ---- Step 10: department alerts ---- */
.eq-bell { position: relative; }
.eq-bell-btn { position: relative; width: 38px; height: 38px; border-radius: 50%; border: 1px solid transparent; background: transparent;
    cursor: pointer; font-size: 18px; display: inline-flex; align-items: center; justify-content: center; }
.eq-bell-btn:hover { background: var(--eq-header-fill); border-color: var(--eq-border); }
.eq-bell-btn.has-unread span[aria-hidden] { animation: eq-bell-ring 1.2s ease-in-out 2; display: inline-block; }
.eq-bell-count { position: absolute; top: -2px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
    background: #E2445C; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.eq-bell-backdrop { position: fixed; inset: 0; z-index: 90; }
.eq-bell-panel { position: absolute; right: 0; top: calc(100% + 8px); width: 360px; max-height: 70vh; display: flex; flex-direction: column;
    background: var(--eq-surface, #fff); border: 1px solid var(--eq-border, #E6E9EF); border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,.15); z-index: 100; overflow: hidden; }
.eq-bell-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 6px; }
.eq-bell-depts, .eq-bell-desktop { padding: 4px 14px 8px; font-size: 12px; color: #676879; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.eq-bell-list { overflow-y: auto; border-top: 1px solid var(--eq-border, #E6E9EF); }
.eq-bell-item { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-bottom: 1px solid #F0F1F3;
    color: inherit; text-decoration: none; font-size: 13px; }
.eq-bell-item:hover { background: #F5F6F8; }
.eq-bell-item.unread { background: #EEF5FF; border-left: 3px solid #0073EA; }
.eq-bell-item span { color: #323338; }
.eq-bell-item small { color: #A0A2AA; font-size: 11px; }
.eq-link-btn { background: none; border: 0; color: #0073EA; cursor: pointer; font-size: 12px; padding: 0; }
.eq-link-btn:hover { text-decoration: underline; }
.eq-dept-matrix .eq-dept-col { text-align: center; min-width: 110px; }
.eq-row-total td { background: #F5F6F8; }
@keyframes eq-bell-ring { 0%,100% { transform: rotate(0); } 20% { transform: rotate(15deg); } 40% { transform: rotate(-12deg); } 60% { transform: rotate(8deg); } 80% { transform: rotate(-4deg); } }
@media print { .eq-bell { display: none; } }

/* ---- Step 11: product workings & price check ---- */
.eq-save-product { margin-top: 14px; padding: 14px 16px; background: #F7F2FD; border: 1px solid #E3D4F7; border-radius: 8px; }
.eq-save-product h3 { margin: 0 0 8px; font-size: 15px; }
.eq-workings-link { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: inherit; }
.eq-workings-link small { color: #676879; }
.eq-margin.low { background: var(--eq-red, #E2445C); }
.eq-costing-compare { display: flex; align-items: stretch; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.eq-costing-compare > div:not(.eq-arrow) { flex: 1 1 180px; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; background: #F5F6F8; border-radius: 8px; }
.eq-costing-compare small { color: #676879; font-size: 12px; }
.eq-costing-compare b { font-size: 22px; }
.eq-costing-compare .eq-arrow { align-self: center; font-size: 22px; color: #A0A2AA; }
.eq-up { color: #E2445C; }
.eq-down { color: #00A05F; }
.eq-workings td:first-child { white-space: nowrap; font-weight: 600; }

.eq-workings-add { font-size: 12px; color: #0073EA; text-decoration: none; white-space: nowrap; }
.eq-workings-add:hover { text-decoration: underline; }

/* ---- Step 14: up-front invoices, VAT per item, extra materials, live boards ---- */
.eq-extra-material { border-left: 3px solid #E6E9EF; padding-left: 10px; margin-bottom: 6px; }
.eq-extra-size { gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.eq-extra-size .eq-field { margin-bottom: 0; }
.eq-new-customer { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; padding: 10px 12px; margin: 0 0 10px;
    background: #F5F6F8; border: 1px solid #E6E9EF; border-radius: 8px; grid-column: 1 / -1; }
.eq-new-customer b { grid-column: 1 / -1; }
.eq-upfront-log { list-style: none; padding: 0; margin: 4px 0 8px; }
.eq-upfront-log li { padding: 6px 10px; border-radius: 6px; margin-bottom: 6px; }
.eq-upfront-log li.ok { background: #E8F8F0; }
.eq-upfront-log li.bad { background: #FDECEE; color: #B0263B; }
.eq-live { display: inline-block; margin-top: 10px; font-size: 11px; color: #A0A2AA; }
.eq-live::first-letter { color: #00C875; }

/* ---------- Step 15: material rows ------------------------------------- */
.eq-material-row { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px 4px; border: 1px solid var(--eq-border); border-radius: 8px; background: #fafbfc; }
.eq-material-row > .eq-field { margin-bottom: 0; }
.eq-material-size { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.eq-material-size .eq-field { flex: 1 1 110px; max-width: 170px; }
.eq-size-note { font-size: 12px; color: var(--eq-muted); padding-bottom: 12px; white-space: nowrap; }
button.eq-size-note { color: var(--eq-primary); }

/* ---------- Step 15: phone and tablet layout ---------------------------- */
.eq-nav-toggle, .eq-nav-backdrop, .eq-menu-btn { display: none; }
.eq-topbar-title { min-width: 0; }

@media (max-width: 900px) {
    .eq-menu-btn { display: inline-flex; flex-direction: column; justify-content: center; gap: 4px; width: 40px; height: 40px; padding: 8px; margin-right: 8px; border-radius: 8px; cursor: pointer; flex-shrink: 0; }
    .eq-menu-btn span { display: block; height: 2px; background: var(--eq-text, #323338); border-radius: 2px; }
    .eq-menu-btn:active { background: var(--eq-canvas); }

    .eq-sidebar { position: fixed; left: 0; top: 0; z-index: 1001; height: 100vh; height: 100dvh; overflow-y: auto;
                  transform: translateX(-105%); transition: transform .2s ease; box-shadow: 4px 0 24px rgba(0,0,0,.18); }
    .eq-nav-toggle:checked ~ .eq-sidebar { transform: none; }
    .eq-nav-toggle:checked ~ .eq-nav-backdrop { display: block; position: fixed; inset: 0; z-index: 1000; background: rgba(30,32,40,.45); }

    .eq-topbar { padding: 0 10px; position: sticky; top: 0; z-index: 50; }
    .eq-topbar > .eq-topbar-title { flex: 1; }
    .eq-topbar strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .eq-eyebrow, .eq-env { display: none; }
    .eq-topbar-right { gap: 8px; }

    .eq-content { margin: 0; padding: 16px 14px; border-radius: 0; box-shadow: none; }
    .eq-home-grid { grid-template-columns: 1fr; }
    .eq-bell-panel { position: fixed; left: 8px; right: 8px; top: 58px; width: auto; }
}

@media (max-width: 700px) {
    body { font-size: 15px; }
    .eq-content { padding: 12px 10px; }

    /* Forms and calculators: one column */
    .eq-edit-grid, .eq-calc-inputs, .eq-calc-body, .eq-quote-head, .eq-ticket-controls, .eq-email-grid,
    .eq-form-2, .eq-detail-grid, .eq-ref-grid, .eq-setup-grid, .eq-ticket-grid, .eq-workings-grid, .eq-card-grid {
        grid-template-columns: 1fr !important;
    }
    .eq-span-2, .eq-span-3, .eq-span-4 { grid-column: 1 / -1 !important; }
    .eq-form-grid { grid-template-columns: 1fr; }
    .eq-tiles { grid-template-columns: 1fr 1fr; }

    /* Bigger touch targets; 16px text stops iPhones zooming into boxes */
    .eq-input, .eq-textarea, select.eq-input { font-size: 16px; min-height: 40px; }
    .eq-input-sm { min-height: 36px; }
    .eq-btn { min-height: 40px; padding-left: 14px; padding-right: 14px; }
    .eq-btn-xs { min-height: 32px; }
    .eq-material-size .eq-field { max-width: none; }

    /* Toolbars wrap; tables scroll sideways rather than squash */
    .eq-toolbar { gap: 6px; }
    .eq-toolbar .eq-search, .eq-toolbar .eq-input { flex: 1 1 100%; }
    .eq-push-right { margin-left: 0 !important; }
    .eq-content .eq-table, .eq-board-table, .eq-prod-table, .eq-fin-table, .eq-perm-table, .eq-setup-table {
        display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap;
    }
    .eq-table-scroll .eq-table { display: table; }

    /* Pop-up windows fill the screen */
    .eq-modal-backdrop { padding: 0; align-items: stretch; }
    .eq-modal { max-width: none !important; min-height: 100vh; border-radius: 0; padding: 14px 12px; }
    .eq-modal-foot { position: sticky; bottom: 0; background: var(--eq-surface); padding-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }

    /* Job ticket on a phone */
    .eq-ticket { font-size: 15px; }
    .eq-ticket-head { flex-wrap: wrap; gap: 8px; }
    .eq-title { font-size: 20px; }
}

/* ---------- Step 15b: quote lines - stop Dept / Qty / Unit price being squashed ---------- */
.eq-lines { min-width: 1240px; table-layout: auto; }
.eq-lines td { padding: 0 6px; }
.eq-lines td:nth-child(3) .eq-cell-select { min-width: 160px; }
.eq-lines td:nth-child(4) .eq-cell { min-width: 80px; padding: 0 6px; }
.eq-lines td:nth-child(5) .eq-money { min-width: 110px; }
.eq-lines td:nth-child(5) .eq-cell { min-width: 95px; padding: 0 6px; }
.eq-lines td:nth-child(7) { white-space: nowrap; }
.eq-lines .eq-row-actions { white-space: nowrap; }

/* =====================================================================
   EQUINOX BRAND THEME
   Primary:   orange #FF5609 (Pantone 1655 C), cool grey #B2B4B3, black #28312F
   Secondary: navy #032F59, blue #2541F4, olive #5D774E, red #CA191B, lime #79F524, grey #888B8D
   These rules come last so they win over the base styles above.
   ===================================================================== */
:root {
    --eq-orange-brand: #FF5609;
    --eq-orange-dark: #E04400;
    --eq-orange-soft: #FFE6DA;
    --eq-black: #28312F;
    --eq-cool-grey: #B2B4B3;
    --eq-navy: #032F59;
    --eq-blue-brand: #2541F4;
    --eq-olive: #5D774E;
    --eq-red-brand: #CA191B;
    --eq-grey-8: #888B8D;

    --eq-dark: #28312F;
    --eq-primary: #FF5609;
    --eq-primary-hover: #E04400;
    --eq-selected: #FFE6DA;
    --eq-hover: #F1F2F2;
    --eq-canvas: #F3F4F4;
    --eq-font: "Helvetica Neue", Helvetica, Arial, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--eq-navy); }

/* Buttons: orange = main action, navy = secondary action, black = documents */
.eq-btn-blue   { background: var(--eq-orange-brand); }
.eq-btn-orange { background: var(--eq-orange-brand); }
.eq-btn-purple { background: var(--eq-navy); }
.eq-btn-green  { background: var(--eq-olive); }
.eq-btn-red    { background: var(--eq-red-brand); }
.eq-btn-dark   { background: var(--eq-black); }

/* Dark sidebar with the white wordmark */
.eq-sidebar { background: var(--eq-black); border-right: 0; color: #fff; }
.eq-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 8px 10px 22px; text-decoration: none; }
.eq-brand:hover { text-decoration: none; }
.eq-brand-wordmark { width: 168px; max-width: 100%; height: auto; display: block; }
.eq-brand small { font-size: 10px; letter-spacing: .22em; color: var(--eq-cool-grey); }
.eq-nav-caption { color: var(--eq-grey-8); }
.eq-nav a { color: #E8E9E9; }
.eq-nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.eq-nav a.active { background: var(--eq-orange-brand); color: #fff; }
.eq-nav a.active i { background: #fff !important; }
.eq-nav a.eq-nav-soon { color: var(--eq-grey-8); }
.eq-nav a.eq-nav-soon small { margin-left: auto; font-size: 9px; letter-spacing: .06em; border: 1px solid #4A5452; border-radius: 4px; padding: 1px 4px; }
.eq-side-bottom { color: var(--eq-cool-grey); border-top: 1px solid rgba(255, 255, 255, .08); }
.eq-sidebar { overflow-y: auto; }

/* Top bar and titles */
.eq-topbar { border-bottom: 3px solid var(--eq-orange-brand); }
.eq-title { color: var(--eq-black); }
.eq-env { color: var(--eq-olive); }

/* Login page - orange to navy, as on the brand exploration slides */
.eq-login-page { background: linear-gradient(120deg, #FF5609 0%, #8A3A1A 35%, #1C2A33 70%, #032F59 100%); }
.eq-login-brand { justify-content: center; margin-bottom: 26px; }
.eq-login-logo { width: 260px; max-width: 100%; height: auto; display: block; }

/* Record windows (customer, invoice, project brief) */
.eq-record-top { border-bottom: 3px solid var(--eq-orange-brand); }
.eq-record-logo { height: 40px; width: auto; display: block; }

/* =====================================================================
   Schedule (who is working on what)
   ===================================================================== */
.eq-sched {
    display: grid;
    grid-template-columns: 190px repeat(var(--days), minmax(64px, 1fr));
    border: 1px solid var(--eq-row-border);
    border-radius: var(--eq-radius);
    background: #fff;
    min-width: 760px;
}
.eq-sched-corner, .eq-sched-day {
    background: var(--eq-header-fill);
    border-bottom: 1px solid var(--eq-row-border);
    padding: 6px 8px;
    font-size: 12px;
    color: var(--eq-muted);
    position: sticky; top: 0; z-index: 1;
}
.eq-sched-corner { font-weight: 700; }
.eq-sched-day { text-align: center; border-left: 1px solid var(--eq-row-border); }
.eq-sched-day b { display: block; color: var(--eq-dark); font-size: 12px; }
.eq-sched-day span { font-size: 11px; }
.eq-sched-day.monday { border-left: 2px solid var(--eq-cool-grey); }
.eq-sched-day.today { background: var(--eq-orange-soft); }
.eq-sched-day.today b { color: var(--eq-orange-dark); }
.eq-sched-person {
    padding: 8px 10px;
    border-top: 1px solid var(--eq-row-border);
    border-right: 1px solid var(--eq-row-border);
    background: #FAFAFA;
}
.eq-sched-person b { display: block; font-size: 13px; }
.eq-sched-person small { color: var(--eq-muted); font-size: 11px; }
.eq-sched-empty { padding: 8px; color: var(--eq-muted); font-size: 12px; border-top: 1px solid var(--eq-row-border); }
.eq-sched-bar {
    margin: 3px 2px;
    padding: 4px 8px;
    border-radius: 6px;
    background: var(--bar);
    color: #fff;
    font-size: 12px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .15);
}
.eq-sched-bar:hover { filter: brightness(.93); text-decoration: none; color: #fff; }
.eq-sched-bar small { opacity: .85; margin-left: 4px; }
.eq-sched-bar.late { outline: 2px solid var(--eq-red-brand); outline-offset: -2px; }
.eq-sched-load {
    border-left: 1px solid var(--eq-row-border);
    border-bottom: 1px solid var(--eq-row-border);
    text-align: center;
    font-size: 11px;
    padding: 3px 0;
    color: var(--eq-muted);
    font-variant-numeric: tabular-nums;
}
.eq-sched-load.some { background: #EEF5EA; color: var(--eq-olive); font-weight: 700; }
.eq-sched-load.over { background: #FBE3E3; color: var(--eq-red-brand); font-weight: 700; }

/* Coming-soon module pages */
.eq-soon { max-width: 760px; }
.eq-soon ul { margin: 6px 0 0 18px; padding: 0; }
.eq-soon li { margin: 4px 0; }
