/* Sunshine 67 Empire — Customer Portal — Dark Theme */
:root {
  --gold:       #D4860F;
  --gold-lt:    #F0A832;
  --gold-dk:    #A0620A;
  --amber:      #B8580A;
  --brown:      #7A3A08;
  --cream:      #F2E8D5;
  --bg:         #0F0A04;
  --surface:    #1A110A;
  --surface2:   #261809;
  --surface3:   #321F0C;
  --border:     #4A2E10;
  --border-lt:  #6B4420;
  --text:       #F2E8D5;
  --text-muted: #C4A882;
  --text-dim:   #8A6A46;
  --red-dark:   #7A1515;
  --radius:     10px;
  --shadow:     0 2px 16px rgba(0,0,0,0.5);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--gold-lt); text-decoration: none; }
a:hover { color: var(--gold); }

/* ── App Shell ── */
.app-shell {
  max-width: 420px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
}

/* ── Header ── */
.app-header {
  background: var(--bg);
  padding: 20px 20px 16px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.logo-mark {
  font-size: 48px;
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
  letter-spacing: -2px;
  text-shadow: 0 0 30px rgba(212,134,15,0.4);
}

.logo-subtitle {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-dim);
  margin-top: 2px;
}

.logo-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── Main ── */
.app-main { flex: 1; padding: 20px; }

/* ── Membership Card ── */
.member-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  position: relative;
}

.member-card::before {
  content: '67';
  position: absolute;
  right: -10px;
  top: -10px;
  font-size: 120px;
  font-weight: 900;
  color: rgba(212,134,15,0.06);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.card-top {
  padding: 20px 20px 16px;
  background: linear-gradient(135deg, var(--surface2) 0%, var(--surface3) 100%);
  border-bottom: 1px solid var(--border);
}

.member-greeting { font-size: 12px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.08em; }
.member-name { font-size: 22px; font-weight: 700; color: var(--text); margin: 2px 0 6px; }
.member-package {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--brown);
  color: var(--gold-lt);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.card-points {
  padding: 24px 20px;
  text-align: center;
}

.points-big {
  font-size: 64px;
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
  text-shadow: 0 0 40px rgba(212,134,15,0.3);
}

.points-unit { font-size: 16px; color: var(--text-muted); margin-top: 4px; }
.points-value { font-size: 14px; color: var(--text-dim); margin-top: 2px; }

.card-bottom {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.expiry-label { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; }
.expiry-date  { font-size: 14px; font-weight: 600; color: var(--text-muted); margin-top: 2px; }
.expiry-soon  { color: #F4A236; }
.expiry-urgent { color: #E05252; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.status-active   { background: rgba(46,125,50,0.2); color: #81C784; border: 1px solid rgba(46,125,50,0.4); }
.status-expired  { background: rgba(198,40,40,0.2); color: #EF9A9A; border: 1px solid rgba(198,40,40,0.4); }
.status-warning  { background: rgba(230,81,0,0.2);  color: #FFCC80; border: 1px solid rgba(230,81,0,0.4); }

/* ── Info Grid ── */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.info-tile {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}

.info-tile-label { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; }
.info-tile-value { font-size: 20px; font-weight: 700; color: var(--gold); margin-top: 4px; }
.info-tile-sub   { font-size: 11px; color: var(--text-dim); margin-top: 2px; }

/* ── Section heading ── */
.section-heading {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* ── Transaction list ── */
.tx-list { display: flex; flex-direction: column; gap: 2px; margin-bottom: 20px; }

.tx-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--surface2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.tx-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.tx-icon-purchase   { background: rgba(21,101,192,0.2); }
.tx-icon-topup      { background: rgba(46,125,50,0.2); }
.tx-icon-redemption { background: rgba(184,88,10,0.2); }
.tx-icon-expired    { background: rgba(100,100,100,0.2); }
.tx-icon-refund     { background: rgba(198,40,40,0.2); }
.tx-icon-adjustment { background: rgba(230,81,0,0.2); }

.tx-body { flex: 1; min-width: 0; }
.tx-type { font-size: 13px; font-weight: 600; color: var(--text); text-transform: capitalize; }
.tx-date { font-size: 11px; color: var(--text-dim); margin-top: 1px; }
.tx-ref  { font-size: 11px; color: var(--text-dim); }

.tx-pts { text-align: right; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.tx-pts-in  { color: #81C784; }
.tx-pts-out { color: #E05252; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.15s;
}

.btn-gold    { background: var(--gold); color: #0F0A04; }
.btn-gold:hover { background: var(--gold-lt); }
.btn-outline { background: transparent; color: var(--text-muted); border: 1px solid var(--border-lt); }
.btn-outline:hover { background: var(--surface2); color: var(--text); }
.btn-block   { width: 100%; }
.btn-insta   { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); color: #fff; }

/* ── PIN Screen ── */
.pin-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 24px;
  background: var(--bg);
}

.pin-logo { font-size: 80px; font-weight: 900; color: var(--gold); text-shadow: 0 0 40px rgba(212,134,15,0.3); margin-bottom: 8px; }
.pin-brand { font-size: 13px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 32px; }
.pin-title { font-size: 18px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.pin-hint  { font-size: 13px; color: var(--text-dim); margin-bottom: 28px; text-align: center; }

.pin-dots {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
}

.pin-dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border-lt);
  background: transparent;
  transition: all 0.15s;
}

.pin-dot.filled { background: var(--gold); border-color: var(--gold); }

.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 72px);
  gap: 12px;
}

.pin-key {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 22px;
  font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
  user-select: none;
}

.pin-key:active, .pin-key:hover { background: var(--surface3); border-color: var(--gold); color: var(--gold); }
.pin-key.del { font-size: 18px; color: var(--text-dim); }
.pin-key.empty { visibility: hidden; }

.pin-error { color: #E05252; font-size: 13px; margin-top: 16px; min-height: 20px; text-align: center; }

/* ── Footer ── */
.app-footer {
  padding: 20px;
  text-align: center;
  border-top: 1px solid var(--border);
}

.insta-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 24px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 14px;
  transition: all 0.15s;
}

.insta-link:hover { border-color: var(--gold); color: var(--gold); }

.footer-copy { font-size: 11px; color: var(--text-dim); line-height: 1.8; }
.footer-copy a { color: var(--text-dim); }
.footer-copy a:hover { color: var(--gold); }

/* ── Logout ── */
.logout-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
  margin-top: 16px;
}

.logout-btn:hover { border-color: #E05252; color: #E05252; }

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-dim);
}

.empty-state .icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }
