/* =================================
   GENERAL
================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f6fa;
    color: #263248;
}


/* =================================
   LOGIN
================================= */

.login-page {
    min-height: 100vh;

    display: flex;
    justify-content: center;
    align-items: center;

    background: linear-gradient(
        135deg,
        #172c54,
        #3978c7
    );
}

.login-card {
    background: white;

    padding: 45px;

    border-radius: 15px;

    width: 90%;
    max-width: 400px;

    box-shadow: 0 15px 50px #0003;
}

.book-icon {
    font-size: 45px;
    text-align: center;
}

.login-card h1 {
    text-align: center;
    margin: 15px 0;
}

.login-card p {
    text-align: center;
    color: #777;
    margin-bottom: 25px;
}

.login-card label {
    display: block;
    margin: 15px 0 7px;
}

.login-card input {
    width: 100%;

    padding: 12px;

    border: 1px solid #ddd;
    border-radius: 7px;
}

.login-card button {
    width: 100%;

    margin-top: 25px;

    padding: 13px;

    background: #2867bb;

    color: white;

    border: none;
    border-radius: 7px;

    cursor: pointer;
    font-weight: bold;
}

.error {
    color: #dc3545 !important;
    margin-top: 15px;
}


/* =================================
   HEADER
================================= */

.topbar {
    background: #1e355c;

    color: white;

    padding: 22px 5%;

    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar p {
    color: #c9d5e8;
    margin-top: 5px;
}

.logout-btn {
    background: #e75c65;

    border: none;

    padding: 10px 20px;

    border-radius: 6px;

    color: white;

    cursor: pointer;
}


/* =================================
   MAIN CONTAINER
================================= */

.container {
    width: 95%;
    max-width: 1700px;

    margin: 35px auto;
}


/* =================================
   TABS
================================= */

.tabs {
    display: flex;
    gap: 10px;

    margin-bottom: 25px;
}

.tab {
    padding: 15px 30px;

    border: none;

    background: #dfe5ef;

    border-radius: 8px 8px 0 0;

    cursor: pointer;

    font-weight: bold;
    font-size: 15px;
}

.tab.active {
    background: #2867bb;
    color: white;
}

.tab[data-tab="wishlist"].active {
    background: #7652a8;
}


/* =================================
   SECTIONS
================================= */

.book-section {
    display: none;

    background: white;

    padding: 25px;

    border-radius: 0 10px 10px 10px;

    box-shadow: 0 3px 15px #0000000c;
}

.book-section.active {
    display: block;
}

#owned {
    border-top: 5px solid #2867bb;
}

#wishlist {
    border-top: 5px solid #7652a8;
}


/* =================================
   SECTION HEADER
================================= */

.section-header {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 20px;

    flex-wrap: wrap;

    margin-bottom: 25px;
}

.section-header h2 {
    margin-bottom: 7px;
}

.section-header span {
    color: #777;
    font-size: 13px;
}

.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.actions button,
.import-btn {
    padding: 10px 15px;

    border: none;

    border-radius: 6px;

    cursor: pointer;

    color: white;

    font-size: 13px;

    display: inline-block;
}

.add-btn {
    background: #2867bb;
}

.export-btn {
    background: #38966c;
}

.import-btn {
    background: #68758a;
}

.import-btn input {
    display: none;
}


/* =================================
   FILTERS
================================= */

.filter-panel {
    padding: 20px;

    background: #f4f7fb;

    border-radius: 8px;

    margin-bottom: 25px;
}

.filter-panel input[type="search"] {
    width: 100%;

    padding: 13px;

    border: 1px solid #d8deea;

    border-radius: 6px;

    margin-bottom: 15px;
}

.filters {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(160px, 1fr));

    gap: 10px;
}

.filter-item select {
    width: 100%;

    padding: 10px;

    border: 1px solid #d8deea;

    border-radius: 6px;

    background: white;
}

.clear-btn {
    margin-top: 15px;

    padding: 8px 14px;

    background: #e4e9f1;

    border: none;

    border-radius: 5px;

    cursor: pointer;
}


/* =================================
   TABLE
================================= */

.table-container {
    overflow-x: auto;
    width: 100%;
}

table {
    width: 100%;

    min-width: 1200px;

    border-collapse: collapse;

    font-size: 15px;
}

th,
td {
    padding: 13px 12px;

    text-align: left;

    border-bottom: 1px solid #e8ebf0;

    white-space: nowrap;
}

th {
    color: white;

    background: #2867bb;

    position: sticky;
    top: 0;
}

.wishlist-table th {
    background: #7652a8;
}

tr:hover td {
    background: #f4f7fc;
}

.wishlist-table tr:hover td {
    background: #f6f1fb;
}


/* =================================
   ACTION BUTTONS
================================= */

.actions-cell button {
    padding: 6px 9px;

    border: none;

    border-radius: 4px;

    cursor: pointer;

    color: white;

    font-size: 11px;
}

.edit-btn {
    background: #e0a12e;
}

.delete-btn {
    background: #df525d;
}


/* =================================
   PAGINATION
================================= */

.pagination {
    display: flex;

    justify-content: center;
    align-items: center;

    gap: 20px;

    padding: 25px;
}

.pagination button {
    padding: 9px 15px;

    border: none;

    background: #2867bb;

    color: white;

    border-radius: 5px;

    cursor: pointer;
}

#wishlist .pagination button {
    background: #7652a8;
}

.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}


/* =================================
   MODAL
================================= */

.modal {
    display: none;

    position: fixed;

    inset: 0;

    background: #0008;

    justify-content: center;
    align-items: center;

    z-index: 100;

    padding: 15px;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;

    width: 100%;
    max-width: 550px;

    max-height: 90vh;

    overflow-y: auto;

    border-radius: 12px;

    padding: 25px;
}

.modal-header {
    display: flex;

    justify-content: space-between;
    align-items: center;

    margin-bottom: 20px;
}

.close-btn {
    font-size: 25px;

    background: none;

    border: none;

    cursor: pointer;
}

.modal-content label {
    display: block;

    margin: 13px 0 6px;

    font-size: 13px;

    font-weight: bold;
}

.modal-content input,
.modal-content select {
    width: 100%;

    padding: 11px;

    border: 1px solid #ddd;

    border-radius: 6px;
}

.save-btn {
    width: 100%;

    padding: 13px;

    margin-top: 22px;

    background: #2867bb;

    color: white;

    border: none;

    border-radius: 6px;

    cursor: pointer;
}


/* =================================
   NOTIFICATIONS
================================= */

.notification {
    position: fixed;

    bottom: 25px;
    right: 25px;

    padding: 15px 25px;

    background: #263d61;

    color: white;

    border-radius: 7px;

    opacity: 0;

    pointer-events: none;

    transition: opacity .3s;
}

.notification.show {
    opacity: 1;
}


/* =================================
   MOBILE
================================= */

@media(max-width: 700px) {

    .topbar {
        padding: 18px;
    }

    .topbar h1 {
        font-size: 20px;
    }

    .container {
        width: 97%;
        margin: 15px auto;
    }

    .book-section {
        padding: 12px;
    }

    .section-header {
        align-items: flex-start;
    }

    .actions {
        width: 100%;
    }

    .tabs button {
        flex: 1;
        padding: 12px 8px;
    }

}

body,
button,
input,
select,
textarea {
    font-family: "Times New Roman", Times, serif;
}
