/* =========================================================
   PetitBoulot — Design System (Bootstrap 5 + Custom Tokens)
   ========================================================= */

/* --------------------------------------------------------
   1. DESIGN TOKENS
   -------------------------------------------------------- */
:root {
  /* Brand colours — PetitBoulot (#2596be + #F3971A) */
  --pb-primary:        #2596be;
  --pb-primary-dark:   #1A7A9E;
  --pb-primary-light:  #DCEEF7;
  --pb-accent:         #F3971A;
  --pb-accent-dark:    #D97D08;
  --pb-accent-light:   #FEF0D9;

  /* Surfaces & backgrounds */
  --pb-surface:        #FFFFFF;
  --pb-bg:             #F0F8FC;
  --pb-bg-dark:        #091E2A;

  /* Borders */
  --pb-border:         #D9ECF4;
  --pb-border-focus:   #2596be;

  /* Text — high contrast */
  --pb-text:           #040D12;  /* near-black with blue undertone */
  --pb-text-secondary: #152232;  /* dark blue-gray */
  --pb-muted:          #3D5468;  /* darker muted, passes WCAG AA */

  /* Radius */
  --pb-radius-xs:  4px;
  --pb-radius-sm:  8px;
  --pb-radius-md:  12px;
  --pb-radius-lg:  20px;
  --pb-radius-xl:  32px;
  --pb-radius-full: 9999px;

  /* Shadows */
  --pb-shadow-xs: 0 1px 2px rgba(0,0,0,.06);
  --pb-shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --pb-shadow-md: 0 4px 16px rgba(0,0,0,.10), 0 2px 4px rgba(0,0,0,.06);
  --pb-shadow-lg: 0 16px 48px rgba(0,0,0,.14), 0 4px 12px rgba(0,0,0,.08);

  /* Transition */
  --pb-transition: all .2s cubic-bezier(.4,0,.2,1);

  /* Navbar height (for sticky offset) */
  --navbar-h: 68px;
}

/* --------------------------------------------------------
   2. BASE / TYPOGRAPHY
   -------------------------------------------------------- */
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--pb-bg);
  color: var(--pb-text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Oswald', sans-serif;
  color: var(--pb-text);
  letter-spacing: .3px;
}

a {
  color: var(--pb-primary);
  text-decoration: none;
  transition: color .15s;
}

a:hover {
  color: var(--pb-primary-dark);
}

/* --------------------------------------------------------
   3. BOOTSTRAP OVERRIDES
   -------------------------------------------------------- */
.btn-primary {
  background: var(--pb-primary);
  border-color: var(--pb-primary);
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--pb-primary-dark);
  border-color: var(--pb-primary-dark);
}

.btn-accent {
  background: var(--pb-accent);
  border-color: var(--pb-accent);
  color: #fff;
  font-weight: 600;
}
.btn-accent:hover, .btn-accent:focus {
  background: var(--pb-accent-dark);
  border-color: var(--pb-accent-dark);
  color: #fff;
}

.btn {
  border-radius: var(--pb-radius-sm);
  font-weight: 500;
}

.form-control, .form-select {
  border-radius: var(--pb-radius-sm);
  border-color: #A8CCDE;
  font-family: 'Inter', sans-serif;
  transition: var(--pb-transition);
}
.form-control:focus, .form-select:focus {
  border-color: var(--pb-border-focus);
  box-shadow: 0 0 0 3px rgba(37,150,190,.18);
}

.badge {
  border-radius: var(--pb-radius-full);
  font-weight: 600;
  font-size: .72rem;
  letter-spacing: .3px;
}

.pagination .page-item.active .page-link {
  background: var(--pb-primary);
  border-color: var(--pb-primary);
}
.pagination .page-link {
  color: var(--pb-primary);
  border-radius: var(--pb-radius-xs);
}
.pagination .page-link:hover {
  color: var(--pb-primary-dark);
  background: var(--pb-primary-light);
  border-color: var(--pb-border);
}

/* Nav pills — brand colours */
.nav-pills .nav-link {
  color: var(--pb-primary);
  border-radius: var(--pb-radius-sm);
  font-family: 'Oswald', sans-serif;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .6px;
  padding: .45rem 1.1rem;
  transition: var(--pb-transition);
}
.nav-pills .nav-link:hover {
  background: var(--pb-primary-light);
  color: var(--pb-primary-dark);
}
.nav-pills .nav-link.active {
  background: var(--pb-primary);
  color: #fff;
}

/* --------------------------------------------------------
   4. NAVBAR
   -------------------------------------------------------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  height: var(--navbar-h);
  padding: 0 1rem;
  background: transparent;
  transition: background .25s ease, box-shadow .25s ease;
}

/* Over a hero: transparent overlay */
.nav-on-header .navbar {
  background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.1) 100%);
}

