/* ============================================================
   RENDINO RENDER MANAGER — UI v2 (Redesigned)
   Scope: .rrm-*  | RTL | Modern dark-glass theme
   ============================================================ */

:root{
    --rrm-bg:#0f1623;
    --rrm-surface:#161f30;
    --rrm-surface-2:#1d2940;
    --rrm-border:rgba(255,255,255,.08);
    --rrm-text:#e8eef9;
    --rrm-muted:#93a4c2;
    --rrm-primary:#3b82f6;
    --rrm-primary-2:#06b6d4;
    --rrm-accent:#22d3ee;
    --rrm-success:#22c55e;
    --rrm-danger:#ef4444;
    --rrm-radius:16px;
    --rrm-shadow:0 20px 50px rgba(0,0,0,.45);
    --rrm-font:iranyekan, Vazirmatn, tahoma, sans-serif;
}

/* ---------- Container / Card ---------- */
.rrm-box{
    background:linear-gradient(160deg,var(--rrm-surface),var(--rrm-bg));
    border:1px solid var(--rrm-border);
    border-radius:var(--rrm-radius);
    padding:34px 30px;
    box-shadow:var(--rrm-shadow);
    font-family:var(--rrm-font);
    color:var(--rrm-text);
    position:relative;
    overflow:hidden;
    direction:rtl;
    max-width:720px;
    margin:30px auto;
}
.rrm-box::before{
    content:"";
    position:absolute;
    inset:0 0 auto 0;
    height:4px;
    background:linear-gradient(90deg,var(--rrm-primary),var(--rrm-accent),var(--rrm-primary-2));
    background-size:200% 100%;
    animation:rrm-flow 6s linear infinite;
}
@keyframes rrm-flow{to{background-position:200% 0}}

/* soft glow behind card */
.rrm-box::after{
    content:"";
    position:absolute;
    width:300px;height:300px;
    top:-120px;left:-80px;
    background:radial-gradient(circle,rgba(59,130,246,.25),transparent 70%);
    filter:blur(20px);
    pointer-events:none;
}

/* ---------- Titles ---------- */
.rrm-box h3{
    margin:0 0 22px;
    font-size:23px;
    font-weight:800;
    color:#fff;
    display:flex;
    align-items:center;
    gap:10px;
    position:relative;
    z-index:1;
}
.rrm-box h3::before{
    content:"";
    width:6px;height:24px;border-radius:6px;
    background:linear-gradient(180deg,var(--rrm-primary),var(--rrm-accent));
}

/* ---------- Labels ---------- */
.rrm-box label{
    display:block;
    margin:18px 0 8px;
    font-size:14px;
    font-weight:600;
    color:var(--rrm-muted);
    position:relative;z-index:1;
}

/* ---------- Inputs / Selects / Textarea ---------- */
.rrm-input,
.rrm-select,
.rrm-textarea{
    width:100%;
    box-sizing:border-box;
    background:var(--rrm-surface-2);
    border:1px solid var(--rrm-border);
    border-radius:12px;
    padding:13px 15px;
    color:var(--rrm-text);
    font-family:var(--rrm-font);
    font-size:15px;
    transition:border-color .2s, box-shadow .2s, background .2s;
    position:relative;z-index:1;
}
.rrm-input::placeholder,
.rrm-textarea::placeholder{color:#64748b}

.rrm-input:focus,
.rrm-select:focus,
.rrm-textarea:focus{
    outline:none;
    border-color:var(--rrm-primary);
    background:#1a2742;
    box-shadow:0 0 0 4px rgba(59,130,246,.18);
}

.rrm-textarea{min-height:120px;resize:vertical;line-height:1.8}

.rrm-select{
    appearance:none;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%2393a4c2' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat:no-repeat;
    background-position:left 15px center;
    padding-left:40px;
    cursor:pointer;
}
.rrm-select option{background:var(--rrm-surface);color:var(--rrm-text)}

/* file input */
.rrm-input[type=file]{
    padding:11px 15px;
    cursor:pointer;
}
.rrm-input[type=file]::file-selector-button{
    margin-left:12px;
    border:none;
    border-radius:9px;
    padding:8px 16px;
    background:linear-gradient(135deg,var(--rrm-primary),var(--rrm-primary-2));
    color:#fff;
    font-family:var(--rrm-font);
    font-weight:600;
    cursor:pointer;
    transition:opacity .2s;
}
.rrm-input[type=file]::file-selector-button:hover{opacity:.85}

/* ---------- Notes / Instructions ---------- */
.rrm-note,
.rrm-instructions{
    background:rgba(59,130,246,.08);
    border:1px solid rgba(59,130,246,.2);
    border-right:4px solid var(--rrm-primary);
    border-radius:12px;
    padding:14px 16px;
    margin:14px 0;
    font-size:13.5px;
    line-height:2;
    color:var(--rrm-muted);
    position:relative;z-index:1;
}
.rrm-instructions{
    border-right-color:var(--rrm-accent);
    background:rgba(34,211,238,.07);
    border-color:rgba(34,211,238,.2);
}

/* ---------- Progress ---------- */
.rrm-progress-wrapper{margin:22px 0;position:relative;z-index:1}
.rrm-progress-info{
    display:flex;
    align-items:center;
    gap:8px;
    justify-content:flex-start;
    font-size:13px;
    font-weight:700;
    color:var(--rrm-muted);
    margin-bottom:8px;
}
#rrm_percent{
    margin-right:auto;
    color:var(--rrm-accent);
    font-size:15px;
}
.rrm-progress{
    width:100%;
    height:12px;
    background:var(--rrm-surface-2);
    border-radius:20px;
    overflow:hidden;
    border:1px solid var(--rrm-border);
}
.rrm-progress-bar{
    width:0%;
    height:100%;
    border-radius:20px;
    background:linear-gradient(90deg,var(--rrm-primary),var(--rrm-accent));
    box-shadow:0 0 12px rgba(34,211,238,.6);
    transition:width .25s ease;
    position:relative;
    overflow:hidden;
}
.rrm-progress-bar::after{
    content:"";
    position:absolute;inset:0;
    background:linear-gradient(90deg,transparent,rgba(255,255,255,.35),transparent);
    animation:rrm-shine 1.4s linear infinite;
}
@keyframes rrm-shine{from{transform:translateX(100%)}to{transform:translateX(-100%)}}

