/* ============================================================
   BRAINCUBE HELP CENTER — Main Stylesheet
   ============================================================ */

/* ---- Variables ---- */
:root {
  --brand:          #f9cf43;
  --brand-hover:    #f8c317;
  --brand-light:    #FEF9E7;

  --bg:             #EDF0F6;
  --bg-hero:        linear-gradient(180deg, #F8F4E6 0%, #EDF0F6 100%);
  --white:          #FFFFFF;

  --text-primary:   #1E293B;
  --text-secondary: #64748B;
  --text-muted:     #94A3B8;
  --text-link:      #144D93;

  --border:         #E2E8F0;
  --border-radius:  12px;
  --border-radius-sm: 6px;
  --border-radius-pill: 999px;

  --shadow-card:    0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-input:   0 0 0 3px rgba(245,182,0,0.2);

  /* Status */
  --awaiting-bg:    #FEF3C7; --awaiting-text: #92400E;
  --open-bg:        #DBEAFE; --open-text:     #1D4ED8;
  --inprogress-bg:  #CCFBF1; --inprogress-text:#0F766E;
  --solved-bg:      #DCFCE7; --solved-text:    #166534;
  --medium-bg:      #FEF3C7; --medium-text:    #92400E;
  --high-bg:        #FEE2E2; --high-text:      #991B1B;
  --low-bg:         #F0FDF4; --low-text:       #166534;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
  font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--text-link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
ul { list-style: none; }

/* ---- Layout ---- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

main { flex: 1; }

/* ============================================================
   HEADER
   ============================================================ */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.header-logo {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  text-transform: uppercase;
  text-decoration: none;
}
.header-logo:hover { text-decoration: none; color: var(--text-primary); }

.header-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-locale {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--border-radius-sm);
  transition: background 0.15s;
  text-decoration: none;
}
.header-locale:hover { background: var(--bg); color: var(--text-primary); }
.header-locale svg { flex-shrink: 0; }

.header-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
  overflow: hidden;
  flex-shrink: 0;
}
.header-avatar img { width: 100%; height: 100%; object-fit: cover; }
.header-avatar:hover { text-decoration: none; }

.header-signin,
.header-signin-btn {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-link);
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: var(--border-radius-pill);
  transition: all 0.15s;
  text-decoration: none;
}
.header-signin:hover,
.header-signin-btn:hover {
  background: var(--text-link);
  color: var(--white);
  text-decoration: none;
}

.header-logo-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-logo-wordmark {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  text-transform: uppercase;
}

.header-logo-img {
  height: 32px;
  width: auto;
}

/* User dropdown & locale dropdown */
.header-user-dropdown,
.header-locale-dropdown {
  position: relative;
}

.header-user-btn,
.header-locale-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  border-radius: var(--border-radius-pill);
  padding: 5px 12px 5px 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  transition: background 0.15s;
}
.header-user-btn:hover,
.header-locale-btn:hover { background: var(--bg); }

.locale-flag {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  display: inline-block;
}

.header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(245, 182, 0, 0.15);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.header-user-name-hidden { display: none; }

.header-chevron { flex-shrink: 0; color: var(--text-muted); }

.header-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  overflow: hidden;
  z-index: 200;
}
.header-dropdown-menu.is-open { display: block; }

.header-dropdown-menu a,
.header-dropdown-menu [role="menuitem"] {
  display: block;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  transition: background 0.12s;
}
.header-dropdown-menu a:hover,
.header-dropdown-menu [role="menuitem"]:hover {
  background: var(--bg);
  text-decoration: none;
}

.header-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.header-dropdown-menu-end { right: 0; left: auto; }

.header-new-request {
  font-size: 12px;
  padding: 6px 14px;
}

/* ============================================================
   HERO BANNER
   ============================================================ */
.hero {
  background: var(--bg-hero);
  padding: 48px 24px 40px;
  text-align: center;
}

.hero-title {
  font-size: 42px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 12px;
}
.hero-title span { color: var(--brand); }

.hero-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

/* ---- Search (targets Zendesk {{search class='search'}} helper output) ---- */

/* The {{search class='search'}} helper renders:
   <form class="search" role="search">
     <svg class="search-icon">...</svg>
     <input type="search" name="query" placeholder="...">
     <input type="submit" value="Search">
   </form>
   Used on: hero (home page) + search results page.
   We style the form itself as the pill container. */

.hero .search,
.search-results-search .search,
.category-page .search {
  position: relative;
  max-width: 680px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--border-radius-pill);
  padding: 6px 6px 6px 44px;
  box-shadow: 0 10px 32px rgba(0,0,0,0.20);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.hero .search { margin-bottom: 0; }  /* hero has no bottom margin needed */