/* Scrolled state — added via JS */
.navbar.navbar-scrolled,
.navbar-solid {
  background: var(--pb-surface) !important;
  box-shadow: var(--pb-shadow-md);
}

/* Logo */
.navbar .logo-wrapper {
  display: flex;
  align-items: center;
}
.navbar .logo img,
.navbar .logo-alt img {
  height: 40px;
  width: auto;
}
/* Show logo-alt when scrolled, logo when transparent */
.navbar .logo-alt { display: none; }
.navbar.navbar-scrolled .logo { display: none; }
.navbar.navbar-scrolled .logo-alt { display: flex; }

/* Nav links */
.navbar .nav-link {
  font-family: 'Oswald', sans-serif;
  font-size: .88rem;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: rgba(255,255,255,.9);
  padding: .5rem .75rem;
  transition: color .15s;
}
.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: #fff;
}
.navbar.navbar-scrolled .nav-link {
  color: var(--pb-text-secondary);
}
.navbar.navbar-scrolled .nav-link:hover,
.navbar.navbar-scrolled .nav-link.active {
  color: var(--pb-primary);
}
.navbar-solid .nav-link {
  color: var(--pb-text-secondary);
}
.navbar-solid .nav-link:hover {
  color: var(--pb-primary);
}

/* Dropdown caret hidden by default; use FA icon */
.navbar .dropdown-toggle::after { display: none; }
.navbar .dropdown-toggle .fa-chevron-down {
  font-size: .65rem;
  margin-left: .25rem;
  opacity: .7;
  transition: transform .2s;
}
.navbar .dropdown-toggle[aria-expanded="true"] .fa-chevron-down {
  transform: rotate(180deg);
}

/* Dropdown panel */
.navbar .dropdown-menu {
  border: none;
  border-radius: var(--pb-radius-md);
  box-shadow: var(--pb-shadow-lg);
  padding: .5rem;
  min-width: 200px;
  margin-top: .4rem;
  animation: dropIn .15s ease;
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.navbar .dropdown-item {
  border-radius: var(--pb-radius-xs);
  font-size: .875rem;
  padding: .45rem .75rem;
  color: var(--pb-text-secondary);
  transition: background .15s, color .15s;
}
.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
  background: var(--pb-primary-light);
  color: var(--pb-primary);
}
.navbar .dropdown-divider {
  margin: .3rem .5rem;
  border-color: var(--pb-border);
}
.navbar .dropdown-header {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--pb-muted);
  padding: .4rem .75rem .2rem;
}

/* User avatar initial circle */
.avatar-initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--pb-primary);
  color: #fff;
  font-weight: 700;
  font-size: .85rem;
  font-family: 'Inter', sans-serif;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s;
}
.avatar-initial:hover { background: var(--pb-primary-dark); }

/* Mobile toggler */
.navbar-toggler {
  border: none;
  color: #fff;
  font-size: 1.25rem;
  padding: .25rem .4rem;
}
.navbar.navbar-scrolled .navbar-toggler { color: var(--pb-text); }

/* Login button: white outline on transparent navbar → primary-coloured on white navbar */
.navbar.navbar-scrolled .btn-outline-light {
  color: var(--pb-primary);
  border-color: var(--pb-primary);
  background: transparent;
}
.navbar.navbar-scrolled .btn-outline-light:hover,
.navbar.navbar-scrolled .btn-outline-light:focus {
  color: #fff;
  background-color: var(--pb-primary);
  border-color: var(--pb-primary);
}
.navbar-toggler:focus { box-shadow: none; }

/* Mobile nav collapse */
.navbar-collapse {
  transition: var(--pb-transition);
}
@media (max-width: 991.98px) {
  .navbar-collapse {
    background: var(--pb-bg-dark);
    border-radius: var(--pb-radius-md);
    padding: 1rem;
    margin-top: .5rem;
  }
  .navbar-collapse .nav-link {
    color: rgba(255,255,255,.85);
    padding: .6rem .25rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
    font-size: .9rem;
  }
  .navbar-collapse .dropdown-menu {
    background: transparent;
    box-shadow: none;
    border: none;
    padding-left: 1rem;
    animation: none;
  }
  .navbar-collapse .dropdown-item {
    color: rgba(255,255,255,.65);
    padding: .35rem .5rem;
  }
  .navbar-collapse .dropdown-item:hover {
    background: rgba(255,255,255,.08);
    color: #fff;
  }
}

/* --------------------------------------------------------
   5. HERO / SITE HEADER (homepage)
   -------------------------------------------------------- */
.site-header {
  position: relative;
  min-height: 580px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  color: #fff;
  margin-top: calc(-1 * var(--navbar-h));
  padding: calc(var(--navbar-h) + 60px) 0 60px;
}
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.25) 0%, rgba(0,0,0,.50) 100%);
}
.site-header .container { position: relative; z-index: 1; }

