/*!
 * CloneMyKey BT Custom Account Panel — frontend styles
 * Brand palette:
 *   --cmk-red:   #D0272F   (primary)
 *   --cmk-teal:  #1A5A7F   (deep)
 *   --cmk-blue:  #2EA3F2   (accent)
 *   --cmk-ink:   #343535
 *   --cmk-bg:    #F6F7F9
 *   --cmk-card:  #FFFFFF
 *   --cmk-line:  #E8E8E8
 *
 * Design notes:
 *   - Mobile-first: base styles assume <600px, then progressive @media enhancements.
 *   - Touch targets minimum 44×44px (WCAG / Apple HIG).
 *   - All animation respects prefers-reduced-motion.
 *   - Scoped under .cmk-ap to avoid bleed into Divi/theme styles.
 */

:root {
  --cmk-red:        #D0272F;
  --cmk-red-dark:   #A41E25;
  --cmk-red-tint:   #FCE9EA;
  --cmk-teal:       #1A5A7F;
  --cmk-teal-dark:  #134561;
  --cmk-blue:       #2EA3F2;
  --cmk-blue-tint:  #E5F3FD;
  --cmk-ink:        #1F2937;
  --cmk-ink-soft:   #4B5563;
  --cmk-mute:       #6B7280;
  --cmk-bg:         #F6F7F9;
  --cmk-card:       #FFFFFF;
  --cmk-line:       #E5E7EB;
  --cmk-line-soft:  #F0F1F3;
  --cmk-success:    #10B981;
  --cmk-success-tint:#D1FAE5;
  --cmk-warn:       #F59E0B;
  --cmk-warn-tint:  #FEF3C7;
  --cmk-shadow:     0 1px 2px rgba(15,23,42,.04), 0 4px 12px rgba(15,23,42,.06);
  --cmk-shadow-lg:  0 4px 24px rgba(15,23,42,.10);
  --cmk-radius:     12px;
  --cmk-radius-lg:  16px;
}

/* =========================================================
   Container reset — keeps Divi/theme out of our box
   ========================================================= */
.cmk-ap,
.cmk-ap * {
  box-sizing: border-box;
}
.cmk-ap {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--cmk-ink);
  background: var(--cmk-bg);
  margin: 0 -16px;          /* bleed to edge of page on mobile */
  /* v1.1.0.11 — tightened top padding so the page title sits up close
     to the theme's top whitespace on every tab (matches the
     "Refer a Friend" treatment we shipped in v1.1.0.10). */
  padding: 4px 16px 16px;
  min-height: 60vh;
}
@media (min-width: 720px) {
  .cmk-ap {
    margin: 0;
    border-radius: var(--cmk-radius-lg);
    padding: 8px 32px 32px;
  }
}

.cmk-ap h1, .cmk-ap h2, .cmk-ap h3 {
  margin: 0;
  color: var(--cmk-ink);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.cmk-ap h1 { font-size: 1.625rem; line-height: 1.2; }
.cmk-ap h2 { font-size: 1.125rem; line-height: 1.3; }
.cmk-ap h3 { font-size: 1.0625rem; line-height: 1.3; }
.cmk-ap p  { margin: 0; }

.cmk-ap__greeting,
.cmk-ap__page-header {
  margin-bottom: 20px;
}
.cmk-ap__sub {
  margin-top: 4px !important;
  color: var(--cmk-mute);
  font-size: 0.95rem;
}

/* =========================================================
   Dashboard tiles
   ========================================================= */
.cmk-ap-tiles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 32px;
}
@media (min-width: 600px) {
  .cmk-ap-tiles { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
@media (min-width: 1024px) {
  .cmk-ap-tiles { grid-template-columns: repeat(3, 1fr); }
}

.cmk-ap-tile {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  background: var(--cmk-card);
  border-radius: var(--cmk-radius);
  border: 1px solid var(--cmk-line);
  text-decoration: none !important;
  color: inherit;
  box-shadow: var(--cmk-shadow);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  min-height: 110px;
  position: relative;
  overflow: hidden;
}
.cmk-ap-tile:hover,
.cmk-ap-tile:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--cmk-shadow-lg);
  border-color: var(--cmk-line);
  outline: none;
}
.cmk-ap-tile::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--cmk-line);
  transition: background .15s;
}
.cmk-ap-tile--applications::before { background: var(--cmk-red); }
.cmk-ap-tile--keys::before         { background: var(--cmk-teal); }
.cmk-ap-tile--orders::before       { background: var(--cmk-blue); }
.cmk-ap-tile--rewards::before      { background: var(--cmk-warn); }
.cmk-ap-tile--referrals::before    { background: var(--cmk-success); }

.cmk-ap-tile__icon {
  flex: 0 0 44px;
  height: 44px;
  width: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: var(--cmk-line-soft);
  color: var(--cmk-teal);
  position: relative;
}
.cmk-ap-tile__icon svg { width: 22px; height: 22px; }
.cmk-ap-tile--applications .cmk-ap-tile__icon { background: var(--cmk-red-tint);   color: var(--cmk-red); }
.cmk-ap-tile--keys .cmk-ap-tile__icon         { background: #E5EEF4;              color: var(--cmk-teal); }
.cmk-ap-tile--orders .cmk-ap-tile__icon       { background: var(--cmk-blue-tint); color: var(--cmk-blue); }
.cmk-ap-tile--rewards .cmk-ap-tile__icon      { background: var(--cmk-warn-tint); color: var(--cmk-warn); }
.cmk-ap-tile--referrals .cmk-ap-tile__icon    { background: var(--cmk-success-tint); color: var(--cmk-success); }

.cmk-ap-tile__body { flex: 1 1 auto; min-width: 0; }
.cmk-ap-tile__body h2 { margin-bottom: 4px; }
.cmk-ap-tile__highlight {
  color: var(--cmk-red);
  font-weight: 600;
  font-size: .9375rem;
  margin: 4px 0 4px !important;
}
.cmk-ap-tile__meta {
  color: var(--cmk-mute);
  font-size: .875rem;
}
.cmk-ap-tile__big-number {
  font-size: 1.875rem;
  font-weight: 700;
  margin-top: 2px !important;
  line-height: 1;
}
.cmk-ap-tile__big-number span {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--cmk-mute);
  margin-left: 4px;
}
.cmk-ap-tile__list {
  margin: 6px 0 0; padding: 0;
  list-style: none;
  font-size: 0.875rem;
}
.cmk-ap-tile__list li {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid var(--cmk-line-soft);
}
.cmk-ap-tile__list li:last-child { border-bottom: 0; }
.cmk-ap-order-num { color: var(--cmk-ink); font-weight: 600; }
.cmk-ap-order-status {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--cmk-line-soft);
  color: var(--cmk-mute);
  text-transform: capitalize;
  white-space: nowrap;
}
.cmk-ap-order-status--processing,
.cmk-ap-order-status--on-hold     { background: var(--cmk-warn-tint);    color: var(--cmk-warn); }
.cmk-ap-order-status--completed   { background: var(--cmk-success-tint); color: var(--cmk-success); }
.cmk-ap-order-status--cancelled,
.cmk-ap-order-status--failed      { background: var(--cmk-red-tint);     color: var(--cmk-red); }

/* Notification badges (the red dot) */
.cmk-ap-badge {
  position: absolute;
  top: -6px; right: -6px;
  min-width: 22px; height: 22px;
  padding: 0 6px;
  display: flex; align-items: center; justify-content: center;
  background: var(--cmk-red);
  color: #fff;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 2px solid var(--cmk-card);
  z-index: 1;
}
.cmk-ap-badge--success { background: var(--cmk-success); }
.cmk-ap-badge--warn    { background: var(--cmk-warn); }
.cmk-ap-badge--info    { background: var(--cmk-blue); }

/* =========================================================
   Settings strip (demoted at bottom of dashboard)
   ========================================================= */
.cmk-ap-settings-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  padding: 16px 0 6px;
  border-top: 1px solid var(--cmk-line);
  margin-top: 12px;
  font-size: 0.875rem;
}
.cmk-ap-settings-strip__label {
  color: var(--cmk-mute);
  font-weight: 500;
  margin-right: 4px;
}
.cmk-ap-settings-strip a {
  color: var(--cmk-ink-soft);
  text-decoration: none;
  padding: 4px 0;
}
.cmk-ap-settings-strip a:hover,
.cmk-ap-settings-strip a:focus-visible {
  color: var(--cmk-red);
  text-decoration: underline;
}
.cmk-ap-settings-strip__logout {
  margin-left: auto;
  color: var(--cmk-mute) !important;
}

/* =========================================================
   Mobile bottom action bar (sticky)
   ========================================================= */
.cmk-ap-bottom-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: flex;
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(140%) blur(8px);
  border-top: 1px solid var(--cmk-line);
  z-index: 50;
}
.cmk-ap-bottom-bar__btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  border-radius: 10px;
  background: var(--cmk-line-soft);
  color: var(--cmk-ink);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none !important;
  min-height: 44px;
}
.cmk-ap-bottom-bar__btn svg { width: 18px; height: 18px; }
.cmk-ap-bottom-bar__btn--primary {
  background: var(--cmk-red);
  color: #fff;
}
@media (min-width: 720px) { .cmk-ap-bottom-bar { display: none; } }

/* Add bottom padding when the bar is showing so content isn't hidden */
@media (max-width: 719px) {
  body.woocommerce-account .cmk-ap[data-cmk-ap] { padding-bottom: 88px; }
}

/* =========================================================
   Toolbar (search + sort) — Stored Keys & Applications
   ========================================================= */
.cmk-ap-toolbar {
  display: flex;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 12px;
  flex-direction: column;
}
@media (min-width: 600px) {
  .cmk-ap-toolbar { flex-direction: row; }
}

.cmk-ap-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--cmk-card);
  border: 1px solid var(--cmk-line);
  border-radius: var(--cmk-radius);
  padding: 0 12px;
  transition: border-color .15s, box-shadow .15s;
}
.cmk-ap-search:focus-within {
  border-color: var(--cmk-blue);
  box-shadow: 0 0 0 3px var(--cmk-blue-tint);
}
.cmk-ap-search svg { width: 18px; height: 18px; color: var(--cmk-mute); flex: 0 0 18px; }
.cmk-ap-search input {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 12px 0;
  font-size: 1rem;
  outline: none !important;
  min-height: 44px;
  color: var(--cmk-ink);
  width: 100%;
}

.cmk-ap-sort select {
  background: var(--cmk-card);
  border: 1px solid var(--cmk-line);
  border-radius: var(--cmk-radius);
  padding: 12px 36px 12px 14px;
  font-size: 1rem;
  min-height: 44px;
  cursor: pointer;
  color: var(--cmk-ink);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
}

/* Tag/status filter chips */
.cmk-ap-tag-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 16px;
}
.cmk-ap-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--cmk-line);
  background: var(--cmk-card);
  color: var(--cmk-ink-soft);
  font-size: 0.875rem;
  cursor: pointer;
  min-height: 36px;
  transition: all .15s;
}
.cmk-ap-chip:hover { border-color: var(--cmk-mute); color: var(--cmk-ink); }
.cmk-ap-chip--active {
  background: var(--cmk-ink);
  border-color: var(--cmk-ink);
  color: #fff;
}
.cmk-ap-chip__count {
  font-size: 0.75rem;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  min-width: 20px;
  text-align: center;
}
.cmk-ap-chip:not(.cmk-ap-chip--active) .cmk-ap-chip__count {
  background: var(--cmk-line);
}

/* =========================================================
   Card list (Stored Keys + Applications share most styles)
   ========================================================= */
.cmk-ap-card-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 900px) {
  .cmk-ap-card-list { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

.cmk-ap-card {
  background: var(--cmk-card);
  border: 1px solid var(--cmk-line);
  border-radius: var(--cmk-radius);
  padding: 16px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  position: relative;
  box-shadow: var(--cmk-shadow);
  transition: border-color .15s, box-shadow .15s;
}
.cmk-ap-card:hover { box-shadow: var(--cmk-shadow-lg); }
.cmk-ap-card.is-pinned {
  border-color: var(--cmk-warn);
  background: linear-gradient(180deg, var(--cmk-warn-tint) 0%, var(--cmk-card) 100%);
}
.cmk-ap-card.is-new {
  border-color: var(--cmk-success);
}
.cmk-ap-card.is-hidden { display: none !important; }

.cmk-ap-card__media {
  flex: 0 0 64px;
  width: 64px; height: 64px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--cmk-line-soft);
  display: flex; align-items: center; justify-content: center;
}
.cmk-ap-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.cmk-ap-card__placeholder {
  font-size: 1.5rem;
  color: var(--cmk-mute);
}

.cmk-ap-card__body { flex: 1 1 auto; min-width: 0; }

.cmk-ap-card__title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.cmk-ap-card__title {
  flex: 1 1 auto;
  word-break: break-word;
  min-width: 0;
}

.cmk-ap-pin-btn {
  background: transparent;
  border: 0;
  padding: 6px;
  cursor: pointer;
  color: var(--cmk-mute);
  border-radius: 8px;
  transition: all .15s;
  min-width: 36px; min-height: 36px;
}
.cmk-ap-pin-btn:hover { background: var(--cmk-line-soft); color: var(--cmk-warn); }
.cmk-ap-pin-btn.is-pinned { color: var(--cmk-warn); }
.cmk-ap-pin-btn svg { width: 18px; height: 18px; display: block; margin: 0 auto; }

.cmk-ap-pill {
  font-size: 0.6875rem;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.cmk-ap-pill--gold { background: var(--cmk-warn-tint); color: var(--cmk-warn); }

.cmk-ap-card__tags {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin-bottom: 8px;
}
.cmk-ap-tag {
  font-size: 0.75rem;
  background: var(--cmk-line-soft);
  color: var(--cmk-ink-soft);
  padding: 2px 8px;
  border-radius: 6px;
}

.cmk-ap-card__notes {
  margin-bottom: 10px;
}
.cmk-ap-card__notes-text {
  font-size: 0.9375rem;
  color: var(--cmk-ink-soft);
  background: var(--cmk-line-soft);
  border-radius: 8px;
  padding: 8px 12px;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}
.cmk-ap-card__notes-text--empty {
  color: var(--cmk-mute);
  font-style: italic;
  background: transparent;
  padding: 4px 0;
}

.cmk-ap-card__meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 16px;
  margin: 0 0 14px;
  padding: 10px 0 0;
  border-top: 1px solid var(--cmk-line-soft);
  font-size: 0.8125rem;
}
@media (min-width: 600px) {
  .cmk-ap-card__meta { grid-template-columns: repeat(4, 1fr); }
}
.cmk-ap-card__meta dt {
  color: var(--cmk-mute);
  font-size: 0.75rem;
  margin: 0 0 2px;
}
.cmk-ap-card__meta dd {
  margin: 0;
  color: var(--cmk-ink);
  font-weight: 500;
}
.cmk-ap-card__meta code {
  font-size: 0.75rem;
  background: transparent;
  padding: 0;
}
.cmk-ap-card__meta-line {
  font-size: 0.8125rem;
  color: var(--cmk-mute);
  margin: 4px 0 8px;
}

.cmk-ap-card__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* =========================================================
   Buttons
   ========================================================= */
.cmk-ap-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none !important;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  color: var(--cmk-ink);
  min-height: 44px;
  transition: all .15s;
  font-family: inherit;
}
.cmk-ap-btn svg { width: 16px; height: 16px; }
.cmk-ap-btn:hover { transform: translateY(-1px); }
.cmk-ap-btn:active { transform: translateY(0); }
.cmk-ap-btn:focus-visible { outline: 3px solid var(--cmk-blue-tint); outline-offset: 1px; }

.cmk-ap-btn--primary {
  background: var(--cmk-red);
  color: #fff !important;
  border-color: var(--cmk-red);
}
.cmk-ap-btn--primary:hover { background: var(--cmk-red-dark); border-color: var(--cmk-red-dark); }

.cmk-ap-btn--ghost {
  border-color: var(--cmk-line);
  color: var(--cmk-ink) !important;
  background: var(--cmk-card);
}
.cmk-ap-btn--ghost:hover { border-color: var(--cmk-mute); }

.cmk-ap-btn--danger-ghost {
  border-color: var(--cmk-line);
  color: var(--cmk-mute) !important;
  background: var(--cmk-card);
  padding: 10px 12px;
}
.cmk-ap-btn--danger-ghost:hover {
  border-color: var(--cmk-red);
  color: var(--cmk-red) !important;
  background: var(--cmk-red-tint);
}

/* =========================================================
   Status badges (Applications)
   ========================================================= */
