* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f5f1e8;
    color: #333;
}

/* LOGIN */

.login-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #eee7d8;
}

.login-box {
    width: 380px;
    background: white;
    padding: 35px;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    text-align: center;
}

.logo {
    font-size: 55px;
}

.login-box h1 {
    margin: 5px 0;
    color: #315c4a;
}

.login-box p {
    color: #777;
}

.login-box form {
    text-align: left;
    margin-top: 25px;
}

.login-box label {
    display: block;
    margin-top: 15px;
    margin-bottom: 6px;
    font-weight: bold;
}

.login-box input,
.login-box select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.login-box button {
    width: 100%;
    margin-top: 22px;
    padding: 13px;
    border: none;
    border-radius: 8px;
    background: #315c4a;
    color: white;
    cursor: pointer;
    font-weight: bold;
}

.login-info {
    margin-top: 20px;
    font-size: 12px;
}


/* TOPBAR */

.topbar {
    height: 65px;
    background: #315c4a;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
}

.brand {
    font-size: 21px;
    font-weight: bold;
}

.user-area {
    display: flex;
    gap: 15px;
    align-items: center;
}

.user-area button,
.topbar button {
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
}


/* LAYOUT */

.layout {
    display: flex;
    min-height: calc(100vh - 65px);
}

.sidebar {
    width: 230px;
    background: white;
    padding: 20px 12px;
    border-right: 1px solid #ddd;
}

.menu {
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    padding: 13px;
    margin-bottom: 5px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
}

.menu:hover,
.menu.active {
    background: #e5eee9;
    color: #315c4a;
}

.content {
    flex: 1;
    padding: 30px;
}


/* WELCOME */

.welcome {
    background: #315c4a;
    color: white;
    padding: 25px;
    border-radius: 15px;
}

.welcome p {
    color: #e5eee9;
}


/* STATISTICS */

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin: 25px 0;
}

.stat-card {
    background: white;
    padding: 22px;
    border-radius: 13px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
}

.stat-card span {
    font-size: 30px;
}

.stat-card h3 {
    margin: 8px 0;
    font-size: 25px;
    color: #315c4a;
}

.stat-card p {
    margin: 0;
    color: #777;
}


/* BOOK */

.book-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.book-card {
    background: white;
    border-radius: 13px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
    transition: 0.2s;
}

.book-card:hover {
    transform: translateY(-4px);
}

.book-cover {
    height: 190px;
    background: #d9cdb7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 55px;
}

.book-info {
    padding: 15px;
}

.book-info h3 {
    margin: 0 0 7px;
    font-size: 17px;
}

.book-info p {
    margin: 5px 0;
    color: #777;
    font-size: 13px;
}

.book-info button {
    width: 100%;
    padding: 9px;
    margin-top: 10px;
    border: none;
    border-radius: 7px;
    background: #315c4a;
    color: white;
    cursor: pointer;
}


/* PAGE HEADER */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-header input {
    padding: 12px;
    width: 250px;
    border: 1px solid #ddd;
    border-radius: 8px;
}


/* CATEGORY */

.category-buttons {
    margin: 20px 0;
}

.category-buttons button {
    padding: 9px 15px;
    margin-right: 7px;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    background: white;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.category-card {
    background: white;
    padding: 30px;
    text-align: center;
    border-radius: 15px;
    cursor: pointer;
}

.category-card:hover {
    background: #e5eee9;
}


/* PROFILE */

.profile-card {
    max-width: 450px;
    margin-top: 25px;
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
}

.profile-icon {
    font-size: 70px;
}


/* ADMIN */

.admin-content {
    padding: 30px;
}


/* TABLE */

.table-container {
    background: white;
    border-radius: 12px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background: #e5eee9;
}

.badge {
    padding: 6px 10px;
    border-radius: 15px;
    font-size: 12px;
}

.reading {
    background: #fff0c7;
}

.finished {
    background: #d9f0df;
}


/* MODAL */

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background: white;
    width: 500px;
    max-width: 100%;
    padding: 30px;
    border-radius: 15px;
    position: relative;
}

.close {
    position: absolute;
    right: 15px;
    top: 10px;
    border: none;
    background: none;
    font-size: 25px;
    cursor: pointer;
}


/* HIDDEN */

.hidden {
    display: none !important;
}


/* RESPONSIVE */

@media (max-width: 900px) {

    .book-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

}

@media (max-width: 600px) {

    .sidebar {
        width: 70px;
    }

    .menu {
        font-size: 0;
        text-align: center;
    }

    .menu:first-letter {
        font-size: 20px;
    }

    .content {
        padding: 15px;
    }

    .book-grid {
        grid-template-columns: 1fr;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

}