/* ==========================================================================
   استایل کمکی پتروآپ برای صفحاتی که هنوز با طرح جدید (Bootstrap) بازطراحی
   نشده‌اند (داشبورد، پنل ادمین، فرم‌ها و ...).
   ریست پایه (html/body/.container/فونت) اکنون از Bootstrap + style.css
   می‌آید؛ اینجا فقط کلاس‌های اختصاصی این صفحات نگه داشته شده‌اند.
   ========================================================================== */

:root {
    --color-primary: #0a7a63;
    --color-primary-dark: #086352;
    --color-success: #16a34a;
    --color-error: #dc2626;
    --color-text: #1f2937;
    --color-muted: #6b7280;
    --color-bg: #f8fafc;
    --color-border: #e5e7eb;
    --radius: 10px;
    --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
}

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

/* Header ------------------------------------------------------------------ */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow);
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
}
.brand {
    font-weight: bold;
    font-size: 20px;
    color: var(--color-primary);
    text-decoration: none;
}
.main-nav {
    display: flex;
    gap: 16px;
    align-items: center;
}

/* Main -------------------------------------------------------------------- */
.site-main { padding: 24px 0 48px; }

/* Footer ------------------------------------------------------------------ */
.site-footer {
    background: #fff;
    border-top: 1px solid var(--color-border);
    padding: 20px 0;
    margin-top: 60px;
}
.footer-inner { text-align: center; }
.footer-inner p { margin: 4px 0; }

/* Alerts ------------------------------------------------------------------ */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    border: 1px solid transparent;
}
.alert-success {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}
.alert-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}
.form-errors {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 16px;
}
.form-errors ul { margin: 0; padding-inline-start: 20px; }

/* Auth card -------------------------------------------------------------- */
.auth-card {
    max-width: 460px;
    margin: 24px auto;
    background: #fff;
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
}
.page-title {
    font-size: 22px;
    margin: 0 0 20px;
}
.section-title {
    font-size: 16px;
    margin: 24px 0 12px;
    color: var(--color-muted);
}

/* Forms ------------------------------------------------------------------ */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 14px;
    margin-bottom: 6px;
    font-weight: 500;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 14px;
    background: #fff;
    font-family: inherit;
    color: var(--color-text);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(11,94,215,.12);
}
.form-group .readonly {
    background: #f3f4f6;
    color: var(--color-muted);
}
.otp-input {
    text-align: center;
    letter-spacing: 6px;
    font-size: 20px;
    font-weight: bold;
}

/* Buttons ---------------------------------------------------------------- */
.btn-primary {
    background: var(--color-primary);
    color: #fff;
    border: none;
    padding: 11px 20px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: inline-block;
    text-decoration: none;
}
.btn-primary:hover { background: var(--color-primary-dark); text-decoration: none; }
.btn-block { width: 100%; }
.link-button {
    background: none;
    border: none;
    color: var(--color-primary);
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    font-family: inherit;
}
.link-button:hover { text-decoration: underline; }
.inline-form { display: inline; }

/* Auth alt links --------------------------------------------------------- */
.auth-alt {
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
    color: var(--color-muted);
}
.resend-form { text-align: center; margin-top: 12px; }

/* Dashboard -------------------------------------------------------------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}
.stat-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 16px 20px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.stat-label { color: var(--color-muted); font-size: 13px; }
.stat-value { font-size: 18px; font-weight: bold; }
.status-active { color: var(--color-success); }
.status-pending_verification { color: #d97706; }
.status-suspended { color: var(--color-error); }

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}
.action-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
    text-align: center;
    color: var(--color-text);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: transform .15s ease;
}
.action-card:hover { transform: translateY(-2px); text-decoration: none; }
.action-card.disabled {
    opacity: .55;
    cursor: not-allowed;
    pointer-events: none;
}

/* Profile ---------------------------------------------------------------- */
.profile-page .form-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    max-width: 560px;
    margin-bottom: 24px;
}



/* ==========================================================================
   گام ۲ — شرکت / غرفه
   ========================================================================== */

