/* Extras beyond tailwind */
.tier-badge { padding: 2px 10px; border-radius: 9999px; font-size: 11px; font-weight: 700; letter-spacing: .5px; }
.tier-BRONZE { background: #fde8d2; color: #8a4b1e; }
.tier-SILVER { background: #e5e7eb; color: #334155; }
.tier-GOLD   { background: #fef3c7; color: #92400e; }
.tier-PLATINUM { background: #dbeafe; color: #1e40af; }

.status-pill { padding: 2px 10px; border-radius: 9999px; font-size: 11px; font-weight: 600; }
.status-PENDING, .status-REGISTERED, .status-DRAFT, .status-NEW { background:#fef3c7; color:#92400e; }
.status-APPROVED, .status-CONVERTED, .status-CLOSED_WON { background:#dcfce7; color:#166534; }
.status-REJECTED, .status-LOST, .status-CLOSED_LOST, .status-EXPIRED { background:#fee2e2; color:#991b1b; }
.status-INFO_NEEDED, .status-QUALIFIED, .status-NEGOTIATION, .status-SENT { background:#dbeafe; color:#1e40af; }
.status-SUSPENDED { background:#e5e7eb; color:#334155; }
.status-RAISED { background:#dcfce7; color:#166534; }
.status-CANCELLED { background:#fee2e2; color:#991b1b; }
.status-PUBLISHED { background:#dbeafe; color:#1e40af; }
.status-CLOSING_SOON { background:#fef3c7; color:#92400e; }
.status-QUOTED { background:#e0e7ff; color:#4338ca; }
.status-WON { background:#dcfce7; color:#166534; }
.status-WITHDRAWN { background:#e5e7eb; color:#475569; }

/* Sidebar slide (collapse/expand) */
.app-sidebar { transition: transform .25s ease; }
.sb-collapsed .app-sidebar { transform: translateX(-100%); }
.sb-collapsed .app-main { margin-left: 0 !important; }

table.data { width:100%; }
table.data th { text-align:left; background:#f5f7fb; color:#475569; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; padding:10px 10px; border-bottom:1px solid #e2e8f0; }
table.data th .sort-btn { background:none; border:none; padding:0; font:inherit; color:inherit; cursor:pointer; font-weight:700; }
table.data th .sort-btn:hover { color:#1d4ed8; }
table.data td { padding:9px 10px; border-bottom:1px solid #eef1f6; font-size:13px; }
[data-deals-filter-form] [data-rac-input] { padding:5px 8px; font-size:13px; }
[data-deals-filter-form] [data-rac] label { margin-bottom:4px; }
table.data tbody tr:hover { background:#f5f8ff; }
table.data tfoot td { padding:7px 8px; border-top:2px solid #cbd5e1; background:#f8fafc; font-weight:700; }
table.data th.col-narrow, table.data td.col-narrow { white-space:nowrap; font-size:12px; padding-left:6px; padding-right:6px; }

/* Meetings table: match Leads look, wrap whole words, scrollable with visible Actions column */
.mt-table-scroll { overflow-x:auto; -webkit-overflow-scrolling:touch; }

/* Bids table: 13 columns, horizontal scroll on narrow screens */
.bid-table-scroll { overflow-x:auto; -webkit-overflow-scrolling:touch; }
.bid-table-scroll table.data { min-width:1420px; }
.bid-table-scroll table.data th,
.bid-table-scroll table.data td { vertical-align:middle; overflow-wrap:anywhere; word-break:normal; overflow-wrap:break-word; }
.bid-table-scroll table.data td:last-child,
.bid-table-scroll table.data th:last-child { white-space:nowrap; }
.mt-table-scroll table.data { min-width:1050px; }
.mt-table-scroll table.data th,
.mt-table-scroll table.data td { vertical-align:middle; overflow-wrap:anywhere; word-break:normal; overflow-wrap:break-word; }
.mt-table-scroll table.data td:last-child,
.mt-table-scroll table.data th:last-child { position:sticky; right:0; background:#fff; border-left:1px solid #e2e8f0; min-width:160px; white-space:nowrap; }
.mt-table-scroll table.data thead th:last-child { background:#f8fafc; z-index:1; }
.mt-table-scroll table.data td:last-child:hover { background:#f8fafc; }

.spinner { border: 3px solid #e2e8f0; border-top-color:#0b63a8; border-radius:50%; width:28px; height:28px; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

#loading-overlay { position:fixed; inset:0; z-index:9999; background:rgba(255,255,255,0.85); display:flex; align-items:center; justify-content:center; flex-direction:column; gap:12px; opacity:0; pointer-events:none; transition:opacity .15s; }
#loading-overlay.active { opacity:1; pointer-events:auto; }
#loading-overlay .spinner { width:36px; height:36px; border-width:4px; }
#loading-overlay .loading-label { font-size:13px; color:#64748b; font-weight:500; }

.no-linkify { pointer-events:none; color:inherit; text-decoration:none; cursor:default; }

/* Rich text toolbar for Terms & Conditions editor */
.rich-toolbar .tb-btn { padding:0 7px; min-width:32px; min-height:32px; height:32px; border-radius:6px; border:1px solid transparent; background:transparent; color:#334155; font-size:11px; line-height:1; cursor:pointer; font-weight:600; }
.rich-toolbar .tb-btn:hover { background:#e2e8f0; }
.rich-toolbar .tb-btn .tb-align { min-width:20px; }
.rich-toolbar .tb-sel { min-height:32px; height:32px; padding:0 4px; border-radius:6px; border:1px solid #e2e8f0; background:#fff; color:#334155; font-size:10px; cursor:pointer; outline:none; }
.rich-toolbar .tb-sel:focus { border-color:#0b63a8; }
.rich-toolbar .tb-sep { display:inline-block; width:1px; height:16px; background:#e2e8f0; margin:0 3px; vertical-align:middle; }
.rich-toolbar .tb-btn.active { background:#bfdbfe !important; border-color:#93c5fd !important; color:#1d4ed8 !important; }
.rich-toolbar .tb-color { display:inline-flex; align-items:center; gap:2px; min-height:32px; height:32px; padding:0 3px 0 5px; border:1px solid transparent; border-radius:6px; cursor:pointer; background:transparent; }
.rich-toolbar .tb-color:hover { background:#e2e8f0; }
.rich-toolbar .tb-color input[type="color"] { width:16px; height:16px; padding:0; border:none; background:none; cursor:pointer; }

/* Rich content rendering (editor + read-only preview) */
.rich-content { font-size:12.5px; color:#334155; line-height:1.5; }
.rich-content p, .rich-content div { margin:0 0 0.4em; }
.rich-content h1 { font-size:1.5em; font-weight:700; margin:0.5em 0 0.35em; color:#0f172a; }
.rich-content h2 { font-size:1.3em; font-weight:700; margin:0.5em 0 0.35em; color:#0f172a; }
.rich-content h3 { font-size:1.15em; font-weight:700; margin:0.45em 0 0.3em; color:#0f172a; }
.rich-content h4 { font-size:1em; font-weight:700; margin:0.4em 0 0.3em; }
.rich-content h5 { font-size:0.9em; font-weight:700; margin:0.4em 0 0.3em; }
.rich-content h6 { font-size:0.8em; font-weight:700; margin:0.4em 0 0.3em; text-transform:uppercase; letter-spacing:.02em; }
.rich-content ul, .rich-content ol { padding-left:1.6em; margin:0.3em 0; }
.rich-content ul { list-style:disc; }
.rich-content ul ul { list-style:circle; }
.rich-content ul ul ul { list-style:square; }
.rich-content ol { list-style:decimal; }
.rich-content ol ol { list-style:lower-alpha; }
.rich-content ol ol ol { list-style:lower-roman; }
.rich-content li { margin:0.15em 0; }
.rich-content blockquote { border-left:3px solid #cbd5e1; margin:0.4em 0; padding:0.1em 0 0.1em 0.9em; color:#475569; font-style:italic; }
.rich-content hr { border:none; border-top:1px solid #cbd5e1; margin:0.7em 0; }
.rich-content a { color:#0b63a8; text-decoration:underline; }
.rich-content img { max-width:100%; height:auto; }
.rich-content [style*="text-align:center"], .rich-content [style*="text-align: center"] { }
[contenteditable="true"].rich-content { min-height:70px; }
[contenteditable="true"].rich-content:focus { outline:none; }
.terms-rich-content { min-width:0; max-width:100%; white-space:pre-wrap; tab-size:4; -moz-tab-size:4; overflow-wrap:anywhere; word-break:break-word; font-family:Arial, sans-serif; font-variant-ligatures:none; font-feature-settings:"liga" 0, "clig" 0, "dlig" 0, "hlig" 0, "calt" 0; }
.terms-editor-scroll { max-height:420px; overflow-y:auto; overflow-x:hidden; scrollbar-gutter:stable; width:100%; max-width:calc(198mm + 24px); }
.terms-indent-ruler { display:flex; align-items:center; gap:8px; min-height:24px; color:#64748b; font-size:11px; }
.terms-indent-ruler span { font-weight:600; }
.terms-indent-ruler b { color:#0b63a8; font-variant-numeric:tabular-nums; }
.terms-indent-ruler[data-terms-indent="0"] b { color:#64748b; }
@media (max-width: 767px) {
	.rich-toolbar { align-items:stretch; }
	.rich-toolbar .tb-sep { display:none; }
	.rich-toolbar .tb-sel { flex:1 1 120px; min-width:110px; }
	.rich-toolbar .tb-btn { flex:0 0 auto; }
}
.terms-rich-content p,
.terms-rich-content div,
.terms-rich-content h1,
.terms-rich-content h2,
.terms-rich-content h3,
.terms-rich-content h4,
.terms-rich-content h5,
.terms-rich-content h6,
.terms-rich-content blockquote { margin-top:0 !important; margin-bottom:.35em !important; }
.terms-rich-content p:empty,
.terms-rich-content div:empty { display:none; }
.terms-rich-content table { display:block; max-width:100%; overflow-x:auto; }
.terms-rich-content pre { max-width:100%; overflow-x:auto; white-space:pre-wrap; overflow-wrap:anywhere; }
.quote-settings-form,
.quote-settings-form input,
.quote-settings-form select,
.quote-settings-form button,
.quote-settings-form textarea { font-family:Calibri, sans-serif; font-size:10px; }

/* ===== Inventrax theme (navy sidebar, light shell, Inter) ===== */
:root { --ix-navy:#1b2a5c; --ix-navy-dark:#13204a; --ix-primary:#1e3a8a; --ix-link:#2563eb; --ix-bg:#f3f5fa; }
body { font-family:'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; background:var(--ix-bg) !important; }
.app-main { background:var(--ix-bg); }
.app-sidebar { background:var(--ix-navy); color:#dbe4ff; border-right:0; }
.app-sidebar-brand { background:var(--ix-navy-dark); border-bottom:1px solid rgba(255,255,255,.08); }
.app-sidebar-brand img { background:#fff; border-radius:8px; padding:4px 8px; }
.app-sidebar-foot { border-top:1px solid rgba(255,255,255,.08); }
.app-sidebar-foot button { color:#93c5fd; }
.nav-section-btn { color:#8fa3d6; }
.nav-section-btn:hover { color:#fff; }
.nav-item { color:#dbe4ff; border-left:3px solid transparent; font-weight:500; transition:background .15s, color .15s; }
.nav-item:hover { background:rgba(255,255,255,.07); color:#fff; }
.nav-item.is-active { background:rgba(96,165,250,.20); color:#fff; border-left-color:#22c55e; font-weight:600; }
.nav-icon { width:1.25rem; text-align:center; }
.app-topbar { background:#fff; border-bottom:1px solid #e4e8f0; }
.app-topbar-btn { color:#334155; background:#fff; border:1px solid #e2e8f0; }
.app-topbar-btn:hover { background:#f1f5f9; }
.app-card { border-color:#e4e8f0; box-shadow:0 1px 3px rgba(15,23,42,.06); }
body a.text-brand-500, body .text-brand-500 { color:var(--ix-link); }
body .bg-brand-500 { background-color:var(--ix-primary); }
body .hover\:bg-brand-600:hover { background-color:#162d6e; }
input:focus, select:focus, textarea:focus { outline:none; border-color:#60a5fa !important; box-shadow:0 0 0 2px rgba(96,165,250,.35); }
.spinner { border-top-color:var(--ix-primary); }

.nav-icon svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; display:block; }
.nav-icon { display:inline-flex; align-items:center; justify-content:center; }
.nav-item { color:#fff; }

/* Visible form controls */
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not(.border-0):not(.border-none),
select:not(.border-0):not(.border-none):not(.hidden),
textarea:not(.border-0):not(.border-none) { border:1px solid #94a3b8; background-color:#fff; color:#0f172a; border-radius:8px; }
input[readonly], textarea[readonly], input:disabled, select:disabled { background-color:#f1f5f9 !important; color:#475569; }
input::placeholder, textarea::placeholder { color:#94a3b8; }
input:not([type=checkbox]):not([type=radio]):hover, select:hover, textarea:hover { border-color:#64748b; }
label > span.text-slate-600, label > span.text-slate-400, form .text-slate-400 { color:#475569; }
.searchable-select-input { border-color:#94a3b8 !important; }