.site-header h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: .5rem;
  text-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.site-header .hero-subtitle {
  font-size: 1.1rem;
  color: rgba(255,255,255,.85);
  margin-bottom: 2rem;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
}

/* Search form — frosted glass */
.header-job-search {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: var(--pb-radius-lg);
  padding: 1rem 1.25rem;
  max-width: 780px;
  margin: 0 auto;
}
.header-job-search .input-keyword,
.header-job-search .input-location {
  flex: 1 1 200px;
}
.header-job-search .form-control {
  background: rgba(255,255,255,.9);
  border: none;
  border-radius: var(--pb-radius-sm);
  height: 46px;
  font-size: .95rem;
}
.header-job-search .form-control:focus {
  background: #fff;
  box-shadow: 0 0 0 3px rgba(79,70,229,.25);
}
.header-job-search .btn-search {
  display: flex;
  gap: .5rem;
  align-items: center;
}
.header-job-search .btn-find {
  background: var(--pb-accent);
  border: none;
  color: #fff;
  font-weight: 600;
  height: 46px;
  padding: 0 1.5rem;
  border-radius: var(--pb-radius-sm);
  font-size: .95rem;
  white-space: nowrap;
  transition: background .2s;
}
.header-job-search .btn-find:hover { background: var(--pb-accent-dark); }
.header-job-search .btn-search a {
  color: rgba(255,255,255,.9);
  font-size: .875rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

/* Hero stats bar */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.hero-stat {
  text-align: center;
  color: rgba(255,255,255,.9);
}
.hero-stat strong {
  display: block;
  font-family: 'Oswald', sans-serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: #fff;
}
.hero-stat span {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .6px;
  opacity: .75;
}

/* --------------------------------------------------------
   6. PAGE HEADER STRIP (inner pages)
   -------------------------------------------------------- */
.page-header {
  position: relative;
  background-size: cover;
  background-position: center;
  padding: 60px 0;
  color: #fff;
  margin-top: calc(-1 * var(--navbar-h));
  padding-top: calc(var(--navbar-h) + 48px);
}
.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.20) 0%, rgba(0,0,0,.55) 100%);
}
.page-header .container { position: relative; z-index: 1; }
.page-header h1,
.page-header h2,
.page-header p { color: #fff; }
.page-header .lead {
  opacity: .85;
  font-size: 1rem;
}

/* Compact variant for secondary inner pages */
.page-header.size-sm {
  padding: 36px 0;
  padding-top: calc(var(--navbar-h) + 28px);
}

/* --------------------------------------------------------
   6.5. FILTER PANEL (inside page-header)
   -------------------------------------------------------- */
.filter-panel-wrapper {
  position: relative;
  z-index: 1;
  padding-bottom: 2rem;
}

/* Toggle button — translucent pill on dark background */
.btn-filter-toggle {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.45);
  color: #fff;
  font-family: 'Oswald', sans-serif;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .8px;
  padding: .4rem 1rem;
  border-radius: var(--pb-radius-full);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: var(--pb-transition);
}
.btn-filter-toggle:hover,
.btn-filter-toggle[aria-expanded="true"] {
  background: rgba(255,255,255,.28);
  color: #fff;
  border-color: rgba(255,255,255,.7);
}
.btn-filter-toggle .filter-chevron {
  font-size: .6rem;
  vertical-align: middle;
  transition: transform .25s ease;
}
.btn-filter-toggle[aria-expanded="true"] .filter-chevron {
  transform: rotate(180deg);
}

/* Frosted-glass card */
.filter-card {
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--pb-radius-md);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--pb-shadow-lg);
  margin-top: .5rem;
}

/* Small uppercase label above each control */
.filter-label {
  display: block;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--pb-muted);
  margin-bottom: .4rem;
}

/* Thin divider between text inputs and checkbox groups */
.filter-divider {
  border-color: var(--pb-border);
  margin: .25rem 0 .75rem;
}

/* Checkbox groups */
.filter-checks .form-check { margin-bottom: .3rem; }
.filter-checks .form-check-label {
  font-size: .875rem;
  color: var(--pb-text-secondary);
}
.filter-checks .form-check-input:checked {
  background-color: var(--pb-primary);
  border-color: var(--pb-primary);
}
/* Inline variant (ad types) */
.filter-checks--inline .form-check { margin-bottom: 0; }

/* Search button */
.filter-search-btn {
  font-family: 'Oswald', sans-serif;
  font-size: .9rem;
  letter-spacing: .4px;
  padding: .6rem 1.5rem;
}

/* --------------------------------------------------------
   7. "HOW IT WORKS" STRIP
   -------------------------------------------------------- */
.how-it-works {
  background: var(--pb-surface);
  padding: 4rem 0;
  border-top: 1px solid var(--pb-border);
}
.how-step {
  text-align: center;
  padding: 0 1rem;
}
.how-step .step-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--pb-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
  color: var(--pb-primary);
}
.how-step h5 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: .4rem;
}
.how-step p {
  color: var(--pb-muted);
  font-size: .875rem;
  margin: 0;
}

