/* ═══════════════════════════════════════════════════════════════
   Recalled Design System — Option C: Slate & Sage
   ═══════════════════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --rc-bg:          #F8F9FF;
  --rc-surface:     #FFFFFF;
  --rc-surface-2:   #F1F3FC;
  --rc-night:       #1E2235;
  --rc-night-soft:  #2D3148;
  --rc-mint:        #4ADE80;
  --rc-mint-soft:   #DCFCE7;
  --rc-peri:        #818CF8;
  --rc-peri-soft:   #EEF2FF;
  --rc-muted:       #6B7280;
  --rc-border:      #E5E7F0;
  --rc-border-soft: #F1F3FC;
  --rc-text:        #1E2235;
  --rc-text-2:      #4B5563;
  --rc-text-3:      #9CA3AF;
  --rc-danger:      #EF4444;
  --rc-warning:     #F59E0B;
  --rc-success:     #22C55E;

  --rc-font-display: 'Syne', sans-serif;
  --rc-font-body:    'DM Sans', sans-serif;

  --rc-radius-sm:  6px;
  --rc-radius:     10px;
  --rc-radius-lg:  16px;
  --rc-radius-xl:  24px;

  --rc-shadow:     0 1px 3px rgba(30,34,53,0.08), 0 1px 2px rgba(30,34,53,0.04);
  --rc-shadow-md:  0 4px 12px rgba(30,34,53,0.10);

  --rc-transition: 150ms ease;
}

/* ── Dark mode ─────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root {
    --rc-bg:          #0F1120;
    --rc-surface:     #1E2235;
    --rc-surface-2:   #252A40;
    --rc-night:       #F8F9FF;
    --rc-night-soft:  #C5CAE0;
    --rc-mint-soft:   #0D2318;
    --rc-peri-soft:   #1A1D35;
    --rc-border:      #2D3148;
    --rc-border-soft: #252A40;
    --rc-text:        #F1F3FC;
    --rc-text-2:      #9CA3AF;
    --rc-text-3:      #6B7280;
  }
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--rc-font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--rc-text);
  background: var(--rc-bg);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--rc-font-body); }
input, select, textarea {
  font-family: var(--rc-font-body);
  color: var(--rc-text);
}

/* ── Navigation ────────────────────────────────────────────── */
.rc-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--rc-surface);
  border-bottom: 1px solid var(--rc-border);
  height: 56px;
}

.rc-nav__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rc-nav__brand {
  font-family: var(--rc-font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  display: flex;
  align-items: baseline;
  gap: 1px;
  flex-shrink: 0;
}

.rc-brand__word { color: var(--rc-text); }
.rc-brand__ext  { color: var(--rc-mint); }

.rc-nav__right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rc-nav__icon-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--rc-radius-sm);
  color: var(--rc-text-2);
  transition: background var(--rc-transition), color var(--rc-transition);
}
.rc-nav__icon-btn:hover, .rc-nav__icon-btn.active {
  background: var(--rc-surface-2);
  color: var(--rc-text);
}
.rc-nav__icon-btn .ti { font-size: 18px; }

.rc-nav__btn {
  height: 32px;
  padding: 0 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  display: flex; align-items: center; gap: 6px;
  transition: opacity var(--rc-transition);
}
.rc-nav__btn:hover { opacity: 0.85; }
.rc-btn--mint { background: var(--rc-mint); color: var(--rc-night); }
.rc-btn--peri { background: var(--rc-peri); color: #fff; }
.rc-btn--night { background: var(--rc-night); color: var(--rc-mint); }

.rc-nav__link {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: var(--rc-text-2);
}

/* Plan badge */
.rc-plan-badge {
  height: 24px;
  padding: 0 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex; align-items: center;
}
.rc-plan--free        { background: var(--rc-mint); color: var(--rc-night); }
.rc-plan--student     { background: var(--rc-peri); color: #fff; }
.rc-plan--pro         { background: var(--rc-night); color: var(--rc-mint); }
.rc-plan--team,
.rc-plan--institution { background: var(--rc-surface-2); color: var(--rc-text); border: 1px solid var(--rc-border); }

/* Avatar + dropdown */
.rc-nav__avatar-wrap { position: relative; }

.rc-nav__avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--rc-peri-soft);
  color: var(--rc-peri);
  font-size: 13px; font-weight: 600;
  border: none;
  display: flex; align-items: center; justify-content: center;
  transition: opacity var(--rc-transition);
}
.rc-nav__avatar:hover { opacity: 0.8; }

