/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* -------------------------------------------------------------------------- */
/* Global enterprise look & feel                                              */
/* -------------------------------------------------------------------------- */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

:root {
  --brand-ink: #0b1120;
  --brand-ink-soft: #1e293b;
  --brand-teal: #3b82f6;
  --brand-teal-dark: #2563eb;
  --brand-coral: #f97316;
  --brand-gold: #fbbf24;
  --brand-bg: #f7f9fc;
  --surface-glass: rgba(255, 255, 255, 0.9);
  --surface-card: #ffffff;
  --surface-card-dark: rgba(15, 23, 42, 0.75);
  --border-muted: rgba(15, 23, 42, 0.08);
  --text-muted: #6b7280;
  --shadow-soft: 0 18px 32px -20px rgba(15, 23, 42, 0.35);
  --shadow-strong: 0 28px 60px -32px rgba(15, 23, 42, 0.42);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  color-scheme: light;
}

body {
  font-family: "Inter", "Segoe UI", "SF Pro Display", "Roboto", sans-serif;
  background: linear-gradient(180deg, #ffffff 0%, var(--brand-bg) 100%);
  color: var(--brand-ink);
  min-height: 100vh;
  line-height: 1.55;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 12% 15%, rgba(59, 130, 246, 0.12) 0, transparent 55%),
    radial-gradient(circle at 88% 12%, rgba(94, 234, 212, 0.12) 0, transparent 48%);
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(225deg, rgba(15, 23, 42, 0.04), transparent 55%);
  z-index: -1;
}

a {
  color: var(--brand-teal-dark);
  font-weight: 500;
  transition: color 160ms ease, opacity 160ms ease, transform 160ms ease;
}

a:hover,
a:focus {
  color: var(--brand-teal);
  text-decoration: none;
}

.navbar,
.navbar.navbar-light {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.04);
}

.card {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(15, 23, 42, 0.04);
  box-shadow: 0 18px 30px -28px rgba(15, 23, 42, 0.3);
  background: #ffffff;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
  border-color: rgba(15, 23, 42, 0.06);
}

.card.bg-light,
.card.bg-body-tertiary {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(8px);
}

.badge {
  border-radius: 999px;
  letter-spacing: .03em;
  font-weight: 600;
  padding: 0.46rem 0.9rem;
}

.btn {
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -12px rgba(15, 23, 42, 0.36);
}

.btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-primary,
.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background: linear-gradient(135deg, var(--brand-teal-dark) 0%, var(--brand-teal) 100%);
  border-color: transparent;
  color: #ffffff;
}

.btn-outline-primary,
.btn-outline-secondary {
  border-width: 1.5px;
}

.btn-outline-primary {
  color: var(--brand-teal-dark);
  border-color: rgba(37, 99, 235, 0.25);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  border-color: transparent;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
  background: rgba(37, 99, 235, 0.08);
}

.alert {
  border-radius: var(--radius-md);
  border-width: 1px;
  border-color: rgba(15, 23, 42, 0.06);
  box-shadow: 0 16px 30px -26px rgba(15, 23, 42, 0.35);
}

.alert.alert-info {
  background: rgba(37, 99, 235, 0.08);
  color: var(--brand-ink);
}

.alert.alert-secondary {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(59, 130, 246, 0.14));
  color: var(--brand-ink);
  border-color: rgba(37, 99, 235, 0.08);
}

.alert.alert-secondary a {
  color: var(--brand-teal-dark);
}

.form-control,
.form-select {
  border-radius: var(--radius-sm);
  border: 1px solid rgba(15, 23, 42, 0.12);
  background-color: rgba(255, 255, 255, 0.88);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(22, 194, 194, 0.65);
  box-shadow: 0 0 0 0.25rem rgba(22, 194, 194, 0.18);
}

.table thead th {
  border-bottom: 1px solid rgba(15, 23, 42, 0.18);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.table tbody tr:hover {
  background-color: rgba(22, 194, 194, 0.05);
}

.pagination .page-item .page-link {
  border-radius: var(--radius-sm);
  border: none;
  color: var(--brand-ink);
  font-weight: 600;
}

.pagination .page-item.active .page-link {
  background-color: var(--brand-teal);
  color: #041421;
  box-shadow: 0 8px 24px -12px rgba(22, 194, 194, 0.65);
}

.badge.text-bg-warning {
  color: #705012 !important;
}

.badge.text-bg-info {
  color: #04556c !important;
}

.badge.text-bg-success {
  color: #0a4f41 !important;
}

.border-warning {
  border-color: rgba(255, 208, 115, 0.8) !important;
}

.border-warning.border-start {
  box-shadow: inset 3px 0 0 rgba(255, 208, 115, 0.7);
}

.shadow-soft {
  box-shadow: var(--shadow-soft);
}

.glass {
  background: var(--surface-glass);
  backdrop-filter: blur(14px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

/* -------------------------------------------------------------------------- */
/* Disputs dashboard                                                          */
/* -------------------------------------------------------------------------- */

.disputs-dashboard {
  position: relative;
  padding-bottom: 4rem;
}

.disputs-dashboard .disput-header-card {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  color: var(--brand-ink);
  border: 1px solid rgba(15, 23, 42, 0.05);
  box-shadow: 0 22px 48px -32px rgba(15, 23, 42, 0.28);
}

.disputs-dashboard .disput-header-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(37, 99, 235, 0.08), rgba(59, 130, 246, 0.03) 45%, transparent 90%);
  z-index: 0;
}

.disputs-dashboard .disput-header-card .card-body {
  position: relative;
  z-index: 1;
}

.disputs-dashboard .metric-card {
  background: rgba(246, 248, 253, 0.9);
  color: var(--brand-ink);
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  min-width: 150px;
}

.disputs-dashboard .metric-card span.text-muted.small {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.disputs-dashboard .disput-header-card h1 {
  color: var(--brand-ink);
  letter-spacing: 0.01em;
}

.disputs-dashboard .disput-header-card .lead {
  color: rgba(15, 23, 42, 0.6);
}

.disputs-dashboard .metric-card span.display-6 {
  font-size: 2.4rem !important;
}

.disputs-dashboard .filter-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(15, 23, 42, 0.05);
  box-shadow: 0 18px 30px -28px rgba(15, 23, 42, 0.25);
}

.disputs-dashboard .filter-card h5 {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.disputs-dashboard .filter-card .btn-outline-primary,
.disputs-dashboard .filter-card .btn-outline-secondary {
  border-radius: 999px;
  padding-inline: 1rem;
  padding-block: 0.45rem;
}

.disputs-dashboard .disput-card {
  border-radius: var(--radius-lg);
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.05);
  box-shadow: 0 18px 36px -30px rgba(15, 23, 42, 0.32);
}

.disputs-dashboard .disput-card.highlighted {
  border: 1px solid rgba(250, 204, 21, 0.45);
  background: linear-gradient(145deg, rgba(253, 230, 138, 0.28), rgba(255, 255, 255, 0.92));
  box-shadow: 0 20px 38px -32px rgba(250, 204, 21, 0.45);
}

.disputs-dashboard .disput-preview {
  border-radius: 18px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.08);
}

.disputs-dashboard .disput-preview img {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: cover;
}

