:root {
  --space-0: 0;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-7: 1.75rem;
  --space-8: 2rem;

  --gi-primary: var(--bs-primary, #1d426f);
  --gi-warning: var(--bs-warning, #f59f00);
  --gi-danger: var(--bs-danger, #dc3545);
  --gi-primary-rgb: 29, 66, 111;
  --gi-warning-rgb: 245, 159, 0;
  --gi-danger-rgb: 220, 53, 69;
  --gi-primary-50: rgba(var(--gi-primary-rgb), 0.08);
  --gi-warning-50: rgba(var(--gi-warning-rgb), 0.1);
  --gi-danger-50: rgba(var(--gi-danger-rgb), 0.1);
  --gi-border: #e9eef5;
  --gi-muted: #64748b;
  --gi-surface: #ffffff;
}

.coupon-page {
  position: relative;
  --gi-gradient-start: #f8fafc;
  --gi-gradient-end: #e0f2fe;
  background: linear-gradient(135deg, var(--gi-gradient-start) 0%, var(--gi-gradient-end) 100%);
  padding: 3rem 0 4rem;
  overflow: hidden;
}

.coupon-page::before,
.coupon-page::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(0);
  opacity: 0.6;
  pointer-events: none;
}

.coupon-page::before {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.9) 0%, rgba(148, 197, 255, 0.2) 100%);
  top: -120px;
  inset-inline-end: -180px;
}

.coupon-page::after {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle at center, rgba(129, 140, 248, 0.45) 0%, rgba(30, 64, 175, 0) 70%);
  bottom: -140px;
  inset-inline-start: -140px;
}

.coupon-page__inner {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.coupon-hero {
  position: relative;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border-radius: 30px;
  box-shadow: 0 26px 48px rgba(15, 23, 42, 0.12);
  padding: 2.4rem 2.6rem;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr);
  gap: 2rem;
  align-items: center;
  margin-bottom: 2.3rem;
  overflow: hidden;
}

.coupon-hero__glow {
  position: absolute;
  inset: auto -36% -58% 50%;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.12) 0%, rgba(15, 23, 42, 0) 60%);
  transform: translateX(-50%);
}

.coupon-hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.coupon-hero__eyebrow {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #1d426f;
  font-weight: 700;
}

.coupon-hero__title {
  font-size: 2.05rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.01em;
}

.coupon-hero__description {
  color: #475569;
  font-size: 1.05rem;
  max-width: 32rem;
  margin: 0;
  line-height: 1.65;
}

.coupon-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.coupon-hero__actions .btn {
  border-radius: 999px;
  padding: 0.8rem 1.5rem;
  font-weight: 600;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.coupon-hero__actions .btn-light {
  color: #0f172a;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: none;
}

.coupon-hero__stats {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
}

.coupon-hero__stat {
  background: linear-gradient(145deg, rgba(241, 245, 249, 0.85) 0%, rgba(226, 232, 240, 0.6) 100%);
  border-radius: 18px;
  padding: 1.15rem 1.35rem;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.15), 0 14px 32px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
  font: inherit;
  color: inherit;
}

.coupon-hero__stat:focus-visible {
  outline: 2px solid rgba(29, 78, 216, 0.55);
  outline-offset: 3px;
}

.coupon-hero__stat.is-active {
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.35), 0 16px 36px rgba(15, 23, 42, 0.12);
  transform: translateY(-2px);
}

.coupon-hero__stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  background: rgba(30, 64, 175, 0.12);
  color: #1d426f;
}

.coupon-hero__stat-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #64748b;
  font-weight: 600;
}

.coupon-hero__stat-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
}

.coupon-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  background: rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  padding: 0.9rem 1.1rem;
  margin-bottom: 2.5rem;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.15);
}

.coupon-toolbar__info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-inline: 1rem;
}

.coupon-toolbar__info-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  color: #1d426f;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 18px rgba(37, 99, 235, 0.2);
}

.coupon-toolbar__info-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.coupon-toolbar__info-text span {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1e293b;
}

