/* ============================================
   CLIENT PAGES — Mobile First Premium UI
   ============================================ */

/* ---- APP SHELL ---- */
.app {
    max-width: 430px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--cream);
    position: relative;
}

/* ---- TOP BAR ---- */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--white);
    border-bottom: 1px solid var(--gray-muted);
    position: sticky;
    top: 0;
    z-index: 100;
}
.topbar__logo {
    font-family: var(--font-title);
    font-style: italic;
    font-size: 18px;
    color: var(--dark);
}
.topbar__action {
    font-size: 13px;
    color: var(--gold);
    font-weight: 500;
}

/* ---- HERO CARD (Dashboard) ---- */
.hero-card {
    margin: 20px;
    padding: 28px 24px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
    animation: scaleIn 0.5s ease;
}
.hero-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(200,169,110,0.15) 0%, transparent 70%);
}
.hero-card::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -20%;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(242,196,206,0.1) 0%, transparent 70%);
}
.hero-card__tier {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}
.hero-card__tier svg {
    width: 12px;
    height: 12px;
}
.hero-card__name {
    font-family: var(--font-title);
    font-size: 22px;
    font-weight: 400;
    font-style: italic;
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
}
.hero-card__greeting {
    font-size: 11px;
    font-weight: 300;
    color: rgba(255,255,255,0.7);
    letter-spacing: 0.5px;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

/* ---- POINTS DISPLAY ---- */
.points-display {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}
.points-display__value {
    font-family: var(--font-title);
    font-size: 42px;
    font-weight: 600;
    line-height: 1;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 3s linear infinite;
}
.points-display__label {
    font-size: 12px;
    font-weight: 400;
    color: rgba(255,255,255,0.6);
    margin-bottom: 6px;
}

/* ---- PROGRESS BAR ---- */
.progress-section {
    position: relative;
    z-index: 1;
}
.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}
.progress-bar__fill {
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    transition: width 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: rgba(255,255,255,0.5);
    letter-spacing: 0.3px;
}

/* ---- QUICK ACTIONS ---- */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 0 20px;
    margin-bottom: 24px;
}
.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    animation: fadeUp 0.5s ease forwards;
    opacity: 0;
}
.quick-action:active {
    transform: scale(0.95);
}
.quick-action__icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
}
.quick-action__icon svg {
    width: 18px;
    height: 18px;
    stroke: var(--dark);
    fill: none;
    stroke-width: 1.5;
}
.quick-action__label {
    font-size: 10px;
    font-weight: 500;
    color: var(--dark);
    text-align: center;
    letter-spacing: 0.3px;
}

/* ---- SECTION HEADER ---- */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    margin-bottom: 16px;
}
.section-header__title {
    font-family: var(--font-title);
    font-size: 18px;
    font-weight: 500;
    font-style: italic;
    color: var(--dark);
}
.section-header__link {
    font-size: 12px;
    color: var(--gold);
    font-weight: 500;
}

/* ---- REWARD CARDS ---- */
.reward-list {
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}
.reward-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-left: 3px solid var(--gold);
}
.reward-card:active {
    transform: scale(0.98);
}
.reward-card__icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary-light), var(--cream));
    display: flex;
    align-items: center;
    justify-content: center;
}
.reward-card__icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--gold);
    fill: none;
    stroke-width: 1.5;
}
.reward-card__info {
    flex: 1;
    min-width: 0;
}
.reward-card__name {
    font-size: 14px;
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 2px;
}
.reward-card__desc {
    font-size: 11px;
    color: var(--gray);
    font-weight: 300;
}
.reward-card__points {
    text-align: right;
    min-width: 60px;
}
.reward-card__points-value {
    font-family: var(--font-title);
    font-size: 18px;
    font-weight: 600;
    color: var(--gold);
}
.reward-card__points-label {
    font-size: 9px;
    color: var(--gray-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ---- TRANSACTION LIST ---- */
.transaction-list {
    padding: 0 20px;
    margin-bottom: 24px;
}
.transaction-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--gray-muted);
}
.transaction-item:last-child { border-bottom: none; }
.transaction-item__left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.transaction-item__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
}
.transaction-item__dot--redeem { background: var(--primary); }
.transaction-item__dot--bonus { background: var(--success); }
.transaction-item__desc {
    font-size: 13px;
    color: var(--dark);
}
.transaction-item__date {
    font-size: 10px;
    color: var(--gray-light);
    margin-top: 2px;
}
.transaction-item__points {
    font-family: var(--font-title);
    font-size: 16px;
    font-weight: 600;
}
.transaction-item__points--plus { color: var(--gold); }
.transaction-item__points--minus { color: var(--primary-dark); }

/* ---- QR CODE CARD ---- */
.qr-card {
    margin: 0 20px 24px;
    padding: 24px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    text-align: center;
}
.qr-card__image {
    width: 180px;
    height: 180px;
    margin: 0 auto 16px;
    border-radius: var(--radius-md);
    border: 2px solid var(--gray-muted);
    padding: 8px;
}
.qr-card__text {
    font-size: 12px;
    color: var(--gray);
    font-weight: 300;
}

