/* ====== Master Header ====== */
.master-header {
    width: 100%;
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(to right, #ff9966, #ff5e62); /* 🍊 همان نارنجی/هلویی صفحه اصلی */
    color: #fff;
    box-shadow: 0 3px 7px rgba(0,0,0,0.15);
}

/* بخش بالایی (لوگو + عنوان) */
.header-top {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    direction: ltr;
    padding: 25px 25px;
    position: relative;
}

.header-top h1 {
    flex: 1;
    text-align: center;
    font-size: 24px;
    color: #fff;
    font-weight: bold;
    margin: 0;
    font-family: "Vazir", sans-serif;
}

.site-logo {
    height: 75px;
    width: auto;
    position: absolute;
    left: 20px;
}

/* نوار منو (نارنجی تیره‌تر برای کنتراست بهتر) */
.main-nav {
    background-color: #cc4d39;
}

.main-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 10px 0;
    gap: 30px;
}

.main-nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-family: "Vazir", sans-serif;
    transition: color 0.3s ease;
}

.main-nav a:hover,
.main-nav a.active {
    text-decoration: underline;
    color: #fff8d0;
}

/* فاصله محتوای سایت از هدر */
main {
    margin-top: 190px;
}

/* ===============================
   [ADMIN BOOKS SECTION STYLES]
   =============================== */

.container {
    max-width: 1100px;
    margin: 120px auto 50px auto;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.08);
    direction: rtl;
}

h2 {
    text-align: center;
    color: #ff5722;
    margin-bottom: 25px;
    font-family: 'Vazir', sans-serif;
}

.table-container {
    overflow-x: auto;
}

/* --- جدول اصلی مدیریت کتاب‌ها --- */
.styled-table {
    width: 100%;
    border-collapse: collapse;
    direction: rtl;
    table-layout: fixed;
}

.styled-table th {
    background: linear-gradient(90deg, #ff7b00, #ff4444);
    color: #fff;
    padding: 12px 5px;
    font-size: 14px;
}

.styled-table td {
    border-bottom: 1px solid #ddd;
    padding: 10px;
    font-size: 14px;
    text-align: center;
    vertical-align: middle;
    word-wrap: break-word;
}

.styled-table tr:hover {
    background-color: #fff4e6;
}

/* --- اصلاح ظاهر تصاویر جدول کتاب‌ها --- */
.book-cover {
    width: 70px;
    height: 90px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 0 4px rgba(0,0,0,0.15);
}

/* --- دکمه‌ها --- */
.btn-add,
.btn-edit,
.btn-delete {
    text-decoration: none;
    color: #fff;
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 13px;
    display: inline-block;
    transition: 0.2s ease;
}

.btn-add {
    background: #1e90ff;
}
.btn-add:hover {
    background: #006edc;
}

.btn-edit {
    background: #00b894;
}
.btn-edit:hover {
    background: #009874;
}

.btn-delete {
    background: #e74c3c;
}
.btn-delete:hover {
    background: #c0392b;
}

/* --- فرم‌ها --- */
input[type="text"],
input[type="number"],
input[type="file"] {
    width: 100%;
    padding: 8px;
    margin: 6px 0 12px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: 'Vazir', sans-serif;
}

button {
    background-color: #ff5722;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Vazir', sans-serif;
    margin-top: 8px;
}
button:hover {
    background-color: #e64a19;
}

form label {
    font-weight: bold;
    color: #444;
    display: block;
    margin-top: 8px;
}
.alert.success {
    background-color: #e5ffe5;
    border: 1px solid #5cb85c;
    color: #317531;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    text-align: center;
    font-family: 'Vazir', sans-serif;
}
.main-menu {
    list-style: none;
    text-align: right;
    margin: 0;
    padding: 0;
    direction: rtl;
}

.main-menu li {
    display: inline-block;
    margin: 0 8px;
}

.main-menu a {
    text-decoration: none;
    color: #cc4d39;
    font-weight: bold;
}

h2 {
    color: #cc4d39;
    border-bottom: 1px solid #cc4d39;
    padding-bottom: 5px;
    margin-top: 20px;
}

body {
    direction: rtl;
    font-family: "Vazir", sans-serif;
}