.search-results-search .search { max-width: 100%; }
.category-page .search { max-width: 100%; }
.hero .search:focus-within,
.search-results-search .search:focus-within,
.category-page .search:focus-within {
  border-color: var(--brand);
  box-shadow: var(--shadow-input);
}

/* Search icon — hide Zendesk's injected SVG, replaced by ::before below */
.hero .search .search-icon,
.search-results-search .search .search-icon,
.category-page .search .search-icon {
  display: none;
}

/* Loupe icon via CSS ::before — always visible regardless of Zendesk version */
.hero .search::before,
.search-results-search .search::before,
.category-page .search::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
  z-index: 1;
}

/* Text input */
.hero .search input[type="search"],
.search-results-search .search input[type="search"],
.category-page .search input[type="search"] {
  flex: 1;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 15px;
  color: var(--text-primary);
  background: transparent;
  height: 44px;
  padding: 0;
  min-width: 0;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: none;
}
.hero .search input[type="search"]::placeholder,
.search-results-search .search input[type="search"]::placeholder,
.category-page .search input[type="search"]::placeholder { color: var(--text-muted); }

/* Submit button */
.hero .search input[type="submit"],
.search-results-search .search input[type="submit"],
.category-page .search input[type="submit"] {
  border: none;
  cursor: pointer;
  background: var(--brand);
  color: var(--text-primary);
  border-radius: var(--border-radius-pill);
  padding: 10px 24px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-shrink: 0;
  font-family: inherit;
  transition: background 0.15s;
  height: 44px;
  white-space: nowrap;
}
.hero .search input[type="submit"]:hover,
.search-results-search .search input[type="submit"]:hover,
.category-page .search input[type="submit"]:hover { background: var(--brand-hover); }

/* Instant search suggestion list */
.hero .search .suggestion-list,
.category-page .search .suggestion-list,
.search-results-search .search .suggestion-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-card);
  z-index: 100;
  list-style: none;
  padding: 6px 0;
  margin: 0;
}
.hero .search .suggestion-list li a,
.search-results-search .search .suggestion-list li a,
.category-page .search .suggestion-list li a {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text-primary);
}
.hero .search .suggestion-list li a:hover,
.category-page .search .suggestion-list li a:hover,
.hero .search .suggestion-list li.is-active a,
.search-results-search .search .suggestion-list li a:hover,
.search-results-search .search .suggestion-list li.is-active a {
  background: var(--brand-light);
  text-decoration: none;
}


/* ============================================================
   PAGE SUBHEADER (for inner pages)
   ============================================================ */
.page-hero {
  background: var(--bg-hero);
  padding: 32px 24px 28px;
}

.page-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: left;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 16px;
  transition: color 0.15s;
}
.back-link:hover { color: var(--text-primary); text-decoration: none; }
.back-link svg { flex-shrink: 0; }

.page-title {
  font-size: 42px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.page-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--border-radius-pill);
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  border: none;
  padding: 10px 20px;
}

