:root {
  --bg: #f4f7fb;
  --card: #ffffff;
  --line: #d9e3f0;
  --ink: #17212f;
  --muted: #556477;
  --action: #0b63ce;
  --ok: #0a7a3d;
  --bad: #9e2a2b;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #eef3f9 0%, #f8fbff 100%);
}

.topbar {
  padding: 1rem;
  background: #12253f;
  color: #fff;
}
.topbar-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.topbar-left { min-width: 0; }
.topbar h1 { margin: 0 0 .5rem 0; font-size: 1.2rem; }
.topbar nav { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: .5rem; }
.topbar a { color: #cfe3ff; text-decoration: none; }

.userbox {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: #e6f0ff;
  font-size: .92rem;
  text-align: right;
  flex-shrink: 0;
}
.userbox form { margin: 0; }

.container { padding: 1rem; max-width: 1280px; margin: 0 auto; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .8rem; }
.row-span { grid-column: 1 / -1; display: flex; gap: 1rem; align-items: center; }
.fuel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .8rem; }

fieldset {
  border: 1px solid #b8c8db;
  border-radius: 8px;
  padding: .7rem;
}
.checks { display: grid; gap: .35rem; }
.check-item { display: flex; align-items: center; gap: .4rem; }

label { display: flex; flex-direction: column; gap: .35rem; font-size: .92rem; }
input, button, select {
  border: 1px solid #b8c8db;
  border-radius: 6px;
  padding: .55rem .65rem;
  font-size: .95rem;
}
button {
  background: var(--action);
  color: white;
  border: none;
  cursor: pointer;
}
.preset-active {
  background: #0a4d9f;
}
.btn-link {
  background: transparent;
  border: 1px solid #9db5d8;
  color: #d9e7ff;
  padding: .3rem .6rem;
}

table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { border: 1px solid var(--line); padding: .45rem .5rem; vertical-align: top; }
th { background: #edf4ff; text-align: left; }
pre {
  white-space: pre-wrap;
  margin: .5rem 0;
  padding: .5rem;
  background: #f1f5fa;
  border-radius: 8px;
}

.flash-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.flash { padding: .7rem .8rem; border-radius: 8px; margin-bottom: .5rem; }
.flash.success { background: #e4f8eb; color: var(--ok); }
.flash.error { background: #fdecec; color: var(--bad); }

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.muted { color: var(--muted); }
.fuel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e7f0ff;
  color: #0a4d9f;
  margin-right: 4px;
  vertical-align: middle;
}
.fuel-icon svg { fill: currentColor; }

.login-card { max-width: 430px; margin: 2rem auto; }
.login-form { display: grid; gap: .8rem; }

@media (max-width: 900px) {
  .topbar-row { flex-direction: column; }
  .userbox { text-align: left; }
  table { font-size: .82rem; display: block; overflow-x: auto; }
}

@media print {
  .topbar, .filters, .flash-list { display: none !important; }
  body { background: white; }
  .card { border: none; padding: 0; }
}
