/* EPAHS Tender AI — componentstijlen (PHP-herbouw van design_system/_ds_bundle.js) */

/* ---------- Layout ---------- */
/* height (niet min-height) + overflow:hidden begrenzen de shell op de
   viewport, zodat alleen .content-scroll intern scrollt en de sidebar/topbar
   altijd zichtbaar blijven, ook bij lange opdrachtenlijsten. */
.app-shell { display: flex; height: 100vh; overflow: hidden; }
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.content-scroll { flex: 1; overflow: auto; min-height: 0; }

.page { padding: 28px; display: flex; flex-direction: column; gap: 22px; }
.page--gap-18 { gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.grid-main-side { display: grid; grid-template-columns: 1fr 320px; gap: 18px; align-items: start; }
.grid-main-side-2 { display: grid; grid-template-columns: 1fr 360px; gap: 20px; align-items: start; }
.grid-two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.grid-main-side-digest { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }
.col { display: flex; flex-direction: column; gap: 18px; }
.filter-bar { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.active-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pagination-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 12px 20px; background: var(--gray-50); border-top: 1px solid var(--border-subtle); }
.pagination-bar__summary { font-size: 13px; color: var(--text-muted); }
.pagination-bar__nav { display: flex; align-items: center; gap: 4px; }
.pagination-bar__page { font-size: 13px; font-weight: 700; color: var(--text-body); font-family: var(--font-alt); padding: 0 4px; white-space: nowrap; }
.card-head { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border-subtle); gap: 8px; }
.card-head h3 { margin: 0; font-size: 18px; }
.card-head__meta { margin-left: auto; font-size: 13px; color: var(--text-muted); }
.empty-state { padding: 40px; text-align: center; color: var(--text-muted); }

@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-main-side, .grid-main-side-2, .grid-two, .grid-main-side-digest { grid-template-columns: 1fr; }
}

/* ---------- Sidebar / Topbar ---------- */
.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w); background: var(--ink-800); color: #fff;
  display: flex; flex-direction: column; padding: 22px 16px; gap: 26px; min-height: 100%;
  overflow-y: auto;
}
.sidebar__brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.sidebar__brand img { height: 26px; }
.sidebar__brand-tag {
  margin-left: auto; font-size: 10px; font-weight: 700; letter-spacing: .14em; color: var(--teal-300);
  border: 1px solid var(--teal-700); border-radius: 4px; padding: 2px 6px;
}
.nav-heading { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gray-500); padding: 0 12px; margin-bottom: 8px; }
.nav-group { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: none; border-radius: var(--radius-md);
  cursor: pointer; background: transparent; color: var(--gray-300); font-family: var(--font-body); font-size: 15px;
  font-weight: 400; text-align: left; transition: background .15s; text-decoration: none; width: 100%;
}
.nav-item:hover { background: rgba(255,255,255,.06); }
.nav-item--active, .nav-item--active:hover { background: var(--teal-500); color: #fff; font-weight: 700; }
.nav-item__badge { margin-left: auto; font-size: 11px; font-weight: 700; background: var(--ink-600); border-radius: var(--radius-pill); padding: 1px 8px; font-family: var(--font-alt); }
.nav-item--active .nav-item__badge { background: rgba(255,255,255,.25); }
.nav-item__badge--accent, .nav-item--active .nav-item__badge--accent { background: var(--color-accent); color: var(--ink-900); }
.sidebar__run { margin-top: auto; background: var(--ink-900); border-radius: var(--radius-md); padding: 14px; display: flex; gap: 10px; align-items: flex-start; }
.sidebar__run-icon { color: var(--teal-300); }
.sidebar__run-title { font-size: 13px; font-weight: 700; }
.sidebar__run-meta { font-size: 12px; color: var(--gray-400); line-height: 1.4; }

.topbar { display: flex; align-items: center; gap: 16px; padding: 18px 28px; border-bottom: 1px solid var(--border-subtle); background: var(--surface-card); }
.topbar__title { margin: 0; font-size: 24px; }
.topbar__subtitle { font-size: 14px; color: var(--text-muted); margin-top: 2px; }
.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.role-badge { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 700; background: var(--gray-100); color: var(--text-strong); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--teal-500); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex: 0 0 auto; }
.logout-form { display: inline-flex; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font-body);
  font-weight: var(--fw-bold); font-size: var(--fs-body); line-height: 1; padding: 9px 18px; min-height: 40px;
  border-radius: var(--radius-md); cursor: pointer; border: 1px solid transparent;
  transition: background .15s ease, transform .08s ease, box-shadow .15s ease; text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn--block { display: flex; width: 100%; }