.btn-primary {
  background: var(--brand);
  color: var(--white);
}
.btn-primary:hover { background: var(--brand-hover); color: var(--white); text-decoration: none; }
.btn-primary.header-new-request { color: #000; }
.btn-primary.header-new-request:hover { color: #000; }

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover { background: var(--bg); color: var(--text-primary); text-decoration: none; }

.btn-new-request {
  background: var(--brand);
  color: var(--text-primary);
  border: none;
  border-radius: var(--border-radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 20px;
  font-size: 13px;
}
.btn-new-request:hover { background: var(--brand-hover); color: var(--text-primary); text-decoration: none; }

.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-lg { padding: 12px 28px; font-size: 14px; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  display: block;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  padding: 24px;
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.card-grid .card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.card:hover {
  text-decoration: none;
  border-color: var(--brand);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.card-icon {
  width: 44px;
  height: 44px;
  background: rgba(245, 182, 0, 0.12);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  margin-bottom: 16px;
  flex-shrink: 0;
}
.card-icon svg {
  width: 22px;
  height: 22px;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  width: 100%;
}
.card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  width: 100%;
}
.card-link {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-link);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.card-link:hover { text-decoration: underline; }

/* ============================================================
   HOME PAGE SECTIONS
   ============================================================ */
.home-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 64px;
}

.section-heading { margin-bottom: 20px; }
.section-heading h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.section-heading p {
  font-size: 13px;
  color: var(--text-secondary);
}

.home-section { margin-bottom: 40px; }

/* ============================================================
   STATUS BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--border-radius-pill);
  white-space: nowrap;
}

.badge-awaiting  { background: var(--awaiting-bg);   color: var(--awaiting-text); }
.badge-open      { background: var(--open-bg);        color: var(--open-text); }
.badge-inprogress{ background: var(--inprogress-bg);  color: var(--inprogress-text); }
.badge-solved    { background: var(--solved-bg);      color: var(--solved-text); }
.badge-pending   { background: var(--awaiting-bg);    color: var(--awaiting-text); }
.badge-medium    { background: var(--medium-bg);      color: var(--medium-text); }
.badge-high      { background: var(--high-bg);        color: var(--high-text); }
.badge-low       { background: var(--low-bg);         color: var(--low-text); }

/* ============================================================
   MY REQUESTS PAGE
   ============================================================ */
.requests-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.requests-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

/* Request type tabs */
.request-type-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 28px;
}

.request-type-tab {
  padding: 10px 20px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  border-radius: 6px 6px 0 0;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  white-space: nowrap;
}

.request-type-tab:hover {
  color: var(--text-primary);
  text-decoration: none;
  background: linear-gradient(180deg, rgba(249, 207, 67, 0.22) 0%, rgba(249, 207, 67, 0.04) 100%);
  border-bottom-color: var(--brand);
}

.request-type-tab--active {
  color: var(--text-primary);
  border-bottom-color: var(--brand);
  font-weight: 600;
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  padding: 16px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  flex-shrink: 0;
}
.stat-icon-wrap--blue   { background: radial-gradient(circle at center, rgba(46,144,219,0.18) 0%, rgba(46,144,219,0.06) 100%); }
.stat-icon-wrap--orange { background: radial-gradient(circle at center, rgba(219,121,0,0.18)  0%, rgba(219,121,0,0.06)  100%); }
.stat-icon-wrap--green  { background: radial-gradient(circle at center, rgba(51,144,89,0.18)  0%, rgba(51,144,89,0.06)  100%); }

.stat-value {
  font-size: 30px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.stat-card[data-filter-status] {
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.stat-card[data-filter-status]:hover {
  border-color: var(--brand);
}
.stat-card--active {
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 3px rgba(249, 207, 67, 0.25), var(--shadow-card) !important;
}

/* Sticky header (tabs + stats + filters) */
.requests-sticky-header {
  position: sticky;
  top: 64px;
  z-index: 50;
  background: var(--bg);
  margin-left: -24px;
  margin-right: -24px;
  padding-left: 24px;
  padding-right: 24px;
  padding-bottom: 4px;
}

/* Filters bar */
.requests-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-search-wrapper {
  flex: 1;
  min-width: 200px;
  position: relative;
}
.filter-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 16px;
  height: 16px;
}
.filter-search-input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  border: 1.5px solid var(--border);
  border-radius: var(--border-radius-sm);
  font-family: inherit;
  font-size: 13px;
  color: var(--text-primary);
  background: var(--white);
  outline: none;
  transition: border-color 0.15s;
}
.filter-search-input:focus {
  border-color: var(--brand);
  box-shadow: var(--shadow-input);
}
.filter-search-input::placeholder { color: var(--text-muted); }

.filter-select {
  padding: 9px 32px 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--border-radius-sm);
  font-family: inherit;
  font-size: 13px;
  color: var(--text-primary);
  background: var(--white);
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color 0.15s;
}
.filter-select:focus { border-color: var(--brand); }

/* Request list */
.requests-list { display: flex; flex-direction: column; }

.request-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  padding: 20px 24px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.request-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border-color: #C7D2DA;
  text-decoration: none;
  color: inherit;
}

.request-item-content { flex: 1; min-width: 0; }

