/* ==========================================================================
   AMUORA — UI مشترک بخش‌های تازه
   (نشان استریک، Toast، جشن، دکمه‌ها، کارت‌ها، قالب صفحه‌های تازه)
   رنگ‌ها از هویت بصری AMUORA: سرمه‌ای، آبی، فیروزه‌ای، زرد، نارنجی.
   ========================================================================== */
:root {
    --amu-navy: #173b79;
    --amu-navy-2: #0b2d63;
    --amu-blue: #0471d6;
    --amu-teal: #00c1bc;
    --amu-yellow: #fcc63b;
    --amu-orange: #e8603c;
    --amu-purple: #7c3aed;
    --amu-green: #16a34a;
    --amu-red: #dc2626;
    --amu-ink: #142a4f;
    --amu-muted: #5b6b86;
    --amu-line: rgba(23, 59, 121, 0.12);
    --amu-bg: #f3f7fd;
    --amu-card: #ffffff;
    --amu-radius: 22px;
    --amu-shadow: 0 14px 40px rgba(15, 42, 90, 0.10);
    --amu-shadow-lg: 0 30px 80px rgba(15, 42, 90, 0.22);
}

/* ---------------- Streak / goal pill (header) ---------------- */
.amu-rp { position: relative; flex: 0 0 auto; margin-inline-start: 10px; font-family: 'Poppins', sans-serif; }
.amu-rp-btn {
    position: relative; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 6px 0 11px;
    border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 999px; cursor: pointer;
    background: rgba(255, 255, 255, 0.9); color: var(--amu-navy); font-weight: 800; font-size: 14px;
    box-shadow: 0 6px 18px rgba(15, 42, 90, 0.12); transition: transform .2s ease;
}
.amu-rp-btn:hover { transform: translateY(-1px); }
.amu-rp-btn.bump { animation: amuBump .5s ease; }
@keyframes amuBump { 40% { transform: scale(1.12); } }
.amu-rp-btn.has-bonus::after {
    content: ''; position: absolute; top: 2px; right: 2px; width: 9px; height: 9px; border-radius: 50%;
    background: var(--amu-orange); box-shadow: 0 0 0 2px #fff; animation: amuPulse 1.6s infinite;
}
@keyframes amuPulse { 50% { transform: scale(1.35); opacity: .7; } }
.amu-rp-flame { filter: grayscale(1); opacity: .55; font-size: 16px; }
.amu-rp-flame.is-on { filter: none; opacity: 1; animation: amuFlame 2.4s ease-in-out infinite; }
@keyframes amuFlame { 50% { transform: translateY(-1px) scale(1.08) rotate(-4deg); } }
.amu-rp-ring { width: 28px; height: 28px; transform: rotate(-90deg); }
.amu-rp-ring circle { fill: none; stroke-width: 4.5; }
.amu-rp-ring .bg { stroke: rgba(23, 59, 121, 0.12); }
.amu-rp-ring .fg { stroke: var(--amu-teal); stroke-linecap: round; transition: stroke-dashoffset .8s ease; }
.amu-rp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.amu-rp-panel {
    position: absolute; top: calc(100% + 10px); inset-inline-start: 0; z-index: 4000;
    width: min(340px, calc(100vw - 24px)); padding: 16px; border-radius: 20px;
    background: #fff; color: var(--amu-ink); box-shadow: var(--amu-shadow-lg);
    opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.98); transform-origin: top left;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.amu-rp.is-open .amu-rp-panel { opacity: 1; visibility: visible; transform: none; }
