/* ==============================================
   TABLE OF CONTENTS
   - Variables & Theme
   - Reset & Base
   - Typography
   - Layout (Container, Grid)
   - Header & Navigation
   - Mobile Menu
   - Hero Section
   - Book Cards
   - Category Page (Accordion)
   - Footer
   - Utility Classes
   - Responsive (Media Queries)
   ============================================== */

/* ========== VARIABLES & THEME ========== */
:root {
    --bg: #f5f7f5;
    --surface: #ffffff;
    --surface-alt: #edf0ed;
    --text: #1e2e1e;
    --text-secondary: #5c6b5c;
    --primary: #0b7b4c;
    --primary-hover: #076b3f;
    --primary-light: #e6f4ec;
    --accent: #b68b2e;
    --accent-hover: #9a7425;
    --success: #0b7b4c;
    --danger: #d32f2f;
    --warning: #f59e0b;
    --border: #d6dbd6;
    --border-light: #e8ede8;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 2px 6px rgba(0,0,0,0.04);
    --shadow-md: 0 8px 20px rgba(0,0,0,0.06);
    --transition: 0.25s ease;
    --header-height: 72px;
}

[data-theme="dark"] {
    --bg: #141a14;
    --surface: #1e2a1e;
    --surface-alt: #1a241a;
    --text: #e0e8e0;
    --text-secondary: #9aaa9a;
    --primary: #2ecc71;
    --primary-hover: #27ae60;
    --primary-light: #0a2a1a;
    --accent: #f1c40f;
    --accent-hover: #d4ac0d;
    --border: #324032;
    --border-light: #283228;
}

/* ========== RESET & BASE ========== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.7;
    transition: background-color 0.3s, color 0.3s;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========== TYPOGRAPHY ========== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 800;
    line-height: 1.3;
}

/* ========== LAYOUT ========== */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 60px 0;
}

.section-title {
    font-size: 1.8em;
    font-weight: 800;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 2px;
    background: var(--border);
    margin-right: 16px;
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
}

