/* ==========================================================================
   TYLO - Premium Rewards Dashboard CSS
   Theme: Black + White + Mint Glossy Premium + Orange Interaction
   ========================================================================== */

:root {
  --bold-black: #020202;
  --soft-black: #1a1a1a;
  --charcoal: #2a2a2a;
  --white: #ffffff;
  --off-white: #f8f9fa;
  --bg-luxury: #f4f7f6;

  --mint-primary: #2ebf91;
  --mint-light: #a8ff78;
  --mint-gradient: linear-gradient(145deg, #a8ff78, #2ebf91);
  --mint-gloss-shadow: 0 6px 18px rgba(46, 191, 145, 0.25);
  
  --saffron-primary: #e67300;
  --saffron-gradient: linear-gradient(145deg, #ff9933, #e67300);

  --border-delicate: 1px solid rgba(0, 0, 0, 0.08);
  --shadow-premium: 0 10px 30px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 4px 15px rgba(0, 0, 0, 0.03);
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background-color: var(--bg-luxury);
  color: var(--bold-black);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- HEADER REUSE --- */
.header-main { background: var(--white); border-bottom: var(--border-delicate); position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 10px rgba(0,0,0,0.02); }
.header-container { display: flex; align-items: center; justify-content: space-between; max-width: 1536px; margin: 0 auto; padding: 12px 32px; }
.brand-section { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.header-logo { height: 36px; }
.brand-text { display: flex; flex-direction: column; }
.brand-title { font-size: 22px; font-weight: 900; letter-spacing: 2px; background: var(--saffron-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; line-height: 1; }
.brand-subtitle { font-size: 9px; font-weight: 800; letter-spacing: 4px; background: var(--mint-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.search-action-area { flex: 1; display: flex; justify-content: flex-start; padding-left: 40px; align-items: center; }
.search-container { display: flex; align-items: center; background: var(--off-white); border-radius: 8px; padding: 8px 16px; width: 100%; max-width: 500px; border: 1px solid #eaeaea; transition: var(--transition-smooth); }
.search-container:focus-within { background: #fffdfa; border-color: var(--saffron-primary); box-shadow: 0 4px 12px rgba(230, 115, 0, 0.1); }
.search-input { border: none; background: transparent; width: 100%; font-size: 14px; outline: none; }
.search-btn { background: transparent; border: none; cursor: pointer; padding-left: 8px; }
.search-icon-semantic { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--mint-primary); border-radius: 50%; position: relative; transition: var(--transition-smooth); }
.search-icon-semantic::after { content: ''; position: absolute; width: 2px; height: 6px; background: var(--mint-primary); bottom: -4px; right: -3px; transform: rotate(-45deg); }
.user-actions { display: flex; gap: 24px; margin-left: auto; }
.dropdown-trigger { background: transparent; border: none; font-size: 14px; font-weight: 700; color: var(--soft-black); cursor: pointer; display: flex; align-items: center; gap: 6px; transition: color 0.3s; }
.indicator-triangle { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; }

/* --- MAIN LAYOUT --- */
.rewards-dashboard {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 32px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* --- HERO STRIP --- */
.rewards-hero-strip {
  background: var(--white);
  border-radius: 20px;
  padding: 32px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-premium);
  display: flex;
  align-items: center;
}
.rewards-hero-strip::before {
  content: ''; position: absolute; left: 0; top: 0; width: 8px; height: 100%;
  background: var(--saffron-gradient);
}
.hero-content { position: relative; z-index: 2; }
.hero-title { font-size: 28px; font-weight: 900; color: var(--bold-black); margin-bottom: 8px; }
.hero-subtitle { font-size: 15px; color: #666; font-weight: 500; }

/* --- SUMMARY STRIP --- */
.summary-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.summary-card {
  background: var(--white);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid transparent;
  transition: var(--transition-smooth);
}
.summary-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-premium); }
.summary-card.highlight-wallet {
  background: var(--mint-gradient);
  color: var(--bold-black);
}
.summary-value { font-size: 28px; font-weight: 900; }
.summary-label { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: #555; }
.summary-card.highlight-wallet .summary-label { color: var(--soft-black); }

/* --- TABS NAVIGATION --- */
.rewards-tabs-nav {
  background: var(--white);
  border-radius: 12px;
  padding: 8px;
  box-shadow: var(--shadow-card);
  overflow-x: auto;
}
.tabs-list {
  list-style: none;
  display: flex;
  gap: 8px;
  white-space: nowrap;
}
.tab-item {
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  color: #666;
  cursor: pointer;
  transition: var(--transition-smooth);
  background: transparent;
}
.tab-item:hover { background: var(--off-white); color: var(--bold-black); }
.tab-item.active {
  background: var(--bold-black);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* --- TABS CONTENT AREA --- */
.tab-content-section {
  display: none;
  animation: fadeIn 0.4s ease;
}
.tab-content-section.active-section {
  display: block;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* --- FILTERS --- */
.category-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.filter-chip {
  padding: 10px 20px;
  border: 1px solid #ddd;
  border-radius: 30px;
  background: var(--white);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
  color: #555;
}
.filter-chip:hover { border-color: var(--mint-primary); color: var(--mint-primary); }
.filter-chip.active { background: var(--mint-primary); border-color: var(--mint-primary); color: white; }

/* --- GRID LAYOUT --- */
.dynamic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

/* --- OFFERS CARDS --- */
.offer-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: var(--transition-smooth);
  border: 1px solid #eaeaea;
  display: flex;
  flex-direction: column;
}
.offer-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-premium); border-color: var(--mint-primary); }
.offer-banner {
  height: 140px;
  background: #eee;
  position: relative;
}
.offer-banner img { width: 100%; height: 100%; object-fit: cover; }
.offer-badge {
  position: absolute; top: 12px; right: 12px; background: var(--saffron-gradient);
  color: white; font-size: 11px; font-weight: 800; padding: 6px 12px; border-radius: 20px;
  text-transform: uppercase;
}
.offer-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.offer-cat { font-size: 12px; font-weight: 700; color: var(--mint-primary); margin-bottom: 6px; text-transform: uppercase; }
.offer-title { font-size: 18px; font-weight: 800; color: var(--bold-black); margin-bottom: 8px; line-height: 1.3; }
.offer-desc { font-size: 14px; color: #666; margin-bottom: 16px; line-height: 1.5; flex: 1; }
.offer-meta { display: flex; justify-content: space-between; font-size: 12px; color: #888; margin-bottom: 16px; font-weight: 600; padding-top: 12px; border-top: 1px dashed #eee; }
.offer-actions { display: flex; gap: 12px; }

/* --- GIFT CARDS --- */
.gift-card {
  background: var(--white);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-card);
  border: 2px dashed #ddd;
  position: relative;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}
.gift-card:hover { border-color: var(--saffron-primary); transform: translateY(-2px); }
.gift-card.status-used { opacity: 0.7; border-color: #eee; filter: grayscale(100%); }
.gift-card.status-expired { opacity: 0.5; border-color: #ffcccc; }
.gc-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.gc-title { font-size: 16px; font-weight: 800; color: var(--bold-black); }
.gc-status { font-size: 11px; font-weight: 800; padding: 4px 8px; border-radius: 4px; text-transform: uppercase; }
.status-badge-active { background: #e8f8f2; color: #147a51; }
.status-badge-used { background: #f0f0f0; color: #666; }
.status-badge-expired { background: #ffeeee; color: #c0392b; }
.gc-value { font-size: 32px; font-weight: 900; color: var(--saffron-primary); margin-bottom: 8px; }
.gc-code-box { background: var(--off-white); border: 1px solid #eaeaea; padding: 12px; border-radius: 8px; text-align: center; font-family: monospace; font-size: 16px; font-weight: 800; letter-spacing: 2px; margin-bottom: 16px; }
.gc-meta { font-size: 12px; color: #888; margin-bottom: 20px; font-weight: 500; }
.gc-actions { display: flex; gap: 12px; }

/* --- SCRATCH CARDS --- */
.scratch-card {
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  border: 1px solid #eaeaea;
  position: relative;
  overflow: hidden;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: var(--transition-smooth);
}
.scratch-card:hover { box-shadow: var(--shadow-premium); }
/* The hidden result layer */
.scratch-result {
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.scratch-result h3 { font-size: 18px; font-weight: 800; color: var(--mint-primary); }
.scratch-result .reward-val { font-size: 28px; font-weight: 900; color: var(--bold-black); }
.scratch-result p { font-size: 13px; color: #666; }
/* The un-scratched cover layer */
.scratch-cover {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: white;
  transition: opacity 0.6s ease, visibility 0.6s ease;
  z-index: 2;
}
.scratch-cover::after {
  content: '✨'; font-size: 40px; margin-bottom: 12px; opacity: 0.5;
}
.scratch-cover h3 { font-size: 16px; font-weight: 800; margin-bottom: 8px; }
.scratch-cover p { font-size: 12px; color: #bbb; margin-bottom: 20px; }
.scratch-cover.is-revealed { opacity: 0; visibility: hidden; pointer-events: none; }

/* --- MY REWARDS (WALLET & HISTORY) --- */
.wallet-overview {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px; margin-bottom: 32px;
}
.wallet-stat {
  background: var(--off-white); border: 1px solid #eaeaea; border-radius: 12px;
  padding: 20px; display: flex; flex-direction: column; gap: 8px;
}
.stat-lbl { font-size: 13px; font-weight: 700; color: #666; text-transform: uppercase; }
.stat-val { font-size: 24px; font-weight: 900; color: var(--bold-black); }

.section-sub-heading { font-size: 20px; font-weight: 900; margin-bottom: 20px; color: var(--bold-black); }

.transactions-list { display: flex; flex-direction: column; gap: 12px; }
.transaction-card {
  background: var(--white); border: 1px solid #eaeaea; border-radius: 12px;
  padding: 20px; display: flex; justify-content: space-between; align-items: center;
  transition: var(--transition-smooth);
}
.transaction-card:hover { border-color: var(--mint-primary); }
.tx-info { display: flex; flex-direction: column; gap: 6px; }
.tx-title { font-size: 16px; font-weight: 800; color: var(--bold-black); }
.tx-meta { font-size: 13px; color: #666; display: flex; gap: 12px; }
.tx-amount { text-align: right; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.tx-val { font-size: 18px; font-weight: 900; }
.tx-val.positive { color: var(--mint-primary); }
.tx-val.negative { color: var(--saffron-primary); }
.tx-status { font-size: 11px; font-weight: 800; padding: 4px 8px; border-radius: 4px; text-transform: uppercase; background: #e8f8f2; color: #147a51; }

/* --- BUTTONS --- */
.btn-primary-mint {
  background: var(--mint-gradient); color: var(--bold-black); font-weight: 800; font-size: 14px;
  padding: 12px 24px; border: none; border-radius: 8px; cursor: pointer; box-shadow: var(--mint-gloss-shadow);
  transition: var(--transition-smooth); text-transform: uppercase; letter-spacing: 0.5px;
  text-align: center; flex: 1;
}
.btn-primary-mint:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(46, 191, 145, 0.4); }

.btn-outline {
  background: transparent; color: var(--soft-black); font-weight: 700; font-size: 14px;
  padding: 10px 20px; border: 2px solid #ccc; border-radius: 8px; cursor: pointer;
  transition: var(--transition-smooth); text-align: center; flex: 1;
}
.btn-outline:hover { border-color: var(--bold-black); color: var(--bold-black); }

.btn-saffron {
  background: var(--saffron-gradient); color: white; font-weight: 800; font-size: 14px;
  padding: 12px 24px; border: none; border-radius: 8px; cursor: pointer;
  transition: var(--transition-smooth); text-transform: uppercase; letter-spacing: 0.5px;
}
.btn-saffron:hover { box-shadow: 0 6px 15px rgba(230, 115, 0, 0.3); transform: translateY(-2px); }

.btn-sm { padding: 8px 16px; font-size: 12px; }
.btn-disabled { opacity: 0.5; pointer-events: none; background: #ccc; box-shadow: none; color: #666; }

/* --- EMPTY STATES --- */
.empty-state-card {
  grid-column: 1 / -1;
  background: var(--white); border: 1px dashed #ccc; border-radius: 16px;
  padding: 40px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; gap: 16px; min-height: 300px;
}
.empty-icon { font-size: 48px; opacity: 0.5; margin-bottom: 8px; }
.empty-state-card h3 { font-size: 20px; font-weight: 800; color: var(--bold-black); }
.empty-state-card p { font-size: 14px; color: #666; max-width: 400px; line-height: 1.5; }

/* --- INFO STRIP --- */
.reward-info-strip {
  background: var(--bold-black);
  color: var(--white);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}
.info-item { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }

/* --- TOAST --- */
.toast-notification {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%);
  background: var(--bold-black); color: white; padding: 14px 28px;
  border-radius: 30px; font-weight: 700; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  z-index: 9999; transition: var(--transition-smooth); opacity: 1; visibility: visible;
}
.toast-notification.hidden { opacity: 0; visibility: hidden; transform: translate(-50%, 20px); }

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
  .rewards-dashboard { padding: 24px 20px; }
  .hero-title { font-size: 24px; }
  .dynamic-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .reward-info-strip { flex-direction: column; align-items: center; text-align: center; }
}
@media (max-width: 768px) {
  .header-container { flex-wrap: wrap; gap: 16px; padding: 12px 16px; }
  .search-action-area { padding-left: 0; width: 100%; justify-content: space-between; }
  .summary-strip { grid-template-columns: 1fr 1fr; }
  .transaction-card { flex-direction: column; align-items: flex-start; gap: 12px; }
  .tx-amount { align-items: flex-start; text-align: left; }
}
@media (max-width: 480px) {
  .summary-strip { grid-template-columns: 1fr; }
  .offer-actions, .gc-actions { flex-direction: column; }
}