.rc-nav__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--rc-surface);
  border: 1px solid var(--rc-border);
  border-radius: var(--rc-radius);
  box-shadow: var(--rc-shadow-md);
  min-width: 160px;
  overflow: hidden;
  z-index: 200;
}
.rc-dropdown__email {
  display: block;
  padding: 10px 14px;
  font-size: 12px;
  color: var(--rc-text-3);
  border-bottom: 1px solid var(--rc-border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
.rc-dropdown__item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--rc-text-2);
  transition: background var(--rc-transition);
}
.rc-dropdown__item:hover { background: var(--rc-surface-2); color: var(--rc-text); }
.rc-dropdown__item--danger:hover { background: #FEF2F2; color: var(--rc-danger); }
.rc-dropdown__item .ti { font-size: 16px; }

/* ── Main layout ───────────────────────────────────────────── */
.rc-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

/* ── Page header ───────────────────────────────────────────── */
.rc-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}
.rc-page-title {
  font-family: var(--rc-font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--rc-text);
}
.rc-page-subtitle {
  font-size: 14px;
  color: var(--rc-text-3);
  margin-top: 2px;
}

/* ── Cards ─────────────────────────────────────────────────── */
.rc-card {
  background: var(--rc-surface);
  border: 1px solid var(--rc-border);
  border-radius: var(--rc-radius-lg);
  box-shadow: var(--rc-shadow);
  overflow: hidden;
}
.rc-card--hover {
  transition: box-shadow var(--rc-transition), transform var(--rc-transition);
  cursor: pointer;
}
.rc-card--hover:hover {
  box-shadow: var(--rc-shadow-md);
  transform: translateY(-2px);
}

/* ── Scan card ─────────────────────────────────────────────── */
.rc-scan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.rc-scan-card {
  background: var(--rc-surface);
  border: 1px solid var(--rc-border);
  border-radius: var(--rc-radius-lg);
  overflow: hidden;
  transition: box-shadow var(--rc-transition), transform var(--rc-transition);
  position: relative;
  display: flex;
  flex-direction: column;
}
.rc-scan-card:hover {
  box-shadow: var(--rc-shadow-md);
  transform: translateY(-2px);
}

.rc-scan-card__thumb {
  height: 110px;
  background: var(--rc-surface-2);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}
.rc-scan-card__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.rc-scan-card__thumb-icon {
  font-size: 36px;
  color: var(--rc-text-3);
}
.rc-scan-card__lang {
  position: absolute;
  top: 8px; left: 8px;
  font-size: 16px;
  line-height: 1;
}
.rc-scan-card__type {
  position: absolute;
  top: 8px; right: 8px;
  width: 24px; height: 24px;
  background: var(--rc-surface);
  border-radius: var(--rc-radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  color: var(--rc-text-3);
  border: 1px solid var(--rc-border);
}
.rc-scan-card__status {
  position: absolute;
  bottom: 8px; right: 8px;
}

.rc-scan-card__body {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rc-scan-card__title {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--rc-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rc-scan-card__meta {
  font-size: 11px;
  color: var(--rc-text-3);
  display: flex; align-items: center; gap: 6px;
}

/* Score bar */
.rc-score-bar {
  height: 4px;
  background: var(--rc-border);
  border-radius: 4px;
  overflow: hidden;
}
.rc-score-bar__fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}
.rc-score-bar__fill--strong { background: var(--rc-success); }
.rc-score-bar__fill--good   { background: var(--rc-mint); }
.rc-score-bar__fill--weak   { background: var(--rc-warning); }
.rc-score-bar__fill--none   { background: var(--rc-border); }

.rc-scan-card__footer {
  padding: 8px 12px;
  border-top: 1px solid var(--rc-border-soft);
  display: flex; align-items: center; gap: 6px;
}
.rc-scan-card__action {
  flex: 1;
  height: 28px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  border: none;
  background: var(--rc-mint);
  color: var(--rc-night);
  display: flex; align-items: center; justify-content: center; gap: 4px;
  transition: opacity var(--rc-transition);
  text-decoration: none;
}
.rc-scan-card__action:hover { opacity: 0.85; color: var(--rc-night); }
.rc-scan-card__action .ti { font-size: 13px; }
.rc-scan-card__menu-btn {
  width: 28px; height: 28px;
  border-radius: var(--rc-radius-sm);
  border: 1px solid var(--rc-border);
  background: transparent;
  color: var(--rc-text-3);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--rc-transition);
}
.rc-scan-card__menu-btn:hover { background: var(--rc-surface-2); color: var(--rc-text); }

/* ── Collection section ────────────────────────────────────── */
.rc-collection {
  margin-bottom: 36px;
}
.rc-collection__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rc-border);
}
.rc-collection__accent {
  width: 4px;
  height: 20px;
  border-radius: 4px;
  flex-shrink: 0;
}
.rc-collection__emoji { font-size: 18px; }
.rc-collection__name {
  font-family: var(--rc-font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--rc-text);
  flex: 1;
}
.rc-collection__count {
  font-size: 12px;
  color: var(--rc-text-3);
  background: var(--rc-surface-2);
  padding: 2px 8px;
  border-radius: 20px;
}
.rc-collection__actions {
  display: flex; gap: 4px;
}
.rc-icon-btn-sm {
  width: 28px; height: 28px;
  border-radius: var(--rc-radius-sm);
  border: none;
  background: transparent;
  color: var(--rc-text-3);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--rc-transition);
  font-size: 14px;
}
.rc-icon-btn-sm:hover { background: var(--rc-surface-2); color: var(--rc-text); }