/* Company form --------------------------------------------------------- */
.company-form-page .form-card,
.company-public .company-section {
    background: #fff;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    max-width: 820px;
    margin-bottom: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.company-status-panel {
    background: #fff;
    border-radius: var(--radius);
    padding: 16px 20px;
    box-shadow: var(--shadow);
    max-width: 820px;
    margin-bottom: 20px;
}
.verification-note {
    margin-top: 8px;
    padding: 8px 12px;
    background: #fef2f2;
    border-radius: 6px;
    color: #991b1b;
}

.verification-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}
.verification-unverified { background: #f3f4f6; color: #4b5563; }
.verification-pending    { background: #fef3c7; color: #92400e; }
.verification-verified   { background: #d1fae5; color: #065f46; }
.verification-rejected   { background: #fee2e2; color: #991b1b; }

.submit-verification-form { margin-bottom: 20px; }
.btn-primary[disabled] {
    opacity: .5;
    cursor: not-allowed;
}

/* Progress bar --------------------------------------------------------- */
.progress-wrapper {
    background: #fff;
    border-radius: var(--radius);
    padding: 16px 20px;
    box-shadow: var(--shadow);
    max-width: 820px;
    margin-bottom: 20px;
}
.progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 8px;
}
.progress-percent { font-weight: 700; }
.progress-high  { color: var(--color-success); }
.progress-mid   { color: #d97706; }
.progress-low   { color: var(--color-error); }

.progress-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    transition: width .3s ease;
    background: var(--color-primary);
}
.progress-fill.progress-high { background: var(--color-success); }
.progress-fill.progress-mid  { background: #d97706; }
.progress-fill.progress-low  { background: var(--color-error); }

/* Images --------------------------------------------------------------- */
.logo-preview {
    margin-bottom: 12px;
}
.logo-preview img {
    max-width: 180px;
    max-height: 180px;
    border-radius: var(--radius);
    background: #f3f4f6;
    padding: 8px;
}
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}
.image-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: #f3f4f6;
    aspect-ratio: 1 / 1;
}
.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.image-item form {
    position: absolute;
    top: 6px;
    inset-inline-end: 6px;
}
.btn-danger-small {
    background: rgba(220,38,38,.9);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 12px;
}

/* Table --------------------------------------------------------------- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
    font-size: 14px;
}
.data-table th,
.data-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--color-border);
    text-align: start;
}
.data-table th { background: #f9fafb; font-weight: 600; }

/* Checkbox multi-grid ------------------------------------------------- */
.multi-select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 6px;
    max-height: 240px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: #fafafa;
}
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    cursor: pointer;
}