.coupon-toolbar__info-text small {
  font-size: 0.78rem;
  color: #475569;
}

.coupon-toolbar__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.coupon-chip {
  border: 0;
  border-radius: 999px;
  background: #fff;
  padding: 0.55rem 1.2rem;
  font-weight: 600;
  color: #1f2937;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  cursor: pointer;
}

.coupon-chip .coupon-chip__value {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1d426f;
}

.coupon-chip.is-active {
  background: #1d426f;
  color: #fff;
  box-shadow: 0 12px 26px rgba(29, 78, 216, 0.35);
}

.coupon-chip.is-active .coupon-chip__value {
  color: #fff;
}

.coupon-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.coupon-chip--static {
  background: rgba(255, 255, 255, 0.78);
  box-shadow: none;
}

.coupon-chip--static:hover {
  transform: none;
  box-shadow: none;
}

.coupon-layout-card {
  background: #ffffff;
  border-radius: 32px;
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.12);
  padding: 2.5rem 2.75rem;
}

.coupon-layout-card .kt-portlet {
  box-shadow: none;
  border: 0;
}

.coupon-layout-card .kt-portlet__head {
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  padding: 0 0 1.65rem 0;
  margin-bottom: 1.65rem;
}

.coupon-layout-card .kt-portlet__head-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #0f172a;
}

.coupon-layout-card .kt-portlet__body {
  padding: 0;
}

.btn-pill {
  border-radius: 999px !important;
  padding: 0.65rem 1.35rem;
  font-weight: 600;
}

.coupon-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
}

.coupon-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.15);
}

.coupon-header {
  position: relative;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  padding: var(--space-5);
}

.coupon-header__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  width: 100%;
  text-align: center;
}

.coupon-header__meta-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  width: 100%;
}

.coupon-header__meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.55rem 0.9rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.coupon-header__meta-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: #475569;
}

.coupon-header__meta-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.02em;
}

.coupon-header__meta-hint {
  font-size: 0.78rem;
  font-weight: 600;
  color: #1d426f;
}

.coupon-header.active {
  background: linear-gradient(135deg, var(--gi-primary) 0%, var(--gi-primary-50) 100%);
}

.coupon-header.soon {
  background: linear-gradient(135deg, var(--gi-warning) 0%, var(--gi-warning-50) 100%);
}

.coupon-header.expired {
  background: linear-gradient(135deg, var(--gi-danger) 0%, var(--gi-danger-50) 100%);
}

.coupon-ribbon {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  z-index: 2;
}

.coupon-ribbon .badge {
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
  font-size: 0.8rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
}

.coupon-ribbon .badge-derived {
  background: rgba(var(--gi-primary-rgb), 0.16);
  color: var(--gi-primary);
  border: 1px solid rgba(var(--gi-primary-rgb), 0.2);
}

.coupon-ribbon .badge-unlinked {
  background: rgba(var(--gi-danger-rgb), 0.16);
  color: var(--gi-danger);
  border: 1px solid rgba(var(--gi-danger-rgb), 0.2);
}

.discount-badge {
  --tint: var(--gi-primary);
  --tint-rgb: 13, 110, 253;
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0.6rem 1.15rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--tint);
  box-shadow: 0 12px 26px rgba(var(--tint-rgb), 0.25);
}

.state-active .discount-badge {
  --tint: var(--gi-primary);
  --tint-rgb: 13, 110, 253;
}

.state-soon .discount-badge {
  --tint: var(--gi-warning);
  --tint-rgb: 245, 159, 0;
}

.state-expired .discount-badge {
  --tint: var(--gi-danger);
  --tint-rgb: 220, 53, 69;
}

.discount-badge .db-value {
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
}

.discount-badge .db-unit {
  font-size: 0.8rem;
  opacity: 0.85;
  line-height: 1;
}

.coupon-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-6) var(--space-6) var(--space-5);
}

.coupon-body__code {
  gap: var(--space-2);
  align-items: stretch;
}

.coupon-body__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: stretch;
}

.coupon-description {
  color: var(--gi-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.coupon-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.coupon-body h5.m-0 {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-2);
}

.coupon-body h5.m-0 .copy-btn {
  align-self: stretch;
  justify-content: center;
}

.coupon-code {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: var(--gi-surface);
  border: 1px dashed var(--gi-border);
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-btn {
  padding: 0.45rem 0.55rem;
  line-height: 1;
}

.seller-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid rgba(var(--gi-primary-rgb), 0.18);
  border-radius: 999px;
  background: rgba(var(--gi-primary-rgb), 0.08);
  font-size: 0.85rem;
  margin: 0.1rem 0.2rem;
  transition: background 0.2s ease, transform 0.2s ease;
}

.seller-chip:hover {
  background: rgba(var(--gi-primary-rgb), 0.15);
  transform: translateY(-1px);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: var(--gi-surface);
  border: 1px solid var(--gi-border);
}

.pill i {
  color: var(--gi-primary);
}

.pill-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--gi-muted);
}

.pill-value {
  font-weight: 700;
  color: #0f172a;
}

.pill--accent {
  background: rgba(var(--gi-warning-rgb), 0.12);
  border-color: rgba(var(--gi-warning-rgb), 0.35);
  color: var(--gi-warning);
}

.pill--accent .pill-value {
  color: var(--gi-warning);
}

.state-expired .coupon-header__meta-hint {
  color: var(--gi-danger);
}

.state-soon .coupon-header__meta-hint {
  color: var(--gi-warning);
}

.days-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(var(--gi-warning-rgb), 0.12);
  border: 1px solid rgba(var(--gi-warning-rgb), 0.35);
  color: var(--gi-warning);
  font-size: 0.8rem;
}

.coupon-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-2);
  padding-top: var(--space-3);
}

.coupon-actions .btn {
  width: 100%;
  justify-content: center;
}

@media (min-width: 768px) {
  .coupon-card {
    flex-direction: row;
  }

  .coupon-header {
    border-bottom: 0;
    border-inline-end: 1px solid rgba(15, 23, 42, 0.06);
    min-width: 240px;
    max-width: 260px;
    padding: var(--space-6);
  }

  .coupon-card--rtl .coupon-header {
    border-inline-end: 0;
    border-inline-start: 1px solid rgba(15, 23, 42, 0.06);
  }

  .coupon-header__content {
    align-items: flex-start;
    text-align: start;
  }

  .coupon-card--rtl .coupon-header__content {
    align-items: flex-end;
    text-align: end;
  }

  .coupon-body {
    flex: 1;
    padding: var(--space-6) var(--space-7);
  }

  .coupon-body h5.m-0,
  .coupon-body__code {
    flex-direction: row;
    align-items: center;
    gap: var(--space-3);
  }

  .coupon-body h5.m-0 .copy-btn {
    align-self: center;
  }

  .coupon-actions {
    flex-direction: row;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: var(--space-2);
  }

  .coupon-actions .btn {
    width: auto;
    min-width: 0;
  }
}

.coupon-groups {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.coupon-group {
  position: relative;
  padding: var(--space-6);
  padding-inline-start: calc(var(--space-6) + 14px);
  border-radius: 28px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.coupon-group::before {
  content: "";
  position: absolute;
  inset-inline-start: 26px;
  inset-block: var(--space-6);
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gi-primary) 0%, rgba(var(--gi-primary-rgb), 0.35) 100%);
  opacity: 0.6;
  pointer-events: none;
}

.coupon-group__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.coupon-group__heading {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.coupon-group__title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 700;
  font-size: 1.35rem;
}

.coupon-group__subtitle {
  margin: 0;
  color: var(--gi-muted);
  font-size: 0.95rem;
}

.coupon-group__badges {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.coupon-group__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--gi-primary-50);
  color: var(--gi-primary);
  font-weight: 600;
}

.coupon-group--seller::before {
  background: linear-gradient(180deg, var(--gi-primary) 0%, rgba(var(--gi-primary-rgb), 0.45) 100%);
}

