@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/space-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==========================================================================
   ClickRayo — core design system
   Shared by the marketing site, the member panel and the admin panel.
   Dark-first UI with a light surface variant for long-form reading pages.
   ========================================================================== */

/* The hidden attribute has to beat the display value of a class.
   The browser default (`[hidden] { display: none }`) lives in the user agent
   stylesheet, so any author rule with a display value overrules it — and every
   element that carries hidden together with a class would stay visible. */
[hidden] {
  display: none !important;
}

:root {
  /* Surfaces */
  --cr-bg: #070b14;
  --cr-bg-2: #0a101d;
  --cr-surface: #0e1524;
  --cr-surface-2: #141d2f;
  --cr-surface-3: #1b2639;
  --cr-border: #1f2b42;
  --cr-border-strong: #2b3a56;

  /* Text */
  --cr-text: #e8eef9;
  --cr-text-2: #b6c3d8;
  --cr-muted: #8494ae;
  --cr-faint: #7a89a3;

  /* Brand */
  --cr-primary: #4c6ef5;
  --cr-primary-hi: #748ffc;
  /* Solid buttons need a deeper blue: white on #4c6ef5 is only 4.32:1. */
  --cr-primary-btn: #4263eb;
  --cr-primary-btn-hi: #3b5bdb;
  --cr-primary-dim: rgba(76, 110, 245, 0.14);
  --cr-accent: #fbbf24;
  --cr-accent-hi: #fcd34d;
  --cr-accent-dim: rgba(251, 191, 36, 0.14);

  /* Status */
  --cr-success: #22c55e;
  --cr-success-dim: rgba(34, 197, 94, 0.14);
  --cr-danger: #ef4444;
  --cr-danger-dim: rgba(239, 68, 68, 0.14);
  --cr-warning: #f59e0b;
  --cr-warning-dim: rgba(245, 158, 11, 0.14);
  --cr-info: #38bdf8;
  --cr-info-dim: rgba(56, 189, 248, 0.14);

  /* Geometry */
  --cr-radius: 14px;
  --cr-radius-sm: 9px;
  --cr-radius-lg: 20px;
  --cr-shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.85);
  --cr-shadow-lg: 0 32px 70px -30px rgba(0, 0, 0, 0.9);
  --cr-ring: 0 0 0 3px rgba(76, 110, 245, 0.35);

  /* Type */
  --cr-font-head: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --cr-font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --cr-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --cr-shell: 1240px;
  --cr-header-h: 68px;

  --cr-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cr-bg);
  color: var(--cr-text);
  font-family: var(--cr-font-body);
  font-size: 15.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5 {
  font-family: var(--cr-font-head);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
  color: var(--cr-text);
}

h1 { font-size: clamp(2rem, 1.35rem + 2.6vw, 3.35rem); }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.7vw, 2.4rem); }
h3 { font-size: 1.28rem; }
h4 { font-size: 1.06rem; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--cr-primary-hi);
  text-decoration: none;
  transition: color 0.18s var(--cr-ease);
}

a:hover { color: var(--cr-accent-hi); }

img,
svg,
canvas {
  max-width: 100%;
  height: auto;
  display: block;
}

code, pre, .mono { font-family: var(--cr-font-mono); }

hr {
  border: 0;
  border-top: 1px solid var(--cr-border);
  margin: 2rem 0;
}

::selection {
  background: var(--cr-primary);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--cr-primary-hi);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ------------------------------------------------------------------ layout */

.cr-shell {
  width: 100%;
  max-width: var(--cr-shell);
  margin-inline: auto;
  padding-inline: 20px;
}

.cr-shell--narrow { max-width: 780px; }
.cr-shell--mid { max-width: 1020px; }

.cr-stack { display: flex; flex-direction: column; gap: 1rem; }
.cr-stack--sm { gap: 0.5rem; }
.cr-stack--lg { gap: 1.75rem; }

.cr-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cr-row--between { justify-content: space-between; }
.cr-row--end { justify-content: flex-end; }
.cr-row--tight { gap: 0.4rem; }

.cr-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.cr-grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.cr-grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.cr-grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }

.cr-section { padding: clamp(3rem, 6vw, 5.5rem) 0; }
.cr-section--tight { padding: clamp(2rem, 4vw, 3rem) 0; }

