/* ============================================================
   EyeDive MyEyeDive Portal — CSS
   Colors: Navy #1c2e4a | Orange #fb7112 | Gold #c9a84c | Warm #f7f5f0
   Fonts: Georgia serif headings | Inter body
   Mobile-first. No animations. Clean, premium, readable.
   ============================================================ */

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

:root {
  --navy:      #1c2e4a;
  --orange:    #fb7112;
  --gold:      #c9a84c;
  --warm:      #f7f5f0;
  --white:     #ffffff;
  --text:      #1a1a1a;
  --muted:     #6b7280;
  --border:    #e5e0d8;
  --success:   #16a34a;
  --danger:    #dc2626;
  --font-serif: Georgia, 'Times New Roman', serif;
  --font-sans:  'Inter', 'Segoe UI', system-ui, sans-serif;
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.10);
  --radius:     12px;
}

html { font-size:16px; scroll-behavior:smooth; }
body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--warm);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
img  { max-width:100%; display:block; }
a    { text-decoration:none; color:inherit; }
h1,h2,h3 { font-family: var(--font-serif); line-height:1.25; }

/* ── TOP NAV ─────────────────────────────────────────────── */
.portal-nav {
  background: var(--navy);
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}
.portal-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.portal-nav-brand img { height:28px; width:auto; }
.portal-nav-brand-text {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}
.portal-nav-brand-text span {
  display: block;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 1px;
  opacity: 0.65;
  font-family: var(--font-sans);
}
.portal-nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.portal-nav-user {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
}
.portal-nav-logout {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-sans);
}
.portal-nav-logout:hover { color:#fff; }

/* ── BOTTOM TAB BAR (mobile nav) ────────────────────────── */
.portal-tabs {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--white);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
}
.portal-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 4px;
  font-size: 10px;
  color: var(--muted);
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font-sans);
  gap: 4px;
  text-decoration: none;
}
.portal-tab.active {
    color: var(--navy);
    position: relative;
}
.portal-tab.active::before {
    content: '';
    position: absolute;
    top: 0; left: 20%; right: 20%;
    height: 3px;
    background: var(--orange);
    border-radius: 0 0 3px 3px;
}
.portal-tab.active .tab-label {
    font-weight: 700;
}
.portal-tab .tab-icon { font-size: 20px; line-height: 1; }
.portal-tab .tab-label { font-size: 10px; font-weight: 500; }

/* ── MAIN CONTENT AREA ───────────────────────────────────── */
.portal-main {
  max-width: 520px;
  margin: 0 auto;
  padding: 20px 16px 90px; /* bottom pad for tab bar */
  min-height: calc(100vh - 60px);
}

/* ── CARDS ───────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
}
.card-header {
  padding: 16px 20px 0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}
.card-body { padding: 16px 20px; }
.card-body + .card-body { padding-top: 0; }

/* ── TIER CARD (top of home) ─────────────────────────────── */
.tier-card {
  background: var(--navy);
  border-radius: var(--radius);
  padding: 24px 20px;
  color: #fff;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.tier-card::after {
  content: '';
  position: absolute;
  right: -30px; top: -30px;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}
.tier-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}
.tier-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(255,255,255,0.12);
  color: #fff;
}
.tier-badge.silver { background: rgba(156,163,175,0.3); }
.tier-badge.gold   { background: rgba(201,168,76,0.3); color: var(--gold); }
.tier-badge.platinum { background: rgba(255,255,255,0.15); }
.tier-badge.none   { background: rgba(255,255,255,0.08); }
.tier-card-number {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  font-family: monospace;
  letter-spacing: 1px;
}
.tier-points-label {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  margin-bottom: 4px;
}
.tier-points-val {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}
.tier-points-rupee {
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  margin-top: 4px;
}
.tier-locked-msg {
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(251,113,18,0.15);
  border-radius: 8px;
  font-size: 13px;
  color: #fff;
  line-height: 1.5;
}
.tier-locked-msg strong { color: var(--orange); }

/* ── FAMILY BUBBLES ─────────────────────────────────────── */
.family-bubbles {
  display: flex;
  gap: 12px;
  padding: 4px 0 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.family-bubbles::-webkit-scrollbar { display:none; }
.family-bubble {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  flex-shrink: 0;
}
.bubble-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--warm);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  transition: border-color 0.2s;
}
.family-bubble.active .bubble-avatar {
  border-color: var(--orange);
  background: rgba(251,113,18,0.08);
  color: var(--orange);
}
.bubble-name {
  font-size: 11px;
  color: var(--muted);
  max-width: 56px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.family-bubble.active .bubble-name { color: var(--orange); font-weight: 600; }

/* ── PRESCRIPTION RECORD ────────────────────────────────── */
.rx-record {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
}
.rx-record-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--warm);
  border-bottom: 1px solid var(--border);
}
.rx-record-date {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}
.rx-record-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.5px;
}
.rx-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.rx-table th {
  background: var(--navy);
  color: #fff;
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
}
.rx-table th:not(:first-child) { text-align: center; }
.rx-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-family: monospace;
  font-size: 13px;
  text-align: center;
}
.rx-table td:first-child {
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--navy);
  text-align: left;
}
.rx-table tr:last-child td { border-bottom: none; }