.coupon-group--item {
  border-color: rgba(29, 66, 111, 0.18);
  box-shadow: 0 16px 42px rgba(29, 66, 111, 0.08);
}

.coupon-group--item::before {
  background: linear-gradient(180deg, #1d426f 0%, rgba(29, 66, 111, 0.45) 100%);
}

.coupon-group--item .coupon-group__title {
  color: #1d426f;
}

.coupon-group--item .coupon-group__badge {
  background: #e0f2fe;
  color: #1d426f;
}

.coupon-group--unlinked {
  border-color: rgba(var(--gi-danger-rgb), 0.18);
  box-shadow: 0 16px 42px rgba(var(--gi-danger-rgb), 0.08);
}

.coupon-group--unlinked::before {
  background: linear-gradient(180deg, var(--gi-danger) 0%, rgba(var(--gi-danger-rgb), 0.45) 100%);
}

.coupon-group--unlinked .coupon-group__title {
  color: var(--gi-danger);
}

.coupon-group--unlinked .coupon-group__badge {
  background: var(--gi-danger-50);
  color: var(--gi-danger);
}

.coupon-group__body {
  margin: 0;
}

.coupon-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.coupon-highlight {
  position: relative;
  border-radius: 18px;
  padding: var(--space-3) var(--space-4);
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 88px;
}

.coupon-highlight__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gi-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.coupon-highlight__label i {
  font-size: 0.85rem;
}

.coupon-highlight__value {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  word-break: break-word;
}

.coupon-card .btn-brand {
  background: var(--bs-primary, #1d426f);
  color: #fff;
  border: 0;
  border-radius: 14px;
  padding: 0.55rem 1.1rem;
  font-weight: 600;
}

.coupon-card .btn-brand:hover {
  filter: brightness(0.96);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.coupon-card .btn-outline-primary {
  border-color: var(--bs-primary, #1d426f);
  color: var(--bs-primary, #1d426f);
  border-radius: 14px;
  padding: 0.55rem 1.1rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.coupon-card .btn-outline-primary:hover {
  background: var(--bs-primary, #1d426f);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.coupon-card .btn-danger,
.coupon-card .btn-success,
.coupon-card .btn-warning {
  border-radius: 14px;
  padding: 0.55rem 1.1rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.coupon-card .btn-danger:hover,
.coupon-card .btn-success:hover,
.coupon-card .btn-warning:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  filter: brightness(1.05);
}

.pill i.fa-star,
.pill i.fa-star-half-o {
  color: var(--gi-primary);
}

.pill i.fa-star-o {
  color: #cbd5e1;
}

.coupon-code.flash {
  animation: ccflash 0.6s ease;
}

@keyframes ccflash {
  from {
    background: rgba(var(--gi-warning-rgb), 0.18);
  }

  to {
    background: var(--gi-surface);
  }
}

html[dir="rtl"] .coupon-actions {
  flex-direction: row-reverse;
}

html[dir="rtl"] .coupon-group {
  padding-inline-start: var(--space-6);
  padding-inline-end: calc(var(--space-6) + 14px);
}

html[dir="rtl"] .coupon-group::before {
  inset-inline-start: auto;
  inset-inline-end: 26px;
}

html[dir="rtl"] .coupon-highlight__label {
  letter-spacing: 0;
}

@media (max-width: 1199.98px) {
  .coupon-hero {
    grid-template-columns: 1fr;
    padding: 2.75rem 2.5rem;
  }

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

@media (max-width: 991.98px) {
  .coupon-layout-card {
    padding: 2rem 2.1rem;
    border-radius: 28px;
  }

  .coupon-toolbar {
    border-radius: 26px;
    padding: 1rem;
  }
}

@media (max-width: 767.98px) {
  .coupon-hero {
    padding: 2.25rem 1.9rem;
    border-radius: 26px;
  }

  .coupon-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .coupon-toolbar__info {
    padding-inline: 0;
  }
}

@media (max-width: 575.98px) {
  .coupon-page {
    padding: 1.5rem 0 2rem;
  }

  .coupon-page::before,
  .coupon-page::after {
    display: none;
  }

  .coupon-page__inner {
    padding: 0 0.75rem;
  }

  .coupon-hero {
    gap: 1.25rem;
    padding: 1.5rem 1rem;
    border-radius: 20px;
  }

  .coupon-hero__title {
    font-size: 1.85rem;
  }

  .coupon-hero__actions {
    width: 100%;
  }

  .coupon-hero__actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .coupon-hero__stats {
    grid-template-columns: 1fr;
  }

  .coupon-toolbar {
    border-radius: 16px;
    padding: 0.75rem;
  }

  .coupon-layout-card {
    padding: 1.25rem 0.5rem;
    border-radius: 20px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  }

  .coupon-groups {
    gap: var(--space-5);
  }

  .coupon-group {
    padding: 0;
    border-radius: 16px;
  }

  .coupon-group::before {
    display: none;
  }

  html[dir="rtl"] .coupon-group {
    padding: 0;
  }

  .coupon-header {
    height: 72px;
    min-height: unset;
    padding-inline: var(--space-3);
  }

  .discount-badge {
    padding: 0.45rem 0.75rem;
  }

  .discount-badge .db-value {
    font-size: 1rem;
  }

  .discount-badge .db-unit {
    font-size: 0.75rem;
  }

  .coupon-card {
    border-radius: 14px;
  }

  .coupon-body {
    gap: var(--space-2);
    padding: var(--space-4) var(--space-3) var(--space-3);
  }

  .coupon-highlights {
    grid-template-columns: 1fr;
  }

  .pill {
    font-size: 0.82rem;
    padding: 0.3rem 0.55rem;
  }

  .seller-chip {
    font-size: 0.8rem;
  }

  .coupon-actions {
    gap: var(--space-2);
  }

  .coupon-actions .btn {
    width: 100%;
    padding: 0.6rem 0.8rem;
  }

  .coupon-body h5.m-0 {
    gap: var(--space-2);
  }

  .coupon-code {
    font-size: 0.95rem;
    padding: 0.4rem 0.55rem;
  }

  .copy-btn {
    flex: 0 0 auto;
  }
}

/* ==========================================================================
   Seller Coupon Copies Section
   ========================================================================== */

.coupon-seller-copies {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.coupon-seller-copies__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gi-border);
}

.coupon-seller-copies__header i {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1d426f 0%, #1d426f 100%);
  color: white;
  border-radius: 10px;
  font-size: 1rem;
}

.coupon-seller-copies__header h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: #1e293b;
}

.coupon-seller-copies__badge {
  margin-inline-start: auto;
  padding: 0.25rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  background: linear-gradient(135deg, #1d426f 0%, #1d426f 100%);
  color: white;
  border-radius: 20px;
}

.coupon-seller-copies__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.coupon-seller-copies__item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid var(--gi-border);
  transition: all 0.2s ease;
}

.coupon-seller-copies__item:hover {
  background: #f1f5f9;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.coupon-seller-copies__rank {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1d426f 0%, #1d426f 100%);
  color: white;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.coupon-seller-copies__item:nth-child(1) .coupon-seller-copies__rank {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.coupon-seller-copies__item:nth-child(2) .coupon-seller-copies__rank {
  background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
}

.coupon-seller-copies__item:nth-child(3) .coupon-seller-copies__rank {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

.coupon-seller-copies__info {
  flex: 1;
  min-width: 0;
}

.coupon-seller-copies__name {
  display: block;
  font-weight: 600;
  color: #1e293b;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.coupon-seller-copies__meta {
  display: flex;
  gap: 1rem;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--gi-muted);
}

.coupon-seller-copies__meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.coupon-seller-copies__meta i {
  font-size: 0.7rem;
}

.coupon-seller-copies__count {
  text-align: center;
  flex-shrink: 0;
}

.coupon-seller-copies__value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #1d426f 0%, #1d426f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

.coupon-seller-copies__label {
  display: block;
  font-size: 0.7rem;
  color: var(--gi-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (max-width: 768px) {
  .coupon-seller-copies {
    padding: 1rem;
  }

  .coupon-seller-copies__list {
    grid-template-columns: 1fr;
  }

  .coupon-seller-copies__header h3 {
    font-size: 1rem;
  }
}

/* ==========================================================================
   Owner Banner – shows which influencer's coupons are displayed
   ========================================================================== */

.coupon-owner-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
  padding: 0.75rem 1.25rem;
  margin-bottom: 1rem;
  border-inline-start: 4px solid var(--gi-primary, #1d426f);
}

.coupon-owner-banner__avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
}

.coupon-owner-banner__avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.coupon-owner-banner__avatar-fallback {
  font-size: 1rem;
  font-weight: 600;
  color: #1d426f;
}

.coupon-owner-banner__name {
  font-size: 1.05rem;
  font-weight: 600;
  color: #0f172a;
}

@media (max-width: 767.98px) {
  .coupon-owner-banner {
    padding: 0.6rem 1rem;
    border-radius: 12px;
  }

  .coupon-owner-banner__avatar {
    width: 34px;
    height: 34px;
  }

  .coupon-owner-banner__name {
    font-size: 0.95rem;
  }
}

/* ==========================================================================
   Coupon Tabs (pp-tabs style)
   ========================================================================== */

.coupon-tabs {
  display: flex;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  padding: 0.5rem 1rem;
  margin-bottom: 2rem;
}

.coupon-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: transparent;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gi-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.coupon-tab:hover {
  color: var(--gi-primary);
  background: rgba(var(--gi-primary-rgb), 0.08);
}

.coupon-tab.is-active {
  color: #fff;
  background: var(--gi-primary);
}

.coupon-tab__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.4rem;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  transition: all 0.2s ease;
}

.coupon-tab.is-active .coupon-tab__count {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* Expiring soon tab - attention-grabbing style (only when has items) */
.coupon-tab[data-expiring="true"].has-items .coupon-tab__count {
  background: var(--gi-warning);
  color: #fff;
  font-size: 0.9rem;
  min-width: 1.75rem;
  height: 1.75rem;
  font-weight: 800;
  box-shadow: 0 0 0 3px rgba(var(--gi-warning-rgb), 0.3);
  animation: pulse-warning 2s ease-in-out infinite;
}

.coupon-tab[data-expiring="true"].has-items.is-active .coupon-tab__count {
  background: #fff;
  color: var(--gi-warning);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

/* Unpublished tab - attention-grabbing style (only when has items) */
.coupon-tab[data-publish="0"].has-items .coupon-tab__count {
  background: var(--gi-danger);
  color: #fff;
  font-size: 0.9rem;
  min-width: 1.75rem;
  height: 1.75rem;
  font-weight: 800;
  box-shadow: 0 0 0 3px rgba(var(--gi-danger-rgb), 0.3);
  animation: pulse-danger 2s ease-in-out infinite;
}

.coupon-tab[data-publish="0"].has-items.is-active .coupon-tab__count {
  background: #fff;
  color: var(--gi-danger);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

@keyframes pulse-warning {
  0%, 100% {
    box-shadow: 0 0 0 3px rgba(var(--gi-warning-rgb), 0.3);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(var(--gi-warning-rgb), 0.15);
  }
}

@keyframes pulse-danger {
  0%, 100% {
    box-shadow: 0 0 0 3px rgba(var(--gi-danger-rgb), 0.3);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(var(--gi-danger-rgb), 0.15);
  }
}

@media (max-width: 767.98px) {
  .coupon-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.5rem;
    border-radius: 16px;
  }

  .coupon-tab {
    padding: 0.6rem 0.9rem;
    font-size: 0.85rem;
    white-space: nowrap;
    border-radius: 10px;
  }
}

@media (max-width: 575.98px) {
  .coupon-tabs {
    margin-bottom: 1.25rem;
    border-radius: 14px;
    padding: 0.35rem;
  }

  .coupon-tab {
    padding: 0.5rem 0.7rem;
    font-size: 0.8rem;
  }
}