.disputs-dashboard .activity-meta {
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.disputs-dashboard .activity-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.disputs-dashboard .activity-meta span svg,
.disputs-dashboard .activity-meta span i {
  opacity: 0.7;
}

.disputs-dashboard .badge.text-bg-warning.text-dark.ms-1 {
  background: rgba(252, 211, 77, 0.32) !important;
  color: #7c5214 !important;
  border: 1px solid rgba(252, 211, 77, 0.4);
}

.disputs-dashboard .btn-outline-primary {
  color: var(--brand-ink);
}

.disputs-dashboard .btn-outline-primary:hover {
  color: #041421;
}

.disputs-dashboard .btn-outline-primary .badge,
.disputs-dashboard .btn-primary .badge {
  background: rgba(255, 255, 255, 0.9);
  color: var(--brand-ink);
  font-size: 0.75rem;
  padding: 0.35rem 0.6rem;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}

.disputs-dashboard .alert-info strong,
.disputs-dashboard .alert-info span.badge {
  font-weight: 700;
}

.disputs-dashboard .alert-info span.badge {
  background: rgba(37, 99, 235, 0.12);
  color: var(--brand-ink);
  border: 1px solid rgba(37, 99, 235, 0.16);
}

.disputs-dashboard .alert-secondary .btn-outline-primary {
  border-color: rgba(37, 99, 235, 0.2);
  color: var(--brand-teal-dark);
}

.disputs-dashboard .alert-secondary .btn-outline-primary:hover {
  background: rgba(37, 99, 235, 0.08);
}

.disputs-dashboard .card-body .btn-outline-primary {
  border-color: rgba(15, 23, 42, 0.08);
}

.disputs-dashboard .card-body .btn-outline-primary:hover {
  border-color: transparent;
}

.disputs-dashboard .card-body .form-select {
  background-color: rgba(245, 248, 255, 0.86);
}

.disputs-dashboard .card-body .form-select:focus {
  background-color: rgba(255, 255, 255, 0.96);
}

@media (max-width: 992px) {
  .disputs-dashboard .btn-group {
    width: 100%;
  }

  .disputs-dashboard .btn-group .btn {
    flex: 1 1 auto;
  }

  .disputs-dashboard .card-body .d-flex.flex-column.flex-lg-row {
    align-items: flex-start !important;
  }

  .disputs-dashboard .card-body .btn-outline-primary {
    width: 100%;
  }
}

/* -------------------------------------------------------------------------- */
/* Disput show page                                                           */
/* -------------------------------------------------------------------------- */

.disput-show .card-header h5 {
  font-weight: 600;
  letter-spacing: 0.01em;
}

.disput-show__header {
  border: 1px solid rgba(15, 23, 42, 0.05);
  background: #ffffff;
}

.disput-show__header .card-body {
  padding: 2.5rem;
}

.disput-show__pill {
  background: rgba(15, 23, 42, 0.05);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.disput-show__attachment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}

.disput-show__attachment {
  border-radius: 14px;
  box-shadow: 0 10px 18px -14px rgba(15, 23, 42, 0.25);
  object-fit: cover;
  height: 160px;
  width: 100%;
}

.disput-show__meta {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0.35rem 1rem;
  margin-bottom: 0;
}

.disput-show__meta dt {
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0;
}

.disput-show__meta dd {
  margin-bottom: 0.35rem;
  font-weight: 600;
  color: var(--brand-ink);
}

.disput-show__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.disput-show__stat {
  background: #f7f9fc;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  align-items: flex-start;
  box-shadow: 0 16px 28px -24px rgba(15, 23, 42, 0.18);
  flex: 1 1 120px;
}

.disput-show__stat span.display-6 {
  font-size: 1.8rem !important;
  font-weight: 700;
  color: var(--brand-ink);
}

.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.chat-message {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.chat-message__meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.chat-message__bubble {
  border-radius: 16px;
  padding: 1rem 1.15rem;
  line-height: 1.55;
  box-shadow: 0 12px 26px -24px rgba(15, 23, 42, 0.35);
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: var(--brand-ink);
}

.chat-message--outgoing .chat-message__bubble {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.22);
  align-self: flex-end;
}

.chat-message--outgoing .chat-message__meta {
  color: var(--brand-teal-dark);
}

.chat-message__attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.chat-message__attachments img {
  max-width: 180px;
  box-shadow: 0 12px 24px -20px rgba(15, 23, 42, 0.4);
}

@media (max-width: 768px) {
  .disput-show__meta {
    grid-template-columns: 1fr;
  }

  .disput-show__header .card-body {
    padding: 1.75rem;
  }

  .disput-show__stats .disput-show__stat {
    flex: 1 1 100%;
  }
}

/* -------------------------------------------------------------------------- */
/* Utility components                                                         */
/* -------------------------------------------------------------------------- */

/* Loader overlay – hidden by default, flex when visible */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-overlay.hidden {
  display: none !important;
}

/* If you rely on Bootstrap's spinner-border, you're all set; otherwise you can size it: */
.spinner-border {
  width: 3rem;
  height: 3rem;
}

/* -------------------------------------------------------------------------- */
/* Bonus requests                                                             */
/* -------------------------------------------------------------------------- */

.bonus-requests-page {
  min-height: calc(100vh - 76px);
  padding-bottom: 4rem;
}

.bonus-requests-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid rgba(37, 99, 235, 0.1);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 8% 10%, rgba(59, 130, 246, 0.16), transparent 36%),
    radial-gradient(circle at 92% 16%, rgba(94, 234, 212, 0.15), transparent 34%),
    #ffffff;
  box-shadow: var(--shadow-soft);
}

.bonus-requests-hero h1 {
  margin: 0.25rem 0 0.4rem;
  color: var(--brand-ink);
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.bonus-requests-hero p {
  max-width: 680px;
  margin: 0;
  color: var(--text-muted);
}

.bonus-requests-eyebrow {
  display: block;
  color: var(--brand-teal-dark);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.bonus-requests-hero__count {
  flex: 0 0 auto;
  min-width: 120px;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.76);
  text-align: center;
}

.bonus-requests-hero__count span,
.bonus-requests-hero__count strong {
  display: block;
}

.bonus-requests-hero__count span {
  color: var(--text-muted);
  font-size: 0.7rem;
}

.bonus-requests-hero__count strong {
  margin-top: 0.15rem;
  color: var(--brand-teal-dark);
  font-size: 1.65rem;
}

.bonus-requests-search {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.bonus-requests-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.bonus-request-card {
  overflow: hidden;
}

.bonus-request-card .card-body {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  padding: 1.25rem;
}

.bonus-request-card__top,
.bonus-request-card__identity,
.bonus-request-card__footer {
  display: flex;
  align-items: center;
}

.bonus-request-card__top,
.bonus-request-card__footer {
  justify-content: space-between;
  gap: 1rem;
}

.bonus-request-card__identity {
  min-width: 0;
  gap: 0.75rem;
}

.bonus-request-card__avatar {
  display: grid;
  flex: 0 0 auto;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border-radius: 0.9rem;
  background: linear-gradient(145deg, rgba(37, 99, 235, 0.12), rgba(94, 234, 212, 0.2));
  color: var(--brand-teal-dark);
  font-weight: 700;
}

.bonus-request-card__identity h2 {
  overflow: hidden;
  margin: 0.15rem 0 0;
  color: var(--brand-ink);
  font-size: 1.05rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bonus-request-card__meta {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 0.68rem;
  text-align: right;
}

.bonus-request-card__meta span,
.bonus-request-card__meta time {
  display: block;
}

.bonus-request-card__meta span {
  color: var(--brand-ink-soft);
  font-weight: 600;
}

.bonus-request-card__telegram {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1rem;
  padding: 0.72rem 0.8rem;
  border: 1px solid rgba(39, 167, 231, 0.16);
  border-radius: 0.85rem;
  background: linear-gradient(135deg, rgba(39, 167, 231, 0.08), rgba(99, 91, 255, 0.045));
}

.bonus-request-card__telegram-icon {
  display: grid;
  place-items: center;
  flex: 0 0 2.1rem;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.7rem;
  background: #27a7e7;
  box-shadow: 0 0.45rem 1rem rgba(39, 167, 231, 0.18);
  color: #fff;
}

.bonus-request-card__telegram span,
.bonus-request-card__telegram strong,
.bonus-request-card__telegram a {
  display: block;
}

.bonus-request-card__telegram span {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 650;
}

.bonus-request-card__telegram strong,
.bonus-request-card__telegram a {
  margin-top: 0.05rem;
  color: var(--brand-ink);
  font-size: 0.86rem;
  font-weight: 780;
}

.bonus-request-card__telegram a {
  color: #168bc5;
  text-decoration: none;
}

.bonus-request-card__telegram a:hover {
  color: #0875aa;
  text-decoration: underline;
}

.bonus-request-card__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 1.15rem 0;
}

.bonus-request-stat {
  min-width: 0;
  padding: 0.75rem;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: var(--radius-sm);
  background: rgba(247, 249, 252, 0.8);
}

.bonus-request-stat span,
.bonus-request-stat strong {
  display: block;
}

.bonus-request-stat span {
  color: var(--text-muted);
  font-size: 0.64rem;
}

.bonus-request-stat strong {
  overflow: hidden;
  margin-top: 0.2rem;
  color: var(--brand-ink);
  font-size: 0.95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bonus-request-stat--accent {
  border-color: rgba(37, 99, 235, 0.13);
  background: rgba(37, 99, 235, 0.06);
}

.bonus-request-stat--accent strong {
  color: var(--brand-teal-dark);
}

.bonus-request-card__footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(15, 23, 42, 0.07);
}

.bonus-request-card__footer > span {
  color: var(--text-muted);
  font-size: 0.68rem;
}

@media (max-width: 991.98px) {
  .bonus-requests-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .bonus-requests-hero,
  .bonus-request-card__top,
  .bonus-request-card__footer,
  .bonus-requests-search {
    align-items: stretch;
    flex-direction: column;
  }

  .bonus-requests-hero__count {
    width: 100%;
  }

  .bonus-requests-search .btn,
  .bonus-request-card__footer .btn {
    width: 100%;
  }

  .bonus-request-card__meta {
    text-align: left;
  }

  .bonus-request-card__stats {
    grid-template-columns: 1fr;
  }
}

/* -------------------------------------------------------------------------- */
/* Support CRM — unified application shell                                    */
/* -------------------------------------------------------------------------- */

:root {
  --crm-accent: #635bff;
  --crm-accent-strong: #5147f0;
  --crm-accent-soft: #efeeff;
  --crm-navy: #11182b;
  --crm-navy-soft: #1b2440;
  --crm-canvas: #f5f6fa;
  --crm-surface: #ffffff;
  --crm-surface-soft: #f9fafc;
  --crm-border: #e8eaf1;
  --crm-text: #171b2e;
  --crm-muted: #71778a;
  --crm-success: #20b486;
  --crm-danger: #e95c6b;
  --crm-warning: #f59e4a;
  --crm-sidebar-width: 17rem;
  --crm-radius-xl: 1.5rem;
  --crm-radius-lg: 1.125rem;
  --crm-radius-md: 0.875rem;
  --crm-shadow: 0 1.25rem 3.75rem rgba(31, 38, 65, 0.09);
}

html {
  background: var(--crm-canvas);
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--crm-canvas);
  color: var(--crm-text);
  font-family: "Inter", "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.55;
}

body::before,
body::after {
  display: none;
}

.app-main {
  min-height: 100vh;
  margin-left: var(--crm-sidebar-width);
  padding: 2.25rem clamp(1.25rem, 3vw, 3rem) 4rem;
}

.crm-page,
.bonus-requests-page > .container,
.disputs-dashboard > .container,
.disput-show > .container {
  width: 100%;
  max-width: 96rem;
  margin-inline: auto;
}

.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1040;
  width: var(--crm-sidebar-width);
  flex-direction: column;
  padding: 1.5rem 1rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 5%, rgba(99, 91, 255, 0.3), transparent 27%),
    linear-gradient(180deg, #171f37 0%, #0f1527 100%);
  color: #fff;
}

.app-sidebar::after,
.login-showcase::after {
  position: absolute;
  content: "";
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image: radial-gradient(rgba(255, 255, 255, 0.7) 0.6px, transparent 0.6px);
  background-size: 18px 18px;
  mask-image: linear-gradient(to bottom, black, transparent 65%);
}

.app-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #fff;
  text-decoration: none;
}

.app-brand:hover,
.app-brand:focus {
  color: #fff;
}