/* ========== HEADER & NAVIGATION ========== */
.header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.logo {
    font-size: 1.8em;
    font-weight: 900;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.logo:hover {
    color: var(--primary-hover);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-nav a {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 4px 8px;
    border-radius: 50px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85em;
    transition: var(--transition);
    background: transparent;
}

.main-nav a:hover,
.main-nav a.active {
    background: var(--primary-light);
    color: var(--primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-icon {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 16px;
    border-radius: 50px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1.4;
}

.btn-icon:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.cart-count {
    background: var(--danger);
    color: #fff;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    font-size: 0.7em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* ========== MOBILE MENU ========== */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    color: var(--text);
    font-size: 1.6em;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: var(--header-height);
    right: 0;
    left: 0;
    bottom: 0;
    background: var(--surface);
    z-index: 99;
    padding: 20px;
    overflow-y: auto;
    border-top: 1px solid var(--border);
    flex-direction: column;
    gap: 8px;
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu a {
    display: block;
    padding: 14px 16px;
    background: var(--surface-alt);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-weight: 600;
    border: 1px solid transparent;
}

.mobile-menu a:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

/* ========== HERO SECTION ========== */
.hero {
    background: linear-gradient(135deg, #e6f4ec 0%, #f0f7f2 50%, #fcfdfc 100%);
    padding: 80px 24px;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
}

[data-theme="dark"] .hero {
    background: linear-gradient(135deg, #0a1a10 0%, #0f1f15 50%, #141a14 100%);
}

.hero h1 {
    font-size: 3em;
    font-weight: 900;
    margin-bottom: 16px;
    letter-spacing: -1px;
    color: var(--text);
}

.hero h1 span {
    color: var(--primary);
}

.hero p {
    font-size: 1.2em;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.search-box-hero {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.search-box-hero input {
    flex: 1;
    padding: 16px 24px;
    border: none;
    background: transparent;
    color: var(--text);
    font-family: inherit;
    font-size: 1.05em;
    outline: none;
}

.search-box-hero button {
    padding: 16px 32px;
    background: var(--primary);
    color: #fff;
    border: none;
    font-family: inherit;
    font-weight: 700;
    font-size: 1.05em;
    cursor: pointer;
    transition: var(--transition);
}

.search-box-hero button:hover {
    background: var(--primary-hover);
}

/* ========== BOOK CARDS ========== */
.book-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow);
    position: relative;
    display: flex;
    flex-direction: column;
}

.book-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.book-card .cover {
    aspect-ratio: 3/4;
    background: var(--surface-alt);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-card .cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-card .cover .no-cover {
    font-size: 3em;
    color: var(--text-secondary);
    opacity: 0.6;
}

.book-card .info {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.book-card .info h3 {
    font-size: 1em;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-card .info h3 a {
    color: var(--text);
}

.book-card .info h3 a:hover {
    color: var(--primary);
}

.book-card .author {
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-bottom: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.book-card .meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82em;
    color: var(--text-secondary);
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.book-card .price {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1em;
}

.book-card .free {
    color: var(--success);
    font-weight: 700;
}

.badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.7em;
    font-weight: 700;
    z-index: 2;
    box-shadow: var(--shadow);
}

.badge-new {
    background: var(--primary);
    color: #fff;
}

.badge-free {
    background: var(--accent);
    color: #000;
}

.badge-popular {
    background: var(--warning);
    color: #000;
}

/* ========== CATEGORY PAGE ========== */
.minimal-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.minimal-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.back-link {
    color: var(--text-secondary);
    font-weight: 600;
}

.page-title {
    margin: 40px 0 20px;
    font-size: 2em;
    font-weight: 800;
}

.category-search {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.category-search input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text);
    font-family: inherit;
    font-size: 1em;
    outline: none;
}

.category-list {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}

.category-item {
    border-bottom: 1px solid var(--border-light);
}

.category-item:last-child {
    border-bottom: none;
}

.category-header {
    padding: 16px 20px;
    cursor: pointer;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface);
    transition: var(--transition);
}

.category-header:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.category-header .arrow {
    transition: var(--transition);
    font-size: 0.8em;
}

.category-header.open .arrow {
    transform: rotate(180deg);
}

.subcategories {
    display: none;
    background: var(--surface-alt);
    padding: 10px 0;
}

.subcategories.open {
    display: block;
}

.subcategories a {
    display: block;
    padding: 10px 20px 10px 40px;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
}

.subcategories a:hover {
    background: var(--primary-light);
    color: var(--primary);
}

/* ========== FOOTER ========== */
.footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 50px 0 25px;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer h4 {
    margin-bottom: 12px;
    font-weight: 700;
}

.footer a {
    display: block;
    color: var(--text-secondary);
    padding: 4px 0;
    font-size: 0.9em;
}

.footer a:hover {
    color: var(--primary);
    padding-right: 4px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.85em;
}

/* ========== UTILITY CLASSES ========== */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .main-nav {
        display: none;
    }
    .hamburger {
        display: block;
    }
    .hero h1 {
        font-size: 2em;
    }
    .hero p {
        font-size: 1em;
    }
    .book-grid {
        grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
        gap: 16px;
    }
    .section-title {
        font-size: 1.4em;
    }
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .book-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero {
        padding: 50px 16px;
    }
    .hero h1 {
        font-size: 1.6em;
    }
    .container {
        padding: 0 16px;
    }
    .section {
        padding: 40px 0;
    }
}
/* ==============================================
   اضافات style.css - استایل‌های صفحه کتاب
   ============================================== */

/* چیدمان اصلی */
.book-layout { display: grid; grid-template-columns: 280px 1fr; gap: 30px; margin: 20px 0; }

/* کاور */
.book-cover-wrap { position: sticky; top: 90px; }
.book-cover-wrap img { width: 100%; border-radius: 12px; border: 1px solid var(--border); }

/* عنوان کتاب */
.book-title { font-size: 1.6em; font-weight: 900; margin: 0 0 5px 0; line-height: 1.4; }
.book-subtitle { color: var(--text-secondary); font-size: 0.9em; margin: 0 0 15px 0; }
.book-author { font-size: 1.05em; margin-bottom: 10px; }

/* امتیازدهی */
.book-rating { display: flex; align-items: center; gap: 8px; margin-bottom: 15px; flex-wrap: wrap; }
.book-rating .stars { color: #f59e0b; font-size: 1.2em; }

/* فرم امتیاز */
.rating-form-wrap {
    display: none;
    background: var(--bg-card);
    border: 1px solid var(--primary);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 15px;
}
.rating-form-wrap.active {
    display: block;
}
.rating-form-inner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ستاره‌ها */
.star-rating { display: flex; gap: 4px; direction: ltr; font-size: 1.8em; }
.star-rating label { cursor: pointer; }

/* قیمت و خرید */
.book-price-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 18px; margin-bottom: 18px; }
.book-price-section .price { font-size: 1.5em; font-weight: 900; color: var(--primary); }
.book-price-section .old-price { text-decoration: line-through; color: var(--text-secondary); font-size: 0.9em; }
.badge-discount { font-size: 0.5em; background: var(--danger); color: #fff; padding: 2px 10px; border-radius: 20px; vertical-align: middle; }

/* دکمه خرید */
.btn-buy { display: block; width: 100%; padding: 14px; background: var(--primary); color: #fff; border: none; border-radius: 10px; font-size: 1.05em; font-family: inherit; font-weight: 600; cursor: pointer; text-align: center; text-decoration: none; }

/* جدول مشخصات */
.specs-table { width: 100%; border-collapse: collapse; margin: 15px 0; }
.specs-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 0.9em; }
.specs-table td:first-child { color: var(--text-secondary); width: 120px; font-weight: 600; }

/* بخش‌های صفحه */
.section-block { margin-bottom: 30px; }
.section-block h2 { font-size: 1.3em; margin-bottom: 15px; padding-bottom: 8px; border-bottom: 2px solid var(--primary); display: inline-block; }

/* ترجمه */
.translation-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 18px; }
.translation-box.has { border-color: var(--primary); }

/* واکنش‌گرایی */
@media (max-width: 768px) {
    .book-layout { grid-template-columns: 1fr; gap: 20px; }
    .book-cover-wrap { max-width: 200px; margin: 0 auto; position: static; }
    .book-title { font-size: 1.3em; }
    .specs-table td:first-child { width: 90px; }
}
/* ==============================================
   صفحه کتاب
   ============================================== */

   .book-layout { display: grid; grid-template-columns: 280px 1fr; gap: 30px; margin: 20px 0; }
   .book-cover-wrap { position: sticky; top: 90px; }
   .book-cover-wrap img { width: 100%; border-radius: 12px; border: 1px solid var(--border); }
   .book-cover-placeholder { aspect-ratio: 3/4; background: var(--bg-card); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 5em; }
   .book-title { font-size: 1.6em; font-weight: 900; margin: 0 0 5px 0; line-height: 1.4; }
   .book-subtitle { color: var(--text-secondary); font-size: 0.9em; margin: 0 0 15px 0; }
   .book-author { font-size: 1.05em; margin-bottom: 10px; }
   .book-rating { display: flex; align-items: center; gap: 8px; margin-bottom: 15px; flex-wrap: wrap; }
   .book-rating .stars { color: #f59e0b; font-size: 1.2em; }
   .rating-text { color: var(--text-secondary); font-size: 0.9em; }
   .btn-rate { background: var(--bg-card); border: 1px solid var(--primary); color: var(--primary); padding: 4px 12px; border-radius: 20px; cursor: pointer; font-family: inherit; font-size: 0.82em; }
   .rating-form-wrap {
    display: none;
    background: var(--bg-card);
    border: 1px solid var(--primary);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 15px;
}
   .rating-form-inner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
   .star-rating { display: flex; gap: 4px; direction: ltr; font-size: 1.8em; }
   .star-rating label { cursor: pointer; }
   .star-rating input[type="radio"] { display: none; }
   .btn-submit { background: var(--primary); color: #fff; border: none; padding: 8px 18px; border-radius: 8px; cursor: pointer; font-family: inherit; }
   
   .book-price-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 18px; margin-bottom: 18px; }
   .book-price-section .price { font-size: 1.5em; font-weight: 900; color: var(--primary); margin: 0; }
   .book-price-section .price.free { color: var(--success); }
   .book-price-section .old-price { text-decoration: line-through; color: var(--text-secondary); font-size: 0.9em; margin: 0 0 5px 0; }
   .badge-discount { font-size: 0.5em; background: var(--danger); color: #fff; padding: 2px 10px; border-radius: 20px; vertical-align: middle; }
   .btn-buy { display: block; width: 100%; padding: 14px; background: var(--primary); color: #fff; border: none; border-radius: 10px; font-size: 1.05em; font-family: inherit; font-weight: 600; cursor: pointer; text-align: center; text-decoration: none; margin-top: 12px; }
   
   .section-block { margin-bottom: 30px; }
   .section-block h2 { font-size: 1.3em; margin-bottom: 15px; padding-bottom: 8px; border-bottom: 2px solid var(--primary); display: inline-block; }
   .section-content { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; line-height: 2.1; }
   
   .specs-table { width: 100%; border-collapse: collapse; margin: 0; }
   .specs-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 0.9em; }
   .specs-table td:first-child { color: var(--text-secondary); width: 120px; font-weight: 600; }
   
   .translation-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 18px; text-align: center; }
   .translation-box.has { border-color: var(--primary); text-align: right; }
   .translation-box h4 { margin: 0 0 10px 0; }
   .translation-price { font-size: 1.2em; font-weight: 700; color: var(--primary); margin-bottom: 10px; }
   .translation-na { color: var(--text-secondary); }
   
   .review-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin-bottom: 10px; }
   .review-header { display: flex; justify-content: space-between; margin-bottom: 6px; }
   .review-stars { color: #f59e0b; }
   .review-text { font-size: 0.9em; margin: 0; }
   
   .no-data { color: var(--text-secondary); text-align: center; padding: 25px; }
   .not-found { text-align: center; padding: 80px 20px; }
   
   @media (max-width: 768px) {
       .book-layout { grid-template-columns: 1fr; gap: 20px; }
       .book-cover-wrap { max-width: 200px; margin: 0 auto; position: static; }
       .book-title { font-size: 1.3em; }
       .specs-table td:first-child { width: 90px; }
   }
   
   /* ==============================================
      صفحه لاگین
      ============================================== */
   
   .hero-small { padding: 50px 24px; }
   .hero-small h1 { font-size: 2em; }
   
   .auth-container { max-width: 450px; margin: 30px auto; }
   .auth-error { background: rgba(239,68,68,0.1); border: 1px solid var(--danger); color: var(--danger); padding: 12px 16px; border-radius: 10px; margin-bottom: 20px; font-size: 0.9em; }
   .auth-tabs { display: flex; margin-bottom: 20px; background: var(--bg-card); border-radius: 12px; padding: 4px; }
   .auth-tab { flex: 1; text-align: center; padding: 10px; border-radius: 10px; text-decoration: none; color: var(--text); font-weight: 600; }
   .auth-tab.active { background: var(--primary); color: #fff; }
   .auth-form { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 24px; }
   .auth-field { margin-bottom: 15px; }
   .auth-field label { display: block; margin-bottom: 6px; font-weight: 600; }
   .auth-input { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text); font-family: inherit; font-size: 1em; }
   .auth-submit { width: 100%; padding: 14px; background: var(--primary); color: #fff; border: none; border-radius: 10px; font-size: 1.05em; font-family: inherit; font-weight: 600; cursor: pointer; }
   .auth-link { text-align: center; margin-top: 12px; font-size: 0.85em; color: var(--text-secondary); }
   .auth-info { text-align: center; margin-top: 15px; font-size: 0.85em; color: var(--text-secondary); }
   /* ==============================================
   صفحه جستجو
   ============================================== */

/* هدر جستجو */
.hero-search {
    padding: 40px 24px;
}

/* هدر نتایج */
.search-header {
    margin-bottom: 20px;
}
.search-header h2 {
    font-size: 1.2em;
    margin-bottom: 5px;
}
.search-header span {
    color: var(--primary);
}
.search-header p {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin: 0;
}

/* چیپ‌های فیلتر */
.search-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}
.filter-chip {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: var(--transition);
    white-space: nowrap;
}
.filter-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.filter-chip.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* صفحه‌بندی */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 30px 0;
}
.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 0.9em;
    font-weight: 600;
    text-decoration: none;
    color: var(--text);
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: var(--transition);
}
.page-link:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.page-link.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.page-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--text-secondary);
}

/* بدون نتیجه */
.no-results {
    text-align: center;
    padding: 80px 20px;
}
.no-results-icon {
    font-size: 4em;
    margin-bottom: 15px;
}
.no-results-text {
    font-size: 1.2em;
    color: var(--text);
    margin-bottom: 10px;
}
.no-results-hint {
    color: var(--text-secondary);
    margin-top: 10px;
}
.no-results-action {
    margin-top: 30px;
}
/* ==============================================
   صفحه جستجو
   ============================================== */
   .search-header { margin-bottom: 20px; }
   .search-header h2 { font-size: 1.4em; margin-bottom: 5px; }
   .search-header h2 span { color: var(--primary); }
   .search-count { color: var(--text-secondary); font-size: 0.9em; }
   
   .no-results { text-align: center; padding: 80px 20px; color: var(--text-secondary); }
   .no-results-icon { font-size: 4em; margin-bottom: 20px; }
   .no-results p { font-size: 1.2em; margin-bottom: 10px; }
   /* ==============================================
   مودال
   ============================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
}
.modal-content {
    background: var(--surface);
    margin: 10% auto;
    padding: 25px 30px;
    border-radius: var(--radius-lg);
    max-width: 450px;
    box-shadow: var(--shadow-lg);
    position: relative;
    color: var(--text);
}
.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 1.5em;
    cursor: pointer;
    color: var(--text-secondary);
}
.modal-close:hover { color: var(--danger); }
#modalLoading { text-align: center; padding: 20px; }
#modalResult p { margin-bottom: 10px; }
/* ==============================================
   بخش ترجمه (طراحی رسمی و کاربرپسند)
   ============================================== */
   .translation-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 18px;
}
.translation-box.has {
    border-color: var(--success);
    border-left: 4px solid var(--success);
}
.translation-box.request {
    border-color: var(--primary);
    border-left: 4px solid var(--primary);
}
.translation-box.unavailable {
    border-color: var(--border);
    opacity: 0.8;
}

.translation-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.translation-header h4 {
    margin: 0;
    font-size: 1.1em;
    font-weight: 700;
}
.translation-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
}
.translation-box.has .translation-badge {
    background: rgba(34,197,94,0.1);
    color: var(--success);
}
.translation-box.request .translation-badge {
    background: rgba(99,102,241,0.1);
    color: var(--primary);
}

.translation-description {
    font-size: 0.9em;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.translation-price-details {
    background: var(--bg);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 15px;
}
.translation-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
}
.translation-price-label {
    font-weight: 600;
    color: var(--text);
}
.translation-price {
    font-size: 1.3em;
    font-weight: 900;
    color: var(--primary);
}
.translation-meta {
    font-size: 0.8em;
    color: var(--text-secondary);
    margin: 5px 0 0 0;
}
.translation-na {
    color: var(--text-secondary);
    text-align: center;
    padding: 10px;
    margin: 0;
}
.alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.95em;
    font-weight: 600;
}
.alert-error {
    background: rgba(239,68,68,0.1);
    border: 1px solid var(--danger);
    color: var(--danger);
}
.alert-success {
    background: rgba(34,197,94,0.1);
    border: 1px solid var(--success);
    color: var(--success);
}
/* چک‌باکس ترجمه */
.translation-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 15px 0;
    font-size: 0.9em;
    color: var(--text-secondary);
}
.translation-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 3px;
    cursor: pointer;
    accent-color: var(--primary);
}
.translation-checkbox label {
    cursor: pointer;
    line-height: 1.6;
}
/* چک‌باکس درخواست ترجمه */
.translation-checkbox-section {
    margin: 15px 0;
}
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 600;
    color: var(--primary);
    font-size: 0.95em;
}
.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}
.translation-price-combined {
    background: var(--bg);
    border: 1px solid var(--primary);
    border-radius: 10px;
    padding: 14px 16px;
    margin-top: 12px;
}
.combined-price-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.1em;
    font-weight: 700;
    flex-wrap: wrap;
}
.combined-price-row .plus,
.combined-price-row .equals {
    color: var(--text-secondary);
}
.combined-price-row .total-combined {
    font-size: 1.3em;
    color: var(--primary);
}
.translation-meta {
    text-align: center;
    font-size: 0.8em;
    color: var(--text-secondary);
    margin: 8px 0 0 0;
}