/* Add scan card */
.rc-scan-card--add {
  border: 1.5px dashed var(--rc-border);
  background: transparent;
  min-height: 180px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--rc-text-3);
  transition: border-color var(--rc-transition), color var(--rc-transition);
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}
.rc-scan-card--add:hover { border-color: var(--rc-mint); color: var(--rc-mint); }
.rc-scan-card--add .ti { font-size: 24px; }

/* ── Processing card ───────────────────────────────────────── */
.rc-processing {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 60vh;
  gap: 20px;
  text-align: center;
}
.rc-processing__spinner {
  width: 48px; height: 48px;
  border: 3px solid var(--rc-border);
  border-top-color: var(--rc-mint);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.rc-processing__label {
  font-size: 15px;
  color: var(--rc-text-2);
}

/* ── Tabs ──────────────────────────────────────────────────── */
.rc-tabs {
  display: flex;
  border-bottom: 1px solid var(--rc-border);
  margin-bottom: 24px;
  gap: 0;
}
.rc-tab {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--rc-text-3);
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--rc-transition), border-color var(--rc-transition);
  display: flex; align-items: center; gap: 7px;
  text-decoration: none;
  cursor: pointer;
}
.rc-tab:hover { color: var(--rc-text); }
.rc-tab.active {
  color: var(--rc-peri);
  border-bottom-color: var(--rc-peri);
}
.rc-tab .ti { font-size: 16px; }

/* ── Summary ───────────────────────────────────────────────── */
.rc-overview {
  background: var(--rc-peri-soft);
  border-left: 3px solid var(--rc-peri);
  padding: 16px 20px;
  border-radius: 0 var(--rc-radius) var(--rc-radius) 0;
  margin-bottom: 24px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--rc-text);
}

