 * {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f1f5f9;
    color: #1e293b;
    font-family:
        Arial,
        Helvetica,
        sans-serif;
}

.container {
    width: min(1100px, calc(100% - 30px));
    margin: auto;
}

.site-header {
    background: #0f172a;
    color: white;
    padding: 15px 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo {
    font-size: 20px;
    font-weight: bold;
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
}

nav a:hover {
    background: #334155;
}

main {
    padding-top: 30px;
    padding-bottom: 50px;
}

h1 {
    margin-bottom: 25px;
}

h2 {
    margin-top: 0;
}

.cards {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.card {
    background: white;
    padding: 22px;
    border-radius: 12px;

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

.card-title {
    color: #64748b;
    margin-bottom: 10px;
}

.card-value {
    font-size: 28px;
    font-weight: bold;
    color: #0284c7;
}

.panel {
    background: white;
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 12px;

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

.last-measurement {
    font-size: 36px;
    color: #0284c7;
}

.form {
    background: white;
    max-width: 600px;
    padding: 25px;
    border-radius: 12px;

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

.form label {
    display: block;
    margin-top: 15px;
    margin-bottom: 6px;
    font-weight: bold;
}

.form input {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 16px;
}

button {
    margin-top: 25px;
    padding: 12px 20px;

    background: #0284c7;
    color: white;

    border: 0;
    border-radius: 7px;

    font-size: 16px;
    cursor: pointer;
}

button:hover {
    background: #0369a1;
}

.alert {
    max-width: 600px;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 7px;
}

.success {
    background: #dcfce7;
    color: #166534;
}

.error {
    background: #fee2e2;
    color: #991b1b;
}

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

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

th,
td {
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

th {
    background: #f8fafc;
}

.site-footer {
    padding: 25px 0;
    background: #0f172a;
    color: #cbd5e1;
    text-align: center;
}

@media (max-width: 800px) {

    .header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .cards {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 500px) {

    .cards {
        grid-template-columns: 1fr;
    }

    nav {
        flex-direction: column;
        width: 100%;
    }

    nav a {
        background: #1e293b;
    }

    .card-value {
        font-size: 24px;
    }
}