/* Public company ------------------------------------------------------ */
.company-header {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.company-logo {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: var(--radius);
    background: #f3f4f6;
}
.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.info-list li {
    padding: 6px 0;
    border-bottom: 1px dashed var(--color-border);
}
.info-list li:last-child { border-bottom: none; }

.error-page {
    text-align: center;
    padding: 60px 20px;
}

/* Dashboard action primary ------------------------------------------- */
.action-card-primary {
    background: linear-gradient(135deg, #0a7a63 0%, #086352 100%);
    color: #fff;
}
.action-card-primary:hover { color: #fff; }
.action-card-primary .muted { color: rgba(255,255,255,.85); }


/* ==========================================================================
   گام ۴ — آگهی‌ها
   ========================================================================== */

/* Home ------------------------------------------------------------------ */
.home-page .hero {
    text-align: center;
    padding: 40px 16px;
    background: linear-gradient(135deg, #0a7a63 0%, #086352 100%);
    color: #fff;
    border-radius: var(--radius);
    margin-bottom: 32px;
}
.home-page .hero h1 { margin: 0 0 8px; font-size: 28px; }
.home-page .hero .muted { color: rgba(255,255,255,.85); }
.home-search-form {
    display: flex;
    gap: 8px;
    max-width: 520px;
    margin: 20px auto 0;
}
.home-search-form input {
    flex: 1;
    padding: 12px 14px;
    border-radius: var(--radius);
    border: none;
    font-size: 14px;
    font-family: inherit;
}
.home-section { margin-bottom: 36px; }
.home-section .section-title { font-size: 18px; margin-bottom: 16px; }

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
.category-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    text-align: center;
    color: var(--color-text);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: transform .15s ease;
}
.category-card:hover { transform: translateY(-2px); text-decoration: none; }

/* Listing grid & card --------------------------------------------------- */
.listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}
.listing-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.listing-card-title {
    font-weight: 700;
    font-size: 15px;
    color: var(--color-text);
    text-decoration: none;
    line-height: 1.5;
}
.listing-card-title:hover { color: var(--color-primary); text-decoration: none; }
.listing-card-meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}
.listing-type-badge,
.listing-featured-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}
.listing-type-domestic { background: #dbeafe; color: #1e40af; }
.listing-type-export   { background: #fef3c7; color: #92400e; }
.listing-featured-badge { background: #fde68a; color: #92400e; }

.listing-card-facts {
    list-style: none;
    padding: 0;
    margin: 4px 0 0;
    font-size: 12.5px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.listing-card-facts span { color: var(--color-muted); }
.listing-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px dashed var(--color-border);
}
.btn-small {
    padding: 8px 14px;
    font-size: 13px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
}

/* Listing single ------------------------------------------------------- */
.listing-single {
    background: #fff;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    max-width: 900px;
    margin: 0 auto;
}
.listing-single-head h1 { margin: 0 0 8px; }
.listing-single-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    font-size: 13px;
}
.listing-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    margin: 20px 0;
}
.listing-gallery img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: var(--radius);
    background: #f3f4f6;
}
.listing-single-section { margin-top: 24px; }
.listing-single-section h2 { font-size: 16px; margin-bottom: 12px; }
.listing-description { line-height: 2; }
.listing-single-actions { margin-top: 24px; display: flex; gap: 10px; }

.btn-danger {
    background: var(--color-error);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
}

