/* ==========================================================================
   Dashboard Client CSS — based on Pikseo reference design
   Bootstrap 5 companion stylesheet
   ========================================================================== */

:root {
  --primary-color: #632483;
  --secondary-color: #470a69;
  --text-color: #66616c;
  --success: #479d74;
  --danger: #e40000;
  --lightpink: #ecddec;
  --violet: #855e9b;
}

:focus {
  box-shadow: unset !important;
}

[id] {
  scroll-margin-top: 100px;
}

* {
  font-family: "Inter", sans-serif;
}

/* ========== Brand colors ========== */
.color-primary {
  color: var(--primary-color);
}
.bg-violet {
  background-color: var(--violet);
}
.bg-violet-subtle {
  background-color: #f0e6f8;
}
.border-violet {
  border-color: #855e9b !important;
}
.text-violet-emphasis {
  color: #4a1472;
}
.hr-violet {
  border-color: #855e9b !important;
  opacity: 1;
}

/* ========== Navbar ========== */
.navbar-brand img {
  width: 172px;
  max-width: 172px;
}

/* strzałka dropdown widoczna domyślnie */

.container {
  padding: 0 !important;
}

.sticky-top:has(nav) {
  background-color: white;
  z-index: 9999;
}

/* ========== Buttons ========== */
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--secondary-color) !important;
  border-color: var(--secondary-color) !important;
  color: white;
}

.btn-outline-primary {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:focus-visible {
  border: 2px solid var(--primary-color) !important;
  color: white;
  background-color: var(--primary-color) !important;
}

.btn {
  padding: 12px;
}

/* ========== Sidebar ========== */
.p-aside {
  max-width: 200px;
  width: 100%;
  transition: width 0.3s ease;
  overflow: clip;
}

.p-aside.sticky-top {
  top: 105px !important;
  z-index: 1000;
  height: calc(100vh - 105px);
  overflow-y: auto;
}

.p-aside.sticky-top::-webkit-scrollbar {
  width: 0;
}

.sidebar .accordion-button,
.sidebar .btn,
.sidebar .nav-link {
  padding: 8px 12px !important;
}

.sidebar a,
.sidebar .accordion-button {
  font-size: 14px;
}

.sidebar .nav-link {
  color: var(--text-color);
  font-weight: 600;
  border-radius: 0.375rem;
}

.sidebar .btn-active,
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
  background-color: var(--primary-color);
  color: white !important;
}

.sidebar .btn-active.nav-link i {
  color: white !important;
}

.sidebar .btn-active:hover {
  background-color: var(--secondary-color) !important;
  color: white;
}

.sidebar .nav-link:hover {
  color: var(--primary-color);
}

.sidebar .accordion i,
.sidebar .nav-link i {
  color: var(--primary-color);
  transition: 0.15s;
}

.nav-link,
.p-aside {
  transition: 0.6s;
}

/* ========== Jumbotron ========== */
.p-jumbotron {
  min-height: 400px;
  border-radius: 0.375rem;
  background-image: url("/static/img/hero-bg.webp");
  background-size: cover;
  background-position: center;
  color: white;
  position: relative;
  overflow: clip;
}