/* ---------- Button ---------- */
.rrm-btn{
    width:100%;
    margin-top:24px;
    border:none;
    border-radius:13px;
    padding:15px;
    font-family:var(--rrm-font);
    font-size:16px;
    font-weight:800;
    color:#fff;
    cursor:pointer;
    background:linear-gradient(135deg,var(--rrm-primary),var(--rrm-primary-2));
    box-shadow:0 10px 25px rgba(59,130,246,.4);
    transition:transform .15s, box-shadow .2s, filter .2s;
    position:relative;z-index:1;
}
.rrm-btn:hover{transform:translateY(-2px);filter:brightness(1.08);box-shadow:0 14px 32px rgba(59,130,246,.55)}
.rrm-btn:active{transform:translateY(0)}

/* ---------- Projects Table ---------- */
.rrm-table{
    width:100%;
    max-width:1000px;
    margin:24px auto;
    border-collapse:separate;
    border-spacing:0;
    direction:rtl;
    font-family:var(--rrm-font);
    background:var(--rrm-surface);
    border:1px solid var(--rrm-border);
    border-radius:var(--rrm-radius);
    overflow:hidden;
    box-shadow:var(--rrm-shadow);
    color:var(--rrm-text);
}
.rrm-table th{
    background:linear-gradient(135deg,var(--rrm-surface-2),#16243d);
    color:#fff;
    font-size:14px;
    font-weight:700;
    padding:15px 14px;
    text-align:center;
}
.rrm-table td{
    padding:14px;
    text-align:center;
    font-size:14px;
    border-top:1px solid var(--rrm-border);
    color:var(--rrm-muted);
}
.rrm-table tr:nth-child(even) td{background:rgba(255,255,255,.02)}
.rrm-table tr:hover td{background:rgba(59,130,246,.07);color:var(--rrm-text)}

.rrm-table a{
    display:inline-block;
    padding:6px 14px;
    border-radius:8px;
    font-weight:700;
    font-size:13px;
    text-decoration:none;
    background:rgba(59,130,246,.15);
    color:var(--rrm-accent);
    transition:background .2s,transform .15s;
}
.rrm-table a:hover{background:rgba(59,130,246,.3);transform:translateY(-1px)}
.rrm-table a[style*="green"]{
    background:rgba(34,197,94,.15)!important;
    color:#4ade80!important;
}

/* error message when no plan purchased */
.rrm-box p[style*="red"]{
    background:rgba(239,68,68,.1)!important;
    border:1px solid rgba(239,68,68,.3);
    border-radius:12px;
    padding:16px;
    color:#fca5a5!important;
    line-height:2;
    position:relative;z-index:1;
}

/* ---------- Responsive ---------- */
@media (max-width:600px){
    .rrm-box{padding:24px 18px;margin:18px;border-radius:14px}
    .rrm-box h3{font-size:20px}
    .rrm-table{font-size:12px}
    .rrm-table th, .rrm-table td{padding:10px 8px}

    /* stack table columns for tiny screens */
    .rrm-table, .rrm-table thead, .rrm-table tbody, .rrm-table th, .rrm-table td, .rrm-table tr {
        display: block;
    }
    .rrm-table tr{border-bottom:1px solid var(--rrm-border);padding:10px 0}
    .rrm-table th{display:none}
    .rrm-table td{border:none;text-align:right;padding-left:50%;position:relative}
    .rrm-table td::before{
        content:attr(data-label);
        position:absolute;right:14px;
        font-weight:700;color:var(--rrm-accent);
    }
}


/* ═══════════════════════════════════════════
   Rendino — Multi-Step Form  (v6.0)
   ═══════════════════════════════════════════ */

/* ─── wrapper ─── */
.rrm-multistep-box {
    padding: 32px 28px;
}

/* ─── پانل‌های مراحل ─── */
.rrm-step-panel {
    display: none;
    animation: rrmFadeIn .25s ease;
}
.rrm-step-panel.active {
    display: block;
}
@keyframes rrmFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── عنوان هر مرحله ─── */
.rrm-step-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 22px;
    color: #fff;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--rrm-border);
    position: relative;
    z-index: 1;
}

