/* ===== Borrow History Section ===== */
.borrow-history-section {
    background: #f8f9fb;
}

/* ===== Table ===== */
.borrow-table {
    font-size: 0.95rem;
}

.borrow-table thead th {
    font-weight: 600;
    vertical-align: middle;
    white-space: nowrap;
}

.borrow-table tbody td {
    vertical-align: middle;
}

/* ===== Book Cover ===== */
.book-cover {
    width: 55px;
    height: 75px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
}

/* ===== Book Name ===== */
.book-name {
    line-height: 1.4;
}

/* ===== Expired Row ===== */
.table-expired {
    background-color: #fff7e6 !important;
}

/* ===== Badge ===== */
.badge {
    padding: 6px 10px;
    font-size: 0.8rem;
    border-radius: 20px;
}

@media (max-width: 767px) {
    .table-responsive {
        display: none;
    }
}

/* ===== Borrow Card (Mobile) ===== */
.borrow-card-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.borrow-card {
    background: #f4f3f2;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 4px 10px rgba(0,0,0,.08);
}

.borrow-card.expired {
    background: #f8d7da;
}

.card-top {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.status-badge {
    margin-left: auto; /* 👈 ดันไปขวาสุด */
}


.job-badge {
    background: #ffc107;
    color: #000;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
}

.borrow-count {
    font-size: 0.75rem;
    color: #333;
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 8px 0;
}

.card-meta {
    font-size: 0.85rem;
    color: #555;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-meta i {
    margin-right: 6px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.price {
    font-weight: 700;
    font-size: 0.9rem;
}

/* ===== Mobile Borrow Card ===== */
.borrow-card-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.borrow-card {
    background: #f9f9f9;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 6px 16px rgba(0,0,0,.12);
}

/* สถานะ */
.borrow-card.active {
    background: #e9f7ef;
}
.borrow-card.expired {
    background: #f8d7da;
}

/* Top */
.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.job-badge {
    background: #ffc107;
    color: #000;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 20px;
}

/* Body */
.card-body {
    padding: 0;
}

/* Cover */
.card-book-cover {
    width: 70px;
    min-width: 70px;
    height: 95px;
    border-radius: 8px;
    overflow: hidden;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.card-book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-cover {
    width: 100%;
    height: 100%;
    background: #e9ecef;
    color: #999;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Info */
.card-book-info {
    flex: 1;
}

.card-book-name {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    font-size: 0.8rem;
    color: #555;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-meta i {
    margin-right: 4px;
}