.rc-bullets { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.rc-bullets li {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 14px;
  background: var(--rc-surface-2);
  border-radius: var(--rc-radius);
  font-size: 14px;
  line-height: 1.5;
}
.rc-bullets li .ti { color: var(--rc-mint); font-size: 16px; flex-shrink: 0; margin-top: 1px; }

.rc-terms { display: flex; flex-direction: column; gap: 8px; margin-top: 24px; }
.rc-term {
  border: 1px solid var(--rc-border);
  border-radius: var(--rc-radius);
  overflow: hidden;
}
.rc-term summary {
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  display: flex; align-items: center; justify-content: space-between;
}
.rc-term summary::-webkit-details-marker { display: none; }
.rc-term summary::after {
  content: '\ea61'; /* ti-chevron-down */
  font-family: 'tabler-icons';
  font-size: 16px;
  color: var(--rc-text-3);
  transition: transform var(--rc-transition);
}
.rc-term[open] summary::after { transform: rotate(180deg); }
.rc-term__def {
  padding: 12px 16px;
  font-size: 14px;
  color: var(--rc-text-2);
  border-top: 1px solid var(--rc-border);
  line-height: 1.6;
}

/* ── Quiz ──────────────────────────────────────────────────── */
.rc-quiz-question {
  padding: 20px;
  margin-bottom: 16px;
  background: var(--rc-surface);
  border: 1px solid var(--rc-border);
  border-radius: var(--rc-radius-lg);
}
.rc-question-num {
  font-size: 11px;
  font-weight: 600;
  color: var(--rc-text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  display: flex; align-items: center; justify-content: space-between;
}
.rc-difficulty {
  display: flex; gap: 3px;
}
.rc-difficulty span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--rc-border);
}
.rc-difficulty--1 span:nth-child(1) { background: var(--rc-mint); }
.rc-difficulty--2 span:nth-child(-n+2) { background: var(--rc-peri); }
.rc-difficulty--3 span { background: var(--rc-warning); }

.rc-question-body {
  font-size: 15px;
  line-height: 1.6;
  font-weight: 500;
  margin-bottom: 16px;
}
.rc-options { display: flex; flex-direction: column; gap: 8px; }

.rc-option {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border: 1.5px solid var(--rc-border);
  border-radius: var(--rc-radius);
  cursor: pointer;
  transition: border-color var(--rc-transition), background var(--rc-transition);
  font-size: 14px;
  line-height: 1.5;
}
.rc-option:hover { border-color: var(--rc-peri); background: var(--rc-peri-soft); }
.rc-option input[type="radio"] { display: none; }
.rc-option__letter {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--rc-surface-2);
  color: var(--rc-text-3);
  font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background var(--rc-transition), color var(--rc-transition);
}
.rc-option.selected {
  border-color: var(--rc-peri);
  background: var(--rc-peri-soft);
}
.rc-option.selected .rc-option__letter {
  background: var(--rc-peri);
  color: #fff;
}
.rc-option.correct {
  border-color: var(--rc-mint);
  background: var(--rc-mint-soft);
}
.rc-option.correct .rc-option__letter { background: var(--rc-mint); color: var(--rc-night); }
.rc-option.wrong {
  border-color: var(--rc-danger);
  background: #FEF2F2;
}
.rc-option.wrong .rc-option__letter { background: var(--rc-danger); color: #fff; }

/* Explanation */
.rc-explanation {
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--rc-mint-soft);
  border-left: 3px solid var(--rc-mint);
  border-radius: 0 var(--rc-radius) var(--rc-radius) 0;
  font-size: 13px;
  color: var(--rc-text-2);
  line-height: 1.6;
}

/* Confidence selector */
.rc-confidence {
  display: flex; gap: 6px; margin-top: 10px;
}
.rc-confidence label {
  flex: 1;
  text-align: center;
  padding: 5px 0;
  border: 1px solid var(--rc-border);
  border-radius: var(--rc-radius-sm);
  font-size: 11px;
  cursor: pointer;
  transition: background var(--rc-transition);
  color: var(--rc-text-3);
}
.rc-confidence input[type="radio"] { display: none; }
.rc-confidence input:checked + label {
  background: var(--rc-peri-soft);
  border-color: var(--rc-peri);
  color: var(--rc-peri);
}