.request-item-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.request-item-excerpt {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.request-item-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.request-item-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.request-chevron {
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Empty state */
.empty-state {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  padding: 64px 24px;
  text-align: center;
}
.empty-state-icon {
  width: 40px;
  height: 40px;
  color: var(--brand);
  margin: 0 auto 16px;
}
.empty-state-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.empty-state-text {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ============================================================
   REQUEST DETAIL PAGE
   ============================================================ */
.request-detail-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 64px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}

.request-detail-meta {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-secondary);
}

/* Comments */
.comments-list { display: flex; flex-direction: column; gap: 12px; }

.comments-divider { height: 1px; background: var(--border); margin: 20px 0 0; }

.comment {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  padding: 20px 24px;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  flex-shrink: 0;
  overflow: hidden;
}
.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-avatar.agent { background: #6366F1; }
.comment-avatar.self { background: radial-gradient(circle at center, rgba(219,151,0,0.18) 0%, rgba(219,151,0,0.06) 100%); color: #D0A106; }

.comment-author-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.comment-author-role {
  font-size: 12px;
  font-weight: 500;
  color: #6366F1;
  background: #EEF2FF;
  padding: 1px 8px;
  border-radius: var(--border-radius-pill);
}
.comment-date {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: auto;
}

.comment-body {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.7;
  margin-bottom: 12px;
}
.comment-body p { margin-bottom: 8px; }
.comment-body p:last-child { margin-bottom: 0; }

/* Status change */
.status-change {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

/* Attachments */
.attachments { margin-top: 12px; }
.attachment-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-sm);
  font-size: 13px;
  color: var(--text-primary);
  text-decoration: none;
  transition: background 0.15s;
  justify-content: space-between;
}
.attachment-item:hover { background: #E2E8F0; text-decoration: none; color: var(--text-primary); }
.attachment-info { display: flex; align-items: center; gap: 10px; }
.attachment-icon { color: var(--brand); flex-shrink: 0; }
.attachment-name { font-weight: 500; }
.attachment-size { color: var(--text-muted); font-size: 12px; }
.attachment-download { color: var(--text-muted); }

/* Request meta row */
.request-meta-dates { font-size: 13px; color: var(--text-secondary); }
.request-meta-category {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-subtle, #F3F4F6);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-pill);
  padding: 2px 10px;
}
.request-meta-spacer { flex: 1; }

/* Close ticket button */
.btn-close-ticket {
  background: var(--brand);
  color: var(--text-primary);
  border: none;
  border-radius: var(--border-radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 20px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.btn-close-ticket:hover { background: var(--brand-hover); text-decoration: none; }
.btn-close-ticket:disabled { opacity: 0.5; cursor: not-allowed; }

/* Priority badges */
.badge-priority-low    { background: #EFF6FF; color: #3B82F6; }
.badge-priority-normal { background: #F0FDF4; color: #16A34A; }
.badge-priority-high   { background: #FFF7ED; color: #EA580C; }
.badge-priority-urgent { background: #FEF2F2; color: #DC2626; }
.badge-priority-medium { background: #FFFBEB; color: #D97706; }

/* Before you submit tip box */
.before-you-submit {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: var(--shadow-card);
}
.before-you-submit-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  flex-shrink: 0;
  background: radial-gradient(circle at center, rgba(219,151,0,0.18) 0%, rgba(219,151,0,0.06) 100%);
}
.before-you-submit-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.before-you-submit-text { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }

/* Reply form */
.reply-form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  padding: 20px 24px;
  margin-top: 12px;
}

.reply-form-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.reply-textarea {
  width: 100%;
  min-height: 90px;
  border: 1px solid var(--border);
  border-radius: var(--border-radius-sm);
  padding: 12px 14px;
  font-size: 14px;
  color: var(--text-primary);
  font-family: inherit;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
  background: var(--white);
}
.reply-textarea:focus { border-color: var(--brand); }
.reply-textarea::placeholder { color: var(--text-muted); }

.reply-upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  padding: 28px 20px;
  border: 1px dashed var(--border);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: var(--bg);
  text-align: center;
}
.reply-upload-area:hover,
.reply-upload-area.is-dragover { border-color: var(--brand); background: var(--brand-light); }

.reply-upload-icon { color: var(--brand); flex-shrink: 0; }

.reply-upload-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  flex-shrink: 0;
  background: radial-gradient(circle at center, rgba(219,151,0,0.18) 0%, rgba(219,151,0,0.06) 100%);
}

.reply-upload-text {
  font-size: 13px;
  color: var(--text-secondary);
}
.reply-upload-text strong { color: var(--brand); font-weight: 600; }

.reply-upload-hint { font-size: 12px; color: var(--text-muted); flex-shrink: 0; }

.reply-files-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.reply-file-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-pill);
  font-size: 12px;
  color: var(--text-primary);
  max-width: 280px;
}
.reply-file-chip span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reply-file-chip-remove {
  cursor: pointer;
  color: var(--text-muted);
  background: none;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 1;
}
.reply-file-chip-remove:hover { color: var(--text-primary); }

.reply-form-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.btn-send-reply {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand);
  color: var(--text-primary);
  border: none;
  border-radius: var(--border-radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 22px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-send-reply:hover { background: var(--brand-hover); }
.btn-send-reply:disabled { opacity: 0.5; cursor: not-allowed; }

.reply-form-error {
  font-size: 13px;
  color: #DC2626;
  margin-top: 8px;
}

/* Request sidebar */
.request-sidebar { display: flex; flex-direction: column; gap: 16px; }

.sidebar-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.sidebar-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.sidebar-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.sidebar-detail-row:last-child { border-bottom: none; padding-bottom: 0; }
.sidebar-detail-label { color: var(--text-secondary); }

.attachments-card-title { display: flex; align-items: center; justify-content: space-between; }
.attachments-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-subtle, #F3F4F6);
  border: 1px solid var(--border);
  padding: 2px 9px;
  border-radius: 10px;
}
.all-attachments-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
}
.sidebar-detail-value {
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
}

.response-time-box {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: var(--border-radius-sm);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #1D4ED8;
  margin-top: 16px;
}
.response-time-icon { flex-shrink: 0; }

/* ============================================================
   NEW REQUEST PAGE
   ============================================================ */
.new-request-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 64px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}

/* Override Zendesk form styles */
.new-request-form-wrapper {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  padding: 28px;
  box-shadow: var(--shadow-card);
}

/* Hide Zendesk's built-in inline suggested articles (we render our own in #bc-related-articles) */
.new-request-form-wrapper [data-test-id="suggested-articles"] {
  display: none !important;
}

/* Style Zendesk form elements */
.new-request-form-wrapper label,
.new-request-form-wrapper .form-field label,
.request-container label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.new-request-form-wrapper input[type="text"],
.new-request-form-wrapper input[type="email"],
.new-request-form-wrapper select,
.new-request-form-wrapper textarea,
.request-container input[type="text"],
.request-container input[type="email"],
.request-container select,
.request-container textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--border-radius-sm);
  font-family: inherit;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--white);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.new-request-form-wrapper input[type="text"]:focus,
