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

:root {
    --primary: #6366f1;
    --primary-dark: #4f52d9;
    --success: #22c55e;
    --danger: #ef4444;
    --bg: #f8fafc;
    --card: #ffffff;
    --border: #e2e8f0;
    --text: #1e293b;
    --muted: #64748b;
    --radius: 16px;
    --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
}

body { font-family: 'Inter', sans-serif; color: var(--text); background: var(--bg); }
.hidden { display: none !important; }

/* AUTH */
.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eef2ff 0%, #f0fdf4 100%);
    padding: 1rem;
}
.auth-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 380px;
    text-align: center;
}
.auth-logo { margin-bottom: 1rem; }
.auth-title { font-size: 1.5rem; font-weight: 700; margin-bottom: .25rem; }
.auth-subtitle { color: var(--muted); margin-bottom: 2rem; font-size: .9rem; }

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    width: 100%;
    padding: .85rem 1.5rem;
    background: var(--card);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    color: var(--text);
}
.btn-google:hover { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,.1); }

.ref-input-divider {
    text-align: center; color: var(--muted); font-size: .82rem;
    margin: 1.25rem 0; position: relative;
}
.ref-input-divider::before, .ref-input-divider::after {
    content: ''; position: absolute; top: 50%;
    width: calc(50% - 1.5rem); height: 1px; background: var(--border);
}
.ref-input-divider::before { left: 0; }
.ref-input-divider::after  { right: 0; }
.ref-input {
    width: 100%; padding: .75rem 1rem; border: 1.5px solid var(--border);
    border-radius: 10px; font-size: .95rem; font-family: inherit;
    color: var(--text); transition: border-color .15s; text-align: center;
    letter-spacing: .05em;
}
.ref-input:focus { outline: none; border-color: var(--primary); }

.alert { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: .85rem; }
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

/* APP */
.app-body { min-height: 100vh; background: var(--bg); }

.app-header {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: .875rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 10;
}
.header-left { display: flex; align-items: center; gap: .6rem; }
.app-name { font-weight: 700; font-size: 1rem; }
.header-right { display: flex; align-items: center; gap: .75rem; }
.points-badge {
    display: flex; align-items: center; gap: .3rem;
    background: #eef2ff; color: var(--primary);
    padding: .3rem .7rem; border-radius: 20px;
    font-size: .85rem; font-weight: 600;
}
.btn-link {
    font-size: .85rem; color: var(--muted); text-decoration: none; font-weight: 500;
}
.btn-link:hover { color: var(--text); }

.app-main {
    max-width: 480px;
    margin: 0 auto;
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* TASK CARD */
.task-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
}
.task-badge {
    display: inline-block;
    background: #eef2ff; color: var(--primary);
    font-size: .75rem; font-weight: 600;
    padding: .2rem .65rem; border-radius: 20px;
    margin-bottom: .75rem;
    text-transform: uppercase; letter-spacing: .04em;
}
.task-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 1.25rem; }

.task-label { font-size: .75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .4rem; }
.domain-copy-row {
    display: flex; align-items: center; gap: .5rem;
    background: #f8fafc; border: 1px solid var(--border);
    border-radius: 10px; padding: .6rem .8rem;
    margin-bottom: 1rem;
}
.domain-text { font-size: .95rem; font-weight: 600; flex: 1; word-break: break-all; }

.btn-copy {
    display: flex; align-items: center; gap: .3rem;
    padding: .35rem .7rem; border-radius: 7px;
    background: var(--primary); color: white;
    border: none; cursor: pointer; font-size: .8rem; font-weight: 600;
    white-space: nowrap; transition: background .15s;
}
.btn-copy:hover { background: var(--primary-dark); }

.btn-primary {
    display: flex; align-items: center; justify-content: center; gap: .6rem;
    width: 100%; padding: .9rem;
    background: var(--text); color: white;
    border: none; border-radius: 12px;
    font-size: .95rem; font-weight: 600; cursor: pointer;
    text-decoration: none; transition: opacity .15s;
}
.btn-primary:hover { opacity: .85; }

.confirm-section {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}
.confirm-text { font-size: .95rem; font-weight: 600; margin-bottom: .75rem; text-align: center; }
.confirm-btns { display: flex; gap: .75rem; flex-direction: column; }

