:root {
  --bg: #f2f6fb;
  --surface: #ffffff;
  --surface-soft: #f7faff;
  --ink: #13233c;
  --ink-soft: #4c617f;
  --line: #dce5f1;
  --brand: #0d62ff;
  --brand-2: #0a49b5;
  --accent: #f97316;
  --success: #128a4a;
  --danger: #c7283b;
  --radius: 18px;
  --shadow: 0 14px 35px rgba(19, 35, 60, 0.1);
  --font-ui: "Outfit", "Noto Sans Bengali", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: radial-gradient(circle at 10% 10%, #e8f0ff 0%, transparent 44%),
    radial-gradient(circle at 90% 20%, #ffe7d4 0%, transparent 38%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  line-height: 1.5;
  overflow-x: hidden;
}

.bg-orb {
  pointer-events: none;
  position: fixed;
  border-radius: 999px;
  filter: blur(30px);
  opacity: 0.25;
  z-index: -1;
}

.bg-orb-a {
  width: 360px;
  height: 360px;
  background: #2f7bff;
  left: -120px;
  top: -90px;
}

.bg-orb-b {
  width: 300px;
  height: 300px;
  background: #ff9a4a;
  right: -120px;
  top: 180px;
}

.container {
  width: min(1080px, 92vw);
  margin: 0 auto;
}

.container-narrow {
  width: min(500px, 92vw);
}

.header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px);
  background: rgba(242, 246, 251, 0.75);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.logo {
  text-decoration: none;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.68rem;
  font-weight: 700;
}

.logo-mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: #ffffff;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0.02) 36%, transparent 38%),
    linear-gradient(135deg, #2f6df6 0%, #1d4ed8 52%, #0f766e 100%);
  box-shadow:
    0 10px 22px rgba(13, 98, 255, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -10px 18px rgba(15, 35, 85, 0.16);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.015em;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(10, 28, 70, 0.28);
}

.logo-text {
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  background: linear-gradient(135deg, #13233c 0%, #0a49b5 48%, #0f766e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
  padding: 0.45rem 0.8rem;
  border-radius: 10px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover {
  background: rgba(13, 98, 255, 0.1);
  color: var(--brand-2);
}

.view {
  padding: 2rem 0 3.5rem;
  animation: view-in 0.26s ease;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1.25rem;
  padding: 1.5rem;
}

.home-hero {
  background: linear-gradient(135deg, #f8fbff 0%, #fff6ef 100%);
  border-color: #d7e4f8;
}

.hero-copy {
  padding: 0.5rem;
}

.kicker {
  margin: 0;
  color: var(--brand-2);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-title {
  margin: 0.6rem 0;
  font-size: clamp(1.5rem, 2.8vw, 2.35rem);
  line-height: 1.2;
}

.hero-subtitle {
  margin: 0;
  color: var(--ink-soft);
  max-width: 52ch;
}

.hero-actions {
  margin-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.home-highlight {
  border-radius: 16px;
  padding: 1.1rem;
  background: linear-gradient(145deg, #102447 0%, #1b3e79 55%, #0f62ff 100%);
  color: #fff;
  box-shadow: 0 16px 30px rgba(16, 36, 71, 0.25);
}

.home-highlight-title {
  margin: 0 0 0.45rem;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.85;
}

.home-highlight-price {
  margin: 0;
  font-size: clamp(2.1rem, 6vw, 2.9rem);
  line-height: 1;
  font-weight: 700;
}

.home-highlight-meta {
  margin: 0.5rem 0 0;
  font-size: 1rem;
  opacity: 0.95;
}

.home-highlight-note {
  margin: 0.7rem 0 0;
  font-size: 0.9rem;
  opacity: 0.82;
}

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

.plan-card {
  padding: 1.1rem;
  border-radius: 16px;
  background: #fff;
}

.plan-card-featured {
  border: 1px solid #f5c89c;
  background: linear-gradient(180deg, #fff9f3 0%, #ffffff 100%);
}

.plan-tag {
  margin: 0;
  color: var(--brand-2);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.plan-title {
  margin: 0.38rem 0 0;
  font-size: 1.35rem;
}

.plan-price {
  margin: 0.42rem 0 0;
  font-size: 2rem;
  font-weight: 700;
  color: #0a49b5;
}

.plan-detail {
  margin: 0.42rem 0 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.billing-card {
  margin-top: 1rem;
  padding: 1.1rem;
  background: linear-gradient(160deg, #ffffff 0%, #f7fbff 100%);
  border-color: #d4e2f4;
}

.dashboard-billing-card {
  margin: 1rem 0;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-head .section-title {
  margin-bottom: 0.35rem;
}

.section-head .form-hint {
  margin: 0;
}

.subscription-billing-card {
  margin-top: 0;
  padding: 1.25rem;
}

.subscription-status-card {
  margin-bottom: 1rem;
  padding: 1.2rem;
  border-color: #cfe0f7;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 249, 255, 0.96) 55%, rgba(235, 247, 255, 0.95) 100%);
}

.subscription-status-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.subscription-status-head .card-title {
  margin-bottom: 0;
}

.subscription-status-badge {
  flex: 0 0 auto;
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  border: 1px solid #d6e3f5;
  background: #eef4ff;
  color: #31516f;
  font-size: 0.82rem;
  font-weight: 800;
}

.subscription-status-badge.is-active {
  border-color: #bfe9cf;
  background: #eaf8ee;
  color: #15803d;
}

.subscription-status-badge.is-warning {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #c2410c;
}

.subscription-status-badge.is-error {
  border-color: #fecdd3;
  background: #fff1f2;
  color: #be123c;
}

.subscription-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.subscription-status-grid > div {
  min-width: 0;
  padding: 0.8rem;
  border: 1px solid #d9e6f6;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
}

.subscription-status-grid span {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.subscription-status-grid strong {
  display: block;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.35;
  word-break: break-word;
}

.subscription-status-note {
  margin: 0.85rem 0 0;
  padding: 0.78rem 0.9rem;
  border-radius: 12px;
  background: rgba(13, 98, 255, 0.07);
  color: var(--ink-soft);
  font-weight: 700;
}

.billing-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.billing-head .card-title {
  margin-bottom: 0;
}

.billing-head .text-muted {
  margin: 0.34rem 0 0;
}

.billing-badge {
  flex: 0 0 auto;
  padding: 0.36rem 0.72rem;
  border-radius: 999px;
  color: #0a49b5;
  background: #e9f0ff;
  border: 1px solid #d5e4ff;
  font-size: 0.82rem;
  font-weight: 700;
}

.billing-layout {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 0.9rem;
  align-items: stretch;
}

.billing-option-group,
.billing-summary,
.billing-duration {
  margin-bottom: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.84);
}

.billing-label {
  margin: 0 0 0.55rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 700;
}

.billing-check {
  margin: 0.45rem 0 0;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid #dce5f1;
  border-radius: 12px;
  padding: 0.55rem 0.68rem;
  background: var(--surface-soft);
  color: var(--ink);
  font-weight: 700;
}

.billing-check input {
  width: auto;
  min-width: 0;
  padding: 0;
  accent-color: var(--brand);
}

.billing-price {
  display: block;
  color: var(--brand-2);
  font-size: clamp(2rem, 4vw, 2.65rem);
  font-weight: 800;
  line-height: 1;
}

.billing-price.is-discounted {
  display: flex;
  align-items: baseline;
  gap: 0.58rem;
  flex-wrap: wrap;
}

.billing-price-original {
  color: #8797b1;
  font-size: 1.25rem;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.billing-price-final {
  color: var(--success);
}

.billing-summary .text-muted {
  margin: 0.45rem 0 0;
}

.billing-coupon {
  margin-top: 0.85rem;
  max-width: 560px;
  display: grid;
  gap: 0.46rem;
  padding: 0.85rem;
  border: 1px solid #d7e4f6;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(242, 247, 255, 0.95) 100%);
  box-shadow: 0 10px 24px rgba(13, 98, 255, 0.06);
}

.billing-coupon input {
  min-width: 0;
  width: 100%;
  background: #fff;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.billing-coupon-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: stretch;
}

.billing-apply-btn {
  min-width: 96px;
  border-color: #c9d9f2;
  background: #eaf2ff;
  color: var(--brand-2);
}

.billing-coupon-status {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 600;
}

.billing-coupon-status.is-applied {
  color: var(--success);
}

.billing-coupon-status.is-error {
  color: var(--danger);
}

.telegram-card {
  margin-top: 1rem;
  padding: 1rem 1.2rem;
  text-align: center;
  background: linear-gradient(160deg, #f2f8ff 0%, #ffffff 100%);
  border-color: #d5e6fb;
}

.telegram-title {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.telegram-id {
  margin: 0.4rem 0 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}

.telegram-actions {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
}

.auth-view .form-card,
.campaign-card {
  padding: 1.35rem;
}

.auth-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.42rem;
  margin: 1rem 0;
  padding: 0.35rem;
  border: 1px solid #d6e3f5;
  border-radius: 16px;
  background: linear-gradient(180deg, #f6f9ff 0%, #edf4ff 100%);
}

.auth-switch-btn {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.auth-switch-btn.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  box-shadow: 0 12px 22px rgba(13, 98, 255, 0.18);
}

[data-auth-panel] {
  margin-top: 0.85rem;
}

#campaign-image-wrapper {
  border: 1px solid rgba(15, 98, 255, 0.12);
  border-radius: 14px;
  padding: 0.85rem;
  background: linear-gradient(160deg, rgba(242, 248, 255, 0.88), rgba(255, 255, 255, 0.96));
}

#campaign-two-video-wrapper {
  border-color: rgba(29, 185, 140, 0.18);
  border-radius: 14px;
  padding: 0.85rem;
  background: linear-gradient(160deg, rgba(235, 255, 249, 0.9), rgba(255, 255, 255, 0.96));
}

.campaign-kind-card {
  margin-bottom: 0.95rem;
  min-height: 96px;
  border: 1px solid rgba(13, 98, 255, 0.16);
  border-radius: 14px;
  padding: 0.85rem;
  background: linear-gradient(160deg, #f5f9ff 0%, #ffffff 100%);
}

.campaign-kind-video {
  border-color: rgba(18, 138, 74, 0.2);
  background: linear-gradient(160deg, #effdf5 0%, #ffffff 100%);
}

.campaign-kind-card .mini-label {
  display: block;
  margin-bottom: 0.28rem;
  color: var(--brand-2);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.campaign-kind-card strong {
  display: block;
  color: var(--ink);
  font-size: 1.05rem;
}

.campaign-kind-card p {
  margin: 0.32rem 0 0;
  font-size: 0.9rem;
}

.section-title {
  margin: 0 0 1rem;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
}

.dashboard-welcome {
  margin: 0 0 1rem;
  color: var(--ink-soft);
}

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

.dashboard-card {
  padding: 1.1rem;
}

.container-contact {
  width: min(1080px, 92vw);
}

.contact-panel {
  overflow: hidden;
  border-color: #d5e4ff;
  background:
    linear-gradient(135deg, rgba(248, 251, 255, 0.96) 0%, rgba(255, 246, 239, 0.96) 100%);
}

.contact-panel-head {
  padding: 1.45rem 1.55rem 1.1rem;
  border-bottom: 1px solid rgba(213, 228, 255, 0.9);
}

.contact-panel-head .section-title {
  margin: 0.35rem 0 0.55rem;
}

.contact-subtitle {
  margin: 0;
  max-width: 70ch;
  color: var(--ink-soft);
}

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

.contact-option {
  min-height: 178px;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.08rem;
  border: 1px solid #dce5f1;
  border-radius: 16px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(244, 248, 255, 0.94) 100%);
  box-shadow: 0 12px 28px rgba(21, 48, 92, 0.07);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-option:hover {
  transform: translateY(-2px);
  border-color: #bfd3ff;
  box-shadow: 0 16px 28px rgba(13, 98, 255, 0.12);
}

.contact-option-accent:hover {
  border-color: rgba(249, 115, 22, 0.42);
  box-shadow: 0 16px 28px rgba(249, 115, 22, 0.12);
}

.contact-option-channel {
  background:
    linear-gradient(180deg, rgba(241, 247, 255, 0.98) 0%, rgba(255, 255, 255, 0.96) 100%);
}

.contact-option-channel:hover {
  border-color: rgba(15, 118, 110, 0.36);
  box-shadow: 0 16px 28px rgba(15, 118, 110, 0.12);
}

.contact-option-tag {
  width: fit-content;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  color: var(--brand-2);
  background: #e9f0ff;
  font-size: 0.78rem;
  font-weight: 700;
}

.contact-option strong {
  font-size: 1.18rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.contact-option span:not(.contact-option-tag) {
  color: var(--ink-soft);
}

.contact-option-button {
  margin-top: auto;
  width: fit-content;
  padding: 0.48rem 0.72rem;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
}

.contact-option-button-accent {
  background: linear-gradient(135deg, #0f766e, #128a4a);
}

.contact-option-button-channel {
  background: linear-gradient(135deg, #0f766e, #2563eb);
}

.card-title {
  margin: 0 0 0.55rem;
  font-size: 1.04rem;
}

.text-muted,
.form-hint {
  color: var(--ink-soft);
}

.form-hint {
  margin: 0 0 1rem;
}

.form-group {
  margin-bottom: 0.95rem;
}

label {
  display: block;
  margin-bottom: 0.36rem;
  font-size: 0.93rem;
  color: var(--ink-soft);
  font-weight: 500;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  border-radius: 12px;
  padding: 0.68rem 0.78rem;
  font: inherit;
  color: var(--ink);
}

textarea {
  resize: vertical;
  min-height: 84px;
}

select[multiple] {
  min-height: 120px;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(13, 98, 255, 0.15);
}

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

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

.form-inline select {
  flex: 1;
}

.btn {
  border: none;
  border-radius: 12px;
  padding: 0.68rem 1rem;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 8px 20px rgba(13, 98, 255, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 10px 22px rgba(13, 98, 255, 0.3);
}

.btn-secondary {
  color: var(--brand-2);
  background: #e9f0ff;
  border: 1px solid #d5e4ff;
}

.btn-danger {
  color: #fff;
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  box-shadow: 0 8px 18px rgba(185, 28, 28, 0.18);
}

.btn-fb {
  color: #fff;
  background: linear-gradient(135deg, #1877f2, #1457c4);
}

.btn-ghost {
  color: var(--ink-soft);
  background: transparent;
  padding: 0.4rem 0.72rem;
}

.msg {
  margin: 0.4rem 0 1rem;
  border-radius: 11px;
  padding: 0.62rem 0.78rem;
  font-size: 0.92rem;
}

.msg.success {
  color: var(--success);
  background: rgba(18, 138, 74, 0.12);
  border: 1px solid rgba(18, 138, 74, 0.2);
}

.msg.error {
  color: var(--danger);
  background: rgba(199, 40, 59, 0.11);
  border: 1px solid rgba(199, 40, 59, 0.2);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 0.64rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.admin-table th {
  color: var(--ink-soft);
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.9rem;
}

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

.admin-search input {
  min-width: 220px;
  width: 260px;
  padding: 0.55rem 0.62rem;
  border-radius: 10px;
}

.admin-cell-stack {
  display: grid;
  gap: 0.45rem;
}

.admin-cell-stack input,
.admin-cell-stack select {
  padding: 0.45rem 0.55rem;
  border-radius: 9px;
  font-size: 0.84rem;
  min-width: 120px;
}

.admin-inline {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  flex-wrap: wrap;
}

.admin-tool-list {
  display: grid;
  gap: 0.4rem;
  min-width: 150px;
}

.admin-tool {
  margin: 0;
  padding: 0.42rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 600;
}

.admin-tool input {
  width: auto;
  min-width: 0;
  padding: 0;
}

.admin-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.admin-actions .btn {
  padding: 0.42rem 0.62rem;
  border-radius: 9px;
  font-size: 0.82rem;
}

.admin-coupon-card {
  margin-bottom: 1rem;
  padding: 1.1rem;
  border-color: #cfe0ff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 248, 255, 0.96) 100%);
}

.coupon-form {
  display: grid;
  grid-template-columns: minmax(180px, 1.15fr) minmax(120px, 0.72fr) minmax(130px, 0.72fr) auto;
  gap: 0.72rem;
  align-items: end;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
}

.coupon-form .form-group {
  margin-bottom: 0;
}

.coupon-form input[type="text"] {
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.coupon-active-check {
  min-height: 46px;
  margin: 0;
  padding: 0 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  border: 1px solid #dce5f1;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--ink);
  font-weight: 700;
}

.coupon-plan-field {
  grid-column: 1 / 4;
  display: grid;
  gap: 0.45rem;
  padding: 0.72rem;
  border: 1px solid #dce5f1;
  border-radius: 14px;
  background: rgba(247, 250, 255, 0.86);
}

.coupon-plan-field > span {
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 800;
}

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

.coupon-plan-check {
  min-height: 36px;
  margin: 0;
  padding: 0.42rem 0.52rem;
  display: flex;
  align-items: center;
  gap: 0.42rem;
  border: 1px solid #dce5f1;
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 700;
}

.coupon-plan-check input {
  width: auto;
  min-width: 0;
  padding: 0;
  accent-color: var(--brand);
}

.coupon-active-check input,
.coupon-row-active input {
  width: auto;
  min-width: 0;
  padding: 0;
  accent-color: var(--brand);
}

.coupon-list-wrap {
  margin-top: 0.9rem;
}

.coupon-list {
  display: grid;
  gap: 0.72rem;
}

.coupon-row,
.coupon-empty {
  border: 1px solid #dce5f1;
  border-radius: 16px;
  padding: 0.85rem;
  background: #fff;
  box-shadow: 0 10px 24px rgba(13, 98, 255, 0.06);
}

.coupon-empty {
  display: grid;
  gap: 0.25rem;
  color: var(--ink-soft);
}

.coupon-row {
  display: grid;
  grid-template-columns: 1fr 1.35fr auto;
  gap: 0.85rem;
  align-items: center;
}

.coupon-row-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.coupon-row-main .text-muted {
  margin: 0.42rem 0 0;
  font-size: 0.84rem;
}

.coupon-code-pill,
.coupon-status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 800;
}

.coupon-code-pill {
  padding: 0.35rem 0.72rem;
  color: #0f3e98;
  background: #e9f0ff;
  border: 1px solid #cfe0ff;
  letter-spacing: 0.04em;
}

.coupon-status-pill {
  padding: 0.28rem 0.56rem;
  font-size: 0.78rem;
}

.coupon-status-pill.is-active {
  color: var(--success);
  background: rgba(18, 138, 74, 0.12);
  border: 1px solid rgba(18, 138, 74, 0.18);
}

.coupon-status-pill.is-inactive {
  color: var(--danger);
  background: rgba(199, 40, 59, 0.1);
  border: 1px solid rgba(199, 40, 59, 0.16);
}

.coupon-row-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.62rem;
  align-items: end;
}

.coupon-row-plan-field {
  grid-column: 1 / -1;
}

.coupon-row-fields label {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
}

.coupon-row-fields input[type="number"] {
  margin-top: 0.25rem;
  padding: 0.48rem 0.56rem;
  border-radius: 10px;
  font-size: 0.86rem;
}

.coupon-row-active {
  min-height: 38px;
  padding: 0.4rem 0.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.coupon-row-actions {
  display: flex;
  gap: 0.45rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.coupon-row-actions .btn {
  padding: 0.5rem 0.72rem;
  border-radius: 10px;
  font-size: 0.84rem;
}

.footer {
  padding: 1.5rem 0 2rem;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .plans-grid {
    grid-template-columns: 1fr;
  }
  .billing-layout {
    grid-template-columns: 1fr;
  }
  .subscription-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .coupon-form,
  .coupon-row,
  .coupon-row-fields {
    grid-template-columns: 1fr;
  }
  .coupon-plan-field {
    grid-column: auto;
  }
  .coupon-plan-options {
    grid-template-columns: 1fr;
  }
  .coupon-row-actions {
    justify-content: stretch;
  }
  .coupon-row-actions .btn,
  .coupon-form .btn {
    width: 100%;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .contact-options {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .section-head {
    flex-direction: column;
    align-items: stretch;
  }
  .subscription-status-head {
    flex-direction: column;
    align-items: stretch;
  }
  .subscription-status-grid {
    grid-template-columns: 1fr;
  }
  .nav {
    justify-content: flex-start;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-inline {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-search {
    width: 100%;
  }
  .admin-search input {
    width: 100%;
    min-width: 0;
  }
  .billing-coupon-control {
    grid-template-columns: 1fr;
  }
  .billing-apply-btn {
    width: 100%;
  }
}
