/* ── Swipe layout ─────────────────────────────────────────────────────────── */

.swipe-body {
  background: var(--bg);
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

/* Header */
.swipe-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}

.streak-badge {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.progress-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.progress-bar {
  height: 8px;
  background: var(--surface-2);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  width: 0%;
  transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.progress-fill.done { background: var(--green); }

.progress-label {
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
}

.grid-link {
  font-size: 20px;
  color: var(--text-muted);
  text-decoration: none;
  flex-shrink: 0;
  line-height: 1;
  padding: 4px;
}
.grid-link:hover { color: var(--text); }

/* Stage */
.swipe-stage {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.swipe-loading {
  color: var(--text-muted);
  font-size: 14px;
}

/* Hint labels */
.hint-reject, .hint-approve, .hint-skip {
  position: absolute;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 3px;
  border-radius: 8px;
  padding: 8px 16px;
  border-width: 3px;
  border-style: solid;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.1s;
  z-index: 10;
}

.hint-reject  { top: 30px; left: 30px;  color: var(--red);   border-color: var(--red);   transform: rotate(-15deg); }
.hint-approve { top: 30px; right: 30px; color: var(--green); border-color: var(--green); transform: rotate(15deg); }
.hint-skip    { bottom: 30px; left: 50%; transform: translateX(-50%); color: #818cf8; border-color: #818cf8; }

/* Card stack */
.card-stack {
  position: relative;
  width: min(420px, calc(100vw - 32px));
  height: min(600px, calc(100dvh - 160px));
}

/* Swipe card */
.swipe-card {
  position: absolute;
  inset: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  cursor: grab;
  transform-origin: center bottom;
  transition: box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  touch-action: none;
  will-change: transform;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
}

.swipe-card.is-next {
  transform: scale(0.95) translateY(16px);
  pointer-events: none;
  z-index: 0;
}
.swipe-card.is-active { z-index: 5; }
.swipe-card.is-gone { display: none; }

.swipe-card:active { cursor: grabbing; }

/* Overlay tint */
.card-overlay-approve,
.card-overlay-reject,
.card-overlay-skip {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  z-index: 20;
  border-radius: 18px;
  transition: opacity 0.05s;
}
.card-overlay-approve { background: rgba(34,197,94,0.25); }
.card-overlay-reject  { background: rgba(239,68,68,0.25); }
.card-overlay-skip    { background: rgba(129,140,248,0.2); }

/* Card image */
.sc-img {
  width: 100%;
  height: 180px;
  flex-shrink: 0;
  background: var(--surface-2);
  overflow: hidden;
  position: relative;
}
.sc-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sc-img .no-img {
  display: flex; align-items: center; justify-content: center;
  height: 100%; font-size: 52px; color: var(--text-faint);
}

/* Score + badges on image */
.sc-img-badges {
  position: absolute;
  top: 10px; left: 10px; right: 10px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
}

/* Card body */
.sc-body {
  flex: 1;
  padding: 14px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  -webkit-overflow-scrolling: touch;
}

.sc-top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.sc-name {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  flex: 1;
}

.sc-score {
  font-size: 13px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 6px;
  flex-shrink: 0;
}

.sc-category {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.sc-problem {
  font-size: 13px;
  color: var(--text-muted);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 10px;
  line-height: 1.4;
}

.sc-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.sc-metric {
  background: var(--surface-2);
  border-radius: 8px;
  padding: 8px 10px;
}

.sc-metric-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.sc-metric-value {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}
.sc-metric-value.sek { color: #a5b4fc; }
.sc-metric-value.profit-strong { color: var(--green); }
.sc-metric-value.profit-ok { color: #fbbf24; }

.sc-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.sc-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.4px;
}

.sc-angle {
  font-size: 12px;
  color: #a5b4fc;
  font-style: italic;
  line-height: 1.4;
}

.sc-hook {
  font-size: 11px;
  color: var(--text-muted);
  padding: 5px 8px;
  border-left: 2px solid var(--accent);
  line-height: 1.4;
}

/* Footer */
.swipe-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 14px 20px 20px;
  flex-shrink: 0;
  border-top: 1px solid var(--border);
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border: none;
  cursor: pointer;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: all 0.15s;
}

.btn-rej  { width: 60px; height: 60px; }
.btn-skip { width: 52px; height: 52px; }
.btn-app  { width: 68px; height: 68px; }

.btn-icon { font-size: 20px; line-height: 1; }
.btn-label { font-size: 9px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; }

.btn-rej  { color: var(--red); border-color: rgba(239,68,68,0.3); }
.btn-rej:hover  { background: var(--red-bg); transform: scale(1.1); }

.btn-app  { color: var(--green); border-color: rgba(34,197,94,0.3); }
.btn-app:hover  { background: var(--green-bg); transform: scale(1.1); }

.btn-skip { color: #818cf8; border-color: rgba(129,140,248,0.3); }
.btn-skip:hover { background: rgba(129,140,248,0.1); transform: scale(1.05); }

/* Animate card out */
.swipe-card.fly-left  { transition: transform 0.35s ease-in, opacity 0.35s; transform: translateX(-130%) rotate(-20deg) !important; opacity: 0; }
.swipe-card.fly-right { transition: transform 0.35s ease-in, opacity 0.35s; transform: translateX(130%) rotate(20deg) !important; opacity: 0; }
.swipe-card.fly-down  { transition: transform 0.35s ease-in, opacity 0.35s; transform: translateY(120%) !important; opacity: 0; }

/* Goal + empty overlays */
.goal-overlay {
  position: fixed; inset: 0;
  background: rgba(13,13,17,0.96);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s;
}
.goal-overlay.show { opacity: 1; pointer-events: all; }

.empty-overlay {
  position: fixed; inset: 0;
  background: rgba(13,13,17,0.96);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
}

.goal-content {
  text-align: center;
  padding: 40px 24px;
  max-width: 340px;
}
.goal-emoji { font-size: 60px; margin-bottom: 16px; }
.goal-content h2 { font-size: 26px; font-weight: 800; margin-bottom: 8px; }
.goal-content p { font-size: 14px; color: var(--text-muted); margin-bottom: 6px; }
.goal-sub { font-size: 12px; color: var(--text-faint) !important; }
.goal-btn {
  display: inline-block; margin: 20px 0 12px;
  background: var(--accent); color: #fff;
  border: none; border-radius: 8px;
  padding: 11px 28px; font-size: 14px; font-weight: 700;
  cursor: pointer;
}
.goal-link { display: block; font-size: 13px; color: var(--accent); text-decoration: none; }
.goal-link:hover { text-decoration: underline; }

/* Pulse on goal complete */
@keyframes pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.15)} }
.goal-emoji.pulse { animation: pulse 0.6s ease-in-out 3; }