.cr-muted { color: var(--cr-muted); }
.cr-faint { color: var(--cr-faint); }
.cr-small { font-size: 0.875rem; }
.cr-xs { font-size: 0.8rem; }
.cr-lead { font-size: 1.08rem; color: var(--cr-text-2); line-height: 1.7; }
.cr-center { text-align: center; }
.cr-nowrap { white-space: nowrap; }
.cr-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-mono {
  font-family: var(--cr-font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 0.86em;
}

.cr-lic-steps {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.4rem;
  color: var(--cr-text-2);
}

.cr-lic-steps li::marker {
  color: var(--cr-primary);
  font-weight: 700;
}
.cr-mt-0 { margin-top: 0; }
.cr-mb-0 { margin-bottom: 0; }
.cr-mt-1 { margin-top: 0.5rem; }
.cr-mt-2 { margin-top: 1rem; }
.cr-mt-3 { margin-top: 1.5rem; }
.cr-mb-2 { margin-bottom: 1rem; }
.cr-mb-3 { margin-bottom: 1.5rem; }
.cr-grow { flex: 1 1 auto; }
.cr-gap-2 { gap: 2rem; }

/* ------------------------------------------------------------------- cards */

.cr-card {
  background: var(--cr-surface);
  border: 1px solid var(--cr-border);
  border-radius: var(--cr-radius);
  padding: 1.4rem;
  position: relative;
}

.cr-card--pad-sm { padding: 1rem; }
.cr-card--pad-lg { padding: 2rem; }
.cr-card--flat { background: var(--cr-surface-2); }
.cr-card--glow { box-shadow: var(--cr-shadow-lg); }
.cr-card--hover { transition: border-color 0.2s var(--cr-ease), transform 0.2s var(--cr-ease); }
.cr-card--hover:hover { border-color: var(--cr-border-strong); transform: translateY(-2px); }

.cr-card__title {
  font-family: var(--cr-font-head);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
}

.cr-card__body { color: var(--cr-text-2); font-size: 0.94rem; }

/* ----------------------------------------------------------------- buttons */

.cr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.62rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--cr-radius-sm);
  background: var(--cr-surface-2);
  color: var(--cr-text);
  font-family: var(--cr-font-body);
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  transition: background-color 0.18s var(--cr-ease), border-color 0.18s var(--cr-ease),
    color 0.18s var(--cr-ease), opacity 0.18s var(--cr-ease);
}

.cr-btn:hover { color: var(--cr-text); }
.cr-btn:disabled,
.cr-btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}

.cr-btn--primary {
  background: var(--cr-primary-btn);
  border-color: var(--cr-primary-btn);
  color: #fff;
}

