/* Veyra Cloud: opmaak in de stijl van VeyraHub (zelfde kleuren, kop met streep, zijbalk met groepen, werkvlak met kaarten),
   met de indeling van Trakt (profielkaart met statistieken, rijen per onderdeel, losse pagina's met filters). */
@font-face { font-family: "Veyra Display"; src: url("/fonts/VeyraDisplay.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Veyra Tagline"; src: url("/fonts/VeyraTagline.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  color-scheme: dark;
  --black: #020507; --cyan: #20d6f5; --red: #ff375f; --white: #f7fbfd; --muted: #929ba2; --danger: #ff6b7e; --line: #1d2f37;
  --ice: #a8f0ff; --panel: #0b1b23;
  --focus: 0 0 0 2px var(--black), 0 0 0 4px var(--cyan);
}
* { box-sizing: border-box; }
html { background: var(--black); }
body {
  margin: 0; min-height: 100vh; color: var(--white);
  background: radial-gradient(70% 45% at 8% 0, #0c2530 0, transparent 55%), radial-gradient(60% 40% at 100% 40%, #210b12 0, transparent 65%), var(--black);
  font: 14px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 0; background: var(--cyan); color: #001015; padding: 8px 12px; z-index: 20; }
.skip:focus { left: 8px; top: 8px; }
.shell { width: min(1680px, 100%); margin: auto; padding: 20px 20px 60px; }

/* Kop */
.hero { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.rail { width: 4px; height: 44px; border-radius: 4px; background: linear-gradient(var(--cyan), #a8d9e3 48%, var(--red)); flex: none; }
.hero-text { flex: 1; min-width: 0; }
.eyebrow { color: #8b949b; font-size: 10.5px; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; }
.wordmark {
  font-family: "Veyra Display", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  font-weight: 400; text-transform: uppercase; letter-spacing: .09em; line-height: 1.16; margin: 4px 0 0; font-size: 27px;
  background-image: linear-gradient(180deg, #ffffff 0%, #d5dce6 34%, #9fb4cc 68%, #63b8ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px rgba(43, 168, 255, .5)) drop-shadow(0 0 6px rgba(43, 168, 255, .42));
}
.tagline {
  font-family: "Veyra Tagline", -apple-system, sans-serif; font-size: 11px; letter-spacing: .14em; margin-top: 4px;
  background: linear-gradient(180deg, #ffffff, #b9d8f5); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 14px rgba(43, 168, 255, .5)) drop-shadow(0 0 5px rgba(43, 168, 255, .42));
}
.hero-actions { display: flex; gap: 8px; align-items: center; }
.badge { padding: 5px 10px; border: 1px solid #245463; border-radius: 999px; color: var(--cyan); font-size: 11px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; background: #07161c; min-height: 0; min-width: 0; cursor: pointer; }

/* Indeling: zijbalk links, werkvlak rechts */
.hub-layout { display: grid; grid-template-columns: 222px minmax(0, 1fr); gap: 36px; align-items: start; margin-top: 22px; }
.hub-layout.single { display: block; }
.hub-sidebar { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow: auto; padding-right: 18px; border-right: 1px solid var(--line); scrollbar-width: thin; }
.nav-brand { display: flex; gap: 11px; align-items: center; padding: 2px 10px 22px; font-size: 15px; font-weight: 750; }
.nav-brand b { display: block; font-weight: 750; }
.nav-brand span:not(.nav-brand-mark) { display: block; color: var(--muted); font-size: 11px; font-weight: 400; margin-top: 3px; }
.nav-brand-mark { display: grid; place-items: center; flex: none; width: 34px; height: 38px; border-radius: 11px; background: linear-gradient(135deg, #133e4a, #20111c); border: 1px solid #31515a; color: var(--cyan); font-size: 21px; font-weight: 800; }
.nav-group + .nav-group { margin-top: 22px; }
.nav-group-label { padding: 0 12px; margin: 0 0 7px; font-size: 10px; text-transform: uppercase; letter-spacing: .13em; font-weight: 700; color: #75858f; }
.tab {
  display: flex; align-items: center; gap: 11px; width: 100%; border: 1px solid transparent; border-radius: 10px; background: transparent;
  color: #a7b6bf; padding: 10px 11px; margin: 2px 0; font-weight: 500; font-size: 13px; text-decoration: none; min-height: 40px;
}
.tab:hover { background: #0a1b23; color: var(--white); }
.tab.active { background: #0c2832; border-color: #1c4a58; color: var(--cyan); }
.tab svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.nav-footer { font-size: 10px; color: #788994; margin: 26px 12px 4px; }
.nav-footer-line { display: block; height: 2px; width: 32px; background: linear-gradient(90deg, var(--cyan), var(--red)); margin-bottom: 12px; border-radius: 2px; }
.tmdb-attr { display: flex; gap: 8px; align-items: flex-start; margin-top: 14px; color: #788994; text-decoration: none; line-height: 1.35; }
.tmdb-attr:hover { color: #a8b8c2; }
.tmdb-attr img { flex: none; margin-top: 1px; opacity: .9; }
.hub-workspace { min-width: 0; }
.mobile-navigation { display: none; }

/* Werkvlak */
.main { min-height: 50vh; }
.main h1 { font-size: 30px; letter-spacing: -.04em; line-height: 1.15; margin: 0 0 4px; font-weight: 750; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.main h2 { font-size: 16px; font-weight: 650; color: #e4edf3; margin: 22px 0 10px; }
.muted { color: var(--muted); }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.stack { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }   /* minmax(0,…): een rij die breder is dan het scherm schuift zelf, de pagina niet */
.main { min-width: 0; }
.card {
  border: 1px solid transparent; border-radius: 16px; padding: 16px; margin-bottom: 12px;
  background: linear-gradient(125deg, #0b1b23, #0b1119) padding-box, linear-gradient(125deg, #294450, #1b2d38 65%, #352029) border-box;
}
.grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: #08151b; }
.stat .n { font-size: 22px; font-weight: 800; line-height: 1.15; color: var(--white); }
.stat .muted { font-size: 12px; }

/* Profielkaart (zoals Trakt: wie ben je, deze maand, dit jaar, altijd) */
.profile-card { display: grid; grid-template-columns: minmax(180px, 1fr) repeat(3, minmax(0, 1fr)); gap: 20px; padding: 18px; align-items: start; }
.profile-id { display: flex; gap: 12px; align-items: center; min-width: 0; }
.avatar { width: 52px; height: 52px; border-radius: 50%; border: 2px solid #31515a; background: #08151b center / 70% no-repeat url("/brandmark.png"); flex: none; }
.profile-id strong { display: block; font-size: 17px; }
.profile-block { min-width: 0; }
.profile-block .label { font-size: 10px; letter-spacing: .13em; text-transform: uppercase; color: #75858f; font-weight: 700; margin-bottom: 8px; }
.profile-block .figure { display: flex; gap: 14px; flex-wrap: wrap; }
.profile-block .figure div { min-width: 56px; }
.profile-block .figure b { display: block; font-size: 22px; font-weight: 800; line-height: 1.1; }
.profile-block .figure span { color: var(--muted); font-size: 11.5px; }

/* Rijen (zoals Trakt: kop met 'Meer', daaronder een rij kaarten) */
.rail-head { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 0 10px; }
.rail-head h2 { margin: 0; }
.rail-head a { color: var(--cyan); text-decoration: none; font-size: 12.5px; font-weight: 650; }
.rail-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
.rail-card { flex: none; width: 150px; display: grid; gap: 6px; }
.rail-card .tile { min-height: 110px; }
.rail-card .poster-wrap { position: relative; }
.rail-card .prog {
  position: absolute; left: 8px; right: 8px; bottom: 8px; height: 3px;
  border-radius: 2px; background: rgba(0,0,0,.45); overflow: hidden;
}
.rail-card .prog > i { display: block; height: 100%; background: var(--cyan); }
.bigyear { font-size: 44px; font-weight: 800; line-height: 1; letter-spacing: .02em; margin: 2px 0 10px; background: linear-gradient(180deg,#fff,#9fb4cc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rail-card .k { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--cyan); }
.rail-card .t { font-size: 12.5px; font-weight: 650; line-height: 1.25; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rail-card .s { font-size: 11px; color: var(--muted); }
.rail-empty { color: var(--muted); font-size: 12.5px; padding: 6px 2px; }

.tile {
  min-height: 120px; border-radius: 14px; border: 1px solid var(--line); display: grid; place-items: center; font-size: 2rem; font-weight: 700;
  background: linear-gradient(145deg, #133e4a, #08151b 65%, #20111c); color: var(--ice);
}

/* Filters en keuzes */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { min-height: 0; min-width: 0; padding: 6px 13px; border-radius: 999px; border: 1px solid #21414c; background: #08151b; color: #a9c3cb; font-size: 12.5px; font-weight: 650; cursor: pointer; }
.chip.on { background: var(--cyan); border-color: var(--cyan); color: #001015; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar input[type="search"] { flex: 1 1 220px; }

button, .btn {
  min-height: 40px; min-width: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--cyan); background: var(--cyan); color: #001015;
  font-weight: 700; font-size: 13.5px; cursor: pointer; white-space: nowrap;
}
.btn.linkbtn { display: inline-flex; align-items: center; padding: 10px 14px; text-decoration: none; word-break: break-all; text-align: center; white-space: normal; }
button.ghost, .btn.ghost { background: #08151b; color: var(--cyan); border-color: #28505c; }
button.danger, button.ghost.danger { background: #170a0f; color: var(--danger); border-color: #582332; }
button:hover { filter: brightness(1.12); }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: none; box-shadow: var(--focus); }
input, select {
  width: 100%; min-height: 40px; padding: 9px 12px; border-radius: 10px; border: 1px solid #263b44; background: #050b0f; color: var(--white); font-size: 13.5px; outline: none;
}
input:focus, select:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px #20d6f51c; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 12.5px; }

/* Lijsten en balken */
.list-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row .sub { color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.score { display: inline-grid; place-items: center; min-width: 34px; height: 26px; padding: 0 8px; border-radius: 9px; background: #0a3a46; color: var(--cyan); font-weight: 800; font-size: 12.5px; }
.bars { display: grid; gap: 6px; align-items: end; grid-auto-flow: column; grid-auto-columns: 1fr; height: 140px; }
.bars .bar { background: linear-gradient(180deg, var(--cyan), #0a4a5c); border-radius: 6px 6px 2px 2px; min-height: 2px; }
.dist { display: grid; gap: 5px; }
.dist-row { display: grid; grid-template-columns: 22px 1fr 34px; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); }
.dist-row.genre { grid-template-columns: minmax(6.5rem, 1.1fr) 1.4fr 4.5rem; }
.dist-row .track { height: 8px; border-radius: 6px; background: #08151b; border: 1px solid var(--line); overflow: hidden; }
.dist-row .fill { height: 100%; background: linear-gradient(90deg, var(--cyan), #0a4a5c); }
.day-head { font-size: 11px; letter-spacing: .13em; text-transform: uppercase; color: #75858f; font-weight: 700; margin: 16px 0 4px; }
.day-head:first-child { margin-top: 0; }
.status { padding: 24px; text-align: center; color: var(--muted); }
.error { color: #ff8da0; }

/* Inloggen */
.login-box { max-width: 440px; margin: 40px auto; }
.brand { display: flex; align-items: center; gap: 14px; }
.mark { width: 44px; height: 44px; object-fit: contain; }
.wordwrap { display: flex; flex-direction: column; align-items: center; text-align: center; }
.wordwrap .wordmark { padding-left: .08em; }
.wordwrap .tagline { padding-left: .14em; }
.code { font-size: 1.8rem; letter-spacing: .18em; font-weight: 700; color: var(--cyan); text-align: center; padding: 12px; }
.qr { display: block; margin: 8px auto; border-radius: 10px; max-width: 100%; height: auto; }

@media (max-width: 1080px) {
  .shell { padding: 22px; }
  .hub-layout { grid-template-columns: 196px minmax(0, 1fr); gap: 24px; }
  .hub-sidebar { padding-right: 12px; }
  .profile-card { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .shell { padding: 18px 14px 40px; }
  .hero .wordmark { font-size: 21px; }
  .hub-layout { display: block; margin-top: 18px; }
  .hub-sidebar { display: none; }
  .mobile-navigation { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 16px; margin-bottom: 24px; padding: 10px 12px; background: #0b1c25; border: 1px solid #264451; border-radius: 12px; }
  .mobile-navigation > span { font-size: 11px; color: #9fb7c1; }
  .mobile-navigation select { border: 0; padding: 7px 4px; background: #0b1c25; font-weight: 650; }
  .main h1 { font-size: 27px; }
  .profile-card { grid-template-columns: 1fr; }
}
@media (pointer: coarse) { button, .btn, .tab, input, select { min-height: 44px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

.poster { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); background: #08151b; }
.rail-card:has(.poster) { width: 128px; }

/* Kijkgeschiedenis als kaarten, zoals Trakt: poster links, titel en datum rechts */
.segmented { gap: 0; padding: 4px; border-radius: 999px; border: 1px solid var(--line); background: #08151b; }
.segmented .chip { border: 0; background: transparent; }
.segmented .chip.on { background: #1a3a46; color: var(--white); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; }
.media-card { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(145deg, #0c1b22, #070e14 70%); overflow: hidden; }
.media-card .poster, .media-card .tile { width: 110px; height: 100%; min-height: 160px; aspect-ratio: auto; border: 0; border-radius: 0; }
.mc-body { padding: 12px 12px 12px 0; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mc-title { font-weight: 700; font-size: 14px; line-height: 1.25; overflow-wrap: anywhere; }
.mc-sub { color: #b7c7cf; font-size: 12.5px; }
.mc-date { color: var(--muted); font-size: 12px; }
.mc-remove, .mc-check { margin-top: auto; align-self: flex-start; min-height: 30px; padding: 0 12px; font-size: 12px; opacity: 0; transition: opacity .15s; }
.media-card:hover .mc-remove, .media-card:focus-within .mc-remove,
.media-card:hover .mc-check, .media-card:focus-within .mc-check { opacity: 1; }
@media (hover: none) { .mc-remove, .mc-check { opacity: 1; } }
.mc-badge { display: inline-block; align-self: flex-start; padding: 2px 8px; border-radius: 999px; border: 1px solid #245463; color: var(--cyan); font-size: 10px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.mc-prog { height: 4px; border-radius: 999px; background: #163039; overflow: hidden; margin-top: 4px; }
.mc-prog > i { display: block; height: 100%; background: var(--cyan); }
@media (max-width: 760px) { .media-grid { grid-template-columns: minmax(0, 1fr); } }
.mc-body .sub { color: var(--muted); font-size: 12px; }
.mc-body input[type="number"] { min-height: 32px; }
.mc-body > button { align-self: flex-start; min-height: 32px; padding: 0 12px; font-size: 12px; }
.mc-body .score { font-weight: 800; color: var(--cyan); }
.mc-body .score, .mc-body input[type="number"] { align-self: flex-start; }

/* Statistieken, zoals de tegels van Trakt */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.stat-tile { display: grid; gap: 6px; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: linear-gradient(145deg, #0c1b22, #070e14 70%); }
.stat-tile span { color: var(--muted); font-size: 13px; }
.stat-tile b { font-size: 28px; font-weight: 800; line-height: 1.1; }
.stat-grid.wide { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.stat-grid.wide .stat-tile b { font-size: 18px; }
.month-nav { justify-content: space-between; }
.month-nav strong { font-size: 17px; text-transform: capitalize; }
.list-row .row .tile, .list-row .row .poster { flex: none; width: 48px; min-height: 64px; height: 64px; font-size: 1.3rem; border-radius: 10px; aspect-ratio: auto; }