.btn-success {
    width: 100%; padding: .85rem;
    background: var(--success); color: white;
    border: none; border-radius: 12px;
    font-size: .95rem; font-weight: 600; cursor: pointer;
    transition: opacity .15s;
}
.btn-success:hover { opacity: .85; }
.btn-skip {
    width: 100%; padding: .75rem;
    background: transparent; color: var(--muted);
    border: 1.5px solid var(--border); border-radius: 12px;
    font-size: .9rem; font-weight: 500; cursor: pointer;
    transition: all .15s;
}
.btn-skip:hover { border-color: var(--text); color: var(--text); }

/* NO TASK */
.no-task { text-align: center; padding: 2.5rem 1.5rem; }
.no-task-icon { font-size: 2.5rem; margin-bottom: .75rem; }
.no-task h2 { font-size: 1.15rem; font-weight: 700; margin-bottom: .5rem; }
.muted { color: var(--muted); font-size: .9rem; }

/* STATS */
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.stat-card {
    background: var(--card);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 1rem;
    text-align: center;
}
.stat-num { font-size: 1.4rem; font-weight: 700; color: var(--primary); }
.stat-label { font-size: .75rem; color: var(--muted); margin-top: .2rem; }

/* REFERRAL */
.referral-card {
    background: linear-gradient(135deg, #eef2ff, #f0fdf4);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--border);
}
.ref-title { font-size: 1rem; font-weight: 700; margin-bottom: .4rem; }
.ref-desc { font-size: .85rem; color: var(--muted); margin-bottom: 1rem; }
.ref-link-row {
    display: flex; align-items: center; gap: .5rem;
    background: white; border: 1px solid var(--border);
    border-radius: 10px; padding: .6rem .8rem;
    margin-bottom: .75rem;
}
.ref-link-text { font-size: .8rem; color: var(--muted); flex: 1; word-break: break-all; }
.btn-share {
    display: block; text-align: center;
    padding: .7rem; background: #25d366; color: white;
    border-radius: 10px; text-decoration: none;
    font-size: .9rem; font-weight: 600;
    transition: opacity .15s;
}
.btn-share:hover { opacity: .85; }

/* STEPS BAR */
.steps-bar {
    display: flex; align-items: center; justify-content: center;
    gap: 0; margin-bottom: 1.25rem;
}
.step { display: flex; flex-direction: column; align-items: center; gap: .3rem; }
.step-circle {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--border); color: var(--muted);
    display: flex; align-items: center; justify-content: center;
    font-size: .8rem; font-weight: 700; transition: all .3s;
}
.step.active .step-circle { background: var(--primary); color: white; }
.step-label { font-size: .72rem; color: var(--muted); font-weight: 500; white-space: nowrap; }
.step.active .step-label { color: var(--primary); }
.step-line { flex: 1; height: 2px; background: var(--border); min-width: 48px; margin: 0 .5rem; margin-bottom: 1.1rem; }

/* HOW-TO STEPS */
.how-steps {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem;
}
.how-steps li {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .55rem 0;
    border-bottom: 1px solid var(--border);
    font-size: .9rem;
    color: var(--text);
    line-height: 1.5;
}
.how-steps li:last-child { border-bottom: none; }
.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: .72rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: .15rem;
}

/* INTRO */
.intro-card {
    background: var(--card); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 1.75rem 1.5rem;
}
.intro-title { font-size: 1.3rem; font-weight: 700; margin-bottom: .25rem; }
.intro-subtitle { color: var(--muted); font-size: .95rem; margin-bottom: 1.5rem; }

.accordion { border: 1.5px solid var(--border); border-radius: 12px; margin-bottom: .75rem; overflow: hidden; }
.accordion-btn {
    width: 100%; display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 1.1rem; background: none; border: none; cursor: pointer;
    font-size: .95rem; font-weight: 600; font-family: inherit; color: var(--text);
    transition: background .15s;
}
.accordion-btn:hover { background: #f8fafc; }
.acc-icon { display: flex; align-items: center; gap: .6rem; }
.acc-arrow { transition: transform .25s; }
.accordion-body { padding: .25rem 1.1rem 1.1rem; display: flex; flex-direction: column; gap: .75rem; }

.img-placeholder {
    background: #f8fafc; border: 1.5px dashed var(--border);
    border-radius: 10px; padding: 2rem 1rem;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: .5rem; color: var(--muted); font-size: .82rem;
    min-height: 140px;
}

.btn-start {
    display: flex; align-items: center; justify-content: center; gap: .6rem;
    width: 100%; padding: .95rem;
    background: var(--primary); color: white;
    border: none; border-radius: 12px;
    font-size: 1rem; font-weight: 700; cursor: pointer;
    margin-top: 1.5rem; transition: opacity .15s;
    font-family: inherit;
}
.btn-start:hover { opacity: .88; }

/* SLIDER */
.slider-wrap {
    position: relative; overflow: hidden; border-radius: 12px;
    margin-bottom: 1.25rem; background: #f1f5f9;
}
.slider-track {
    display: flex; transition: transform .35s ease;
}
.slide { min-width: 100%; }
.slide img { width: 100%; height: 400px; object-fit: contain; display: block; }
.slider-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,.85); border: none; border-radius: 50%;
    width: 32px; height: 32px; font-size: 1.2rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.12); z-index: 2;
}
.slider-prev { left: 8px; }
.slider-next { right: 8px; }
.slider-dots { display: flex; justify-content: center; gap: .4rem; padding: .6rem 0 .25rem; }
.dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--border); cursor: pointer; transition: background .2s;
}
.dot.active { background: var(--primary); }

