@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;700&family=Source+Serif+4:ital,wght@0,300;0,400;1,300&display=swap');

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

:root {
    --bg:       #0f0f0f;
    --surface:  #1a1a1a;
    --surface2: #242424;
    --surface3: #2e2e2e;
    --accent:   #e87d2e;
    --accent2:  #f5a857;
    --text:     #e8e0d4;
    --muted:    #7a7268;
    --border:   #333;
    --green:    #4caf7d;
    --red:      #e05252;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Oswald', sans-serif;
    font-size: 15px;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* ── Nav header ── */
.odo-nav {
  max-width: 960px;
  margin: 0 auto 1.5rem;
  padding: 1rem 1rem 0;
}

.odo-nav-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.75rem;
}

.odo-nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.odo-nav-icon {
  font-size: 28px;
  color: var(--accent);
  line-height: 1;
}

.odo-nav-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
}

.odo-nav-sub {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  letter-spacing: 0.5px;
}

/* ── Tabs ── */
.odo-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border-radius: 6px;
  padding: 4px;
}

.odo-tab {
  flex: 1;
  padding: 8px 12px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.2s;
}

.odo-tab:hover:not(.active) {
  color: var(--text);
  background: var(--surface2);
}

.odo-tab.active {
  background: var(--accent);
  color: #0f0f0f;
  font-weight: 500;
}

/* ── Layout ── */
.odo-wrap {
    max-width: 960px;
    margin: 1.5rem auto;
    padding: 0 1rem;
}

/* ── Motor balk ── */
.motor-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px 16px;
    margin-bottom: 1.25rem;
    gap: 12px;
    flex-wrap: wrap;
}

.motor-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 500;
}

.motor-name strong { color: var(--accent); }

.motor-sub {
    font-size: 12px;
    color: var(--muted);
    letter-spacing: .5px;
}

.motor-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.switch-menu { position: relative; }

.switch-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 4px;
    min-width: 180px;
    z-index: 100;
}

.switch-dropdown.open { display: block; }

.switch-dropdown a {
    display: block;
    padding: 8px 14px;
    font-size: 13px;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    transition: background .15s;
}

.switch-dropdown a:last-child { border-bottom: none; }
.switch-dropdown a:hover { background: var(--surface3); color: var(--accent); }

/* ── Stat kaarten ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 1.25rem;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 14px 16px;
}

.stat-icon {
    font-size: 18px;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 4px;
}

/* ── Cards ── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.card h3 {
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 1rem;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    font-weight: 400;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid var(--border);
}

.card-header h2,
.card-header h3 {
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 400;
    border: none;
    padding: 0;
    margin: 0;
}

.card-title {
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 1rem;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.card-footer {
    margin-top: 1rem;
    padding-top: .75rem;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--muted);
}

.card-footer a:hover { color: var(--accent); }

/* ── Progress bar ── */
.progress-card h3 { margin-bottom: .5rem; }

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
}

.progress-bar-wrap {
    background: var(--surface2);
    border-radius: 4px;
    height: 20px;
    overflow: hidden;
    margin: 4px 0;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
    font-size: 11px;
    font-weight: 700;
    color: #0f0f0f;
    transition: width .6s;
    min-width: 2rem;
}

.progress-hint {
    font-size: 11px;
    color: var(--muted);
    margin-top: 6px;
}

/* ── Tables ── */
.odo-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.odo-table th {
    text-align: left;
    font-size: 11px;
    letter-spacing: 1.5px;
    color: var(--muted);
    padding: 6px 10px;
    border-bottom: 1px solid var(--border);
    font-weight: 400;
}

.odo-table td {
    padding: 7px 10px;
    border-bottom: 1px solid rgba(255,255,255,.05);
}

.odo-table tr:last-child td { border-bottom: none; }
.odo-table tr:hover td { background: rgba(255,255,255,.03); }

.odo-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.odo-table .acc { color: var(--accent); font-weight: 500; }

.diff { font-size: 12px; }
.diff.pos { color: var(--green); }
.diff.neg { color: var(--red); }

.actions-col { text-align: right; white-space: nowrap; }

.delta {
    font-size: 11px;
    color: var(--green);
    margin-left: 6px;
}

/* ── Forms ── */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 1rem;
}

.form-group { margin-bottom: .75rem; }

.form-group label {
    display: block;
    font-size: 11px;
    letter-spacing: 1.5px;
    color: var(--muted);
    margin-bottom: 6px;
    text-transform: uppercase;
}

input[type=text],
input[type=number],
input[type=date],
select,
textarea {
    width: 100%;
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 9px 12px;
    border-radius: 4px;
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color .2s;
}

input:focus, select:focus, textarea:focus { border-color: var(--accent); }
select option { background: var(--surface); }