.amu-rp-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.amu-rp-big { font-size: 18px; font-weight: 800; color: var(--amu-navy); }
.amu-rp-head small { color: var(--amu-muted); font-size: 12px; }
.amu-rp-level {
    display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; color: #fff;
    background: linear-gradient(135deg, var(--amu-blue), var(--amu-teal));
}
.amu-rp-level small { font-size: 8px; letter-spacing: .1em; opacity: .9; margin-bottom: -6px; }
.amu-rp-level b { font-size: 20px; }
.amu-rp-goal { margin-top: 14px; }
.amu-rp-goal-top { display: flex; justify-content: space-between; font-size: 13px; color: var(--amu-muted); }
.amu-rp-goal-top b { color: var(--amu-navy); }
.amu-rp-bar { height: 10px; margin-top: 6px; border-radius: 999px; background: rgba(23, 59, 121, .08); overflow: hidden; }
.amu-rp-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--amu-yellow), var(--amu-orange)); transition: width .8s ease; }
.amu-rp-hint { margin: 6px 0 0; font-size: 12px; color: var(--amu-muted); }
.amu-rp-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 14px 0; text-align: center; }
.amu-rp-week i {
    display: grid; place-items: center; width: 30px; height: 30px; margin: 0 auto 3px; border-radius: 50%;
    background: rgba(23, 59, 121, .07); color: #fff; font-style: normal; font-weight: 800; font-size: 13px;
}
.amu-rp-week .done i { background: linear-gradient(135deg, var(--amu-orange), var(--amu-yellow)); }
.amu-rp-week .today i { box-shadow: inset 0 0 0 2px var(--amu-blue); }
.amu-rp-week span { font-size: 10px; color: var(--amu-muted); font-weight: 600; }
.amu-rp-bonus {
    width: 100%; padding: 11px; border: 0; border-radius: 14px; cursor: pointer; font-weight: 800; font-size: 13px;
    color: #fff; background: linear-gradient(135deg, var(--amu-purple), #ec4899);
}
.amu-rp-bonus:disabled { cursor: default; color: var(--amu-muted); background: rgba(23, 59, 121, .06); }
.amu-rp-goals { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; font-size: 12px; color: var(--amu-muted); }
.amu-rp-goals > span { width: 100%; }
.amu-rp-goals button {
    flex: 1 1 60px; padding: 6px 4px; border: 1px solid var(--amu-line); border-radius: 12px; cursor: pointer;
    background: #fff; color: var(--amu-navy); font-weight: 700; font-size: 12px; line-height: 1.2;
}
.amu-rp-goals button small { display: block; font-size: 10px; color: var(--amu-muted); font-weight: 500; }
.amu-rp-goals button.is-active { border-color: var(--amu-blue); background: rgba(4, 113, 214, .08); }
.amu-rp-links { display: flex; gap: 6px; margin-top: 12px; }
.amu-rp-links a {
    flex: 1; padding: 8px 4px; border-radius: 12px; text-align: center; text-decoration: none;
    background: var(--amu-bg); color: var(--amu-navy); font-size: 12px; font-weight: 700;
}
@media (max-width: 520px) {
    .amu-rp-btn { height: 34px; font-size: 13px; padding-inline-start: 9px; }
    .amu-rp-ring { width: 24px; height: 24px; }
    .amu-rp-panel { position: fixed; top: 70px; left: 12px; right: 12px; width: auto; }
}