.app-brand__mark {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.9rem;
  background: linear-gradient(145deg, #786fff, #4b42e7);
  box-shadow: 0 0.75rem 1.75rem rgba(76, 65, 230, 0.35);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.app-brand__copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.25;
}

.app-brand__copy strong {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.app-brand__copy small {
  max-width: 10rem;
  overflow: hidden;
  margin-top: 0.15rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-sidebar__label {
  position: relative;
  z-index: 1;
  margin: 2.25rem 0.75rem 0.7rem;
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.app-nav {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.app-nav__link {
  display: flex;
  min-height: 3rem;
  align-items: center;
  gap: 0.9rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid transparent;
  border-radius: 0.875rem;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.app-nav__link i {
  width: 1.25rem;
  color: rgba(255, 255, 255, 0.48);
  font-size: 1.05rem;
  text-align: center;
}

.app-nav__link:hover,
.app-nav__link:focus {
  transform: translateX(0.15rem);
  border-color: rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.app-nav__link.is-active {
  border-color: rgba(131, 123, 255, 0.3);
  background: linear-gradient(100deg, rgba(99, 91, 255, 0.34), rgba(99, 91, 255, 0.13));
  color: #fff;
  box-shadow: inset 3px 0 0 #8b84ff;
}

.app-nav__link.is-active i {
  color: #a8a3ff;
}

.app-nav__link.is-disabled,
.module-card.is-disabled {
  pointer-events: none;
  opacity: 0.38;
}

.app-sidebar__footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: auto;
  padding: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.045);
}

.app-user {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 0.65rem;
}

.app-user__avatar {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 0.7rem;
  background: rgba(99, 91, 255, 0.25);
  color: #c9c6ff;
  font-size: 0.8rem;
  font-weight: 800;
}

.app-user__copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.3;
}

.app-user__copy strong {
  overflow: hidden;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  text-overflow: ellipsis;
}

.app-user__copy small {
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.7rem;
}

.app-sidebar__footer form {
  display: flex;
}

.app-logout {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border: 0;
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.6);
}

.app-logout:hover,
.app-logout:focus {
  background: rgba(233, 92, 107, 0.16);
  color: #ffadb6;
}

.app-mobile-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  display: flex;
  height: 4.5rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--crm-border);
  background: rgba(17, 24, 43, 0.97);
  backdrop-filter: blur(1rem);
}

.app-brand--mobile .app-brand__mark {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.75rem;
}

.app-mobile-menu {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 1.35rem;
}

.app-offcanvas {
  --bs-offcanvas-width: 18rem;
  border: 0 !important;
  background:
    radial-gradient(circle at 18% 5%, rgba(99, 91, 255, 0.3), transparent 27%),
    linear-gradient(180deg, #171f37 0%, #0f1527 100%);
  color: #fff;
}

.app-offcanvas .offcanvas-header {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.app-offcanvas .offcanvas-body {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 1rem 1rem;
}

.flash-stack {
  width: 100%;
  max-width: 96rem;
  margin: 0 auto 1.25rem;
}

.flash-stack:empty {
  display: none;
}

.flash-stack .alert {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--crm-border);
  border-radius: 0.9rem;
  box-shadow: none;
  font-size: 0.875rem;
}

.flash-stack .alert-success {
  border-color: rgba(32, 180, 134, 0.18);
  background: #ecfbf5;
  color: #15795c;
}

.guest-header {
  position: fixed;
  z-index: 10;
  top: 1.25rem;
  left: 1.5rem;
}

.app-brand--guest .app-brand__copy small {
  color: rgba(255, 255, 255, 0.55);
}

.guest-main {
  min-height: 100vh;
}

.page-eyebrow {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--crm-accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.dashboard-page {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.dashboard-hero {
  position: relative;
  display: flex;
  min-height: 16rem;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  overflow: hidden;
  padding: clamp(1.6rem, 4vw, 3rem);
  border-radius: var(--crm-radius-xl);
  background:
    radial-gradient(circle at 84% 24%, rgba(130, 123, 255, 0.92) 0 0.35rem, transparent 0.4rem),
    radial-gradient(circle at 87% 19%, rgba(130, 123, 255, 0.35) 0 4rem, transparent 4.1rem),
    radial-gradient(circle at 83% 31%, rgba(99, 91, 255, 0.22), transparent 24%),
    linear-gradient(135deg, #ffffff 0%, #fafaff 62%, #eeeeff 100%);
  box-shadow: var(--crm-shadow);
}

.dashboard-hero::before {
  position: absolute;
  content: "";
  top: 0;
  bottom: 0;
  left: 0;
  width: 0.32rem;
  background: linear-gradient(180deg, #7c73ff, #4b42e7);
}

.dashboard-hero__copy,
.dashboard-hero__status {
  position: relative;
  z-index: 1;
}

.dashboard-hero h1 {
  max-width: 48rem;
  margin: 0;
  color: var(--crm-text);
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 760;
  letter-spacing: -0.055em;
  line-height: 1.04;
}

.dashboard-hero p {
  max-width: 42rem;
  margin: 1rem 0 0;
  color: var(--crm-muted);
  font-size: 1rem;
}

.dashboard-hero__status {
  display: flex;
  min-width: 12rem;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(32, 180, 134, 0.14);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 0.75rem 2rem rgba(38, 44, 72, 0.07);
  backdrop-filter: blur(0.6rem);
}

.status-dot {
  position: relative;
  width: 0.65rem;
  height: 0.65rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--crm-success);
  box-shadow: 0 0 0 0.3rem rgba(32, 180, 134, 0.13);
}

.dashboard-hero__status div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.35;
}

.dashboard-hero__status strong {
  font-size: 0.8rem;
}

.dashboard-hero__status small {
  overflow: hidden;
  color: var(--crm-muted);
  font-size: 0.72rem;
  text-overflow: ellipsis;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 740;
  letter-spacing: -0.025em;
}

.section-heading p {
  margin: 0.25rem 0 0;
  color: var(--crm-muted);
  font-size: 0.875rem;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.module-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  min-height: 7.2rem;
  padding: 1.25rem;
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius-lg);
  background: var(--crm-surface);
  color: var(--crm-text);
  text-decoration: none;
  transition: transform 170ms ease, border-color 170ms ease, box-shadow 170ms ease;
}

.module-card:hover,
.module-card:focus {
  transform: translateY(-0.2rem);
  border-color: rgba(99, 91, 255, 0.22);
  color: var(--crm-text);
  box-shadow: 0 1.25rem 2.6rem rgba(31, 38, 65, 0.1);
}

.module-card__icon {
  display: grid;
  width: 3.25rem;
  height: 3.25rem;
  place-items: center;
  border-radius: 1rem;
  font-size: 1.25rem;
}

.module-card__icon--violet { background: #efeeff; color: #635bff; }
.module-card__icon--cyan { background: #e8f8fb; color: #209aad; }
.module-card__icon--orange { background: #fff2e7; color: #e4802d; }
.module-card__icon--rose { background: #ffedf0; color: #df5b6a; }
.module-card__icon--green { background: #e9f9f3; color: #199671; }

.module-card__content {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.module-card__content strong {
  font-size: 1rem;
  font-weight: 720;
}

.module-card__content small {
  margin-top: 0.22rem;
  color: var(--crm-muted);
  font-size: 0.8rem;
}

.module-card__action {
  display: grid;
  width: 2.3rem;
  height: 2.3rem;
  place-items: center;
  border-radius: 50%;
  background: var(--crm-surface-soft);
  color: #8b8fa1;
  transition: background 160ms ease, color 160ms ease;
}

.module-card:hover .module-card__action {
  background: var(--crm-accent);
  color: #fff;
}

.dashboard-note {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(99, 91, 255, 0.12);
  border-radius: 1rem;
  background: var(--crm-accent-soft);
  color: var(--crm-accent-strong);
}

.dashboard-note > i {
  font-size: 1.3rem;
}

.dashboard-note div {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 0.5rem;
}

.dashboard-note strong {
  flex: 0 0 auto;
  font-size: 0.84rem;
}

.dashboard-note p {
  margin: 0;
  color: #6860c8;
  font-size: 0.8rem;
}

.login-page {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1.08fr) minmax(28rem, 0.92fr);
  background: #f7f7fb;
}

.login-showcase {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: clamp(4rem, 8vw, 8rem);
  background:
    radial-gradient(circle at 76% 22%, rgba(115, 105, 255, 0.52), transparent 22%),
    linear-gradient(140deg, #18203a, #10162a 65%);
  color: #fff;
}

.login-showcase__content {
  position: relative;
  z-index: 2;
  max-width: 34rem;
}

.login-kicker {
  display: inline-flex;
  padding: 0.4rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #aba7ff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.login-showcase h1 {
  margin: 1.5rem 0 1rem;
  font-size: clamp(2.6rem, 5vw, 4.5rem);
  font-weight: 760;
  letter-spacing: -0.065em;
  line-height: 0.98;
}

.login-showcase p {
  max-width: 30rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 1rem;
}

.login-points {
  display: grid;
  gap: 0.8rem;
  margin-top: 3rem;
}

.login-point {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.86rem;
}

.login-point i {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 0.65rem;
  background: rgba(99, 91, 255, 0.2);
  color: #aaa5ff;
}

.login-showcase__orb {
  position: absolute;
  z-index: 1;
  top: 14%;
  right: -10rem;
  width: 30rem;
  height: 30rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  box-shadow:
    0 0 0 4rem rgba(99, 91, 255, 0.045),
    0 0 0 8rem rgba(99, 91, 255, 0.025);
}

.login-panel {
  display: grid;
  place-items: center;
  padding: clamp(2rem, 6vw, 6rem);
}

.login-card {
  width: 100%;
  max-width: 27rem;
}

.login-card__header h2 {
  margin: 0;
  font-size: 2rem;
  font-weight: 760;
  letter-spacing: -0.045em;
}

.login-card__header p {
  margin: 0.65rem 0 0;
  color: var(--crm-muted);
  font-size: 0.9rem;
}

.login-form {
  display: grid;
  gap: 1.15rem;
  margin-top: 2.25rem;
}

.form-field {
  display: grid;
  gap: 0.45rem;
}

.form-label {
  margin: 0;
  color: #3c4153;
  font-size: 0.82rem;
  font-weight: 700;
}

.input-with-icon {
  position: relative;
}

.input-with-icon > i {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 1rem;
  color: #9a9daf;
  transform: translateY(-50%);
}

.input-with-icon .form-control {
  padding-left: 2.8rem;
}

.form-control,
.form-select {
  min-height: 2.75rem;
  border: 1px solid var(--crm-border);
  border-radius: 0.8rem;
  background-color: var(--crm-surface);
  color: var(--crm-text);
  font-size: 0.9rem;
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(99, 91, 255, 0.52);
  box-shadow: 0 0 0 0.23rem rgba(99, 91, 255, 0.12);
}

.login-form .form-control {
  min-height: 3.45rem;
  border-color: #dedfea;
  background: #fff;
}

.login-submit {
  display: flex;
  min-height: 3.4rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.25rem;
  padding-inline: 1.2rem;
}

.login-card__footer {
  margin: 1.4rem 0 0;
  color: #999dad;
  font-size: 0.75rem;
  text-align: center;
}

.btn {
  border-radius: 0.75rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0;
}

.btn-primary,
.btn-outline-primary:hover,
.btn-outline-primary:focus {
  border-color: var(--crm-accent);
  background: var(--crm-accent);
  box-shadow: none;
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus {
  border-color: var(--crm-accent-strong);
  background: var(--crm-accent-strong);
}

@media (max-width: 991.98px) {
  .app-main {
    margin-left: 0;
    padding: 1.25rem 1rem 3rem;
  }

  .login-page {
    grid-template-columns: 1fr;
  }

  .login-showcase {
    display: none;
  }

  .guest-header {
    position: absolute;
    top: 1rem;
    left: 1rem;
  }

  .app-brand--guest .app-brand__copy strong {
    color: var(--crm-text);
  }

  .app-brand--guest .app-brand__copy small {
    color: var(--crm-muted);
  }

  .login-panel {
    min-height: 100vh;
    padding: 6.5rem 1.25rem 2rem;
  }
}

@media (max-width: 767.98px) {
  .dashboard-hero {
    min-height: 20rem;
    align-items: flex-start;
    flex-direction: column;
    justify-content: flex-end;
  }

  .dashboard-hero__status {
    width: 100%;
  }

  .module-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-note div {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.15rem;
  }
}

/* Product detail */

.page-header__actions form {
  display: inline-flex;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(18rem, 0.95fr);
  gap: 1rem;
  align-items: start;
}

.product-overview,
.product-gallery {
  overflow: hidden;
}

.product-overview__image,
.product-overview__placeholder {
  width: 100%;
  height: clamp(18rem, 38vw, 30rem);
}

.product-overview__image {
  object-fit: cover;
}

.product-overview__placeholder {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.7rem;
  background: #f0f1f6;
  color: var(--crm-muted);
  font-size: 0.78rem;
}

.product-overview__placeholder i {
  font-size: 2rem;
}

.product-overview__body {
  padding: 1.25rem;
}

.product-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.product-meta-grid > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 0.75rem;
  border-radius: 0.8rem;
  background: var(--crm-surface-soft);
}

.product-meta-grid span,
.product-description > span {
  color: var(--crm-muted);
  font-size: 0.68rem;
  font-weight: 650;
}

.product-meta-grid strong {
  overflow: hidden;
  margin-top: 0.2rem;
  color: var(--crm-text);
  font-size: 0.78rem;
  text-overflow: ellipsis;
}

.product-description {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--crm-border);
}

.product-description p {
  margin: 0.35rem 0 0;
  color: #424758;
  font-size: 0.86rem;
}

.product-gallery__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  padding: 1rem;
}

.product-gallery__image {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 0.85rem;
  object-fit: cover;
}

@media (max-width: 991.98px) {
  .product-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .product-meta-grid {
    grid-template-columns: 1fr;
  }
}

/* -------------------------------------------------------------------------- */
/* Dispute triage workspace                                                   */
/* -------------------------------------------------------------------------- */

.disput-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.disput-page-header .page-header__copy p {
  max-width: 36rem;
}

.disput-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(7rem, 1fr));
  overflow: hidden;
  border: 1px solid var(--crm-border);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 0.65rem 2.25rem rgba(31, 38, 65, 0.05);
}

.disput-summary__item {
  position: relative;
  display: flex;
  min-height: 4.75rem;
  flex-direction: column;
  justify-content: center;
  padding: 0.75rem 1rem;
  border-left: 1px solid var(--crm-border);
}

.disput-summary__item:first-child {
  border-left: 0;
}

.disput-summary__item span {
  color: var(--crm-muted);
  font-size: 0.7rem;
  font-weight: 650;
  white-space: nowrap;
}

.disput-summary__item strong {
  margin-top: 0.1rem;
  color: var(--crm-text);
  font-size: 1.35rem;
  font-weight: 780;
  letter-spacing: -0.04em;
}

.disput-summary__item--attention {
  background: linear-gradient(145deg, #fbfaff, #f2f0ff);
}

.disput-summary__item--attention::after {
  position: absolute;
  content: "";
  top: 0.65rem;
  right: 0.65rem;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--crm-accent);
  box-shadow: 0 0 0 0.25rem rgba(99, 91, 255, 0.1);
}

.disput-summary__item--attention strong {
  color: var(--crm-accent-strong);
}

.disput-workspace {
  display: grid;
  grid-template-columns: 15.5rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.disput-filter-panel {
  position: sticky;
  top: 1.5rem;
  padding: 1rem;
}

.disput-filter-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.2rem;
}

.disput-filter-panel__header .page-eyebrow {
  margin-bottom: 0.2rem;
}

.disput-filter-panel__header h2 {
  margin: 0;
  color: var(--crm-text);
  font-size: 1rem;
  font-weight: 760;
  letter-spacing: -0.025em;
}

.filter-reset {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.45rem;
  border-radius: 0.5rem;
  color: var(--crm-muted);
  font-size: 0.68rem;
  font-weight: 700;
  text-decoration: none;
}

.filter-reset:hover,
.filter-reset:focus {
  background: #f1f2f6;
  color: var(--crm-text);
}

.disput-filter-group + .disput-filter-group {
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--crm-border);
}

.disput-filter-group__label {
  display: block;
  margin: 0 0.45rem 0.5rem;
  color: #999dac;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.disput-filter-list {
  display: grid;
  gap: 0.24rem;
}

.disput-filter-option {
  display: flex;
  min-height: 2.55rem;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.58rem;
  border: 1px solid transparent;
  border-radius: 0.72rem;
  color: #656a7b;
  font-size: 0.76rem;
  font-weight: 650;
  text-decoration: none;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.disput-filter-option:hover,
.disput-filter-option:focus {
  border-color: var(--crm-border);
  background: #fafbfc;
  color: var(--crm-text);
}

.disput-filter-option.is-active {
  border-color: rgba(99, 91, 255, 0.14);
  background: var(--crm-accent-soft);
  color: var(--crm-accent-strong);
}

.filter-option-icon {
  display: grid;
  width: 1.55rem;
  height: 1.55rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 0.45rem;
  background: #f1f2f6;
  color: #888d9e;
  font-size: 0.65rem;
}

.filter-option-icon--opened { background: #e8f8fb; color: #209aad; }
.filter-option-icon--review { background: #fff3e8; color: #ce772d; }
.filter-option-icon--clarify { background: #efeeff; color: #635bff; }
.filter-option-icon--resolved { background: #e9f9f3; color: #168663; }
.filter-option-icon--source { background: #eef4ff; color: #5273c8; }

.disput-filter-option.is-active .filter-option-icon {
  background: rgba(99, 91, 255, 0.13);
  color: var(--crm-accent);
}

.disput-queue {
  min-width: 0;
}

.disput-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem;
}

.disput-range-switch {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem;
  border-radius: 0.8rem;
  background: #f3f4f7;
}

.disput-range-switch__item {
  display: flex;
  min-height: 2.4rem;
  align-items: center;
  gap: 0.55rem;
  padding: 0.48rem 0.72rem;
  border-radius: 0.62rem;
  color: #73788a;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
}

.disput-range-switch__item strong {
  display: grid;
  min-width: 1.45rem;
  height: 1.45rem;
  place-items: center;
  padding-inline: 0.3rem;
  border-radius: 0.45rem;
  background: rgba(93, 99, 120, 0.09);
  color: #666b7c;
  font-size: 0.65rem;
}

.disput-range-switch__item.is-active {
  background: #fff;
  color: var(--crm-text);
  box-shadow: 0 0.2rem 0.75rem rgba(31, 38, 65, 0.09);
}

.disput-range-switch__item.is-active strong {
  background: var(--crm-accent-soft);
  color: var(--crm-accent-strong);
}

.disput-search {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.disput-search__control {
  position: relative;
}

.disput-search__control > i {
  position: absolute;
  top: 50%;
  left: 0.8rem;
  color: #9a9eae;
  transform: translateY(-50%);
}

.disput-search__control input {
  width: 10.5rem;
  min-height: 2.55rem;
  padding: 0.45rem 0.75rem 0.45rem 2.25rem;
  border: 1px solid var(--crm-border);
  border-radius: 0.72rem;
  background: #fafbfc;
  color: var(--crm-text);
  font-size: 0.78rem;
  outline: 0;
}

.disput-search__control input:focus {
  border-color: rgba(99, 91, 255, 0.48);
  background: #fff;
  box-shadow: 0 0 0 0.2rem rgba(99, 91, 255, 0.1);
}

.disput-search > .btn {
  min-height: 2.55rem;
  padding-inline: 0.8rem;
}

.active-filter-bar,
.archive-callout {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.7rem;
  padding: 0.65rem 0.8rem;
  border-radius: 0.78rem;
  font-size: 0.72rem;
}

.active-filter-bar {
  border: 1px solid rgba(99, 91, 255, 0.12);
  background: #f4f3ff;
}

.active-filter-bar__label {
  color: #7771bb;
  font-weight: 700;
}

.active-filter-bar__items {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.active-filter-chip {
  padding: 0.28rem 0.5rem;
  border-radius: 0.45rem;
  background: #fff;
  color: var(--crm-accent-strong);
  font-weight: 700;
}

.active-filter-bar__reset {
  color: #7068ca;
  font-weight: 750;
}

.archive-callout {
  border: 1px solid #e6e8ef;
  background: rgba(255, 255, 255, 0.66);
  color: var(--crm-muted);
}

.archive-callout > i {
  color: #999dac;
}

.archive-callout span {
  flex: 1;
}

.archive-callout a {
  color: var(--crm-accent-strong);
  font-weight: 750;
}

.disput-queue-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.25rem 0 0.65rem;
  padding-inline: 0.15rem;
}

.disput-queue-heading > div {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
}

.disput-queue-heading h2 {
  margin: 0;
  color: var(--crm-text);
  font-size: 0.96rem;
  font-weight: 760;
  letter-spacing: -0.02em;
}

.disput-queue-heading span {
  color: #999dac;
  font-size: 0.7rem;
}

.disput-queue-heading__hint {
  text-align: right;
}

.disput-list {
  display: grid;
  gap: 0.55rem;
}

.disput-list-item {
  position: relative;
  display: grid;
  grid-template-columns: 7.4rem minmax(14rem, 1fr) 8.6rem 5.4rem auto;
  min-height: 7.25rem;
  align-items: center;
  gap: 1rem;
  overflow: hidden;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--crm-border);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 0.45rem 1.5rem rgba(31, 38, 65, 0.035);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.disput-list-item::before {
  position: absolute;
  content: "";
  inset: 0 auto 0 0;
  width: 0.2rem;
  background: #d6d8e1;
}

.disput-list-item--opened::before { background: #39b7ca; }
.disput-list-item--review::before { background: #efa157; }
.disput-list-item--clarify::before { background: #756df7; }
.disput-list-item--resolved::before,
.disput-list-item--closed::before { background: #3fc29a; }

.disput-list-item:hover {
  transform: translateY(-0.1rem);
  border-color: rgba(99, 91, 255, 0.2);
  box-shadow: 0 0.85rem 2rem rgba(31, 38, 65, 0.075);
}

.disput-list-item.is-unread {
  border-color: rgba(99, 91, 255, 0.22);
  background: linear-gradient(100deg, #fbfaff, #fff 45%);
  box-shadow: 0 0.65rem 1.8rem rgba(74, 64, 190, 0.07);
}

.disput-list-item.is-unread::before {
  width: 0.28rem;
  background: var(--crm-accent);
}

.disput-list-item__preview {
  display: grid;
  width: 7.4rem;
  height: 5.75rem;
  place-items: center;
  overflow: hidden;
  border-radius: 0.72rem;
  background: #f0f1f5;
  color: #aaaebb;
}

.disput-list-item__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.disput-list-item__preview > i {
  font-size: 1.25rem;
}

.disput-list-item__main {
  min-width: 0;
}

.disput-list-item__topline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.disput-list-item__topline > strong {
  color: var(--crm-text);
  font-size: 0.74rem;
  font-weight: 780;
}

.disput-list-item .badge {
  padding: 0.3rem 0.48rem;
  border: 0;
  border-radius: 0.42rem;
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0;
}

.disput-list-item h3 {
  overflow: hidden;
  margin: 0.45rem 0 0;
  color: var(--crm-text);
  font-size: 0.94rem;
  font-weight: 740;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.unread-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--crm-accent-strong);
  font-size: 0.62rem;
  font-weight: 780;
}

.unread-dot {
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: var(--crm-accent);
  box-shadow: 0 0 0 0.2rem rgba(99, 91, 255, 0.1);
}

.disput-list-item__context {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.45rem;
  color: var(--crm-muted);
  font-size: 0.67rem;
}

.disput-list-item__context span {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 0.3rem;
}

.disput-list-item__context i {
  color: #999dac;
}

.disput-list-item__activity {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.35;
}

.disput-list-item__activity span {
  color: #555a6d;
  font-size: 0.72rem;
  font-weight: 720;
}

.disput-list-item__activity time {
  margin-top: 0.15rem;
  color: #9a9ead;
  font-size: 0.65rem;
}

.disput-list-item__comments {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.32rem;
  color: #8e92a2;
}

.disput-list-item__comments i {
  font-size: 0.82rem;
}

.disput-list-item__comments strong {
  color: #555a6d;
  font-size: 0.78rem;
}

.disput-list-item__comments span {
  width: 100%;
  padding-left: 1.15rem;
  font-size: 0.61rem;
}

.disput-list-item__open {
  display: inline-flex;
  min-height: 2.4rem;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 0.72rem;
  border-radius: 0.7rem;
  background: #f3f2ff;
  color: var(--crm-accent-strong);
  font-size: 0.72rem;
  font-weight: 760;
  text-decoration: none;
}

.disput-list-item__open:hover,
.disput-list-item__open:focus {
  background: var(--crm-accent);
  color: #fff;
}

.disput-pagination {
  margin-top: 0.65rem;
  padding-inline: 0;
  border: 0;
}

.disput-empty {
  margin-top: 1rem;
}

@media (max-width: 1399.98px) {
  .disput-list-item {
    grid-template-columns: 6.5rem minmax(12rem, 1fr) 7.5rem auto;
  }

  .disput-list-item__preview {
    width: 6.5rem;
  }

  .disput-list-item__comments {
    display: none;
  }
}

@media (max-width: 1199.98px) {
  .disput-page-header {
    align-items: stretch;
    flex-direction: column;
    gap: 1rem;
  }

  .disput-summary {
    width: 100%;
  }

  .disput-workspace {
    grid-template-columns: 13.75rem minmax(0, 1fr);
  }

  .disput-list-item {
    grid-template-columns: 5.25rem minmax(10rem, 1fr) 6.8rem auto;
    gap: 0.75rem;
  }

  .disput-list-item__preview {
    width: 5.25rem;
    height: 4.75rem;
  }

  .disput-list-item__open span {
    display: none;
  }
}

@media (max-width: 991.98px) {
  .disput-workspace {
    grid-template-columns: 1fr;
  }

  .disput-filter-panel {
    position: static;
  }

  .disput-filter-panel__header {
    margin-bottom: 0.9rem;
  }

  .disput-filter-panel {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(0, 0.65fr);
    gap: 1rem;
    align-items: start;
  }

  .disput-filter-group + .disput-filter-group {
    margin: 0;
    padding: 0;
    border: 0;
  }

  .disput-filter-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .disput-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .disput-summary__item {
    min-width: 0;
    padding: 0.65rem;
  }

  .disput-summary__item span {
    white-space: normal;
  }

  .disput-filter-panel {
    grid-template-columns: 1fr;
  }

  .disput-filter-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .disput-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .disput-range-switch {
    width: 100%;
  }

  .disput-range-switch__item {
    flex: 1;
    justify-content: center;
  }

  .disput-search {
    width: 100%;
  }

  .disput-search__control {
    flex: 1;
  }

  .disput-search__control input {
    width: 100%;
  }

  .active-filter-bar,
  .archive-callout {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .archive-callout span {
    flex-basis: calc(100% - 2rem);
  }

  .archive-callout a {
    margin-left: 1.65rem;
  }

  .disput-queue-heading__hint {
    display: none;
  }

  .disput-list-item {
    grid-template-columns: 4.5rem minmax(0, 1fr) auto;
    min-height: auto;
    align-items: start;
    padding: 0.7rem;
  }

  .disput-list-item__preview {
    width: 4.5rem;
    height: 4.5rem;
  }

  .disput-list-item__activity {
    grid-column: 2;
  }

  .disput-list-item__open {
    grid-column: 3;
    grid-row: 1 / span 2;
    width: 2.4rem;
    padding: 0;
  }
}

@media (max-width: 479.98px) {
  .disput-summary__item span {
    font-size: 0.62rem;
  }

  .disput-summary__item strong {
    font-size: 1.1rem;
  }

  .disput-filter-list {
    grid-template-columns: 1fr;
  }

  .disput-list-item {
    grid-template-columns: 3.6rem minmax(0, 1fr) 2.25rem;
    gap: 0.6rem;
  }

  .disput-list-item__preview {
    width: 3.6rem;
    height: 3.6rem;
  }

  .disput-list-item__topline {
    gap: 0.3rem;
  }

  .unread-badge {
    width: 100%;
  }
}

/* Balance workspace */

.balance-layout {
  display: grid;
  grid-template-columns: minmax(15rem, 0.58fr) minmax(0, 1.42fr);
  gap: 1rem;
  align-items: start;
}

.customer-summary {
  position: sticky;
  top: 1.5rem;
  padding: 1.35rem;
  text-align: center;
}

.customer-summary__avatar {
  width: 5rem;
  height: 5rem;
  margin: 0 auto;
  border-radius: 1.35rem;
  object-fit: cover;
}

.customer-summary__avatar--fallback {
  display: grid;
  place-items: center;
  background: var(--crm-accent-soft);
  color: var(--crm-accent);
  font-size: 1.35rem;
  font-weight: 800;
}

.customer-summary h2 {
  overflow-wrap: anywhere;
  margin: 1rem 0 0.25rem;
  font-size: 1rem;
  font-weight: 740;
}

.customer-summary > p {
  margin: 0;
  color: var(--crm-muted);
  font-size: 0.72rem;
}

.customer-summary__stats {
  display: grid;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.customer-summary__stats > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--crm-border);
}

.customer-summary__stats span {
  color: var(--crm-muted);
  font-size: 0.72rem;
}

.customer-summary__stats strong {
  color: var(--crm-text);
  font-size: 0.82rem;
}

.balance-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.balance-form {
  padding: 1.25rem;
}

.balance-form__header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}

.balance-form__icon {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 0.85rem;
  font-size: 1rem;
}

.balance-form--add .balance-form__icon {
  background: #e9f9f3;
  color: #168663;
}

.balance-form--deduct .balance-form__icon {
  background: #ffedf0;
  color: #cf4858;
}

.balance-form__header h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 740;
}

.balance-form__header p {
  margin: 0.15rem 0 0;
  color: var(--crm-muted);
  font-size: 0.7rem;
}

.balance-form form {
  display: grid;
  gap: 0.85rem;
}

.balance-form form .mb-3 {
  margin: 0 !important;
}

.balance-form form label {
  margin-bottom: 0.35rem;
  color: #3c4153;
  font-size: 0.78rem;
  font-weight: 700;
}

.balance-history {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 1rem;
}

.history-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--crm-border);
  border-radius: 0.9rem;
  background: #fff;
}

.history-item > i {
  display: grid;
  width: 2.2rem;
  height: 2.2rem;
  place-items: center;
  border-radius: 0.7rem;
}

.history-item--success > i { background: #e9f9f3; color: #168663; }
.history-item--danger > i { background: #ffedf0; color: #cf4858; }

.history-item > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.history-item strong {
  font-size: 0.82rem;
}

.history-item span,
.history-item time {
  overflow: hidden;
  color: var(--crm-muted);
  font-size: 0.68rem;
  text-overflow: ellipsis;
}

@media (max-width: 1199.98px) {
  .balance-layout {
    grid-template-columns: 1fr;
  }

  .customer-summary {
    position: static;
  }
}

@media (max-width: 767.98px) {
  .balance-actions-grid,
  .balance-history {
    grid-template-columns: 1fr;
  }
}

/* Detail pages and editors */

.profile-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.profile-metric {
  display: flex;
  min-height: 7rem;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.15rem;
  border: 1px solid var(--crm-border);
  border-radius: 1rem;
  background: linear-gradient(145deg, #fff, #fafaff);
}

.profile-metric span {
  color: var(--crm-muted);
  font-size: 0.75rem;
  font-weight: 650;
}

.profile-metric strong {
  color: var(--crm-text);
  font-size: 1.6rem;
  font-weight: 760;
  letter-spacing: -0.045em;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}

.detail-section {
  overflow: hidden;
}

.detail-section__header {
  padding: 1.2rem 1.15rem;
  border-bottom: 1px solid var(--crm-border);
}

.detail-section__header h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 740;
  letter-spacing: -0.02em;
}

.detail-section__header p {
  margin: 0.2rem 0 0;
  color: var(--crm-muted);
  font-size: 0.73rem;
}

.detail-section .pagination-wrap {
  padding: 0.8rem 1rem;
}

.compact-empty {
  padding: 3rem 1rem;
  color: var(--crm-muted);
  font-size: 0.8rem;
  text-align: center;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

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

.form-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.form-gallery .form-preview {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.info-callout {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: 1rem;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(99, 91, 255, 0.13);
  border-radius: 1rem;
  background: var(--crm-accent-soft);
  color: var(--crm-accent-strong);
}

.info-callout > i {
  margin-top: 0.1rem;
  font-size: 1.1rem;
}

.info-callout strong {
  font-size: 0.82rem;
}

.info-callout p {
  margin: 0.2rem 0 0;
  color: #6f68c1;
  font-size: 0.75rem;
}

.upload-zone {
  display: grid;
  min-height: 14rem;
  place-items: center;
  align-content: center;
  padding: 1.5rem;
  border: 1px dashed rgba(99, 91, 255, 0.32);
  border-radius: 1rem;
  background: #fafaff;
  text-align: center;
}

.upload-zone > i {
  display: grid;
  width: 3.5rem;
  height: 3.5rem;
  place-items: center;
  margin-bottom: 0.75rem;
  border-radius: 1rem;
  background: var(--crm-accent-soft);
  color: var(--crm-accent);
  font-size: 1.4rem;
}

.upload-zone .mb-3 {
  width: 100%;
}

.news-preview {
  display: grid;
  grid-template-columns: minmax(16rem, 0.75fr) minmax(0, 1.25fr);
  overflow: hidden;
}

.news-preview__media {
  min-height: 28rem;
  background: #eef0f5;
}

.news-preview__media img,
.news-preview__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-preview__body {
  padding: clamp(1.5rem, 4vw, 3rem);
  color: #3f4455;
  font-size: 0.95rem;
}

@media (max-width: 991.98px) {
  .detail-grid,
  .form-grid,
  .news-preview {
    grid-template-columns: 1fr;
  }

  .news-preview__media {
    min-height: 18rem;
  }
}

@media (max-width: 767.98px) {
  .profile-metrics {
    grid-template-columns: 1fr;
  }

  .profile-metric {
    min-height: 5.6rem;
  }

  .form-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* -------------------------------------------------------------------------- */
/* Shared working surfaces                                                    */
/* -------------------------------------------------------------------------- */

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.page-header__copy h1 {
  overflow-wrap: anywhere;
  margin: 0;
  color: var(--crm-text);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 760;
  letter-spacing: -0.055em;
  line-height: 1.05;
}

.page-header__copy p {
  margin: 0.65rem 0 0;
  color: var(--crm-muted);
  font-size: 0.9rem;
}

.page-header__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
}

.surface-card,
.app-main .card {
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius-lg);
  background: var(--crm-surface);
  box-shadow: 0 0.65rem 2.25rem rgba(31, 38, 65, 0.055);
}

.app-main .card:hover {
  transform: none;
  border-color: var(--crm-border);
  box-shadow: 0 0.65rem 2.25rem rgba(31, 38, 65, 0.055);
}

.app-main .card-header {
  padding: 1.2rem 1.3rem 0.75rem;
  border: 0;
  background: transparent;
}

.app-main .card-body {
  padding: 1.25rem;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.metric-tile {
  display: flex;
  min-height: 5rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--crm-border);
  border-radius: 1rem;
  background: linear-gradient(135deg, #fff, #fafaff);
}

.metric-tile span {
  color: var(--crm-muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.metric-tile strong {
  color: var(--crm-text);
  font-size: 1.25rem;
  font-weight: 760;
  letter-spacing: -0.035em;
}

.search-toolbar {
  margin-bottom: 1rem;
  padding: 0.8rem;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.search-control {
  position: relative;
  flex: 1;
}

.search-control > i {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 1rem;
  color: #9a9daf;
  transform: translateY(-50%);
}

.search-control .form-control {
  padding-left: 2.75rem;
  border-color: transparent;
  background: var(--crm-surface-soft);
}

.search-control .form-control:focus {
  border-color: rgba(99, 91, 255, 0.42);
  background: #fff;
}

.table-surface {
  overflow: hidden;
}

.crm-table {
  --bs-table-bg: transparent;
  --bs-table-striped-bg: transparent;
  --bs-table-hover-bg: #fafaff;
  color: var(--crm-text);
  font-size: 0.84rem;
}

.crm-table thead th {
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--crm-border);
  background: #fafbfc;
  color: #858a9b;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  white-space: nowrap;
}

.crm-table tbody td {
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid #eff0f5;
  color: #454a5d;
  vertical-align: middle;
}

.crm-table tbody tr:last-child td {
  border-bottom: 0;
}

.crm-table tbody tr:hover {
  background: #fafaff;
}

.table-identity {
  display: flex;
  min-width: 12rem;
  align-items: center;
  gap: 0.75rem;
}

.table-identity > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.table-identity strong {
  overflow: hidden;
  color: var(--crm-text);
  font-size: 0.85rem;
  font-weight: 720;
  text-overflow: ellipsis;
}

.table-identity small {
  margin-top: 0.12rem;
  color: #9a9ead;
  font-size: 0.69rem;
}

.table-avatar {
  width: 2.6rem;
  height: 2.6rem;
  flex: 0 0 auto;
  border-radius: 0.8rem;
  object-fit: cover;
}

.table-avatar--fallback {
  display: grid;
  place-items: center;
  background: var(--crm-accent-soft);
  color: var(--crm-accent);
  font-size: 0.8rem;
  font-weight: 800;
}

.telegram-link {
  color: #258cba;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.table-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
}

.table-actions form {
  display: inline-flex;
}

.table-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.15rem;
  padding: 0.35rem 0.65rem;
  white-space: nowrap;
}

.btn-outline-primary {
  border-color: rgba(99, 91, 255, 0.28);
  color: var(--crm-accent-strong);
}

.btn-outline-secondary {
  border-color: #dfe1e8;
  color: #606577;
}

.btn-outline-danger {
  border-color: rgba(233, 92, 107, 0.25);
  color: #d84c5b;
}

.btn-outline-success {
  border-color: rgba(32, 180, 134, 0.25);
  color: #158665;
}

.btn-outline-danger:hover,
.btn-outline-danger:focus {
  border-color: var(--crm-danger);
  background: var(--crm-danger);
  color: #fff;
}

.btn-outline-success:hover,
.btn-outline-success:focus {
  border-color: var(--crm-success);
  background: var(--crm-success);
  color: #fff;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.36rem 0.65rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}

.status-badge--success { background: #e9f9f3; color: #168663; }
.status-badge--danger { background: #ffedf0; color: #cf4858; }
.status-badge--warning { background: #fff3e8; color: #c16c25; }
.status-badge--info { background: #efeeff; color: #554beb; }

.pagination-wrap {
  display: flex;
  justify-content: flex-end;
  padding: 1rem 1.1rem;
  border-top: 1px solid var(--crm-border);
}

.pagination-wrap:empty {
  display: none;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0;
}

.pagination .page-item .page-link {
  display: grid;
  min-width: 2.1rem;
  height: 2.1rem;
  place-items: center;
  padding: 0.35rem;
  border: 1px solid var(--crm-border);
  border-radius: 0.65rem;
  background: #fff;
  color: #656a7c;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: none;
}

.pagination .page-item.active .page-link {
  border-color: var(--crm-accent);
  background: var(--crm-accent);
  color: #fff;
  box-shadow: none;
}

.empty-state {
  display: grid;
  min-height: 18rem;
  place-items: center;
  align-content: center;
  padding: 2rem;
  border: 1px dashed #d9dbe5;
  border-radius: var(--crm-radius-lg);
  background: rgba(255, 255, 255, 0.55);
  text-align: center;
}

.empty-state > i {
  display: grid;
  width: 3.5rem;
  height: 3.5rem;
  place-items: center;
  margin-bottom: 1rem;
  border-radius: 1rem;
  background: var(--crm-accent-soft);
  color: var(--crm-accent);
  font-size: 1.4rem;
}

.empty-state h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 740;
}

.empty-state p {
  margin: 0.35rem 0 0;
  color: var(--crm-muted);
  font-size: 0.82rem;
}

/* Campaigns */

.campaign-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.campaign-card {
  overflow: hidden;
}

.campaign-card__media {
  height: 12rem;
  overflow: hidden;
  background: #eef0f5;
}

.campaign-card__media img,
.campaign-card__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.campaign-card__body {
  padding: 1.15rem;
}

.campaign-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: #9296a5;
  font-size: 0.7rem;
}

.campaign-card__body > p {
  min-height: 4.2rem;
  margin: 1rem 0;
  color: #3f4455;
  font-size: 0.85rem;
}

.campaign-progress {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: #fff3e8;
  color: #a85c1f;
  font-size: 0.72rem;
}

.campaign-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.campaign-stat {
  display: flex;
  flex-direction: column;
  padding: 0.7rem;
  border-radius: 0.75rem;
  background: var(--crm-surface-soft);
}

.campaign-stat span {
  color: var(--crm-muted);
  font-size: 0.65rem;
}

.campaign-stat strong {
  margin-top: 0.15rem;
  font-size: 1.05rem;
}

.editor-layout {
  display: grid;
  grid-template-columns: minmax(16rem, 0.72fr) minmax(0, 1.28fr);
  gap: 1rem;
  align-items: start;
}

.editor-guide,
.form-surface {
  padding: 1.35rem;
}

.editor-guide {
  position: sticky;
  top: 1.5rem;
}

.editor-guide__icon {
  display: grid;
  width: 2.8rem;
  height: 2.8rem;
  place-items: center;
  border-radius: 0.85rem;
  background: var(--crm-accent-soft);
  color: var(--crm-accent);
  font-size: 1.15rem;
}

.editor-guide h2 {
  margin: 1rem 0 0.45rem;
  font-size: 1rem;
  font-weight: 740;
}

.editor-guide p {
  margin: 0;
  color: var(--crm-muted);
  font-size: 0.8rem;
}

.editor-guide__image {
  width: 100%;
  margin-top: 1rem;
  border: 1px solid var(--crm-border);
  border-radius: 0.9rem;
}

.form-surface form {
  display: grid;
  gap: 1rem;
}

.form-surface .mb-3,
.form-surface .input {
  margin: 0 !important;
}

.form-surface label {
  margin-bottom: 0.38rem;
  color: #3c4153;
  font-size: 0.8rem;
  font-weight: 700;
}

.form-surface .form-text,
.form-surface .form-text.text-muted {
  color: var(--crm-muted) !important;
  font-size: 0.72rem;
}

.form-surface textarea.form-control {
  min-height: 9rem;
  resize: vertical;
}

.form-check-panel {
  padding: 0.85rem 1rem;
  border: 1px solid rgba(99, 91, 255, 0.13);
  border-radius: 0.8rem;
  background: var(--crm-accent-soft);
}

.form-preview {
  width: min(100%, 22rem);
  border-radius: 0.9rem;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding-top: 0.5rem;
}

/* Existing disputes and loyalty workflows, aligned with the new shell */

.disputs-dashboard,
.disput-show,
.bonus-requests-page {
  padding: 0;
}

.disputs-dashboard > .container,
.disput-show > .container,
.bonus-requests-page > .container {
  padding: 0 !important;
}

.disputs-dashboard .page-header {
  margin-bottom: 1.75rem;
}

.disputs-dashboard .filter-card {
  position: sticky;
  top: 1.5rem;
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius-lg);
  box-shadow: 0 0.65rem 2.25rem rgba(31, 38, 65, 0.055);
}

.disputs-dashboard .filter-card h5 {
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.disputs-dashboard .filter-card h6 {
  margin-top: 1rem;
  font-size: 0.66rem !important;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.disputs-dashboard .filter-card .btn,
.disputs-dashboard .btn-group .btn {
  border-radius: 0.7rem;
}

.disputs-dashboard .disput-card {
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius-lg);
  box-shadow: 0 0.65rem 2.25rem rgba(31, 38, 65, 0.055);
}

.disputs-dashboard .disput-card.highlighted {
  border-color: rgba(245, 158, 74, 0.35);
  background: linear-gradient(145deg, #fffcf8, #fff);
  box-shadow: 0 0.65rem 2.25rem rgba(31, 38, 65, 0.055);
}

.disputs-dashboard .disput-preview,
.disput-show__attachment {
  border-radius: 0.95rem;
}

.bonus-requests-hero {
  min-height: 13rem;
  padding: clamp(1.5rem, 4vw, 2.6rem);
  border: 1px solid rgba(99, 91, 255, 0.11);
  border-radius: var(--crm-radius-xl);
  background:
    radial-gradient(circle at 87% 25%, rgba(99, 91, 255, 0.2), transparent 24%),
    linear-gradient(135deg, #fff, #f7f6ff);
  box-shadow: var(--crm-shadow);
}

.bonus-requests-hero h1 {
  color: var(--crm-text);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 760;
  letter-spacing: -0.055em;
}

.bonus-requests-eyebrow {
  color: var(--crm-accent);
  font-weight: 800;
}

.bonus-requests-hero__count {
  border-color: rgba(99, 91, 255, 0.14);
  border-radius: 1rem;
}

.bonus-requests-hero__count strong,
.bonus-request-stat--accent strong {
  color: var(--crm-accent);
}

.bonus-request-card__avatar {
  background: var(--crm-accent-soft);
  color: var(--crm-accent);
}

.bonus-request-card__identity h2,
.bonus-request-stat strong {
  color: var(--crm-text);
}

.bonus-request-stat--accent {
  border-color: rgba(99, 91, 255, 0.12);
  background: var(--crm-accent-soft);
}

/* Dispute case workspace */

.case-breadcrumb {
  margin-bottom: 0.85rem;
}

.case-breadcrumb a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--crm-muted);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 160ms ease, transform 160ms ease;
}

.case-breadcrumb a:hover {
  color: var(--crm-accent);
  transform: translateX(-0.15rem);
}

.case-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 1.35rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 72% -40%, rgba(99, 91, 255, 0.13), transparent 38%),
    #fff;
}

.case-header__identity {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 1rem;
}

.case-header__icon {
  display: grid;
  place-items: center;
  flex: 0 0 3.35rem;
  width: 3.35rem;
  height: 3.35rem;
  border-radius: 1.05rem;
  background: linear-gradient(145deg, var(--crm-accent), #8d83ff);
  box-shadow: 0 0.65rem 1.5rem rgba(99, 91, 255, 0.22);
  color: #fff;
  font-size: 1.35rem;
}

.case-header__title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0.15rem 0 0.35rem;
}

.case-header__title h1 {
  margin: 0;
  color: var(--crm-text);
  font-size: clamp(1.55rem, 2.5vw, 2.15rem);
  font-weight: 780;
  letter-spacing: -0.045em;
}

.case-header__title .badge {
  padding: 0.44rem 0.62rem;
  border: 1px solid rgba(31, 38, 65, 0.07);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
}

.case-header__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  color: var(--crm-muted);
  font-size: 0.81rem;
  font-weight: 600;
}

.case-header__meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.case-header__meta i {
  color: var(--crm-accent);
}

.case-status-form {
  display: flex;
  align-items: flex-end;
  flex: 0 0 auto;
  gap: 0.6rem;
  padding: 0.7rem;
  border: 1px solid var(--crm-border);
  border-radius: 0.95rem;
  background: rgba(248, 249, 252, 0.88);
}

.case-status-form__field {
  min-width: 10.5rem;
}

.case-status-form label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--crm-muted);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.case-status-form .form-select,
.case-status-form .btn {
  min-height: 2.55rem;
  border-radius: 0.72rem;
}

.case-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22rem;
  align-items: start;
  gap: 1rem;
  margin-top: 1rem;
}

.case-main,
.case-sidebar {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1rem;
}

.case-sidebar {
  position: sticky;
  top: 1.5rem;
}

.conversation-card {
  overflow: hidden;
}

.conversation-card__header,
.case-history__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--crm-border);
}

.conversation-card__header h2,
.case-card-heading h2,
.case-history__header h2 {
  margin: 0;
  color: var(--crm-text);
  font-size: 1.02rem;
  font-weight: 780;
  letter-spacing: -0.025em;
}

.conversation-card__header p {
  margin: 0.2rem 0 0;
  color: var(--crm-muted);
  font-size: 0.8rem;
}

.conversation-state {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex: 0 0 auto;
  padding: 0.38rem 0.62rem;
  border-radius: 999px;
  background: #eef1f6;
  color: var(--crm-muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.conversation-state > span {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0.2rem currentColor;
  opacity: 0.72;
}

.conversation-state.is-open {
  background: #ebfaf2;
  color: #15865b;
}

.conversation-state.is-closed {
  background: #f1f2f5;
  color: #687083;
}

.conversation-thread {
  display: flex;
  min-height: 17rem;
  max-height: 36rem;
  flex-direction: column;
  gap: 1rem;
  padding: 1.35rem;
  overflow-y: auto;
  background:
    linear-gradient(rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.68)),
    radial-gradient(circle at 1px 1px, rgba(76, 83, 108, 0.12) 1px, transparent 0);
  background-size: auto, 22px 22px;
  scrollbar-color: rgba(99, 91, 255, 0.26) transparent;
  scrollbar-width: thin;
}

.conversation-message {
  display: flex;
  align-items: flex-end;
  align-self: flex-start;
  width: min(82%, 43rem);
  gap: 0.65rem;
}

.conversation-message.is-outgoing {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.conversation-message__avatar {
  display: grid;
  place-items: center;
  flex: 0 0 2.15rem;
  width: 2.15rem;
  height: 2.15rem;
  border: 1px solid rgba(99, 91, 255, 0.12);
  border-radius: 0.72rem;
  background: var(--crm-accent-soft);
  color: var(--crm-accent);
  font-size: 0.82rem;
  font-weight: 850;
}

.conversation-message.is-outgoing .conversation-message__avatar {
  border-color: rgba(99, 91, 255, 0.18);
  background: var(--crm-accent);
  color: #fff;
}

.conversation-message__content {
  min-width: 0;
}

.conversation-message__meta {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.28rem 0.2rem;
  color: var(--crm-muted);
  font-size: 0.74rem;
}

.conversation-message.is-outgoing .conversation-message__meta {
  justify-content: flex-end;
  margin-inline: 0 0.2rem;
}

.conversation-message__meta strong {
  color: var(--crm-text);
  font-weight: 800;
}

.conversation-message__bubble {
  position: relative;
  padding: 0.85rem 1rem;
  border: 1px solid var(--crm-border);
  border-radius: 0.35rem 1rem 1rem;
  background: #fff;
  box-shadow: 0 0.45rem 1.4rem rgba(31, 38, 65, 0.055);
  color: var(--crm-text);
  font-size: 0.9rem;
  line-height: 1.62;
  overflow-wrap: anywhere;
}

.conversation-message.is-outgoing .conversation-message__bubble {
  border-color: transparent;
  border-radius: 1rem 0.35rem 1rem 1rem;
  background: linear-gradient(145deg, #6d64ff, #5950dc);
  box-shadow: 0 0.65rem 1.5rem rgba(99, 91, 255, 0.18);
  color: #fff;
}

.conversation-message__bubble p:last-child {
  margin-bottom: 0;
}

.conversation-message__attachments {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.conversation-message__attachments img {
  width: 100%;
  min-height: 7rem;
  max-height: 17rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.72rem;
  background: #f1f2f7;
  object-fit: cover;
}

.conversation-file {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--crm-border);
  border-radius: 0.72rem;
  background: #f8f9fc;
  color: var(--crm-text);
  font-size: 0.78rem;
  font-weight: 750;
  text-decoration: none;
}

.conversation-file i {
  flex: 0 0 auto;
  color: var(--crm-accent);
  font-size: 1rem;
}

.conversation-file span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-message.is-outgoing .conversation-file {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.conversation-message.is-outgoing .conversation-file i {
  color: #fff;
}

.conversation-empty {
  display: grid;
  place-items: center;
  flex: 1;
  color: var(--crm-muted);
  text-align: center;
}

.conversation-empty i {
  margin-bottom: 0.5rem;
  color: var(--crm-accent);
  font-size: 2rem;
}

.reply-composer {
  padding: 1.1rem 1.25rem 1.25rem;
  border-top: 1px solid var(--crm-border);
  background: #fff;
}

.reply-composer__label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--crm-text);
  font-size: 0.84rem;
  font-weight: 800;
}

.reply-composer textarea {
  display: block;
  width: 100%;
  min-height: 7rem;
  padding: 0.85rem 0.95rem;
  resize: vertical;
  border: 1px solid var(--crm-border);
  border-radius: 0.85rem;
  outline: none;
  background: #fafbfc;
  color: var(--crm-text);
  font-size: 0.9rem;
  line-height: 1.55;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.reply-composer textarea:focus {
  border-color: rgba(99, 91, 255, 0.62);
  background: #fff;
  box-shadow: 0 0 0 0.22rem rgba(99, 91, 255, 0.1);
}

.reply-composer__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.75rem;
}

.reply-attachment {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  color: var(--crm-muted);
}

.reply-attachment > i {
  color: var(--crm-accent);
  font-size: 1.15rem;
}

.reply-attachment label,
.reply-attachment span {
  display: block;
}

.reply-attachment label {
  color: var(--crm-text);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.reply-attachment span {
  font-size: 0.7rem;
}

.reply-attachment input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  cursor: pointer;
}

.conversation-closed {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--crm-border);
  background: #f8f9fb;
  color: var(--crm-muted);
}

.conversation-closed i {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.7rem;
  background: #eceef3;
}

.conversation-closed strong,
.conversation-closed span {
  display: block;
}

.conversation-closed strong {
  color: var(--crm-text);
  font-size: 0.84rem;
}

.conversation-closed span {
  margin-top: 0.1rem;
  font-size: 0.76rem;
}

.case-customer-card,
.case-order-card {
  padding: 1.1rem;
}

.case-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.case-card-heading > i {
  color: var(--crm-accent);
  font-size: 1.25rem;
}

.case-customer-card__avatar {
  display: grid;
  place-items: center;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 0.9rem;
  background: linear-gradient(145deg, var(--crm-accent), #8d83ff);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 850;
  box-shadow: 0 0.55rem 1.2rem rgba(99, 91, 255, 0.18);
}

.case-detail-list {
  margin: 0;
}

.case-detail-list > div {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 0.6rem;
  padding: 0.66rem 0;
  border-top: 1px solid var(--crm-border);
}

.case-detail-list dt {
  color: var(--crm-muted);
  font-size: 0.75rem;
  font-weight: 650;
}

.case-detail-list dd {
  margin: 0;
  color: var(--crm-text);
  font-size: 0.8rem;
  font-weight: 730;
  overflow-wrap: anywhere;
  text-align: right;
}

.case-customer-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  margin-top: 0.9rem;
}

.case-customer-stat {
  padding: 0.7rem 0.35rem;
  border: 1px solid var(--crm-border);
  border-radius: 0.78rem;
  background: #fafbfc;
  text-align: center;
}

.case-customer-stat strong,
.case-customer-stat span {
  display: block;
}

.case-customer-stat strong {
  color: var(--crm-text);
  font-size: 1rem;
  font-weight: 820;
}

.case-customer-stat span {
  margin-top: 0.1rem;
  color: var(--crm-muted);
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.25;
}

.case-customer-stat.is-alert {
  border-color: rgba(231, 104, 87, 0.18);
  background: #fff5f3;
}

.case-customer-stat.is-alert strong {
  color: #cc5546;
}

.case-order-card__cover {
  display: block;
  width: 100%;
  max-height: 12rem;
  margin-bottom: 0.9rem;
  border-radius: 0.9rem;
  background: #f1f2f7;
  object-fit: cover;
}

.case-order-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.case-order-gallery img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 0.68rem;
  background: #f1f2f7;
  object-fit: cover;
}

.case-history {
  margin-top: 1rem;
  overflow: hidden;
}

.case-history__header > span {
  color: var(--crm-muted);
  font-size: 0.76rem;
  font-weight: 700;
}

@media (max-width: 1199.98px) {
  .campaign-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .case-workspace {
    grid-template-columns: minmax(0, 1fr) 19rem;
  }

  .table-actions .btn span {
    display: none;
  }
}

@media (max-width: 991.98px) {
  .editor-layout {
    grid-template-columns: 1fr;
  }

  .editor-guide {
    position: static;
  }

  .disputs-dashboard .filter-card {
    position: static;
  }

  .case-workspace {
    grid-template-columns: 1fr;
  }

  .case-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .page-header {
    align-items: stretch;
    flex-direction: column;
  }

  .page-header__actions {
    justify-content: stretch;
  }

  .page-header__actions .btn {
    flex: 1 1 auto;
  }

  .metric-row,
  .campaign-grid {
    grid-template-columns: 1fr;
  }

  .search-form {
    align-items: stretch;
    flex-direction: column;
  }

  .search-form .btn {
    width: 100%;
  }

  .table-surface {
    border-radius: 1rem;
  }

  .crm-table thead th,
  .crm-table tbody td {
    padding-inline: 0.85rem;
  }

  .bonus-requests-hero {
    min-height: auto;
  }

  .case-header {
    align-items: stretch;
    flex-direction: column;
  }

  .case-status-form {
    width: 100%;
  }

  .case-status-form__field {
    flex: 1;
  }

  .conversation-card__header,
  .case-history__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .conversation-thread {
    min-height: 14rem;
    padding: 1rem 0.8rem;
  }

  .conversation-message {
    width: 94%;
  }

  .conversation-message__avatar {
    flex-basis: 1.95rem;
    width: 1.95rem;
    height: 1.95rem;
  }

  .reply-composer__footer {
    align-items: stretch;
    flex-direction: column;
  }

  .reply-composer__footer .btn {
    width: 100%;
  }

  .case-sidebar {
    display: flex;
  }
}

@media (max-width: 479.98px) {
  .case-header__icon {
    display: none;
  }

  .case-status-form {
    align-items: stretch;
    flex-direction: column;
  }

  .conversation-state {
    white-space: nowrap;
  }

  .conversation-message__attachments {
    grid-template-columns: 1fr;
  }

  .case-detail-list > div {
    grid-template-columns: 1fr;
    gap: 0.18rem;
  }

  .case-detail-list dd {
    text-align: left;
  }
}