/* ── Buttons ── */
.btn {
    display: inline-block;
    background: var(--accent);
    color: #0f0f0f;
    border: none;
    padding: 10px 20px;
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 4px;
    font-weight: 500;
    transition: background .2s, color .2s, border-color .2s;
    text-decoration: none;
}

.btn:hover { background: var(--accent2); color: #0f0f0f; }

.btn-primary { background: var(--accent); color: #0f0f0f; }
.btn-primary:hover { background: var(--accent2); }

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: transparent; }

.btn-danger {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
}

.btn-danger:hover { border-color: var(--red); color: var(--red); background: rgba(224,82,82,.1); }

.btn-sm  { padding: 6px 12px; font-size: 12px; }
.btn-xs  { padding: 3px 8px;  font-size: 11px; }

/* ── Flashdata / alerts ── */
.alert, p.flashdata {
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 13px;
    margin: 0 auto 1rem;
    max-width: 960px;
}

p.flashdata {
    background: rgba(76,175,125,.1);
    border: 1px solid rgba(76,175,125,.3);
    color: var(--green);
    padding: 10px 1rem;
}

.alert-warn {
    background: rgba(232,125,46,.15);
    border: 1px solid rgba(232,125,46,.4);
    color: var(--accent2);
}

.alert-info {
    background: rgba(76,175,125,.1);
    border: 1px solid rgba(76,175,125,.3);
    color: var(--green);
}

/* ── Motor badge ── */
.motor-badge {
    display: inline-block;
    background: var(--surface3);
    border: 1px solid var(--border);
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 1px;
}

.motor-badge.active { border-color: var(--accent); color: var(--accent); }

/* ── Motor list (motors pagina) ── */
.motor-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,.05);
}

.motor-row:last-child { border-bottom: none; }
.motor-row-info { flex: 1; }

.motor-row-name {
    font-size: 15px;
    font-weight: 500;
}

.motor-row-name.active { color: var(--accent); }

.motor-row-meta {
    font-size: 12px;
    color: var(--muted);
    margin-top: 3px;
}

/* ── Charts ── */
.chart-wrap  { position: relative; width: 100%; height: 260px; margin-bottom: .5rem; }
.chart-wrap2 { position: relative; width: 100%; height: 200px; }

/* ── Divider ── */
.divider { height: 1px; background: var(--border); margin: 1rem 0; }

/* ── Empty state ── */
.empty-msg {
    padding: 2rem 0;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.empty-msg a { color: var(--accent); }
.empty-msg a:hover { color: var(--accent2); }

/* ── Responsive ── */
@media (max-width: 600px) {
    .form-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .odo-nav { padding: 0 .75rem; gap: 2px; }
    .odo-wrap { padding: 0 .75rem; margin-top: 1rem; }
    .motor-bar { flex-direction: column; align-items: flex-start; }
}

/* Logo in navigatiebalk */
.odo-nav-logo {
  height: 52px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
  transition: filter 0.2s ease;
}

.odo-nav-brand:hover .odo-nav-logo {
  filter: drop-shadow(0 2px 10px rgba(232, 125, 46, 0.6));
}

/* Hero-sectie met logo */
.odo-hero-wrap {
  max-width: 960px;
  margin: 2rem auto 0;
  padding: 0 1rem;
}

.odo-hero {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1.5rem 1.25rem;
  background: linear-gradient(135deg, #1a1a1a 0%, #242424 100%);
  border: 1px solid rgba(232, 125, 46, 0.25);
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(232,125,46,0.08);
}

.odo-hero-logo {
  width: 180px;
  height: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.6));
}

.odo-hero-text {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.odo-hero-title {
  font-family: 'Oswald', sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: #f0ece6;
  letter-spacing: 0.04em;
  margin: 0;
  line-height: 1;
}

.odo-hero-sub {
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  color: #e87d2e;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
}

@media (max-width: 540px) {
  .odo-hero {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  .odo-hero-logo { width: 140px; }
  .odo-hero-title { font-size: 1.8rem; }
}

.form-row {
  display: flex;
  gap: 10px;           /* optioneel, voor ruimte tussen veld en knop */
  align-items: center; /* netjes uitlijnen */
}

/* ── Paginering ── */
.tg-showing-statement {
    font-size: 11px;
    letter-spacing: 1px;
    color: var(--muted);
    text-transform: uppercase;
    margin-bottom: .75rem;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: .75rem 0;
}

.pagination a {
    display: inline-block;
    padding: 5px 11px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 12px;
    color: var(--muted);
    letter-spacing: .5px;
    transition: border-color .15s, color .15s, background .15s;
    text-decoration: none;
}

.pagination a:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--surface2);
}

.pagination a.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #0f0f0f;
    font-weight: 500;
    pointer-events: none;
}