/* --------------------------------------------------------
   8. JOB CARDS (.item-block)
   -------------------------------------------------------- */
.item-block {
  display: flex;
  flex-direction: column;
  background: var(--pb-surface);
  border: 1px solid var(--pb-border);
  border-radius: var(--pb-radius-md);
  padding: 1.25rem;
  margin-bottom: 1rem;
  color: var(--pb-text-secondary);
  text-decoration: none;
  box-shadow: var(--pb-shadow-sm);
  transition: box-shadow .2s, border-color .2s, transform .2s;
  height: 100%;
}
.item-block:hover {
  box-shadow: var(--pb-shadow-md);
  border-color: var(--pb-primary-light);
  transform: translateY(-2px);
  color: var(--pb-text-secondary);
  text-decoration: none;
}

/* Card header row */
.item-block header {
  margin-bottom: .6rem;
}
.item-block header .hgroup h4 {
  font-family: 'Oswald', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--pb-primary-dark);
  margin-bottom: .25rem;
  line-height: 1.3;
  transition: color .2s;
}
.item-block:hover .hgroup h4 { color: var(--pb-primary); }

/* Card body */
.item-block .item-body p {
  color: var(--pb-muted);
  font-size: .875rem;
  line-height: 1.55;
  margin-bottom: .75rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Tags / categories */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin-bottom: .75rem;
}
.tag-list span {
  display: inline-block;
  background: var(--pb-primary-light);
  color: var(--pb-primary);
  border-radius: var(--pb-radius-full);
  padding: .2rem .65rem;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .2px;
}

/* Card footer row */
.item-block footer {
  border-top: 1px solid var(--pb-border);
  padding-top: .75rem;
  margin-top: auto;
}
.item-block footer ul.details {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.item-block footer ul.details li {
  font-size: .78rem;
  color: var(--pb-muted);
  display: flex;
  align-items: center;
  gap: .3rem;
}
.item-block footer ul.details li i {
  color: var(--pb-primary);
  font-size: .8rem;
}

/* Ad status pills */
.draft {
  border-left: 3px solid #F59E0B;
  background: #FFFBEB;
}
.draft header .hgroup h4 { color: #92400E; }

/* Ad list grid — override full-width default */
#ad_list_container .row {
  margin-left: -.5rem;
  margin-right: -.5rem;
}
#ad_list_container .row > [class*="col-"] {
  padding-left: .5rem;
  padding-right: .5rem;
}

/* --------------------------------------------------------
   9. SECTION HEADER
   -------------------------------------------------------- */
.section-header {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: 2.5rem 0 1.25rem;
}
.section-header span {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--pb-primary);
}
.section-header h2 {
  font-size: 1.6rem;
  margin: 0;
  color: var(--pb-text);
}

/* --------------------------------------------------------
   10. AD DETAIL PAGE
   -------------------------------------------------------- */
.ad-detail-main {
  padding: 2rem 0;
}
.ad-content-col {
  /* left col: description + carousel */
}
.ad-sidebar {
  position: sticky;
  top: calc(var(--navbar-h) + 1rem);
}
.ad-sidebar-card {
  background: var(--pb-surface);
  border: 1px solid var(--pb-border);
  border-radius: var(--pb-radius-md);
  padding: 1.5rem;
  box-shadow: var(--pb-shadow-sm);
}
.ad-sidebar-card h6 {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--pb-muted);
  margin-bottom: .25rem;
}
.ad-sidebar-card .detail-value {
  font-size: .95rem;
  color: var(--pb-text);
  font-weight: 500;
}
.ad-sidebar-card .detail-row {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--pb-border);
}
.ad-sidebar-card .detail-row:last-child { border-bottom: none; }
.ad-sidebar-card .detail-row .detail-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--pb-radius-xs);
  background: var(--pb-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pb-primary);
  flex-shrink: 0;
  font-size: .85rem;
}

/* Availability table */
#period_day {
  font-size: .875rem;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--pb-radius-md);
  overflow: hidden;
  box-shadow: var(--pb-shadow-sm);
  width: 100%;
}
#period_day thead th {
  background: var(--pb-primary);
  color: #fff;
  font-family: 'Oswald', sans-serif;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .8px;
  padding: .65rem .9rem;
  border: none;
}
#period_day thead th:first-child {
  background: var(--pb-primary-dark);
  border-radius: var(--pb-radius-md) 0 0 0;
}
#period_day thead th:last-child {
  border-radius: 0 var(--pb-radius-md) 0 0;
}
#period_day tbody td {
  padding: .5rem .75rem;
  vertical-align: middle;
  background: var(--pb-surface);
  border-bottom: 1px solid var(--pb-border);
  border-right: 1px solid var(--pb-border);
  transition: background .15s;
}
#period_day tbody td:last-child { border-right: none; }
#period_day tbody td:first-child {
  font-weight: 600;
  color: var(--pb-primary-dark);
  background: var(--pb-primary-light);
  white-space: nowrap;
  border-right: 2px solid var(--pb-border);
}
#period_day tbody tr:last-child td { border-bottom: none; }
#period_day tbody tr:last-child td:first-child {
  border-radius: 0 0 0 var(--pb-radius-md);
}
#period_day tbody tr:last-child td:last-child {
  border-radius: 0 0 var(--pb-radius-md) 0;
}
#period_day tbody td.is-available {
  background: #e9f5fb;
}
#period_day .avail-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--pb-primary);
  color: #fff;
  font-size: .65rem;
  box-shadow: 0 2px 6px rgba(37,150,190,.35);
}