/* ==============================================
   صفحه سبد خرید
   ============================================== */

/* سبد خالی */
.empty-cart { text-align: center; padding: 80px 20px; }
.empty-cart-icon { font-size: 5em; margin-bottom: 20px; }
.empty-cart h2 { font-size: 1.5em; margin-bottom: 10px; }
.empty-cart p { color: var(--text-secondary); margin-bottom: 20px; }

/* چینش کلی */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
    align-items: start;
    margin-bottom: 50px;
}

.cart-title, .summary-title {
    font-size: 1.3em;
    font-weight: 800;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
}

/* آیتم سبد */
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 16px;
    margin-bottom: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: var(--transition);
}
.cart-item:hover { border-color: var(--primary); }

.cart-item-details { display: flex; gap: 15px; align-items: center; }

.cart-item-cover {
    width: 60px;
    height: 85px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg);
}
.cart-item-cover img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    color: var(--text-secondary);
}

.cart-item-info h3 { font-size: 0.95em; margin: 0 0 5px 0; }
.cart-item-info h3 a { color: var(--text); }
.cart-item-info h3 a:hover { color: var(--primary); }
.cart-item-type,
.cart-item-format {
    font-size: 0.8em;
    color: var(--text-secondary);
    display: inline-block;
    margin-left: 8px;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}
