/* Admin. Bouwt voort op ui.css. */

/* --- Ingelogd: zijbalk + inhoud ------------------------------------------- */
.layout { display: grid; grid-template-columns: 15.5rem 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 1.5rem;
  padding: 1.4rem 1rem;
  background: linear-gradient(180deg, var(--navy-950), var(--navy-900));
  color: #c4d3e8;
}
.sidebar .brand-mark { color: #fff; padding: 0 .5rem; }
.sidebar .env { margin: -.9rem 0 0 3.1rem; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--sky-400); font-weight: 700; }
.sidebar nav { display: grid; gap: .2rem; }
.sidebar nav a { display: flex; align-items: center; gap: .65rem; padding: .6rem .75rem; border-radius: var(--radius-sm); color: #c4d3e8; text-decoration: none; font-weight: 550; font-size: .93rem; }
.sidebar nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sidebar nav a[aria-current="page"] { background: rgba(56, 182, 240, .16); color: #fff; box-shadow: inset 3px 0 0 var(--sky-400); }
.sidebar .user { margin-top: auto; padding: .9rem .75rem; border-radius: var(--radius-sm); background: rgba(255, 255, 255, .05); font-size: .85rem; }
.sidebar .user strong { display: block; color: #fff; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.sidebar .user span { color: #8ea4c2; }
.sidebar .user form { margin: .75rem 0 0; }
.sidebar .user button { width: 100%; background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .14); color: #e3ecf8; font-size: .85rem; padding: .5rem; }
.sidebar .user button:hover { background: rgba(255, 255, 255, .14); }

.content { background: var(--bg); background-image: var(--cloud-gradient); background-repeat: no-repeat; padding: 2rem 2.5rem 3rem; min-width: 0; }
.content > * { max-width: 70rem; }
@media (max-width: 56rem) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .sidebar nav { display: flex; flex-wrap: wrap; }
  .sidebar .env { display: none; }
  .sidebar .user { margin: 0 0 0 auto; }
  .content { padding: 1.5rem 1.1rem; }
}

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.page-head h1 { margin: 0; }
.breadcrumb { margin: 0 0 .9rem; font-size: .88rem; }
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); }

/* Kaarten en formulieren in de admin */
.content .card { margin-bottom: 1.25rem; display: grid; gap: .95rem; }
.card.wide { max-width: 48rem; }
.stack { display: grid; gap: .95rem; }
.row { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); align-items: end; }
.inline-form { display: grid; grid-template-columns: 1fr 2fr auto; gap: .9rem; align-items: end; max-width: 48rem; }
@media (max-width: 44rem) { .inline-form { grid-template-columns: 1fr; } }
.search { display: flex; gap: .6rem; margin: 0 0 1.25rem; max-width: 32rem; }
.notice-box { border-color: #f3d39b; background: var(--warning-bg); }
.notice-box ul { margin: .3rem 0 0; padding-left: 1.2rem; }
dl { display: grid; grid-template-columns: 9rem 1fr; gap: .45rem 1rem; margin: 0; }
dt { color: var(--text-muted); font-size: .9rem; }
dd { margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.logo-preview { max-height: 4rem; max-width: 16rem; background: #fff; padding: .5rem; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.qr-card { justify-items: start; }
.qr { width: 220px; height: 220px; background: #fff; border-radius: var(--radius-sm); border: 1px solid var(--border); padding: .4rem; image-rendering: pixelated; }
details summary { cursor: pointer; color: var(--primary); font-weight: 550; }

/* --- Niet ingelogd: gecentreerde kaart ---------------------------------------- */
.auth {
  min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem;
  background:
    radial-gradient(40rem 24rem at 80% 0%, rgba(56, 182, 240, .25), transparent 60%),
    radial-gradient(34rem 22rem at 10% 100%, rgba(47, 123, 240, .22), transparent 60%),
    linear-gradient(160deg, var(--navy-950), var(--navy-800));
}
.auth-box { width: 100%; max-width: 26rem; display: grid; gap: 1.25rem; }
.auth-box > .brand-mark { color: #fff; justify-self: center; font-size: 1.3rem; }
.auth-box .card { padding: 1.8rem; box-shadow: var(--shadow-lg); display: grid; gap: 1rem; }
.auth-box .card h1 { font-size: 1.4rem; margin: 0; }
.auth-box .card p { margin: 0; }
.auth-box .card button { width: 100%; padding: .8rem; }
.auth-box .footnote { text-align: center; color: #8ea4c2; font-size: .8rem; margin: 0; }
.auth-box.wide { max-width: 30rem; }

/* Kerncijfers op het overzicht */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1.1rem; margin-bottom: 1.5rem; }
.stat { text-decoration: none; color: inherit; gap: .2rem !important; transition: transform .15s, box-shadow .15s; }
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); color: inherit; }
.stat-label { color: var(--text-muted); font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.stat strong { font: 800 2.2rem/1.1 var(--font-head); color: var(--navy-900); }

/* Knoppen in formulieren op hun eigen breedte, links uitgelijnd. */
.content form > button, .content .card > button, .content .card > form > button, .content .stack > button { justify-self: start; }
.inline-form > button { justify-self: start; }

/* Maillog */
.mail-text { white-space: pre-wrap; font: .88rem/1.55 ui-monospace, Menlo, Consolas, monospace; margin: 0; }
.mail-frame { width: 100%; max-width: 48rem; height: 34rem; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }

/* Tabs (filters) */
.tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1.1rem; }
.tabs a { padding: .4rem .85rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--slate-700); text-decoration: none; font-size: .88rem; font-weight: 550; }
.tabs a[aria-current="true"] { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }

/* Gesprek */
.thread { display: grid; gap: .8rem; max-width: 48rem; margin-bottom: 1.4rem; }
.msg { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1.1rem; box-shadow: var(--shadow-sm); }
.msg header { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .45rem; font-size: .88rem; }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-out { border-left: 4px solid var(--blue-600); margin-left: 2rem; }
.msg-in { border-left: 4px solid var(--slate-300); }
.msg-note { background: var(--warning-bg); border-color: #f3d39b; }
.check { display: flex; gap: .55rem; align-items: center; font-weight: 500; }
.check input { width: auto; }
.danger-zone { border-color: #f5c2c4; }
button.danger { background: var(--danger); }
button.danger:hover { background: #8f1c21; }

/* Partneraanvragen (B8) */
.grid-2 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)); margin-bottom: 1.5rem; }
.grid-2 .card h2 { font-size: 1.05rem; margin: 0 0 .75rem; }
.signals { margin-bottom: 1.25rem; }
.signals ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.pre { white-space: pre-line; }
.decision { display: grid; gap: .8rem; align-content: start; }
.decision h3 { margin: 0; }
.decision.approve { border-top: 3px solid var(--success); }
.decision.reject { border-top: 3px solid var(--danger); }
.decision button { justify-self: start; }