/* ---------------- Toasts ---------------- */
.amu-toasts {
    position: fixed; z-index: 9000; left: 50%; bottom: 24px; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
}
.amu-toast {
    padding: 10px 18px; border-radius: 999px; font: 800 15px/1.2 'Poppins', sans-serif; color: #fff;
    background: linear-gradient(135deg, var(--amu-blue), var(--amu-teal)); box-shadow: 0 12px 30px rgba(4, 113, 214, .35);
    opacity: 0; transform: translateY(16px) scale(.9); transition: opacity .3s ease, transform .35s cubic-bezier(.22, 1.4, .36, 1);
}
.amu-toast.bonus { background: linear-gradient(135deg, var(--amu-purple), #ec4899); }
.amu-toast.info { background: var(--amu-navy); }
.amu-toast.bad { background: var(--amu-red); }
.amu-toast.in { opacity: 1; transform: none; }
.amu-toast.out { opacity: 0; transform: translateY(-20px); }

/* ---------------- Celebration ---------------- */
.amu-cel {
    position: fixed; inset: 0; z-index: 8500; display: grid; place-items: center; padding: 18px;
    background: rgba(11, 30, 64, .45); backdrop-filter: blur(4px); opacity: 0; transition: opacity .25s ease;
}
.amu-cel.in { opacity: 1; }
.amu-cel-box {
    width: min(400px, 100%); padding: 28px 22px 22px; border-radius: 28px; text-align: center; background: #fff;
    box-shadow: var(--amu-shadow-lg); transform: scale(.85); transition: transform .35s cubic-bezier(.22, 1.4, .36, 1);
    font-family: 'Poppins', sans-serif;
}
.amu-cel.in .amu-cel-box { transform: none; }
.amu-cel-icon { font-size: 58px; line-height: 1; animation: amuFlame 1.8s ease-in-out infinite; }
.amu-cel h3 { margin: 10px 0 6px; color: var(--amu-navy); font-size: 22px; }
.amu-cel p { margin: 0 0 18px; color: var(--amu-muted); line-height: 1.7; }
.amu-cel-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.amu-confetti { position: fixed; inset: 0; z-index: 8600; pointer-events: none; }

/* ---------------- Buttons ---------------- */
.amu-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px;
    border: 0; border-radius: 14px; cursor: pointer; text-decoration: none; font: 700 14px/1.2 'Poppins', sans-serif;
    color: #fff; background: linear-gradient(135deg, var(--amu-blue), var(--amu-teal));
    box-shadow: 0 10px 24px rgba(4, 113, 214, .25); transition: transform .15s ease, box-shadow .15s ease;
}
.amu-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(4, 113, 214, .3); }
.amu-btn:active { transform: translateY(1px) scale(.98); }
.amu-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.amu-btn-ghost { color: var(--amu-navy); background: #fff; box-shadow: inset 0 0 0 1.5px var(--amu-line); }
.amu-btn-yellow { color: var(--amu-navy); background: linear-gradient(135deg, var(--amu-yellow), #ffb020); box-shadow: 0 10px 24px rgba(252, 198, 59, .35); }
.amu-btn-dark { background: var(--amu-navy); box-shadow: 0 10px 24px rgba(23, 59, 121, .3); }
.amu-btn-sm { min-height: 34px; padding: 6px 12px; font-size: 12.5px; border-radius: 11px; }
.amu-btn-danger { background: linear-gradient(135deg, #ef4444, #f97316); }

/* ---------------- Page shell for new pages ---------------- */
.amu-page {
    width: min(1180px, calc(100% - 32px)); margin: 18px auto 60px; font-family: 'Poppins', sans-serif; color: var(--amu-ink);
}
.amu-hero {
    position: relative; overflow: hidden; padding: 28px clamp(18px, 4vw, 36px); border-radius: 28px; color: #fff;
    background: radial-gradient(circle at 85% 20%, rgba(0, 193, 188, .55), transparent 45%),
                linear-gradient(135deg, var(--amu-navy), var(--amu-blue));
    box-shadow: var(--amu-shadow);
}
.amu-hero h1 { margin: 0 0 6px; font-size: clamp(24px, 4vw, 36px); line-height: 1.2; }
.amu-hero p { margin: 0; max-width: 640px; opacity: .92; line-height: 1.7; }
.amu-hero .amu-hero-art { position: absolute; inset-inline-end: 22px; bottom: -10px; font-size: clamp(60px, 10vw, 120px); opacity: .9; pointer-events: none; }
.amu-section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 28px 0 12px; }
.amu-section-title h2 { margin: 0; font-size: 20px; color: var(--amu-navy); }
.amu-section-title p { margin: 2px 0 0; color: var(--amu-muted); font-size: 13px; }
.amu-card { background: var(--amu-card); border-radius: var(--amu-radius); box-shadow: var(--amu-shadow); padding: 18px; }
.amu-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
.amu-chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
    background: rgba(4, 113, 214, .08); color: var(--amu-blue); border: 0; cursor: pointer; font-family: inherit; text-decoration: none;
}
.amu-chip.is-active { background: var(--amu-blue); color: #fff; }
.amu-muted { color: var(--amu-muted); }
.amu-alert { padding: 12px 16px; border-radius: 14px; margin: 12px 0; font-size: 14px; line-height: 1.7; }
.amu-alert.ok { background: #e8f8ef; color: #12663a; }
.amu-alert.err { background: #fdecec; color: #9b1c1c; }
.amu-alert.info { background: #e9f3ff; color: #0b4a8f; }
.amu-field { display: block; margin-bottom: 14px; }
.amu-field > span { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 700; color: var(--amu-navy); }
.amu-field small { display: block; margin-top: 4px; color: var(--amu-muted); font-size: 12px; }
.amu-input, .amu-field input[type=text], .amu-field input[type=email], .amu-field input[type=url], .amu-field input[type=number],
.amu-field input[type=password], .amu-field input[type=date], .amu-field select, .amu-field textarea {
    width: 100%; box-sizing: border-box; padding: 11px 14px; border-radius: 12px; border: 1.5px solid var(--amu-line);
    background: #fff; color: var(--amu-ink); font: 500 14px/1.5 'Poppins', sans-serif; outline: none; transition: border-color .15s;
}
.amu-field input:focus, .amu-field select:focus, .amu-field textarea:focus { border-color: var(--amu-blue); }
.amu-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.amu-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px; }
.amu-table th, .amu-table td { padding: 10px 12px; border-bottom: 1px solid var(--amu-line); text-align: start; vertical-align: top; }
.amu-table th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--amu-muted); }
.amu-badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
.amu-badge.pending, .amu-badge.pending_review, .amu-badge.awaiting_payment { background: #fff4d6; color: #8a5a00; }
.amu-badge.approved, .amu-badge.paid, .amu-badge.active, .amu-badge.live { background: #e3f8ec; color: #0f6a37; }
.amu-badge.rejected, .amu-badge.failed, .amu-badge.cancelled { background: #fdecec; color: #9b1c1c; }
.amu-badge.ended, .amu-badge.refunded, .amu-badge.paused { background: #eef1f6; color: #4b5870; }

@media (max-width: 640px) {
    .amu-page { width: calc(100% - 24px); margin-top: 12px; }
    .amu-hero { border-radius: 22px; padding: 22px 18px; }
    .amu-hero .amu-hero-art { opacity: .25; }
    .amu-card { padding: 14px; border-radius: 18px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