.cart-item-price {
    font-weight: 700;
    color: var(--primary);
    font-size: 1em;
    white-space: nowrap;
}
.btn-remove {
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 1.1em;
    transition: var(--transition);
    color: var(--text-secondary);
}
.btn-remove:hover {
    background: rgba(239,68,68,0.1);
    border-color: var(--danger);
    color: var(--danger);
}

/* خلاصه سفارش */
.cart-summary {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    position: sticky;
    top: 100px;
}

.summary-rows { margin-bottom: 20px; }
.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 0.95em;
    border-bottom: 1px solid var(--border-light);
}
.summary-row.discount { color: var(--success); }
.summary-row.total {
    font-weight: 800;
    font-size: 1.1em;
    border-bottom: none;
    padding-top: 14px;
    margin-top: 4px;
    border-top: 2px solid var(--primary);
    color: var(--primary);
}

/* کد تخفیف */
.coupon-form {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}
.coupon-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-family: inherit;
    font-size: 0.9em;
}
.coupon-input:focus { outline: none; border-color: var(--primary); }
.btn-coupon {
    padding: 10px 16px;
    background: var(--bg);
    border: 1px solid var(--primary);
    color: var(--primary);
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9em;
    white-space: nowrap;
    transition: var(--transition);
}
.btn-coupon:hover { background: var(--primary); color: #fff; }

.coupon-message { font-size: 0.85em; margin: 5px 0 0 0; }
.coupon-message.error { color: var(--danger); }
.coupon-message.success { color: var(--success); }

/* دکمه تسویه */
.btn-checkout {
    display: block;
    width: 100%;
    padding: 14px;
    margin-top: 20px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1.05em;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: var(--transition);
}
.btn-checkout:hover { background: var(--primary-hover); transform: translateY(-1px); color: #fff;}

/* واکنش‌گرایی */
@media (max-width: 768px) {
    .cart-layout { grid-template-columns: 1fr; }
    .cart-summary { position: static; }
    .cart-item { flex-direction: column; align-items: flex-start; }
    .cart-item-actions { width: 100%; justify-content: space-between; }
}
.btn-buy:disabled,
.btn-buy.disabled {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    cursor: not-allowed;
    opacity: 0.7;
}
/* ==============================================
   صفحه تسویه حساب
   ============================================== */

   .checkout-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
    align-items: start;
    margin-bottom: 50px;
}

.checkout-title, .summary-title {
    font-size: 1.3em;
    font-weight: 800;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
}

.checkout-subtitle {
    font-size: 1.1em;
    font-weight: 700;
    margin: 25px 0 15px;
}

/* فرم اطلاعات کاربر */
.checkout-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.checkout-user-info {
    background: var(--bg);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
}
.checkout-user-info p { margin: 5px 0; }

.form-field { margin-bottom: 15px; }
.form-field label { display: block; margin-bottom: 6px; font-weight: 600; }
.required { color: var(--danger); }
.form-field input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
    font-family: inherit;
    font-size: 1em;
}
.form-field input:focus { outline: none; border-color: var(--primary); }

/* لیست اقلام در تسویه */
.checkout-items { margin-bottom: 20px; }
.checkout-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.95em;
}
.checkout-item-type {
    color: var(--text-secondary);
    font-size: 0.85em;
}

/* مبلغ نهایی */
.checkout-total {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid var(--primary);
}
.checkout-total .summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}
.checkout-total .summary-row.total {
    font-weight: 800;
    font-size: 1.2em;
    color: var(--primary);
}
.checkout-total .summary-row.discount { color: var(--success); }

/* دکمه ثبت */
.btn-checkout-submit {
    width: 100%;
    padding: 16px;
    margin-top: 20px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.1em;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}
.btn-checkout-submit:hover { background: var(--primary-hover); }

/* خلاصه کنار صفحه */
.checkout-summary {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    position: sticky;
    top: 100px;
}

.checkout-notes {
    margin-top: 20px;
    font-size: 0.85em;
    color: var(--text-secondary);
    line-height: 1.8;
}

@media (max-width: 768px) {
    .checkout-layout { grid-template-columns: 1fr; }
    .checkout-summary { position: static; }
}
/* ==============================================
   صفحات پرداخت (موفق / ناموفق)
   ============================================== */
   .payment-result {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 40px 20px;
}

.payment-result-card {
    background: var(--bg-card);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    padding: 50px 40px;
    text-align: center;
    max-width: 550px;
    width: 100%;
    animation: fadeInUp 0.5s ease;
}

.payment-result-card.success {
    border-top: 4px solid var(--success);
}

.payment-result-card.failed {
    border-top: 4px solid var(--danger);
}

.payment-result-icon {
    font-size: 4.5rem;
    margin-bottom: 20px;
    line-height: 1;
}

.payment-result-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.payment-result-code {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.payment-result-amount {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 25px;
    color: var(--primary);
}

.payment-result-message {
    color: var(--text-secondary);
    margin-bottom: 25px;
    font-size: 1.05rem;
    line-height: 1.8;
}

/* لیست دانلود */
.payment-downloads {
    margin: 25px 0;
    text-align: right;
    background: var(--bg);
    border-radius: 14px;
    padding: 20px;
}

.payment-downloads-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-align: center;
}

.payment-downloads-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.payment-download-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-card);
    border-radius: 10px;
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.payment-download-item:hover {
    border-color: var(--primary);
}

.payment-download-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.payment-download-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.payment-download-type {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.btn-download-link {
    display: inline-block;
    padding: 8px 20px;
    background: var(--primary);
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-download-link:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    color: #fff;
}

/* دکمه‌های اقدام */
.payment-result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* انیمیشن */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* واکنش‌گرایی */
@media (max-width: 600px) {
    .payment-result-card {
        padding: 30px 20px;
    }
    .payment-result-title {
        font-size: 1.4rem;
    }
    .payment-download-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* ==============================================
   پنل کاربری - چیدمان کلی
   ============================================== */
   .panel-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: start;
    margin: 30px 0 50px;
}

/* ==============================================
   Sidebar
   ============================================== */
.panel-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    position: sticky;
    top: 90px;
}

