:root {
    --rasteh-primary: #ef4056;
    --rasteh-primary-dark: #d63248;
    --rasteh-primary-soft: rgba(239, 64, 86, 0.08);
    --rasteh-bg: #f5f6f8;
    --rasteh-sidebar: #ffffff;
    --rasteh-sidebar-text: #4b5563;
    --rasteh-card: #ffffff;
    --rasteh-border: #e5e7eb;
    --rasteh-text: #23254e;
    --rasteh-muted: #81858b;
}

.rasteh-dashboard-wrap {
    display: flex;
    min-height: calc(100vh - 120px);
    direction: rtl;
    text-align: start;
    background: var(--rasteh-bg);
    font-family: Vazirmatn, Tahoma, Arial, sans-serif;
}

.rasteh-dashboard-sidebar {
    width: 260px;
    background: var(--rasteh-sidebar);
    color: var(--rasteh-text);
    padding: 24px 0;
    flex-shrink: 0;
    border-inline-end: 1px solid var(--rasteh-border);
}

.rasteh-store-info {
    padding: 0 20px 24px;
    border-bottom: 1px solid var(--rasteh-border);
    text-align: center;
}

.rasteh-store-logo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 12px;
    background: var(--rasteh-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: #fff;
}

.rasteh-store-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rasteh-store-info h3 {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 600;
}

.rasteh-store-status {
    font-size: 12px;
    color: #16a34a;
    background: rgba(22, 163, 74, 0.1);
    padding: 4px 10px;
    border-radius: 999px;
}

.rasteh-dashboard-nav {
    margin-top: 16px;
}

.rasteh-dashboard-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.rasteh-dashboard-nav li a {
    display: block;
    padding: 12px 20px;
    color: var(--rasteh-sidebar-text);
    text-decoration: none;
    border-inline-start: 3px solid transparent;
    transition: all 0.2s;
}

.rasteh-dashboard-nav li a:hover,
.rasteh-dashboard-nav li.active a {
    background: var(--rasteh-primary-soft);
    color: var(--rasteh-primary);
    border-inline-start-color: var(--rasteh-primary);
}

.rasteh-dashboard-main {
    flex: 1;
    padding: 24px 32px;
    overflow-x: auto;
}

.rasteh-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--rasteh-border);
}

.rasteh-dashboard-header h1 {
    margin: 0;
    font-size: 22px;
    color: var(--rasteh-text);
}

.rasteh-header-balance {
    background: var(--rasteh-card);
    padding: 10px 18px;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.rasteh-header-balance strong {
    color: #16a34a;
    margin-inline-start: 6px;
}

.rasteh-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.rasteh-stat-card {
    background: var(--rasteh-card);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border-top: 3px solid var(--rasteh-primary);
}

.rasteh-stat-label {
    display: block;
    font-size: 13px;
    color: var(--rasteh-muted);
    margin-bottom: 8px;
}

.rasteh-stat-value {
    display: block;
    font-size: 24px;
    color: var(--rasteh-text);
}

.rasteh-recent-section {
    background: var(--rasteh-card);
    padding: 20px 24px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    margin-bottom: 24px;
}

.rasteh-recent-section h2 {
    margin: 0 0 16px;
    font-size: 17px;
    color: var(--rasteh-text);
}

.rasteh-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.rasteh-table th,
.rasteh-table td {
    padding: 12px;
    border-bottom: 1px solid var(--rasteh-border);
    text-align: start;
}

.rasteh-table th {
    background: #f9fafb;
    color: var(--rasteh-muted);
    font-weight: 600;
}

.rasteh-table tbody tr:hover {
    background: #f9fafb;
}

.rasteh-button {
    display: inline-block;
    padding: 10px 20px;
    background: var(--rasteh-primary);
    color: #fff;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    text-decoration: none;
}

.rasteh-button:hover {
    background: var(--rasteh-primary-dark);
    color: #fff;
}

.rasteh-button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.rasteh-button-secondary {
    background: #6b7280;
    margin-inline-start: 8px;
}

.rasteh-button-secondary:hover {
    background: #4b5563;
}

.rasteh-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.rasteh-product-form {
    max-width: 700px;
}

.rasteh-form-row {
    margin-bottom: 16px;
}

.rasteh-form-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--rasteh-text);
}

.rasteh-form-row input,
.rasteh-form-row textarea,
.rasteh-form-row select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--rasteh-border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}

.rasteh-form-row input:focus,
.rasteh-form-row textarea:focus,
.rasteh-form-row select:focus {
    outline: none;
    border-color: var(--rasteh-primary);
    box-shadow: 0 0 0 3px var(--rasteh-primary-soft);
}

.rasteh-form-row .required {
    color: var(--rasteh-primary);
}

.rasteh-form-row-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.rasteh-form-actions {
    margin-top: 20px;
}

.rasteh-vendor-selector {
    margin: 16px 0;
    padding: 16px;
    background: #f9fafb;
    border: 1px solid var(--rasteh-border);
    border-radius: 8px;
}

.rasteh-vendor-selector h4 {
    margin: 0 0 10px;
}