.new-request-form-wrapper input[type="email"]:focus,
.new-request-form-wrapper select:focus,
.new-request-form-wrapper textarea:focus,
.request-container input[type="text"]:focus,
.request-container input[type="email"]:focus,
.request-container select:focus,
.request-container textarea:focus {
  border-color: var(--brand);
  box-shadow: var(--shadow-input);
}

.new-request-form-wrapper textarea,
.request-container textarea {
  min-height: 160px;
  resize: vertical;
}

.new-request-form-wrapper select,
.request-container select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.new-request-form-wrapper .form-field,
.request-container .form-field,
.new-request-form-wrapper .nesty-input,
.request-container .nesty-input {
  margin-bottom: 20px;
}

/* File upload */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--border-radius-sm);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.upload-area:hover { border-color: var(--brand); background: var(--brand-light); }
.upload-area svg { color: var(--brand); margin-bottom: 10px; }
.upload-area p { font-size: 14px; color: var(--text-secondary); }
.upload-area p strong { color: var(--brand); }
.upload-area .upload-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.upload-label { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.upload-legend { font-size: 14px; color: #68737D; margin: 0 0 8px; }
.upload-sublabel { font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; }

/* Form buttons */
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* New request sidebar */
.new-request-sidebar { display: flex; flex-direction: column; gap: 16px; }

.sidebar-articles-list { display: flex; flex-direction: column; gap: 6px; }
.sidebar-article-item {
  display: flex;
  flex-direction: column;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--border-radius-sm);
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.sidebar-article-item:hover {
  background: var(--brand-light);
  border-color: var(--brand);
  text-decoration: none;
}
.sidebar-article-title-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.sidebar-article-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.sidebar-article-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.sidebar-article-icon { color: #000; flex-shrink: 0; }

.sidebar-icon-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.sidebar-icon-header svg { color: var(--brand); }
.sidebar-icon-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.tips-list { display: flex; flex-direction: column; gap: 10px; }
.tip-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.tip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #D0A106;
  border: none;
  flex-shrink: 0;
  margin-top: 5px;
}

/* ============================================================
   SEARCH RESULTS PAGE
   ============================================================ */
.search-results-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.search-results-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  align-items: center;
  justify-content: space-between;
}

.category-filter-wrapper {
  align-items: center;
  gap: 8px;
}

.category-filter-label {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.category-filter-select {
  font-size: 13px;
  color: var(--text-primary);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 28px 6px 10px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7a8d' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition: border-color 0.15s;
}

.category-filter-select:focus {
  outline: none;
  border-color: var(--brand);
}

.results-count {
  font-size: 14px;
  color: var(--text-secondary);
}
.results-count strong { color: var(--text-primary); }
.page-indicator { color: var(--text-muted); font-size: 13px; }

.results-list { display: flex; flex-direction: column; }

.result-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  padding: 20px 24px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.result-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border-color: #C7D2DA;
  text-decoration: none;
  color: inherit;
}

.result-item-content { flex: 1; min-width: 0; }
.result-item-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.result-item:hover .result-item-title { color: var(--text-link); }
.result-item-excerpt {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.result-item-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.result-item-icon { color: var(--text-muted); flex-shrink: 0; }

.no-results {
  text-align: center;
  padding: 64px 24px;
}
.no-results-icon { font-size: 48px; margin-bottom: 16px; }
.no-results-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.no-results-text { font-size: 14px; color: var(--text-secondary); }

/* ============================================================
   ARTICLE PAGE
   ============================================================ */
.article-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 64px;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  align-items: start;
}

.article-header { margin-bottom: 28px; }
.article-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 12px;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.article-meta-author { display: flex; align-items: center; gap: 6px; }

.article-body {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-primary);
}
.article-body h1, .article-body h2, .article-body h3 {
  font-weight: 700;
  color: var(--text-primary);
  margin: 24px 0 12px;
}
.article-body h2 { font-size: 20px; }
.article-body h3 { font-size: 17px; }
.article-body p { margin-bottom: 16px; }
.article-body ul, .article-body ol { margin: 0 0 16px 24px; }
.article-body li { margin-bottom: 6px; }
.article-body a { color: var(--text-link); }
.article-body img { border-radius: var(--border-radius-sm); margin: 16px 0; }
.article-body code {
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  font-family: 'SFMono-Regular', Consolas, monospace;
}
.article-body pre {
  background: var(--text-primary);
  color: #E2E8F0;
  padding: 16px;
  border-radius: var(--border-radius-sm);
  overflow-x: auto;
  margin-bottom: 16px;
}
.article-body pre code { background: transparent; color: inherit; padding: 0; }