.btn--sm { padding: 6px 12px; font-size: var(--fs-sm); min-height: 32px; gap: 6px; }
.btn--lg { padding: 13px 24px; font-size: var(--fs-body-lg); min-height: 50px; gap: 10px; }
.btn--primary { background: var(--color-primary); color: var(--text-on-primary); border-color: var(--color-primary); }
.btn--primary:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); }
.btn--secondary { background: var(--surface-ink); color: var(--text-inverse); border-color: var(--surface-ink); }
.btn--secondary:hover { background: var(--ink-600); border-color: var(--ink-600); }
.btn--outline { background: transparent; color: var(--text-body); border-color: var(--border-strong); }
.btn--outline:hover { background: var(--gray-100); }
.btn--ghost { background: transparent; color: var(--color-primary-hover); border-color: transparent; }
.btn--ghost:hover { background: var(--teal-50); }
.btn--accent { background: var(--color-accent); color: var(--ink-900); border-color: var(--color-accent); }
.btn--accent:hover { background: var(--coral-300); }
.btn--danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn--danger:hover { background: #c94b54; border-color: #c94b54; }
form.btn-form { display: inline-flex; width: 100%; }
form.btn-form.btn-form--inline { width: auto; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: var(--radius-md); border: 1px solid transparent; background: transparent; color: var(--text-body);
  cursor: pointer; transition: background .15s ease;
}
.icon-btn--outline { border-color: var(--border-strong); }
.icon-btn:hover { background: var(--gray-100); }

/* ---------- Card ---------- */
.card { background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: var(--space-6); box-shadow: var(--shadow-sm); }
.card--accent { border-top: 3px solid var(--color-primary); }
.card--pad-0 { padding: 0; overflow: hidden; }
.card--pad-sm { padding: var(--space-4); }
.card--interactive { cursor: pointer; transition: box-shadow .18s ease, transform .18s ease; text-decoration: none; display: block; color: inherit; }
.card--interactive:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* ---------- Badge ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--radius-pill); font-family: var(--font-body); font-weight: var(--fw-bold); font-size: var(--fs-xs); line-height: 1.5; letter-spacing: .02em; }
.badge__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--neutral { background: var(--gray-100); color: var(--ink-600); }
.badge--primary { background: var(--teal-100); color: var(--teal-900); }
.badge--accent { background: var(--coral-100); color: #a63c40; }
.badge--success { background: var(--teal-100); color: var(--teal-900); }
.badge--warning { background: #fdeccf; color: #8a5a12; }
.badge--danger { background: #fbe0e2; color: #a3323a; }
.badge--info { background: #dce9f9; color: #2c5c94; }
.badge--solid.badge--neutral { background: var(--ink-600); color: #fff; }
.badge--solid.badge--primary { background: var(--color-primary); color: #fff; }
.badge--solid.badge--accent { background: var(--color-accent); color: var(--ink-900); }
.badge--solid.badge--success { background: var(--success); color: #fff; }
.badge--solid.badge--warning { background: var(--warning); color: #fff; }
.badge--solid.badge--danger { background: var(--danger); color: #fff; }
.badge--solid.badge--info { background: var(--info); color: #fff; }

/* ---------- Tag ---------- */
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: var(--radius-pill); border: 1px solid var(--border-subtle); background: var(--surface-card); color: var(--text-body); font-family: var(--font-body); font-size: var(--fs-sm); font-weight: var(--fw-regular); line-height: 1.4; }
.tag--removable { padding: 5px 6px 5px 12px; }
.tag__remove { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; border: none; cursor: pointer; background: transparent; color: var(--text-muted); padding: 0; }
.tag__remove:hover { background: var(--gray-200); }
.chip-negative { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 4px 10px; border-radius: var(--radius-pill); background: #fbe9ea; color: #a3323a; font-family: var(--font-alt); border: none; cursor: pointer; }
.chip-add { display: inline-flex; align-items: center; gap: 4px; border: 1px dashed var(--border-strong); background: none; border-radius: var(--radius-pill); padding: 4px 12px; cursor: pointer; color: var(--text-muted); font-size: 13px; font-family: var(--font-body); }
.source-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: var(--radius-pill); border: 1px solid var(--border-subtle); }
.source-chip--ted { background: var(--teal-50); color: var(--teal-900); }
.source-chip--mail { background: var(--gray-100); color: var(--ink-800); }
.keyword-chip { display: inline-flex; align-items: center; font-size: 12px; font-family: var(--font-alt); padding: 2px 8px; border-radius: var(--radius-sm); background: var(--teal-50); color: var(--teal-900); border: 1px dashed var(--teal-300); }

/* ---------- Progress bar ---------- */
.progress { display: flex; flex-direction: column; gap: 6px; }
.progress__label-row { display: flex; justify-content: space-between; font-family: var(--font-body); font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--text-body); }
.progress__track { width: 100%; background: var(--gray-200); border-radius: var(--radius-pill); overflow: hidden; }
.progress__fill { height: 100%; border-radius: var(--radius-pill); transition: width .4s ease; display: block; }
.progress__fill--primary { background: var(--color-primary); }
.progress__fill--accent { background: var(--color-accent); }
.progress__fill--success { background: var(--success); }
.progress__fill--warning { background: var(--warning); }
.progress__fill--danger { background: var(--danger); }
.progress__fill--ink { background: var(--ink-800); }

/* ---------- Stat ---------- */
.stat { display: flex; flex-direction: column; gap: 6px; font-family: var(--font-body); }
.stat__head { display: flex; align-items: center; gap: 8px; }
.stat__icon { color: var(--color-primary); display: inline-flex; }
.stat__label { font-size: var(--fs-xs); font-weight: var(--fw-bold); text-transform: uppercase; letter-spacing: var(--ls-wide); color: var(--text-muted); }
.stat__value-row { display: flex; align-items: baseline; gap: 6px; }
.stat__value { font-family: var(--font-display); font-size: var(--fs-h1); font-weight: var(--fw-black); color: var(--text-strong); line-height: 1; }
.stat__delta { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-sm); font-weight: var(--fw-bold); }
.stat__delta--success { color: var(--success); }
.stat__delta--danger { color: var(--danger); }
.stat__delta--neutral { color: var(--text-muted); }

/* ---------- Alert ---------- */
.alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius-md); font-family: var(--font-body); border: 1px solid; }
.alert--info { background: #eef4fc; border-color: #c6dbf5; color: #2c5c94; }
.alert--success { background: var(--teal-50); border-color: var(--teal-100); color: var(--teal-900); }
.alert--warning { background: #fdf4e6; border-color: #f6dcae; color: #8a5a12; }
.alert--danger { background: #fdeef0; border-color: #f6cdd0; color: #a3323a; }
.alert__icon { display: inline-flex; flex: 0 0 auto; margin-top: 1px; }
.alert__body-wrap { flex: 1; min-width: 0; }
.alert__title { font-weight: var(--fw-bold); margin-bottom: 2px; }
.alert__body { font-size: var(--fs-sm); line-height: var(--lh-normal); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-family: var(--font-body); font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--text-body); }
.field__control { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px; background: var(--surface-card); border: 1px solid var(--border-strong); border-radius: var(--radius-md); transition: border-color .15s ease, box-shadow .15s ease; }
.field__control:focus-within { border-color: var(--border-focus); box-shadow: var(--shadow-focus); }
.field__control--error { border-color: var(--danger); }
.field__icon { color: var(--text-muted); display: inline-flex; }
.field__input { flex: 1; border: none; outline: none; background: transparent; font-family: var(--font-body); font-size: var(--fs-body); color: var(--text-strong); min-width: 0; }
.field__hint { font-size: var(--fs-xs); color: var(--text-muted); }
.field__hint--error { color: var(--danger); }

.select-wrap { position: relative; display: flex; align-items: center; }
.select-control { appearance: none; width: 100%; height: 42px; padding: 0 40px 0 12px; background: var(--surface-card); border: 1px solid var(--border-strong); border-radius: var(--radius-md); outline: none; font-family: var(--font-body); font-size: var(--fs-body); color: var(--text-strong); cursor: pointer; }
.select-control:focus { border-color: var(--border-focus); box-shadow: var(--shadow-focus); }
.select-chevron { position: absolute; right: 12px; pointer-events: none; color: var(--text-muted); display: inline-flex; }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-family: var(--font-body); font-size: var(--fs-body); color: var(--text-body); position: relative; }
.switch__track { position: relative; width: 40px; height: 22px; border-radius: var(--radius-pill); background: var(--gray-300); transition: background .18s ease; flex: 0 0 auto; }
.switch__track--on { background: var(--color-primary); }
.switch__thumb { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-xs); transition: left .18s ease; }
.switch__track--on .switch__thumb { left: 20px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }

.checkbox { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-family: var(--font-body); font-size: var(--fs-body); color: var(--text-body); position: relative; }
.checkbox__box { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface-card); color: #fff; flex: 0 0 auto; }
.checkbox__box--on { border-color: var(--color-primary); background: var(--color-primary); }
.checkbox input { position: absolute; opacity: 0; width: 0; height: 0; }

/* ---------- Tender row ---------- */
.tender-row { display: grid; grid-template-columns: 1fr 150px 120px 120px 40px; align-items: center; gap: 16px; padding: 15px 20px; cursor: pointer; background: var(--surface-card); border-bottom: 1px solid var(--border-subtle); transition: background .12s; border-left: 3px solid transparent; text-decoration: none; color: inherit; }
.tender-row:last-child { border-bottom: none; }
.tender-row:hover { background: var(--teal-50); }
.tender-row--new { border-left-color: var(--teal-500); }
.tender-row__title-row { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; flex-wrap: wrap; }
.tender-row__title { font-weight: 700; color: var(--text-strong); font-size: 15px; }
.tender-row__meta { font-size: 13px; color: var(--text-muted); display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.tender-row__meta span { display: inline-flex; align-items: center; gap: 4px; }
.tender-row__sources { display: flex; gap: 6px; flex-wrap: wrap; }
.tender-row__deadline-date { font-family: var(--font-alt); color: var(--text-body); font-size: 14px; }
.tender-row__deadline-days { font-size: 12px; color: var(--text-muted); }
.tender-row__deadline-days--urgent { color: var(--danger); font-weight: 700; }
.tender-row__chevron { text-align: right; color: var(--text-muted); }
.star-marked { color: var(--warning); }
.unseen-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--color-accent); flex: 0 0 auto; }

.table-head { display: grid; gap: 16px; padding: 12px 20px; background: var(--gray-50); border-bottom: 1px solid var(--border-subtle); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); }
.table-head--tenders { grid-template-columns: 1fr 150px 120px 120px 40px; }
.table-head--logs { grid-template-columns: 90px 120px 1fr 70px 70px 70px 130px; }
.run-row { display: grid; grid-template-columns: 90px 120px 1fr 70px 70px 70px 130px; gap: 12px; padding: 13px 20px; align-items: center; border-bottom: 1px solid var(--border-subtle); font-size: 13px; }
.run-row:last-child { border-bottom: none; }
.run-row__id { font-family: var(--font-alt); color: var(--text-muted); }
.run-row__source { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; }
.run-row__time { font-weight: 700; color: var(--text-strong); }
.run-row__note { font-size: 12px; color: var(--text-muted); }
.run-row__note--error { color: #a3323a; }
.run-row__num { font-family: var(--font-alt); }
.run-row__num--match { font-weight: 700; color: var(--teal-700); }
.run-row__num--error { color: #a3323a; font-weight: 700; }

/* ---------- Detail page ---------- */
.back-link { display: inline-flex; align-items: center; gap: 6px; border: none; background: none; cursor: pointer; color: var(--text-muted); font-size: 14px; font-weight: 700; padding: 0; text-decoration: none; align-self: flex-start; }
.back-link:hover { text-decoration: underline; }
.detail-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border-subtle); }
.detail-row:last-child { border-bottom: none; }
.detail-row__icon { color: var(--text-muted); margin-top: 1px; }
.detail-row__label { font-size: 14px; color: var(--text-muted); width: 150px; flex: 0 0 150px; }
.detail-row__value { font-size: 14px; font-weight: 700; color: var(--text-strong); word-break: break-word; }
.detail-row__value--mono { font-family: var(--font-alt); }
.doubt-box { display: flex; gap: 8px; padding: 12px; border-radius: var(--radius-md); background: var(--surface-card); border: 1px solid var(--border-subtle); }
.doubt-box--sunken { background: var(--gray-50); }

/* ---------- Twijfel ---------- */
.twijfel-item { display: flex; gap: 16px; align-items: flex-start; }
.twijfel-item__actions { display: flex; flex-direction: column; gap: 8px; flex: 0 0 168px; }

/* ---------- Functies (accordion) ---------- */
details.functie { border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); background: var(--surface-card); overflow: hidden; }
details.functie + details.functie { margin-top: 12px; }
details.functie summary { list-style: none; display: flex; align-items: center; gap: 14px; padding: 16px 20px; cursor: pointer; }
details.functie summary::-webkit-details-marker { display: none; }
details.functie summary .chevron { color: var(--text-muted); display: inline-flex; transition: transform .15s; }
details.functie[open] summary .chevron { transform: rotate(90deg); }
.functie__title-row { display: flex; align-items: center; gap: 10px; }
.functie__title { font-weight: 700; font-size: 16px; color: var(--text-strong); }
.functie__submeta { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.functie__switch-wrap { margin-left: auto; }
.functie__body { padding: 4px 20px 20px 52px; border-top: 1px solid var(--border-subtle); }
.functie__section-label { margin-top: 16px; margin-bottom: 8px; font-size: 13px; font-weight: 700; color: var(--teal-900); }
.functie__section-label--negatief { color: #a3323a; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip-form { display: inline-flex; gap: 6px; align-items: center; }
.chip-form input[type=text] { border: 1px dashed var(--border-strong); border-radius: var(--radius-pill); padding: 4px 12px; font-size: 13px; font-family: var(--font-body); background: none; color: var(--text-body); width: 140px; }

/* ---------- Bronnen ---------- */
.field-block { margin-bottom: 14px; }
.field-block__label { font-size: 13px; font-weight: 700; color: var(--text-strong); margin-bottom: 5px; }
.field-block__value { padding: 9px 12px; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--gray-50); font-size: 14px; color: var(--text-body); }
.field-block__value--mono { font-family: var(--font-alt); }
.field-block__hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.cpv-row { display: flex; align-items: center; gap: 10px; font-size: 13px; margin-bottom: 8px; }
.cpv-row__code { font-family: var(--font-alt); font-weight: 700; color: var(--text-strong); min-width: 84px; }
.cpv-row__label { color: var(--text-body); flex: 1; }
.source-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.source-card-head h3 { margin: 0; font-size: 18px; flex: 1; }

/* ---------- Login ---------- */
.login-shell { display: flex; min-height: 100vh; font-family: var(--font-body); }
.login-panel { flex: 1 1 46%; background: var(--ink-800); color: #fff; position: relative; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.login-panel img { height: 30px; align-self: flex-start; position: relative; z-index: 1; }
.login-panel__content { position: relative; z-index: 1; max-width: 420px; }
.login-panel__eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .24em; color: var(--teal-300); margin-bottom: 16px; }
.login-panel__title { color: #fff; font-size: 40px; line-height: 1.1; margin: 0 0 16px; }
.login-panel__desc { color: var(--gray-300); font-size: 17px; line-height: 1.6; margin: 0; }
.login-panel__footer { font-size: 13px; color: var(--gray-400); position: relative; z-index: 1; }
.login-panel__triangle { position: absolute; right: -60px; bottom: -60px; width: 0; height: 0; border-left: 160px solid transparent; border-right: 160px solid transparent; border-bottom: 280px solid var(--teal-500); opacity: .18; transform: rotate(12deg); }
.login-form-side { flex: 1 1 54%; display: flex; align-items: center; justify-content: center; padding: 32px; background: var(--surface-page); }
.login-form-wrap { width: 100%; max-width: 380px; }
.login-form-wrap h2 { font-size: 28px; margin: 0 0 6px; }
.login-form-wrap > p.lead { color: var(--text-muted); margin: 0 0 28px; }
.login-form { display: flex; flex-direction: column; gap: 18px; }
.login-row { display: flex; align-items: center; justify-content: space-between; }
.login-row a { font-size: 14px; font-weight: 700; }
.login-error { background: #fdeef0; border: 1px solid #f6cdd0; color: #a3323a; border-radius: var(--radius-md); padding: 10px 14px; font-size: 14px; }

@media (max-width: 860px) {
  .login-shell { flex-direction: column; }
  .login-panel { flex: 0 0 auto; }
}

/* ---------- Dialog ---------- */
dialog.dialog { padding: 0; border: none; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; max-width: 480px; font-family: var(--font-body); }
dialog.dialog::backdrop { background: rgba(13, 14, 30, .55); }
.dialog__header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border-subtle); }
.dialog__header h3 { margin: 0; font-size: var(--fs-h4); }
.dialog__close { border: none; background: transparent; cursor: pointer; color: var(--text-muted); display: inline-flex; padding: 4px; }
.dialog__body { padding: 22px; color: var(--text-body); line-height: var(--lh-normal); }
.dialog__footer { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--border-subtle); background: var(--gray-50); }

/* ---------- Flash messages ---------- */
.flash-stack { display: flex; flex-direction: column; gap: 10px; padding: 16px 28px 0; }