/* ---- REFERRAL SECTION ---- */
.referral-card {
    margin: 0 20px 24px;
    padding: 24px;
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
    border-radius: var(--radius-lg);
    color: var(--white);
    text-align: center;
}
.referral-card__code {
    display: inline-block;
    padding: 10px 24px;
    background: rgba(255,255,255,0.12);
    border: 1px dashed rgba(200,169,110,0.5);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 4px;
    color: var(--gold);
    margin: 12px 0;
}
.referral-card__bonus {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
}

/* ---- FORM ---- */
.form-group {
    margin-bottom: 20px;
    padding: 0 20px;
}
.form-group label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray);
    margin-bottom: 8px;
}
.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--gray-muted);
    border-radius: var(--radius-sm);
    font-size: 15px;
    color: var(--dark);
    background: var(--white);
    transition: var(--transition);
}
.form-group input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(200,169,110,0.15);
}
.form-group input::placeholder {
    color: var(--gray-light);
    font-weight: 300;
}

/* ---- BUTTONS ---- */
.btn {
    display: block;
    width: calc(100% - 40px);
    margin: 0 auto;
    padding: 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-align: center;
    transition: var(--transition);
}
.btn--primary {
    background: var(--dark);
    color: var(--white);
}
.btn--primary:active { background: var(--dark-light); transform: scale(0.98); }
.btn--gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--white);
    box-shadow: var(--shadow-gold);
}
.btn--gold:active { transform: scale(0.98); }
.btn--outline {
    background: transparent;
    color: var(--dark);
    border: 1px solid var(--gray-muted);
}
.btn--whatsapp {
    background: #25D366;
    color: var(--white);
}

/* ---- BOTTOM NAV ---- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    background: var(--white);
    border-top: 1px solid var(--gray-muted);
    display: flex;
    padding: 8px 0 env(safe-area-inset-bottom, 8px);
    z-index: 100;
}
.bottom-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 0;
    transition: var(--transition);
}
.bottom-nav__item svg {
    width: 20px;
    height: 20px;
    stroke: var(--gray-light);
    fill: none;
    stroke-width: 1.5;
    transition: var(--transition);
}
.bottom-nav__item span {
    font-size: 9px;
    font-weight: 500;
    color: var(--gray-light);
    letter-spacing: 0.3px;
    transition: var(--transition);
}
.bottom-nav__item--active svg { stroke: var(--gold); }
.bottom-nav__item--active span { color: var(--gold); }

/* ---- SPACER ---- */
.bottom-spacer { height: 80px; }

/* ---- PAGE TITLE ---- */
.page-title {
    padding: 24px 20px 20px;
}
.page-title h1 {
    font-family: var(--font-title);
    font-size: 24px;
    font-weight: 400;
    font-style: italic;
    color: var(--dark);
}
.page-title p {
    font-size: 12px;
    color: var(--gray);
    margin-top: 4px;
    font-weight: 300;
}

/* ---- EMPTY STATE ---- */
.empty-state {
    text-align: center;
    padding: 40px 20px;
}
.empty-state svg {
    width: 48px;
    height: 48px;
    stroke: var(--gray-muted);
    fill: none;
    stroke-width: 1;
    margin-bottom: 16px;
}
.empty-state p {
    font-size: 13px;
    color: var(--gray);
}

/* ---- TOAST ---- */
.toast {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 380px;
    width: calc(100% - 40px);
    padding: 14px 20px;
    background: var(--dark);
    color: var(--white);
    border-radius: var(--radius-sm);
    font-size: 13px;
    text-align: center;
    z-index: 200;
    animation: slideUp 0.3s ease, fadeIn 0.3s ease;
    box-shadow: var(--shadow-lg);
}
.toast--success { background: var(--success); }
.toast--error { background: var(--error); }

/* ---- REGISTER PAGE ---- */
.register-hero {
    padding: 40px 20px;
    text-align: center;
    background: linear-gradient(180deg, var(--primary-light) 0%, var(--cream) 100%);
}
.register-hero__title {
    font-family: var(--font-title);
    font-size: 28px;
    font-weight: 400;
    font-style: italic;
    color: var(--dark);
    margin-bottom: 8px;
}
.register-hero__subtitle {
    font-size: 13px;
    color: var(--gray);
    font-weight: 300;
    line-height: 1.6;
}
.register-perks {
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 8px;
}
.register-perk {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--white);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}
.register-perk__icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: var(--radius-full);
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
}
.register-perk__icon svg {
    width: 16px;
    height: 16px;
    stroke: var(--gold);
    fill: none;
    stroke-width: 1.5;
}
.register-perk__text {
    font-size: 13px;
    color: var(--dark);
    font-weight: 400;
}
