*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 14px;
  background: #f4f5f7;
  color: #1a1a2e;
}

/* ── Login ─────────────────────────────────────────────────────────────────── */

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.login-box {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,.1);
  padding: 40px;
  width: 340px;
}

.login-box h1 {
  font-size: 20px;
  margin-bottom: 24px;
  text-align: center;
}

/* ── Dashboard ──────────────────────────────────────────────────────────────── */

header {
  background: #1a1a2e;
  color: #fff;
  padding: 0 24px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header .title { font-size: 16px; font-weight: 600; }

main { padding: 24px; max-width: 1200px; margin: 0 auto; }

.controls {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

.field-row {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.field { display: flex; flex-direction: column; gap: 4px; }
.field.align-end { justify-content: flex-end; }
.field.shortcuts .btn-group { display: flex; gap: 6px; }

label { font-size: 12px; color: #666; font-weight: 500; text-transform: uppercase; letter-spacing: .4px; }

input[type="datetime-local"],
input[type="text"],
input[type="password"] {
  border: 1px solid #d0d0d8;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 14px;
  outline: none;
  transition: border-color .15s;
}

input:focus { border-color: #4a6fa5; }

/* ── Buttons ────────────────────────────────────────────────────────────────── */

.btn-primary, .btn-secondary, button[type="submit"] {
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  transition: opacity .15s;
}

.btn-primary, button[type="submit"] {
  background: #4a6fa5;
  color: #fff;
}

.btn-secondary {
  background: #eef1f6;
  color: #333;
}

.btn-primary:hover, button[type="submit"]:hover { opacity: .88; }
.btn-secondary:hover { background: #dde3ef; }
.btn-secondary.active { background: #4a6fa5; color: #fff; }

.btn-link {
  background: none;
  border: none;
  color: #ccd;
  cursor: pointer;
  font-size: 13px;
}

.btn-link:hover { color: #fff; }

/* ── Tables ─────────────────────────────────────────────────────────────────── */

section { margin-bottom: 32px; }

h2 { font-size: 15px; margin-bottom: 12px; }

.muted { font-weight: 400; color: #888; font-size: 13px; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  font-size: 13px;
}

.data-table th {
  background: #f0f2f8;
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #555;
}

.data-table td {
  padding: 10px 14px;
  border-top: 1px solid #f0f0f4;
}

.data-table tbody tr:hover { background: #fafafe; }

.data-table .num { text-align: right; }
.data-table td.num { font-variant-numeric: tabular-nums; }

.data-table tr.total-row td {
  font-weight: 700;
  background: #f8f9fd;
  border-top: 2px solid #d8dce8;
}

.rtp-high { color: #c0392b; }
.rtp-low  { color: #27ae60; }

/* ── Misc ───────────────────────────────────────────────────────────────────── */

.error {
  color: #c0392b;
  font-size: 13px;
  margin-top: 10px;
}

.hidden { display: none !important; }

#loading {
  text-align: center;
  padding: 40px;
  color: #888;
}