/* Listing wizard ------------------------------------------------------- */
.listing-wizard {
    background: #fff;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    max-width: 860px;
    margin: 0 auto 24px;
}
.wizard-steps {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.wizard-step {
    flex: 1;
    min-width: 120px;
    padding: 10px 12px;
    border-radius: var(--radius);
    background: #f3f4f6;
    text-align: center;
    font-size: 13px;
    color: #4b5563;
}
.wizard-step.is-active { background: var(--color-primary); color: #fff; }
.wizard-step.is-done { background: #d1fae5; color: #065f46; }
.wizard-panel { display: none; border: none; padding: 0; margin: 0; }
.wizard-panel.is-active { display: block; }
.wizard-panel legend { display: none; }
.wizard-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px dashed var(--color-border);
}

/* Search --------------------------------------------------------------- */
.search-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    align-items: start;
}
@media (max-width: 800px) {
    .search-layout { grid-template-columns: 1fr; }
}
.search-sidebar {
    background: #fff;
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 16px;
}
.search-form .form-group { margin-bottom: 10px; }
.search-form-row { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.search-form .btn-secondary { width: 100%; margin-top: 8px; }

/* Pagination ----------------------------------------------------------- */
.pagination {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
    margin: 24px 0;
    flex-wrap: wrap;
}
.page-link {
    padding: 7px 12px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    color: var(--color-text);
    text-decoration: none;
    font-size: 13px;
}
.page-link:hover { background: #f3f4f6; text-decoration: none; }
.page-link.current {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}
.page-dots { color: var(--color-muted); }

/* Company listing link ------------------------------------------------- */
.company-quick-link { margin-bottom: 20px; }

/* Page head ------------------------------------------------------------ */
.page-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

/* Row actions ---------------------------------------------------------- */
.row-actions { white-space: nowrap; }
.row-actions .btn-small,
.row-actions .btn-danger-small { margin-inline-end: 4px; }

/* Admin two col -------------------------------------------------------- */
.admin-two-col {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}
@media (max-width: 900px) {
    .admin-two-col { grid-template-columns: 1fr; }
}
.admin-card {
    background: var(--admin-bg-2);
    border: 1px solid var(--admin-border);
    border-radius: var(--radius);
    padding: 16px 18px;
    margin-bottom: 16px;
}
.admin-card h2 { font-size: 15px; margin: 0 0 12px; }
.admin-form-small {
    display: flex;
    gap: 6px;
    margin: 8px 0;
    align-items: center;
}
.admin-form-small input {
    flex: 1;
    background: var(--admin-bg);
    color: var(--admin-text);
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    padding: 6px 10px;
    font-family: inherit;
}

/* Doc block ------------------------------------------------------------ */
.doc-block {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--color-border);
}
.doc-block:last-child { border-bottom: none; }
.doc-block form { display: flex; gap: 6px; align-items: center; }
.doc-block input[type="file"] { font-size: 12px; }

/* Alert info ----------------------------------------------------------- */
.alert-info {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1e40af;
    padding: 10px 14px;
    border-radius: var(--radius);
    margin: 10px 0;
}



/* ==========================================================================
   گام ۵ — پیام‌رسانی و علاقه‌مندی
   ========================================================================== */

/* Nav badges ----------------------------------------------------------- */
.nav-with-badge { position: relative; display: inline-flex; align-items: center; gap: 4px; }
.nav-badge {
    background: var(--color-error);
    color: #fff;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 8px;
    font-weight: 700;
    min-width: 16px;
    text-align: center;
}
.nav-badge-muted { background: var(--color-muted); }

/* Conversation list ---------------------------------------------------- */
.conversation-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #fff;
    border-radius: var(--radius);
    padding: 8px;
    box-shadow: var(--shadow);
}
.conversation-item {
    display: block;
    padding: 12px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    text-decoration: none;
    transition: background .12s ease;
}
.conversation-item:hover { background: #f9fafb; text-decoration: none; }
.conversation-item.is-unread {
    border-color: #bfdbfe;
    background: #ecfdf5;
}
.conv-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.conv-name { font-weight: 700; }
.conv-time { color: var(--color-muted); font-size: 12px; }
.conv-listing {
    font-size: 12.5px;
    color: var(--color-primary);
    margin-bottom: 4px;
}
.conv-last {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    color: var(--color-muted);
    font-size: 13px;
}
.conv-badge {
    background: var(--color-error);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
}

/* Conversation thread -------------------------------------------------- */
.messages-page {
    max-width: 900px;
    margin: 0 auto;
}
.conversation-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.conversation-listing {
    background: #fff;
    border-radius: var(--radius);
    padding: 10px 14px;
    box-shadow: var(--shadow);
    margin-bottom: 12px;
    font-size: 13px;
}
.conversation-thread {
    background: #fff;
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 520px;
    overflow-y: auto;
    margin-bottom: 12px;
}
.msg-bubble {
    max-width: 70%;
    padding: 10px 14px;
    border-radius: 14px;
    line-height: 1.7;
    font-size: 14px;
    word-wrap: break-word;
}
.msg-mine {
    align-self: flex-end;
    background: var(--color-primary);
    color: #fff;
    border-bottom-left-radius: 4px;
}
.msg-theirs {
    align-self: flex-start;
    background: #f3f4f6;
    color: var(--color-text);
    border-bottom-right-radius: 4px;
}
.msg-meta {
    font-size: 11px;
    opacity: .8;
    margin-top: 4px;
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}
.msg-read { color: #93c5fd; font-weight: 700; }
.msg-unread { opacity: .7; }

.message-form {
    background: #fff;
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.message-form textarea {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 10px 12px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    background: #fff;
}
.message-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(11,94,215,.12);
}
.message-form button { align-self: flex-end; }

/* Listing action bar (contact/favorite) -------------------------------- */
.listing-single-actions-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    padding-bottom: 16px;
    border-bottom: 1px dashed var(--color-border);
}
.listing-single-actions-bar .btn-secondary {
    background: #fff;
    color: var(--color-text);
    border: 1px solid var(--color-border);
    padding: 10px 18px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
}
.listing-single-actions-bar .btn-secondary:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* Favorites ------------------------------------------------------------ */
.favorites-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}
.favorite-item { position: relative; }
.favorite-remove {
    position: absolute;
    top: 8px;
    inset-inline-end: 8px;
}


/* ==========================================================================
   گام ۷ — RFQ
   ========================================================================== */

.rfq-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 14px;
}

