:root {
    --primary: #c9a84c;
    --primary-light: #dfc06a;
    --primary-dark: #a68a2e;
    --secondary: #0d0d0d;
    --secondary-light: #1a1a1a;
    --accent: #1a4d3e;
    --accent-light: #2d7a5f;
    --bg: #faf8f5;
    --surface: #ffffff;
    --text: #1a1a1a;
    --text-light: #7a7a7a;
    --border: #e8e4dc;
    --success: #2d7a5f;
    --danger: #c44536;
    --warning: #d4a843;
    --gold: #c9a84c;
    --gold-light: #e8d5a0;
    --gold-dark: #8b7332;
    --shadow: 0 2px 16px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.1);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Vazirmatn', 'Tahoma', sans-serif;
    --max-width: 1280px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    direction: rtl;
    line-height: 1.7;
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; }

img { max-width: 100%; height: auto; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 14px 32px; border: none; border-radius: var(--radius-sm);
    font-family: var(--font); font-size: 15px; font-weight: 600;
    cursor: pointer; transition: var(--transition); letter-spacing: 0.5px;
}

.btn-primary { background: linear-gradient(135deg, #c9a84c, #dfc06a); color: #0d0d0d; box-shadow: 0 4px 16px rgba(201,168,76,0.3); }
.btn-primary:hover { background: linear-gradient(135deg, #dfc06a, #c9a84c); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(201,168,76,0.4); }
.btn-secondary { background: linear-gradient(135deg, #0d0d0d, #1a1a1a); color: var(--gold); border: 1px solid rgba(201,168,76,0.3); }
.btn-secondary:hover { background: linear-gradient(135deg, #1a1a1a, #2d2d2d); }
.btn-outline { background: transparent; border: 2px solid var(--gold); color: var(--gold); }
.btn-outline:hover { background: var(--gold); color: #0d0d0d; }
.btn-danger { background: linear-gradient(135deg, #c44536, #e85d4a); color: #fff; }
.btn-danger:hover { background: linear-gradient(135deg, #e85d4a, #c44536); }
.btn-success { background: linear-gradient(135deg, #1a4d3e, #2d7a5f); color: #fff; }
.btn-success:hover { background: linear-gradient(135deg, #2d7a5f, #1a4d3e); }
.btn-sm { padding: 10px 18px; font-size: 13px; }
.btn-lg { padding: 18px 40px; font-size: 17px; }
.btn-block { width: 100%; }

.card {
    background: var(--surface); border-radius: var(--radius);
    box-shadow: var(--shadow); overflow: hidden; transition: var(--transition);
    border: 1px solid rgba(201,168,76,0.08);
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); border-color: rgba(201,168,76,0.2); }

.form-group { margin-bottom: 22px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 14px; color: var(--text); }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 14px 18px; border: 1.5px solid var(--border);
    border-radius: var(--radius-sm); font-family: var(--font); font-size: 15px;
    transition: var(--transition); background: var(--surface);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--gold); outline: none; box-shadow: 0 0 0 4px rgba(201,168,76,0.12);
}

.alert { padding: 14px 20px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 14px; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-danger { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }

.table-responsive { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
table th, table td { padding: 12px 16px; text-align: right; border-bottom: 1px solid var(--border); }
table th { background: var(--secondary); color: #fff; font-weight: 600; font-size: 14px; }
table tr:hover { background: rgba(184,134,11,0.04); }

.badge {
    display: inline-block; padding: 4px 12px; border-radius: 20px;
    font-size: 12px; font-weight: 600;
}
.badge-success { background: #d4edda; color: #155724; }
.badge-danger { background: #f8d7da; color: #721c24; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-info { background: #d1ecf1; color: #0c5460; }
.badge-primary { background: linear-gradient(135deg, #c9a84c, #dfc06a); color: #0d0d0d; }

.staff-banner {
    background: rgba(201,168,76,0.12); color: var(--gold-light);
    font-size: 12px; text-align: center; padding: 10px 12px; margin: 8px 12px;
    border-radius: var(--radius-sm); border: 1px dashed rgba(201,168,76,0.4);
}
.staff-readonly .staff-banner { display: block; }

/* چیپ‌های انتخاب بخش در صفحه کاربران و دسترسی‌ها */
.sec-chip { cursor: pointer; user-select: none; transition: var(--transition); }
.sec-chip input { display: none; }
.sec-chip span {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px; border-radius: 20px; font-size: 13px; font-weight: 500;
    background: var(--secondary-soft, #f4efdf); color: var(--text);
    border: 1.5px solid transparent; transition: var(--transition);
}
.sec-chip input:checked + span {
    background: linear-gradient(135deg, #c9a84c, #dfc06a);
    color: #0d0d0d; border-color: rgba(201,168,76,0.5); font-weight: 700;
}
.sec-chip input:disabled + span { opacity: 0.35; cursor: not-allowed; }

/* آمار کوچک بالای صفحه */
.summary-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 24px; }
.summary-strip .stat-card { margin: 0; }

/* حالت کارمندان: ثبت و ویرایش مجاز است؛ فقط دکمه‌های حذف غیرفعال می‌شوند
   (کنترل اصلی در سطح دیتابیس/RLS انجام شده است). */
.staff-readonly .btn-danger,
.staff-readonly .btn-outline-danger {
    pointer-events: none;
    opacity: 0.45;
    cursor: not-allowed;
}
.staff-readonly input[type="submit"],
.staff-readonly textarea {
    opacity: 0.85;
}

.loading-spinner {
    display: inline-block; width: 40px; height: 40px;
    border: 4px solid var(--border); border-top-color: var(--primary);
    border-radius: 50%; animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 1000; display: flex;
    align-items: center; justify-content: center; opacity: 0;
    pointer-events: none; transition: var(--transition);
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }

.modal {
    background: var(--surface); border-radius: var(--radius);
    padding: 32px; max-width: 600px; width: 90%; max-height: 90vh;
    overflow-y: auto; transform: scale(0.9); transition: var(--transition);
}
.modal-overlay.active .modal { transform: scale(1); }

.toast {
    position: fixed; bottom: 24px; left: 24px; padding: 14px 24px;
    border-radius: var(--radius-sm); color: #fff; font-size: 14px;
    z-index: 2000; transform: translateY(100px); opacity: 0;
    transition: var(--transition);
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-warning { background: var(--warning); color: var(--text); }

header {
    background: linear-gradient(180deg, #0d0d0d 0%, #1a1a1a 100%); color: #fff; position: sticky;
    top: 0; z-index: 100; box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    border-bottom: 1px solid rgba(201,168,76,0.2);
}

.header-top {
    background: linear-gradient(90deg, #1a4d3e, #2d7a5f, #1a4d3e); padding: 10px 0; font-size: 13px;
    text-align: center; color: var(--gold-light); letter-spacing: 1px;
}

nav {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 0; max-width: var(--max-width); margin: 0 auto;
    padding-left: 24px; padding-right: 24px;
}

.nav-logo { display: flex; align-items: center; gap: 14px; font-size: 24px; font-weight: 800; color: var(--gold); }
.nav-logo img { height: 44px; }

.nav-links { display: flex; align-items: center; gap: 36px; list-style: none; }
.nav-links a { color: #b0b0b0; font-size: 15px; font-weight: 500; transition: var(--transition); letter-spacing: 0.5px; }
.nav-links a:hover, .nav-links a.active { color: var(--gold); }

.nav-actions { display: flex; align-items: center; gap: 20px; }
.nav-actions .cart-icon { position: relative; font-size: 22px; cursor: pointer; color: #b0b0b0; transition: var(--transition); }
.nav-actions .cart-icon:hover { color: var(--gold); transform: scale(1.1); }
.nav-actions .cart-count {
    position: absolute; top: -8px; right: -8px; background: var(--danger);
    color: #fff; font-size: 11px; width: 20px; height: 20px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
}

.mobile-menu-btn { display: none; background: none; border: none; color: var(--gold); font-size: 28px; cursor: pointer; }

.hero {
    background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 30%, #0d1f1a 70%, #1a4d3e 100%);
    color: #fff; padding: 100px 0; text-align: center; position: relative; overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at center, rgba(201,168,76,0.08) 0%, transparent 70%);
}
.hero h1 { font-size: 48px; font-weight: 800; margin-bottom: 20px; color: var(--gold); position: relative; letter-spacing: 2px; }
.hero p { font-size: 19px; color: #9a9a9a; max-width: 600px; margin: 0 auto 36px; position: relative; line-height: 1.8; }
.hero .btn { position: relative; z-index: 1; }

.gold-ticker {
    background: linear-gradient(90deg, #0d0d0d, #1a4d3e, #0d0d0d);
    padding: 16px 0; overflow: hidden; border-top: 1px solid rgba(201,168,76,0.3); border-bottom: 1px solid rgba(201,168,76,0.3);
}
.gold-ticker-inner {
    display: flex; gap: 60px; animation: ticker 30s linear infinite;
    white-space: nowrap; color: #fff; font-size: 15px; font-weight: 600;
}
.gold-ticker-item { display: flex; align-items: center; gap: 10px; }
.gold-ticker-item .label { color: var(--gold); font-weight: 700; }

@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(50%); } }

.products-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px; padding: 40px 0;
}

.product-card {
    background: var(--surface); border-radius: var(--radius);
    overflow: hidden; transition: var(--transition); box-shadow: var(--shadow);
    cursor: pointer; border: 1px solid rgba(201,168,76,0.1);
}
.product-card:hover { transform: translateY(-8px); box-shadow: 0 16px 48px rgba(0,0,0,0.12); border-color: rgba(201,168,76,0.3); }
.product-card .product-image { position: relative; overflow: hidden; aspect-ratio: 1; background: #f5f5f5; }
.product-card .product-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
.product-card:hover .product-image img { transform: scale(1.1); }
.product-card .product-badge {
    position: absolute; top: 14px; right: 14px; background: linear-gradient(135deg, #1a4d3e, #2d7a5f);
    color: #fff; padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 600;
    box-shadow: 0 4px 12px rgba(26,77,62,0.3);
}
.product-card .product-info { padding: 20px; }
.product-card .product-title { font-size: 16px; font-weight: 700; margin-bottom: 10px; color: var(--text); line-height: 1.6; }
.product-card .product-meta { font-size: 13px; color: var(--text-light); margin-bottom: 14px; }
.product-card .product-price { font-size: 19px; font-weight: 800; color: var(--primary-dark); }
.product-card .product-actions { display: flex; gap: 8px; margin-top: 14px; }

.features {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px; padding: 70px 0; background: linear-gradient(180deg, var(--bg) 0%, #f0ece4 100%);
}
.feature { text-align: center; padding: 36px 24px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); transition: var(--transition); }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feature .icon { font-size: 52px; margin-bottom: 18px; }
.feature h3 { font-size: 19px; margin-bottom: 10px; color: var(--secondary); font-weight: 700; }
.feature p { font-size: 14px; color: var(--text-light); line-height: 1.8; }

footer {
    background: linear-gradient(180deg, #0d0d0d 0%, #1a1a1a 100%); color: #aaa; padding: 70px 0 24px;
    border-top: 1px solid rgba(201,168,76,0.2);
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 48px; margin-bottom: 48px; }
.footer-col h4 { color: var(--gold); font-size: 19px; margin-bottom: 18px; font-weight: 700; }
.footer-col p, .footer-col a { font-size: 14px; line-height: 2.2; display: block; color: #888; }
.footer-col a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(201,168,76,0.15); padding-top: 24px; text-align: center; font-size: 13px; color: #555; }

.admin-link {
    position: fixed; bottom: 24px; left: 24px; width: 48px; height: 48px;
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d); color: var(--gold); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; z-index: 50; opacity: 0.4; transition: var(--transition);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3); border: 1px solid rgba(201,168,76,0.3);
}
.admin-link:hover { opacity: 1; transform: scale(1.1); box-shadow: 0 8px 24px rgba(201,168,76,0.3); }

.section-title {
    text-align: center; padding: 50px 0 24px;
}
.section-title h2 { font-size: 34px; font-weight: 800; color: var(--secondary); letter-spacing: 1px; }
.section-title p { color: var(--text-light); margin-top: 10px; font-size: 16px; }

.price-table { margin: 28px 0; }
.price-table table { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid rgba(201,168,76,0.1); }
.price-table td { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.price-table td:first-child { font-weight: 600; color: var(--secondary); }
.price-table td:last-child { text-align: left; font-weight: 700; color: var(--primary-dark); }
.price-table tr:last-child td { border-bottom: none; }
.price-table tr.total td {
    background: linear-gradient(135deg, #1a4d3e, #2d7a5f); color: #fff; font-size: 19px; font-weight: 800;
}

.image-zoom-container { position: relative; overflow: hidden; border-radius: var(--radius); cursor: zoom-in; }
.image-zoom-container img { width: 100%; transition: transform 0.3s; }
.image-zoom-container:hover img { transform: scale(2); }

.gallery-thumbs { display: flex; gap: 8px; margin-top: 12px; }
.gallery-thumbs img { width: 80px; height: 80px; object-fit: cover; border-radius: var(--radius-sm); cursor: pointer; border: 2px solid transparent; transition: var(--transition); }
.gallery-thumbs img.active, .gallery-thumbs img:hover { border-color: var(--primary); }

.filter-bar {
    display: flex; flex-wrap: wrap; gap: 12px; padding: 24px 0;
    align-items: center;
}
.filter-bar input, .filter-bar select { padding: 10px 16px; border: 2px solid var(--border); border-radius: var(--radius-sm); font-family: var(--font); font-size: 14px; }
.filter-bar input { flex: 1; min-width: 200px; }

.cart-item {
    display: flex; align-items: center; gap: 16px; padding: 16px;
    border-bottom: 1px solid var(--border);
}
.cart-item img { width: 80px; height: 80px; object-fit: cover; border-radius: var(--radius-sm); }
.cart-item-details { flex: 1; }
.cart-item-qty { display: flex; align-items: center; gap: 8px; }
.cart-item-qty button { width: 32px; height: 32px; border: 1px solid var(--border); background: var(--surface); border-radius: 50%; cursor: pointer; font-size: 16px; }
.cart-item-total { font-weight: 800; color: var(--primary); font-size: 16px; white-space: nowrap; }

.page-header {
    background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 50%, #0d1f1a 100%);
    color: #fff; padding: 50px 0; text-align: center;
    border-bottom: 1px solid rgba(201,168,76,0.2);
}
.page-header h1 { font-size: 36px; font-weight: 800; color: var(--gold); letter-spacing: 2px; }
.page-header p { color: #888; margin-top: 10px; font-size: 16px; }

.tabs { display: flex; gap: 4px; margin-bottom: 28px; border-bottom: 2px solid var(--border); }
.tab-btn { padding: 14px 28px; border: none; background: transparent; font-family: var(--font); font-size: 15px; font-weight: 600; cursor: pointer; color: var(--text-light); transition: var(--transition); border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tab-btn.active { color: var(--primary-dark); border-bottom-color: var(--gold); }
.tab-content { display: none; }
.tab-content.active { display: block; }

.pagination { display: flex; justify-content: center; gap: 10px; padding: 36px 0; }
.pagination button { width: 44px; height: 44px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius-sm); cursor: pointer; font-family: var(--font); font-weight: 600; transition: var(--transition); }
.pagination button.active, .pagination button:hover { background: linear-gradient(135deg, #c9a84c, #dfc06a); color: #0d0d0d; border-color: var(--gold); }

.stat-card {
    background: var(--surface); border-radius: var(--radius); padding: 28px;
    box-shadow: var(--shadow); text-align: center; border: 1px solid rgba(201,168,76,0.1);
}
.stat-card .stat-icon { font-size: 40px; margin-bottom: 10px; }
.stat-card .stat-value { font-size: 30px; font-weight: 800; color: var(--primary-dark); }
.stat-card .stat-label { font-size: 14px; color: var(--text-light); margin-top: 6px; }

.sidebar {
    position: fixed; top: 0; right: 0; width: 260px; height: 100vh;
    background: linear-gradient(180deg, #0d0d0d 0%, #1a1a1a 100%); color: #fff; z-index: 200;
    padding: 24px 0; overflow-y: auto; transition: var(--transition);
    border-left: 1px solid rgba(201,168,76,0.2);
}
.sidebar-logo { padding: 0 20px 24px; border-bottom: 1px solid #333; margin-bottom: 16px; }
.sidebar-logo h2 { font-size: 20px; color: var(--gold); }
.sidebar-logo p { font-size: 12px; color: #888; }
.sidebar-menu { list-style: none; }
.sidebar-menu li a {
    display: flex; align-items: center; gap: 12px; padding: 12px 20px;
    color: #aaa; font-size: 14px; transition: var(--transition);
}
.sidebar-menu li a:hover, .sidebar-menu li a.active { color: var(--gold); background: rgba(255,255,255,0.05); }
.sidebar-menu li a .icon { font-size: 18px; width: 24px; text-align: center; }

.admin-main { margin-right: 260px; padding: 24px; min-height: 100vh; }

.admin-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border);
}
.admin-header h1 { font-size: 24px; font-weight: 800; color: var(--secondary); }

/* نوار بالایی مخصوص موبایل (فقط در عرض کم نمایش داده می‌شود) */
.admin-topbar { display: none; }
.sidebar-overlay { display: none; }

.modal-content { direction: rtl; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.modal-header h2 { font-size: 20px; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text-light); }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-light); }
.empty-state .icon { font-size: 64px; margin-bottom: 16px; opacity: 0.3; }
.empty-state h3 { font-size: 20px; margin-bottom: 8px; color: var(--text); }

@media (max-width: 768px) {
    body { overflow-x: hidden; }
    .about-stats { grid-template-columns: repeat(2, 1fr); gap: 14px; padding: 24px 0; }
    .nav-links { display: none; }
    .mobile-menu-btn { display: block; }
    .hero h1 { font-size: 28px; }
    .hero p { font-size: 15px; }
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
    .admin-main { margin-right: 0; padding: 72px 14px 24px; }
    .admin-main .card { padding: 16px !important; }
    .admin-header { flex-direction: column; align-items: stretch; gap: 10px; }
    .admin-header h1 { font-size: 20px; }
    .admin-header > div { display: flex; flex-wrap: wrap; gap: 8px; }
    .admin-header > div > * { flex: 1 1 auto; }
    .sidebar { transform: translateX(100%); }
    .sidebar.open { transform: translateX(0); box-shadow: -8px 0 40px rgba(0,0,0,0.5); }
    .filter-bar { flex-direction: column; }
    .filter-bar input { min-width: 100%; }
    .cart-item { flex-direction: column; text-align: center; }
    .admin-topbar {
        display: flex; align-items: center; justify-content: space-between;
        position: fixed; top: 0; right: 0; left: 0; z-index: 160;
        height: 56px; padding: 0 14px;
        background: linear-gradient(180deg, #0d0d0d, #1a1a1a);
        border-bottom: 1px solid rgba(201,168,76,0.25);
    }
    .admin-topbar .tb-btn {
        background: none; border: 1px solid rgba(255,255,255,0.22); border-radius: 8px;
        color: #fff; font-size: 13px; padding: 6px 12px; cursor: pointer;
        display: inline-flex; align-items: center; gap: 6px;
    }
    .admin-topbar .tb-title { font-size: 14px; font-weight: 700; color: var(--gold); }
    .sidebar-overlay.open {
        display: block; position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 190;
    }
    /* جدول‌های پنل در موبایل: تبدیل به حالت عمودی (کارت‌وار) — هر سطر یک کارت، برچسب ستون بالای مقدار */
    .table-responsive {
        max-width: 100%;
        overflow: visible;
        -webkit-overflow-scrolling: touch;
    }
    .table-responsive table {
        width: 100%;
        display: block;
    }
    .table-responsive thead {
        display: none;
    }
    .table-responsive tbody {
        display: block;
        width: 100%;
    }
    .table-responsive tbody tr {
        display: block;
        width: 100%;
        margin-bottom: 12px;
        padding: 4px 14px;
        background: #ffffff;
        border: 1px solid var(--border);
        border-radius: 12px;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    }
    .table-responsive tbody tr td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        width: 100%;
        padding: 9px 0;
        border: none;
        border-bottom: 1px dashed var(--border);
        text-align: right;
        white-space: normal;
        font-size: 14px;
    }
    .table-responsive tbody tr td:last-child {
        border-bottom: none;
    }
    .table-responsive tbody tr td::before {
        content: attr(data-label);
        flex-shrink: 0;
        font-size: 12px;
        font-weight: 700;
        color: var(--text-light);
    }
    /* ردیف «هیچ رکوردی وجود ندارد» یک ستون است؛ حالت عادی بماند */
    .table-responsive tbody tr.no-data td {
        display: block;
        text-align: center;
    }
    .table-responsive tbody tr.no-data td::before {
        content: none;
    }
    .table-responsive::-webkit-scrollbar { height: 6px; }
    .table-responsive::-webkit-scrollbar-thumb { background: rgba(201,168,76,0.5); border-radius: 4px; }
    /* تمام چیدمان‌های چندستونه پنل (فرم‌ها، فهرست‌ها، تنظیمات) در موبایل عمودی می‌شوند */
    .admin-main [style*="grid-template-columns"]:not(.stats-grid) { grid-template-columns: 1fr !important; }
    .admin-main .form-grid { grid-template-columns: 1fr !important; }
    .admin-main .stats-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
    .admin-main .stats-grid .stat-card { padding: 14px 10px; }
    .admin-main .stats-grid .stat-icon { font-size: 22px; }
    .admin-main .stats-grid .stat-value { font-size: 18px; }
    /* فاصلهٔ مودال در موبایل */
    .modal-content { margin: 10px; padding: 20px 16px; max-height: calc(100vh - 20px); overflow-y: auto; }
}

@media print {
    header, footer, .admin-link, .sidebar, nav, .btn, .no-print { display: none !important; }
    body { background: #fff; }
    .print-area { margin: 0; padding: 20px; }
}

/* دکمه علاقه‌مندی (قلب) روی کارت محصول */
.wish-btn {
    position: absolute; top: 12px; left: 12px; z-index: 3;
    width: 38px; height: 38px; border-radius: 50%;
    border: none; background: rgba(255, 255, 255, 0.94); color: #b9b9b9;
    font-size: 18px; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s, color 0.2s, background 0.2s;
}
.wish-btn:hover { transform: scale(1.12); color: #e0245e; }
.wish-btn.active { color: #e0245e; background: #fff1f5; }
