/*
 * SMRC Extensions Suite - additive styles only.
 * Deliberately reuses SMRC's own classes (.smrc-card, .smrc-table,
 * .smrc-btn, .smrc-pill, .smrc-alert, .smrc-modal...) wherever
 * possible so the new modules look native. Everything below is new
 * class names this plugin owns (`smrc-ext-*`) - nothing here overrides
 * or redefines an existing `.smrc-*` rule.
 */

.smrc-ext-toolbar { display:flex; gap:10px; flex-wrap:wrap; align-items:center; justify-content:space-between; margin-bottom:14px; }
.smrc-ext-toolbar-filters { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.smrc-ext-toolbar-filters select, .smrc-ext-toolbar-filters input { padding:8px 10px; border-radius:8px; border:1px solid rgba(15,23,42,.15); font-size:12.5px; }

.smrc-ext-kpi-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(160px, 1fr)); gap:14px; margin-bottom:18px; }
.smrc-ext-kpi { padding:16px; border-radius:12px; background:rgba(0,161,222,.06); border:1px solid rgba(0,161,222,.15); }
.smrc-ext-kpi .smrc-ext-kpi-label { font-size:11px; text-transform:uppercase; letter-spacing:.04em; font-weight:800; color:#64748b; }
.smrc-ext-kpi .smrc-ext-kpi-value { font-size:26px; font-weight:800; color:#1e293b; margin-top:4px; }
.smrc-ext-kpi .smrc-ext-kpi-sub { font-size:12px; color:#94a3b8; margin-top:2px; }

.smrc-ext-section { margin-bottom:26px; }
.smrc-ext-section-title { font-size:14px; font-weight:800; margin:0 0 10px; color:#334155; }

.smrc-ext-bar-row { display:flex; align-items:center; gap:10px; margin-bottom:8px; font-size:12.5px; }
.smrc-ext-bar-label { width:150px; flex-shrink:0; color:#334155; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.smrc-ext-bar-track { flex:1; height:10px; background:rgba(15,23,42,.06); border-radius:6px; overflow:hidden; }
.smrc-ext-bar-fill { height:100%; background:linear-gradient(135deg, var(--smrc-primary, #00A1DE), var(--smrc-accent, #20603D)); border-radius:6px; }
.smrc-ext-bar-fill.warn { background:linear-gradient(135deg,#f59e0b,#d97706); }
.smrc-ext-bar-fill.danger { background:linear-gradient(135deg,#f87171,#dc2626); }
.smrc-ext-bar-fill.ok { background:linear-gradient(135deg,#34d399,#16a34a); }
.smrc-ext-bar-value { width:44px; text-align:right; flex-shrink:0; font-weight:700; color:#475569; }

.smrc-ext-pill-fees_pending, .smrc-ext-pill-pending { background:var(--smrc-warn-bg,#fff4e0); color:#92400e; }
.smrc-ext-pill-sent { background:var(--smrc-success-bg,#dcfce7); color:#166534; }
.smrc-ext-pill-failed { background:var(--smrc-danger-bg,#fee2e2); color:#991b1b; }
.smrc-ext-pill-retrying { background:rgba(99,102,241,.14); color:#3730a3; }
.smrc-ext-pill-pending_no_parent { background:#f1f5f9; color:#475569; }

.smrc-ext-empty { padding:24px; text-align:center; color:#94a3b8; font-size:13px; }

.smrc-ext-inline-form { display:flex; gap:10px; flex-wrap:wrap; align-items:flex-end; }
.smrc-ext-inline-form .smrc-ext-field { display:flex; flex-direction:column; gap:4px; min-width:150px; }
.smrc-ext-inline-form label { font-size:11px; font-weight:700; color:#64748b; text-transform:uppercase; letter-spacing:.03em; }
.smrc-ext-inline-form input, .smrc-ext-inline-form select, .smrc-ext-inline-form textarea {
	padding:9px 11px; border-radius:8px; border:1px solid rgba(15,23,42,.15); font-size:13px; font-family:inherit;
}

.smrc-ext-muted-note { font-size:12px; color:#94a3b8; margin-top:6px; }

/*
 * Library-only contrast fix (spec item 4): `.smrc-btn-ghost` is designed
 * for use on dark/gradient surfaces (e.g. the topbar) - white text over a
 * faint white overlay. Inside the Library module's plain white table
 * rows (Delete / Mark Returned / Lost / Damaged), that combination is
 * white-on-white and effectively invisible. Scoped strictly to the
 * Library module's own two table bodies by ID, so no other module's
 * `.smrc-btn-ghost` buttons (which sit correctly on dark surfaces) are
 * affected.
 */
#smrc-ext-lib-inv-rows .smrc-btn-ghost:not(.smrc-btn-danger),
#smrc-ext-lib-borrow-rows .smrc-btn-ghost:not(.smrc-btn-danger) {
	background: rgba(15,23,42,.06);
	color: #334155;
	border: 1px solid rgba(15,23,42,.18);
}
#smrc-ext-lib-inv-rows .smrc-btn-ghost:not(.smrc-btn-danger):hover,
#smrc-ext-lib-borrow-rows .smrc-btn-ghost:not(.smrc-btn-danger):hover {
	background: rgba(15,23,42,.12);
}