.article-sidebar { position: sticky; top: 88px; }
.article-sidebar .sidebar-card { margin-bottom: 16px; }

/* Voting */
.article-vote {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.article-vote p {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.vote-buttons { display: flex; justify-content: center; gap: 12px; }
.vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border: 1.5px solid var(--border);
  border-radius: var(--border-radius-pill);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--white);
  cursor: pointer;
  transition: all 0.15s;
}
.vote-btn:hover { border-color: var(--brand); color: var(--brand); }

/* ============================================================
   CATEGORY / SECTION PAGES
   ============================================================ */
.category-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.sections-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.section-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  padding: 24px;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.section-card:hover {
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  border-color: var(--brand);
  text-decoration: none;
  color: inherit;
  transform: translateY(-2px);
}

.section-card-icon {
  width: 52px;
  height: 52px;
  background: rgba(245, 182, 0, 0.12);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  flex-shrink: 0;
}
.section-card:hover .section-card-icon {
  background: rgba(245, 182, 0, 0.2);
}

.section-card-content {
  flex: 1;
  min-width: 0;
}

.section-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.section-card:hover .section-card-title { color: var(--brand); }

.section-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.5;
}

.section-card-count {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

/* Section / Article list */
.articles-list { display: flex; flex-direction: column; gap: 8px; }

.article-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.article-list-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border-color: #C7D2DA;
  text-decoration: none;
  color: inherit;
}
.article-list-item-icon {
  width: 36px;
  height: 36px;
  background: var(--brand-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  flex-shrink: 0;
}
.article-list-item-content { flex: 1; min-width: 0; }
.article-list-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
}
.article-list-item:hover .article-list-item-title { color: var(--text-link); }
.article-list-item-meta { font-size: 12px; color: var(--text-muted); }
.article-list-item-chevron { color: var(--text-muted); flex-shrink: 0; }

/* ============================================================
   PROFILE PAGE
   ============================================================ */
.profile-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
}
.profile-avatar-large {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: var(--white);
  overflow: hidden;
  flex-shrink: 0;
}
.profile-avatar-large img { width: 100%; height: 100%; object-fit: cover; }
.profile-info-name { font-size: 22px; font-weight: 800; color: var(--text-primary); margin-bottom: 4px; }
.profile-info-email { font-size: 14px; color: var(--text-secondary); }

/* ============================================================
   PROFILE PAGE — EXTENDED
   ============================================================ */
.profile-agent-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--border-radius-pill);
  background: #EEF2FF;
  color: #6366F1;
  margin-top: 4px;
}

