.ec {
  --ink: #172d50;
  --blue: #1954ea;
  --line: #dfe6f1;
  color: var(--ink);
  font:
    15px/1.5 system-ui,
    sans-serif;
}
.ec * {
  box-sizing: border-box;
}
.ec h1,
.ec h2,
.ec h3,
.ec p {
  margin: 0 0 12px;
}
.ec h1 {
  font-size: clamp(25px, 4vw, 36px);
  line-height: 1.15;
}
.ec h2 {
  font-size: 21px;
}
.ec .muted {
  color: #64748b;
}
.ec .card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 18px;
}
.ec .grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.ec .row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.ec label {
  display: block;
  font-weight: 600;
  margin: 12px 0;
}
.ec input:not([type="checkbox"]),
.ec select,
.ec textarea {
  display: block;
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 12px;
  font: inherit;
  background: white;
  color: var(--ink);
  margin-top: 6px;
}
.ec input[type="checkbox"] {
  width: 20px;
  height: 20px;
  vertical-align: middle;
}
.ec button,
.ec a.button {
  border: 1px solid var(--line);
  background: white;
  border-radius: 10px;
  padding: 11px 17px;
  font: 600 14px system-ui;
  cursor: pointer;
  color: var(--ink);
  text-decoration: none;
  display: inline-block;
}
.ec button.primary,
.ec a.primary {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}
.ec button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.ec :focus-visible {
  outline: 3px solid #fdad52;
  outline-offset: 3px;
}
.ec .pill {
  display: inline-block;
  padding: 4px 10px;
  background: #eef3ff;
  color: #224ba2;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
}
.ec .notice {
  background: #edf4ff;
  border: 1px solid #d4e2ff;
  border-radius: 10px;
  padding: 14px;
  margin: 12px 0;
}
.ec .error {
  background: #fff1f1;
  border-color: #f4bbbb;
  color: #9c2525;
}
.ec .success {
  background: #edfbf4;
  border-color: #a9ddc4;
  color: #166547;
}
.ec .coupon {
  position: relative;
  border-left: 5px solid #fb7a14;
}
.ec .coupon strong {
  font-size: 26px;
}
.ec .table-wrap {
  overflow: auto;
}
.ec table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}
.ec th,
.ec td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.ec th {
  background: #f4f7fc;
}
.ec .tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0;
}
.ec .tabs [aria-selected="true"] {
  background: var(--ink);
  color: white;
}
.ec .public-wrap {
  max-width: 980px;
  margin: 40px auto;
  padding: 20px;
}
.ec .public-hero {
  background: linear-gradient(130deg, #112955, #205bcd);
  color: white;
  border-radius: 20px;
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.ec .public-hero .pill {
  background: #ffffff24;
  color: white;
}
.ec .public-hero h1 {
  margin: 24px 0;
}
.ec .public-hero p {
  color: #dfebff;
}
.ec .form-card {
  padding: 30px;
}
.ec .checks {
  font-weight: 400;
  font-size: 13px;
}
.ec .actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.ec pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f3f6fc;
  padding: 12px;
  border-radius: 10px;
}
.ec .qr svg {
  width: 190px;
  height: 190px;
}
.ec dialog,
.ec-dialog {
  border: 1px solid #dfe6f1;
  border-radius: 20px;
  width: min(900px, 95vw);
  max-height: 90vh;
  padding: 24px;
}
.ec-dialog::backdrop {
  background: #12244099;
}
.ec .close {
  float: right;
}
.ec .coupon-cart {
  margin: 18px 0;
}
.ec .empty {
  text-align: center;
  padding: 35px;
  color: #64748b;
}
.ec .stat {
  font-size: 28px;
  font-weight: 800;
}
.ec .stretch {
  flex: 1;
}
.ec .section-heading {
  margin: 18px 0;
}
.ec .safe-link {
  overflow-wrap: anywhere;
}
@media (max-width: 760px) {
  .ec .grid {
    grid-template-columns: 1fr;
  }
  .ec .public-wrap {
    margin: 10px auto;
    padding: 10px;
  }
  .ec .public-hero {
    padding: 24px;
  }
  .ec .form-card,
  .ec .card {
    padding: 19px;
  }
  .ec th,
  .ec td {
    padding: 9px;
  }
  .ec .actions > * {
    flex: 1;
  }
  .ec .public-hero h1 {
    margin: 14px 0;
  }
}

/* Independent click/tap selection; keep selected brands visible during search. */
.ec .brand-picker { border: 1px solid var(--line); border-radius: 10px; padding: 12px; min-width: 0; }
.ec .brand-options { max-height: 240px; overflow-y: auto; }
.ec .brand-options .checks { min-height: 44px; margin: 0; padding: 8px; cursor: pointer; }
.ec .brand-options [hidden] { display: none; }
.ec .brand-options input { flex-shrink: 0; }
