/* Tidsregistrering — same design language as the other fbdk.dk apps:
   white background, system-ui, pill buttons, blue #185FA5 accent. */
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, sans-serif; background: #f7f8fa; color: #1a1a1a; font-size: 14px; }
.container { max-width: 1100px; margin: 0 auto; padding: 1rem; }
a { color: #185FA5; }

/* top bar */
.topnav { display: flex; align-items: center; gap: 6px; padding: .7rem 1rem; border-bottom: 1px solid #e5e5e5; background: #fff; flex-wrap: wrap; position: sticky; top: 0; z-index: 5; }
.topnav .brand { font-weight: 700; font-size: 15px; color: #111; text-decoration: none; margin-right: 10px; }
.topnav a:not(.brand):not(.whoami) { font-size: 12px; padding: 4px 12px; border-radius: 100px; border: 1px solid #ccc; color: #555; text-decoration: none; }
.topnav a:not(.brand):not(.whoami):hover, .topnav a.on { background: #E6F1FB; color: #185FA5; border-color: #185FA5; }
.spacer { flex: 1; }
.whoami { font-size: 12px; color: #888; margin-right: 4px; text-decoration: none; }
.whoami:hover { color: #185FA5; }
.topnav .linklike { font-size: 12px; padding: 4px 12px; border-radius: 100px; border: 1px solid #ccc; background: #fff; color: #555; cursor: pointer; text-decoration: none; }
.topnav .linklike:hover { background: #f5f5f5; }

h1 { font-size: 20px; margin: .4rem 0 1rem; }
h2 { font-size: 14px; font-weight: 600; margin: 0 0 .8rem; }
h3 { font-size: 13px; font-weight: 600; margin: 1.2rem 0 .6rem; }
.muted { color: #888; font-weight: 400; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.mt { margin-top: .8rem; }
.center { text-align: center; }
.warn, .warn a { color: #A32D2D; }
.crumb { margin: 0; font-size: 12px; }
.crumb a { color: #888; text-decoration: none; }
.note { white-space: pre-line; color: #444; margin-top: -.4rem; }

.card { border: 1px solid #e5e5e5; border-radius: 10px; padding: 1rem 1.1rem; margin-bottom: 12px; background: #fff; }
.card.narrow { max-width: 620px; }

.pagehead { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.pagehead h1 { margin-bottom: .3rem; }
.pagehead p { margin: 0 0 .6rem; }
.pagehead-actions { display: flex; gap: 6px; align-items: center; margin: .4rem 0 .8rem; flex-wrap: wrap; }

/* flash messages */
.flash { font-size: 13px; padding: 8px 14px; border-radius: 8px; margin: .2rem 0 .8rem; font-weight: 600; }
.flash-success { background: #EAF3DE; color: #3B6D11; }
.flash-error { background: #FCEBEB; color: #A32D2D; }

/* forms */
.form label { display: block; font-size: 11px; color: #888; margin-bottom: .8rem; }
.form input:not([type=checkbox]):not([type=radio]),
.form select, .form textarea, .inline-form input, .select, .filters input, .filters select {
  font: inherit; font-size: 13px; height: 32px; padding: 0 8px; border-radius: 6px;
  border: 1px solid #ccc; background: #fff; color: #111; width: 100%; margin-top: 3px; display: block;
}
.form textarea { height: auto; padding: 6px 8px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid #B5D4F4; border-color: #185FA5; }
.select { width: auto; display: inline-block; margin: 0; }
.inline-form { display: flex; gap: 6px; align-items: center; margin: 0; }
.inline-form input { width: auto; flex: 1; margin-top: 0; min-width: 90px; }
.inline-form input.tiny { flex: 0 0 64px; min-width: 0; }
.inline { display: inline; margin: 0; }
.form .row { display: flex; gap: 10px; flex-wrap: wrap; }
.form .row label { flex: 1; min-width: 150px; }
.form .row label.grow2 { flex: 2; }
.form .row label.small-field { flex: 0 1 140px; min-width: 110px; }
.form-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.form-foot .check { margin: 0; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px !important; color: #333 !important; }
.check input { width: auto; height: auto; margin: 0; display: inline; accent-color: #185FA5; }
.req { color: #A32D2D; margin-left: 2px; }
.filters { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.filters input { flex: 1; min-width: 200px; margin: 0; width: auto; }
.filters select { width: auto; margin: 0; }

/* buttons */
.btn { font-size: 12px; padding: 6px 14px; border-radius: 100px; border: 1px solid #ccc; background: #fff; color: #555; cursor: pointer; font-weight: 600; text-decoration: none; display: inline-block; line-height: 1.4; }
.btn:hover { background: #f5f5f5; }
.btn.primary { background: #185FA5; border-color: #185FA5; color: #fff; }
.btn.primary:hover { background: #0C447C; }
.btn.small { padding: 3px 10px; font-size: 11px; }
.btn.wide { width: 100%; padding: 9px; font-size: 13px; }
.linklike { background: none; border: none; padding: 0; color: #185FA5; cursor: pointer; font: inherit; font-size: 12px; text-decoration: underline; }
.linklike.danger { color: #A32D2D; }

/* tables */
.scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 12px; }
.table th { text-align: left; padding: 6px 10px; color: #888; font-weight: 400; border-bottom: 1px solid #e5e5e5; font-size: 11px; white-space: nowrap; }
.table td { padding: 6px 10px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tfoot td { border-top: 1px solid #e5e5e5; border-bottom: none; font-weight: 600; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table tr.inactive td { opacity: .55; }
.table a { text-decoration: none; }
.grid th.today, .grid td.today { background: #F3F8FD; }
.bar-col { width: 40%; }
.budget-cell { min-width: 140px; }
.hint { font-size: 12px; color: #888; }
.tag { display: inline-block; font-size: 10px; font-weight: 600; padding: 1px 7px; border-radius: 100px; background: #F1EFE8; color: #5F5E5A; margin-left: 4px; vertical-align: 1px; }
details summary { font-size: 13px; font-weight: 600; cursor: pointer; }

/* tiles */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 12px; }
.tile { background: #fff; border: 1px solid #e5e5e5; border-radius: 10px; padding: .8rem 1rem; }
.tile-label { font-size: 11px; color: #888; }
.tile-value { font-size: 24px; font-weight: 700; margin: 2px 0 4px; font-variant-numeric: tabular-nums; }
.tile-sub { font-size: 11px; color: #888; }
.tile-warn .tile-value { color: #A32D2D; }
.tile-ok .tile-value { color: #3B6D11; }

/* progress bars */
.bar { height: 6px; background: #EEF0F3; border-radius: 100px; overflow: hidden; margin: 4px 0; }
.bar span { display: block; height: 100%; background: #185FA5; border-radius: 100px; }
.bar.near span { background: #BA7517; }
.bar.over span { background: #A32D2D; }
.hbar { display: grid; grid-template-columns: minmax(90px, 35%) 1fr 64px; gap: 10px; align-items: center; font-size: 12px; padding: 4px 0; }
.hbar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { height: 8px; background: #EEF0F3; border-radius: 100px; overflow: hidden; }
.hbar-track span { display: block; height: 100%; background: #185FA5; }
.hbar-val { text-align: right; font-variant-numeric: tabular-nums; color: #555; }

/* week page */
.split { display: grid; grid-template-columns: 3fr 2fr; gap: 12px; align-items: start; }
.split > .card { margin-bottom: 12px; }
.timer-card.running { border-color: #185FA5; background: #F3F8FD; }
.timer-display { font-size: 38px; font-weight: 700; font-variant-numeric: tabular-nums; color: #185FA5; letter-spacing: .5px; }
.timer-what { margin: .3rem 0 0; }
.day { background: #fff; border: 1px solid #e5e5e5; border-radius: 10px; margin-bottom: 8px; overflow: hidden; }
.day.is-today { border-color: #85B7EB; }
.day-head { display: flex; justify-content: space-between; padding: 7px 12px; background: #FAFAFA; border-bottom: 1px solid #eee; font-size: 12px; font-weight: 600; }
.day.is-today .day-head { background: #E6F1FB; color: #0C447C; }
.entry { display: flex; gap: 12px; align-items: center; padding: 8px 12px; border-bottom: 1px solid #f3f3f3; font-size: 13px; }
.entry:last-child { border-bottom: none; }
.entry.empty { color: #aaa; font-size: 12px; }
.entry-time { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 44px; }
.entry-main { flex: 1; min-width: 0; }
.entry-main .muted { font-size: 12px; margin-top: 2px; }
.entry-actions { display: flex; gap: 10px; white-space: nowrap; }

/* login / setup */
.auth-card { max-width: 380px; margin: 8vh auto 0; }
.auth-card h1 { font-size: 18px; text-align: center; }
.auth-card p { font-size: 13px; color: #555; }

@media (max-width: 800px) {
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .form .row { flex-direction: column; gap: 0; }
  .form .row label.small-field { flex: 1; }
  .container { padding: .8rem; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .tiles .tile:last-child { grid-column: span 2; }
  .tile-value { font-size: 20px; }
  .entry { flex-wrap: wrap; }
  .entry-actions { width: 100%; justify-content: flex-end; }
  .topnav .whoami { display: none; }
}