/* Description card */
.ad-description-card {
  background: var(--pb-surface);
  border: 1px solid var(--pb-border);
  border-radius: var(--pb-radius-md);
  padding: 1.75rem;
  box-shadow: var(--pb-shadow-sm);
  margin-bottom: 1.25rem;
}
.ad-description-card .lead {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--pb-text-secondary);
}

/* --------------------------------------------------------
   11. PROFILE PAGE
   -------------------------------------------------------- */
.profile-page { padding: 2rem 0; }

.profile-avatar-wrap {
  text-align: center;
  margin-bottom: 1.5rem;
}
.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid var(--pb-primary);
  object-fit: cover;
  box-shadow: var(--pb-shadow-md);
}
.profile-avatar-placeholder {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--pb-primary-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Oswald', sans-serif;
  font-size: 2.5rem;
  color: var(--pb-primary);
  border: 4px solid var(--pb-primary);
}

.profile-card {
  background: var(--pb-surface);
  border: 1px solid var(--pb-border);
  border-radius: var(--pb-radius-md);
  padding: 1.75rem;
  box-shadow: var(--pb-shadow-sm);
  margin-bottom: 1.25rem;
}
.profile-card h5 {
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--pb-primary-light);
  color: var(--pb-text);
}

.profile-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}
@media (max-width: 575.98px) {
  .profile-contact-grid { grid-template-columns: 1fr; }
}
.profile-contact-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .875rem;
  color: var(--pb-text-secondary);
}
.profile-contact-item i {
  width: 28px;
  height: 28px;
  border-radius: var(--pb-radius-xs);
  background: var(--pb-primary-light);
  color: var(--pb-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  flex-shrink: 0;
}

/* --------------------------------------------------------
   12. MESSAGE ROW CARDS (inbox / outbox)
   -------------------------------------------------------- */
.msg-row {
  display: flex;
  align-items: stretch;
  background: var(--pb-surface);
  border: 1px solid var(--pb-border);
  border-left: 4px solid var(--pb-border);
  border-radius: var(--pb-radius-md);
  box-shadow: var(--pb-shadow-xs);
  margin-bottom: .5rem;
  cursor: pointer;
  overflow: hidden;
  transition: var(--pb-transition);
}
.msg-row:hover {
  box-shadow: var(--pb-shadow-md);
  border-color: var(--pb-primary);
  border-left-color: var(--pb-primary);
  transform: translateY(-1px);
}
.msg-row--unread {
  border-left-color: var(--pb-primary);
  background: var(--pb-bg);
}

/* Sender avatar */
.msg-row__avatar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 1rem .5rem 1rem .875rem;
}
.msg-row__avatar-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--pb-primary-light);
  color: var(--pb-primary-dark);
  font-weight: 700;
  font-size: .75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  flex-shrink: 0;
  letter-spacing: .5px;
}
.msg-row--unread .msg-row__avatar-circle {
  background: var(--pb-primary);
  color: #fff;
}

/* Body — subject + from/to */
.msg-row__body {
  flex: 1;
  min-width: 0;
  padding: .75rem .5rem .75rem .625rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .2rem;
}
.msg-row__meta {
  font-size: .8rem;
  color: var(--pb-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.msg-row__meta strong {
  color: var(--pb-text-secondary);
  font-weight: 600;
}
.msg-row__subject {
  font-size: .875rem;
  font-weight: 400;
  color: var(--pb-text-secondary);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.msg-row--unread .msg-row__subject {
  font-weight: 700;
  color: var(--pb-text);
}

/* Right column — date + actions */
.msg-row__right {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  padding: .75rem .875rem .75rem .5rem;
  gap: .5rem;
}
.msg-row__date {
  font-size: .8rem;
  color: var(--pb-muted);
  text-align: right;
  white-space: nowrap;
  line-height: 1.4;
}
.msg-row__date small {
  font-size: .75rem;
  opacity: .8;
}
.msg-row__actions {
  display: flex;
  gap: .3rem;
}

/* Message detail view */
.msg-detail {
  background: var(--pb-surface);
  border: 1px solid var(--pb-border);
  border-radius: var(--pb-radius-md);
  box-shadow: var(--pb-shadow-sm);
  overflow: hidden;
}

.msg-detail__header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
}

.msg-detail__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--pb-primary);
  color: #fff;
  font-weight: 700;
  font-size: .8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  letter-spacing: .5px;
  flex-shrink: 0;
}