.cmk-ap-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.cmk-ap-status--approved    { background: var(--cmk-success-tint); color: var(--cmk-success); }
.cmk-ap-status--pending     { background: var(--cmk-warn-tint);    color: var(--cmk-warn); }
.cmk-ap-status--disapproved { background: var(--cmk-red-tint);     color: var(--cmk-red); }
.cmk-ap-status__rel {
  font-weight: 500;
  opacity: .8;
}

.cmk-ap-new-badge {
  position: absolute;
  top: -8px; left: 12px;
  background: var(--cmk-success);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: .08em;
  padding: 3px 8px;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(16,185,129,.35);
}

.cmk-ap-app-notes {
  background: var(--cmk-line-soft);
  border-left: 3px solid var(--cmk-teal);
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.9375rem;
  margin-bottom: 12px;
  color: var(--cmk-ink-soft);
}
.cmk-ap-app-notes strong { display: block; color: var(--cmk-ink); margin-bottom: 4px; font-size: 0.8125rem; }
.cmk-ap-app-notes p:last-child { margin-bottom: 0; }
.cmk-ap-app-pending-msg {
  font-size: 0.9375rem;
  color: var(--cmk-mute);
  font-style: italic;
  margin-bottom: 10px !important;
}

/* =========================================================
   Empty states
   ========================================================= */
.cmk-ap-empty {
  background: var(--cmk-card);
  border: 1px dashed var(--cmk-line);
  border-radius: var(--cmk-radius);
  padding: 40px 20px;
  text-align: center;
  color: var(--cmk-mute);
}
.cmk-ap-empty svg { color: var(--cmk-line); margin-bottom: 12px; }
.cmk-ap-empty h2 { margin-bottom: 6px !important; color: var(--cmk-ink); }
.cmk-ap-empty p { margin-bottom: 16px !important; }
.cmk-ap-empty-state-search {
  text-align: center;
  color: var(--cmk-mute);
  font-style: italic;
  padding: 24px 0;
}

/* =========================================================
   Modal (Edit Saved Key)
   ========================================================= */
.cmk-ap-modal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.cmk-ap-modal[hidden] { display: none; }
.cmk-ap-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(15,23,42,.5);
  backdrop-filter: blur(2px);
  animation: cmk-ap-fade-in .15s ease;
}
.cmk-ap-modal__panel {
  position: relative;
  background: var(--cmk-card);
  border-radius: var(--cmk-radius-lg);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
  animation: cmk-ap-slide-up .2s ease;
}
.cmk-ap-modal__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 20px 12px;
  border-bottom: 1px solid var(--cmk-line);
}
.cmk-ap-modal__close {
  background: transparent;
  border: 0;
  font-size: 1.5rem;
  color: var(--cmk-mute);
  width: 36px; height: 36px;
  border-radius: 8px;
  cursor: pointer;
  line-height: 1;
}
.cmk-ap-modal__close:hover { background: var(--cmk-line-soft); }

.cmk-ap-modal__form { padding: 16px 20px 20px; }
.cmk-ap-field { display: block; margin-bottom: 16px; }
.cmk-ap-field__label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 6px;
  color: var(--cmk-ink);
}
.cmk-ap-field__label small {
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--cmk-mute);
}
.cmk-ap-field input,
.cmk-ap-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--cmk-line);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--cmk-card);
  color: var(--cmk-ink);
  transition: border-color .15s, box-shadow .15s;
}
.cmk-ap-field input:focus,
.cmk-ap-field textarea:focus {
  border-color: var(--cmk-blue);
  box-shadow: 0 0 0 3px var(--cmk-blue-tint);
  outline: none;
}
.cmk-ap-field textarea { min-height: 80px; resize: vertical; }

.cmk-ap-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--cmk-line-soft);
  margin-top: 12px;
}

/* =========================================================
   Rewards & Referrals templates
   ========================================================= */
.cmk-ap-rewards-balance {
  background: linear-gradient(135deg, var(--cmk-teal) 0%, var(--cmk-teal-dark) 100%);
  color: #fff;
  border-radius: var(--cmk-radius-lg);
  padding: 32px;
  text-align: center;
  margin-bottom: 20px;
  box-shadow: var(--cmk-shadow-lg);
}
.cmk-ap-rewards-balance__points {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}
.cmk-ap-rewards-balance__label {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.875rem;
  margin-top: 6px;
  opacity: 0.85;
}
.cmk-ap-rewards-balance__value {
  margin-top: 14px;
  font-size: 1rem;
  background: rgba(255,255,255,.16);
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
}
.cmk-ap-rewards-balance__value .woocommerce-Price-amount,
.cmk-ap-rewards-balance__value bdi { color: #fff; font-weight: 700; }

.cmk-ap-info-card {
  background: var(--cmk-card);
  border: 1px solid var(--cmk-line);
  border-radius: var(--cmk-radius);
  padding: 20px;
  box-shadow: var(--cmk-shadow);
}
.cmk-ap-info-card h3 { margin-bottom: 10px; }
.cmk-ap-info-card ul {
  margin: 0;
  padding-left: 20px;
  color: var(--cmk-ink-soft);
  font-size: 0.9375rem;
}
.cmk-ap-info-card li { margin-bottom: 6px; }

/* =========================================================
   Animations
   ========================================================= */
@keyframes cmk-ap-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes cmk-ap-slide-up {
  from { transform: translateY(12px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .cmk-ap *, .cmk-ap *::before, .cmk-ap *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* =========================================================
   Toast / inline saved indicator
   ========================================================= */
.cmk-ap-toast {
  position: fixed;
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--cmk-ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 200;
  box-shadow: var(--cmk-shadow-lg);
  animation: cmk-ap-slide-up .2s ease;
}
@media (min-width: 720px) { .cmk-ap-toast { bottom: 24px; } }

/* Hide WP screen-reader-text within scope (uses WP's class) */
.cmk-ap .screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* =========================================================
   JS interaction states (added by account-panel.js)
   ========================================================= */

/* Toast host (one container, multiple stacking toasts) */
.cmk-ap-toast-host {
  position: fixed;
  bottom: 96px;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  padding: 0 12px;
}
@media (min-width: 720px) {
  .cmk-ap-toast-host { bottom: 24px; }
}

/* Individual toast (overrides the static .cmk-ap-toast above) */
.cmk-ap-toast-host .cmk-ap-toast {
  position: static;
  transform: translateY(8px);
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: auto;
  animation: none;
  max-width: 90vw;
}
.cmk-ap-toast-host .cmk-ap-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.cmk-ap-toast--success { background: #166534; }
.cmk-ap-toast--error   { background: var(--cmk-red); }
.cmk-ap-toast--info    { background: var(--cmk-ink); }

/* Modal open/close transitions */
.cmk-ap-modal {
  opacity: 0;
  transition: opacity .18s ease;
  pointer-events: none;
}
.cmk-ap-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}
.cmk-ap-modal:not(.is-open) .cmk-ap-modal__panel {
  transform: translateY(8px);
}

/* Lock body scroll while modal open (best-effort, scoped) */
body.cmk-ap-modal-open {
  overflow: hidden;
}

/* Card transient states */
.cmk-ap-card.is-deleting {
  opacity: 0.5;
  pointer-events: none;
}
.cmk-ap-card.is-removed {
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity .25s ease, transform .25s ease, max-height .25s ease, margin .25s ease, padding .25s ease;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
}
.cmk-ap-card.is-flash {
  box-shadow: 0 0 0 2px var(--cmk-blue), var(--cmk-shadow-lg);
  transition: box-shadow .9s ease;
}

@media (prefers-reduced-motion: reduce) {
  .cmk-ap-toast-host .cmk-ap-toast,
  .cmk-ap-modal,
  .cmk-ap-card.is-removed,
  .cmk-ap-card.is-flash {
    transition: none;
  }
}

/* =================================================================
 * v1.1.0 ADDITIONS
 * ================================================================= */

/* ---- Top tab bar ----------------------------------------------- */
.cmk-ap-tabbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 12px;
  background: var(--cmk-card);
  border: 1px solid var(--cmk-line);
  border-radius: var(--cmk-radius);
  box-shadow: var(--cmk-shadow);
  margin: 0 0 20px;
}
.cmk-ap-tabbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--cmk-ink);
  padding: 8px 12px;
  border-right: 1px solid var(--cmk-line);
  margin-right: 4px;
}
.cmk-ap-tabbar__brand-icon {
  display: inline-flex;
  width: 20px; height: 20px;
  color: var(--cmk-red);
}
.cmk-ap-tabbar__menu {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  flex: 1 1 auto;
  list-style: none;
  margin: 0;
  padding: 0;
}
.cmk-ap-tabbar__item { margin: 0; padding: 0; }
.cmk-ap-tabbar__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--cmk-ink-soft);
  font-weight: 500;
  font-size: 14px;
  transition: background-color .15s ease, color .15s ease;
}
.cmk-ap-tabbar__link:hover,
.cmk-ap-tabbar__link:focus { background: var(--cmk-line-soft); color: var(--cmk-ink); }
.cmk-ap-tabbar__link.is-active {
  background: var(--cmk-red);
  color: #fff;
}
.cmk-ap-tabbar__logout {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--cmk-red);
  background: #fff;
  color: var(--cmk-red);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.cmk-ap-tabbar__logout:hover,
.cmk-ap-tabbar__logout:focus {
  background: var(--cmk-red);
  color: #fff;
}
.cmk-ap-tabbar__toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--cmk-line);
  background: #fff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  color: var(--cmk-ink);
}
.cmk-ap-tabbar__toggle:hover { background: var(--cmk-line-soft); }
.cmk-ap-tabbar__toggle-icon { font-size: 18px; line-height: 1; }

/* Mobile breakpoint: collapse tabs to off-canvas */
@media ( max-width: 720px ) {
  .cmk-ap-tabbar { padding: 10px; }
  .cmk-ap-tabbar__brand { display: none; }
  .cmk-ap-tabbar__toggle { display: inline-flex; }
  .cmk-ap-tabbar__menu {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: min( 280px, 80vw );
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    background: #fff;
    box-shadow: var(--cmk-shadow-lg);
    padding: 64px 16px 24px;
    z-index: 9999;
    transform: translateX( -110% );
    transition: transform .25s ease;
    overflow-y: auto;
  }
  .cmk-ap-tabbar.is-menu-open .cmk-ap-tabbar__menu { transform: translateX( 0 ); }
  .cmk-ap-tabbar__link {
    width: 100%;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 16px;
  }
  .cmk-ap-tabbar.is-menu-open::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba( 15, 23, 42, .35 );
    z-index: 9998;
  }
  .cmk-ap-tabbar__logout {
    margin-left: 0;
  }
  body.cmk-ap-menu-open { overflow: hidden; }
}

/* ---- Back-to-Dashboard link ------------------------------------ */
.cmk-ap-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--cmk-teal);
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: background-color .15s ease;
}
.cmk-ap-back-link:hover,
.cmk-ap-back-link:focus { background: var(--cmk-line-soft); color: var(--cmk-teal-dark); }

/* ---- Sub-tabs (Active / Recently Deleted) ---------------------- */
.cmk-ap-subtabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--cmk-line);
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}
.cmk-ap-subtab {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 10px 18px;
  font: inherit;
  font-weight: 500;
  color: var(--cmk-mute);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cmk-ap-subtab:hover { color: var(--cmk-ink); }
.cmk-ap-subtab.is-active {
  color: var(--cmk-red);
  border-bottom-color: var(--cmk-red);
}
.cmk-ap-subtab__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  padding: 0 6px;
  height: 20px;
  border-radius: 999px;
  background: var(--cmk-line);
  color: var(--cmk-ink-soft);
  font-size: 12px;
  font-weight: 600;
}
.cmk-ap-subtab.is-active .cmk-ap-subtab__count {
  background: var(--cmk-red-tint);
  color: var(--cmk-red);
}

/* ---- Trashed cards --------------------------------------------- */
.cmk-ap-card--trashed {
  border-style: dashed;
  border-color: var(--cmk-warn);
  background: linear-gradient( 0deg, rgba( 245, 158, 11, .03 ), rgba( 245, 158, 11, .03 ) ), #fff;
}
.cmk-ap-card__trash-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--cmk-warn-tint);
  color: #92400E;
  border-radius: 8px;
  font-size: 13px;
  margin: 8px 0 12px;
}
.cmk-ap-card__trash-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---- Last-login bar (dashboard) -------------------------------- */
.cmk-ap-lastlogin {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: var(--cmk-blue-tint);
  border: 1px solid #BAE0FA;
  border-radius: 10px;
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--cmk-teal-dark);
}
.cmk-ap-lastlogin__icon {
  display: inline-flex;
  width: 18px; height: 18px;
  color: var(--cmk-teal);
}
.cmk-ap-lastlogin__text { flex: 1 1 auto; }
.cmk-ap-lastlogin__btn {
  appearance: none;
  background: transparent;
  border: 1px solid var(--cmk-teal);
  color: var(--cmk-teal);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.cmk-ap-lastlogin__btn:hover,
.cmk-ap-lastlogin__btn:focus { background: var(--cmk-teal); color: #fff; }

/* ---- Staff-note callout (on stored-key cards) ------------------ */
.cmk-ap-card__staff-note {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  background: #FFF7ED;
  border: 1px solid #FDBA74;
  border-radius: 8px;
  margin: 0 0 12px;
  font-size: 13px;
  color: #7C2D12;
}
.cmk-ap-card__staff-note-icon {
  flex: 0 0 auto;
  width: 18px; height: 18px;
  color: #C2410C;
  margin-top: 1px;
}
.cmk-ap-card__staff-note-label {
  font-weight: 700;
  display: block;
  margin-bottom: 2px;
  color: #C2410C;
}

/* ---- Creation-method badge ------------------------------------- */
.cmk-ap-method-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--cmk-line);
  color: var(--cmk-ink-soft);
}
.cmk-ap-method-badge--snap_send { background: #DBEAFE; color: #1E40AF; }
.cmk-ap-method-badge--mail-in   { background: #FEF3C7; color: #92400E; }
.cmk-ap-method-badge--reorder   { background: #D1FAE5; color: #065F46; }
.cmk-ap-method-badge--manual    { background: #E0E7FF; color: #3730A3; }

/* ---- Account-edit form sections (form-edit-account.php) -------- */
.cmk-ap-account-form {
  display: grid;
  gap: 24px;
}
.cmk-ap-section {
  background: var(--cmk-card);
  border: 1px solid var(--cmk-line);
  border-radius: var(--cmk-radius);
  box-shadow: var(--cmk-shadow);
  padding: 22px;
}
.cmk-ap-section__title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  color: var(--cmk-ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.cmk-ap-section__intro {
  margin: 0 0 16px;
  color: var(--cmk-mute);
  font-size: 14px;
}
.cmk-ap-form-row { margin-bottom: 14px; }
.cmk-ap-form-row label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; color: var(--cmk-ink); }
.cmk-ap-form-row input[type="text"],
.cmk-ap-form-row input[type="email"],
.cmk-ap-form-row input[type="password"] {
  width: 100%;
  max-width: 420px;
  padding: 9px 12px;
  border: 1px solid var(--cmk-line);
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
}
.cmk-ap-form-row input:focus {
  outline: none;
  border-color: var(--cmk-blue);
  box-shadow: 0 0 0 3px var(--cmk-blue-tint);
}
.cmk-ap-form-row__hint { font-size: 12px; color: var(--cmk-mute); margin-top: 4px; }

/* Password strength meter */
.cmk-ap-pw-meter {
  display: none;
  max-width: 420px;
  margin-top: 6px;
}
.cmk-ap-pw-meter.is-visible { display: block; }
.cmk-ap-pw-meter__bar {
  height: 6px;
  background: var(--cmk-line);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 4px;
}
.cmk-ap-pw-meter__fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--cmk-mute);
  transition: width .25s ease, background-color .25s ease;
}
.cmk-ap-pw-meter[data-score="0"] .cmk-ap-pw-meter__fill { background: var(--cmk-red); }
.cmk-ap-pw-meter[data-score="1"] .cmk-ap-pw-meter__fill { background: var(--cmk-red); }
.cmk-ap-pw-meter[data-score="2"] .cmk-ap-pw-meter__fill { background: var(--cmk-warn); }
.cmk-ap-pw-meter[data-score="3"] .cmk-ap-pw-meter__fill { background: var(--cmk-warn); }
.cmk-ap-pw-meter[data-score="4"] .cmk-ap-pw-meter__fill { background: var(--cmk-success); }
.cmk-ap-pw-meter[data-score="5"] .cmk-ap-pw-meter__fill { background: var(--cmk-success); }
.cmk-ap-pw-meter__label {
  font-size: 12px;
  color: var(--cmk-ink-soft);
  font-weight: 600;
}

/* Info card / callout */
.cmk-ap-info-card {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  background: var(--cmk-blue-tint);
  border: 1px solid #BAE0FA;
  border-radius: 10px;
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--cmk-teal-dark);
}
.cmk-ap-info-card__icon {
  flex: 0 0 auto;
  width: 20px; height: 20px;
  color: var(--cmk-teal);
  margin-top: 1px;
}
.cmk-ap-info-card__title { font-weight: 700; margin: 0 0 4px; }
.cmk-ap-info-card__body { margin: 0; }

/* ---- Modal (login-log) ----------------------------------------- */
.cmk-ap-modal[hidden] { display: none !important; }
.cmk-ap-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.cmk-ap-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba( 15, 23, 42, .5 );
}
.cmk-ap-modal__panel {
  position: relative;
  background: var(--cmk-card);
  border-radius: var(--cmk-radius);
  box-shadow: var(--cmk-shadow-lg);
  max-width: 760px;
  width: 100%;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.cmk-ap-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--cmk-line);
}
.cmk-ap-modal__header h2 { margin: 0; font-size: 18px; font-weight: 700; }
.cmk-ap-modal__close {
  appearance: none;
  background: transparent;
  border: 0;
  font-size: 28px;
  line-height: 1;
  padding: 0 4px;
  color: var(--cmk-mute);
  cursor: pointer;
}
.cmk-ap-modal__close:hover { color: var(--cmk-ink); }
.cmk-ap-modal__body {
  padding: 18px 20px;
  overflow-y: auto;
}
.cmk-ap-modal__footer {
  padding: 12px 20px;
  border-top: 1px solid var(--cmk-line);
  text-align: right;
}
body.cmk-ap-modal-open { overflow: hidden; }