/* ── POINTS TRANSACTION ROW ─────────────────────────────── */
.pts-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.pts-row:last-child { border-bottom: none; }
.pts-row-left {}
.pts-row-desc {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}
.pts-row-date { font-size: 12px; color: var(--muted); }
.pts-row-amount {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
}
.pts-row-amount.earn   { color: var(--success); }
.pts-row-amount.redeem { color: var(--danger); }
.pts-row-amount.pending { color: var(--muted); }
.pts-row-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  display: block;
  text-align: right;
  margin-top: 3px;
}
.pts-row-badge.pending { background: #fef3c7; color: #92400e; }
.pts-row-badge.credited { background: #dcfce7; color: #166534; }

/* ── LOCKED OVERLAY ─────────────────────────────────────── */
.locked-section {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
}
.locked-overlay {
  position: absolute;
  inset: 0;
  background: rgba(247,245,240,0.88);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: var(--radius);
  backdrop-filter: blur(2px);
  z-index: 2;
  text-align: center;
  padding: 24px;
}
.locked-icon { font-size: 32px; }
.locked-title {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
}
.locked-sub { font-size: 13px; color: var(--muted); line-height: 1.5; }

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: var(--font-sans);
  transition: opacity 0.15s;
  text-decoration: none;
}
.btn:active { opacity: 0.85; }
.btn-primary { background: var(--orange); color: #fff; width: 100%; }
.btn-navy    { background: var(--navy);   color: #fff; width: 100%; }
.btn-outline { background: transparent; color: var(--navy); border: 1.5px solid var(--navy); }

/* ── FORM ELEMENTS ───────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
}
.form-input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s;
}
.form-input:focus { border-color: var(--orange); }
.form-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
.form-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 6px;
  min-height: 16px;
}

/* ── OTP INPUT ───────────────────────────────────────────── */
.otp-input {
  font-size: 28px;
  letter-spacing: 8px;
  text-align: center;
  font-family: monospace;
  font-weight: 700;
}

/* ── STEP DOTS ───────────────────────────────────────────── */
.step-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
}
.step-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
}
.step-dot.active { background: var(--orange); }
.step-dot.done   { background: var(--navy); }

/* ── AD COMPONENTS ───────────────────────────────────────── */
.ad-marquee {
  background: var(--navy);
  color: rgba(255,255,255,0.85);
  font-size: 12px;
  padding: 8px 0;
  overflow: hidden;
  white-space: nowrap;
  margin-bottom: 16px;
  border-radius: 8px;
}
.ad-marquee-track {
  display: inline-block;
  animation: marquee 20s linear infinite;
}
@keyframes marquee {
  0%   { transform: translateX(100vw); }
  100% { transform: translateX(-100%); }
}
.ad-static {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}
.ad-static img { width: 100%; height: auto; }
.ad-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.ad-card-text { flex: 1; }
.ad-card-title { font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.ad-card-sub   { font-size: 13px; color: var(--muted); }
.ad-card-cta {
  background: var(--orange);
  color: #fff;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

/* ── POLICY CONTENT ──────────────────────────────────────── */
.policy-section { margin-bottom: 28px; }
.policy-section h2 {
  font-size: 16px;
  color: var(--navy);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.policy-section p, .policy-section li {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 6px;
}
.policy-section ul { padding-left: 18px; }
.policy-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 12px;
}
.policy-table th {
  background: var(--navy);
  color: #fff;
  padding: 8px 12px;
  text-align: left;
  font-size: 12px;
}
.policy-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.policy-table tr:nth-child(even) td { background: var(--warm); }

/* ── STAT STRIP ──────────────────────────────────────────── */
.stat-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.stat-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.stat-box-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.stat-box-val   { font-family: var(--font-serif); font-size: 22px; font-weight: 700; color: var(--navy); }
.stat-box-sub   { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* ── ALERTS ──────────────────────────────────────────────── */
.alert {
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 16px;
}
.alert-info    { background: #eff6ff; color: #1e40af; border:1px solid #bfdbfe; }
.alert-success { background: #f0fdf4; color: #166534; border:1px solid #bbf7d0; }
.alert-warning { background: #fffbeb; color: #92400e; border:1px solid #fde68a; }
.alert-error   { background: #fef2f2; color: #991b1b; border:1px solid #fecaca; }

/* ── LOGIN PAGE ──────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 20px;
  max-width: 400px;
  margin: 0 auto;
}
.login-logo {
  text-align: center;
  margin-bottom: 40px;
}
.login-logo img { height: 48px; margin: 0 auto 12px; }
.login-logo-text {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
}
.login-logo-sub {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 4px;
}
.login-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
}
.login-title {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--navy);
  margin-bottom: 6px;
}
.login-sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

/* ── EMPTY STATE ─────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}
.empty-icon { font-size: 40px; margin-bottom: 12px; }
.empty-title { font-size: 16px; font-weight: 600; color: var(--navy); margin-bottom: 8px; }
.empty-sub   { font-size: 13px; line-height: 1.6; }

/* ── SECTION TITLE ───────────────────────────────────────── */
.section-title {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--navy);
  margin-bottom: 4px;
}
.section-sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
  line-height: 1.5;
}

/* ── DIVIDER ─────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* ── TEXT UTILITIES ──────────────────────────────────────── */
.text-navy   { color: var(--navy); }
.text-orange { color: var(--orange); }
.text-muted  { color: var(--muted); }
.text-gold   { color: var(--gold); }
.text-sm     { font-size: 13px; }
.text-xs     { font-size: 11px; }
.font-serif  { font-family: var(--font-serif); }
.font-bold   { font-weight: 700; }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (min-width: 520px) {
  .portal-main { padding: 28px 20px 100px; }
  .tier-points-val { font-size: 42px; }
}