.msg-detail__meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.msg-detail__title-row {
  display: flex;
  align-items: baseline;
  gap: .4rem;
  font-size: 1rem;
}

.msg-detail__from {
  display: flex;
  align-items: baseline;
  gap: .4rem;
  font-size: 1rem;
}

.msg-detail__from strong {
  color: var(--pb-text);
  font-weight: 600;
}

.msg-detail__to {
  display: flex;
  align-items: baseline;
  gap: .4rem;
  font-size: 1rem;
  color: var(--pb-muted);
}

.msg-detail__label {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--pb-muted);
}

.msg-detail__date {
  font-size: .8rem;
  color: var(--pb-muted);
  text-align: right;
  flex-shrink: 0;
  line-height: 1.4;
}

.msg-detail__date small {
  font-size: .75rem;
  opacity: .8;
}

.msg-detail__divider {
  border-color: var(--pb-border);
  margin: 0;
}

.msg-detail__body {
  padding: 1.5rem;
  font-family: 'Lora', Georgia, serif;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--pb-text-secondary);
}

.msg-detail__footer {
  display: flex;
  gap: .5rem;
  padding: 1rem 1.5rem;
  background: var(--pb-bg);
  border-top: 1px solid var(--pb-border);
}

/* --------------------------------------------------------
   13. LOGIN PAGE
   -------------------------------------------------------- */
.login-page {
  min-height: 100vh;
  display: flex;
}
.login-page body { background: var(--pb-bg); }