/* ─── Stepper container ─── */
.rrm-stepper {
    position: relative;
    margin-bottom: 34px;
    padding-bottom: 4px;
}

/* ─── نوار پس‌زمینه ─── */
.rrm-stepper-track {
    position: absolute;
    top: 20px;
    right: 10%;
    left: 10%;
    height: 4px;
    background: #e0e3ec;
    border-radius: 4px;
    overflow: hidden;
    z-index: 0;
}
.rrm-stepper-fill {
    height: 100%;
    background: linear-gradient(90deg, #6c63ff, #48cfad);
    border-radius: 4px;
    width: 0%;
    transition: width .4s ease;
}

/* ─── ردیف دات‌ها ─── */
.rrm-steps-row {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

/* ─── هر مرحله ─── */
.rrm-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
}

/* ─── دایره شماره ─── */
.rrm-step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid #d0d4e4;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    font-weight: 700;
    color: #aab0c6;
    transition: all .3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
}

.rrm-step.active .rrm-step-circle {
    border-color: #6c63ff;
    background: #6c63ff;
    color: #fff;
    box-shadow: 0 4px 14px rgba(108,99,255,.35);
}

.rrm-step.completed .rrm-step-circle {
    border-color: #48cfad;
    background: #48cfad;
    color: #fff;
}
/* تیک برای مراحل تکمیل‌شده */
.rrm-step.completed .rrm-step-circle::after {
    content: '✓';
    font-size: .85rem;
}
.rrm-step.completed .rrm-step-circle {
    font-size: 0; /* مخفی کردن عدد */
}

