/* ===== پرو آنلاین — پورتال ===== */
:root {
    --po-violet: #7c3aed;
    --po-pink: #db2777;
    --po-ink: #20243a;
    --po-mut: #667085;
    --po-bg: #f6f5fb;
    --po-line: #e7e4f3;
    --po-ok: #16a34a;
    --po-grad: linear-gradient(135deg, #7c3aed, #db2777);
}

.po-body [hidden] { display: none !important; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

.po-body {
    background:
        radial-gradient(1200px 500px at 90% -10%, rgba(124, 58, 237, .10), transparent 60%),
        radial-gradient(900px 400px at 0% 0%, rgba(219, 39, 119, .08), transparent 55%),
        var(--po-bg);
    color: var(--po-ink);
    font-family: Vazirmatn, Tahoma, "Segoe UI", Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 15px;
    line-height: 1.8;
}

.po-main {
    flex: 1;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 26px 16px 56px;
}

.po-card {
    background: #fff;
    border: 1px solid var(--po-line);
    border-radius: 18px;
    padding: 22px;
    margin-bottom: 18px;
    box-shadow: 0 8px 30px rgba(32, 36, 58, .06);
}

/* ---------- header ---------- */
.po-top {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--po-line);
}
.po-top-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.po-logo {
    font-size: 22px;
    font-weight: 800;
    background: var(--po-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.po-logo span {
    color: var(--po-ink);
    -webkit-text-fill-color: var(--po-ink);
}
.po-hello { color: var(--po-mut); font-size: 14px; }
.po-top-actions { display: flex; align-items: center; gap: 10px; }

/* ---------- دکمه‌ها ---------- */
.po-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 14px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    font-size: 15px;
    padding: 12px 26px;
    text-decoration: none;
    transition: transform .15s, box-shadow .15s, opacity .15s, border-color .15s, color .15s;
}
.po-btn.primary {
    background: var(--po-grad);
    color: #fff;
    box-shadow: 0 10px 24px rgba(124, 58, 237, .30);
}
.po-btn.primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(124, 58, 237, .38);
}
.po-btn.primary:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.po-btn.ghost { background: #fff; color: var(--po-ink); border: 1px solid var(--po-line); }
.po-btn.ghost:hover { border-color: var(--po-violet); color: var(--po-violet); }
.po-btn.sm { padding: 7px 14px; font-size: 13px; border-radius: 10px; }
.po-btn.big { width: 100%; font-size: 17px; padding: 16px 20px; }

/* ---------- لاگین / ثبت‌نام ---------- */
.po-auth { max-width: 460px; margin: 40px auto; text-align: center; }
.po-auth-logo {
    font-size: 30px;
    font-weight: 800;
    background: var(--po-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.po-auth-logo span { color: var(--po-ink); -webkit-text-fill-color: var(--po-ink); }
.po-auth-sub { color: var(--po-mut); margin: 6px 0 18px; }
.po-tabs {
    display: flex;
    background: #f1effa;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 16px;
}
.po-tab {
    flex: 1;
    border: 0;
    background: transparent;
    padding: 9px;
    border-radius: 9px;
    font-family: inherit;
    font-weight: 700;
    color: var(--po-mut);
    cursor: pointer;
}
.po-tab.active { background: #fff; color: var(--po-violet); box-shadow: 0 2px 8px rgba(32, 36, 58, .10); }
.po-form { display: flex; flex-direction: column; gap: 12px; text-align: right; }
.po-form label {
    font-weight: 600;
    font-size: 13.5px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.po-form input {
    font-family: inherit;
    font-size: 15px;
    padding: 12px 14px;
    border: 1.5px solid var(--po-line);
    border-radius: 12px;
    background: #fbfaff;
    transition: border-color .15s, box-shadow .15s;
}
.po-form input:focus {
    outline: none;
    border-color: var(--po-violet);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, .15);
}

/* ---------- کارت محصول ---------- */
.po-product { display: flex; gap: 16px; align-items: center; }
.po-product-img {
    width: 92px;
    height: 92px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid var(--po-line);
    flex: none;
}
.po-product h2 { margin: 0 0 4px; font-size: 18px; }
.po-product-price { color: var(--po-pink); font-weight: 700; }
.po-link { color: var(--po-violet); font-size: 13px; text-decoration: none; font-weight: 700; }

/* ---------- گرید دو ستونه ---------- */
.po-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .po-grid { grid-template-columns: 1fr; } }

.po-step { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.po-step h3 { margin: 0; font-size: 16.5px; }
.po-step-num {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--po-grad);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex: none;
}
.po-hint { color: var(--po-mut); font-size: 13px; margin: 4px 0 12px; }
.po-note {
    color: var(--po-mut);
    font-size: 12.5px;
    margin-top: 14px;
    background: #f7f5ff;
    border: 1px dashed #ddd3fb;
    padding: 8px 12px;
    border-radius: 10px;
}
.po-warn {
    color: #b45309;
    background: #fffbeb;
    border: 1px solid #fde68a;
    font-size: 13px;
    border-radius: 10px;
    padding: 8px 12px;
    margin: 12px 0 0;
}

/* ---------- دراپ‌زون ---------- */
.po-drop {
    border: 2px dashed #c9bff2;
    border-radius: 16px;
    background: #fbfaff;
    padding: 30px 16px;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.po-drop:hover, .po-drop.over { border-color: var(--po-violet); background: #f3edff; }
.po-drop input[type="file"] { display: none; }
.po-drop-ico { font-size: 34px; line-height: 1.2; }
.po-drop-t { font-weight: 700; margin-top: 6px; }
.po-drop-s { color: var(--po-mut); font-size: 12.5px; margin-top: 4px; }

/* ---------- وضعیت عکس ---------- */
.po-avatar-done { display: none; text-align: center; }
.po-has-avatar .po-avatar-done { display: block; }
.po-has-avatar .po-drop { display: none; }
.po-avatar-done img {
    width: 150px;
    height: 190px;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid var(--po-line);
    background: #f1effa;
}
.po-avatar-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.po-ok { color: var(--po-ok); font-weight: 700; font-size: 13.5px; }
.po-uploading {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--po-mut);
    margin-top: 12px;
    font-size: 13.5px;
}

/* ---------- مصرف روزانه ---------- */
.po-usage { margin: 6px 0 14px; }
.po-usage-dots { display: flex; gap: 8px; margin-bottom: 6px; }
.po-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #ece8fa;
    display: inline-block;
}
.po-dot.used { background: var(--po-grad); }
.po-usage-t { color: var(--po-mut); font-size: 13px; }

/* ---------- نتیجه ---------- */
.po-result { text-align: center; }
.po-result-spin {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 30px 0;
    color: var(--po-mut);
    font-weight: 600;
}
.po-result-spin small { color: var(--po-mut); font-weight: 400; }
#poResultImg {
    max-width: 320px;
    width: 100%;
    border-radius: 18px;
    border: 1px solid var(--po-line);
    box-shadow: 0 16px 40px rgba(32, 36, 58, .14);
}
.po-result-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.po-when { color: var(--po-mut); font-size: 12.5px; }

/* ---------- اسپینر ---------- */
.po-spinner {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 4px solid #e9e4fb;
    border-top-color: var(--po-violet);
    animation: po-spin .9s linear infinite;
}
.po-spinner.sm { width: 22px; height: 22px; border-width: 3px; }
@keyframes po-spin { to { transform: rotate(360deg); } }

/* ---------- آرشیو ---------- */
.po-history {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
}
.po-hcard {
    background: #fff;
    border: 1px solid var(--po-line);
    border-radius: 14px;
    overflow: hidden;
    transition: transform .15s, box-shadow .15s;
}
.po-hcard:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(32, 36, 58, .10); }
.po-hcard a { display: block; }
.po-hcard img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    display: block;
    background: #f1effa;
}
.po-hmeta { padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.po-hmeta span, .po-hmeta a {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--po-ink);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.po-hmeta a { color: var(--po-violet); }
.po-hmeta time { font-size: 11.5px; color: var(--po-mut); }

/* ---------- توست ---------- */
.po-toast {
    position: fixed;
    bottom: 24px;
    right: 50%;
    transform: translateX(50%);
    background: #20243a;
    color: #fff;
    padding: 12px 22px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    z-index: 100;
    max-width: min(90vw, 480px);
    box-shadow: 0 14px 40px rgba(0, 0, 0, .25);
}
.po-toast-ok { background: #14532d; }
.po-toast-err { background: #7f1d1d; }

/* ---------- متن‌های کمکی ---------- */
.po-notice { color: var(--po-mut); font-weight: 600; }
.po-foot { text-align: center; color: var(--po-mut); font-size: 12.5px; padding: 18px; }
.po-foot a { color: var(--po-violet); text-decoration: none; font-weight: 700; }