.cr-btn--primary:hover { background: var(--cr-primary-btn-hi); border-color: var(--cr-primary-btn-hi); color: #fff; }

.cr-btn--accent {
  background: var(--cr-accent);
  border-color: var(--cr-accent);
  color: #1a1405;
}

.cr-btn--accent:hover { background: var(--cr-accent-hi); border-color: var(--cr-accent-hi); color: #1a1405; }

.cr-btn--ghost {
  background: transparent;
  border-color: var(--cr-border-strong);
  color: var(--cr-text-2);
}

.cr-btn--ghost:hover { border-color: var(--cr-primary); color: var(--cr-text); background: var(--cr-primary-dim); }

.cr-btn--danger { background: var(--cr-danger-dim); border-color: rgba(239, 68, 68, 0.4); color: #fca5a5; }
.cr-btn--danger:hover { background: var(--cr-danger); color: #fff; }

.cr-btn--success { background: var(--cr-success-dim); border-color: rgba(34, 197, 94, 0.4); color: #86efac; }
.cr-btn--success:hover { background: var(--cr-success); color: #052e16; }

.cr-btn--sm { min-height: 36px; padding: 0.42rem 0.8rem; font-size: 0.85rem; }
.cr-btn--lg { min-height: 52px; padding: 0.85rem 1.75rem; font-size: 1rem; }
.cr-btn--block { width: 100%; }

.cr-btn__icon { width: 18px; height: 18px; flex: none; }

/* ------------------------------------------------------------------ badges */

.cr-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.24rem 0.6rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: var(--cr-surface-3);
  color: var(--cr-text-2);
  border: 1px solid transparent;
  white-space: nowrap;
}

.cr-badge--success { background: var(--cr-success-dim); color: #86efac; border-color: rgba(34, 197, 94, 0.3); }
.cr-badge--danger { background: var(--cr-danger-dim); color: #fca5a5; border-color: rgba(239, 68, 68, 0.3); }
.cr-badge--warning { background: var(--cr-warning-dim); color: #fcd34d; border-color: rgba(245, 158, 11, 0.3); }
.cr-badge--info { background: var(--cr-info-dim); color: #7dd3fc; border-color: rgba(56, 189, 248, 0.3); }
.cr-badge--primary { background: var(--cr-primary-dim); color: var(--cr-primary-hi); border-color: rgba(76, 110, 245, 0.35); }
.cr-badge--accent { background: var(--cr-accent-dim); color: var(--cr-accent-hi); border-color: rgba(251, 191, 36, 0.32); }

/* ------------------------------------------------------------------- forms */

.cr-field { margin-bottom: 1.1rem; }

.cr-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--cr-text-2);
}

.cr-hint { font-size: 0.8rem; color: var(--cr-faint); margin-top: 0.35rem; }

.cr-input,
.cr-select,
.cr-textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.62rem 0.85rem;
  background: var(--cr-bg-2);
  border: 1px solid var(--cr-border);
  border-radius: var(--cr-radius-sm);
  color: var(--cr-text);
  font-family: inherit;
  font-size: 0.94rem;
  line-height: 1.45;
  transition: border-color 0.18s var(--cr-ease), box-shadow 0.18s var(--cr-ease);
}

.cr-textarea { min-height: 120px; resize: vertical; }

.cr-input::placeholder,
.cr-textarea::placeholder { color: var(--cr-faint); }

.cr-input:focus,
.cr-select:focus,
.cr-textarea:focus {
  outline: none;
  border-color: var(--cr-primary);
  box-shadow: var(--cr-ring);
}

.cr-input[aria-invalid="true"],
.cr-select[aria-invalid="true"] { border-color: var(--cr-danger); }

.cr-select {
  appearance: none;
  padding-right: 2.4rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238494ae' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px;
}

.cr-check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--cr-text-2);
}

.cr-check input[type="checkbox"],
.cr-check input[type="radio"] {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--cr-primary);
  flex: none;
  cursor: pointer;
}

.cr-form-grid {
  display: grid;
  gap: 0 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}

.cr-form-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  align-items: center;
  padding-top: 0.5rem;
}

/* ------------------------------------------------------------------ alerts */

.cr-alert {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  border-radius: var(--cr-radius-sm);
  border: 1px solid var(--cr-border);
  background: var(--cr-surface-2);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.cr-alert__icon { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.cr-alert--success { background: var(--cr-success-dim); border-color: rgba(34, 197, 94, 0.3); color: #bbf7d0; }
.cr-alert--danger { background: var(--cr-danger-dim); border-color: rgba(239, 68, 68, 0.3); color: #fecaca; }
.cr-alert--warning { background: var(--cr-warning-dim); border-color: rgba(245, 158, 11, 0.3); color: #fde68a; }
.cr-alert--info { background: var(--cr-info-dim); border-color: rgba(56, 189, 248, 0.3); color: #bae6fd; }

/* ------------------------------------------------------------------ tables */

.cr-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--cr-border);
  border-radius: var(--cr-radius);
  background: var(--cr-surface);
  position: relative;
}

.cr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 640px;
}

.cr-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-family: var(--cr-font-head);
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cr-muted);
  background: var(--cr-surface-2);
  border-bottom: 1px solid var(--cr-border);
  white-space: nowrap;
}

.cr-table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--cr-border);
  color: var(--cr-text-2);
  vertical-align: middle;
}

.cr-table tbody tr:last-child td { border-bottom: 0; }
.cr-table tbody tr:hover td { background: rgba(255, 255, 255, 0.018); }
.cr-table td strong { color: var(--cr-text); font-weight: 600; }
.cr-table--numeric td.num, .cr-table th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------- stats */

.cr-stat {
  background: var(--cr-surface);
  border: 1px solid var(--cr-border);
  border-radius: var(--cr-radius);
  padding: 1.1rem 1.25rem;
}

.cr-stat__label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--cr-muted);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.cr-stat__value {
  font-family: var(--cr-font-head);
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--cr-text);
  font-variant-numeric: tabular-nums;
}

