* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f4f6f8;
    color: #202124;
}

.topbar {
    height: 60px;
    background: #17202a;
    color: white;

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

    padding: 0 25px;
}

.topbar a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
}

.container {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
}

.card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;

    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.table-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.table-item {
    display: block;

    padding: 18px;

    background: #f7f9fa;

    border-radius: 8px;

    text-decoration: none;
    color: #17202a;

    border: 1px solid #ddd;
}

.table-item:hover {
    background: #eaf2ff;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 20px;
}

.button,
button {
    display: inline-block;

    border: 0;
    border-radius: 6px;

    background: #1976d2;
    color: white;

    padding: 10px 16px;

    cursor: pointer;

    text-decoration: none;
}

button:hover,
.button:hover {
    background: #125ca5;
}

label {
    display: block;
    margin-top: 15px;
    margin-bottom: 6px;

    font-weight: bold;
}

input,
textarea {
    width: 100%;

    padding: 10px;

    border: 1px solid #ccc;
    border-radius: 6px;

    font: inherit;
}

.search {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search input {
    flex: 1;
}

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

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

th,
td {
    text-align: left;

    padding: 10px;

    border-bottom: 1px solid #ddd;

    white-space: nowrap;
}

th {
    background: #f1f3f4;
}

.actions a {
    text-decoration: none;
    margin-right: 10px;
}

.delete {
    color: #c62828;
}

.error {
    background: #ffebee;
    color: #b71c1c;

    padding: 12px;

    border-radius: 6px;

    margin-bottom: 15px;
}

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

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

.login-box {
    width: 380px;
    max-width: 90%;

    background: white;

    padding: 30px;

    border-radius: 12px;

    box-shadow: 0 5px 25px rgba(0,0,0,.12);
}

.login-box h1 {
    margin-top: 0;
}

.login-box button {
    width: 100%;
    margin-top: 20px;
}

footer {
    text-align: center;
    color: #777;

    padding: 30px;
}

@media (max-width: 700px) {

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .search {
        flex-direction: column;
    }

    .topbar {
        padding: 0 15px;
    }

    .container {
        padding: 0 10px;
    }
}