.profile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  padding: 0;
}
.profile-stats .stat {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-sm);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 110px;
}
.profile-stats .stat-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.profile-stats .stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.profile-badges-section {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.community-badge-achievements {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.community-badge-achievements img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 4px;
}

.profile-nav-tabs {
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
}
.profile-nav-tabs ul {
  display: flex;
  gap: 4px;
  overflow-x: auto;
}
.profile-nav-tabs li a {
  display: block;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.profile-nav-tabs li a:hover {
  color: var(--text-primary);
  text-decoration: none;
}
.profile-nav-tabs li.current a {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

.profile-section { margin-bottom: 32px; }

.profile-activity-list { display: flex; flex-direction: column; gap: 12px; }
.profile-activity {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  padding: 16px 20px;
}
.profile-activity-header { margin-bottom: 8px; }
.profile-activity-description {
  font-size: 13px;
  color: var(--text-secondary);
}

.profile-contribution {
  background: var(--bg);
  border-radius: var(--border-radius-sm);
  padding: 12px 16px;
  margin-top: 8px;
}
.profile-contribution-header { margin-bottom: 6px; }
.profile-contribution-title { font-size: 14px; font-weight: 600; }
.profile-contribution-title a { color: var(--text-primary); }
.profile-contribution-title a:hover { color: var(--text-link); }
.profile-contribution-body {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 6px 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.meta-data {
  font-size: 12px;
  color: var(--text-muted);
}
.meta-data a { color: var(--text-secondary); }
.meta-data a:hover { color: var(--text-link); }

.profile-contribution-list { display: flex; flex-direction: column; gap: 8px; }

.profile-badges-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.profile-badges-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  padding: 16px 20px;
}
.profile-badges-item-image { width: 48px; height: 48px; flex-shrink: 0; }
.profile-badges-item-image img { width: 100%; height: 100%; object-fit: contain; }
.profile-badges-item-title { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.profile-badges-item-description { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.profile-badges-item-metadata { margin-left: auto; text-align: right; }
.profile-badges-item-metadata-title { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.profile-badges-item-metadata-description { font-size: 13px; color: var(--text-secondary); }

.no-activity, .private-activity {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
  padding: 32px 0;
}

.status-label {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--border-radius-pill);
  background: var(--bg);
  color: var(--text-secondary);
}
.status-label-solved { background: var(--solved-bg); color: var(--solved-text); }
.status-label-closed { background: var(--solved-bg); color: var(--solved-text); }
.status-label-open { background: var(--open-bg); color: var(--open-text); }
.status-label-pending { background: var(--awaiting-bg); color: var(--awaiting-text); }
.status-label-pending-moderation { background: var(--medium-bg); color: var(--medium-text); }
.status-label-official { background: #EEF2FF; color: #6366F1; }

/* Profile page card layout */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.page-title {
  font-size: 42px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 16px 0 4px;
}

.page-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  margin: 0;
}

.profile-header-card {
  padding: 24px;
  margin-bottom: 24px;
}

.profile-activity-feed {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.activity-item {
  padding: 16px;
}

.articles-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.article-card {
  padding: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.article-card:hover {
  border-color: var(--brand);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}


.quick-actions {
  padding: 20px;
}

.quick-actions h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 16px;
  color: var(--text-primary);
}

.quick-actions a,
.support-preferences a {
  text-decoration: none !important;
  color: inherit !important;
}

.quick-actions a:hover {
  background-color: #F9FAFB !important;
}

@media (max-width: 900px) {
  .profile-page > div {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }
}

/* ============================================================
   BREADCRUMBS
   ============================================================ */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.breadcrumbs a { color: var(--text-secondary); text-decoration: none; }
.breadcrumbs a:hover { color: var(--text-link); }
.breadcrumbs-sep { color: var(--text-muted); }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.pagination ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.pagination li { display: flex; }

/* Style de boîte uniquement pour les liens et le numéro de page courant */
.pagination a,
.pagination li > span,
.pagination > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--border-radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  background: var(--white);
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}

/* Reset des spans DANS les liens — ne pas les styler comme des boîtes */
.pagination a span {
  display: inline;
  min-width: auto;
  height: auto;
  padding: 0;
  border: none;
  background: none;
  border-radius: 0;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}

/* Texte pour lecteurs d'écran uniquement */
.pagination .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.pagination .current,
.pagination li.current > span { background: var(--brand); color: var(--white); border-color: var(--brand); }

/* Boutons de navigation (prev/next/first/last) — taille uniforme */
.pagination-nav-btn {
  background: var(--white) !important;
  border-color: var(--border) !important;
  color: var(--text-primary) !important;
  font-weight: 600 !important;
  width: 110px !important;
}
.pagination-nav-btn:hover {
  background: var(--brand-light) !important;
  border-color: var(--brand) !important;
  color: var(--text-primary) !important;
}

/* ============================================================
   ERROR PAGE
   ============================================================ */
.error-page-wrap {
  background: var(--bg-hero);
  min-height: calc(100vh - 65px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
}

.error-page {
  max-width: 720px;
  text-align: center;
}

.error-logo {
  width: 104px;
  height: 104px;
  background: linear-gradient(135deg, #fce4e8 0%, #f9cdd3 100%);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 40px;
}

.error-title { font-size: 40px; font-weight: 700; color: var(--text-primary); margin-bottom: 16px; line-height: 1.2; }
.error-text { font-size: 17px; color: var(--text-secondary); margin: 0 auto 40px; max-width: 600px; }
.error-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.error-btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: none;
}
.error-btn-ghost:hover { background: var(--bg); color: var(--text-primary); text-decoration: none; }

/* ============================================================
   ALERT BAR
   ============================================================ */
.alert-bar {
  background: var(--alert-bg, #F05064);
  color: var(--alert-color, #FFFFFF);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  padding: 10px 24px;
  z-index: 110;
  position: relative;
}
.alert-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.alert-bar-link {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
}
.alert-bar-link:hover { opacity: 0.85; }

/* ============================================================
   HEADER EXTENSIONS (logo image, nav links, fixed)
   ============================================================ */
.header-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
}
/* Absorb the fixed header gap into the hero/page-hero gradient so no plain grey strip shows */
body:has(.header-fixed) main { padding-top: 0; }
body:has(.header-fixed) .hero { padding-top: calc(48px + 64px); }
body:has(.header-fixed) .page-hero { padding-top: calc(32px + 64px); }

.header-logo-img {
  height: var(--logo-height, 32px);
  width: auto;
  display: block;
}
.header-logo-tagline {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0;
}
.header-nav-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: var(--border-radius-sm);
  transition: background 0.15s, color 0.15s;
}
.header-nav-link:hover {
  background: var(--bg);
  color: var(--text-primary);
  text-decoration: none;
}
.xs-hide { /* hide on mobile, shown on desktop — kept as a no-op class */ }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}
.footer a { color: var(--text-secondary); }
.footer a:hover { color: var(--text-link); }
.footer-link { color: var(--text-secondary); }
.footer-link:hover { color: var(--text-link); }
.footer-bottom { margin-top: 12px; }

.footer-social {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}
.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.footer-social-link:hover {
  background: var(--brand);
  color: var(--white);
  text-decoration: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .card-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .new-request-page { grid-template-columns: 1fr; }
  .article-layout { grid-template-columns: 1fr; }
  .sections-grid { grid-template-columns: 1fr; }
  .article-sidebar { position: static; }
}

@media (max-width: 700px) {
  .request-detail-layout { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .hero-title { font-size: 28px; }
  .page-title { font-size: 28px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-value { font-size: 28px; }
  .requests-filters { flex-direction: column; }
  .filter-search-wrapper { min-width: unset; }
  .header-inner { padding: 0 16px; }
  .container { padding: 0 16px; }
}

/* ============================================================
   ZENDESK FORM OVERRIDES
   ============================================================ */
/* Override default Zendesk styles */
#new_request_form .form-field { margin-bottom: 20px; }
.new-request-form-wrapper button[type="submit"],
.new-request-form-wrapper input[type="submit"] {
  background: var(--brand) !important;
  color: var(--text-primary) !important;
  border: none !important;
  border-radius: var(--border-radius-sm) !important;
  padding: 10px 22px !important;
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  transition: background 0.15s !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: fit-content !important;
  margin-left: auto !important;
  margin-right: 0 !important;
}
.new-request-form-wrapper button[type="submit"]:hover,
.new-request-form-wrapper input[type="submit"]:hover {
  background: var(--brand-hover) !important;
  color: var(--text-primary) !important;
}

.request-container .comment-form { margin-top: 24px; }
.request-container .comment-form textarea {
  min-height: 120px;
  margin-bottom: 12px;
}

/* Hide Zendesk branding elements */

/* Main Zendesk footer branding element */
.footer-powered-by-zendesk { display: none !important; }

/* Hide ALL links to zendesk.com - they're all branding */
a[href*="zendesk.com"] {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  left: -9999px !important;
}

/* Chat widget / Messaging branding (Built with Zendesk) */
a[href*="service/messaging"] {
  display: none !important;
}

/* Hide parent containers of zendesk links */
a[href*="zendesk.com"]^parent,
a[href*="zendesk.com"] ~ * {
  display: none !important;
}

/* SVG and images in containers with zendesk links */
svg:has(+ a[href*="zendesk.com"]),
svg + a[href*="zendesk.com"] {
  display: none !important;
}

/* Other Zendesk branding classes */
.powered-by-zendesk,
.built-with-zendesk,
.zenasr-powered-by,
.zwidget-powered-by,
.answer-bot-branding,
[class*="zendesk-powered"],
[class*="zendesk-branding"],
[class*="powered-by"] { display: none !important; }

/* Hide any element with Zendesk data attributes */
[data-zendesk-powered],
[data-zendesk-branding],
[data-powered-by] { display: none !important; }

/* ---- Date Picker ---- */
[data-garden-id="datepickers.day"] {
  color: #000 !important;
}

[data-garden-id="datepickers.day_label"] {
  color: #000 !important;
}

[data-garden-id="datepickers.header_label"] {
  color: #000 !important;
}

/* Today: yellow outline circle */
[data-garden-id="datepickers.day"][data-bc-today] {
  color: #000 !important;
  background-color: transparent !important;
  outline: 2px solid var(--brand) !important;
  outline-offset: -2px !important;
}

/* Selected: yellow filled circle */
[data-garden-id="datepickers.day"][data-bc-selected] {
  background-color: var(--brand) !important;
  color: #000 !important;
}

[data-garden-id="datepickers.day"][data-bc-selected]:hover {
  background-color: var(--brand-hover) !important;
}

/* ---- Dropdown selected item checkmark ---- */
/* Garden Combobox/Dropdown: make the check icon next to the selected option clearly visible */
[role="option"][aria-selected="true"] svg,
[role="option"][aria-selected="true"] [data-garden-id*="check"],
[role="listbox"] [aria-selected="true"] svg {
  color: var(--text-primary) !important;
  fill: var(--text-primary) !important;
  stroke: var(--text-primary) !important;
  opacity: 1 !important;
}