.cr-stat__meta { font-size: 0.8rem; color: var(--cr-muted); margin-top: 0.3rem; }
.cr-stat--accent .cr-stat__value { color: var(--cr-accent); }
.cr-stat--success .cr-stat__value { color: #4ade80; }
.cr-stat--danger .cr-stat__value { color: #f87171; }
.cr-stat--primary .cr-stat__value { color: var(--cr-primary-hi); }

/* ------------------------------------------------------------------ panels */

.cr-panel {
  background: var(--cr-surface);
  border: 1px solid var(--cr-border);
  border-radius: var(--cr-radius);
  overflow: hidden;
}

.cr-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--cr-border);
  background: var(--cr-surface-2);
  flex-wrap: wrap;
}

.cr-panel__title { font-family: var(--cr-font-head); font-weight: 600; font-size: 1rem; margin: 0; }
.cr-panel__body { padding: 1.25rem; }
.cr-panel__body--flush { padding: 0; }

/* -------------------------------------------------------------- pagination */

.cr-pagination {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 1.25rem;
}

.cr-pagination a,
.cr-pagination span {
  min-width: 38px;
  height: 38px;
  padding: 0 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--cr-radius-sm);
  border: 1px solid var(--cr-border);
  background: var(--cr-surface);
  color: var(--cr-text-2);
  font-size: 0.88rem;
  font-weight: 600;
}

.cr-pagination a:hover { border-color: var(--cr-primary); color: var(--cr-text); }
.cr-pagination .is-active { background: var(--cr-primary); border-color: var(--cr-primary); color: #fff; }
.cr-pagination .is-disabled { opacity: 0.4; }

/* ------------------------------------------------------------- empty state */

.cr-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--cr-muted);
}

.cr-empty__icon { width: 42px; height: 42px; margin: 0 auto 0.9rem; color: var(--cr-faint); }
.cr-empty__title { font-family: var(--cr-font-head); font-size: 1.05rem; color: var(--cr-text-2); margin-bottom: 0.35rem; }

/* ------------------------------------------------------------------- tabs */

.cr-tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--cr-border);
  overflow-x: auto;
  scrollbar-width: none;
}

.cr-tabs::-webkit-scrollbar { display: none; }

.cr-tabs a,
.cr-tabs button {
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--cr-muted);
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}

.cr-tabs a:hover,
.cr-tabs button:hover { color: var(--cr-text); }
.cr-tabs .is-active { color: var(--cr-primary-hi); border-bottom-color: var(--cr-primary); }

/* --------------------------------------------------------------- app shell */

.cr-app {
  display: grid;
  grid-template-columns: 258px 1fr;
  min-height: 100vh;
}

.cr-sidebar {
  background: var(--cr-bg-2);
  border-right: 1px solid var(--cr-border);
  padding: 1.25rem 0.9rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cr-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.6rem 1.1rem;
  font-family: var(--cr-font-head);
  font-weight: 700;
  font-size: 1.12rem;
  color: var(--cr-text);
  letter-spacing: -0.02em;
}

.cr-sidebar__brand svg { width: 26px; height: 26px; flex: none; }

.cr-sidebar__group {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cr-faint);
  font-weight: 700;
  padding: 1rem 0.7rem 0.4rem;
}

.cr-sidebar__link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.58rem 0.7rem;
  border-radius: var(--cr-radius-sm);
  color: var(--cr-text-2);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background-color 0.16s var(--cr-ease), color 0.16s var(--cr-ease);
}

.cr-sidebar__link svg { width: 17px; height: 17px; flex: none; opacity: 0.75; }
.cr-sidebar__link:hover { background: var(--cr-surface-2); color: var(--cr-text); }
.cr-sidebar__link.is-active {
  background: var(--cr-primary-dim);
  color: var(--cr-primary-hi);
  font-weight: 600;
}

.cr-sidebar__link.is-active svg { opacity: 1; }

.cr-sidebar__count {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--cr-surface-3);
  color: var(--cr-text-2);
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
}

.cr-main { display: flex; flex-direction: column; min-width: 0; }