/* ─── برچسب ─── */
.rrm-step-label {
    font-size: .78rem;
    color: #aab0c6;
    font-weight: 500;
    transition: color .3s;
    text-align: center;
}
.rrm-step.active    .rrm-step-label { color: #6c63ff; font-weight: 700; }
.rrm-step.completed .rrm-step-label { color: #48cfad; }

/* ─── شمارنده متنی ─── */
.rrm-step-counter {
    text-align: center;
    font-size: .8rem;
    color: #8890aa;
    margin: 14px 0 0;
}

/* ─── فیلد ─── */
.rrm-field {
    margin-bottom: 20px;
}

/* ─── نوار ناوبری مراحل ─── */
.rrm-step-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid var(--rrm-border);
    gap: 12px;
}

.rrm-btn-next {
    margin-right: auto;
}
.rrm-btn-prev {
    background: var(--rrm-surface-2);
    color: var(--rrm-muted);
    box-shadow: none;
    border: 1px solid var(--rrm-border);
}
.rrm-btn-prev:hover {
    background: rgba(255,255,255,.07);
    color: var(--rrm-text);
    transform: translateY(-1px);
    box-shadow: none;
}

/* ─── خلاصه مرحله ۳ ─── */
.rrm-summary {
    background: rgba(59,130,246,.08);
    border: 1px solid rgba(59,130,246,.25);
    border-right: 4px solid var(--rrm-primary);
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 22px;
    position: relative;
    z-index: 1;
}
.rrm-summary h4 {
    font-size: .85rem;
    color: var(--rrm-accent);
    margin: 0 0 12px;
    font-weight: 700;
    letter-spacing: .3px;
}
.rrm-summary-grid {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 8px 12px;
    font-size: .85rem;
}
.rrm-summary-label {
    font-weight: 700;
    color: var(--rrm-muted);  /* #93a4c2 — روی تیره خوانا */
}
.rrm-summary-grid span:not(.rrm-summary-label) {
    color: #fff;              /* مقادیر سفید — کنتراست کامل */
    font-weight: 500;
}

/* ─── خطای inline ─── */
.rrm-inline-error {
    background: #fff0f0;
    border: 1px solid #f5c6cb;
    color: #d32f2f;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: .88rem;
    margin-bottom: 12px;
    animation: rrmFadeIn .2s ease;
}

/* ─── باکس خطای پلن ─── */
.rrm-error-box {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 14px 16px;
    color: #856404;
    font-size: .9rem;
    line-height: 1.7;
}

/* ══════════════════════════════════════════
   Dropzone — کامل
   ══════════════════════════════════════════ */

/* ─── برچسب بالای dropzone ─── */
.rrm-dz-label {
    display: block;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: var(--rrm-accent);
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}

/* ─── ظرف اصلی ─── */
.rrm-dropzone {
    position: relative;
    min-height: 160px;
    border: 2px dashed rgba(59,130,246,.4);
    border-radius: 16px;
    background: rgba(59,130,246,.04);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color .25s, background .25s, box-shadow .25s;
    overflow: hidden;
}
.rrm-dropzone:hover {
    border-color: var(--rrm-primary);
    background: rgba(59,130,246,.09);
}
.rrm-dropzone.is-dragover {
    border-color: var(--rrm-accent);
    background: rgba(34,211,238,.1);
    box-shadow: 0 0 0 4px rgba(34,211,238,.18), inset 0 0 30px rgba(34,211,238,.06);
    animation: rrm-dz-pulse 1s ease infinite alternate;
}
@keyframes rrm-dz-pulse {
    from { box-shadow: 0 0 0 3px rgba(34,211,238,.15); }
    to   { box-shadow: 0 0 0 7px rgba(34,211,238,.28); }
}

/* ─── input مخفی — پوشش کامل ─── */
.rrm-dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

/* ─── حالت پیش‌فرض ─── */
.rrm-dz-default {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 28px 20px;
    pointer-events: none;
    text-align: center;
    transition: opacity .2s;
}
.rrm-dz-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(59,130,246,.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
    transition: background .25s, transform .25s;
    color: var(--rrm-primary);
}
.rrm-dropzone:hover .rrm-dz-icon,
.rrm-dropzone.is-dragover .rrm-dz-icon {
    background: rgba(34,211,238,.18);
    color: var(--rrm-accent);
    transform: scale(1.1) translateY(-3px);
}
.rrm-dz-title {
    font-size: .95rem;
    font-weight: 700;
    color: var(--rrm-text);
    margin: 0;
}
.rrm-dz-sub {
    font-size: .8rem;
    color: var(--rrm-muted);
    margin: 0;
}

/* ─── حالت فایل انتخاب‌شده ─── */
.rrm-dz-selected {
    display: none;
    align-items: center;
    gap: 14px;
    padding: 20px 22px;
    width: 100%;
    pointer-events: none;
    animation: rrmFadeIn .3s ease;
}
.rrm-dropzone.has-file .rrm-dz-default  { display: none; }
.rrm-dropzone.has-file .rrm-dz-selected { display: flex; }

/* آیکون تیک سبز */
.rrm-dz-check {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: linear-gradient(135deg,#16a34a,#22c55e);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 6px 18px rgba(34,197,94,.35);
    animation: rrm-pop .35s cubic-bezier(.34,1.56,.64,1);
}
@keyframes rrm-pop {
    from { transform: scale(.5); opacity: 0; }
    to   { transform: scale(1);  opacity: 1; }
}
.rrm-dz-fileinfo {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.rrm-dz-filename {
    font-size: .9rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rrm-dz-filesize {
    font-size: .78rem;
    color: var(--rrm-muted);
}
.rrm-dz-remove {
    margin-right: auto;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(239,68,68,.4);
    background: rgba(239,68,68,.1);
    color: #f87171;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: all;
    transition: background .2s, transform .15s;
    z-index: 3;
    position: relative;
}
.rrm-dz-remove:hover {
    background: rgba(239,68,68,.25);
    transform: scale(1.1);
}

/* ─── حالت آپلود موفق ─── */
.rrm-dropzone.upload-done {
    border-color: #22c55e;
    background: rgba(34,197,94,.07);
    pointer-events: none;
}
.rrm-dropzone.upload-done .rrm-dz-check {
    box-shadow: 0 0 0 6px rgba(34,197,94,.22);
}

/* ─── progress wrapper ─── */
#rrm_progress_wrapper {
    margin-top: 14px;
}
@media (max-width: 540px) {
    .rrm-multistep-box { padding: 20px 14px; }
    .rrm-step-label    { font-size: .7rem; }
    .rrm-step-circle   { width: 34px; height: 34px; font-size: .8rem; }
    .rrm-summary-grid  { grid-template-columns: 80px 1fr; }
}
