/* Webversie */
body.app { min-height: 100vh; }
.boot { display: grid; place-items: center; min-height: 100vh; color: var(--muted); }
.hidden { display: none !important; }
.caps { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }

/* formulieren */
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-weight: 600; font-size: 13px; margin-bottom: 5px; }
label.field small, .help { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], select, textarea {
  width: 100%; height: 40px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--input); color: var(--text); font: inherit; font-size: 14px;
}
textarea { height: auto; min-height: 96px; padding: 10px 12px; font-family: var(--mono); font-size: 13px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 0; border-color: var(--accent); }
label.check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; cursor: pointer; }
label.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
label.check small { display: block; color: var(--muted); font-size: 12px; }
.input-row { display: flex; gap: 8px; }
.input-row > input, .input-row > select { flex: 1; min-width: 0; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.cols.c3 { grid-template-columns: 2fr 1fr; }
@media (max-width: 640px) { .cols, .cols.c3 { grid-template-columns: 1fr; } }

.msg { min-height: 20px; font-size: 13px; color: var(--muted); margin: 4px 0 12px; }
.msg.error { color: var(--red); }
.msg.ok { color: var(--green); }

/* inloggen */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 420px; padding: 30px; box-shadow: var(--shadow); }
.auth-card .brand { margin-bottom: 22px; }
.auth-card h1 { font-size: 24px; }
.auth-card .fine { font-size: 12px; color: var(--muted); margin: 16px 0 0; }

/* indeling */
.shell { display: grid; grid-template-columns: 280px 1fr; min-height: 100vh; }
.side {
  background: var(--surface); border-right: 1px solid var(--border); padding: 20px 16px;
  display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.side .brand { margin: 0 6px 18px; }
.side .caps { margin: 14px 8px 6px; }
.proj-list { display: flex; flex-direction: column; gap: 2px; }
.proj-item {
  display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; cursor: pointer;
  border: 0; background: transparent; color: var(--text); text-align: left; font: inherit; width: 100%;
}
.proj-item:hover { background: var(--surface-2); }
.proj-item.on { background: var(--accent-soft); }
.proj-item.on b { color: var(--accent); }
.proj-item b { display: block; font-size: 14px; }
.proj-item span { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-item > div { min-width: 0; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border); flex: none; }
.dot.ok { background: var(--green); }
.dot.err { background: var(--red); }
.dot.busy { background: var(--accent); }
.acct { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; display: flex; align-items: center; gap: 8px; }
.acct > div { flex: 1; min-width: 0; }
.acct b, .acct span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct span { font-size: 12px; color: var(--muted); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface-2); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 13px; padding: 6px; border-radius: 8px; cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

.main { padding: 26px 32px 40px; min-width: 0; }
.proj-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.proj-head h1 { font-size: 26px; margin: 0; }
.badge { font-size: 11px; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--green-soft); color: var(--green); }
.badge.err { background: var(--red-soft); color: var(--red); }
.badge.busy { background: var(--accent-soft); color: var(--accent); }
.tabs { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; margin-bottom: 18px; }
.tabs button { border: 0; background: transparent; color: var(--muted); font: 600 14px inherit; font-family: inherit; padding: 8px 16px; border-radius: 8px; cursor: pointer; }
.tabs button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

.banner { border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; font-size: 14px; }
.banner.info { background: var(--accent-soft); color: var(--accent); }
.banner.success { background: var(--green-soft); color: var(--green); }
.banner.warning { background: var(--amber-soft); color: var(--amber); }
.banner.error { background: var(--red-soft); color: var(--red); }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 16px; }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr; } }
.stat .caps { margin-bottom: 8px; }
.stat h3 { font-size: 16px; margin: 0 0 4px; overflow-wrap: anywhere; }
.stat p { font-size: 13px; }
.actions-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.progress { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-bottom: 8px; }
.progress > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.progress.indeterminate > i { width: 30%; animation: slide 1.1s infinite ease-in-out; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
.activity { font-size: 13px; color: var(--muted); min-height: 20px; margin-bottom: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.plan h3 { font-size: 15px; margin: 18px 0 8px; }
.plan ul { list-style: none; padding: 0; margin: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.plan li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 12px; font-family: var(--mono); font-size: 12.5px; border-top: 1px solid var(--border); }
.plan li:first-child { border-top: 0; }
.plan li span:first-child { overflow-wrap: anywhere; }
.plan li .size { color: var(--muted); white-space: nowrap; }
.plan details summary { cursor: pointer; color: var(--muted); margin: 14px 0 8px; }

.form-card { margin-bottom: 16px; }
.form-card h2 { font-size: 16px; margin-bottom: 4px; }
.form-card > p { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.save-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; position: sticky; bottom: 0; padding: 12px 0; background: var(--bg); }
.save-bar .status { margin-right: auto; font-size: 13px; color: var(--muted); }
.save-bar .status.dirty { color: var(--amber); }

.log { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px; font-family: var(--mono); font-size: 12.5px; white-space: pre-wrap; overflow-wrap: anywhere; min-height: 300px; max-height: 65vh; overflow-y: auto; margin: 0 0 12px; }

.welcome { max-width: 560px; margin: 12vh auto 0; text-align: center; }
.welcome img { width: 72px; margin-bottom: 14px; }
.welcome p { color: var(--muted); }

/* venster */
.modal-wrap { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal { width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; background: var(--surface); border-radius: 16px; padding: 26px; box-shadow: var(--shadow); }
.modal h2 { font-size: 20px; }
.modal .foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.code-box { font: 700 32px/1 var(--mono); letter-spacing: .08em; text-align: center; padding: 18px; background: var(--surface-2); border-radius: 12px; margin: 14px 0; }
.repo-list { max-height: 50vh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.repo-item { text-align: left; border: 1px solid var(--border); background: var(--bg); color: var(--text); border-radius: 10px; padding: 10px 12px; cursor: pointer; font: inherit; }
.repo-item:hover { border-color: var(--accent); }
.repo-item b { display: block; }
.repo-item span { color: var(--muted); font-size: 12px; }
.pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 6px; background: var(--surface-2); color: var(--muted); margin-left: 6px; }

/* mobiel */
.menu-btn { display: none; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 290px; z-index: 40; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  .shell.menu-open .side { transform: none; }
  .main { padding: 16px; }
  .menu-btn { display: inline-flex; margin-bottom: 12px; }
}
