*,
*::before,
*::after {
    box-sizing: border-box;
}

*:not(dialog) {
    margin: 0;
}

body {
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

input,
button,
textarea,
select {
    font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
}

p {
    text-wrap: pretty;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    text-wrap: balance;
}

.library {
    padding: 1.5rem;
}

.library-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 24px 0;
}

.library-title {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

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

.book-table {
    width: 100%;
    border-collapse: collapse;
}

.book-table th,
.book-table td {
    padding: 14px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    text-align: left;
    vertical-align: middle;
}

.book-table th {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.col-num {
    text-align: right;
    white-space: nowrap;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    cursor: pointer;
}

.status:hover {
    opacity: 0.7;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.55;
}

.status[data-read="true"] .status-dot {
    color: green;
}

.status[data-read="false"] .status-dot {
    color: red;
}

.table-actions {
    white-space: nowrap;
}

.action-btn {
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.action-btn svg {
    width: 100%;
    height: 100%;
    opacity: 0.6;
}

.action-btn:hover svg {
    opacity: 1;
}

.book-dialog {
    border: none;
    padding: 0;
    border-radius: 16px;
    width: min(520px, calc(100% - 2rem));
}

.book-dialog::backdrop {
    background: rgba(0, 0, 0, 0.35);
}

.book-form {
    padding: 2rem;
}

.dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.dialog-title {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.icon-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
}

.icon-btn:hover {
    opacity: 0.7;
}

.form-row {
    display: grid;
    gap: 6px;
    margin-bottom: 12px;
}

.book-form input[type="text"],
.book-form input[type="number"] {
    padding: 10px 12px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
}

.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 16px;
}

.dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn {
    min-width: 8rem;
    min-height: 2.5rem;
    border-radius: 10px;
    border: none;
    background-color: steelblue;
    color: white;
    cursor: pointer;
}

.cancel-btn {
    background: slategrey;
}