.login-split {
  display: flex;
  min-height: 100vh;
  width: 100%;
}
.login-hero {
  flex: 1;
  background: linear-gradient(135deg, var(--pb-primary) 0%, #1A7A9E 60%, var(--pb-accent) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.login-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.login-hero .login-brand { position: relative; z-index: 1; text-align: center; }
.login-hero .login-brand img { height: 52px; margin-bottom: 2rem; filter: brightness(0) invert(1); }
.login-hero h2 {
  font-size: 2rem;
  color: #fff;
  margin-bottom: .75rem;
  position: relative;
  z-index: 1;
}
.login-hero p {
  color: rgba(255,255,255,.8);
  max-width: 320px;
  text-align: center;
  font-size: .95rem;
  position: relative;
  z-index: 1;
}
.login-hero .hero-features {
  position: relative;
  z-index: 1;
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.login-hero .hero-feature {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: rgba(255,255,255,.85);
  font-size: .875rem;
}
.login-hero .hero-feature i {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.login-form-col {
  flex: 0 0 460px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--pb-surface);
}
.login-card-inner {
  width: 100%;
  max-width: 380px;
}
.login-card-inner .login-logo {
  text-align: center;
  margin-bottom: 1.75rem;
}
.login-card-inner .login-logo img { height: 44px; }
.login-card-inner h1 {
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: .25rem;
}
.login-card-inner .login-subtitle {
  text-align: center;
  color: var(--pb-muted);
  font-size: .875rem;
  margin-bottom: 1.75rem;
}
.login-links {
  display: flex;
  justify-content: space-between;
  margin-top: 1.25rem;
  font-size: .85rem;
}

@media (max-width: 767.98px) {
  .login-split { flex-direction: column; }
  .login-hero { min-height: 220px; padding: 2rem 1.5rem; }
  .login-hero h2 { font-size: 1.5rem; }
  .login-hero .hero-features { display: none; }
  .login-form-col { flex: 1; padding: 1.5rem 1rem; }
}

/* --------------------------------------------------------
   13. REGISTER PAGE
   -------------------------------------------------------- */
.register-form-card {
  background: var(--pb-surface);
  border: 1px solid var(--pb-border);
  border-radius: var(--pb-radius-md);
  padding: 2rem;
  box-shadow: var(--pb-shadow-sm);
  max-width: 720px;
  margin: 2rem auto;
}

/* --------------------------------------------------------
   14. FOOTER
   -------------------------------------------------------- */
.site-footer {
  background: var(--pb-bg-dark);
  color: #94A3B8;
  padding: 0;
}
.footer-newsletter {
  background: linear-gradient(135deg, var(--pb-primary) 0%, #1A7A9E 100%);
  padding: 2.5rem 0;
}
.footer-newsletter h4 {
  color: #fff;
  margin-bottom: .25rem;
  font-size: 1.3rem;
}
.footer-newsletter p {
  color: rgba(255,255,255,.75);
  font-size: .875rem;
  margin: 0;
}
.footer-newsletter .newsletter-form {
  display: flex;
  gap: .5rem;
  max-width: 420px;
}
.footer-newsletter .newsletter-form input {
  flex: 1;
  border-radius: var(--pb-radius-sm);
  border: none;
  height: 44px;
  padding: 0 1rem;
  font-size: .9rem;
}
.footer-newsletter .newsletter-form button {
  background: var(--pb-accent);
  border: none;
  color: #fff;
  padding: 0 1.25rem;
  border-radius: var(--pb-radius-sm);
  font-weight: 600;
  height: 44px;
  white-space: nowrap;
  transition: background .2s;
}
.footer-newsletter .newsletter-form button:hover { background: var(--pb-accent-dark); }

.footer-main {
  padding: 3rem 0 1.5rem;
}
.footer-brand p {
  color: #64748B;
  font-size: .875rem;
  line-height: 1.6;
  margin-top: .75rem;
}

.site-footer h6 {
  color: #E2E8F0;
  font-family: 'Oswald', sans-serif;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links li { margin-bottom: .5rem; }
.footer-links a {
  color: #64748B;
  font-size: .875rem;
  transition: color .15s;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.footer-links a:hover { color: #fff; }
.footer-links a i { font-size: .75rem; opacity: .6; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.07);
  padding: 1.25rem 0;
}
.copyright-text {
  color: #475569;
  font-size: .8rem;
  margin: 0;
}
.social-icons {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: .5rem;
}
.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--pb-radius-xs);
  background: rgba(255,255,255,.07);
  color: #94A3B8;
  font-size: .9rem;
  transition: background .2s, color .2s;
}
.social-icons a:hover {
  background: var(--pb-primary);
  color: #fff;
}

/* --------------------------------------------------------
   15. BACK TO TOP
   -------------------------------------------------------- */
#scroll-up {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  background: var(--pb-primary);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--pb-shadow-md);
  z-index: 1000;
  transition: background .2s, transform .2s;
  text-decoration: none;
  font-size: .9rem;
}
#scroll-up:hover {
  background: var(--pb-primary-dark);
  transform: translateY(-2px);
  color: #fff;
}

/* --------------------------------------------------------
   16. MESSAGES / TOASTS
   -------------------------------------------------------- */
.toast-container-fixed {
  position: fixed;
  top: calc(var(--navbar-h) + .75rem);
  right: 1rem;
  z-index: 1080;
  width: 340px;
}
.toast-container-fixed .toast { width: 100%; }

/* --------------------------------------------------------
   17. MESSAGES LIST PAGE
   -------------------------------------------------------- */
.message-item {
  background: var(--pb-surface);
  border: 1px solid var(--pb-border);
  border-radius: var(--pb-radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: .5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--pb-transition);
  text-decoration: none;
  color: var(--pb-text-secondary);
}
.message-item:hover {
  border-color: var(--pb-primary-light);
  box-shadow: var(--pb-shadow-sm);
  color: var(--pb-text);
}
.message-item.unread { font-weight: 600; }
.message-item.unread .msg-title { color: var(--pb-text); }

.message-detail p { line-height: 1.75; }

/* --------------------------------------------------------
   18. MISC UTILITIES
   -------------------------------------------------------- */
.bg-alt { background: var(--pb-bg); }
.no-padding-top { padding-top: 0 !important; }
.no-shadow { box-shadow: none !important; }
.hgroup { margin-bottom: .75rem; }
.form-group { margin-bottom: 1rem; }

/* Details lists */
ul.details {
  list-style: none;
  padding: 0;
}
ul.details.cols-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem;
}
ul.details.cols-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: .6rem;
}
@media (max-width: 575.98px) {
  ul.details.cols-2,
  ul.details.cols-3 { grid-template-columns: 1fr; }
}

/* Action buttons */
.action-buttons {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}
@media (max-width: 575.98px) {
  .action-buttons { flex-direction: column; }
  .action-buttons .btn { width: 100%; }
}

/* Spinner */
.spinner {
  display: flex;
  justify-content: center;
  gap: .5rem;
  margin: 2rem 0;
}
.spinner .dot1,
.spinner .dot2,
.spinner .dot3 {
  width: 10px;
  height: 10px;
  background: var(--pb-primary);
  border-radius: 50%;
  animation: pbBounce 1.4s infinite ease-in-out;
}
.spinner .dot2 { animation-delay: .16s; }
.spinner .dot3 { animation-delay: .32s; }
@keyframes pbBounce {
  0%, 80%, 100% { transform: scale(0); opacity: .4; }
  40% { transform: scale(1); opacity: 1; }
}

/* TomSelect */
.ts-wrapper { min-width: 100%; }

/* Section spacing for ad list page */
section.no-padding-top { padding-top: 0; }

/* Header detail */
.header-detail { padding: 1rem 0; }