/* ── Attempt history ───────────────────────────────────────── */
.rc-attempts { display: flex; flex-direction: column; gap: 10px; }
.rc-attempt-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  background: var(--rc-surface);
  border: 1px solid var(--rc-border);
  border-radius: var(--rc-radius);
  text-decoration: none;
  transition: background var(--rc-transition);
}
.rc-attempt-row:hover { background: var(--rc-surface-2); }
.rc-attempt-score {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
  flex-shrink: 0;
}
.rc-attempt-score--strong { background: var(--rc-mint-soft); color: var(--rc-success); }
.rc-attempt-score--good   { background: var(--rc-peri-soft); color: var(--rc-peri); }
.rc-attempt-score--needs-work { background: #FEF3C7; color: #D97706; }
.rc-attempt-score--weak   { background: #FEF2F2; color: var(--rc-danger); }

.rc-attempt-meta { flex: 1; }
.rc-attempt-date { font-size: 13px; color: var(--rc-text-2); }
.rc-attempt-detail {
  font-size: 12px;
  color: var(--rc-text-3);
  display: flex; gap: 10px; margin-top: 2px;
}
.rc-attempt-detail .ti { font-size: 13px; }

/* ── Forms ─────────────────────────────────────────────────── */
.rc-form-group { margin-bottom: 18px; }
.rc-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--rc-text-2);
  margin-bottom: 6px;
}
.rc-input {
  width: 100%;
  height: 40px;
  padding: 0 14px;
  border: 1.5px solid var(--rc-border);
  border-radius: var(--rc-radius);
  background: var(--rc-surface);
  font-size: 14px;
  color: var(--rc-text);
  transition: border-color var(--rc-transition);
  outline: none;
}
.rc-input:focus { border-color: var(--rc-peri); }
.rc-input::placeholder { color: var(--rc-text-3); }

.rc-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--rc-border);
  border-radius: var(--rc-radius);
  background: var(--rc-surface);
  font-size: 14px;
  color: var(--rc-text);
  resize: vertical;
  outline: none;
  transition: border-color var(--rc-transition);
}
.rc-textarea:focus { border-color: var(--rc-peri); }

.rc-select {
  width: 100%;
  height: 40px;
  padding: 0 14px;
  border: 1.5px solid var(--rc-border);
  border-radius: var(--rc-radius);
  background: var(--rc-surface);
  font-size: 14px;
  color: var(--rc-text);
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.rc-select:focus { border-color: var(--rc-peri); }

/* ── Buttons ───────────────────────────────────────────────── */
.rc-btn {
  height: 40px;
  padding: 0 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer;
  transition: opacity var(--rc-transition), transform var(--rc-transition);
  text-decoration: none;
}
.rc-btn:active { transform: scale(0.98); }
.rc-btn:hover { opacity: 0.88; }
.rc-btn--primary  { background: var(--rc-mint); color: var(--rc-night); }
.rc-btn--secondary{ background: var(--rc-surface-2); color: var(--rc-text); border: 1px solid var(--rc-border); }
.rc-btn--peri     { background: var(--rc-peri); color: #fff; }
.rc-btn--danger   { background: #FEF2F2; color: var(--rc-danger); border: 1px solid #FECACA; }
.rc-btn--sm { height: 32px; padding: 0 14px; font-size: 13px; }
.rc-btn--lg { height: 48px; padding: 0 28px; font-size: 15px; }
.rc-btn--full { width: 100%; justify-content: center; }
.rc-btn .ti { font-size: 16px; }

/* ── Auth pages ────────────────────────────────────────────── */
.rc-auth-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: var(--rc-bg);
}
.rc-auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--rc-surface);
  border: 1px solid var(--rc-border);
  border-radius: var(--rc-radius-xl);
  padding: 40px 36px;
}
.rc-auth-brand {
  text-align: center;
  margin-bottom: 32px;
}
.rc-auth-brand .rc-brand__word {
  font-family: var(--rc-font-display);
  font-size: 26px;
  font-weight: 700;
}
.rc-auth-brand .rc-brand__ext { font-size: 26px; }
.rc-auth-tagline {
  font-size: 12px;
  color: var(--rc-text-3);
  margin-top: 4px;
}
.rc-auth-title {
  font-family: var(--rc-font-display);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  text-align: center;
}
.rc-auth-footer {
  text-align: center;
  font-size: 13px;
  color: var(--rc-text-3);
  margin-top: 20px;
}
.rc-auth-footer a { color: var(--rc-peri); }

/* OTP grid */
.rc-otp-grid {
  display: flex; gap: 8px; justify-content: center;
  margin: 20px 0;
}
.rc-otp-input {
  width: 44px; height: 52px;
  text-align: center;
  font-size: 20px; font-weight: 700;
  border: 1.5px solid var(--rc-border);
  border-radius: var(--rc-radius);
  background: var(--rc-surface);
  color: var(--rc-text);
  outline: none;
  transition: border-color var(--rc-transition);
}
.rc-otp-input:focus { border-color: var(--rc-peri); }