.rasteh-vendor-selector select {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--rasteh-border);
    border-radius: 8px;
}

.description {
    color: var(--rasteh-muted);
    font-size: 13px;
}

.rasteh-store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.rasteh-store-card {
    background: var(--rasteh-card);
    border: 1px solid var(--rasteh-border);
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.rasteh-store-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.rasteh-store-card a {
    display: block;
    padding: 16px;
    text-decoration: none;
    color: var(--rasteh-text);
    text-align: center;
}

.rasteh-store-thumb {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 12px;
}

.rasteh-store-thumb-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--rasteh-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    margin: 0 auto 12px;
}

.rasteh-store-card h3 {
    margin: 0 0 6px;
    font-size: 16px;
}

.rasteh-store-owner {
    font-size: 13px;
    color: var(--rasteh-muted);
}

.rasteh-store-product-count {
    display: block;
    font-size: 12px;
    color: var(--rasteh-primary);
    margin-top: 6px;
    font-weight: 600;
}

.rasteh-store-page {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    direction: rtl;
    font-family: Vazirmatn, Tahoma, Arial, sans-serif;
}

.rasteh-store-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--rasteh-border);
}

.rasteh-store-header .rasteh-store-logo {
    width: 100px;
    height: 100px;
    font-size: 44px;
    flex-shrink: 0;
}

.rasteh-store-info h1 {
    margin: 0 0 8px;
}

.rasteh-store-description {
    color: var(--rasteh-muted);
    margin-top: 12px;
}

.rasteh-store-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.rasteh-product-card {
    background: var(--rasteh-card);
    border: 1px solid var(--rasteh-border);
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.rasteh-product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.rasteh-product-card a {
    display: block;
    padding: 14px;
    text-decoration: none;
    color: var(--rasteh-text);
    text-align: center;
}

.rasteh-product-card img {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
}

.rasteh-product-card h3 {
    margin: 0 0 8px;
    font-size: 15px;
}

.rasteh-product-card .price {
    color: var(--rasteh-primary);
    font-weight: 700;
}

.rasteh-store-rating {
    margin: 8px 0;
}

.rasteh-stars {
    color: #f59e0b;
    letter-spacing: 2px;
    margin-inline-end: 8px;
}

.rasteh-rating-text {
    color: var(--rasteh-muted);
    font-size: 14px;
}

.rasteh-store-reviews {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--rasteh-border);
}

.rasteh-review-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}

.rasteh-review-list li {
    background: var(--rasteh-card);
    border: 1px solid var(--rasteh-border);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

.rasteh-review-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.rasteh-review-header time {
    color: var(--rasteh-muted);
    font-size: 13px;
    margin-inline-start: auto;
}

.rasteh-store-reviews .comment-form {
    max-width: 600px;
}

.rasteh-store-reviews .comment-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.rasteh-store-reviews .comment-form input,
.rasteh-store-reviews .comment-form textarea,
.rasteh-store-reviews .comment-form select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--rasteh-border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    margin-bottom: 12px;
    box-sizing: border-box;
}

.rasteh-store-reviews .form-submit input[type="submit"] {
    width: auto;
    background: var(--rasteh-primary);
    color: #fff;
    border: 0;
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
}

.rasteh-store-reviews .form-submit input[type="submit"]:hover {
    background: var(--rasteh-primary-dark);
}

.rasteh-archive-wrap {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    direction: rtl;
    font-family: Vazirmatn, Tahoma, Arial, sans-serif;
}

.rasteh-archive-wrap h1 {
    margin-bottom: 24px;
}

.rasteh-earnings-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .rasteh-dashboard-wrap {
        flex-direction: column;
    }

    /* Sidebar collapses to a compact top bar. */
    .rasteh-dashboard-sidebar {
        width: 100%;
        padding: 12px 0 0;
        border-inline-end: 0;
        border-bottom: 1px solid var(--rasteh-border);
    }

    .rasteh-store-info {
        display: flex;
        align-items: center;
        gap: 12px;
        text-align: start;
        padding: 0 16px 12px;
    }

    .rasteh-store-info .rasteh-store-logo {
        width: 40px;
        height: 40px;
        font-size: 18px;
        margin: 0;
        flex-shrink: 0;
    }

    .rasteh-store-info h3 {
        margin: 0;
        font-size: 15px;
    }

    .rasteh-dashboard-nav {
        margin-top: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .rasteh-dashboard-nav ul {
        display: flex;
        white-space: nowrap;
    }

    .rasteh-dashboard-nav li a {
        padding: 10px 14px;
        border-inline-start: 0;
        border-bottom: 3px solid transparent;
    }

    .rasteh-dashboard-nav li a:hover,
    .rasteh-dashboard-nav li.active a {
        background: transparent;
        border-bottom-color: var(--rasteh-primary);
    }

    .rasteh-dashboard-main {
        padding: 16px;
    }

    .rasteh-dashboard-header {
        flex-wrap: wrap;
        gap: 12px;
    }

    .rasteh-form-row-3 {
        grid-template-columns: 1fr;
    }

    .rasteh-store-header {
        flex-direction: column;
        text-align: center;
    }
}
