html {
    background-color: whitesmoke;
}

table {
    border-collapse: collapse;
    text-align: center;
    width: 100%;
}

th, td {
    padding: 10px;
    border: 1px solid black;
}

td > * {
    display: inline-block;
}

body {
    width: 1170px;
    margin: 15px auto;
}

.index h1 {
    display: inline-block;
    width: calc(100% - 350px);
}

h1 + form, h1 + button {
    width: 350px;
}

button {
    padding: 5px;
    border-radius: 5px;
    border: 1px solid grey;
}

button:hover {
    background-color: white;
    border: 1px solid black;
    box-shadow: 0 0 2px grey;
}

td button {
    width: 75px;
    margin: 0 5px;
}

th {
    background-color: grey;
    color: white;
    font-weight: 600;
}

tr:nth-child(even) {
    background-color: #d9d9d9;
}

tr:hover:nth-child(odd) {
    background-color: white;
}

tr:hover:nth-child(even) {
    background-color: #dfdfdf;
}

select[multiple] {
    min-height: 500px;
    display: block;
}

body:not(.index) form[method="post"] { 
    width: 100%;
    display: block;
}

label[for="is_public"] {
    float: left;
    text-align: right;
    padding-right: 15px;
    width: calc(100% - 30px);
}

input:not(#is_public), select {
    display: block;
    margin-bottom:15px;
    width: 100%;
}

#is_public {
    display: block;
    margin-bottom:15px;
}

label {
    display:block;
}

select {
    display: block;
}

body:not(.index) {
    width: 750px
}

form div {
    display: flex;
    gap: 10px;
    justify-content: end;
}

form div button {
    width: 150px;
}

body:has(div.list-page) {
    width: 1170px;
}

.list-page table tr:last-child {
    text-align: left;
}