/* ===============================
   Library Search Styles (Zarabi)
   + Mobile typography + Vazirmatn
   =============================== */

/* فونت و تایپوگرافی پایه */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
    font-size: 12px;           /* دسکتاپ */
    line-height: 1.65;
}

/* کانتینر */
.search-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
}

/* باکس جستجو */
.searc-box {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    border: 1px solid #eef2f5;
}

.search-title {
    color: #37474f;
    margin-bottom: 20px;
    font-size: 1.55rem;
    font-weight: 800;
}

/* ورودی جستجو */
.search-input {
    width: 100%;
    max-width: 100%;
    padding: 12px 15px;
    font-size: 1rem;
    border: 2px solid #cfd8dc;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
    text-align: center;
}

.search-input:focus {
    border-color: #00897b;
    outline: none;
    box-shadow: 0 0 8px rgba(0, 137, 123, 0.2);
}

/* دکمه جستجو */
.btn-search {
    background-color: #00897b;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 800;
    padding: 12px 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    box-shadow: 0 4px 6px rgba(0, 137, 123, 0.15);
}

.btn-search:hover {
    background-color: #00695c;
    transform: translateY(-1px);
}

.btn-search:active {
    transform: translateY(1px);
}

/* افکت ورود */
.animated {
    animation-duration: 0.6s;
    animation-fill-mode: both;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.anim-fade {
    animation-name: fadeIn;
}

/* متن بالای نتایج */
.results-info {
    margin: 20px 5px 10px;
    font-size: 1.02rem;
    color: #546e7a;
    text-align: right;
}

/* جدول نتایج (دسکتاپ/تبلت) */
.table-responsive {
    overflow-x: auto;
    margin-top: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    text-align: center;
}

.results-table th {
    background-color: #37474f;
    color: #ffffff;
    font-weight: 800;
    padding: 14px 10px;
    font-size: 0.95rem;
    white-space: nowrap;
}

.results-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #eceff1;
    color: #424242;
    font-size: 0.92rem;
}

.results-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* پیام عدم نتیجه */
.no-results {
    margin-top: 25px;
    padding: 15px;
    background: #ffebee;
    color: #c62828;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.98rem;
}

/* Badge ها */
.badge-shelf {
    background-color: #e0f2f1;
    color: #00796b;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 800;
    font-size: 0.9rem;
    display: inline-block;
}

.badge-column {
    background-color: #efebe9;
    color: #5d4037;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 800;
    font-size: 0.9rem;
    display: inline-block;
}

/* کارت‌های موبایل */
.book-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    text-align: right;
    direction: rtl;
    overflow: hidden;
}

.card-header {
    background-color: #f7f9fa;
    padding: 12px 15px;
    border-bottom: 1px solid #eceff1;
    display: flex;
    align-items: center;
}

.book-icon {
    font-size: 1.2rem;
    margin-left: 8px;
}

.book-card-title {
    margin: 0;
    font-size: 1.05rem;
    color: #00897b;
    font-weight: 900;
}

.card-body {
    padding: 15px;
}

.card-item {
    margin-bottom: 8px;
    font-size: 0.98rem;
    line-height: 1.7;
}

.card-item-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    gap: 10px;
}

.half-width {
    width: 48%;
}

.item-label {
    color: #78909c;
    font-weight: 700;
    margin-left: 6px;
}

.item-value {
    color: #37474f;
    font-weight: 800;
}

.location-row {
    background: #fafafa;
    padding: 10px;
    border-radius: 6px;
    border: 1px dashed #cfd8dc;
    margin-top: 10px;
}

/* نمایش ریسپانسیو: جدول در دسکتاپ، کارت در موبایل */
.d-none-mobile { display: block; }
.d-none-desktop { display: none; }

@media (max-width: 768px) {
    /* پایه تایپوگرافی موبایل */
    body {
        font-size: 18px;     /* مهم: بزرگ‌تر شدن فونت در موبایل */
        line-height: 1.85;
    }

    .search-container {
        padding: 12px;
    }

    .searc-box {
        padding: 22px 16px;
    }

    .search-title {
        font-size: 1.35rem;
        margin-bottom: 16px;
    }

    /* تاچ بهتر */
    .search-input {
        padding: 14px 14px;
        font-size: 1.05rem;
    }

    .btn-search {
        padding: 14px 36px;
        font-size: 1.15rem;
        width: 100%;
        max-width: 420px;
    }

    /* کارت‌ها خواناتر */
    .book-card-title {
        font-size: 1.15rem;
    }

    .card-item {
        font-size: 1.02rem;
    }

    .badge-shelf,
    .badge-column {
        font-size: 0.98rem;
        padding: 4px 10px;
    }

    /* نمایش */
    .d-none-mobile { display: none; }
    .d-none-desktop { display: block; }
}


html, body {
    height: 100%;
    margin: 0;
}

body {
    font-family: Vazirmatn, Tahoma, sans-serif;
    background: linear-gradient(135deg, #eef2f7, #dfe7f1);
}

.container {
    min-height: 100vh;
}

.login-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
    padding: 35px 30px;
    text-align: center;
    direction: rtl;
}

.login-card h2 {
    margin: 0 0 10px;
    font-size: 24px;
    color: #1f2d3d;
}

.login-card p {
    margin: 0 0 25px;
    color: #6b7280;
    font-size: 14px;
}

.form-group {
    margin-bottom: 16px;
    text-align: right;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #374151;
}

.form-group input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid #cfd8e3;
    border-radius: 12px;
    font-size: 15px;
    outline: none;
    transition: all 0.2s ease;
    background: #f9fbfd;
    text-align: right;
}

.form-group input:focus {
    border-color: #3b82f6;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.login-btn {
    width: 100%;
    margin-top: 8px;
    padding: 12px 16px;
    border: none;
    border-radius: 12px;
    background: #1f4b99;
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

.login-btn:hover {
    background: #173b78;
}

.login-alert {
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fff3f3;
    color: #b42318;
    font-size: 14px;
    border: 1px solid #f3c1c1;
}