/* Login block (fallback for pages using old style) */
.login-block {
  text-align: center;
  padding: 2.5rem 1.25rem;
}
.login-block img { max-height: 52px; margin-bottom: 1.5rem; }

/* FAQ */
.faq-items {
  list-style: none;
  padding: 0;
}
.faq-items li {
  margin-bottom: .5rem;
  padding: .85rem 1rem;
  background: rgba(79,70,229,.08);
  border-radius: var(--pb-radius-sm);
  border-left: 3px solid var(--pb-primary);
}
.faq-items li a {
  color: var(--pb-text);
  font-weight: 500;
  font-size: .95rem;
}
.faq-items li a:hover { color: var(--pb-primary); }

/* User settings */
.div-user-settings { padding: 1.5rem 0; }

/* Progress bar */
.progress { border-radius: var(--pb-radius-full); }
.progress-bar { background: var(--pb-primary); }

/* Responsive fine-tuning */
@media (max-width: 767.98px) {
  .ad-sidebar { position: static; margin-top: 1.5rem; }
  .site-header { min-height: 420px; }
  .header-job-search { border-radius: var(--pb-radius-md); }
}

/* AdSense inside card — keep it contained */
.item-block .adsbygoogle {
  width: 100% !important;
  min-height: 120px;
}

/* Splide carousel in ad detail */
.ad-carousel img {
  width: 100%;
  border-radius: var(--pb-radius-sm);
  object-fit: cover;
  max-height: 360px;
}

/* Image upload zone */
.ad-upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  border: 2px dashed #A8CCDE;
  border-radius: var(--pb-radius-md);
  cursor: pointer;
  background: var(--pb-bg);
  color: var(--pb-muted);
  gap: .5rem;
  transition: var(--pb-transition);
}
.ad-upload-zone:hover {
  border-color: var(--pb-primary);
  color: var(--pb-primary);
  background: var(--pb-primary-light);
}
.ad-upload-zone i { font-size: 1.75rem; }
.ad-upload-zone span { font-size: .85rem; font-weight: 600; }

/* Input group icons */
.input-group-text {
  background: var(--pb-primary-light);
  border-color: #A8CCDE;
  color: var(--pb-primary);
}

/* --------------------------------------------------------
   PAGE PROSE — Markdown-rendered static pages
   -------------------------------------------------------- */
.page-prose h1,
.page-prose h2,
.page-prose h3,
.page-prose h4 {
  font-family: 'Oswald', sans-serif;
  color: var(--pb-text);
  margin-top: 2rem;
  margin-bottom: .75rem;
}
.page-prose h1 { font-size: 1.6rem; color: var(--pb-primary-dark); margin-top: 0; }
.page-prose h2 {
  font-size: 1.2rem;
  color: var(--pb-primary-dark);
  border-bottom: 2px solid var(--pb-border);
  padding-bottom: .4rem;
}
.page-prose h3 { font-size: 1.05rem; color: var(--pb-text-secondary); }

.page-prose p {
  color: var(--pb-text-secondary);
  line-height: 1.8;
  margin-bottom: 1rem;
}
.page-prose ul,
.page-prose ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  color: var(--pb-text-secondary);
}
.page-prose li { margin-bottom: .35rem; line-height: 1.7; }

.page-prose blockquote {
  border-left: 4px solid var(--pb-primary);
  background: var(--pb-primary-light);
  color: var(--pb-muted);
  margin: 1.25rem 0;
  padding: .75rem 1.25rem;
  border-radius: 0 var(--pb-radius-sm) var(--pb-radius-sm) 0;
  font-style: italic;
}

.page-prose a { color: var(--pb-primary); text-underline-offset: 3px; }
.page-prose a:hover { color: var(--pb-primary-dark); }

.page-prose code {
  background: var(--pb-bg);
  border: 1px solid var(--pb-border);
  border-radius: var(--pb-radius-xs);
  padding: .15em .4em;
  font-size: .875em;
  color: var(--pb-primary-dark);
}
.page-prose pre {
  background: var(--pb-bg-dark);
  color: #e2e8f0;
  border-radius: var(--pb-radius-sm);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin-bottom: 1rem;
}
.page-prose pre code { background: none; border: none; padding: 0; color: inherit; }

.page-prose hr {
  border: none;
  border-top: 2px solid var(--pb-border);
  margin: 2rem 0;
}
.page-prose strong { color: var(--pb-text); }

.page-prose table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: .9rem;
}
.page-prose th {
  background: var(--pb-primary-light);
  color: var(--pb-primary-dark);
  font-family: 'Oswald', sans-serif;
  padding: .6rem 1rem;
  border: 1px solid var(--pb-border);
  text-align: left;
}
.page-prose td {
  padding: .5rem 1rem;
  border: 1px solid var(--pb-border);
  color: var(--pb-text-secondary);
}
.page-prose tr:nth-child(even) td { background: var(--pb-bg); }