.panel-user-info {
    padding: 24px 20px;
    text-align: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #fff;
}

.panel-user-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
    font-weight: 700;
    margin: 0 auto 12px;
    border: 2px solid rgba(255,255,255,0.3);
}

.panel-user-name {
    font-size: 1.1em;
    font-weight: 700;
    margin: 0 0 4px 0;
}

.panel-user-phone {
    font-size: 0.85em;
    opacity: 0.9;
    margin: 0;
    direction: ltr;
}

.panel-nav {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.panel-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.panel-nav-item:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.panel-nav-item.active {
    background: var(--primary);
    color: #fff;
}

.panel-nav-item .nav-icon {
    font-size: 1.2em;
    width: 24px;
    text-align: center;
}

.panel-nav-logout {
    margin-top: 8px;
    border-top: 1px solid var(--border);
    padding-top: 16px;
    border-radius: 0;
    color: var(--text-secondary);
}

.panel-nav-logout:hover {
    color: var(--danger);
    background: rgba(239,68,68,0.05);
}

/* ==============================================
   محتوای اصلی پنل
   ============================================== */
.panel-content h2 {
    font-size: 1.4em;
    margin-bottom: 20px;
}

.panel-welcome {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 24px;
}

.panel-welcome h2 {
    margin: 0 0 6px 0;
    font-size: 1.3em;
}

.panel-welcome p {
    color: var(--text-secondary);
    margin: 0;
}

/* کارت‌های آمار */
.panel-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.panel-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}

.panel-stat-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.panel-stat-icon {
    font-size: 2em;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    border-radius: 12px;
}

.panel-stat-content {
    display: flex;
    flex-direction: column;
}

.panel-stat-number {
    font-size: 1.5em;
    font-weight: 800;
    color: var(--primary);
}

.panel-stat-label {
    font-size: 0.85em;
    color: var(--text-secondary);
}

/* بخش‌ها */
.panel-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.panel-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.panel-section-header h3 {
    font-size: 1.1em;
    margin: 0;
}

.panel-section-link {
    font-size: 0.85em;
    font-weight: 600;
}

/* جدول */
.panel-table-wrap {
    overflow-x: auto;
}

.panel-table {
    width: 100%;
    border-collapse: collapse;
}

.panel-table th {
    text-align: right;
    padding: 12px 14px;
    font-size: 0.85em;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.panel-table td {
    padding: 14px;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.9em;
}

.panel-table tr:hover td {
    background: var(--bg);
}

.order-code {
    font-family: monospace;
    font-weight: 600;
    direction: ltr;
    text-align: left;
}

.order-price {
    font-weight: 600;
    white-space: nowrap;
}

.btn-link {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85em;
    text-decoration: none;
}

.btn-link:hover {
    text-decoration: underline;
}

/* وضعیت‌ها */
.badge-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    white-space: nowrap;
}

.badge-status.success {
    background: rgba(34,197,94,0.1);
    color: var(--success);
}

.badge-status.pending {
    background: rgba(245,158,11,0.1);
    color: var(--warning);
}

.badge-status.failed {
    background: rgba(239,68,68,0.1);
    color: var(--danger);
}

.badge-status.refunded {
    background: rgba(148,163,184,0.1);
    color: var(--text-secondary);
}

/* حالت خالی */
.panel-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.panel-empty-icon {
    font-size: 3em;
    margin-bottom: 12px;
}

.panel-empty p {
    margin-bottom: 16px;
}

/* ==============================================
   واکنش‌گرایی پنل
   ============================================== */
@media (max-width: 768px) {
    .panel-layout {
        grid-template-columns: 1fr;
    }
    .panel-sidebar {
        position: static;
    }
    .panel-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .panel-stats-grid {
        grid-template-columns: 1fr;
    }
    .panel-table th:nth-child(2),
    .panel-table td:nth-child(2) {
        display: none;
    }
}

/* ==============================================
   فرم پروفایل
   ============================================== */
   .profile-form {
    margin-top: 20px;
}

.profile-form .form-field {
    margin-bottom: 18px;
}

.profile-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.profile-form input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
    font-family: inherit;
    font-size: 1em;
}

.profile-form input:focus {
    outline: none;
    border-color: var(--primary);
}

.profile-form input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.field-hint {
    display: block;
    margin-top: 4px;
    font-size: 0.8em;
    color: var(--text-secondary);
}
/* ==============================================
   پنل مدیریت - استایل‌های تکمیلی
   ============================================== */

   .admin-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    align-items: start;
    margin: 30px 0 50px;
}

.admin-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    position: sticky;
    top: 90px;
}

.admin-sidebar-header {
    padding: 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #fff;
    text-align: center;
}

.admin-sidebar-header h3 {
    margin: 0;
    font-size: 1.1em;
}

.admin-nav {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9em;
    transition: var(--transition);
}

.admin-nav-item:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.admin-nav-item.active {
    background: var(--primary);
    color: #fff;
}

.admin-nav-logout {
    margin-top: 8px;
    border-top: 1px solid var(--border);
    padding-top: 16px;
    border-radius: 0;
    color: var(--text-secondary);
}

.admin-nav-logout:hover {
    color: var(--danger);
    background: rgba(239,68,68,0.05);
}

.admin-content {
    min-width: 0;
}

.admin-welcome {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 24px;
}

.admin-welcome h2 {
    margin: 0 0 6px 0;
    font-size: 1.3em;
}

.admin-welcome p {
    color: var(--text-secondary);
    margin: 0;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.admin-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}

.admin-stat-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.admin-stat-icon {
    font-size: 2em;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    border-radius: 12px;
}

.admin-stat-content {
    display: flex;
    flex-direction: column;
}

.admin-stat-number {
    font-size: 1.5em;
    font-weight: 800;
    color: var(--primary);
}

.admin-stat-label {
    font-size: 0.85em;
    color: var(--text-secondary);
}

.admin-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.admin-section h2 {
    font-size: 1.2em;
    margin-bottom: 16px;
}

.admin-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-section-header h2 {
    margin: 0;
}

.admin-table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    text-align: right;
    padding: 12px 14px;
    font-size: 0.85em;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.admin-table td {
    padding: 14px;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.9em;
    vertical-align: middle;
}

.admin-table tr:hover td {
    background: var(--bg);
}

.book-title-cell {
    font-weight: 600;
}

.table-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8em;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-danger {
    background: rgba(239,68,68,0.1);
    color: var(--danger);
    border: 1px solid var(--danger);
}

.btn-danger:hover {
    background: var(--danger);
    color: #fff;
}

.admin-filter-form {
    margin-bottom: 20px;
}

.filter-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
    font-family: inherit;
    font-size: 0.9em;
}

.filter-input:focus {
    outline: none;
    border-color: var(--primary);
}

.filter-select {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
    font-family: inherit;
    font-size: 0.9em;
    cursor: pointer;
}

.admin-form .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.admin-form .form-col label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.9em;
}

.admin-form .form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-family: inherit;
    font-size: 0.95em;
}

.admin-form .form-input:focus {
    outline: none;
    border-color: var(--primary);
}