.p-jumbotron:after {
  content: "";
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  position: absolute;
  background: linear-gradient(135deg, #632483, #111139);
  opacity: 0.9;
  z-index: 1;
}

.p-jumbotron h1 {
  font-weight: 600;
  font-size: 54px;
  position: relative;
  z-index: 2;
}

.p-jumbotron .lead,
.p-jumbotron span {
  position: relative;
  z-index: 2;
}

.p-jumbotron .lead {
  font-size: 28px;
}

/* ========== Headings ========== */
h2 {
  color: var(--text-color);
  font-size: 30px;
  font-weight: 400;
}

/* ========== Sections (report cards) ========== */
.p-main section {
  border: 1px solid #e4d8f0;
  border-radius: 0.75rem;
  padding: 1.75rem;
  background: #faf8fc;
}

section > :last-child {
  margin-bottom: 0 !important;
}

/* ========== Tables ========== */
.table thead th {
  background-color: #f1f1f1;
  padding: 10px 12px;
  color: var(--text-color);
  font-weight: 500;
  text-align: center;
  white-space: normal;
  min-width: 60px;
}

.table thead th:first-child {
  text-align: left;
}

.table tbody td {
  background-color: #ffffff;
  color: var(--text-color);
  padding: 10px 12px;
  text-align: center;
  white-space: nowrap;
}

.table tbody td:first-child {
  text-align: left;
  white-space: nowrap;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}

table {
  border-radius: 10px;
  overflow: clip;
  width: 100%;
}

.table-sortable thead th {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  position: relative;
  padding-right: 28px !important;
}

.table-sortable thead th::after {
  content: '\2195';
  position: absolute;
  right: 8px;
  opacity: 0.4;
  font-size: 12px;
}

.table-sortable thead th.sort-asc::after {
  content: '\2191';
  opacity: 1;
  color: var(--primary-color);
}

.table-sortable thead th.sort-desc::after {
  content: '\2193';
  opacity: 1;
  color: var(--primary-color);
}

.table-sortable thead th:hover::after {
  opacity: 0.7;
}

/* ========== Stats grid (KPI tiles) ========== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 0;
}

.stats-grid > div {
  padding: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  flex: none !important;
}

.stats-grid .flex-fill {
  width: 100%;
}

@media (min-width: 480px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* ========== Pagination ========== */
.pagination .page-item .page-link {
  border: unset;
  color: black;
  border-radius: 0.375rem;
  margin: 0 2px;
}

.pagination .page-item.active .page-link {
  background-color: var(--primary-color);
  color: white;
}

.page-link:hover {
  background-color: var(--lightpink);
}

/* ========== Comment content (from Quill editor) ========== */
.seo-comment-content p { margin-bottom: 0.5em; }
.seo-comment-content ul, .seo-comment-content ol { margin: 0.5em 0; padding-left: 1.5em; }
.seo-comment-content ul { list-style-type: disc; }
.seo-comment-content ol { list-style-type: decimal; }
.seo-comment-content li { margin-bottom: 0.25em; }
.seo-comment-content strong { font-weight: 700; }
.seo-comment-content em { font-style: italic; }
.seo-comment-content u { text-decoration: underline; }
.seo-comment-content a { color: #2563eb; text-decoration: underline; }
.seo-comment-content h3 { font-size: 1.1em; font-weight: 600; margin: 0.75em 0 0.25em; }

/* ========== Offcanvas (mobile sidebar) ========== */
.offcanvas .sidebar {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
}

.offcanvas .sidebar .accordion-button,
.offcanvas .sidebar .btn,
.offcanvas .sidebar .nav-link {
  padding: 12px !important;
  font-size: 16px;
}

.offcanvas .sidebar .nav-link {
  color: var(--text-color);
  font-weight: 600;
  border-radius: 0.375rem;
}

.offcanvas .sidebar .btn-active,
.offcanvas .sidebar .btn-active.nav-link i {
  background-color: var(--primary-color) !important;
  color: white !important;
}

.offcanvas .sidebar .accordion i,
.offcanvas .sidebar .nav-link i {
  color: var(--primary-color);
}

/* ========== Responsive ========== */
@media (max-width: 767px) {
  .navbar-brand img {
    width: 110px;
    max-width: 110px;
  }

  .p-jumbotron h1 {
    font-size: 40px;
  }

  .p-jumbotron .lead {
    font-size: 22px;
  }

  .p-aside {
    max-width: 100%;
  }
}

@media (min-width: 768px) {
  .p-aside {
    width: 100%;
    max-width: 200px;
  }

  .container,
  .container-md,
  .container-sm {
    max-width: 100%;
  }
}

@media (min-width: 576px) {
  .container,
  .container-sm {
    max-width: 100%;
  }
}

@media (min-width: 1600px) {
  .container,
  .container-lg,
  .container-md,
  .container-sm,
  .container-xl,
  .container-xxl {
    max-width: 1600px;
  }
}

/* ========== Custom Bootstrap color extensions ========== */
.bg-purple-subtle {
  background-color: #f0e6f8 !important;
}
.text-purple {
  color: #632483 !important;
}

/* ========== Print ========== */
@media print {
  .no-print { display: none !important; }
  .p-aside { display: none !important; }
  .p-jumbotron { min-height: 200px; }
}