/* CONFIRM */
.confirm-img-wrap { margin-bottom: 1.25rem; border-radius: 12px; overflow: hidden; background: #f1f5f9; }
.confirm-img { width: 100%; max-height: 240px; object-fit: contain; display: block; }
.confirm-btns-big { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.btn-yes {
    width: 100%; padding: 1.1rem;
    background: #22c55e; color: white;
    border: none; border-radius: 14px;
    font-size: 1.15rem; font-weight: 700; cursor: pointer;
    font-family: inherit; transition: opacity .15s;
}
.btn-yes:hover { opacity: .85; }
.btn-no {
    width: 100%; padding: 1.1rem;
    background: #ef4444; color: white;
    border: none; border-radius: 14px;
    font-size: 1.15rem; font-weight: 700; cursor: pointer;
    font-family: inherit; transition: opacity .15s;
}
.btn-no:hover { opacity: .85; }

/* USER MENU */
.user-menu { position: relative; }
.user-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    cursor: pointer; display: block;
    border: 2px solid var(--border);
    transition: border-color .15s;
}
.user-avatar:hover { border-color: var(--primary); }
.user-avatar-placeholder {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--primary); color: white;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .9rem; cursor: pointer;
}
.user-dropdown {
    position: absolute; right: 0; top: calc(100% + 8px);
    background: var(--card); border: 1px solid var(--border);
    border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.12);
    min-width: 200px; z-index: 100; overflow: hidden;
}
.user-dropdown-name { padding: .75rem 1rem .1rem; font-weight: 600; font-size: .9rem; }
.user-dropdown-email { padding: .1rem 1rem .75rem; font-size: .78rem; color: var(--muted); }
.dropdown-divider { border: none; border-top: 1px solid var(--border); margin: 0; }
.dropdown-logout {
    display: block; padding: .75rem 1rem;
    color: var(--danger); font-size: .875rem; font-weight: 500;
    text-decoration: none; transition: background .15s;
}
.dropdown-logout:hover { background: #fef2f2; }

/* HEADER WHATSAPP SHARE */
.btn-wa-header {
    display: flex; align-items: center; gap: .3rem;
    background: #25d366; color: white;
    padding: .28rem .6rem; border-radius: 20px;
    font-size: .78rem; font-weight: 600;
    text-decoration: none; white-space: nowrap;
    flex-shrink: 0;
}
.btn-wa-header:hover { opacity: .88; }
@media (max-width: 400px) { .wa-label { display: none; } }

/* PROFILE LINK BAR */
.profile-link-bar {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--card); border-radius: 12px;
    box-shadow: var(--shadow); padding: .75rem 1rem;
    text-decoration: none; color: var(--muted); font-size: .82rem;
    transition: box-shadow .15s;
}
.profile-link-bar:hover { box-shadow: 0 2px 8px rgba(99,102,241,.15); }
.profile-link-arrow { color: var(--primary); font-weight: 600; font-size: .85rem; }

/* REQUEST MORE TASKS */
.btn-request-more {
    width: 100%; padding: .85rem;
    background: var(--primary); color: white;
    border: none; border-radius: 12px;
    font-size: .95rem; font-weight: 600; cursor: pointer;
    font-family: inherit; transition: opacity .15s;
    margin-top: .25rem;
}
.btn-request-more:hover { opacity: .85; }
.request-pending-msg {
    background: #fef9c3; color: #854d0e;
    border: 1px solid #fde68a;
    border-radius: 10px; padding: .75rem 1rem;
    font-size: .85rem; font-weight: 500; text-align: center;
}

@media (max-width: 360px) {
    .stats-row { grid-template-columns: 1fr 1fr; }
}