.admin-form textarea.form-input {
    resize: vertical;
    min-height: 100px;
}

.form-fieldset {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
}

.form-fieldset legend {
    font-weight: 700;
    padding: 0 10px;
    font-size: 0.95em;
}

.admin-income-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.admin-income-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
}

.income-label {
    display: block;
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.income-value {
    font-size: 1.1em;
    font-weight: 700;
    color: var(--primary);
}

.admin-quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.admin-quick-link {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 0.9em;
    transition: var(--transition);
}

.admin-quick-link:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.quick-icon {
    font-size: 1.5em;
}

.admin-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.detail-item {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
}

.detail-label {
    display: block;
    font-size: 0.8em;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.detail-value {
    font-weight: 600;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.review-admin-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
}

.review-admin-card.pending-review {
    border-right: 3px solid var(--warning);
}

.review-admin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.review-book-title {
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-right: 8px;
}

.review-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.review-rating {
    font-size: 0.9em;
}

.review-admin-text {
    font-size: 0.95em;
    line-height: 1.7;
    margin: 8px 0;
}

.review-admin-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8em;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-light);
    padding-top: 10px;
}

.subcategory-row {
    background: var(--bg);
}

.import-hint {
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

@media (max-width: 768px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }
    .admin-sidebar {
        position: static;
    }
    .admin-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .admin-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ==============================================
   صفحات استاتیک
   ============================================== */
   .static-page {
    max-width: 800px;
    margin: 30px auto 50px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px;
    line-height: 2;
}

.static-page h2 {
    font-size: 1.5em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
}

.static-page h3 {
    font-size: 1.1em;
    margin: 25px 0 10px;
    color: var(--primary);
}

.static-page p {
    margin-bottom: 10px;
}

.static-page ul {
    padding-right: 20px;
}

.static-page li {
    margin-bottom: 6px;
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin: 25px 0;
}

.contact-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.contact-icon {
    font-size: 2em;
    margin-bottom: 8px;
}

.contact-card h3 {
    margin: 0 0 6px 0;
    font-size: 1em;
}

.contact-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9em;
}

.contact-form {
    margin-top: 15px;
}

.contact-form .form-field {
    margin-bottom: 15px;
}

.contact-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
    font-family: inherit;
    font-size: 1em;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.faq-list {
    margin-top: 15px;
}

.faq-item {
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 15px;
}

.faq-item h3 {
    font-size: 1em;
    margin: 0 0 8px 0;
    color: var(--text);
}

.faq-item p {
    color: var(--text-secondary);
    margin: 0;
}

.not-found-page {
    text-align: center;
    padding: 60px 20px 80px;
}

.not-found-code {
    font-size: 6em;
    font-weight: 900;
    color: var(--primary);
    opacity: 0.3;
    line-height: 1;
}

.not-found-icon {
    font-size: 3em;
    margin: 15px 0;
}

.not-found-page h2 {
    margin-bottom: 10px;
}

.not-found-page p {
    color: var(--text-secondary);
    margin-bottom: 25px;
}

.not-found-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .static-page {
        padding: 20px;
    }
}
.already-rated {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(34,197,94,0.1);
    color: var(--success);
    border-radius: 20px;
    font-size: 0.82em;
    font-weight: 600;
}

.rating-text strong {
    color: var(--primary);
    font-size: 1.1em;
}

/* دکمه گزارش */
.book-report-section {
    margin-top: 15px;

}
.book-report-section *{
    font-family: inherit;
}
.book-report-section select{
    width: 200px;
}
.book-report-section textarea{
    width: 80%;
    min-width: 200px;
    padding: 5px;
}
.btn-report {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8em;
    transition: var(--transition);
    margin: 5px 0px 20px 0px;
}
.btn-report:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: rgba(239,68,68,0.05);
}

.report-form-wrap {
    display: none;
    background: var(--bg-card);
    border: 1px solid var(--danger);
    border-radius: 12px;
    padding: 16px;
    margin-top: 10px;
}
.report-form-wrap.active {
    display: block;
}
.btn-danger {
    background: rgba(239,68,68,0.1);
    color: var(--danger);
    border: 1px solid var(--danger);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: var(--transition);
}
.btn-danger:hover {
    background: var(--danger);
    color: #fff;
}

.search-no-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    min-height: 200px;
}

.search-no-cover .no-cover {
    font-size: 3em;
    color: var(--text-secondary);
    opacity: 0.5;
}


/* سایر فرمت‌ها */
.other-formats-list {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.other-format-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 18px;
    text-decoration: none;
    color: var(--text);
    transition: var(--transition);
}

.other-format-item:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.other-format-extension {
    font-weight: 700;
    color: var(--primary);
}

.other-format-size {
    font-size: 0.85em;
    color: var(--text-secondary);
}

/* بخش‌های جستجو */
.search-section {
    margin-bottom: 40px;
}

.search-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
}

.search-section-header h2 {
    font-size: 1.3em;
    margin: 0;
}

.search-section-count {
    background: var(--primary-light);
    color: var(--primary);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.archive-section .search-section-header {
    border-bottom-color: var(--warning);
}

.archive-notice {
    background: rgba(245,158,11,0.08);
    border: 1px solid rgba(245,158,11,0.2);
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 20px;
    font-size: 0.9em;
    color: var(--text-secondary);
}

.archive-notice p {
    margin: 0;
}

/* بج‌های وضعیت */
.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 700;
}

.status-badge.available {
    background: rgba(34,197,94,0.1);
    color: var(--success);
}

.status-badge.archive {
    background: rgba(245,158,11,0.1);
    color: var(--warning);
}

/* کارت آرشیو */
.search-card.archive {
    border-color: rgba(245,158,11,0.3);
}

.search-card.archive:hover {
    border-color: var(--warning);
}

.archive-link {
    background: rgba(245,158,11,0.1);
    color: var(--warning);
}

.archive-link:hover {
    background: var(--warning);
    color: #fff;
}

/* صفحه‌بندی */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.pagination-item,
.pagination-prev,
.pagination-next {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 600;
    transition: var(--transition);
    min-width: 40px;
}

.pagination-item:hover,
.pagination-prev:hover,
.pagination-next:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination-item.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.pagination-prev.disabled,
.pagination-next.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-dots {
    padding: 0 4px;
    color: var(--text-secondary);
}

@media (max-width: 480px) {
    .pagination-item,
    .pagination-prev,
    .pagination-next {
        padding: 6px 10px;
        font-size: 0.8em;
        min-width: 32px;
    }
}
/* ==============================================
   بخش مدیریت سریع ادمین
   ============================================== */
   .admin-quick-actions {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.admin-quick-actions h3 {
    margin: 0 0 16px 0;
    font-size: 1.1em;
    font-weight: 700;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.admin-action-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px 0;
}

.admin-action-label {
    min-width: 80px;
    font-size: 0.85em;
    font-weight: 600;
    color: #94a3b8;
}

.admin-blocked-reason {
    background: rgba(239,68,68,0.15);
    color: #fca5a5;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: 600;
}

/* دکمه‌های ادمین */
.admin-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.82em;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s ease;
    border: 1px solid transparent;
    white-space: nowrap;
}

