/* Loyalty program — same design tokens as mostshar.click */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #1B4332; --primary-light: #2D6A4F; --primary-dark: #0B2920;
  --gold: #C9A84C; --gold-light: #D4B968;
  --bg: #F5F3EF; --card-bg: #FFFFFF; --text: #1a1a1a; --text-light: #6B7280; --border: #E5E1DB;
  --success: #16A34A; --error: #DC2626; --warn: #D97706; --info: #2563EB;
}
html { scroll-behavior: smooth; }
body { font-family: 'Tajawal', sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 15px; }

.navbar { background: var(--primary-dark); padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; position: sticky; top: 0; z-index: 20; }
.navbar-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 17px; }
.navbar-brand img { width: 40px; height: 40px; border-radius: 10px; background: #fff; padding: 3px; }
.navbar-brand small { display: block; font-size: 11px; font-weight: 500; color: var(--gold-light); }
.navbar-links { display: flex; gap: 8px; align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 12px; border: none; font-weight: 700; font-size: 15px; transition: all .18s; min-height: 44px; }
.btn-gold { background: linear-gradient(135deg, var(--gold), var(--gold-light)); color: var(--primary-dark); }
.btn-gold:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff; box-shadow: 0 6px 18px rgba(27,67,50,.25); }
.btn-outline { background: transparent; border: 1.5px solid rgba(255,255,255,.45); color: #fff; }
.btn-light { background: var(--bg); color: var(--primary); border: 1.5px solid var(--border); }
.btn-danger { background: #FEE2E2; color: var(--error); }
.btn-sm { padding: 7px 12px; font-size: 13px; min-height: 36px; border-radius: 9px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

/* Landing */
.hero { background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%); color: #fff; padding: 64px 24px 72px; text-align: center; }
.hero h1 { font-size: clamp(28px, 4.5vw, 44px); font-weight: 800; line-height: 1.3; margin-bottom: 14px; }
.hero h1 span { color: var(--gold-light); }
.hero p { font-size: clamp(15px, 2vw, 18px); color: rgba(255,255,255,.86); max-width: 700px; margin: 0 auto 28px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-badges { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }
.hero-badges div { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 14px; padding: 12px 18px; min-width: 140px; }
.hero-badges strong { display: block; font-size: 24px; color: var(--gold-light); }
.hero-badges span { font-size: 13px; color: rgba(255,255,255,.8); }

.section { max-width: 1100px; margin: 0 auto; padding: 56px 20px; }
.section h2 { text-align: center; font-size: 28px; color: var(--primary); margin-bottom: 8px; }
.section .lead { text-align: center; color: var(--text-light); margin-bottom: 32px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.step { background: var(--card-bg); border: 1px solid var(--border); border-radius: 18px; padding: 24px; position: relative; }
.step .n { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, var(--gold), var(--gold-light)); color: var(--primary-dark); font-weight: 800; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; font-size: 18px; }
.step h3 { color: var(--primary); margin-bottom: 6px; font-size: 17px; }
.step p { color: var(--text-light); font-size: 14px; }
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.tier { background: var(--card-bg); border: 1.5px solid var(--border); border-radius: 18px; padding: 26px 20px; text-align: center; }
.tier.featured { border-color: var(--gold); box-shadow: 0 10px 30px rgba(201,168,76,.18); }
.tier .name { font-weight: 800; color: var(--primary); font-size: 19px; }
.tier .rate { font-size: 40px; font-weight: 800; color: var(--primary-dark); line-height: 1.2; margin: 8px 0 4px; }
.tier .min { color: var(--text-light); font-size: 13px; }
.faq details { background: var(--card-bg); border: 1px solid var(--border); border-radius: 14px; padding: 14px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; color: var(--primary); }
.faq p { margin-top: 8px; color: var(--text-light); font-size: 14px; }

/* Auth card */
.auth-wrap { max-width: 520px; margin: -40px auto 56px; padding: 0 16px; position: relative; }
.card { background: var(--card-bg); border-radius: 22px; padding: 28px; box-shadow: 0 16px 40px rgba(0,0,0,.12); border: 1px solid var(--border); }
.seg { display: flex; background: var(--bg); border-radius: 12px; padding: 4px; margin-bottom: 20px; }
.seg button { flex: 1; border: none; background: transparent; padding: 10px; border-radius: 9px; font-weight: 700; color: var(--text-light); }
.seg button.active { background: #fff; color: var(--primary); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--text-light); margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--bg); outline: none; transition: border .15s; min-height: 48px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary-light); background: #fff; }
.field .hint { font-size: 12px; color: var(--text-light); margin-top: 4px; }
.ltr { direction: ltr; text-align: left; }
.alert { display: none; padding: 11px 14px; border-radius: 10px; font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.alert.error { background: #FEE2E2; color: var(--error); }
.alert.success { background: #DCFCE7; color: var(--success); }
.alert.show { display: block; }

/* Dashboard */
.dash { max-width: 1180px; margin: 0 auto; padding: 22px 16px 60px; }
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.dash-head h1 { font-size: 22px; color: var(--primary); }
.dash-head .sub { color: var(--text-light); font-size: 13px; }
.tier-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-weight: 800; font-size: 13px; background: linear-gradient(135deg, var(--gold), var(--gold-light)); color: var(--primary-dark); }
.tier-badge.silver { background: linear-gradient(135deg, #cfd4da, #eef0f2); color: #374151; }
.tier-badge.bronze { background: linear-gradient(135deg, #c98a4c, #e2b58a); color: #3b2a1a; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px; padding: 16px; }
.stat .v { font-size: 26px; font-weight: 800; color: var(--primary-dark); }
.stat .l { font-size: 12px; color: var(--text-light); font-weight: 600; }
.stat.gold .v { color: var(--gold); }
.stat.green .v { color: var(--success); }
.grid-2 { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; margin-bottom: 18px; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; } }
.panel { background: var(--card-bg); border: 1px solid var(--border); border-radius: 18px; padding: 20px; }
.panel h3 { color: var(--primary); font-size: 16px; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.link-box { display: flex; gap: 8px; align-items: center; }
.link-box input { flex: 1; padding: 12px; border: 1.5px dashed var(--gold); border-radius: 12px; background: #FFFBEB; direction: ltr; text-align: left; font-size: 14px; min-width: 0; }
.code-pill { display: inline-block; background: var(--primary-dark); color: var(--gold-light); font-weight: 800; letter-spacing: 2px; padding: 6px 14px; border-radius: 10px; direction: ltr; }
.share { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.share a { padding: 8px 14px; border-radius: 10px; background: var(--bg); border: 1px solid var(--border); font-size: 13px; font-weight: 700; color: var(--primary); }
.progress { height: 10px; background: var(--bg); border-radius: 999px; overflow: hidden; border: 1px solid var(--border); margin: 10px 0 6px; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-light)); border-radius: 999px; transition: width .4s; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 14px; }
.tabs button { padding: 9px 16px; border-radius: 10px; border: 1px solid var(--border); background: var(--card-bg); font-weight: 700; color: var(--text-light); }
.tabs button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 10px; text-align: right; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--text-light); font-size: 12px; font-weight: 700; background: var(--bg); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge.pending { background: #FEF3C7; color: #92400E; }
.badge.approved { background: #DBEAFE; color: #1E40AF; }
.badge.paid { background: #DCFCE7; color: #166534; }
.badge.reversed, .badge.rejected { background: #FEE2E2; color: #991B1B; }
.badge.requested { background: #FEF3C7; color: #92400E; }
.badge.gray { background: var(--bg); color: var(--text-light); }
.empty { text-align: center; color: var(--text-light); padding: 26px 10px; font-size: 14px; }
.chart { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding-top: 10px; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.chart .bars { display: flex; gap: 3px; align-items: flex-end; height: 110px; width: 100%; justify-content: center; }
.chart .bar { width: 22%; max-width: 16px; border-radius: 4px 4px 0 0; min-height: 2px; }
.chart .bar.c { background: var(--primary-light); } .chart .bar.s { background: var(--gold); } .chart .bar.p { background: var(--success); }
.chart .m { font-size: 11px; color: var(--text-light); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--text-light); margin-top: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-left: 4px; vertical-align: middle; }
.material { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-bottom: 10px; }
.material p { font-size: 14px; white-space: pre-wrap; margin-bottom: 8px; }
.muted { color: var(--text-light); font-size: 13px; }
.footer { text-align: center; color: var(--text-light); font-size: 13px; padding: 24px; }
@media (max-width: 600px) { .navbar { padding: 10px 14px; } .card { padding: 20px; } .hero { padding: 44px 16px 60px; } }
