/* M Vastgoed beheer: the house style of mvastgoed.be (brand bible, vault
   brand/brand-bible.md): navy #000083 for the frame, red #FF0A26 for
   accents, the darker red #BF081D under small white text (contrast),
   Montserrat for the interface, Merriweather for page titles. */

:root {
  --red: #ff0a26;
  --red-dark: #bf081d;
  --red-light: #ffc2c9;
  --navy: #000083;
  --navy-dark: #000062;
  --blush: #fdf6f4;
  --text: #2e2e2e;
  --heading: #3c3c3c;
  --muted: #707070;
  --border: #d3d3d3;
  --light: #f5f5f5;
  --white: #fff;
  --ok: #1d7a46;
  --warn: #9a6400;
  --radius: .5rem;
  --shadow: 0 3px 6px rgba(0, 0, 0, .12);
  --sans: montserrat, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --serif: merriweather, Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--sans); color: var(--text); background: var(--light); font-size: 15px; line-height: 1.5; }
a { color: var(--red-dark); }
h1, h2, h3 { color: var(--heading); line-height: 1.25; }
h1 { font-family: var(--serif); font-size: 1.6rem; margin: 0 0 .25rem; }
h2 { font-size: 1.1rem; margin: 0 0 .75rem; }
h3 { font-size: .95rem; margin: 0 0 .5rem; }
.boot { padding: 2rem; color: var(--muted); }
:focus-visible { outline: 3px solid rgba(255, 10, 38, .35); outline-offset: 2px; }

