* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f4f7fb;
    color: #172033;
}

.nav {
    background: #111827;
    color: #fff;
    padding: 14px 5%;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
}

.nav a {
    color: #fff;
    text-decoration: none;
    margin-left: 15px;
}

.container {
    max-width: 1180px;
    margin: 30px auto;
    padding: 0 18px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

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

.card {
    background: #fff;
    border: 1px solid #e3e8ef;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .04);
}

.card.narrow {
    max-width: 520px;
    margin: 50px auto;
}

.card span {
    display: block;
    color: #667085;
}

.card strong {
    font-size: 28px;
}

.button,
button {
    display: inline-block;
    border: 0;
    border-radius: 8px;
    background: #1264d8;
    color: #fff;
    padding: 10px 15px;
    text-decoration: none;
    cursor: pointer;
    font: inherit;
}

.secondary {
    background: #475467;
}

.danger {
    background: #c62828;
}

.small {
    padding: 6px 9px;
    font-size: 12px;
}

.tiny {
    width: 90px !important;
    padding: 5px !important;
}

.inline {
    display: inline-flex;
    gap: 4px;
    margin: 2px;
    vertical-align: middle;
}

label {
    display: block;
    font-weight: 600;
    margin: 12px 0;
}

input,
select,
textarea {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    background: #fff;
    font: inherit;
}

textarea {
    resize: vertical;
}

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

th,
td {
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
}

.alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert.success {
    background: #e8f7ee;
    color: #17663a;
}

.alert.error {
    background: #fdecec;
    color: #9b1c1c;
}

.muted {
    color: #667085;
}

.contact-picker {
    max-height: 280px;
    overflow: auto;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 8px;
}

.check {
    font-weight: 400;
    margin: 7px 0;
}

.check input {
    display: inline;
    width: auto;
    margin-right: 7px;
}

.hidden {
    display: none;
}

footer {
    text-align: center;
    color: #667085;
    padding: 30px;
}

@media (max-width: 800px) {
    .grid,
    .grid.two {
        grid-template-columns: 1fr;
    }

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

    .navlinks {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .nav a {
        margin-left: 0;
    }

    table {
        display: block;
        overflow: auto;
        white-space: nowrap;
    }
}