.cr-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  border-bottom: 1px solid var(--cr-border);
  background: rgba(7, 11, 20, 0.88);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.cr-topbar__title { font-family: var(--cr-font-head); font-size: 1.12rem; font-weight: 600; margin: 0; }
.cr-topbar__sub { font-size: 0.8rem; color: var(--cr-muted); margin: 0; }

.cr-content { padding: 1.5rem; flex: 1 1 auto; min-width: 0; }

.cr-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
}

.cr-page-head h1, .cr-page-head h2 { margin: 0 0 0.15rem; font-size: 1.5rem; }
.cr-page-head p { margin: 0; color: var(--cr-muted); font-size: 0.9rem; }

/* ---------------------------------------------------------------- avatars */

.cr-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--cr-surface-3);
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--cr-text);
  overflow: hidden;
}

.cr-avatar--lg { width: 58px; height: 58px; font-size: 1.1rem; }
.cr-avatar--sm { width: 28px; height: 28px; font-size: 0.7rem; }

/* -------------------------------------------------------------- utilities */

/*
   Small helpers that used to live in a style attribute of the templates.
   The marketplaces ask for templates without inline css, and a buyer has to
   be able to change a value in one place — the stylesheet — without hunting
   for it in the markup.
*/

.cr-summary { list-style: none; }
.cr-form-narrow { min-width: 320px; }
.cr-form-wide { min-width: 340px; }
.cr-icon-rotate { transform: rotate(180deg); }
.cr-input--color { padding: 0.25rem; height: 44px; }
.cr-indent { padding-left: 1.1rem; }
.cr-indent--sm { padding-left: 1.05rem; }
.cr-icon-xl { width: 52px; height: 52px; margin: 0 auto; color: #4ade80; }
.cr-icon-sm { width: 34px; height: 34px; }
.cr-input--mini { min-height: 36px; width: 150px; }
.cr-max-320 { max-width: 320px; }
.cr-max-280 { max-width: 280px; }
.cr-max-150 { max-width: 150px; }
.cr-mb-xs { margin-bottom: 0.35rem; }
.cr-title-lg { font-size: 1.4rem; }
.cr-title-md { font-size: 1.35rem; margin-top: 0.8rem; }
.cr-title-sm { font-size: 1.15rem; }
.cr-text-warning { color: var(--cr-warning); }
.cr-text-danger { color: var(--cr-danger); }
.cr-text-inherit { color: inherit; }
.cr-dot-earnings { background: #fbbf24; }
.cr-dot-clicks { background: #4c6ef5; }

.cr-divider { height: 1px; background: var(--cr-border); margin: 1.25rem 0; }

.cr-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cr-scroll-x { overflow-x: auto; }

/* ------------------------------------------------------------- responsive */

@media (max-width: 1024px) {
  .cr-app { grid-template-columns: 1fr; }

  .cr-sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--cr-border);
    flex-direction: row;
    overflow-x: auto;
    padding: 0.75rem;
    gap: 0.4rem;
  }

  .cr-sidebar__brand { padding: 0 0.5rem 0 0; }
  .cr-sidebar__group { display: none; }
  .cr-sidebar__link { white-space: nowrap; padding: 0.5rem 0.7rem; }
  .cr-sidebar__count { display: none; }
}

@media (max-width: 640px) {
  .cr-content { padding: 1rem; }
  .cr-topbar { padding: 0.75rem 1rem; }
  .cr-page-head h1, .cr-page-head h2 { font-size: 1.28rem; }
  .cr-form-grid { grid-template-columns: 1fr; }
  .cr-btn--lg { min-height: 48px; }
}

/* --------------------------------------------------- reduced motion */

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

/* ------------------------------------------------------------- light mode */

.cr-light {
  --cr-bg: #f7f9fc;
  --cr-bg-2: #ffffff;
  --cr-surface: #ffffff;
  --cr-surface-2: #f2f5fa;
  --cr-surface-3: #e8edf5;
  --cr-border: #dfe6f0;
  --cr-border-strong: #c7d2e2;
  --cr-text: #101828;
  --cr-text-2: #344054;
  --cr-muted: #667085;
  --cr-faint: #5a6b85;
  --cr-shadow: 0 12px 28px -20px rgba(16, 24, 40, 0.35);

  background: var(--cr-bg);
  color: var(--cr-text);
}