/* Login-log table */
.cmk-ap-login-log__loading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--cmk-mute);
  padding: 12px 0;
}
/* Ensure [hidden] wins over display:flex / display:table on the modal's
 * status elements — without these explicit rules the spinner stays visible
 * forever after the AJAX resolves and the JS sets `.hidden = true`. */
.cmk-ap-login-log__loading[hidden],
.cmk-ap-login-log__table[hidden],
.cmk-ap-login-log__empty[hidden],
.cmk-ap-login-log__error[hidden] {
  display: none !important;
}
.cmk-ap-login-log__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.cmk-ap-login-log__table th,
.cmk-ap-login-log__table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--cmk-line-soft);
  text-align: left;
}
.cmk-ap-login-log__table th {
  font-weight: 600;
  color: var(--cmk-ink-soft);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.cmk-ap-login-log__row--failed {
  background: var(--cmk-red-tint);
  color: var(--cmk-red-dark);
}
.cmk-ap-login-log__empty,
.cmk-ap-login-log__error {
  padding: 24px 0;
  text-align: center;
  color: var(--cmk-mute);
}
.cmk-ap-login-log__error { color: var(--cmk-red); }

/* ---- Spinner (used inside buttons) ---------------------------- */
.cmk-ap-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: middle;
  animation: cmk-ap-spin .7s linear infinite;
}
@keyframes cmk-ap-spin { to { transform: rotate( 360deg ); } }
button[aria-busy="true"] { cursor: progress; opacity: .9; }
button[aria-busy="true"] .cmk-ap-btn-label { margin-left: 6px; }

/* ---- Coupon copy button (referrals) — superseded by v1.1.0.9+ block at end of file --- */

/* ---- Print: hide tab bar / back link --------------------------- */
@media print {
  .cmk-ap-tabbar,
  .cmk-ap-back-link,
  .cmk-ap-modal { display: none !important; }
}

/* =================================================================
 * v1.1.1 CLEANUP PATCHES
 * Addresses feedback round 2: layout, typography, contrast, trash UI.
 * ================================================================= */

/* ---- (1) Reclaim full width: hide WC's empty <nav> sidebar -----
 * We override myaccount/navigation.php to print nothing, but the wrapping
 * <nav class="woocommerce-MyAccount-navigation"> is added by the theme/Divi
 * (or via `woocommerce_account_navigation` in themes that wrap it). We
 * defensively hide every sibling-navigation pattern WooCommerce/Divi exposes
 * and stretch the content area to full width. */
.woocommerce-account .woocommerce-MyAccount-navigation,
.woocommerce-account nav.woocommerce-MyAccount-navigation,
.woocommerce-account .woocommerce-MyAccount-navigation-wrapper,
body.woocommerce-account .et_pb_module .woocommerce-MyAccount-navigation,
body.woocommerce-account .et-l .woocommerce-MyAccount-navigation,
.woocommerce-account .u-column1.col-1 {
  display: none !important;
}
.woocommerce-account .woocommerce-MyAccount-content,
.woocommerce-account .u-column2.col-2,
.woocommerce-account .u-columns,
.woocommerce-account .woocommerce-MyAccount {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
/* Wider, more breathable inner area for the panel itself. */
.cmk-ap[data-cmk-ap] {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* ---- (4) Tile typography: bigger titles, slightly larger meta -- */
.cmk-ap-tile { padding: 22px; }
.cmk-ap-tile__body h2 {
  font-size: 1.25rem !important;          /* was ~1.125rem */
  font-weight: 700;
  letter-spacing: .01em;
  margin-bottom: 8px !important;
}
.cmk-ap-tile__meta {
  font-size: 0.95rem;                     /* was .875rem */
  color: var(--cmk-ink-soft);
  font-weight: 500;
}
.cmk-ap-tile__highlight {
  font-size: 1rem;
}
.cmk-ap-tile__big-number {
  font-size: 2rem;
}
.cmk-ap-tile__big-number span {
  font-size: 1rem;
}
.cmk-ap-tile__list { font-size: 0.95rem; }

/* ---- (5) Stored Keys: stronger card contrast on bright monitors */
body.woocommerce-account .cmk-ap[data-cmk-ap="stored-keys"] {
  --cmk-card: #ffffff;
}
.cmk-ap[data-cmk-ap="stored-keys"] .cmk-ap-card,
.cmk-ap[data-cmk-ap="applications"] .cmk-ap-card {
  background: #ffffff;
  border: 1px solid #d6dde5;              /* was very pale */
  box-shadow: 0 2px 6px rgba(15, 23, 42, .06),
              0 8px 18px rgba(15, 23, 42, .05);
}
.cmk-ap[data-cmk-ap="stored-keys"] .cmk-ap-card:hover,
.cmk-ap[data-cmk-ap="applications"] .cmk-ap-card:hover {
  border-color: #b8c2cc;
  box-shadow: 0 4px 10px rgba(15, 23, 42, .09),
              0 12px 26px rgba(15, 23, 42, .08);
}

/* Optional: subtle page-section background so white cards pop more */
.cmk-ap[data-cmk-ap="stored-keys"] .cmk-ap-subpanel {
  background: transparent;
}

/* ---- (6) Center the key fob image vertically in the card ------- */
.cmk-ap-card { align-items: center !important; }
/* Keep it top-aligned on very tall cards (lots of meta) so it doesn't
 * float weirdly when content is much taller than the icon. We cap by
 * limiting to standard cards only (mobile + medium). */
@media (min-width: 1100px) {
  .cmk-ap-card { align-items: center !important; }
}
.cmk-ap-card__media {
  align-self: center;
}

/* ---- (7) Trashed intro: only inside trashed panel + inline icon */
.cmk-ap-subpanel[hidden] { display: none !important; }
.cmk-ap-trashed-intro {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #fff8e6;
  border: 1px solid #f3deaf;
  border-radius: 10px;
  margin: 4px 0 18px;
  color: #6b5b22;
  font-size: 0.95rem;
}
.cmk-ap-trashed-intro svg {
  flex: 0 0 auto;
  color: #b58614;
}
.cmk-ap-trashed-intro p { margin: 0; line-height: 1.4; }

/* ---- Top tab bar polish ---------------------------------------- */
.cmk-ap-tabbar { margin-bottom: 24px; }
.cmk-ap-tabbar__list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  flex: 1 1 auto;
  list-style: none;
  margin: 0;
  padding: 0;
}
.cmk-ap-tabbar__menu-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--cmk-line);
  background: #fff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  color: var(--cmk-ink);
}
@media ( max-width: 720px ) {
  .cmk-ap-tabbar__menu-toggle { display: inline-flex; }
  .cmk-ap-tabbar__list { display: none; }
}

/* Mobile menu off-canvas (used by the hamburger button) */
.cmk-ap-mobile-menu { position: fixed; inset: 0; z-index: 9999; }
.cmk-ap-mobile-menu[hidden] { display: none !important; }
.cmk-ap-mobile-menu__backdrop {
  position: absolute; inset: 0;
  background: rgba(15, 23, 42, .45);
}
.cmk-ap-mobile-menu__panel {
  position: relative;
  width: min(320px, 86vw);
  height: 100%;
  background: #fff;
  box-shadow: 4px 0 24px rgba(15, 23, 42, .25);
  display: flex; flex-direction: column;
  padding: 16px;
}
.cmk-ap-mobile-menu__header {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--cmk-line);
  margin-bottom: 12px;
}
.cmk-ap-mobile-menu__close {
  background: transparent; border: 0;
  font-size: 28px; line-height: 1; cursor: pointer; color: var(--cmk-ink);
}
.cmk-ap-mobile-menu__list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 4px;
}
.cmk-ap-mobile-menu__list a {
  display: block;
  padding: 12px 14px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--cmk-ink);
  font-weight: 500;
}
.cmk-ap-mobile-menu__list a:hover,
.cmk-ap-mobile-menu__list a.is-active {
  background: var(--cmk-red-tint);
  color: var(--cmk-red);
}
.cmk-ap-mobile-menu__logout { margin-top: 12px; border-top: 1px solid var(--cmk-line); padding-top: 12px; }

/* =================================================================
 * (8) Modern Orders list (myaccount/orders.php override)
 * ================================================================= */
.cmk-ap-orders-list {
  display: flex; flex-direction: column; gap: 14px;
  margin: 0; padding: 0; list-style: none;
}
.cmk-ap-order-card {
  background: #fff;
  border: 1px solid #d6dde5;
  border-radius: var(--cmk-radius);
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px 24px;
  align-items: center;
  box-shadow: 0 2px 6px rgba(15, 23, 42, .05);
  transition: box-shadow .15s ease, border-color .15s ease;
}
.cmk-ap-order-card:hover {
  border-color: #b8c2cc;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .08);
}
.cmk-ap-order-card__head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.cmk-ap-order-card__num {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--cmk-ink);
  text-decoration: none;
}
.cmk-ap-order-card__num:hover { color: var(--cmk-red); }
.cmk-ap-order-card__date {
  color: var(--cmk-mute);
  font-size: 0.9rem;
}
.cmk-ap-order-card__meta {
  display: flex; gap: 18px; flex-wrap: wrap;
  margin-top: 6px;
  font-size: 0.9rem;
  color: var(--cmk-ink-soft);
}
.cmk-ap-order-card__meta strong { color: var(--cmk-ink); margin-right: 4px; font-weight: 600; }
.cmk-ap-order-card__actions {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end;
}
.cmk-ap-order-card__status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--cmk-line-soft);
  color: var(--cmk-ink);
  text-transform: capitalize;
}
.cmk-ap-order-card__status--processing,
.cmk-ap-order-card__status--on-hold     { background: var(--cmk-warn-tint);    color: var(--cmk-warn); }
.cmk-ap-order-card__status--completed   { background: var(--cmk-success-tint); color: var(--cmk-success); }
.cmk-ap-order-card__status--cancelled,
.cmk-ap-order-card__status--failed,
.cmk-ap-order-card__status--refunded    { background: var(--cmk-red-tint);     color: var(--cmk-red); }
.cmk-ap-order-card__status--pending     { background: var(--cmk-blue-tint);    color: var(--cmk-blue); }
@media (max-width: 640px) {
  .cmk-ap-order-card { grid-template-columns: 1fr; }
  .cmk-ap-order-card__actions { justify-content: flex-start; }
}

.cmk-ap-orders-pagination {
  display: flex; gap: 8px; justify-content: center;
  margin-top: 22px;
}
.cmk-ap-orders-pagination a,
.cmk-ap-orders-pagination span {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--cmk-line);
  background: #fff;
  text-decoration: none;
  color: var(--cmk-ink);
  font-weight: 500;
}
.cmk-ap-orders-pagination span.current,
.cmk-ap-orders-pagination a:hover { background: var(--cmk-red); color: #fff; border-color: var(--cmk-red); }

/* ---- Reorder-redirect notice (orders + view-order) ------------- */
.cmk-ap-reorder-notice {
  display: flex;
  gap: 12px;
  padding: 14px 20px;          /* match horizontal padding of .cmk-ap-order-card so text aligns */
  background: var(--cmk-blue-tint);
  border: 1px solid color-mix(in srgb, var(--cmk-blue) 28%, #fff);
  border-radius: var(--cmk-radius);
  color: var(--cmk-ink);
  margin: 0 0 18px;
  font-size: 0.95rem;
  align-items: flex-start;
}
.cmk-ap-reorder-notice svg { flex: 0 0 auto; color: var(--cmk-blue); margin-top: 2px; }
.cmk-ap-reorder-notice strong { color: var(--cmk-ink); display: block; margin-bottom: 2px; }
.cmk-ap-reorder-notice a {
  color: var(--cmk-blue);
  font-weight: 600;
  text-decoration: underline;
}

/* =================================================================
 * (9) View Order — redesigned
 * ================================================================= */
.cmk-ap-order-view { display: flex; flex-direction: column; gap: 18px; }
.cmk-ap-order-view__header {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--cmk-line);
}
.cmk-ap-order-view__title { font-size: 1.5rem; font-weight: 700; margin: 0; }
.cmk-ap-order-view__sub  { color: var(--cmk-mute); font-size: 0.9rem; margin-top: 4px; }
.cmk-ap-order-view-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 800px) {
  .cmk-ap-order-view-grid { grid-template-columns: 2fr 1fr; }
}
.cmk-ap-order-view__panel {
  background: #fff;
  border: 1px solid #d6dde5;
  border-radius: var(--cmk-radius);
  padding: 18px 20px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, .04);
}
.cmk-ap-order-view__panel h2 {
  font-size: 1.0625rem;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--cmk-line-soft);
}
.cmk-ap-order-items {
  display: flex; flex-direction: column; gap: 10px;
  margin: 0; padding: 0; list-style: none;
}
.cmk-ap-order-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--cmk-line-soft);
}
.cmk-ap-order-item:last-child { border-bottom: 0; }
.cmk-ap-order-item__img {
  width: 56px; height: 56px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--cmk-line-soft);
}
.cmk-ap-order-item__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cmk-ap-order-item__name { font-weight: 600; color: var(--cmk-ink); }
.cmk-ap-order-item__meta { font-size: 0.85rem; color: var(--cmk-mute); }

/* Inline item-meta list (UKIN/Label/Service stay one-line each).
 * Overrides core's <ul.wc-item-meta> block-paragraph layout when our
 * Invoice::render_item_meta_inline() helper is in use. */
.cmk-ap-order-item__meta .cmk-meta-list {
  list-style: none;
  margin: 2px 0 0;
  padding: 0;
}
.cmk-ap-order-item__meta .cmk-meta-list li {
  margin: 0;
  padding: 0;
  line-height: 1.5;
  white-space: nowrap;
  font-size: 0.85rem;
  color: var(--cmk-mute);
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.cmk-ap-order-item__meta .cmk-meta-list .cmk-meta-key {
  font-weight: 600;
  color: var(--cmk-ink-soft);
  margin-right: 4px;
}
.cmk-ap-order-item__meta .cmk-meta-list .cmk-meta-val {
  color: var(--cmk-mute);
}
.cmk-ap-order-item__qty { font-size: 0.85rem; color: var(--cmk-ink-soft); margin-top: 2px; }
.cmk-ap-order-item__price { font-weight: 600; color: var(--cmk-ink); white-space: nowrap; }

.cmk-ap-order-totals { width: 100%; border-collapse: collapse; }
.cmk-ap-order-totals th,
.cmk-ap-order-totals td {
  padding: 8px 0;
  text-align: left;
  border-bottom: 1px solid var(--cmk-line-soft);
  font-size: 0.95rem;
}
.cmk-ap-order-totals th { color: var(--cmk-ink-soft); font-weight: 500; }
.cmk-ap-order-totals td { text-align: right; font-weight: 600; color: var(--cmk-ink); }
.cmk-ap-order-totals tr:last-child th,
.cmk-ap-order-totals tr:last-child td { border-bottom: 0; font-size: 1.0625rem; padding-top: 12px; }

.cmk-ap-order-addresses {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 600px) {
  .cmk-ap-order-addresses { grid-template-columns: 1fr 1fr; }
}
.cmk-ap-order-address h3 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--cmk-mute);
  margin: 0 0 6px;
  font-weight: 600;
}
.cmk-ap-order-address address {
  font-style: normal;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--cmk-ink);
}