/* Error / alert */
.rc-alert {
  padding: 10px 14px;
  border-radius: var(--rc-radius);
  font-size: 13px;
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.rc-alert--error { background: #FEF2F2; color: var(--rc-danger); border: 1px solid #FECACA; }
.rc-alert--info  { background: var(--rc-peri-soft); color: var(--rc-peri); }
.rc-alert--success { background: var(--rc-mint-soft); color: var(--rc-success); }
.rc-alert .ti { font-size: 15px; flex-shrink: 0; }

/* ── Upload ────────────────────────────────────────────────── */
.rc-drop-zone {
  border: 2px dashed var(--rc-border);
  border-radius: var(--rc-radius-lg);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--rc-transition), background var(--rc-transition);
  position: relative;
}
.rc-drop-zone:hover,
.rc-drop-zone.drag-over {
  border-color: var(--rc-mint);
  background: var(--rc-mint-soft);
}
.rc-drop-zone input[type="file"] {
  position: absolute; inset: 0;
  opacity: 0; cursor: pointer;
  width: 100%; height: 100%;
}
.rc-drop-zone__icon { font-size: 40px; color: var(--rc-text-3); margin-bottom: 12px; }
.rc-drop-zone__primary { font-size: 15px; font-weight: 500; margin-bottom: 4px; }
.rc-drop-zone__secondary { font-size: 13px; color: var(--rc-text-3); }

/* ── Score result ──────────────────────────────────────────── */
.rc-result-ring {
  width: 120px; height: 120px;
  border-radius: 50%;
  border: 6px solid var(--rc-border);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  margin: 0 auto 24px;
  position: relative;
}
.rc-result-ring__score {
  font-family: var(--rc-font-display);
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
}
.rc-result-ring__label { font-size: 11px; color: var(--rc-text-3); }
.rc-result-ring--strong { border-color: var(--rc-mint); }
.rc-result-ring--good   { border-color: var(--rc-peri); }
.rc-result-ring--needs-work { border-color: var(--rc-warning); }
.rc-result-ring--weak   { border-color: var(--rc-danger); }

/* ── Utilities ─────────────────────────────────────────────── */
.rc-divider {
  border: none;
  border-top: 1px solid var(--rc-border);
  margin: 24px 0;
}
.rc-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
}
.rc-badge--mint  { background: var(--rc-mint-soft); color: var(--rc-success); }
.rc-badge--peri  { background: var(--rc-peri-soft); color: var(--rc-peri); }
.rc-badge--gray  { background: var(--rc-surface-2); color: var(--rc-text-3); }

.rc-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--rc-text-3);
}
.rc-empty .ti { font-size: 36px; display: block; margin-bottom: 12px; }
.rc-empty__text { font-size: 14px; }

/* Modal */
.rc-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 300;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.rc-modal {
  background: var(--rc-surface);
  border-radius: var(--rc-radius-xl);
  padding: 28px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.rc-modal__title {
  font-family: var(--rc-font-display);
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 16px;
}
.rc-modal__footer {
  display: flex; gap: 10px; justify-content: flex-end;
  margin-top: 20px;
}

/* RTL overrides */
[dir="rtl"] .rc-overview { border-left: none; border-right: 3px solid var(--rc-peri); border-radius: var(--rc-radius) 0 0 var(--rc-radius); }
[dir="rtl"] .rc-explanation { border-left: none; border-right: 3px solid var(--rc-mint); border-radius: var(--rc-radius) 0 0 var(--rc-radius); }
[dir="rtl"] .rc-select { background-position: left 12px center; padding-right: 14px; padding-left: 36px; }
[dir="rtl"] .rc-collection__accent { }
[dir="rtl"] .rc-nav__dropdown { right: auto; left: 0; }

/* Processing status dot */
.rc-status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.rc-status-dot--processing { background: var(--rc-warning); animation: pulse 1.2s ease infinite; }
.rc-status-dot--ready      { background: var(--rc-mint); }
.rc-status-dot--failed     { background: var(--rc-danger); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* Responsive */
@media (max-width: 640px) {
  .rc-main { padding: 20px 16px 60px; }
  .rc-auth-card { padding: 28px 20px; }
  .rc-scan-grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 10px; }
  .rc-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .rc-tab { padding: 10px 14px; white-space: nowrap; }
}