.rfq-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.rfq-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.rfq-code {
    font-family: monospace;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
}
.rfq-status {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
}
.rfq-status-pending_review { background: #fef3c7; color: #92400e; }
.rfq-status-approved       { background: #dbeafe; color: #1e40af; }
.rfq-status-matched        { background: #e0e7ff; color: #3730a3; }
.rfq-status-closed         { background: #d1fae5; color: #065f46; }
.rfq-status-rejected       { background: #fee2e2; color: #991b1b; }
.rfq-status-expired        { background: #f3f4f6; color: #4b5563; }

.rfq-facts {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.rfq-facts span { color: var(--color-muted); }
.rfq-export-badge {
    background: #fde68a;
    color: #92400e;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
}

.rfq-section {
    background: #fff;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}
.rfq-section h2 { font-size: 16px; margin: 0 0 12px; }
.rfq-section h3 { font-size: 14px; margin: 12px 0 6px; color: var(--color-muted); }

.rfq-response {
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 10px;
    background: #fafafa;
}
.rfq-response.is-accepted {
    border-color: #10b981;
    background: #ecfdf5;
}
.rfq-response-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.rfq-response-status {
    font-size: 12px;
    color: var(--color-muted);
    font-weight: 600;
}

/* ==========================================================================
   گام ۸ — اشتراک و پرداخت
   ========================================================================== */

.plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.plan-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 1px solid var(--color-border);
    transition: transform .15s ease, box-shadow .15s ease;
}
.plan-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 14px rgba(0,0,0,.08);
    border-color: var(--color-primary);
}
.plan-name { margin: 0; font-size: 18px; }
.plan-price {
    font-size: 22px;
    font-weight: 800;
    color: var(--color-primary);
}
.plan-currency { font-size: 14px; }
.plan-duration { font-size: 13px; color: var(--color-muted); }
.plan-description { font-size: 13px; color: var(--color-muted); margin: 0; }
.plan-features {
    list-style: none;
    padding: 0;
    margin: 8px 0;
    font-size: 13px;
}
.plan-features li::before { content: '✓ '; color: var(--color-success); font-weight: bold; }

.subscription-checkout .checkout-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    max-width: 480px;
    margin: 24px auto;
}
.checkout-company {
    background: #f3f4f6;
    padding: 10px 14px;
    border-radius: var(--radius);
    margin: 14px 0;
    font-size: 13px;
}

.subscription-result .result-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    max-width: 520px;
    margin: 32px auto;
    text-align: center;
}
.result-success { border-top: 4px solid var(--color-success); }
.result-cancelled { border-top: 4px solid #d97706; }
.result-failed { border-top: 4px solid var(--color-error); }
.result-actions { margin-top: 20px; display: flex; gap: 10px; justify-content: center; }

.subscription-page .section-title { margin-top: 28px; }


/* ==========================================================================
   گام ۹ — چندزبانگی
   ========================================================================== */

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: #f3f4f6;
    border-radius: var(--radius);
    padding: 2px;
}
.lang-option {
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    color: var(--color-muted);
    text-decoration: none;
    font-weight: 600;
    transition: background .15s ease, color .15s ease;
}
.lang-option:hover {
    background: rgba(11,94,215,.1);
    color: var(--color-primary);
    text-decoration: none;
}
.lang-option.is-active {
    background: var(--color-primary);
    color: #fff;
}

/* برای RTL: چیدمان آینه‌ای */
html[dir="rtl"] .header-actions {
    flex-direction: row-reverse;
}

/* Static page --------------------------------------------------------- */
.static-page {
    max-width: 860px;
    margin: 0 auto;
    background: #fff;
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
}
.static-page .page-title {
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 12px;
}
.static-page-body {
    line-height: 2;
    font-size: 15px;
}
.static-page-body h1,
.static-page-body h2,
.static-page-body h3 {
    margin-top: 24px;
}

@media (max-width: 800px) {
    .header-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    html[dir="rtl"] .header-actions {
        align-items: flex-end;
    }
}


/* ==========================================================================
   گام ۱۰ — Breadcrumbs, RFQ public, Inline CTA
   ========================================================================== */

/* Breadcrumbs ---------------------------------------------------------- */
.breadcrumbs {
    margin-bottom: 20px;
    font-size: 13px;
}
.breadcrumbs ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    color: var(--color-muted);
}
.breadcrumbs li { display: inline-flex; align-items: center; gap: 6px; }
.breadcrumbs a {
    color: var(--color-primary);
    text-decoration: none;
}
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs [aria-current="page"] { color: var(--color-text); font-weight: 600; }
.bc-sep { color: var(--color-muted); }

/* RFQ public ----------------------------------------------------------- */
.rfq-public-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    margin: 20px 0;
}
.rfq-public-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    color: var(--color-text);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: transform .15s ease;
}
.rfq-public-card:hover { transform: translateY(-2px); text-decoration: none; }
.rfq-public-card h3 { margin: 0; font-size: 15px; }
.rfq-public-count {
    background: #dbeafe;
    color: #1e40af;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    align-self: flex-start;
}

.rfq-aggregate {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin: 20px 0;
}
.agg-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 16px 18px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.agg-label { color: var(--color-muted); font-size: 12px; }
.agg-value { font-size: 18px; font-weight: bold; }

.tag-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tag-list li {
    background: #f3f4f6;
    border-radius: 10px;
    padding: 4px 12px;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.tag-count {
    background: var(--color-primary);
    color: #fff;
    padding: 1px 7px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
}

.rfq-public-cta {
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

.rfq-inline-cta {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px dashed var(--color-border);
}

/* ===== Responsive: جدول‌های عمومی روی موبایل اسکرول افقی داخلی دارند ===== */
@media (max-width: 768px) {
    .data-table, .spec-table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .inline-form { display: inline-block; margin-bottom: 4px; }
}


/* ===== دسترسی‌پذیری: skip-link، focus مشخص، کاهش حرکت ===== */
.skip-link {
    position: absolute;
    inset-inline-start: .5rem;
    top: -4rem;
    z-index: 2000;
    padding: .5rem 1rem;
    background: #fff;
    color: #000;
    border: 2px solid #0a7a63;
    border-radius: .25rem;
}
.skip-link:focus { top: .5rem; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, [tabindex]:focus-visible {
    outline: 3px solid #0a7a63;
    outline-offset: 2px;
}
main:focus { outline: none; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* نشان «ویژه» روی کارت آگهی */
.ad-img-wrap { position: relative; }
.ad-featured { position: absolute; top: .5rem; inset-inline-end: .5rem; }


/* ===== هماهنگی با برند و جزئیات تکمیلی ===== */
a { color: var(--color-primary); }
a:hover { color: var(--color-primary-dark); }
.stat-value-date { font-size: 1rem; font-weight: 700; direction: rtl; unicode-bidi: plaintext; }

/* برچسب وضعیت آگهی (به‌جای متن خام انگلیسی) */
.status-pill {
    display: inline-block;
    padding: .2rem .7rem;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: #e5e7eb;
    color: #374151;
}
.status-published     { background: #d1fae5; color: #065f46; }
.status-pending_review{ background: #fef3c7; color: #92400e; }
.status-rejected      { background: #fee2e2; color: #991b1b; }
.status-expired       { background: #e5e7eb; color: #374151; }
.status-draft         { background: #e0e7ff; color: #3730a3; }

/* جدول‌های داخلی روی موبایل اسکرول افقی دارند و ستون عملیات جمع‌وجور است */
.data-table td:last-child { white-space: nowrap; }

/* ===== فرم ثبت/ویرایش آگهی: عرض یکسان برای ویزارد، تصاویر و مدارک ===== */
.listing-form-page .listing-wizard,
.listing-form-page .form-card {
    max-width: 860px;
    margin-inline: auto;
}
.listing-form-page .form-card { margin-top: 1.5rem; }
.doc-block { flex-wrap: wrap; gap: .75rem; }
.doc-block form { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; flex: 1 1 280px; }
.doc-block input[type="file"] { flex: 1 1 200px; width: auto; }

.btn-danger-small { padding: 8px 12px; min-height: 36px; font-size: 13px; }
.settings-logo-preview img { height: 60px; width: auto; }

/* ==========================================================================
   چیدمان سراسری: فوتر همیشه پایین صفحه (حتی وقتی محتوا کم است)
   ========================================================================== */
html { min-height: 100%; }
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body > main#main-content { flex: 1 0 auto; width: 100%; padding-bottom: 3rem; }
body > footer.footer { flex-shrink: 0; margin-top: auto; }
body > main#main-content > .container { min-width: 0; }

/* ==========================================================================
   پنل کاربری: سایدبار (دسکتاپ) + محتوا، فاصله‌گذاری و کارت‌بندی یکدست
   ========================================================================== */
.user-panel-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.user-panel-content { min-width: 0; }
.user-panel-aside { min-width: 0; }
.user-panel-aside .user-panel-nav { margin-bottom: 0 !important; }

@media (min-width: 992px) {
    .user-panel-layout { grid-template-columns: 16.5rem minmax(0, 1fr); gap: 1.75rem; }
    .user-panel-aside { position: sticky; top: 5rem; }
    .user-panel-aside .user-panel-list { flex-direction: column; overflow: visible; gap: .15rem; }
    .user-panel-aside .user-panel-list li { width: 100%; }
    .user-panel-aside .user-panel-link { width: 100%; justify-content: flex-start; padding: .55rem .85rem; }
    .user-panel-aside .user-panel-link .badge { margin-inline-start: auto; }
}

/* عنوان و بخش‌ها */
.user-panel-content .page-title,
.user-panel-content > h1,
.user-panel-content .dashboard > h1 { font-size: 1.5rem; font-weight: 700; margin: 0 0 1.25rem; }
.user-panel-content .section-title { font-size: 1.1rem; margin: 2rem 0 1rem; padding-bottom: .5rem; display: block; }
.user-panel-content .page-head { margin-bottom: 1.25rem; }
.user-panel-content .page-head .page-title { margin: 0; }
.user-panel-content p { margin-bottom: 1rem; }

/* جدول‌ها: کارت سفید با حاشیه و ردیف‌های هم‌فاصله */
.user-panel-content .data-table {
    background: #fff; border-radius: var(--pt-radius, .9rem); overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06); border: 1px solid rgba(0, 0, 0, .06);
    margin: 0 0 1.25rem; font-size: .92rem;
}
.user-panel-content .data-table th, .user-panel-content .data-table td { padding: .8rem 1rem; vertical-align: middle; }
.user-panel-content .data-table tbody tr:last-child td { border-bottom: 0; }
.user-panel-content .data-table tbody tr:hover { background: rgba(13, 146, 118, .04); }

/* کارت‌های آمار و دسترسی سریع */
.user-panel-content .stats-grid { gap: 1rem; margin-bottom: 1.75rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.user-panel-content .stat-card { padding: 1rem 1.15rem; gap: .35rem; border: 1px solid rgba(0, 0, 0, .05); }
.user-panel-content .stat-card .btn-small { align-self: flex-start; margin-top: .35rem; }
.user-panel-content .actions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.user-panel-content .action-card { display: flex; flex-direction: column; justify-content: center; gap: .25rem; min-height: 4.5rem; padding: 1rem 1.15rem; text-align: center; }

/* فرم‌ها و کارت‌های محتوا */
.user-panel-content .form-card, .user-panel-content form.card-form {
    background: #fff; border: 1px solid rgba(0, 0, 0, .06); border-radius: var(--pt-radius, .9rem);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06); padding: 1.5rem; margin-bottom: 1.5rem;
}
.user-panel-content .form-group, .user-panel-content .mb-3-auto { margin-bottom: 1rem; }
.user-panel-content .form-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.25rem; }
.user-panel-content .alert { margin-bottom: 1.25rem; }
.user-panel-content .pagination, .user-panel-content nav[aria-label] .pagination { margin-top: 1.25rem; }
.user-panel-content hr { margin: 1.5rem 0; }

@media (max-width: 575.98px) {
    .user-panel-content .data-table th, .user-panel-content .data-table td { padding: .65rem .7rem; }
    .user-panel-content .form-card { padding: 1.1rem; }
}

/* ---------- مزایده و مناقصه ---------- */
.auction-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.auction-card { position: relative; background: #fff; border: 1px solid #e3e8ee; border-radius: .9rem; padding: 1.1rem; display: flex; flex-direction: column; gap: .7rem; box-shadow: 0 1px 2px rgba(31,45,61,.06); transition: box-shadow .15s ease, transform .15s ease; }
.auction-card:hover { box-shadow: 0 6px 18px rgba(31,45,61,.12); transform: translateY(-2px); }
.auction-card-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.auction-card-title { font-size: 1rem; font-weight: 700; margin: 0; line-height: 1.7; }
.auction-card-title a { color: var(--pt-text); text-decoration: none; }
.auction-facts { margin: 0; display: grid; gap: .3rem; font-size: .88rem; }
.auction-facts > div { display: flex; justify-content: space-between; gap: .75rem; }
.auction-facts dt { font-weight: 500; color: var(--pt-text-muted); }
.auction-facts dd { margin: 0; font-weight: 600; text-align: end; }
.auction-card-foot { margin-top: auto; padding-top: .6rem; border-top: 1px dashed #e3e8ee; }
.auction-kind, .auction-status { display: inline-block; padding: .15rem .65rem; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.auction-kind-auction { background: var(--pt-blue-dark); color: #fff; }
.auction-kind-tender { background: var(--pt-green-aa); color: #fff; }
.auction-status { background: #e5e7eb; color: #374151; }
.auction-status-published { background: #d1fae5; color: #065f46; }
.auction-status-awarded { background: var(--pt-green-aa); color: #fff; }
.auction-status-pending_payment { background: #fef3c7; color: #92400e; }
.auction-status-cancelled { background: #fee2e2; color: #991b1b; }
.auction-left { font-size: .8rem; font-weight: 700; color: #92400e; }
.auction-empty { padding: 2.5rem 1rem; text-align: center; background: var(--pt-cream); border: 1px dashed #e3e8ee; border-radius: .9rem; color: var(--pt-text-muted); }
.auction-countdown { display: flex; flex-direction: column; gap: .15rem; padding: .8rem 1rem; background: var(--pt-cream); border-radius: .7rem; margin-bottom: .8rem; }
.auction-countdown strong { font-size: 1.15rem; color: #92400e; }
.auction-sealed { font-size: .85rem; color: var(--pt-text-muted); background: var(--pt-cream); border-inline-start: 3px solid var(--pt-green-aa); padding: .6rem .8rem; border-radius: .4rem; }
.auction-mybid { display: flex; justify-content: space-between; padding: .6rem .8rem; background: #d1fae5; border-radius: .6rem; margin-bottom: .8rem; }
.auction-won { color: var(--pt-green-aa); font-weight: 700; }
.auction-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .75rem; }
.auction-plan { display: flex; gap: .6rem; align-items: flex-start; padding: .8rem; border: 2px solid #e3e8ee; border-radius: .8rem; cursor: pointer; background: #fff; }
.auction-plan:has(input:checked) { border-color: var(--pt-green-aa); background: #ecfdf5; }
.auction-plan input { margin-top: .35rem; }
.auction-plan-body { display: flex; flex-direction: column; gap: .15rem; }
.auction-plan-price { font-weight: 700; color: #92400e; }
.auction-form .form-group input, .auction-form .form-group select, .auction-form .form-group textarea, .auction-bid-form .form-group input, .auction-bid-form .form-group textarea { width: 100%; }

.auction-status-suspended { background: #fff3cd; color: #7a5b00; }