/* frame */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { background: var(--navy); color: var(--white); display: flex; flex-direction: column; padding: 1.25rem 0; position: sticky; top: 0; height: 100vh; }
.side__logo { display: block; background: var(--white); margin: 0 1rem 1.25rem; padding: .6rem .8rem; border-radius: var(--radius); }
.side__logo img { display: block; width: 100%; height: auto; }
.side nav a { display: flex; justify-content: space-between; align-items: center; color: var(--white); text-decoration: none; padding: .6rem 1.25rem; font-weight: 600; border-left: 4px solid transparent; }
.side nav a:hover { background: var(--navy-dark); }
.side nav a.is-active { border-left-color: var(--red); background: var(--navy-dark); }
.side__count { background: var(--red-dark); border-radius: 1rem; padding: 0 .5rem; font-size: .75rem; }
.side__foot { margin-top: auto; padding: 1rem 1.25rem 0; font-size: .85rem; opacity: .9; }
.side__foot button { margin-top: .5rem; }
.main { padding: 1.5rem 2rem 4rem; min-width: 0; }
.topline { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.topline p { margin: 0; color: var(--muted); }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

/* buttons */
.btn { font: inherit; font-weight: 700; font-size: .9rem; border: 2px solid var(--red-dark); background: var(--red-dark); color: var(--white); border-radius: 4rem; padding: .45rem 1.1rem; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; }
.btn:hover { background: #a00718; border-color: #a00718; }
.btn--ghost { background: var(--white); color: var(--red-dark); }
.btn--ghost:hover { background: var(--blush); color: var(--red-dark); }
.btn--plain { background: transparent; border-color: transparent; color: var(--muted); padding: .3rem .5rem; }
.btn--plain:hover { background: var(--light); border-color: transparent; color: var(--text); }
.btn--light { background: transparent; border-color: var(--white); color: var(--white); }
.btn--light:hover { background: var(--navy-dark); border-color: var(--white); }
.btn[disabled] { opacity: .5; cursor: default; }
.btn--small { font-size: .8rem; padding: .25rem .75rem; }

/* cards, lists */
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; margin-bottom: 1rem; }
.card--blush { background: var(--blush); box-shadow: none; border: 1px solid var(--red-light); }
.list { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.list__row { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center; padding: .75rem 1rem; border-bottom: 1px solid var(--light); text-decoration: none; color: inherit; }
.list__row:last-child { border-bottom: 0; }
a.list__row:hover { background: var(--blush); }
.list__title { font-weight: 600; }
.list__meta { color: var(--muted); font-size: .85rem; }
.search { width: 100%; max-width: 360px; }

/* badges */
.badge { display: inline-block; font-size: .72rem; font-weight: 700; border-radius: 1rem; padding: .1rem .6rem; background: var(--light); color: var(--heading); white-space: nowrap; }
.badge--draft { background: #fff4d6; color: var(--warn); }
.badge--new { background: #e3f3ea; color: var(--ok); }
.badge--red { background: var(--red-light); color: var(--red-dark); }
.badge--navy { background: #e5e5f6; color: var(--navy); }

/* form fields */
.field { display: block; margin-bottom: .9rem; }
.field__label { display: flex; justify-content: space-between; font-weight: 600; font-size: .85rem; margin-bottom: .25rem; color: var(--heading); }
.field__count { font-weight: 500; color: var(--muted); }
.field__count.is-over { color: var(--red-dark); }
.field__hint { font-size: .8rem; color: var(--muted); margin-top: .2rem; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=time], input[type=search], input[type=url], select, textarea {
  font: inherit; width: 100%; border: 1px solid var(--border); border-radius: .35rem; padding: .5rem .65rem; background: var(--white); color: var(--text);
}
textarea { min-height: 5rem; resize: vertical; }
input:focus, select:focus, textarea:focus, .rte__area:focus { border-color: var(--red); outline: none; box-shadow: 0 0 0 .2rem rgba(255, 10, 38, .2); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 1rem; }

/* sections of a page */
.section { border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); margin-bottom: .75rem; }
.section > summary { cursor: pointer; padding: .75rem 1rem; display: flex; gap: .75rem; align-items: center; list-style: none; }
.section > summary::-webkit-details-marker { display: none; }
.section > summary::before { content: "+"; font-weight: 700; color: var(--red); width: 1rem; }
.section[open] > summary::before { content: "\2212"; }
.section__num { color: var(--muted); font-size: .8rem; width: 1.5rem; }
.section__peek { color: var(--muted); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.section__body { padding: 0 1rem 1rem 3.25rem; }
.section__fixed { font-size: .85rem; color: var(--muted); background: var(--light); border-radius: .35rem; padding: .5rem .75rem; }
.item { border-left: 3px solid var(--red-light); padding-left: .75rem; margin-bottom: .75rem; }

/* rich text */
.rte { border: 1px solid var(--border); border-radius: .35rem; background: var(--white); }
.rte__bar { display: flex; flex-wrap: wrap; gap: .15rem; padding: .3rem; border-bottom: 1px solid var(--border); background: var(--light); border-radius: .35rem .35rem 0 0; }
.rte__bar button { font: inherit; font-size: .8rem; font-weight: 700; border: 0; background: transparent; padding: .25rem .5rem; border-radius: .25rem; cursor: pointer; color: var(--heading); }
.rte__bar button:hover { background: var(--white); }
.rte__area { min-height: 7rem; padding: .6rem .75rem; border-radius: 0 0 .35rem .35rem; border: 1px solid transparent; }
.rte__area img { max-width: 220px; height: auto; display: block; margin: .25rem 0; border-radius: .25rem; }
.rte__area h1, .rte__area h2, .rte__area h3 { font-family: var(--serif); }
.rte__area p { margin: 0 0 .6rem; }

/* images */
.imgfield { display: grid; grid-template-columns: 120px 1fr; gap: .75rem; align-items: start; }
.imgfield__thumb { width: 120px; height: 84px; border-radius: .35rem; background: var(--light) center/cover no-repeat; border: 1px solid var(--border); }
.imgfield__btns { display: flex; gap: .4rem; margin-top: .4rem; flex-wrap: wrap; }

/* team */
.member { display: grid; grid-template-columns: 96px 1fr auto; gap: 1rem; align-items: start; }
.member__photo { width: 96px; height: 96px; border-radius: 50%; background: var(--light) center/cover no-repeat; border: 1px solid var(--border); }
.member__tools { display: flex; flex-direction: column; gap: .25rem; }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; background: var(--navy); padding: 1rem; }
.login__box { background: var(--white); border-radius: var(--radius); padding: 2rem; width: 100%; max-width: 380px; box-shadow: var(--shadow); }
.login__box img { width: 180px; display: block; margin-bottom: 1.25rem; }
.error { color: var(--red-dark); font-weight: 600; margin: .5rem 0; white-space: pre-wrap; }

/* toasts */
#toasts { position: fixed; right: 1rem; bottom: 1rem; display: flex; flex-direction: column; gap: .5rem; z-index: 10; }
.toast { background: var(--navy); color: var(--white); padding: .7rem 1rem; border-radius: var(--radius); box-shadow: var(--shadow); max-width: 420px; font-weight: 600; white-space: pre-wrap; }
.toast--error { background: var(--red-dark); }

[hidden] { display: none !important; }

/* account link in the side bar */
.side__account { display: flex; flex-direction: column; color: inherit; text-decoration: none; padding: .4rem .5rem; margin: 0 -.5rem; border-radius: var(--radius); }
.side__account:hover, .side__account.is-active { background: rgba(255,255,255,.12); }
.side__name { font-weight: 700; }
.side__link { text-decoration: underline; text-underline-offset: 2px; margin-top: .15rem; }

/* rights per user, my account */
.rights-sum { margin-top: .35rem; }
.rights-row > td { background: var(--light); }
.rights__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem 1.5rem; margin: .75rem 0 1rem; }
.check { display: flex; gap: .5rem; align-items: baseline; cursor: pointer; }
.check input { width: auto; margin: 0; accent-color: var(--red); }
.check.is-locked { opacity: .55; cursor: not-allowed; }
.rights-list, .sessions { list-style: none; padding: 0; margin: .75rem 0; }
.rights-list li { padding: .2rem 0; }
.rights-list .is-yes > span:first-child { color: var(--ok); font-weight: 700; }
.rights-list .is-no { color: var(--muted); }
.sessions li { padding: .6rem 0; border-bottom: 1px solid var(--light); }
.table-scroll { overflow-x: auto; }
.role-table th, .role-table td { white-space: nowrap; }
.role-table__mark { text-align: center; color: var(--ok); font-weight: 700; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* the temporary password, shown once */
.dialog { border: 0; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; max-width: 520px; width: calc(100% - 2rem); }
.dialog::backdrop { background: rgba(0, 0, 80, .45); }
.dialog h2 { margin-top: 0; }
.dialog__list { padding-left: 1.1rem; margin: 1rem 0 1.25rem; }
.dialog__list li { margin: .35rem 0; }
.temp-pw__row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin: .5rem 0 .25rem; }
.temp-pw { font-family: ui-monospace, Consolas, monospace; font-size: 1.35rem; letter-spacing: .04em; background: var(--light); padding: .5rem .75rem; border-radius: var(--radius); user-select: all; }
.login__box .btn--plain { margin-top: .75rem; }

/* activity log */
.filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 1rem; padding-bottom: .25rem; }
.activity__when { white-space: nowrap; color: var(--muted); font-size: .9rem; }
.activity--warn td { background: #fff8e6; }

.btn--danger { color: var(--red-dark); }
.btn--danger:hover { background: var(--red-light); color: var(--red-dark); }

/* login: passkey and second step */
.login__or { display: flex; align-items: center; gap: .75rem; color: var(--muted); font-size: .85rem; margin: 1rem 0; }
.login__or::before, .login__or::after { content: ""; flex: 1; border-top: 1px solid var(--light); }
.login__passkey, .login__more .btn--ghost { width: 100%; }
.login__more { margin-top: .75rem; display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; }
.login__more .login__or { width: 100%; }
.login__robot { margin: .25rem 0 .75rem; min-height: 65px; }
.login__box--wide { max-width: 560px; }
.login__box .card { box-shadow: none; border: 1px solid var(--light); margin: 1.25rem 0 .5rem; }
.code-input { max-width: 12rem; font-size: 1.5rem; letter-spacing: .3em; font-family: ui-monospace, Consolas, monospace; }

/* extra security */
.sec-block { border-top: 1px solid var(--light); padding-top: 1rem; margin-top: 1rem; }
.sec-block h3 { margin: 0 0 .5rem; font-size: 1rem; }
.steps { padding-left: 1.2rem; }
.steps li { margin: .6rem 0; }
.qr { width: 200px; max-width: 100%; margin: .75rem 0; background: #fff; }
.qr svg { display: block; width: 100%; height: auto; }
.recovery { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem 1rem; margin: 1rem 0; }
.recovery code { font-family: ui-monospace, Consolas, monospace; font-size: 1.05rem; background: var(--light); padding: .25rem .5rem; border-radius: var(--radius); display: inline-block; }
.sessions__row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }

/* leads snelverkopen and agenda */
.facts { display: grid; grid-template-columns: 8rem 1fr; gap: .35rem 1rem; margin: 0 0 1rem; }
.facts dt { color: var(--muted); font-size: .9rem; }
.facts dd { margin: 0; }
.prewrap { white-space: pre-wrap; }
.list__title { text-decoration: none; color: inherit; }
.list__title:hover strong { text-decoration: underline; }
.day + .day { margin-top: 1rem; }
.day__title { font-size: .95rem; margin: 0 0 .25rem; color: var(--navy); }
.appt { display: grid; grid-template-columns: 4rem 1fr auto; gap: .75rem; align-items: start; padding: .6rem 0; border-bottom: 1px solid var(--light); }
.appt__time { font-weight: 700; font-variant-numeric: tabular-nums; }
.appt--cancelled .appt__body, .appt--cancelled .appt__time { opacity: .55; text-decoration: line-through; }
.appt-form { grid-column: 1 / -1; background: var(--light); padding: 1rem; border-radius: var(--radius); width: 100%; }
.picker { list-style: none; padding: 0; margin: .25rem 0; }
.vsv-detail { align-items: start; }

.temp-pw__row input[type=text] { flex: 1 1 16rem; width: auto; }
.temp-pw__row input[type=date] { flex: 0 0 auto; width: auto; }

/* tables */
table { width: 100%; border-collapse: collapse; background: var(--white); }
th, td { text-align: left; padding: .55rem .75rem; border-bottom: 1px solid var(--light); vertical-align: top; font-size: .9rem; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.output { background: #1e1e1e; color: #ddd; padding: .75rem; border-radius: .35rem; font-size: .78rem; overflow: auto; max-height: 260px; white-space: pre-wrap; }

@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; padding: .75rem 0; min-width: 0; }
  .side nav { display: flex; overflow-x: auto; max-width: 100%; }
  .side__foot { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; padding-top: .5rem; }
  .side__foot button { margin-top: 0; }
  table, thead, tbody, tr, th, td { display: block; }
  thead { display: none; }
  tr { border-bottom: 1px solid var(--border); padding: .5rem 0; }
  th, td { border: 0; padding: .25rem .75rem; }
  .side nav a { border-left: 0; border-bottom: 3px solid transparent; white-space: nowrap; }
  .side nav a.is-active { border-bottom-color: var(--red); }
  .side__logo { width: 160px; }
  .main { padding: 1rem; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .rights__grid { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr; }
  .appt { grid-template-columns: 3.5rem 1fr; }
  .appt .actions { grid-column: 1 / -1; }
  .facts { grid-template-columns: 1fr; }
  .activity__when { white-space: normal; }
  .side__account { flex: 1 1 auto; }
  .role-table, .role-table thead, .role-table tbody, .role-table tr, .role-table th, .role-table td { display: revert; }
  .role-table th, .role-table td { white-space: normal; padding: .35rem .3rem; font-size: .8rem; }
  .role-table th { letter-spacing: 0; }
  .section__body { padding-left: 1rem; }
  .member { grid-template-columns: 64px 1fr; }
  .member__photo { width: 64px; height: 64px; }
}