/* (11) Recent activity panel on dashboard */
.cmk-ap-activity-card {
  margin-top: 24px;
  background: #fff;
  border: 1px solid #d6dde5;
  border-radius: var(--cmk-radius);
  padding: 18px 20px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, .05);
}
.cmk-ap-activity-card__head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; flex-wrap: wrap; gap: 8px;
}
.cmk-ap-activity-card__title {
  font-size: 1.0625rem; font-weight: 700; margin: 0;
  display: flex; align-items: center; gap: 8px;
}
.cmk-ap-activity-card__title svg { color: var(--cmk-teal); }
.cmk-ap-activity-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column;
}
.cmk-ap-activity-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--cmk-line-soft);
  font-size: 0.95rem;
}
.cmk-ap-activity-row:last-child { border-bottom: 0; }
.cmk-ap-activity-row__icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--cmk-success-tint); color: var(--cmk-success);
}
.cmk-ap-activity-row--fail .cmk-ap-activity-row__icon { background: var(--cmk-red-tint); color: var(--cmk-red); }
.cmk-ap-activity-row--logout .cmk-ap-activity-row__icon { background: var(--cmk-line-soft); color: var(--cmk-ink-soft); }
.cmk-ap-activity-row__main strong { color: var(--cmk-ink); display: block; }
.cmk-ap-activity-row__main small { color: var(--cmk-mute); font-size: 0.85rem; }
.cmk-ap-activity-row__when { color: var(--cmk-mute); font-size: 0.875rem; white-space: nowrap; }

/* (5b) Slightly darker page tint behind stored-key cards on bright displays. */
.cmk-ap[data-cmk-ap="stored-keys"] {
  background: #eef1f5;            /* was #F6F7F9 */
  padding: 18px 16px;
  border-radius: 14px;
}
.cmk-ap[data-cmk-ap="stored-keys"] .cmk-ap__page-header,
.cmk-ap[data-cmk-ap="stored-keys"] .cmk-ap-subtabs {
  background: transparent;
}

/* Preserve the helpful look on stored keys: spacing between toolbar and cards */
.cmk-ap[data-cmk-ap="stored-keys"] .cmk-ap-card-list { gap: 14px; }
.cmk-ap[data-cmk-ap="stored-keys"] .cmk-ap-card { padding: 18px; }

/* Subtab counter chip darker in active state for visibility */
.cmk-ap-subtab.is-active .cmk-ap-subtab__count {
  background: var(--cmk-red);
  color: #fff;
}

/* =================================================================
 * v1.1.0.3 — Fixes from second-round review
 * ================================================================= */

/* Strengthen list-reset on the tab bar so theme/Divi can't paint disc bullets. */
.cmk-ap-tabbar,
.cmk-ap-tabbar__list,
.cmk-ap-tabbar__item,
.cmk-ap-mobile-menu__list,
.cmk-ap-mobile-menu__list li {
  list-style: none !important;
  list-style-type: none !important;
}
.cmk-ap-tabbar__item::before,
.cmk-ap-tabbar__item::marker,
.cmk-ap-tabbar__list > li::marker {
  content: none !important;
  display: none !important;
}
.cmk-ap-tabbar__list > li {
  margin: 0;
  padding: 0;
  background: none !important;
}

/* Always render the tab bar centered above content with consistent width. */
.cmk-ap-tabbar {
  max-width: 1200px;
  margin: 0 auto 24px;
}

/* ---- Dashboard hero: professional greeting, drop the chirp -------- */
.cmk-ap__greeting h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cmk-ink);
  margin: 0;
}
.cmk-ap__greeting .cmk-ap__date {
  color: var(--cmk-mute);
  font-size: 0.95rem;
  margin-top: 6px;
}

/* ---- Recent keys list inside Stored Keys tile -------------------- */
.cmk-ap-tile--keys .cmk-ap-tile__keylist {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
}
.cmk-ap-tile--keys .cmk-ap-tile__keylist li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--cmk-line-soft);
  font-size: 0.9rem;
}
.cmk-ap-tile--keys .cmk-ap-tile__keylist li:last-child { border-bottom: 0; }
.cmk-ap-tile__keyname {
  flex: 1 1 auto;
  font-weight: 600;
  color: var(--cmk-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.cmk-ap-tile__keyname small {
  display: block;
  font-weight: 400;
  color: var(--cmk-mute);
  font-size: 0.78rem;
  margin-top: 1px;
}
.cmk-ap-tile__reorder-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--cmk-red);
  color: #fff !important;
  border: 0;
  border-radius: 999px;
  text-decoration: none !important;
  transition: background-color .15s ease, transform .1s ease;
  white-space: nowrap;
}
.cmk-ap-tile__reorder-btn:hover {
  background: #b41a1a;
  transform: translateY(-1px);
  color: #fff !important;
}
.cmk-ap-tile__reorder-btn svg { width: 12px; height: 12px; }

/* Make the keys tile NOT a single-link wrapper anymore — see template change. */
.cmk-ap-tile--keys.cmk-ap-tile--has-list {
  cursor: default;
}
.cmk-ap-tile--keys .cmk-ap-tile__viewall {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--cmk-teal);
  text-decoration: none;
}
.cmk-ap-tile--keys .cmk-ap-tile__viewall:hover { text-decoration: underline; }

/* ---- Rewards: expiration blurb ---------------------------------- */
.cmk-ap-tile__expire-note {
  font-size: 0.78rem;
  color: var(--cmk-warn);
  margin-top: 6px !important;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}
.cmk-ap-tile__expire-note svg { width: 12px; height: 12px; flex: 0 0 auto; }

.cmk-ap-rewards-expire-callout {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  margin: 16px 0 8px;
  background: var(--cmk-warn-tint);
  border: 1px solid color-mix(in srgb, var(--cmk-warn) 40%, #fff);
  border-radius: var(--cmk-radius);
  font-size: 0.95rem;
  color: #6b5b22;
  align-items: flex-start;
}
.cmk-ap-rewards-expire-callout svg {
  flex: 0 0 auto;
  color: var(--cmk-warn);
  margin-top: 2px;
}
.cmk-ap-rewards-expire-callout strong { color: #6b5b22; }

/* =================================================================
 * Referrals page — proper styling for code card + fluid layout
 * ================================================================= */
.cmk-ap[data-cmk-ap="referrals"] {
  /* full-width like every other tab — no artificial max-width clamp.
     Top padding is now handled globally by `.cmk-ap` (v1.1.0.11). */
  margin-left: auto;
  margin-right: auto;
}

.cmk-ap-referral-code-card {
  background: #fff !important;
  border: 1px solid #d6dde5 !important;
  border-radius: var(--cmk-radius);
  padding: 22px 24px !important;
  margin-top: 16px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, .05);
}
.cmk-ap-referral-code-card h2 {
  font-size: 1.0625rem;
  margin: 0 0 14px !important;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--cmk-line-soft);
}

.cmk-ap-referral-code {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--cmk-bg);
  border: 1px dashed var(--cmk-line);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 0 0 12px;
  flex-wrap: wrap;
}
.cmk-ap-referral-code code {
  flex: 1 1 auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cmk-red);
  letter-spacing: .04em;
  background: transparent;
  padding: 0;
  word-break: break-all;
}

.cmk-ap-help {
  font-size: 0.95rem;
  color: var(--cmk-ink-soft);
  margin: 0 0 12px !important;
  line-height: 1.5;
}
.cmk-ap-help--muted { color: var(--cmk-mute); font-size: 0.85rem; }

/* Action button row layout */
.cmk-ap-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.cmk-ap-actions--row { flex-direction: row; }

/* Larger, layout-friendly button styles for the referral page actions */
.cmk-ap[data-cmk-ap="referrals"] .cmk-ap-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, transform .1s ease;
}
.cmk-ap[data-cmk-ap="referrals"] .cmk-ap-btn--primary {
  background: var(--cmk-red);
  color: #fff !important;
  border-color: var(--cmk-red);
}
.cmk-ap[data-cmk-ap="referrals"] .cmk-ap-btn--primary:hover {
  background: #b41a1a; border-color: #b41a1a; transform: translateY(-1px);
}
.cmk-ap[data-cmk-ap="referrals"] .cmk-ap-btn--ghost {
  background: #fff;
  color: var(--cmk-ink) !important;
  border-color: var(--cmk-line);
}
.cmk-ap[data-cmk-ap="referrals"] .cmk-ap-btn--ghost:hover {
  border-color: var(--cmk-mute);
  background: var(--cmk-bg);
}

/* "Refer A Friend" page header */
.cmk-ap[data-cmk-ap="referrals"] .cmk-ap-page-title { font-size: 1.5rem; margin: 0; }
.cmk-ap[data-cmk-ap="referrals"] .cmk-ap-page-sub { color: var(--cmk-mute); margin-top: 4px; }

/* Friends-signed-up banner */
.cmk-ap[data-cmk-ap="referrals"] .cmk-ap-rewards-balance {
  margin: 16px 0 0;
  padding: 28px 24px;
  border-radius: var(--cmk-radius);
}

