

/* Dashboard Square Button */
.square-btn {
    height: 180px;       /* fixed height */
    width: 180px;        /* fixed width to make it square */
    margin: auto;
    transition: all 0.2s ease-in-out;
}

.square-btn:hover {
    background-color: #f8f9fa;
    transform: translateY(-5px);
}

/* ===== From: templates/dashboard.html ===== */

/* Layout */
.dash-header { display:flex; align-items:center; justify-content:space-between; gap:1rem; flex-wrap:wrap; }
.dash-subtle { color: var(--bs-secondary-color); }

/* KPI cards */
.kpi-card { border-radius: .75rem; border: 1px solid #eef0f3; }
.kpi-title { font-size: .85rem; color: var(--bs-secondary-color); }
.kpi-value { font-size: 1.6rem; font-weight: 700; line-height: 1; }

/* Card buttons */
.square-btn { min-height: 140px; border-radius: .75rem; transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
.square-btn .bi { font-size: 2.25rem; }
.square-btn:hover { transform: translateY(-2px); box-shadow: 0 .5rem 1rem rgba(0,0,0,.08); border-color: rgba(13,110,253,.35); }
.square-btn:active { transform: translateY(0); }

/* Sections */
.section-card { border-radius: .75rem; }
.section-card .card-header { background: #f8f9fa; border-bottom: 1px solid #edf0f3; font-weight: 600; }

/* Links */
.stretched-link::after { position: static; } /* fix inside flex */

/* Form validation highlight */
.was-validated .form-control:invalid {
  border-color: #dc3545; /* Bootstrap danger red */
}
.was-validated .form-control:valid {
  border-color: #198754; /* Bootstrap success green */
}


/* ===== From: templates/account/org_chart.html ===== */

/* Container */
.org-wrap {
  overflow: auto;
  padding: 1rem;
}

/* Root UL for tree */
.org-tree,
.org-tree ul {
  padding-left: 0;
  position: relative;
}
.org-tree ul {
  margin-left: 2rem; /* spacing for children */
}
.org-tree li {
  list-style: none;
  margin: 0 0 1rem 0;
  padding: 0 0 0 1rem;
  position: relative;
}

/* Connector line to parent */
.org-tree li::before {
  content: "";
  position: absolute;
  top: 1.25rem; /* aligns with card vertical center-ish */
  left: 0;
  width: 1rem;
  border-top: 1px solid #ced4da;
}

/* Card */
.oc-card {
  display: inline-block;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: .5rem;
  padding: .5rem .75rem;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
  min-width: 220px;
}
.oc-name {
  font-weight: 600;
  line-height: 1.2;
}
.oc-meta {
  font-size: .85rem;
  color: #6c757d;
  line-height: 1.2;
}

/* Root items have no left connector */
.org-tree > li::before {
  display: none;
}

/* Collapsible behavior */
.oc-toggle {
  cursor: pointer;
  user-select: none;
  margin-right: .5rem;
  font-weight: 600;
  color: #0d6efd; /* Bootstrap primary */
}
.oc-children-collapsed > ul {
  display: none;
}

/* Toolbar */
.org-toolbar {
  display: flex;
  gap: .5rem;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

/* ===== From: templates/reporting_pub/report_detail.html ===== */

/* Sticky table headers */
.table-sticky thead th {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}

/* Secondary header row (filters) */
.table-sticky thead tr:nth-child(2) th {
  top: 38px; /* height of first header row */
  background: #f8f9fa;
  z-index: 1;
}

/* Toolbar spacing */
.toolbar .btn + .btn,
.toolbar form + .btn {
  margin-left: .5rem;
}
.toolbar .btn-group .btn {
  margin-left: 0 !important;
}

/* Small muted text (safe Bootstrap override) */
.small-muted {
  font-size: .875rem;
  color: var(--bs-secondary-color, #6c757d);
}

.report-card .card-title {
  font-size: 1.05rem;
  margin-bottom: .25rem;
}
.report-card .card-text {
  color: var(--bs-secondary-color, #6c757d);
}
.badge-chip {
  font-weight: 500;
}

.nav-tabs .nav-link {
  border: 0;
  border-bottom: 2px solid transparent;
}
.nav-tabs .nav-link.active {
  border-color: var(--bs-primary);
  font-weight: 600;
}

/* Required field marker */
.form-required::after {
  content: " *";
  color: var(--bs-danger);
}

.kv { display: flex; gap: .5rem; align-items: baseline; }
.kv .k { width: 180px; color: var(--bs-secondary-color); }
.kv .v { flex: 1; }

/* Light formatting for TinyMCE-rendered HTML */
.tiny-output :where(p, ul, ol) { margin-bottom: .5rem; }
.tiny-output table { width: 100%; border-collapse: collapse; }
.tiny-output table, .tiny-output th, .tiny-output td { border: 1px solid #dee2e6; }
.tiny-output th, .tiny-output td { padding: .5rem; }

/* ===== From: templates/requestonboarding/sales_dashboard.html ===== */

/* Rendering quality (scoped) */
.salesdash html,
.salesdash body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Page layout & tone */
.salesdash .page-wrap { padding: 1rem; background: #f7f9fc; }
.salesdash .dash-header {
  background: #fff;
  border: 1px solid #e8edf4;
  border-radius: .5rem;
  padding: .75rem .9rem;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.salesdash .dash-title { font-weight: 600; letter-spacing: 0; font-size: 1.25rem; margin: 0; }
.salesdash .dash-subtle { color: #6b7280; font-size: .95rem; }

.salesdash .card {
  border: 1px solid #e8edf4;
  border-radius: .5rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.salesdash .card + .card { margin-top: 1rem; }
.salesdash .card-header {
  background: #fbfcff;
  border-bottom: 1px solid #e8edf4;
  padding: .7rem .9rem;
  font-weight: 600;
  font-size: 1rem;
}
.salesdash .card-body { padding: .9rem; }

/* Filter bar */
.salesdash .filter-form .form-select { min-width: 140px; }
.salesdash .filter-form .btn { white-space: nowrap; }

/* Org tree (dashboard variant) */
.salesdash .org-wrap {
  overflow: auto; padding: .6rem; background: #fff;
  border: 1px solid #e8edf4; border-radius: .4rem;
  max-height: 420px; position: relative;
}
.salesdash .org-wrap::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, #fff 85%);
  pointer-events: none;
}
.salesdash .org-tree, .salesdash .org-tree ul { padding-left: 0; position: relative; }
.salesdash .org-tree ul { margin-left: 1.5rem; }
.salesdash .org-tree li { list-style: none; margin: 0 0 .75rem 0; padding: 0 0 0 .8rem; position: relative; }
.salesdash .org-tree li::before {
  content: ""; position: absolute; top: 1.05rem; left: 0; width: .8rem; border-top: 1px solid #e3e7ee;
}
.salesdash .org-tree > li::before { display: none; }

.salesdash .oc-card {
  display: inline-block; background: #ffffff; border: 1px solid #e8edf4; border-radius: .45rem;
  padding: .45rem .6rem; box-shadow: 0 1px 1px rgba(16,24,40,.03); min-width: 220px;
  transition: box-shadow .12s ease;
}
.salesdash .oc-card:hover { box-shadow: 0 3px 8px rgba(16,24,40,.06); }
.salesdash .oc-name { font-weight: 600; line-height: 1.25; font-size: .98rem; }
.salesdash .oc-meta { font-size: .85rem; color: #6b7280; line-height: 1.2; margin-top: .15rem; }

/* DM tabs (pills) */
.salesdash .nav-pills { gap: .4rem; overflow-x: auto; padding-bottom: .2rem; }
.salesdash .nav-pills .nav-link {
  border: 1px solid #e8edf4; color: #374151; background: #fff;
  border-radius: 999px; padding: .3rem .75rem; font-weight: 500; font-size: .95rem;
}
.salesdash .nav-pills .nav-link.active {
  border-color: #dbeafe; background: #eef6ff; color: #1d4ed8; font-weight: 600;
}

/* Charts */
.salesdash .chart-box { position: relative; height: 340px; }
@media (max-width: 992px) { .salesdash .chart-box { height: 300px; } }
@media (max-width: 576px) { .salesdash .chart-box { height: 260px; } }
.salesdash .chart-box canvas { display: block; width: 100%; height: 100%; }

/* Utilities */
.salesdash .muted-note { color: #6b7280; font-size: .92rem; }

/* ===== From: templates/requestonboarding/onboarding_select_type.html ===== */
.type-select .pg-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.type-select .subtle { color: var(--bs-secondary-color); }

/* Search */
.type-select .type-search { max-width: 420px; }

/* Cards */
.type-select .type-card {
  display: block; text-decoration: none; color: inherit;
  border-radius: .85rem; border: 1px solid #edf0f3;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, background .12s ease;
  background: #fff;
}
.type-select .type-card:hover,
.type-select .type-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 .75rem 1.5rem rgba(0,0,0,.06);
  border-color: rgba(13,110,253,.35);
  outline: 0;
}
.type-select .type-card.disabled,
.type-select .type-card.disabled:hover,
.type-select .type-card.disabled:focus-visible {
  transform: none; cursor: not-allowed;
  opacity: .65; box-shadow: none; border-color: #eef0f3;
}
.type-select .type-card .hd {
  display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; margin-bottom: .25rem;
}
.type-select .type-card .title { font-weight: 600; margin: 0; }
.type-select .type-card .meta { font-size: .85rem; color: var(--bs-secondary-color); }
.type-select .type-card .cta { font-weight: 600; color: #0d6efd; }
.type-select .pill {
  display: inline-block; padding: 2px 8px; border-radius: 999px; background: #f3f4f6; font-size: .75rem; margin-left: .5rem;
}
.type-select .ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 8px; background: #f1f5ff; color: #0d6efd;
}

/* Grid spacing */
.type-select .type-grid .col { display: flex; }
