/* Dashboard. Bewust neutraal: elke app brengt zijn eigen accentkleur mee, de
   hub zelf blijft grijs zodat een nieuwe app er zonder gedoe bij past. */

:root {
  --bg: #0e0f11;
  --surface: #16181c;
  --surface-hi: #1c1f24;
  --line: rgba(255, 255, 255, .09);
  --text: #e9e7e3;
  --muted: rgba(233, 231, 227, .52);
  --faint: rgba(233, 231, 227, .34);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  background: var(--bg);
}

body.hub {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1100px 520px at 50% -12%, rgba(255, 255, 255, .055), transparent 70%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

.hub__wrap {
  max-width: 640px;
  margin: 0 auto;
  padding:
    calc(56px + env(safe-area-inset-top)) 20px
    calc(40px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ------------------------------------------------------------------ kop -- */

.hub__head {
  padding-bottom: 34px;
}

.hub__kicker {
  display: block;
  font-size: 10.5px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--faint);
}

.hub__title {
  margin: 12px 0 0;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -.015em;
  text-wrap: pretty;
}

.hub__sub {
  margin: 7px 0 0;
  font-size: 15px;
  color: var(--muted);
}

/* --------------------------------------------------------------- tegels -- */

.tiles {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.tile {
  --accent: #7a7f8a;

  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  transition: background .18s, border-color .18s, transform .18s;
}

/* Streepje in de accentkleur van de app langs de linkerrand. */
.tile::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}

a.tile:hover {
  background: var(--surface-hi);
  border-color: rgba(255, 255, 255, .16);
}

a.tile:active {
  transform: scale(.995);
}

a.tile:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.tile__icon {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* De accentkleur draagt het icoon; de tegel zelf blijft neutraal.
     Oudere browsers zonder color-mix() krijgen het neutrale vlak. */
  background: rgba(255, 255, 255, .07);
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  color: var(--accent);
}

.tile__icon svg {
  width: 24px;
  height: 24px;
  display: block;
}

.tile__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tile__name {
  font-size: 17.5px;
  font-weight: 500;
  letter-spacing: -.005em;
}

.tile__tagline {
  font-size: 13.5px;
  color: var(--muted);
  text-wrap: pretty;
}

.tile__stat {
  font-size: 11.5px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: 4px;
}

.tile__stat--muted {
  color: var(--faint);
}

.tile__go {
  flex: none;
  font-size: 17px;
  color: var(--faint);
  transition: transform .18s, color .18s;
}

a.tile:hover .tile__go {
  color: var(--text);
  transform: translateX(3px);
}

.tile--missing {
  opacity: .5;
}

/* --------------------------------------------------------------- footer -- */

.hub__foot {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: center;
  margin-top: 40px;
  padding-top: 20px;
  /* Hairline zodat de voet ook bij twee tegels als afsluiting leest en niet
     als een gat onderaan de pagina. */
  border-top: 1px solid var(--line);
}

.hub__logout {
  margin: 0;
}

.hub__link {
  background: none;
  border: none;
  padding: 6px 2px;
  font-family: inherit;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--faint);
  text-decoration: none;
  cursor: pointer;
}

.hub__link:hover {
  color: var(--text);
}

/* ------------------------------------------------------ panelen (account) -- */

.panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  padding: 20px 18px;
}

.panel__h {
  margin: 0 0 16px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--faint);
}

.panel__note {
  margin: 2px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.note {
  border: 1px solid var(--line);
  border-left: 3px solid var(--text);
  border-radius: 12px;
  background: var(--surface);
  padding: 13px 15px;
  font-size: 14.5px;
}

.note--bad {
  border-left-color: #e8836f;
  color: #e8836f;
}

.devices {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.devices__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.devices__item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.devices__when {
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint);
}

.devices__ua {
  font-size: 13px;
  color: var(--muted);
  word-break: break-word;
}

/* ---------------------------------------------------- inloggen / account -- */

.gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.gate__card {
  width: 100%;
  max-width: 360px;
}

.gate__kicker {
  display: block;
  font-size: 10.5px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--faint);
}

.gate__title {
  margin: 12px 0 26px;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -.015em;
}

.gate__intro {
  margin: -14px 0 24px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--muted);
  text-wrap: pretty;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-bottom: 14px;
}

.field__label {
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--faint);
}

.field input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 16px; /* 16px voorkomt inzoomen op de telefoon */
}

.field input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, .28);
  background: var(--surface-hi);
}

.btn {
  width: 100%;
  min-height: 50px;
  margin-top: 6px;
  border: none;
  border-radius: 11px;
  background: var(--text);
  color: var(--bg);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  cursor: pointer;
}

.btn:hover { background: #fff; }
.btn[disabled] { opacity: .55; cursor: default; }

.gate__error {
  min-height: 18px;
  padding-top: 13px;
  font-size: 12.5px;
  color: #e8836f;
  text-align: center;
}

.gate__switch {
  display: block;
  text-align: center;
  padding-top: 10px;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--faint);
  text-decoration: none;
}

.gate__switch:hover { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
