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

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #222;
    color: #fff;
    padding: 12px 20px;
}

.brand {
    font-weight: 700;
    font-size: 20px;
}

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

.container {
    max-width: 1180px;
    margin: 24px auto;
    padding: 0 16px;
}

.card {
    background: #fff;
    border-radius: 10px;
    padding: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    margin-bottom: 18px;
}

.grid {
    display: grid;
    gap: 16px;
}

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

.stat {
    font-size: 28px;
    font-weight: 700;
}

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

input, select, button {
    padding: 10px;
    font-size: 16px;
    box-sizing: border-box;
}

input, select {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 6px;
}

button, .button {
    background: #1463ff;
    border: 0;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

button.secondary, .button.secondary {
    background: #555;
}

button.danger {
    background: #d33;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

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

th {
    background: #f0f2f5;
}

.right {
    text-align: right;
}

.error {
    color: #c00;
    background: #fee;
    padding: 10px;
    border-radius: 6px;
}

.success {
    color: #075;
    background: #e9fff6;
    padding: 10px;
    border-radius: 6px;
}

.row {
    display: flex;
    gap: 12px;
    align-items: end;
}

.row > * {
    flex: 1;
}

@media (max-width: 800px) {
    .grid-4 {
        grid-template-columns: 1fr;
    }
    .topbar {
        display: block;
    }
    .topbar a {
        display: inline-block;
        margin: 8px 8px 0 0;
    }
}
