/**
 * J.C. Chang & Associates — enterprise portal theme
 * Navy #183f59 · Blue accent #3b82f6 · Background #f8fafc · Inter / Segoe UI
 */

/* Sidebar */
.sidebar-brand { align-items: center; justify-content: center; }
.sidebar-brand-logo { max-width: 160px; width: 100%; height: auto; }
.sidebar-section-label { color: rgba(255, 255, 255, 0.45); }
.sidebar-link:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.sidebar-link.active,
.sidebar-sublink.active {
  color: #93c5fd !important;
  background: var(--sidebar-active-bg) !important;
  font-weight: 700;
}
.sidebar-link.active i,
.sidebar-sublink.active i { color: #93c5fd !important; }
.sidebar-sublink { color: rgba(255, 255, 255, 0.78); }
.sidebar-sublink:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.sidebar-step-badge {
  background: rgba(59, 130, 246, 0.28);
  color: #dbeafe;
}
.sidebar-group-toggle i { color: rgba(255, 255, 255, 0.55); }
.sidebar-group.is-active .sidebar-group-toggle,
.sidebar-group.is-open .sidebar-group-toggle {
  color: #93c5fd;
  background: var(--sidebar-active-bg);
}
.sidebar-group.is-active .sidebar-group-toggle i,
.sidebar-group.is-open .sidebar-group-toggle i { color: #93c5fd; }

/* Bootstrap */
.btn-primary {
  --bs-btn-bg: var(--jcca-accent);
  --bs-btn-border-color: var(--jcca-accent);
  --bs-btn-hover-bg: var(--jcca-accent-hover);
  --bs-btn-hover-border-color: var(--jcca-accent-hover);
  --bs-btn-active-bg: var(--jcca-accent-hover);
  --bs-btn-active-border-color: var(--jcca-accent-hover);
  font-weight: 700;
}
.btn-outline-primary {
  --bs-btn-color: var(--jcca-navy);
  --bs-btn-border-color: #9fb2c7;
  --bs-btn-hover-bg: var(--jcca-navy);
  --bs-btn-hover-border-color: var(--jcca-navy);
  --bs-btn-hover-color: #fff;
}
.btn-outline-secondary {
  --bs-btn-color: var(--jcca-navy);
  --bs-btn-border-color: #9fb2c7;
  --bs-btn-hover-bg: #f8fafc;
  --bs-btn-hover-border-color: #9fb2c7;
  --bs-btn-hover-color: var(--jcca-navy);
  --bs-btn-active-color: var(--jcca-navy);
  --bs-btn-active-bg: #f1f5f9;
  --bs-btn-active-border-color: #9fb2c7;
}
.btn-link { color: #2a5ea2; }
.btn-link:hover { color: var(--jcca-accent); }
a { color: #2a5ea2; }
a:hover { color: var(--jcca-accent); }
.text-primary { color: var(--jcca-accent) !important; }
.bg-primary { background-color: var(--jcca-accent) !important; }
.border-primary { border-color: var(--jcca-accent) !important; }
.form-check-input:checked {
  background-color: var(--jcca-accent);
  border-color: var(--jcca-accent);
}
.pagination .page-link { color: var(--jcca-navy); }
.pagination .page-item.active .page-link {
  background-color: var(--jcca-accent);
  border-color: var(--jcca-accent);
}
.nav-pills .nav-link.active { background-color: var(--jcca-accent); }

/* Layout */
.content-wrap { background: var(--app-bg); }
.app-topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.topbar-title { color: var(--jcca-heading); font-weight: 700; }
.breadcrumb { font-size: 12px; color: var(--jcca-text-muted); }
.breadcrumb a { color: var(--jcca-navy); text-decoration: underline; }
.breadcrumb .breadcrumb-item.active { color: #2a5ea2; font-weight: 700; }
.page-title { color: var(--jcca-heading); font-size: 1.5rem; letter-spacing: -0.02em; }
.page-subtitle { color: var(--jcca-text-muted); }

/* Section themes */
.app-section,
.app-section--overview,
.app-section--proposal_phase,
.app-section--production_phase,
.app-section--support,
.app-section--closeout,
.app-section--admin {
  --section-color: var(--jcca-accent);
  --section-bg: var(--app-bg);
  --section-border: var(--border);
  --section-sidebar: rgba(59, 130, 246, 0.45);
}
.app-section .card > .card-header:not(.nav-tabs) {
  background: var(--jcca-navy);
  color: #fff;
  border-bottom: 0;
}

/* Outline buttons on navy headers & bands — navy label text was invisible on navy background */
:is(
  .app-section .card > .card-header:not(.nav-tabs),
  .jcca-doc-ui .card:not(.metric-card):not(.notes-thread-card) > .card-header:not(.nav-tabs),
  .jcca-doc-ui .card:not(.metric-card):has(.table) > .card-header,
  .jcca-doc-ui .card:not(.metric-card):has(.table-responsive) > .card-header,
  .jcca-doc-ui .card.mb-4:not(.metric-card):not(.notes-thread-card) > .card-header:not(.nav-tabs),
  .jcca-doc-ui .card:has(> .card-body > form[method="GET"]) > .card-header,
  .rfq-list-card > .card-header,
  .rfq-filters-card > .card-header,
  .dir-shell .card-band,
  .subdir .card-band,
  .client-shell .card-band,
  .subprof .card-band,
  .ep-band,
  .phase-list-page .phase-panel-header,
  .hub-billing .card-band,
  .hub-checklists .card-band,
  .ts-page .card-band,
  .ec-form-page .card-band:not(.gray)
) :is(
  .btn-outline-primary,
  .btn-outline-secondary,
  .btn-outline-light,
  .btn-outline-dark,
  .btn-link
) {
  --bs-btn-color: #fff;
  --bs-btn-border-color: rgba(255, 255, 255, 0.72);
  --bs-btn-hover-bg: rgba(255, 255, 255, 0.14);
  --bs-btn-hover-border-color: #fff;
  --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: rgba(255, 255, 255, 0.22);
  --bs-btn-active-border-color: #fff;
  --bs-btn-active-color: #fff;
  --bs-btn-focus-shadow-rgb: 255, 255, 255;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.72);
}

.ep-band .btn-link,
.ep-band .band-edit {
  color: #fff !important;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
}
.ep-band .btn-link:hover,
.ep-band .band-edit:hover {
  color: #fff !important;
  text-decoration: underline;
  opacity: 0.9;
}

:is(
  .app-section .card > .card-header:not(.nav-tabs),
  .jcca-doc-ui .card:not(.metric-card):not(.notes-thread-card) > .card-header:not(.nav-tabs),
  .jcca-doc-ui .card:not(.metric-card):has(.table) > .card-header,
  .jcca-doc-ui .card:not(.metric-card):has(.table-responsive) > .card-header,
  .jcca-doc-ui .card.mb-4:not(.metric-card):not(.notes-thread-card) > .card-header:not(.nav-tabs),
  .jcca-doc-ui .card:has(> .card-body > form[method="GET"]) > .card-header,
  .rfq-list-card > .card-header,
  .rfq-filters-card > .card-header,
  .dir-shell .card-band,
  .subdir .card-band,
  .client-shell .card-band,
  .subprof .card-band,
  .ep-band,
  .phase-list-page .phase-panel-header,
  .hub-billing .card-band,
  .hub-checklists .card-band,
  .ts-page .card-band,
  .ec-form-page .card-band:not(.gray)
) :is(
  .btn-outline-primary,
  .btn-outline-secondary,
  .btn-outline-light,
  .btn-outline-dark
):hover,
:is(
  .app-section .card > .card-header:not(.nav-tabs),
  .jcca-doc-ui .card:not(.metric-card):not(.notes-thread-card) > .card-header:not(.nav-tabs),
  .jcca-doc-ui .card:not(.metric-card):has(.table) > .card-header,
  .jcca-doc-ui .card:not(.metric-card):has(.table-responsive) > .card-header,
  .jcca-doc-ui .card.mb-4:not(.metric-card):not(.notes-thread-card) > .card-header:not(.nav-tabs),
  .jcca-doc-ui .card:has(> .card-body > form[method="GET"]) > .card-header,
  .rfq-list-card > .card-header,
  .rfq-filters-card > .card-header,
  .dir-shell .card-band,
  .subdir .card-band,
  .client-shell .card-band,
  .subprof .card-band,
  .ep-band,
  .phase-list-page .phase-panel-header,
  .hub-billing .card-band,
  .hub-checklists .card-band,
  .ts-page .card-band,
  .ec-form-page .card-band:not(.gray)
) :is(
  .btn-outline-primary,
  .btn-outline-secondary,
  .btn-outline-light,
  .btn-outline-dark
):focus-visible {
  color: #fff;
  border-color: #fff;
  box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.28);
}

:is(.hub-billing .card-band, .hub-billing .modal-head) .btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}

:is(.hub-billing .card-band, .hub-billing .modal-head) .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
  color: #fff;
}

.app-section .metric-icon {
  background: var(--jcca-accent-soft);
  color: var(--jcca-accent);
  border: 1px solid #b8d0ff;
}
.app-section .btn-primary {
  --bs-btn-bg: var(--jcca-accent);
  --bs-btn-border-color: var(--jcca-accent);
  --bs-btn-hover-bg: var(--jcca-accent-hover);
  --bs-btn-hover-border-color: var(--jcca-accent-hover);
}

/* Metrics & cards */
.metric-card-link:hover .metric-card {
  box-shadow: 0 14px 36px rgba(24, 63, 89, 0.12);
  border-color: #bad7f9;
}
.metric-icon { background: var(--jcca-accent-soft); color: var(--jcca-accent); }
.badge-soft-primary { background: #eaf1ff; color: #1f5bf4; border: 1px solid #b8d0ff; }
.timeline-item { border-left-color: var(--jcca-accent); }

/* Job flow */
.job-flow-strip { border-color: var(--jcca-panel-border); background: #fff; }
.job-flow-step--current,
.job-flow-step--phase-proposal.job-flow-step--current,
.job-flow-step--phase-production.job-flow-step--current {
  background: var(--jcca-accent-soft);
  color: var(--jcca-accent-hover);
}
.job-flow-step--current .job-flow-step-num,
.job-flow-step--phase-proposal.job-flow-step--current .job-flow-step-num,
.job-flow-step--phase-production.job-flow-step--current .job-flow-step-num {
  background: var(--jcca-accent);
  color: #fff;
}

/* Auth */
.auth-brand::before {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.22), rgba(24, 63, 89, 0.35));
}
.auth-features i { color: var(--jcca-accent); }
.auth-demo { background: var(--jcca-accent-soft); border-color: #b8d0ff; }

/* Document UI */
.jcca-doc-ui {
  --doc-navy: var(--jcca-navy);
  --doc-navy-dark: var(--jcca-navy-dark);
}
.jcca-doc-ui .page-title { color: var(--jcca-heading); }

/* Directory shells */
.dir-shell .card-band,
.subdir .card-band,
.client-shell .card-band {
  background: var(--jcca-navy) !important;
  color: #fff;
}
.dir-shell .p-name,
.subdir .firm b,
.client-shell .client-name { color: #06243b !important; font-weight: 800; text-decoration: underline; text-underline-offset: 2px; }

/* SweetAlert */
.swal2-styled.swal2-confirm { background-color: var(--jcca-accent) !important; }

/* Proposal hub */
.proposal-hub-shell {
  --ink: var(--jcca-heading);
  --blue: var(--jcca-accent);
  --blue-600: var(--jcca-accent-hover);
  --blue-50: var(--jcca-accent-soft);
  --blue-100: var(--jcca-accent-light);
  --grad-a: var(--jcca-accent);
  --grad-b: var(--jcca-navy-mid);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

/* ── Directory & profile modules (override page-local styles) ── */
.dir-shell .card-band h2,
.subdir .card-band h2,
.client-shell .card-band h2 { color: #fff !important; }

.dir-shell .filters select,
.dir-shell .filters input,
.client-shell .filters select,
.client-shell .filters input,
.subdir .filters select,
.subdir .filters input { border-color: #9fb2c7 !important; }

.dir-shell .p-avatar,
.subdir .firm-mark,
.subprof .firm-avatar,
.ep-avatar {
  background: var(--jcca-accent-soft) !important;
  color: var(--jcca-navy) !important;
}

.subdir .fchip.on,
.subdir .pager button.on {
  background: var(--jcca-accent) !important;
  border-color: var(--jcca-accent) !important;
  color: #fff !important;
}

.subprof .card-band,
.ep-band {
  background: var(--jcca-navy) !important;
  border-bottom-color: var(--jcca-navy-dark) !important;
  color: #fff;
}

.subprof .card-band h2,
.subprof .card-band small,
.subprof .band-edit,
.ep-band b { color: #fff !important; }

.subprof .crumbs a,
.subprof .dl-grid .f div a,
.subprof .file-link,
.subprof .soq-num,
.subprof .quick a { color: var(--jcca-accent) !important; }

.subprof .p-info,
.subprof .tl-dot,
.subdir .cert {
  background: var(--jcca-accent-soft) !important;
  color: var(--jcca-navy) !important;
}

.ep-mini-btn:hover {
  border-color: var(--jcca-accent) !important;
  color: var(--jcca-accent) !important;
}

.ep-modal .modal-header {
  background: var(--jcca-navy) !important;
  border-bottom-color: var(--jcca-navy-dark) !important;
}

.ep-modal .modal-title { color: #fff !important; }
.ep-modal .btn-close { filter: invert(1); }

/* Job hub modules */
.hub-checklists .card-band {
  background: var(--jcca-navy) !important;
  border-bottom-color: var(--jcca-navy-dark) !important;
  color: #fff !important;
}

.hub-checklists .added-head {
  background: var(--jcca-accent-soft) !important;
  border-bottom-color: #b8d0ff !important;
  color: var(--jcca-heading) !important;
}

.hub-checklists .step-num,
.hub-checklists .added-badge,
.hub-checklists .added-prog .done { color: var(--jcca-accent) !important; }

.hub-checklists .step-num { background: var(--jcca-accent) !important; color: #fff !important; }
.hub-checklists .added-badge { background: var(--jcca-accent-soft) !important; color: var(--jcca-navy) !important; }
.hub-checklists .cl-ic { background: var(--jcca-accent-soft) !important; color: var(--jcca-accent) !important; }
.hub-checklists .ck-save,
.hub-checklists .add-item-btn {
  border-color: var(--jcca-accent) !important;
  color: var(--jcca-accent) !important;
}

.hub-checklists .pm-verify input { accent-color: var(--jcca-accent) !important; }

.hub-billing .modal-head h3 { color: #fff !important; }
.hub-billing .modal-close { color: rgba(255, 255, 255, 0.75) !important; }

.hub-decisions {
  --dec-blue: var(--jcca-accent);
  --dec-blue-50: var(--jcca-accent-soft);
  --dec-blue-100: var(--jcca-accent-light);
}

.jhr-kan-fallback.jhr-kanban-card .jhr-m-badge {
  background: var(--jcca-accent-soft) !important;
  color: var(--jcca-accent) !important;
}

/* Weekly report & timesheet */
.weekly-report-page {
  --wr-blue: var(--jcca-accent);
  --wr-blue-soft: var(--jcca-accent-soft);
}

/* Admin */
.permission-pages .form-check-input:checked {
  background-color: var(--jcca-accent) !important;
  border-color: var(--jcca-accent) !important;
}

.permission-pages .form-check-input:focus {
  border-color: var(--jcca-accent) !important;
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25) !important;
}

.backlog-tag {
  background: var(--jcca-accent-soft) !important;
  color: var(--jcca-navy) !important;
  border-color: #b8d0ff !important;
}

/* Sign-out board accent swatches */
.so-swatch[style*="#2563eb"] { background: var(--jcca-accent) !important; }

/* Site-wide table row hover — every <table> on the site */
table tbody tr:not(.ca-register__empty):not(.no-table-hover):hover > td,
table tbody tr:not(.ca-register__empty):not(.no-table-hover):hover > th {
  background-color: var(--jcca-table-hover-bg, #dbeafe) !important;
}

tr[data-row-href]:hover > td,
tr[data-row-href]:hover > th,
tr[data-row-click]:hover > td,
tr[data-row-click]:hover > th,
tr[data-row-edit]:hover > td,
tr[data-row-edit]:hover > th,
.js-search-target[data-row-href]:hover > td,
.js-search-target[data-row-href]:hover > th {
  background-color: var(--jcca-table-hover-bg, #dbeafe) !important;
  cursor: pointer;
}

.so-page table tbody tr:hover > td,
.so-page table tbody tr:hover > th {
  background-color: var(--jcca-table-hover-bg, #dbeafe) !important;
}