.admin-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* فعال کردن */
.admin-btn-activate {
    background: rgba(34,197,94,0.15);
    color: #22c55e;
    border-color: rgba(34,197,94,0.3);
}
.admin-btn-activate:hover {
    background: rgba(34,197,94,0.25);
    color: #4ade80;
}

/* غیرفعال کردن */
.admin-btn-disable {
    background: rgba(239,68,68,0.15);
    color: #ef4444;
    border-color: rgba(239,68,68,0.3);
}
.admin-btn-disable:hover {
    background: rgba(239,68,68,0.25);
    color: #f87171;
}

/* ویرایش */
.admin-btn-edit {
    background: rgba(99,102,241,0.15);
    color: #818cf8;
    border-color: rgba(99,102,241,0.3);
}
.admin-btn-edit:hover {
    background: rgba(99,102,241,0.25);
    color: #a5b4fc;
}

/* افزودن به استثنا */
.admin-btn-add {
    background: rgba(245,158,11,0.15);
    color: #f59e0b;
    border-color: rgba(245,158,11,0.3);
}
.admin-btn-add:hover {
    background: rgba(245,158,11,0.25);
    color: #fbbf24;
}

/* حذف از استثنا */
.admin-btn-remove {
    background: rgba(148,163,184,0.15);
    color: #94a3b8;
    border-color: rgba(148,163,184,0.3);
}
.admin-btn-remove:hover {
    background: rgba(148,163,184,0.25);
    color: #cbd5e1;
}

/* نمایش کاور */
.admin-btn-show {
    background: rgba(34,197,94,0.15);
    color: #22c55e;
    border-color: rgba(34,197,94,0.3);
}
.admin-btn-show:hover {
    background: rgba(34,197,94,0.25);
    color: #4ade80;
}

/* مخفی کردن کاور */
.admin-btn-hide {
    background: rgba(239,68,68,0.15);
    color: #ef4444;
    border-color: rgba(239,68,68,0.3);
}
.admin-btn-hide:hover {
    background: rgba(239,68,68,0.25);
    color: #f87171;
}

/* تایید نویسنده */
.admin-btn-verify {
    background: rgba(34,197,94,0.15);
    color: #22c55e;
    border-color: rgba(34,197,94,0.3);
}
.admin-btn-verify:hover {
    background: rgba(34,197,94,0.25);
    color: #4ade80;
}

/* رد نویسنده */
.admin-btn-reject {
    background: rgba(239,68,68,0.15);
    color: #ef4444;
    border-color: rgba(239,68,68,0.3);
}
.admin-btn-reject:hover {
    background: rgba(239,68,68,0.25);
    color: #f87171;
}

/* لیست سیاه */
.admin-btn-block {
    background: rgba(239,68,68,0.1);
    color: #f87171;
    border-color: rgba(239,68,68,0.2);
    font-size: 0.78em;
    padding: 6px 12px;
}
.admin-btn-block:hover {
    background: rgba(239,68,68,0.2);
    color: #fca5a5;
}

/* ==============================================
   واکنش‌گرایی
   ============================================== */
@media (max-width: 768px) {
    .admin-quick-actions {
        padding: 16px;
    }
    .admin-action-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .admin-action-label {
        min-width: auto;
    }
    .admin-btn {
        width: 100%;
        justify-content: center;
    }
}

/* تب‌های فیلتر */
.filter-type-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-type-tab {
    padding: 8px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.85em;
    font-weight: 600;
    transition: var(--transition);
}

.filter-type-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-type-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* آیتم‌های فیلتر */
.filter-items-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 16px;
}

.filter-item-value {
    font-family: monospace;
    font-size: 0.9em;
    word-break: break-all;
}

/* ==============================================
   کارت نتایج جستجو - طراحی حرفه‌ای
   ============================================== */
   .search-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.search-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to left, var(--primary), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.search-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.search-card:hover::before {
    opacity: 1;
}

/* کارت آرشیو */
.search-card.archive {
    border-color: rgba(245,158,11,0.25);
}

.search-card.archive::before {
    background: linear-gradient(to left, var(--warning), transparent);
}

.search-card.archive:hover {
    border-color: var(--warning);
}

/* ==============================================
   بج‌ها
   ============================================== */
.search-card-badge {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.format-badge {
    background: var(--primary);
    color: #fff;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.72em;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.status-badge {
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.72em;
    font-weight: 700;
}

.status-badge.available {
    background: rgba(34,197,94,0.12);
    color: var(--success);
    border: 1px solid rgba(34,197,94,0.25);
}

.status-badge.archive {
    background: rgba(245,158,11,0.12);
    color: var(--warning);
    border: 1px solid rgba(245,158,11,0.25);
}

/* ==============================================
   عنوان
   ============================================== */
.search-card-title {
    font-size: 1.05em;
    font-weight: 800;
    line-height: 1.6;
    margin: 0;
}

.search-card-title a {
    color: var(--text);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.search-card-title a:hover {
    color: var(--primary);
}

/* ==============================================
   اطلاعات
   ============================================== */
.search-card-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.search-card-info > div {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.88em;
    line-height: 1.6;
}

.info-label {
    color: var(--text-secondary);
    font-weight: 600;
    white-space: nowrap;
    min-width: 78px;
    flex-shrink: 0;
}

.info-value {
    color: var(--text);
    word-break: break-word;
}

/* ==============================================
   لینک
   ============================================== */
.search-card-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.88em;
    text-decoration: none;
    transition: all 0.3s;
    margin-top: auto;
    border: 1px solid transparent;
}

.search-card-link:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-1px);
}

.archive-link {
    background: rgba(245,158,11,0.1);
    color: var(--warning);
}

.archive-link:hover {
    background: var(--warning);
    color: #fff;
}

/* ==============================================
   واکنش‌گرایی
   ============================================== */
@media (max-width: 768px) {
    .search-card {
        padding: 16px;
        gap: 12px;
    }
    .search-card-title {
        font-size: 0.95em;
    }
    .search-card-info > div {
        font-size: 0.82em;
    }
    .info-label {
        min-width: 65px;
    }
}

@media (max-width: 480px) {
    .search-card {
        padding: 14px;
    }
    .search-card-title {
        font-size: 0.9em;
    }
}
/* ============================================
   DMCA Page Styles
   ============================================ */

.dmca-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px 60px;
    line-height: 2;
    color: #444;
    text-align: left;
    direction: ltr;
}

.dmca-updated {
    font-size: 14px;
    color: #888;
    background: #f9f9f9;
    padding: 10px 15px;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 30px;
}

