.books-list-page {
    min-height: 100vh;
    font-family: 'DM Sans', sans-serif;
    color: #0d1520;
    padding: 0px;
}

.page-header {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 24px;
}

.page-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -.02em;
}

.result-count {
    font-size: .82rem;
    color: #8496aa;
    background: #ffffff;
    border: 1px solid #e1e8f0;
    padding: 3px 10px;
    border-radius: 20px;
}

.filter-bar {
    background: #ffffff;
    border: 1px solid #e1e8f0;
    border-radius: 14px;
    padding: 18px 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.05);
}

.filter-search {
    position: relative;
    flex: 1;
    min-width: 220px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    color: #8496aa;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 9px 36px;
    border: 1.5px solid #e1e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: .88rem;
    color: #0d1520;
    background: #f4f6f9;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.search-input:focus {
    border-color: #1947e5;
    box-shadow: 0 0 0 3px rgba(25,71,229,.1);
    background: #ffffff;
}

.clear-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #8496aa;
}

.clear-btn:hover {
    color: #be1b1b;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-label {
    font-size: .65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: #8496aa;
}

.filter-select {
    padding: 7px 28px 7px 12px;
    border: 1.5px solid #e1e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: .84rem;
    color: #0d1520;
    background: #f4f6f9;
    -webkit-appearance: none;
    outline: none;
    cursor: pointer;
    transition: border-color .15s;
}

.filter-select:focus {
    border-color: #1947e5;
    box-shadow: 0 0 0 3px rgba(25,71,229,.1);
}

.reset-btn {
    padding: 8px 16px;
    font-family: inherit;
    font-size: .82rem;
    background: none;
    border: 1.5px dashed #e1e8f0;
    border-radius: 8px;
    color: #8496aa;
    cursor: pointer;
    transition: all .15s;
    align-self: flex-end;
}

.reset-btn:hover {
    border-color: #be1b1b;
    color: #be1b1b;
    background: #fee2e2;
}

.table-wrapper {
    background: #ffffff;
    border: 1px solid #e1e8f0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.05);
}

.books-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .85rem;
}

.books-table thead tr {
    background: #f8fafd;
    border-bottom: 2px solid #e1e8f0;
}

.books-table th {
    padding: 12px 16px;
    text-align: left;
    font-family: 'Syne', sans-serif;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #8496aa;
    user-select: none;
    white-space: nowrap;
}

.book-row {
    border-bottom: 1px solid #e1e8f0;
    transition: background .12s;
    cursor: pointer;
}

.book-row:last-child {
    border-bottom: none;
}

.book-row:hover {
    background: #f0f5ff;
}

.books-table td {
    padding: 13px 16px;
    vertical-align: middle;
}

.col-title    { min-width: 220px; }
.col-authors  { min-width: 160px; }
.col-year     { width: 80px; text-align: center; }
.col-publisher{ min-width: 130px; }
.col-copies   { width: 90px; text-align: center; }
.col-deposit  { min-width: 130px; }
.col-actions  { width: 120px; text-align: center; }

.title-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.title-dot {
    width: 8px;
    height: 8px;
    min-width: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1947e5, #7c5cfc);
    flex-shrink: 0;
}

.title-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    color: #0d1520;
    font-weight: 500;
}

.authors-text   { font-size: .8rem;  color: #3d4f63; }
.publisher-text { font-size: .82rem; color: #3d4f63; }
.no-value       { color: #8496aa; }

.year-tag {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: .85rem;
    color: #1947e5;
}

.copies-pill {
    display: inline-block;
    background: #ebeffd;
    color: #1947e5;
    font-size: .75rem;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 20px;
    border: 1px solid #c7d4fb;
}

.deposit-tag {
    display: inline-block;
    background: #ccfbf1;
    color: #0f766e;
    border: 1px solid #99f6e4;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: .75rem;
    font-weight: 600;
    white-space: nowrap;
}
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 32px;
    height: 32px;

    border-radius: 7px;
    border: 1.5px solid transparent;

    cursor: pointer;

    padding: 0;
    margin: 0;

    line-height: 1;

    background: none;

    text-decoration: none;

    box-sizing: border-box;

    font-size: 0;

    transition: all .15s;
}

.action-btn svg {
    width: 14px;
    height: 14px;
}
.btn-edit {
    background: #ebeffd;
    color: #1947e5;
    border-color: #c7d4fb;
}

.btn-edit:hover {
    background: #1947e5;
    color: #fff;
}

.btn-delete {
    background: #fee2e2;
    color: #be1b1b;
    border-color: #fecaca;
}

.btn-delete:hover {
    background: #be1b1b;
    color: #fff;
}
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 64px 20px;
    color: #8496aa;
}

.empty-icon { font-size: 2.5rem; }

.pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.pg-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1.5px solid #e1e8f0;
    border-radius: 8px;
    background: #ffffff;
    font-family: 'Syne', sans-serif;
    font-size: .85rem;
    font-weight: 600;
    color: #3d4f63;
    cursor: pointer;
    transition: all .15s;
}

.pg-btn:hover:not(:disabled) {
    border-color: #1947e5;
    color: #1947e5;
    background: #ebeffd;
}

.pg-btn:disabled {
    opacity: .35;
    cursor: default;
}

.pg-active {
    background: #1947e5 !important;
    border-color: #1947e5 !important;
    color: #fff !important;
}

.pg-info {
    margin-left: 8px;
    font-size: .78rem;
    color: #8496aa;
}

/* ══ POPUPS ══ */
.popup-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0,0,0,0.25);
    z-index: 1040;
}

.popup-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1050;
    width: 90%;
    max-width: 600px;
    min-width: 300px;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    background-color: #ffffff;
    border: 1px solid #e1e8f0;
    animation: popupFadeIn 0.25s ease-in-out;
    overflow: hidden;
}

.popup-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid #e1e8f0;
    background: #f8fafd;
}

.popup-header h5 {
    font-family: 'Syne', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #0d1520;
    margin: 0;
}

.popup-body {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.popup-row {
    display: flex;
    gap: 8px;
    font-size: .875rem;
}

.popup-row strong {
    color: #0d1520;
    font-weight: 600;
    min-width: 130px;
    flex-shrink: 0;
}

.popup-row span { color: #3d4f63; }

.popup-footer {
    background: #f8fafd;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid #e1e8f0;
}

.popup-footer button {
    padding: 6px 18px;
    font-family: inherit;
    font-size: .82rem;
    font-weight: 600;
    border: 1.5px solid #e1e8f0;
    background: #ffffff;
    color: #3d4f63;
    border-radius: 8px;
    cursor: pointer;
    transition: all .15s;
}

.popup-footer button:hover {
    border-color: #3d4f63;
    background: #3d4f63;
    color: #fff;
}

.btn-confirm-delete {
    padding: 6px 18px;
    font-family: inherit;
    font-size: .82rem;
    font-weight: 600;
    border: 1.5px solid #be1b1b;
    background: #be1b1b;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    transition: all .15s;
}

.btn-confirm-delete:hover {
    background: #9b1515;
    border-color: #9b1515;
    box-shadow: 0 2px 8px rgba(190,27,27,.35);
}

@keyframes popupFadeIn {
     from { opacity: 0; transform: translate(-50%, -46%); }
     to   { opacity: 1; transform: translate(-50%, -50%); }
 }

@media (max-width: 768px) {
    .books-list-page { padding: 20px 14px 40px; }
    .filter-bar { flex-direction: column; }
    .books-table { display: block; overflow-x: auto; }
    .action-btn { padding: 6px 8px; }
}