/* Eén stylesheet voor de hele app (vroeger stond dit in elk bestand apart) */
:root { --bg:#121212; --card:#1f1f1f; --rand:#333; --tekst:#fff; --zacht:#888; --blauw:#007bff; --groen:#28a745; --rood:#ff4444; --geel:#ffc107; }
* { box-sizing: border-box; }
body { font-family: 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--tekst); margin: 0; padding: 16px 16px 110px; }
.container { max-width: 720px; margin: 0 auto; }
.container.breed { max-width: 1200px; }
h1 { margin: 10px 0 15px; } h2 { color: var(--blauw); margin-top: 0; } h3 { margin-top: 0; }
a { color: var(--blauw); }
.muted { color: var(--zacht); } small.muted { font-size: .8em; }
.rood { color: var(--rood); } .groen { color: var(--groen); }

.topnav { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border-bottom: 1px solid var(--rand); padding-bottom: 12px; margin-bottom: 15px; }
.topnav a { color: #aaa; text-decoration: none; padding: 8px 12px; border-radius: 8px; font-size: .9em; font-weight: bold; }
.topnav a.actief, .topnav a:hover { background: var(--blauw); color: #fff; }
.topnav form { margin-left: auto; }
.link-btn { background: none; border: none; color: var(--rood); cursor: pointer; font-size: .9em; padding: 8px; }

.card { background: var(--card); padding: 16px; border-radius: 12px; margin-bottom: 16px; border: 1px solid var(--rand); }
.rij { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

.btn { display: block; padding: 14px; text-align: center; background: var(--blauw); color: #fff; text-decoration: none; border: none; border-radius: 10px; font-weight: bold; font-size: 1em; cursor: pointer; }
.btn:hover { opacity: .9; }
.btn-groen { background: var(--groen); } .btn-grijs { background: #333; color: #aaa; border: 1px solid #444; }
.btn-rood { background: var(--rood); } .btn-klein { display: inline-block; padding: 10px 15px; }
.btn-outline { background: none; border: 1px solid #555; color: #aaa; width: 100%; margin-top: 10px; }
.btn-vast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); width: calc(100% - 40px); max-width: 680px; box-shadow: 0 4px 15px rgba(0,0,0,.5); z-index: 50; }
.btn-icoon { background: none; border: none; cursor: pointer; font-size: 18px; color: var(--rood); padding: 0 0 0 12px; text-decoration: none; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

input[type=text], input[type=password], input[type=number], textarea, select {
    width: 100%; padding: 12px; margin: 6px 0; background: #000; border: 1px solid #444; color: #fff; border-radius: 8px; font-size: 16px; font-family: inherit; }
textarea { font-family: monospace; min-height: 100px; }
label { display: block; color: #aaa; margin-top: 8px; font-size: .9em; }

.melding { padding: 10px 14px; border-radius: 8px; margin-bottom: 15px; font-weight: bold; }
.melding.ok { background: rgba(40,167,69,.15); color: #4cd964; } .melding.fout { background: rgba(255,68,68,.15); color: var(--rood); }

.balk { background: #333; height: 12px; border-radius: 6px; overflow: hidden; margin: 10px 0; }
.balk > div { height: 100%; background: var(--blauw); transition: width .5s; } .balk.over > div { background: var(--rood); }
.macro { text-align: center; font-size: .85em; } .macro canvas { max-height: 80px; margin-bottom: 5px; }

.log-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--rand); }
.log-item:last-child { border: none; } .log-info { display: flex; flex-direction: column; }
.datum-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.datum-nav a { color: #aaa; text-decoration: none; padding: 8px 14px; background: #1f1f1f; border-radius: 8px; border: 1px solid var(--rand); }
.datum-nav a.uit { opacity: .3; pointer-events: none; }

.lijst { background: var(--card); border-radius: 12px; border: 1px solid var(--rand); }
.lijst-item { padding: 14px; border-bottom: 1px solid var(--rand); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.lijst-item:last-child { border: none; } .lijst-item.klik { cursor: pointer; }
.gram-input { width: 80px !important; margin: 0 !important; text-align: center; }

.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.9); justify-content: center; align-items: center; z-index: 1000; }
.modal-inhoud { background: var(--card); padding: 20px; border-radius: 15px; width: 90%; max-width: 380px; border: 1px solid var(--rand); max-height: 95vh; overflow-y: auto; }
.tabs { display: flex; background: #000; border-radius: 10px; margin-bottom: 15px; padding: 4px; }
.tab { flex: 1; padding: 10px; text-align: center; cursor: pointer; border-radius: 8px; color: #888; font-weight: bold; }
.tab.actief { background: var(--blauw); color: #fff; }
.portie-kaart { background: #262626; padding: 15px; border-radius: 10px; border: 1px solid #444; margin-bottom: 10px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.portie-hulp { background: #1a1a1a; padding: 15px; border-radius: 10px; border: 1px dashed #555; margin-top: 10px; }
.vink { display: flex; align-items: center; gap: 10px; color: #aaa; }
.vink input { width: 20px !important; margin: 0 !important; }
#reader { width: 100%; border-radius: 12px; overflow: hidden; margin-bottom: 15px; display: none; background: #000; border: 1px solid var(--rand); }

table { width: 100%; border-collapse: collapse; background: #1a1a1a; }
th, td { padding: 10px; border: 1px solid var(--rand); text-align: left; font-size: .9em; }
th { background: #222; color: var(--blauw); } .tabel-scroll { overflow-x: auto; }
.pil { display: inline-block; background: #1f1f1f; color: var(--blauw); border: 1px solid var(--blauw); padding: 8px 14px; text-decoration: none; border-radius: 6px; margin: 4px 4px 4px 0; font-weight: bold; }
.pil.actief, .pil:hover { background: var(--blauw); color: #fff; }

.login-box { max-width: 340px; margin: 12vh auto 0; }
#grafiek-vak { height: 360px; position: relative; }

/* Trainingsschema */
.check { width: 38px; height: 38px; border-radius: 50%; border: 2px solid #555; background: none; color: #555; font-size: 18px; cursor: pointer; flex-shrink: 0; }
.check.klaar { background: var(--groen); border-color: var(--groen); color: #fff; }
.doorgestreept { opacity: .55; } .doorgestreept strong { text-decoration: line-through; }
.resultaten { max-height: 260px; overflow-y: auto; margin: 8px 0; }
.uitleg { margin-top: 6px; font-size: .85em; color: #aaa; }
.uitleg summary { cursor: pointer; color: var(--blauw); }
.uitleg p { margin: 6px 0 0; line-height: 1.5; }

/* Sets per oefening */
.oef-blok { padding: 14px 0; border-bottom: 1px solid var(--rand); }
.oef-blok:last-child { border: none; }
.set-rij { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.set-rij input[type=number] { width: 78px; margin: 0; text-align: center; padding: 10px 6px; }
.set-rij input[readonly] { opacity: .6; }
.set-nr { color: var(--zacht); font-size: .85em; min-width: 46px; }
.set-rij .check { margin-left: auto; }
.set-tekst { margin-top: 6px; color: #ccc; }