/* Notice for referral redirect handler */
.cmk-ap-notice {
  padding: 12px 16px;
  border-radius: 10px;
  margin: 0 0 14px;
  font-size: 0.95rem;
  display: flex; gap: 10px; align-items: flex-start;
}
.cmk-ap-notice--success {
  background: var(--cmk-success-tint);
  border: 1px solid color-mix(in srgb, var(--cmk-success) 35%, #fff);
  color: #205c33;
}
.cmk-ap-notice--error {
  background: var(--cmk-red-tint);
  border: 1px solid color-mix(in srgb, var(--cmk-red) 35%, #fff);
  color: #7a1a1a;
}
.cmk-ap-notice__close {
  margin-left: auto;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: inherit;
  opacity: .6;
}
.cmk-ap-notice__close:hover { opacity: 1; }

/* ============================================================
 * v1.1.0.4 \u2014 Round 3 cleanup
 * ============================================================
 * 1. Alert stack at top of page (above nav)
 * 2. Softer, less-aggressive WC notice colors (coral, not crimson)
 * 3. Persistent Mail-In Service info banner
 * 4. Tighter dashboard greeting + date
 * 5. Mobile overhaul \u2014 icon next to title; less cramped tiles
 * 6. Snap N' Send Upload-Center CTA card
 * 7. Account Details / Addresses / Payment Methods polish
 * 8. Refer-a-Friend grid fix
 * ============================================================ */

/* ---- 1+2+3. Alert stack ---- */
.cmk-ap-alerts {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0 0 18px 0;
}
.cmk-ap-alerts:empty {
	display: none;
}

.cmk-ap-alert {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 12px 16px;
	border-radius: 10px;
	border: 1px solid transparent;
	font-size: 0.95rem;
	line-height: 1.45;
	text-decoration: none;
	transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}

/* WC notices wrapper: soften the default crimson WooCommerce uses. */
.cmk-ap-alert--wc {
	flex-direction: column;
	padding: 0;
	border: 0;
	background: transparent;
}
.cmk-ap-alert--wc .woocommerce-notices-wrapper,
.cmk-ap-alert--wc .woocommerce-message,
.cmk-ap-alert--wc .woocommerce-error,
.cmk-ap-alert--wc .woocommerce-info {
	margin: 0 0 8px 0;
	padding: 12px 16px;
	border-radius: 10px;
	border: 1px solid transparent;
	box-shadow: none;
	background-image: none;
	font-size: 0.95rem;
	line-height: 1.45;
	color: #2a2a2a;
}
.cmk-ap-alert--wc .woocommerce-message,
.cmk-ap-alert--wc .woocommerce-message::before {
	background-color: #e8f5ed;          /* soft mint */
	border-color: #b9dfc6;
	color: #1f6e3c;
}
.cmk-ap-alert--wc .woocommerce-error,
.cmk-ap-alert--wc .woocommerce-error::before {
	background-color: #fff0ec;          /* soft coral, NOT crimson */
	border-color: #f5c2b6;
	color: #a83a1f;
}
.cmk-ap-alert--wc .woocommerce-info,
.cmk-ap-alert--wc .woocommerce-info::before {
	background-color: #eaf3fb;          /* soft sky */
	border-color: #b8d6ec;
	color: #1f4f7a;
}

/* Strip Woo's left-edge color stripe \u2014 we use a full background color. */
.cmk-ap-alert--wc .woocommerce-message,
.cmk-ap-alert--wc .woocommerce-error,
.cmk-ap-alert--wc .woocommerce-info {
	border-left-width: 4px;
}

/* Mail-In Service info banner. */
.cmk-ap-alert--info {
	background: linear-gradient(135deg, #eaf3fb 0%, #f4f9fd 100%);
	border-color: #b8d6ec;
	color: #1f4f7a;
	cursor: pointer;
}
.cmk-ap-alert--info:hover {
	background: linear-gradient(135deg, #dfecf7 0%, #ecf4fb 100%);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(31, 79, 122, 0.12);
	color: #1f4f7a;
}
.cmk-ap-alert__icon {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 8px;
	background: rgba(31, 79, 122, 0.12);
	color: #1f4f7a;
}
.cmk-ap-alert__body {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}
.cmk-ap-alert__body strong {
	font-size: 0.98rem;
	color: #163a5a;
}
.cmk-ap-alert__body > span:not(:first-child) {
	color: #1f4f7a;
	font-size: 0.9rem;
}
.cmk-ap-alert__cta {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-weight: 600;
	font-size: 0.9rem;
	white-space: nowrap;
	color: #1f4f7a;
}

/* ---- 4. Dashboard greeting + date tightened ---- */
.cmk-ap__greeting {
	margin: 0 0 22px 0;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 14px;
	row-gap: 4px;
}
.cmk-ap__greeting h1 {
	margin: 0;
	font-size: clamp(1.6rem, 2.2vw, 2.1rem);
	line-height: 1.15;
}
.cmk-ap__greeting .cmk-ap__date {
	margin: 0;
	font-size: 0.95rem;
	color: #6b6b6b;
	font-weight: 500;
}

/* ---- 5. Mobile overhaul (< 720px): icon inline-floats, less cramped ---- */

/* ---- 6. Snap N' Send Upload-Center CTA card ---- */
.cmk-ap-cta-card {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 16px 20px;
	margin: 0 0 22px 0;
	border-radius: 14px;
	background: linear-gradient(135deg, #fff8e8 0%, #fffaf0 100%);
	border: 1px solid #f3d883;
	color: #6b4d10;
	text-decoration: none;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cmk-ap-cta-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 22px rgba(180, 130, 0, 0.16);
	color: #6b4d10;
}
.cmk-ap-cta-card__icon {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 12px;
	background: #f7c948;
	color: #4a3300;
}
.cmk-ap-cta-card__body {
	flex: 1;
	min-width: 0;
}
.cmk-ap-cta-card__body h2 {
	margin: 0 0 4px 0;
	font-size: 1.15rem;
	color: #4a3300;
}
.cmk-ap-cta-card__body p {
	margin: 0;
	font-size: 0.93rem;
	line-height: 1.45;
	color: #6b4d10;
}
.cmk-ap-cta-card__arrow {
	flex: 0 0 auto;
	color: #b58414;
}

/* ---- 7. Account Details / Addresses / Payment Methods polish ----
 * The default Woo form templates leak their legacy crimson labels and
 * small inputs onto our otherwise-modern panel. Bring them in line with
 * the rest of the design.
 */
.cmk-ap-wcform,
.woocommerce-account .woocommerce-MyAccount-content form.woocommerce-EditAccountForm,
.woocommerce-account .woocommerce-MyAccount-content form.edit-account,
.woocommerce-account .woocommerce-MyAccount-content form.woocommerce-address-fields,
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Addresses,
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-PaymentMethods {
	font-size: 0.95rem;
	color: #2a2a2a;
}
.woocommerce-account .woocommerce-MyAccount-content .form-row,
.woocommerce-account .woocommerce-MyAccount-content p.form-row {
	margin-bottom: 14px;
}
.woocommerce-account .woocommerce-MyAccount-content .form-row label,
.woocommerce-account .woocommerce-MyAccount-content fieldset legend {
	display: block;
	font-weight: 600;
	font-size: 0.9rem;
	color: #2a2a2a;
	margin: 0 0 4px 0;
	padding: 0;
}
.woocommerce-account .woocommerce-MyAccount-content .form-row .required {
	color: #c0392b;
	text-decoration: none;
}
.woocommerce-account .woocommerce-MyAccount-content .form-row input[type="text"],
.woocommerce-account .woocommerce-MyAccount-content .form-row input[type="email"],
.woocommerce-account .woocommerce-MyAccount-content .form-row input[type="tel"],
.woocommerce-account .woocommerce-MyAccount-content .form-row input[type="password"],
.woocommerce-account .woocommerce-MyAccount-content .form-row input[type="number"],
.woocommerce-account .woocommerce-MyAccount-content .form-row select,
.woocommerce-account .woocommerce-MyAccount-content .form-row textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d8dde3;
	border-radius: 8px;
	background: #fff;
	font-size: 0.95rem;
	box-shadow: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.woocommerce-account .woocommerce-MyAccount-content .form-row input:focus,
.woocommerce-account .woocommerce-MyAccount-content .form-row select:focus,
.woocommerce-account .woocommerce-MyAccount-content .form-row textarea:focus {
	outline: none;
	border-color: #f7c948;
	box-shadow: 0 0 0 3px rgba(247, 201, 72, 0.25);
}
.woocommerce-account .woocommerce-MyAccount-content fieldset {
	margin: 22px 0;
	padding: 18px;
	border: 1px solid #ececec;
	border-radius: 12px;
	background: #fafafa;
}
.woocommerce-account .woocommerce-MyAccount-content fieldset legend {
	padding: 0 8px;
	font-weight: 700;
	font-size: 1rem;
	color: #1c1c1c;
}

/* Address summary cards. */
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Addresses {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 16px;
	margin: 0 0 22px 0;
}
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Address {
	width: 100%;
	margin: 0;
	padding: 16px 18px;
	border: 1px solid #ececec;
	border-radius: 12px;
	background: #fff;
}
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Address-title {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin: 0 0 8px 0;
	border-bottom: 1px solid #f0f0f0;
	padding-bottom: 8px;
}
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Address-title h2,
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Address-title h3 {
	margin: 0;
	font-size: 1rem;
	font-weight: 700;
}
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Address-title .edit {
	font-size: 0.85rem;
	font-weight: 600;
	color: #b58414;
	text-decoration: none;
}
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Address-title .edit:hover {
	text-decoration: underline;
}

/* Payment methods table. */
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-MyAccount-paymentMethods {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 18px 0;
	border: 1px solid #ececec;
	border-radius: 12px;
	overflow: hidden;
}
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-MyAccount-paymentMethods th,
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-MyAccount-paymentMethods td {
	padding: 12px 14px;
	border-bottom: 1px solid #f0f0f0;
	text-align: left;
	font-size: 0.92rem;
}
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-MyAccount-paymentMethods th {
	background: #fafafa;
	font-weight: 700;
	color: #1c1c1c;
}
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-MyAccount-paymentMethods tr:last-child td {
	border-bottom: 0;
}

/* Submit buttons in legacy forms. */
.woocommerce-account .woocommerce-MyAccount-content form .button,
.woocommerce-account .woocommerce-MyAccount-content form button[type="submit"] {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 18px;
	border: 0;
	border-radius: 8px;
	background: #f7c948;
	color: #4a3300;
	font-weight: 700;
	font-size: 0.95rem;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.1s ease;
	text-decoration: none;
}
.woocommerce-account .woocommerce-MyAccount-content form .button:hover,
.woocommerce-account .woocommerce-MyAccount-content form button[type="submit"]:hover {
	background: #f3b71f;
	transform: translateY(-1px);
}

/* ---- 8. Refer-a-Friend grid + clean-up ---- */
.cmk-ap-referral-code-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 14px;
	margin: 0 0 18px 0;
}
.cmk-ap-referral-code-card {
	padding: 16px 18px;
	border-radius: 12px;
	border: 1px solid #ececec;
	background: #fff;
}
.cmk-ap-referral-code-card h3 {
	margin: 0 0 6px 0;
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #6b6b6b;
	font-weight: 700;
}
.cmk-ap-referral-code {
	display: inline-block;
	padding: 6px 10px;
	background: #fff8e8;
	border: 1px dashed #f3d883;
	border-radius: 6px;
	font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
	font-size: 1rem;
	font-weight: 700;
	color: #6b4d10;
	user-select: all;
}
@media (max-width: 720px) {
	.cmk-ap-referral-code-grid {
		grid-template-columns: 1fr;
	}
}


/* ============================================================
 * v1.1.0.5 — Round 4 cleanup (REWRITTEN PROPERLY in v1.1.0.6)
 * v1.1.0.6 — Account details, mobile order totals, mobile title alignment
 * ============================================================
 * - Mobile: tile icon + heading on the SAME LINE (icon left of h2),
 *   content uses 100% of card width (no float column shift).
 * - Snap N' Send tile uses big-number style matching Rewards/Referrals.
 * - Number font is tabular & feature-distinguished from the heading.
 * - Snap N' Send card: Application # below name, status on its own row.
 * - Upload Center CTA banner stacks vertically on mobile.
 * - Stored Keys header subtitle: bold count, refined typography, icon.
 * - Account Details: clean section / row / info-row layout.
 * - Mobile view-order Totals: stripped to a clean two-column list.
 * - Mobile dashboard tile titles: tightened against the icon.
 * ============================================================ */

/* ---- Tile big-number visually distinct from the heading ---- */
.cmk-ap-tile__big-number {
	font-variant-numeric: tabular-nums;
	letter-spacing: -0.02em;
	color: var(--cmk-ink, #111827);
	margin: 4px 0 6px;
	font-size: 1.65rem;
	font-weight: 700;
	line-height: 1.1;
}
.cmk-ap-tile__big-number span {
	font-variant-numeric: normal;
	letter-spacing: 0.05em;
	font-weight: 600;
	color: var(--cmk-mute, #6b7280);
	text-transform: uppercase;
	font-size: 0.78rem;
	margin-left: 4px;
}

/* ---- Stored Keys header subtitle polish ---- */
.cmk-ap-stored-keys__sub {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 4px 0 0 !important;
	padding: 6px 12px;
	background: #f5f5f5;
	border-radius: 999px;
	font-size: 0.85rem;
	color: #555;
	font-weight: 500;
	border: 1px solid #e5e7eb;
}
.cmk-ap-stored-keys__sub-icon {
	flex: 0 0 auto;
	color: #b58414;
}
.cmk-ap-stored-keys__sub strong {
	font-weight: 700;
	color: #1c1c1c;
	font-variant-numeric: tabular-nums;
}

/* ---- Snap N' Send card: APP # placement & layout ---- */
.cmk-ap-app-card__head {
	margin-bottom: 8px;
}
.cmk-ap-app-card__title {
	margin: 0 0 2px;
	font-size: 1.05rem;
	line-height: 1.3;
	word-break: break-word;
}
.cmk-ap-app-card__id {
	margin: 0 !important;
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #888;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}
.cmk-ap-app-card__status-row {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 10px;
}
.cmk-ap-status__icon {
	margin-right: 2px;
}
.cmk-ap-status--not_supported {
	background: #f3f4f6;
	color: #4b5563;
	border-color: #d1d5db;
}

/* ---- Snap N' Send: 1 column on desktop (was 2) so long notes don't
       throw the layout off-balance. ---- */
.cmk-ap-card-list--single {
	display: grid !important;
	grid-template-columns: 1fr !important;
	gap: 14px;
}

/* =============================================================
 * Mobile overhaul (≤720px): icon INLINE with title, body 100% wide
 * Uses CSS Grid + display:contents so children of __body reparent
 * onto the parent grid without HTML changes.
 * ============================================================= */
@media (max-width: 720px) {
	.cmk-ap-tiles {
		gap: 10px;
	}
	.cmk-ap-tile {
		display: grid;
		grid-template-columns: auto 1fr;
		grid-template-areas:
			"icon title"
			"body  body";
		column-gap: 10px;
		row-gap: 6px;
		align-items: center;
		padding: 14px 14px 16px;
		min-height: 0;
	}
	.cmk-ap-tile__icon {
		grid-area: icon;
		float: none;
		margin: 0;
		width: 36px;
		height: 36px;
		padding: 6px;
		display: flex;
		align-items: center;
		justify-content: center;
		flex: 0 0 auto;
	}
	.cmk-ap-tile__icon svg {
		width: 22px;
		height: 22px;
	}
	/* Reparent body children onto the parent grid so the heading sits
	   in the icon row and everything else fills row 2. */
	.cmk-ap-tile__body {
		display: contents;
	}
	.cmk-ap-tile__body > h2 {
		grid-area: title;
		grid-column: title;
		margin: 0;
		font-size: 1.05rem;
		line-height: 1.25;
		font-weight: 700;
		text-align: left;          /* item 6 — title flush against icon */
	}
	.cmk-ap-tile__body > *:not(h2) {
		grid-column: 1 / -1;       /* full card width on row 2 */
	}
	.cmk-ap-tile__big-number {
		font-size: 1.5rem;
		margin: 6px 0 4px;
	}
	.cmk-ap-tile__meta,
	.cmk-ap-tile__highlight {
		font-size: 0.88rem;
		margin: 0;
	}
	.cmk-ap-tile__keylist {
		margin-top: 8px;
	}
	.cmk-ap-tile__keylist li {
		padding: 6px 0;
	}
	.cmk-ap-tile__keyname {
		font-size: 0.92rem;
	}
	.cmk-ap-badge {
		top: 4px;
		right: -4px;
	}
	.cmk-ap__greeting h1 {
		font-size: 1.4rem;
	}
	.cmk-ap__greeting .cmk-ap__date {
		font-size: 0.85rem;
	}
	.cmk-ap-alert {
		padding: 10px 12px;
		font-size: 0.88rem;
		gap: 10px;
	}
	.cmk-ap-alert__cta {
		display: none;
	}
	.cmk-ap-alert__icon {
		width: 28px;
		height: 28px;
	}

	/* ---- Snap N' Send Upload-Center CTA card ---- */
	.cmk-ap-cta-card {
		display: grid;
		grid-template-columns: auto 1fr;
		grid-template-areas:
			"icon  title"
			"body  body"
			"arrow arrow";
		column-gap: 12px;
		row-gap: 6px;
		align-items: center;
		padding: 14px 16px;
	}
	.cmk-ap-cta-card__icon {
		grid-area: icon;
		width: 44px;
		height: 44px;
	}
	.cmk-ap-cta-card__icon svg {
		width: 24px;
		height: 24px;
	}
	.cmk-ap-cta-card__body {
		display: contents;
	}
	.cmk-ap-cta-card__body > h2 {
		grid-area: title;
		margin: 0;
		font-size: 1.05rem;
		line-height: 1.25;
		text-align: left;
	}
	.cmk-ap-cta-card__body > p {
		grid-column: 1 / -1;
		margin: 0;
		font-size: 0.9rem;
		line-height: 1.45;
	}
	.cmk-ap-cta-card__arrow {
		display: none;            /* arrow redundant on mobile */
	}

	/* ---- Snap N' Send application card mobile ---- */
	.cmk-ap-app-card {
		display: grid;
		grid-template-columns: auto 1fr;
		grid-template-areas:
			"media title"
			"body  body";
		column-gap: 12px;
		row-gap: 8px;
		align-items: center;
		padding: 14px;
	}
	.cmk-ap-app-card .cmk-ap-card__media {
		grid-area: media;
		width: 64px;
		height: 64px;
	}
	.cmk-ap-app-card .cmk-ap-card__body {
		display: contents;
	}
	.cmk-ap-app-card .cmk-ap-card__body > .cmk-ap-app-card__head {
		grid-area: title;
		margin: 0;
	}
	.cmk-ap-app-card .cmk-ap-card__body > *:not(.cmk-ap-app-card__head) {
		grid-column: 1 / -1;
	}
	.cmk-ap-app-card__title {
		font-size: 1rem;
	}

	/* ---- Mobile view-order Totals: kill the bordered/boxed table look
		   in favor of a clean flex list. Desktop styles untouched. ---- */
	.cmk-ap-order-totals,
	.cmk-ap-order-totals tbody,
	.cmk-ap-order-totals tr,
	.cmk-ap-order-totals th,
	.cmk-ap-order-totals td {
		display: block;
		width: 100%;
		border: 0 !important;
		padding: 0;
		text-align: left;
		background: transparent !important;
	}
	.cmk-ap-order-totals tr {
		display: flex;
		justify-content: space-between;
		align-items: baseline;
		gap: 10px;
		padding: 8px 0;
		border-bottom: 1px dashed #e5e7eb !important;
	}
	.cmk-ap-order-totals tr:last-child {
		border-bottom: 0 !important;
		padding-top: 12px;
		margin-top: 4px;
		border-top: 2px solid #1f2937 !important;
		font-size: 1.05rem;
	}
	.cmk-ap-order-totals tr:last-child th,
	.cmk-ap-order-totals tr:last-child td {
		font-weight: 700;
		font-size: 1.05rem;
	}
	.cmk-ap-order-totals th {
		color: var(--cmk-ink-soft, #4b5563);
		font-weight: 500;
		font-size: 0.92rem;
	}
	.cmk-ap-order-totals td {
		text-align: right;
		font-weight: 600;
		font-variant-numeric: tabular-nums;
		font-size: 0.95rem;
		color: var(--cmk-ink, #111827);
	}
}

/* Smallest phones — tighten further */
@media (max-width: 380px) {
	.cmk-ap-tile__icon {
		width: 32px;
		height: 32px;
		padding: 5px;
	}
	.cmk-ap-tile__icon svg {
		width: 20px;
		height: 20px;
	}
	.cmk-ap-app-card .cmk-ap-card__media {
		width: 56px;
		height: 56px;
	}
	.cmk-ap-cta-card__icon {
		width: 40px;
		height: 40px;
	}
}

/* =============================================================
 * v1.1.0.6 — Account Details page polish
 * The previous template had no styles for these classes at all,
 * which is why the page looked unstyled / "messy".
 * ============================================================= */
.cmk-ap--account-details {
	max-width: 760px;
}
.cmk-ap-account-form {
	display: flex;
	flex-direction: column;
	gap: 18px;
	margin-top: 8px;
}
.cmk-ap-acct-section {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	padding: 22px 24px;
	box-shadow: 0 2px 6px rgba(15, 23, 42, .04);
}
.cmk-ap-acct-section__title {
	margin: 0 0 4px;
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--cmk-ink, #111827);
	display: flex;
	align-items: center;
	gap: 8px;
}
.cmk-ap-acct-section__title svg {
	color: var(--cmk-blue, #2563eb);
	flex: 0 0 auto;
}
.cmk-ap-acct-section__hint {
	margin: 0 0 14px;
	color: var(--cmk-mute, #6b7280);
	font-size: 0.9rem;
}
.cmk-ap-acct-section .cmk-ap-field {
	margin-bottom: 14px;
}
.cmk-ap-acct-section .cmk-ap-field:last-child {
	margin-bottom: 0;
}
.cmk-ap-acct-section .cmk-ap-field small {
	display: block;
	margin-top: 4px;
	color: var(--cmk-mute, #6b7280);
	font-size: 0.82rem;
}
.cmk-ap-acct-section .required {
	color: var(--cmk-red, #dc2626);
	margin-left: 2px;
}

/* The base .cmk-ap-field__label uses flex-direction: column which made the
 * inline `<span class="required">*</span>` wrap onto its own line. On the
 * account-details form we want a normal inline label so the asterisk sits
 * right next to the label text. */
.cmk-ap-acct-section .cmk-ap-field__label {
	display: inline-block;
	flex-direction: row;
	gap: 0;
}
.cmk-ap-acct-section .cmk-ap-field__label .required {
	display: inline;
}

/* First-name / last-name on one row on desktop */
.cmk-ap-acct-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}
.cmk-ap-acct-row .cmk-ap-field {
	margin-bottom: 14px;
}

/* "info row": label/value on the left, button on the right */
.cmk-ap-acct-info-row {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
	padding: 12px 0;
	border-top: 1px solid #f1f5f9;
}
.cmk-ap-acct-info-row:first-of-type {
	border-top: 0;
	padding-top: 4px;
}
.cmk-ap-acct-info-row dt {
	font-weight: 600;
	color: var(--cmk-ink, #111827);
	margin: 0 0 4px;
	font-size: 0.92rem;
}
.cmk-ap-acct-info-row dd {
	margin: 0;
	color: var(--cmk-ink-soft, #4b5563);
	font-size: 0.92rem;
	line-height: 1.5;
	word-break: break-word;
}
.cmk-ap-acct-info-row dd code {
	background: #f3f4f6;
	padding: 1px 6px;
	border-radius: 4px;
	font-size: 0.85em;
}
.cmk-ap-acct-info-row > div:first-child {
	flex: 1 1 auto;
	min-width: 0;
}
.cmk-ap-acct-info-row > div:last-child {
	flex: 0 0 auto;
}

/* Security tip callout */
.cmk-ap-callout {
	border-radius: 10px;
	padding: 12px 14px;
	margin: 14px 0 0;
	font-size: 0.88rem;
	line-height: 1.5;
}
.cmk-ap-callout strong {
	display: block;
	margin-bottom: 4px;
	font-weight: 700;
}
.cmk-ap-callout p {
	margin: 0;
}
.cmk-ap-callout--info {
	background: var(--cmk-blue-tint, #eef4ff);
	border: 1px solid color-mix(in srgb, var(--cmk-blue, #2563eb) 22%, #fff);
	color: var(--cmk-ink, #111827);
}

/* Action bar at bottom of form */
.cmk-ap-acct-actions {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	align-items: center;
	margin: 4px 0 0;
}

/* Password strength bar (already present markup, just ensure rendered well) */
.cmk-ap-pw-strength[hidden] { display: none !important; }
.cmk-ap-pw-strength {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 8px;
}
.cmk-ap-pw-strength__bar {
	flex: 1 1 auto;
	height: 6px;
	background: #e5e7eb;
	border-radius: 999px;
	overflow: hidden;
}
.cmk-ap-pw-strength__bar span {
	display: block;
	height: 100%;
	width: 0%;
	background: #ef4444;
	transition: width .2s ease, background .2s ease;
}
.cmk-ap-pw-strength--1 .cmk-ap-pw-strength__bar span { width: 25%; background: #ef4444; }
.cmk-ap-pw-strength--2 .cmk-ap-pw-strength__bar span { width: 50%; background: #f59e0b; }
.cmk-ap-pw-strength--3 .cmk-ap-pw-strength__bar span { width: 75%; background: #eab308; }
.cmk-ap-pw-strength--4 .cmk-ap-pw-strength__bar span { width: 100%; background: #22c55e; }
.cmk-ap-pw-strength__label {
	font-size: 0.82rem;
	color: var(--cmk-mute, #6b7280);
	flex: 0 0 auto;
	min-width: 80px;
	text-align: right;
}

/* Ghost / danger-ghost button variants used in security section */
.cmk-ap-btn--ghost {
	background: #fff;
	color: var(--cmk-ink, #111827);
	border: 1px solid #d1d5db;
}
.cmk-ap-btn--ghost:hover {
	background: #f3f4f6;
}
.cmk-ap-btn--danger-ghost {
	background: #fff;
	color: #b91c1c;
	border: 1px solid #fca5a5;
}
.cmk-ap-btn--danger-ghost:hover:not(:disabled) {
	background: #fef2f2;
}
.cmk-ap-btn--danger-ghost:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Mobile account-details adjustments */
@media (max-width: 720px) {
	.cmk-ap-acct-section {
		padding: 16px;
		border-radius: 12px;
	}
	.cmk-ap-acct-row {
		grid-template-columns: 1fr;
	}
	.cmk-ap-acct-info-row {
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
	}
	.cmk-ap-acct-info-row > div:last-child {
		display: flex;
	}
	.cmk-ap-acct-info-row > div:last-child .cmk-ap-btn {
		width: 100%;
		justify-content: center;
	}
	.cmk-ap-acct-actions {
		flex-direction: column-reverse;
		align-items: stretch;
	}
	.cmk-ap-acct-actions .cmk-ap-btn {
		width: 100%;
		justify-content: center;
	}
}

/* v1.1.0.6 — Order view actions bar (Invoice button) */
.cmk-ap-order-actions-bar {
	display: flex;
	gap: 8px;
	margin: 0 0 8px;
	flex-wrap: wrap;
}
.cmk-ap-order-actions-bar .cmk-ap-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}
.cmk-ap-order-actions-bar .cmk-ap-btn svg {
	flex: 0 0 auto;
}
@media (max-width: 720px) {
	.cmk-ap-order-actions-bar {
		flex-direction: column;
	}
	.cmk-ap-order-actions-bar .cmk-ap-btn {
		width: 100%;
		justify-content: center;
	}
}

/* ============================================================
 * v1.1.0.7 — Tile title alignment hardening
 * ============================================================
 * Theme (Divi) ships h2 styles like:
 *   .et_pb_text_1 h2 { text-align: center; margin-top: 0; }
 * which beat our generic .cmk-ap-tile__body h2 rules. We apply
 * !important + a higher-specificity selector and extend the mobile
 * grid layout up to 980px so it covers tablets / the 767px breakpoint
 * Divi uses, not just narrow phones.
 * ============================================================ */

/* Desktop: small downward nudge so the title visually centers with the
   icon block (per user feedback — margin-top: 11px) */
.cmk-ap .cmk-ap-tile__body h2,
.cmk-ap .cmk-ap-tile__body > h2 {
	text-align: left !important;
	margin-top: 11px !important;
	margin-bottom: 8px !important;
}

/* Mobile / tablet: push the breakpoint to 980px so we catch portrait
   tablets and any theme that triggers mobile styles at 767px or 768px. */
@media (max-width: 980px) {
	.cmk-ap-tile {
		display: grid !important;
		grid-template-columns: auto 1fr !important;
		grid-template-areas:
			"icon title"
			"body  body" !important;
		column-gap: 12px;
		row-gap: 4px;
		align-items: center;
		padding: 14px 14px 16px;
		min-height: 0;
	}
	.cmk-ap-tile__icon {
		grid-area: icon !important;
		float: none !important;
		margin: 0 !important;
		width: 36px;
		height: 36px;
		padding: 6px;
		display: flex !important;
		align-items: center;
		justify-content: center;
		flex: 0 0 auto;
	}
	.cmk-ap-tile__icon svg {
		width: 22px;
		height: 22px;
	}
	.cmk-ap-tile__body {
		display: contents !important;
		overflow: visible !important;
	}
	.cmk-ap .cmk-ap-tile__body > h2,
	.cmk-ap .cmk-ap-tile__body h2 {
		grid-area: title !important;
		grid-column: title !important;
		grid-row: 1 !important;
		margin: 0 !important;
		margin-top: 19px !important;     /* per user — visually centers with 36px icon */
		font-size: 1.05rem !important;
		line-height: 1.25 !important;
		font-weight: 700 !important;
		text-align: left !important;
	}
	.cmk-ap-tile__body > *:not(h2) {
		grid-column: 1 / -1 !important;
	}
}

/* Smallest phones — proportional nudge (smaller icon → smaller offset) */
@media (max-width: 380px) {
	.cmk-ap .cmk-ap-tile__body > h2,
	.cmk-ap .cmk-ap-tile__body h2 {
		margin-top: 14px !important;
	}
}

/* ============================================================
 * v1.1.0.7 — Addresses page & Payment Methods page styling
 * ============================================================ */

/* ----- Addresses grid ----- */
.cmk-ap-address-grid {
	display: grid;
	gap: 16px;
	grid-template-columns: 1fr;
}
@media (min-width: 720px) {
	.cmk-ap-address-grid--2col {
		grid-template-columns: 1fr 1fr;
	}
}

.cmk-ap-address-card {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	padding: 22px 24px;
	box-shadow: 0 2px 6px rgba(15, 23, 42, .04);
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.cmk-ap-address-card__head {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}
.cmk-ap-address-card__icon {
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: var(--cmk-blue-tint, #eef4ff);
	color: var(--cmk-blue, #2563eb);
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
}
.cmk-ap-address-card__title {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--cmk-ink, #111827);
	flex: 1 1 auto;
}
.cmk-ap-address-card__edit {
	font-size: 0.82rem;
	color: var(--cmk-blue, #2563eb);
	text-decoration: none;
	font-weight: 600;
	white-space: nowrap;
}
.cmk-ap-address-card__edit:hover { text-decoration: underline; }
.cmk-ap-address-card__body {
	font-style: normal;
	line-height: 1.55;
	color: var(--cmk-ink-soft, #4b5563);
	font-size: 0.95rem;
	min-height: 0;
}
.cmk-ap-address-card__empty {
	color: var(--cmk-mute, #6b7280);
	font-style: italic;
}
.cmk-ap-address-card__foot {
	display: flex;
	gap: 8px;
	margin-top: auto;
}
.cmk-ap-address-card__foot .cmk-ap-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

/* Edit-address form: re-uses .cmk-ap-acct-section. WC's woocommerce_form_field
 * outputs <p class="form-row form-row-wide">…</p> wrappers — style those so
 * they look consistent with the rest of the redesigned forms. */
.cmk-ap-edit-address-fields .form-row,
.cmk-ap-edit-address-fields .woocommerce-input-wrapper {
	display: block;
	width: 100%;
	margin-bottom: 14px;
}
.cmk-ap-edit-address-fields .form-row label {
	display: block;
	font-weight: 600;
	font-size: 0.875rem;
	margin-bottom: 6px;
	color: var(--cmk-ink, #111827);
}
.cmk-ap-edit-address-fields .form-row label .required {
	color: var(--cmk-red, #dc2626);
	margin-left: 2px;
	text-decoration: none;
	border: 0;
}
.cmk-ap-edit-address-fields input,
.cmk-ap-edit-address-fields select,
.cmk-ap-edit-address-fields textarea,
.cmk-ap-edit-address-fields .select2-selection {
	width: 100%;
	padding: 10px 12px !important;
	border: 1px solid #d1d5db !important;
	border-radius: 8px !important;
	font-size: 0.95rem;
	background: #fff;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.cmk-ap-edit-address-fields input:focus,
.cmk-ap-edit-address-fields select:focus,
.cmk-ap-edit-address-fields textarea:focus {
	border-color: var(--cmk-blue, #2563eb) !important;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--cmk-blue, #2563eb) 22%, transparent) !important;
	outline: none;
}
.cmk-ap-edit-address-fields .select2-selection {
	height: auto !important;
	min-height: 42px;
	display: flex;
	align-items: center;
}
.cmk-ap-edit-address-fields .select2-selection__rendered {
	padding-left: 0 !important;
	line-height: 1.4 !important;
}

/* Two-column row for first/last name on desktop, when WC outputs them as
 * separate form rows. */
@media (min-width: 720px) {
	.cmk-ap-edit-address-fields .form-row-first,
	.cmk-ap-edit-address-fields .form-row-last {
		display: inline-block;
		width: calc(50% - 7px);
		vertical-align: top;
	}
	.cmk-ap-edit-address-fields .form-row-first { margin-right: 12px; }
}

/* ----- Payment Methods ----- */
.cmk-ap-payment-methods {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.cmk-ap-payment-card {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 16px 20px;
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: 16px;
	align-items: center;
	box-shadow: 0 2px 4px rgba(15, 23, 42, .03);
	transition: border-color .15s ease, box-shadow .15s ease;
}
.cmk-ap-payment-card:hover {
	border-color: #b8c2cc;
	box-shadow: 0 4px 10px rgba(15, 23, 42, .07);
}
.cmk-ap-payment-card.is-default {
	border-color: var(--cmk-success, #16a34a);
	box-shadow: 0 0 0 1px color-mix(in srgb, var(--cmk-success, #16a34a) 18%, transparent);
}
.cmk-ap-payment-card__brand {
	width: 52px;
	height: 36px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--cmk-pm-color, #374151);
	color: #fff;
	flex: 0 0 auto;
}
.cmk-ap-payment-card__info {
	min-width: 0;
}
.cmk-ap-payment-card__title {
	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
	font-size: 1rem;
	color: var(--cmk-ink, #111827);
}
.cmk-ap-payment-card__title strong {
	font-weight: 700;
}
.cmk-ap-payment-card__num {
	font-variant-numeric: tabular-nums;
	color: var(--cmk-ink-soft, #4b5563);
	font-size: 0.92rem;
	letter-spacing: 0.02em;
}
.cmk-ap-payment-card__default-badge {
	background: var(--cmk-success-tint, #dcfce7);
	color: var(--cmk-success, #166534);
	font-size: 0.7rem;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 999px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}
.cmk-ap-payment-card__expires {
	margin-top: 4px;
	color: var(--cmk-mute, #6b7280);
	font-size: 0.85rem;
}
.cmk-ap-payment-card__actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	justify-content: flex-end;
}
.cmk-ap-payment-card__actions .cmk-ap-btn {
	font-size: 0.82rem;
	padding: 6px 12px;
}

.cmk-ap-payment-methods__add {
	margin: 18px 0 0;
}
.cmk-ap-payment-methods__add .cmk-ap-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

@media (max-width: 640px) {
	.cmk-ap-payment-card {
		grid-template-columns: auto 1fr;
		grid-template-areas:
			"brand info"
			"actions actions";
	}
	.cmk-ap-payment-card__brand   { grid-area: brand; }
	.cmk-ap-payment-card__info    { grid-area: info; }
	.cmk-ap-payment-card__actions {
		grid-area: actions;
		justify-content: flex-start;
		margin-top: 6px;
	}
	.cmk-ap-payment-card__actions .cmk-ap-btn {
		flex: 1 1 auto;
		justify-content: center;
	}
}


/* ============================================================
 * v1.1.0.9 — Refer-A-Friend full rebuild
 *   • $10 / $20 / $100 reward hero
 *   • Gift-card progress bar (3 referrals → $100 Amazon)
 *   • Polished "How it works" with icons
 *   • Multi-code list with real expiry dates (90 days)
 * ============================================================ */

/* Page wrapper width is now controlled by .cmk-ap[data-cmk-ap="referrals"]
   (max-width clamp removed earlier in this file). All inner cards fill. */
.cmk-ap[data-cmk-ap="referrals"] .cmk-ap-info-card {
	width: 100%;
	max-width: none;
}

/* ---------- Reward tiles hero ---------- */
.cmk-ap-referrals-hero {
	margin: 18px 0 18px;
}
.cmk-ap-referrals-hero__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
}
.cmk-ap-reward-tile {
	position: relative;
	padding: 22px 20px;
	border-radius: 14px;
	border: 1px solid var(--cmk-line);
	background: #fff;
	text-align: center;
	overflow: hidden;
	transition: transform .15s, box-shadow .15s;
}
.cmk-ap-reward-tile:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 22px rgba(15, 23, 42, .08);
}
.cmk-ap-reward-tile__amount {
	font-size: 2.6rem;
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.02em;
	color: var(--cmk-ink);
	margin-bottom: 6px;
}
.cmk-ap-reward-tile__label {
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--cmk-ink);
	margin-bottom: 4px;
}
.cmk-ap-reward-tile__sub {
	font-size: 0.82rem;
	color: var(--cmk-mute);
	line-height: 1.4;
}
.cmk-ap-reward-tile--friend {
	background: linear-gradient(140deg, #eff6ff 0%, #ffffff 70%);
	border-color: #c5dafa;
}
.cmk-ap-reward-tile--friend .cmk-ap-reward-tile__amount { color: #1d4ed8; }
.cmk-ap-reward-tile--you {
	background: linear-gradient(140deg, #ecfdf5 0%, #ffffff 70%);
	border-color: #b9e8c9;
}
.cmk-ap-reward-tile--you .cmk-ap-reward-tile__amount { color: #047857; }
.cmk-ap-reward-tile--bonus {
	background: linear-gradient(140deg, #fff7ed 0%, #fffbf4 60%, #ffffff 100%);
	border-color: #fbcd92;
	box-shadow: 0 6px 18px rgba(217, 119, 6, .12);
}
.cmk-ap-reward-tile--bonus .cmk-ap-reward-tile__amount { color: #c2410c; }
.cmk-ap-reward-tile__ribbon {
	position: absolute;
	top: 10px;
	right: -32px;
	transform: rotate(35deg);
	background: #c2410c;
	color: #fff;
	font-size: 0.65rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	padding: 3px 36px;
	box-shadow: 0 2px 6px rgba(194, 65, 12, .3);
}

/* ---------- Stats + progress bar ---------- */
.cmk-ap-referrals-progress {
	margin: 0 0 22px;
	padding: 22px 24px;
	background: #fff;
	border: 1px solid var(--cmk-line);
	border-radius: var(--cmk-radius);
}
.cmk-ap-referrals-progress__counts {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	padding-bottom: 18px;
	margin-bottom: 18px;
	border-bottom: 1px solid var(--cmk-line-soft);
}
.cmk-ap-referrals-progress__count {
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.cmk-ap-referrals-progress__num {
	font-size: 2rem;
	font-weight: 700;
	color: var(--cmk-ink);
	line-height: 1.1;
}
.cmk-ap-referrals-progress__num .woocommerce-Price-amount,
.cmk-ap-referrals-progress__num bdi {
	font: inherit;
	color: inherit;
}
.cmk-ap-referrals-progress__lbl {
	font-size: 0.85rem;
	color: var(--cmk-mute);
	letter-spacing: 0.02em;
}
.cmk-ap-referrals-progress__bar-wrap {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.cmk-ap-referrals-progress__bar-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	font-size: 0.92rem;
	color: var(--cmk-ink);
}
.cmk-ap-referrals-progress__bar-count {
	font-weight: 600;
	color: #c2410c;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}
.cmk-ap-referrals-progress__bar {
	position: relative;
	height: 38px;
	border-radius: 999px;
	background: #fef3c7;
	overflow: hidden;
	display: flex;
	align-items: center;
	padding: 0 4px;
}
.cmk-ap-referrals-progress__bar-fill {
	position: absolute;
	left: 0; top: 0; bottom: 0;
	background: linear-gradient(90deg, #f59e0b 0%, #d97706 60%, #b45309 100%);
	border-radius: 999px;
	transition: width .4s ease;
	z-index: 1;
}
.cmk-ap-referrals-progress__pip {
	position: relative;
	z-index: 2;
	flex: 1 1 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 30px;
	margin: 0 3px;
	border-radius: 999px;
	background: rgba(255,255,255,.55);
	color: #92400e;
	font-weight: 700;
	font-size: 0.85rem;
	border: 1px solid rgba(217,119,6,.25);
	transition: all .2s;
}
.cmk-ap-referrals-progress__pip.is-filled {
	background: #fff;
	color: #b45309;
	border-color: rgba(255,255,255,.95);
	box-shadow: 0 2px 6px rgba(0,0,0,.15);
}

/* ---------- "How it works" with icons ---------- */
.cmk-ap-referrals-howto { margin: 0 0 22px; }
.cmk-ap-referrals-howto h3 {
	margin: 0 0 16px;
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--cmk-ink-soft);
	font-weight: 700;
}
.cmk-ap-referrals-steps {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 14px;
	counter-reset: cmk-step;
}
.cmk-ap-referrals-steps > li {
	position: relative;
	display: flex;
	gap: 14px;
	padding: 18px 18px 18px 22px;
	background: var(--cmk-bg);
	border: 1px solid var(--cmk-line);
	border-radius: 12px;
	align-items: flex-start;
	counter-increment: cmk-step;
}
.cmk-ap-referrals-steps > li::before {
	content: counter(cmk-step);
	position: absolute;
	top: -10px;
	left: 16px;
	width: 24px;
	height: 24px;
	border-radius: 999px;
	background: var(--cmk-ink);
	color: #fff;
	font-size: 0.78rem;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 6px rgba(0,0,0,.18);
}
.cmk-ap-referrals-steps > li.cmk-ap-referrals-step--bonus {
	background: linear-gradient(140deg, #fff7ed 0%, #fffbf4 70%);
	border-color: #fbcd92;
}
.cmk-ap-referrals-steps > li.cmk-ap-referrals-step--bonus::before {
	background: #c2410c;
}
.cmk-ap-referrals-step__icon {
	flex-shrink: 0;
	width: 42px;
	height: 42px;
	border-radius: 10px;
	background: #fff;
	border: 1px solid var(--cmk-line);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--cmk-red);
}
.cmk-ap-referrals-step--bonus .cmk-ap-referrals-step__icon {
	color: #c2410c;
	border-color: #fbcd92;
	background: #fff;
}
.cmk-ap-referrals-step__body {
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.cmk-ap-referrals-step__title {
	font-size: 0.98rem;
	color: var(--cmk-ink);
	font-weight: 700;
	line-height: 1.3;
}
.cmk-ap-referrals-step__txt {
	color: var(--cmk-ink-soft);
	font-size: 0.88rem;
	line-height: 1.5;
}

/* ---------- "Your referral codes" ---------- */
.cmk-ap-referral-codes { margin: 0; }
.cmk-ap-referral-codes__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
	flex-wrap: wrap;
}
.cmk-ap-referral-codes__head h2 {
	margin: 0;
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--cmk-ink);
}
.cmk-ap-referral-codes__count {
	color: var(--cmk-mute);
	font-size: 0.85rem;
	white-space: nowrap;
}

/* ---------- Coupon card list ---------- */
.cmk-ap-coupon-list {
	list-style: none;
	margin: 0 0 14px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.cmk-ap-coupon {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 14px 16px;
	background: #fff;
	border: 1px solid var(--cmk-line);
	border-radius: 10px;
	transition: border-color .15s, background .15s;
}
.cmk-ap-coupon.is-active {
	border-color: color-mix(in srgb, var(--cmk-success) 35%, var(--cmk-line));
	background: color-mix(in srgb, var(--cmk-success-tint) 50%, #fff);
}
.cmk-ap-coupon.is-expired,
.cmk-ap-coupon.is-inactive {
	background: var(--cmk-bg);
	opacity: 0.85;
}
.cmk-ap-coupon.is-expired .cmk-ap-coupon__code {
	text-decoration: line-through;
	color: var(--cmk-mute);
}
.cmk-ap-coupon__main {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.cmk-ap-coupon__code-wrap {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}
.cmk-ap-coupon__code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--cmk-ink);
	background: transparent;
	padding: 0;
	letter-spacing: 0.02em;
	word-break: break-all;
}
.cmk-ap-coupon__badge {
	display: inline-flex;
	align-items: center;
	padding: 2px 9px;
	border-radius: 999px;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	white-space: nowrap;
	flex-shrink: 0;
}
.cmk-ap-coupon__badge--is-active {
	background: var(--cmk-success-tint);
	color: #205c33;
}
.cmk-ap-coupon__badge--is-expired {
	background: var(--cmk-red-tint);
	color: #7a1a1a;
}
.cmk-ap-coupon__badge--is-inactive {
	background: var(--cmk-line);
	color: var(--cmk-ink-soft);
}
.cmk-ap-coupon__meta {
	display: flex;
	align-items: center;
	gap: 14px;
	color: var(--cmk-mute);
	font-size: 0.82rem;
}
.cmk-ap-coupon__expiry {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}
.cmk-ap-coupon__copy {
	flex-shrink: 0;
}

/* ---------- Action buttons (with caps styling option) ---------- */
.cmk-ap-referrals-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 6px;
}
.cmk-ap-btn--caps {
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-weight: 700;
}

/* ---------- Mobile ---------- */
@media (max-width: 980px) {
	.cmk-ap-referrals-hero__grid {
		grid-template-columns: 1fr;
		gap: 10px;
	}
	.cmk-ap-referrals-steps {
		grid-template-columns: 1fr;
	}
}
@media (max-width: 640px) {
	.cmk-ap-referrals-progress {
		padding: 18px 16px;
	}
	.cmk-ap-referrals-progress__counts {
		grid-template-columns: 1fr;
		gap: 14px;
	}
	.cmk-ap-referrals-progress__num {
		font-size: 1.6rem;
	}
	.cmk-ap-referrals-progress__bar-head {
		flex-direction: column;
		align-items: flex-start;
		gap: 4px;
	}
	.cmk-ap-referrals-progress__pip {
		font-size: 0.75rem;
		margin: 0 2px;
	}
	.cmk-ap-coupon {
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
	}
	.cmk-ap-coupon__copy {
		width: 100%;
		justify-content: center;
	}
}


/* ============================================================
 * v1.1.0.10 — Referrals "Your codes" section: kill Divi multi-column,
 * proper desktop grid for code cards, full-bleed help text +
 * actions row, sane mobile layout.
 *
 * Root cause of the broken layout we saw on screen: the parent
 * theme (Divi) applies `column-count` (CSS multi-column) or
 * `display: flex; flex-direction: row` to descendants of its
 * [et_pb_text] wrappers. The children of <section> (header, p,
 * ul, div) end up rendering in 4 narrow side-by-side columns.
 *
 * Fix: only target the broken sections (codes + progress).
 * Force every direct child to a full-width block-flow row, then
 * lay out the coupon cards as an auto-fit GRID inside the <ul>.
 * ============================================================ */

/* Section itself + every direct child = full-width block flow.
   `column-count: auto` defeats Divi's multi-column declaration. */
.cmk-ap-referral-codes {
	display: block !important;
	width: 100% !important;
	max-width: none !important;
	column-count: auto !important;
	column-width: auto !important;
}
.cmk-ap-referral-codes > * {
	display: block !important;
	width: 100% !important;
	max-width: none !important;
	float: none !important;
	column-count: auto !important;
	column-width: auto !important;
}
/* …except the head row, which is its own flex row. */
.cmk-ap-referral-codes > .cmk-ap-referral-codes__head {
	display: flex !important;
}

/* Same defense for the progress section (the wc_price markup was
   showing literally because of esc_html — fixed in PHP — but lock
   the column down too in case Divi splits it). */
.cmk-ap-referrals-progress {
	display: block !important;
	width: 100% !important;
	column-count: auto !important;
}
.cmk-ap-referrals-progress > * {
	column-count: auto !important;
	column-width: auto !important;
}

/* The help text under the cards must NOT live in its own column. */
.cmk-ap-referral-codes > .cmk-ap-help,
.cmk-ap-referral-codes > .cmk-ap-help--muted {
	display: block !important;
	width: 100% !important;
	margin: 4px 0 14px !important;
	color: var(--cmk-mute);
	font-size: 0.88rem;
	line-height: 1.5;
}

/* Coupon-list as a responsive grid: 2-up on wide screens, auto-fit
   below. Each card stays compact (no longer the giant tile we saw
   in the screenshot). */
.cmk-ap-referral-codes > .cmk-ap-coupon-list {
	display: grid !important;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 10px;
	list-style: none;
	margin: 0 0 14px;
	padding: 0;
}
.cmk-ap-referral-codes > .cmk-ap-coupon-list > .cmk-ap-coupon {
	width: auto !important;
	max-width: none !important;
}

/* Compact card layout: single ROW, code + badge + expiry on left,
   copy button on right. Replaces the tall stacked card from before. */
.cmk-ap-coupon {
	display: flex !important;
	flex-direction: row !important;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 14px !important;
	background: #fff;
	border: 1px solid var(--cmk-line);
	border-radius: 10px;
	margin: 0;
	min-width: 0;
}
.cmk-ap-coupon.is-active {
	border-color: color-mix(in srgb, var(--cmk-success) 35%, var(--cmk-line));
	background: color-mix(in srgb, var(--cmk-success-tint) 50%, #fff);
}
.cmk-ap-coupon.is-expired,
.cmk-ap-coupon.is-inactive {
	background: var(--cmk-bg);
	opacity: .9;
}
.cmk-ap-coupon__main {
	display: flex !important;
	flex-direction: column;
	gap: 2px;
	flex: 1 1 auto;
	min-width: 0;
}
.cmk-ap-coupon__code-wrap {
	display: flex !important;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}
.cmk-ap-coupon__code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--cmk-ink);
	background: transparent;
	padding: 0;
	letter-spacing: 0.02em;
	word-break: break-all;
	border: 0;
}
.cmk-ap-coupon.is-expired .cmk-ap-coupon__code {
	text-decoration: line-through;
	color: var(--cmk-mute);
}
.cmk-ap-coupon__badge {
	display: inline-flex !important;
	align-items: center;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 0.65rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	white-space: nowrap;
	flex-shrink: 0;
}
.cmk-ap-coupon__meta {
	display: flex !important;
	align-items: center;
	gap: 12px;
	color: var(--cmk-mute);
	font-size: 0.78rem;
	margin-top: 2px;
}
.cmk-ap-coupon__expiry {
	display: inline-flex !important;
	align-items: center;
	gap: 5px;
}
.cmk-ap-coupon__copy {
	flex-shrink: 0;
	background: #fff !important;
	color: var(--cmk-ink) !important;
	border: 1px solid var(--cmk-line) !important;
	padding: 6px 12px !important;
	border-radius: 6px !important;
	font-size: 0.82rem !important;
	font-weight: 600 !important;
	display: inline-flex !important;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	white-space: nowrap;
	min-height: 0 !important;
	height: auto !important;
}
.cmk-ap-coupon__copy:hover {
	border-color: var(--cmk-mute) !important;
	background: var(--cmk-bg) !important;
}
.cmk-ap-coupon__copy.is-copied {
	background: var(--cmk-success-tint) !important;
	border-color: var(--cmk-success) !important;
	color: #205c33 !important;
}

/* Action row (Generate / Request Flyers) — full bleed, normal-height
   buttons, NOT giant red panels. */
.cmk-ap-referral-codes > .cmk-ap-referrals-actions {
	display: flex !important;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 14px;
	width: 100%;
}
.cmk-ap-referral-codes > .cmk-ap-referrals-actions > .cmk-ap-btn {
	flex: 0 0 auto;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 18px !important;
	min-height: 0 !important;
	height: auto !important;
	width: auto !important;
}

/* "Earned in store credit" — render WC's <span class="amount"> as
   inheriting the big-number font, not the tiny WC default.
   Also stop it from line-breaking the markup. */
.cmk-ap-referrals-progress__num--money,
.cmk-ap-referrals-progress__num--money .woocommerce-Price-amount,
.cmk-ap-referrals-progress__num--money bdi,
.cmk-ap-referrals-progress__num--money .woocommerce-Price-currencySymbol {
	font: inherit !important;
	color: inherit !important;
	background: transparent !important;
	padding: 0 !important;
	border: 0 !important;
	white-space: nowrap;
}

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
	/* Single column on phones */
	.cmk-ap-referral-codes > .cmk-ap-coupon-list {
		grid-template-columns: 1fr !important;
	}
	.cmk-ap-coupon {
		flex-direction: column !important;
		align-items: stretch !important;
		gap: 8px !important;
	}
	.cmk-ap-coupon__copy {
		width: 100% !important;
		justify-content: center;
	}
	/* Stack the action buttons */
	.cmk-ap-referral-codes > .cmk-ap-referrals-actions > .cmk-ap-btn {
		flex: 1 1 100%;
		width: 100% !important;
	}
}

/* ============================================================
 * v1.1.0.11 — Referral Program Terms modal
 * Reuses the existing .cmk-ap-modal pattern but with a wider
 * panel and readable list typography (no tiny fine-print).
 * ============================================================ */

/* "View terms" link button next to the subtitle */
.cmk-ap-referrals-terms-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-left: 8px;
	padding: 0;
	background: transparent;
	border: 0;
	color: var(--cmk-blue);
	font: inherit;
	font-weight: 600;
	font-size: 0.92rem;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.cmk-ap-referrals-terms-link:hover,
.cmk-ap-referrals-terms-link:focus-visible {
	color: #0f4d82;
	text-decoration: none;
	outline: none;
}
.cmk-ap-referrals-terms-link svg {
	width: 14px;
	height: 14px;
	flex: 0 0 auto;
}

/* Modal — wider than edit-key for readable lines */
.cmk-ap-terms-modal .cmk-ap-modal__panel {
	max-width: 560px;
	display: block !important;
	width: 100% !important;
	column-count: auto !important;
	grid-template-columns: none !important;
}
.cmk-ap-terms-modal .cmk-ap-modal__header h2 {
	font-size: 1.15rem;
	margin: 0;
}
.cmk-ap-terms-modal__body {
	padding: 16px 24px 8px;
	display: block !important;
	width: 100% !important;
	column-count: auto !important;
}
.cmk-ap-terms-modal__intro {
	margin: 0 0 14px !important;
	color: var(--cmk-ink-soft);
	font-size: 0.95rem;
	line-height: 1.5;
	display: block !important;
	width: 100% !important;
	column-count: auto !important;
}
.cmk-ap-terms-list {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	display: block !important;
	width: 100% !important;
	column-count: auto !important;
	grid-template-columns: none !important;
}
.cmk-ap-terms-list li {
	list-style: none !important;
	display: block !important;
	position: relative;
	margin: 0 0 12px 0 !important;
	padding: 0 0 0 18px !important;
	font-size: 0.95rem;
	line-height: 1.55;
	color: var(--cmk-ink);
}
.cmk-ap-terms-list li:last-child {
	margin-bottom: 0 !important;
}
.cmk-ap-terms-list li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: 0.62em;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--cmk-success, #2f9c5b);
}
.cmk-ap-terms-list__text {
	display: inline;
}
.cmk-ap-terms-list__text strong,
.cmk-ap-terms-list strong {
	color: var(--cmk-ink);
	font-weight: 700;
	margin-right: 4px;
}
.cmk-ap-terms-modal__footer {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	padding: 12px 24px 20px;
	border-top: 1px solid var(--cmk-line-soft);
}
.cmk-ap-terms-modal__fineprint {
	font-size: 0.8rem !important;
	color: var(--cmk-mute);
	margin: 14px 0 0 !important;
	padding-top: 12px;
	border-top: 1px dashed var(--cmk-line);
	line-height: 1.5;
	display: block !important;
	width: 100% !important;
	column-count: auto !important;
}

/* Stop Divi / theme from re-laying-out the modal contents into
   columns or grid. Same defensive pattern we used in v1.1.0.10. */
.cmk-ap-terms-modal,
.cmk-ap-terms-modal * {
	column-count: auto !important;
	grid-template-columns: none !important;
}
.cmk-ap-terms-modal .cmk-ap-modal__panel > * {
	display: block !important;
	width: 100% !important;
}
.cmk-ap-terms-modal .cmk-ap-modal__header {
	display: flex !important;
}
.cmk-ap-terms-modal .cmk-ap-terms-list {
	display: flex !important;
}
.cmk-ap-terms-modal .cmk-ap-terms-list > li {
	display: block !important;
}

@media (max-width: 540px) {
	.cmk-ap-terms-modal__body { padding: 14px 18px 4px; }
	.cmk-ap-terms-modal__footer { padding: 10px 18px 16px; }
	.cmk-ap-referrals-terms-link {
		display: block;
		margin: 6px 0 0 0;
	}
}

/* ============================================================
 * v1.1.0.12 — Facility/Vacation integration
 * ============================================================ */

.cmk-ap-alert-stack--facility {
	max-width: 1200px;
	margin: 0 auto 10px;
}
.cmk-ap-alert--facility {
	background: #fff7ed !important;
	border-color: #fed7aa !important;
	color: #7c2d12 !important;
}
.cmk-ap-alert--facility .cmk-ap-alert__icon {
	background: #ffedd5;
	color: #c2410c;
}
.cmk-ap-alert__cta--button {
	border: 0;
	background: transparent;
	font: inherit;
	cursor: pointer;
	padding: 0;
	white-space: nowrap;
}

.cmk-ap-tile--facility {
	appearance: none;
	-webkit-appearance: none;
	border: 1px solid var(--cmk-line);
	font: inherit;
	text-align: left;
	width: 100%;
	cursor: pointer;
}
.cmk-ap-tile--facility::before { background: #f97316; }
.cmk-ap-tile--facility .cmk-ap-tile__icon {
	background: #ffedd5;
	color: #c2410c;
}

.cmk-ap-facility-list {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	display: flex;
	flex-direction: column;
	gap: 7px;
}
.cmk-ap-facility-list li {
	list-style: none !important;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 6px 0;
	border-bottom: 1px solid var(--cmk-line-soft);
	font-size: 0.9rem;
	line-height: 1.25;
}
.cmk-ap-facility-list li:last-child { border-bottom: 0; }
.cmk-ap-facility-list span {
	font-weight: 600;
	color: var(--cmk-ink);
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.cmk-ap-facility-list strong {
	flex: 0 0 auto;
	font-size: 0.86rem;
	font-weight: 700;
	color: #9a3412;
	white-space: nowrap;
}
.cmk-ap-tile--facility .cmk-ap-tile__viewall {
	display: inline-flex;
	margin-top: 8px;
	font-size: 0.85rem;
	font-weight: 700;
	color: #c2410c;
}

.cmk-ap-facility-modal .cmk-ap-modal__panel {
	max-width: 560px;
}
.cmk-ap-facility-modal__body {
	padding: 16px 24px 10px;
}
.cmk-ap-facility-modal__sub {
	margin: 0 0 12px !important;
	color: var(--cmk-mute);
	font-size: 0.92rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}
.cmk-ap-facility-list--modal li {
	padding: 10px 0;
	font-size: 0.98rem;
}
.cmk-ap-facility-list--modal strong {
	font-size: 0.95rem;
}

/* Defensive: Divi must not split facility modal or lists into columns. */
.cmk-ap-facility-modal,
.cmk-ap-facility-modal * {
	column-count: auto !important;
}
.cmk-ap-facility-modal .cmk-ap-modal__panel > * {
	display: block !important;
	width: 100% !important;
}
.cmk-ap-facility-modal .cmk-ap-modal__header,
.cmk-ap-facility-list,
.cmk-ap-facility-list > li {
	display: flex !important;
}

@media (max-width: 540px) {
	.cmk-ap-alert--facility {
		align-items: flex-start;
	}
	.cmk-ap-alert__cta--button {
		margin-top: 8px;
	}
	.cmk-ap-facility-modal__body { padding: 14px 18px 6px; }
	.cmk-ap-facility-list li {
		align-items: flex-start;
		flex-direction: column;
		gap: 3px;
	}
	.cmk-ap-facility-list span,
	.cmk-ap-facility-list strong {
		white-space: normal;
	}
}

/* ============================================================
 * v1.1.0.13 — Unified Account Alerts section
 * Header + consistent-width system alerts with severity icons
 * and per-alert dismiss button.
 * ============================================================ */

.cmk-ap-system-alerts {
	display: block;
	margin: 0 0 6px 0;
}
.cmk-ap-system-alerts__heading {
	display: block !important;
	margin: 0 0 8px 0 !important;
	padding: 0 4px !important;
	font-size: 0.72rem !important;
	font-weight: 800 !important;
	line-height: 1.2 !important;
	letter-spacing: 0.12em !important;
	text-transform: uppercase !important;
	color: var(--cmk-mute, #6b7280) !important;
}
.cmk-ap-system-alerts__list {
	display: flex !important;
	flex-direction: column !important;
	gap: 8px !important;
	width: 100% !important;
	column-count: auto !important;
}

/* Make every system alert the same width and structure. */
.cmk-ap-alert--system {
	box-sizing: border-box;
	width: 100% !important;
	display: flex !important;
	align-items: flex-start;
	gap: 12px;
	padding: 12px 44px 12px 16px;   /* extra right padding for the dismiss button */
	border-radius: 10px;
	border: 1px solid transparent;
	font-size: 0.95rem;
	line-height: 1.45;
	position: relative;
	background: #f8fafc;
	transition: opacity 0.2s ease, transform 0.2s ease;
}
.cmk-ap-alert--system.is-dismissing {
	opacity: 0;
	transform: translateY(-4px);
	pointer-events: none;
}

/* --- Severity palettes --------------------------------------- */
.cmk-ap-alert--system.cmk-ap-alert--critical {
	background: #fef2f2;
	border-color: #fecaca;
	color: #7f1d1d;
}
.cmk-ap-alert--system.cmk-ap-alert--critical .cmk-ap-alert__icon {
	background: #fee2e2;
	color: #b91c1c;
}
.cmk-ap-alert--system.cmk-ap-alert--critical .cmk-ap-alert__body strong {
	color: #7f1d1d;
}

.cmk-ap-alert--system.cmk-ap-alert--warning {
	background: #fff7ed;
	border-color: #fed7aa;
	color: #7c2d12;
}
.cmk-ap-alert--system.cmk-ap-alert--warning .cmk-ap-alert__icon {
	background: #ffedd5;
	color: #c2410c;
}
.cmk-ap-alert--system.cmk-ap-alert--warning .cmk-ap-alert__body strong {
	color: #7c2d12;
}
.cmk-ap-alert--system.cmk-ap-alert--warning .cmk-ap-alert__cta {
	color: #9a3412;
}

.cmk-ap-alert--system.cmk-ap-alert--info {
	background: #eff6ff;
	border-color: #bfdbfe;
	color: #1e3a8a;
}
.cmk-ap-alert--system.cmk-ap-alert--info .cmk-ap-alert__icon {
	background: #dbeafe;
	color: #1d4ed8;
}
.cmk-ap-alert--system.cmk-ap-alert--info .cmk-ap-alert__body strong {
	color: #1e3a8a;
}
.cmk-ap-alert--system.cmk-ap-alert--info .cmk-ap-alert__cta {
	color: #1d4ed8;
}

/* --- Dismiss button ------------------------------------------ */
.cmk-ap-alert__dismiss {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 26px;
	height: 26px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	margin: 0;
	border: 0;
	background: transparent;
	color: currentColor;
	opacity: 0.55;
	border-radius: 6px;
	cursor: pointer;
	transition: opacity 0.15s ease, background-color 0.15s ease;
}
.cmk-ap-alert__dismiss:hover,
.cmk-ap-alert__dismiss:focus-visible {
	opacity: 1;
	background-color: rgba(0, 0, 0, 0.06);
	outline: none;
}
.cmk-ap-alert__dismiss[disabled] {
	cursor: default;
	opacity: 0.35;
}

/* --- WC notice tweak so it sits flush with system alerts ------ */
.cmk-ap-alerts > .cmk-ap-alert--wc {
	margin: 0 0 10px 0;
}

/* --- Mobile ---------------------------------------------------- */
@media (max-width: 540px) {
	.cmk-ap-alert--system {
		padding: 12px 40px 12px 14px;
		gap: 10px;
	}
	.cmk-ap-alert--system .cmk-ap-alert__cta {
		margin-top: 4px;
	}
}

/* ============================================================
 * v1.1.0.14 — Hard-override for Divi/theme that may flex/grid
 * the referral terms list using !important + high specificity.
 * Combined high-specificity selectors beat 1-class Divi rules,
 * and these are appended last so they win source-order ties.
 * ============================================================ */

html body .cmk-ap-terms-modal ul.cmk-ap-terms-list,
html body .cmk-ap-terms-modal ul.cmk-ap-terms-list > li {
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	min-width: 0 !important;
	float: none !important;
	clear: both !important;
	column-count: auto !important;
	column-width: auto !important;
	-webkit-column-count: auto !important;
	-moz-column-count: auto !important;
	grid-template-columns: none !important;
	grid-auto-flow: row !important;
	flex-direction: column !important;
	flex-wrap: wrap !important;
}

html body .cmk-ap-terms-modal ul.cmk-ap-terms-list {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

html body .cmk-ap-terms-modal ul.cmk-ap-terms-list > li {
	position: relative !important;
	margin: 0 0 12px 0 !important;
	padding: 0 0 0 18px !important;
	font-size: 0.95rem !important;
	line-height: 1.55 !important;
	box-sizing: border-box !important;
}

html body .cmk-ap-terms-modal ul.cmk-ap-terms-list > li:last-child {
	margin-bottom: 0 !important;
}

html body .cmk-ap-terms-modal ul.cmk-ap-terms-list > li::before {
	content: "" !important;
	position: absolute !important;
	left: 2px !important;
	top: 0.62em !important;
	width: 6px !important;
	height: 6px !important;
	border-radius: 50% !important;
	background: var(--cmk-success, #2f9c5b) !important;
}

html body .cmk-ap-terms-modal .cmk-ap-terms-list__text {
	display: inline !important;
}

/* ============================================================
 * v1.1.0.15 — Mobile full-screen referral terms modal +
 * dashboard tile status/promo polish.
 * ============================================================ */

/* Dashboard status: large number in a circle with label below. */
.cmk-ap-tile__status {
	display: inline-flex !important;
	align-items: center;
	gap: 10px;
	margin: 8px 0 8px !important;
	padding: 8px 10px 8px 8px;
	border-radius: 999px;
	background: #fff5f5;
	border: 1px solid #fecaca;
	color: var(--cmk-red, #c8102e);
	width: auto !important;
	max-width: 100%;
	box-sizing: border-box;
}
.cmk-ap-tile__status-num {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--cmk-red, #c8102e);
	color: #fff;
	font-size: 1.45rem;
	font-weight: 800;
	line-height: 1;
	font-variant-numeric: tabular-nums;
	box-shadow: 0 6px 14px rgba(200, 16, 46, 0.18);
}
.cmk-ap-tile__status-label {
	display: block;
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	line-height: 1.05;
	text-transform: uppercase;
	color: #991b1b;
	white-space: normal;
}
.cmk-ap-tile__status--info {
	background: #eff6ff;
	border-color: #bfdbfe;
	color: #1d4ed8;
}
.cmk-ap-tile__status--info .cmk-ap-tile__status-num {
	background: #1d4ed8;
	box-shadow: 0 6px 14px rgba(29, 78, 216, 0.18);
}
.cmk-ap-tile__status--info .cmk-ap-tile__status-label {
	color: #1e3a8a;
}
.cmk-ap-tile__status--success {
	background: #ecfdf5;
	border-color: #bbf7d0;
	color: #047857;
}
.cmk-ap-tile__status--success .cmk-ap-tile__status-num {
	background: #059669;
	box-shadow: 0 6px 14px rgba(5, 150, 105, 0.18);
}
.cmk-ap-tile__status--success .cmk-ap-tile__status-label {
	color: #065f46;
}
.cmk-ap-tile__status--warning {
	background: #fff7ed;
	border-color: #fed7aa;
	color: #c2410c;
}
.cmk-ap-tile__status--warning .cmk-ap-tile__status-num {
	background: #ea580c;
	box-shadow: 0 6px 14px rgba(234, 88, 12, 0.18);
}
.cmk-ap-tile__status--warning .cmk-ap-tile__status-label {
	color: #9a3412;
}
.cmk-ap-tile__status--danger,
.cmk-ap-tile__status--error {
	background: #fff5f5;
	border-color: #fecaca;
	color: var(--cmk-red, #c8102e);
}

/* Stored Keys footer CTA now replaces the former promo bubble. */
.cmk-ap-tile--keys .cmk-ap-tile__body {
	padding-top: 0;
}

/* Mobile: make the referral terms modal full-screen and internally scrollable. */
@media (max-width: 640px) {
	html body .cmk-ap-terms-modal {
		align-items: stretch !important;
		justify-content: stretch !important;
		padding: 0 !important;
	}
	html body .cmk-ap-terms-modal .cmk-ap-modal__panel {
		width: 100vw !important;
		max-width: 100vw !important;
		height: 100vh !important;
		max-height: 100vh !important;
		margin: 0 !important;
		border-radius: 0 !important;
		display: flex !important;
		flex-direction: column !important;
		overflow: hidden !important;
	}
	html body .cmk-ap-terms-modal .cmk-ap-modal__header {
		flex: 0 0 auto !important;
		padding: 14px 18px !important;
	}
	html body .cmk-ap-terms-modal .cmk-ap-terms-modal__body {
		flex: 1 1 auto !important;
		overflow-y: auto !important;
		-webkit-overflow-scrolling: touch !important;
		padding: 14px 18px 18px !important;
	}
	html body .cmk-ap-terms-modal .cmk-ap-terms-modal__footer {
		flex: 0 0 auto !important;
		padding: 12px 18px calc(14px + env(safe-area-inset-bottom)) !important;
		background: #fff !important;
		box-shadow: 0 -8px 18px rgba(15, 23, 42, 0.08);
	}
	html body .cmk-ap-terms-modal .cmk-ap-terms-modal__footer .cmk-ap-btn {
		width: 100% !important;
		justify-content: center !important;
	}
	.cmk-ap-tile--keys .cmk-ap-tile__body {
		padding-top: 0;
	}
	.cmk-ap-tile__status {
		margin-top: 6px !important;
	}
}

/* ============================================================
 * v1.1.0.16 — Mobile terms modal safety + dashboard refinements.
 * ============================================================ */
@media (max-width: 640px) {
	html body .cmk-ap-terms-modal.is-open {
		display: flex !important;
		visibility: visible !important;
		opacity: 1 !important;
	}
	html body .cmk-ap-terms-modal .cmk-ap-modal__panel {
		display: flex !important;
		flex-direction: column !important;
		width: 100vw !important;
		height: 100vh !important;
		height: 100dvh !important;
		max-height: 100vh !important;
		max-height: 100dvh !important;
		min-height: 0 !important;
		overflow: hidden !important;
		visibility: visible !important;
		opacity: 1 !important;
	}
	html body .cmk-ap-terms-modal .cmk-ap-terms-modal__body {
		display: block !important;
		flex: 1 1 auto !important;
		min-height: 0 !important;
		overflow-y: auto !important;
		-webkit-overflow-scrolling: touch !important;
		visibility: visible !important;
		opacity: 1 !important;
	}
}

.cmk-ap-tile--applications .cmk-ap-tile__body {
	display: flex;
	flex-direction: column;
}
.cmk-ap-tile--applications .cmk-ap-tile__status {
	margin-bottom: 0 !important;
}
.cmk-ap-tile--applications .cmk-ap-tile__viewall {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	align-self: flex-start;
	margin-top: auto;
	padding-top: 12px;
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
	color: var(--cmk-red, #c8102e);
	text-decoration: none;
}
.cmk-ap-tile--applications .cmk-ap-tile__viewall:hover {
	text-decoration: underline;
}
