/* ==========================================
   PERKEY — PREMIUM PAGE STYLES
   Cards, Benefits, Optimizer, Calendar
   ========================================== */

/* ==========================================
   CARDS PAGE — HERO STATS + WALLET
   ========================================== */

/* Hero stat - the big one */
.hero-stat {
  background: linear-gradient(135deg, var(--card) 0%, #f1f5f9 100%);
  border-radius: 28px;
  padding: 32px 24px;
  text-align: center;
  margin-bottom: 16px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.hero-stat::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--success) 0%, var(--accent) 100%);
}

.hero-stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 8px;
}

.hero-stat-value {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 8px;
}

.hero-stat-value.positive {
  color: var(--success);
}

.hero-stat-value.negative {
  color: var(--danger);
}

.hero-stat-detail {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Mini stats row */
.mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}

.mini-stat {
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.mini-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.mini-stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Wallet cards - premium style */
.wallet-section {
  margin-bottom: 32px;
}

.wallet-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wallet-section-title .count {
  background: var(--accent);
  color: white;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 100px;
  font-weight: 600;
}

.wallet-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wallet-card-premium {
  background: var(--card);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: all 0.25s ease;
  position: relative;
}

.wallet-card-premium:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.wallet-card-premium .card-visual {
  width: 100px;
  height: 63px;
  border-radius: 12px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.wallet-card-premium .card-details {
  flex: 1;
  min-width: 0;
}

.wallet-card-premium .card-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.wallet-card-premium .card-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.wallet-card-premium .card-stats {
  display: flex;
  gap: 16px;
}

.wallet-card-premium .card-stat {
  display: flex;
  flex-direction: column;
}

.wallet-card-premium .card-stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--success);
}

.wallet-card-premium .card-stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.wallet-card-premium .card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.wallet-card-premium .anniversary-btn {
  padding: 8px 16px;
  font-size: 0.8rem;
  background: var(--accent-light);
  color: var(--accent);
  border: none;
  border-radius: 100px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.wallet-card-premium .anniversary-btn:hover {
  background: var(--accent);
  color: white;
}

.wallet-card-premium .anniversary-btn.not-set {
  background: rgba(0,0,0,0.05);
  color: var(--text-muted);
}

.wallet-card-premium .remove-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.wallet-card-premium .remove-btn:hover {
  background: var(--danger-light);
  color: var(--danger);
}

/* ==========================================
   BENEFITS PAGE — PROGRESS TRACKING
   ========================================== */

.benefits-hero {
  background: linear-gradient(135deg, var(--success-light) 0%, var(--accent-light) 100%);
  border-radius: 24px;
  padding: 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.benefits-hero-chart {
  width: 80px;
  height: 80px;
  position: relative;
}

.benefits-hero-chart svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.benefits-hero-chart circle {
  fill: none;
  stroke-width: 8;
}

.benefits-hero-chart .bg {
  stroke: rgba(0,0,0,0.1);
}

.benefits-hero-chart .progress {
  stroke: var(--success);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.5s ease;
}

.benefits-hero-percent {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
}

.benefits-hero-text h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.benefits-hero-text p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Benefit card - accordion style */
.benefit-accordion {
  background: var(--card);
  border-radius: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  overflow: hidden;
}

.benefit-accordion-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.benefit-accordion-header:hover {
  background: rgba(0,0,0,0.02);
}

.benefit-accordion .card-swatch {
  width: 64px;
  height: 40px;
  border-radius: 8px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.benefit-accordion .card-info {
  flex: 1;
  min-width: 0;
}

.benefit-accordion .card-info h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.benefit-accordion .card-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.benefit-accordion .progress-ring {
  display: flex;
  align-items: center;
  gap: 12px;
}

.benefit-accordion .progress-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--success);
}

.benefit-accordion .progress-bar {
  width: 60px;
  height: 6px;
  background: rgba(0,0,0,0.1);
  border-radius: 3px;
  overflow: hidden;
}

.benefit-accordion .progress-bar-fill {
  height: 100%;
  background: var(--success);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.benefit-accordion .chevron {
  width: 24px;
  height: 24px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.benefit-accordion.expanded .chevron {
  transform: rotate(180deg);
}

.benefit-accordion-body {
  display: none;
  padding: 0 24px 24px;
}

.benefit-accordion.expanded .benefit-accordion-body {
  display: block;
}

/* Perk items */
.perk-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.perk-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.perk-row.completed {
  background: var(--success-light);
}

.perk-row .perk-check {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border-strong);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.perk-row .perk-check.checked {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.perk-row .perk-details {
  flex: 1;
}

.perk-row .perk-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.perk-row .perk-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.perk-row .perk-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--success);
}

/* ==========================================
   OPTIMIZER PAGE — RESULT CARDS
   ========================================== */

.optimizer-intro {
  text-align: center;
  padding: 24px;
  margin-bottom: 24px;
}

.optimizer-intro h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.optimizer-intro p {
  color: var(--text-muted);
}

.optimizer-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Optimizer card - like Advisor result card */
.optimizer-result-card {
  background: var(--card);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
  transition: all 0.25s ease;
}

.optimizer-result-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.optimizer-result-card .category-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.optimizer-result-card .category-icon {
  font-size: 2rem;
}

.optimizer-result-card .category-info h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.optimizer-result-card .category-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.optimizer-result-card .best-card {
  display: flex;
  align-items: center;
  gap: 16px;
}

.optimizer-result-card .best-card-swatch {
  width: 80px;
  height: 50px;
  border-radius: 10px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.optimizer-result-card .best-card-info {
  flex: 1;
}

.optimizer-result-card .best-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--success);
  font-weight: 700;
  margin-bottom: 4px;
}

.optimizer-result-card .best-card-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}

.optimizer-result-card .best-rate {
  text-align: right;
}

.optimizer-result-card .best-rate-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--success);
  line-height: 1;
}

.optimizer-result-card .best-rate-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.optimizer-result-card .runner-ups {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.optimizer-result-card .runner-up {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.optimizer-result-card .runner-up-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.optimizer-result-card .runner-up-rate {
  margin-left: auto;
  font-weight: 600;
}

/* ==========================================
   CALENDAR PAGE — TIMELINE
   ========================================== */

.calendar-hero {
  background: linear-gradient(135deg, var(--warning-light) 0%, var(--accent-light) 100%);
  border-radius: 24px;
  padding: 24px;
  margin-bottom: 24px;
  text-align: center;
}

.calendar-hero-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.calendar-hero h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.calendar-hero p {
  color: var(--text-secondary);
}

.calendar-timeline {
  position: relative;
}

.calendar-timeline::before {
  content: '';
  position: absolute;
  left: 28px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-event {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  position: relative;
}

.timeline-date {
  width: 56px;
  flex-shrink: 0;
  text-align: center;
  z-index: 1;
}

.timeline-date .month {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}

.timeline-date .day {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  background: var(--card);
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  box-shadow: var(--shadow-sm);
}

.timeline-event.urgent .timeline-date .day {
  background: var(--warning);
  color: white;
}

.timeline-event.overdue .timeline-date .day {
  background: var(--danger);
  color: white;
}

.timeline-content {
  flex: 1;
  background: var(--card);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.timeline-event.urgent .timeline-content {
  border-left: 4px solid var(--warning);
}

.timeline-event.overdue .timeline-content {
  border-left: 4px solid var(--danger);
}

.timeline-content h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.timeline-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.timeline-content .card-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 6px 12px;
  background: var(--bg);
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.timeline-content .card-chip-swatch {
  width: 20px;
  height: 12px;
  border-radius: 2px;
}
