/* Shared refinements stay scoped to existing components and preserve their behavior. */
:root { --tc-focus-ring: 0 0 0 4px rgba(37, 99, 235, .18); }
:is(a, button, input, select, textarea):focus-visible { outline: 3px solid #60a5fa; outline-offset: 3px; }
.tc-eyebrow { color: var(--tc-primary); font-size: .67rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-bottom: .5rem; }
.admin-body { background: var(--tc-bg); }
.admin-body .admin-sidebar { background: #101e35; border-right: 1px solid rgba(255,255,255,.07); z-index: 1040; }
.admin-body .admin-sidebar-brand { gap: .6rem; padding: 1.2rem 1rem; }
.admin-body .admin-sidebar-brand > span { font-size: .85rem; letter-spacing: -.025em; }
.admin-body .admin-user-info { display: flex; align-items: center; gap: .75rem; margin: .9rem .7rem .4rem; padding: .85rem .65rem; border: 1px solid rgba(255,255,255,.08); border-radius: .8rem; }
.admin-body .admin-user-name { color: #f8fafc; font-size: .82rem; font-weight: 600; overflow-wrap: anywhere; }
.admin-body .admin-nav-section { color: #93a4be; font-size: .61rem; padding-top: 1.15rem; }
.admin-body .admin-nav-link { min-height: 42px; padding: .65rem .8rem; color: #b5c3d8; border: 1px solid transparent; }
.admin-body .admin-nav-link > i { width: 18px; text-align: center; flex-shrink: 0; }
.admin-body .admin-nav-link.active { background: #234c8c; border-color: #3a64a5; color: #fff; box-shadow: inset 3px 0 #8abaff; }
.admin-body .admin-nav-link:hover { background: rgba(148, 180, 230, .12); color: #fff; }
.admin-body .admin-main { min-width: 0; }
.admin-body .admin-topbar { min-height: 72px; background: var(--tc-bg-card); border-bottom: 1px solid var(--tc-border); }
.tc-workspace-label { color: var(--tc-text-muted); font-size: .78rem; font-weight: 600; letter-spacing: .015em; }
.admin-body .dash-card { border: 1px solid var(--tc-border); border-radius: 1rem; box-shadow: 0 3px 12px rgba(16, 30, 53, .035); overflow: hidden; }
.admin-body .dash-card-header { padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--tc-border); gap: .75rem; flex-wrap: wrap; background: var(--tc-bg-card); }
.admin-body .dash-card-body { padding: 1.25rem; }
.admin-body .table { --bs-table-bg: transparent; --bs-table-color: var(--tc-text); --bs-table-border-color: var(--tc-border); --bs-table-hover-bg: var(--tc-primary-l); --bs-table-hover-color: var(--tc-text); }
.admin-body .table thead th { background: var(--tc-bg); color: var(--tc-text-muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .055em; font-weight: 600; white-space: nowrap; padding-top: .9rem; padding-bottom: .9rem; }
.admin-body .table td { padding-top: 1rem; padding-bottom: 1rem; }
.tc-report-header, .tc-table-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.tc-table-footer { padding: 1rem 1.25rem; border-top: 1px solid var(--tc-border); }
.tc-metric-card { position: relative; }
.tc-metric-card::before { content: ''; position: absolute; top: 0; left: 1.25rem; right: 1.25rem; height: 2px; background: linear-gradient(90deg, #2563eb, #62b6b0); opacity: .65; }
.tc-metric-value { font-size: clamp(1.65rem, 3vw, 2.1rem); line-height: 1.1; font-weight: 700; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.tc-count { font-variant-numeric: tabular-nums; }
.tc-chart-frame { position: relative; height: 280px; }
.tc-conversation-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--tc-border); }
.tc-conversation-row:last-child { border-bottom: 0; }
.tc-conversation-row > div { min-width: 0; overflow-wrap: anywhere; }
.tc-conversation-row > .badge { flex-shrink: 0; }
.admin-body .sidebar-overlay { z-index: 1035; }
[data-theme=dark] .admin-body .text-dark { color: var(--tc-text) !important; }
[data-theme=dark] .tc-eyebrow { color: #93c5fd; }
[data-theme=dark] .admin-body .btn-outline-primary { --bs-btn-color: #93c5fd; --bs-btn-border-color: #527cad; }
[data-theme=dark] .admin-body .bg-light { background: var(--tc-bg-2) !important; }
/* More deliberate hierarchy for the public marketplace. */
.landing-page .hero-section h1 { letter-spacing: -.045em; max-width: 760px; }
.landing-page .hero-lede { max-width: 610px; }
.tc-hero-search { display: flex; align-items: center; gap: .75rem; padding: .5rem; padding-left: 1rem; max-width: 640px; background: #fff; border: 1px solid #d7e3f5; border-radius: .9rem; box-shadow: 0 12px 36px rgba(0,0,0,.15); }
.tc-hero-search > i { color: #64748b; }
.tc-hero-search input { flex: 1; width: 0; min-width: 0; border: 0; background: #fff; color: #172033; padding: .65rem 0; font: inherit; font-size: .85rem; }
.tc-hero-search input::placeholder { color: #64748b; opacity: 1; }
.tc-hero-search { transition: border-color .15s ease, box-shadow .15s ease; }
.tc-hero-search:focus-within { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(96,165,250,.28), 0 12px 36px rgba(0,0,0,.15); }
.landing-page .tc-hero-search input[type="search"]:is(:focus, :focus-visible) { outline: none !important; box-shadow: none !important; }
/* This white search surface keeps its own palette in either page theme. */
.landing-page .tc-hero-search input[type="search"] { background-color: transparent !important; color: #172033 !important; caret-color: #172033; color-scheme: light; }
.landing-page .tc-hero-search input[type="search"]::placeholder { color: #596b83 !important; opacity: 1; }
.tc-hero-search .btn { flex-shrink: 0; white-space: nowrap; border-radius: .6rem; font-size: .8rem; min-height: 44px; }
.tc-hero-topics { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; font-size: .75rem; color: #bdcce1; }
.tc-hero-topics a { padding: .25rem .65rem; border: 1px solid rgba(255,255,255,.22); border-radius: 2rem; color: #e7efff; background: rgba(255,255,255,.04); }
.tc-hero-topics a:hover { background: rgba(255,255,255,.14); border-color: #b4c9ea; }
.landing-page .hero-stat-card { background: rgba(255,255,255,.045); border-color: rgba(255,255,255,.14); }
.landing-page .hiw-panel { border: 1px solid var(--tc-border); box-shadow: 0 8px 32px rgba(16,30,53,.04); }
.landing-page :is(.category-card, .requirement-card, .trainer-card) { border: 1px solid var(--tc-border); transition: border-color .2s, box-shadow .2s, transform .2s; }
.landing-page :is(.category-card, .requirement-card, .trainer-card):hover { border-color: #a4bbdf; box-shadow: 0 12px 30px rgba(16,30,53,.08); transform: translateY(-3px); }
@media (max-width: 991.98px) {
    .admin-body .admin-sidebar { position: fixed; top: 0; bottom: 0; height: 100dvh; }
    .admin-body .admin-topbar { padding: .8rem 1rem; }
    .admin-body .container-fluid.px-4 { padding-left: 1rem !important; padding-right: 1rem !important; }
    .tc-workspace-label { display: none; }
}
@media (max-width: 575.98px) {
    .admin-body .dash-card-body { padding: 1rem; }
    .tc-conversation-row { align-items: flex-start; flex-direction: column; gap: .5rem; }
    .tc-report-header > a { width: 100%; }
    .landing-page .hero-section .btn-lg { padding-left: 1.25rem !important; padding-right: 1.25rem !important; }
    .tc-hero-search { flex-wrap: wrap; gap: .25rem .75rem; }
    .tc-hero-search input { flex: 1; }
    .tc-hero-search .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .landing-page :is(.category-card, .requirement-card, .trainer-card) { transition: none; transform: none !important; }
    .tc-hero-search { transition: none; }
}

/* Bootstrap paints a second background through its cell shadow. Clear that
   layer during interaction so every cell uses the same theme-aware surface. */
:root { --tc-row-hover: #f4f7fc; --tc-row-active: #e9f0fc; --tc-row-focus: #edf3fd; }
[data-theme=dark] { --tc-row-hover: #1c2d45; --tc-row-active: #243957; --tc-row-focus: #223550; }
.table {
    --bs-table-hover-bg: var(--tc-row-hover);
    --bs-table-hover-color: var(--tc-text);
    --bs-table-active-bg: var(--tc-row-active);
    --bs-table-active-color: var(--tc-text);
}
.admin-body .table { --bs-table-hover-bg: var(--tc-row-hover); --bs-table-hover-color: var(--tc-text); }
:root[data-theme] :is(.table-hover, .admin-table) > tbody > tr:hover > :is(td, th),
:root[data-theme] .table > tbody > tr:is(.selected, .table-active) > :is(td, th),
:root[data-theme] .table > tbody > tr:has(:focus-visible) > :is(td, th) {
    --bs-table-bg-state: transparent;
    --bs-table-bg-type: transparent;
    --bs-table-accent-bg: transparent;
    --bs-table-color-state: var(--tc-text);
    background: var(--tc-row-hover) !important;
    color: var(--tc-text) !important;
    box-shadow: none !important;
}
:root[data-theme] .table > tbody > tr:is(.selected, .table-active) > :is(td, th) { background: var(--tc-row-active) !important; }
:root[data-theme] .table > tbody > tr:has(:focus-visible) > :is(td, th) { background: var(--tc-row-focus) !important; }
:root[data-theme] .table > tbody > tr:is(.selected, .table-active) > :is(td, th):first-child { box-shadow: inset 2px 0 var(--tc-primary) !important; }
.table .tc-entity-link:focus-visible { outline-width: 2px; outline-offset: 2px; border-radius: .15rem; }