.dmca-heading {
    color: #222;
    font-size: 22px;
    font-weight: bold;
    margin: 40px 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.dmca-heading:first-of-type {
    margin-top: 10px;
}

.dmca-text {
    color: #444;
    font-size: 15px;
    line-height: 2;
    margin: 0 0 15px;
    text-align: justify;
}

.dmca-link {
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s ease;
}

.dmca-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

.dmca-code {
    background: #f1f1f1;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #d63384;
}

/* ---- Notice Box ---- */
.dmca-notice {
    background: #e8f4fd;
    border-left: 4px solid #2196f3;
    padding: 18px 22px;
    border-radius: 6px;
    margin: 25px 0;
    font-size: 15px;
    line-height: 1.9;
    color: #1565c0;
}

/* ---- Contact Box ---- */
.dmca-contact-box {
    background: #f9f9f9;
    padding: 20px 25px;
    border-radius: 8px;
    margin: 25px 0;
    border: 1px solid #eee;
}

.dmca-contact-item {
    margin: 0 0 12px;
    font-size: 15px;
    line-height: 1.8;
    color: #333;
}

.dmca-contact-item:last-child {
    margin-bottom: 0;
}

/* ---- Lists ---- */
.dmca-list {
    padding-left: 25px;
    margin: 15px 0 20px;
    color: #444;
    font-size: 15px;
    line-height: 2;
}

.dmca-list li {
    margin-bottom: 12px;
    padding-left: 5px;
}

.dmca-list li::marker {
    color: #667eea;
    font-weight: bold;
}

/* ---- Footer Note ---- */
.dmca-footer-note {
    margin-top: 50px;
    padding-top: 25px;
    border-top: 1px solid #eee;
    text-align: center;
}

.dmca-footer-note p {
    color: #999;
    font-size: 13px;
    margin: 0;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .dmca-container {
        padding: 25px 15px 40px;
    }

    .dmca-heading {
        font-size: 18px;
        margin-top: 30px;
    }

    .dmca-text,
    .dmca-list,
    .dmca-contact-item {
        font-size: 14px;
        line-height: 1.9;
    }

    .dmca-notice {
        padding: 15px 18px;
        font-size: 14px;
    }

    .dmca-contact-box {
        padding: 15px 18px;
    }
}
/* ============================================
   Book Meta Badge - Scanned with Text
   ============================================ */

.book-meta-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 18px;
}

.book-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.6;
    white-space: nowrap;
    transition: all 0.2s ease;
    cursor: default;
    user-select: none;
}

/* ---- Scanned Warning Badge ---- */
.book-badge-scanned {
    background: #fff8e6;
    color: #8a6d1a;
    border: 1px solid #f0d98a;
    box-shadow: 0 1px 2px rgba(240, 217, 138, 0.25);
}

.book-badge-scanned::before {
    content: "⚠";
    font-size: 13px;
    line-height: 1;
    opacity: 0.85;
    transform: translateY(-1px);
}

.book-badge-scanned:hover {
    background: #fff3d0;
    border-color: #e6c96a;
    box-shadow: 0 2px 6px rgba(240, 217, 138, 0.45);
    transform: translateY(-1px);
}

/* ---- Optional: pulsing glow (خیلی ملایم) ---- */
.book-badge-scanned.is-attention {
    animation: badge-pulse 3s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% {
        box-shadow: 0 1px 2px rgba(240, 217, 138, 0.25);
    }
    50% {
        box-shadow: 0 0 0 3px rgba(240, 217, 138, 0.25);
    }
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .book-badge {
        font-size: 11.5px;
        padding: 4px 10px;
    }

    .book-badge-scanned::before {
        font-size: 12px;
    }
}

/* ============================================
   Pending Book Notice Card
   ============================================ */

.pending-book-notice {
    position: relative;
    background: linear-gradient(135deg, #f5f7ff 0%, #eef2ff 100%);
    border: 1px solid #d8e0ff;
    border-right: 5px solid #667eea;
    border-radius: 12px;
    padding: 24px 28px;
    margin: 25px 0;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.08);
    overflow: hidden;
    animation: pendingSlideIn 0.5s ease-out;
}

/* دکوریشن گوشه بالا-چپ */
.pending-book-notice::before {
    content: "";
    position: absolute;
    top: -50px;
    left: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

@keyframes pendingSlideIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- پاراگراف اول: پیام اصلی ---- */
.pending-book-notice p:first-of-type {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #3a4b8a;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px;
    line-height: 1.8;
}

.pending-book-notice p:first-of-type::before {
    content: "⏳";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #fff;
    border-radius: 50%;
    font-size: 16px;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.15);
    animation: hourglassSpin 4s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes hourglassSpin {
    0%, 85%, 100% {
        transform: rotate(0deg);
    }
    90%, 95% {
        transform: rotate(180deg);
    }
}

/* ---- پاراگراف دوم: توضیح ---- */
.pending-book-notice p:nth-of-type(2) {
    color: #5a6789;
    font-size: 14.5px;
    line-height: 2;
    margin: 0 0 20px;
    padding-right: 42px;
}

.pending-book-notice p:nth-of-type(2)::before {
    content: "ℹ️";
    margin-left: 6px;
    opacity: 0.75;
}

/* ============================================
   دکمه پشتیبانی
   ============================================ */
.pending-book-notice .btn,
.pending-book-notice .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff !important;
    padding: 13px 30px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: bold;
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.35);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* ---- افکت براقی که روی دکمه رد می‌شود ---- */
.pending-book-notice .btn-primary::after {
    content: "";
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.35),
        transparent
    );
    transition: right 0.7s ease;
}

.pending-book-notice .btn-primary:hover::after {
    right: 100%;
}

.pending-book-notice .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(102, 126, 234, 0.5);
    background: linear-gradient(135deg, #7b8ff0 0%, #8659b5 100%);
}

.pending-book-notice .btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.4);
}

/* ---- انیمیشن نبض ملایم روی دکمه ---- */
.pending-book-notice .btn-primary {
    animation: btnPulse 2.5s ease-in-out infinite;
}

@keyframes btnPulse {
    0%, 100% {
        box-shadow: 0 5px 15px rgba(102, 126, 234, 0.35);
    }
    50% {
        box-shadow: 0 5px 20px rgba(102, 126, 234, 0.6),
                    0 0 0 6px rgba(102, 126, 234, 0.1);
    }
}

/* ============================================
   حالت تیره (اختیاری — اگر سایت دارک‌مود دارد)
   ============================================ */
@media (prefers-color-scheme: dark) {
    .pending-book-notice {
        background: linear-gradient(135deg, #1e2340 0%, #262b4a 100%);
        border-color: #3a4170;
        border-right-color: #7b8ff0;
    }

    .pending-book-notice p:first-of-type {
        color: #b8c4f0;
    }

    .pending-book-notice p:first-of-type::before {
        background: #2a3055;
    }

    .pending-book-notice p:nth-of-type(2) {
        color: #8a93b8;
    }
}

/* ============================================
   ریسپانسیو — موبایل
   ============================================ */
@media (max-width: 600px) {
    .pending-book-notice {
        padding: 18px 18px 20px;
        border-right-width: 4px;
    }

    .pending-book-notice p:first-of-type {
        font-size: 14.5px;
        gap: 8px;
    }

    .pending-book-notice p:first-of-type::before {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .pending-book-notice p:nth-of-type(2) {
        font-size: 13.5px;
        padding-right: 36px;
        line-height: 1.9;
    }

    .pending-book-notice .btn-primary {
        width: 100%;
        padding: 12px 20px;
        font-size: 14px;
    }
}
