/* App-level components added for the interactive prototype. Uses tokens only. */
a.kpi, a.ven, a.venue-card { color: inherit; }
a.kpi:hover, a.ven:hover, a.venue-card:hover { color: inherit; }
.spacer { flex: 1; }
.stack { display: grid; gap: 16px; align-content: start; }
.cell-strong { font-weight: 500; color: var(--text); }
.cell-2 { color: var(--text-2); }
.cell-3 { color: var(--text-3); }
.ta-r { text-align: right !important; }
.prose { color: var(--text-2); font-size: var(--fs-13); line-height: 1.6; text-wrap: pretty; white-space: pre-line; }
.badges { display: flex; gap: 4px; flex-wrap: wrap; }
.co__name { color: var(--text); }
.co__mark--lg { width: 44px; height: 44px; border-radius: 12px; font-size: 18px; }
.avatar--empty { background: transparent; color: var(--text-3); box-shadow: inset 0 0 0 1px dashed var(--border-strong); border: 1px dashed var(--border-strong); }
.avatar--xl { width: 48px; height: 48px; font-size: 15px; }
a.avatar { text-decoration: none; }
a.avatar--me:hover { color: #fff; }
.btn--danger { background: var(--accent); color: #fff; }
.btn--danger:hover { background: var(--accent-hover); color: #fff; }
.text-danger { color: var(--accent-ink); }
.row-actions--show { opacity: 1; }

/* Centered content column */
.content { width: 100%; margin-inline: auto; }
.span-12 { grid-column: 1 / -1; }

/* Wide call form (Calls page) */
.call-form--wide > .form-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.call-form--wide > .form-grid > .fld--full { grid-column: span 2; }
.call-form--wide > .form-grid > [data-radio-required],
.call-form--wide > .form-grid > .check,
.call-form--wide > .form-grid > .fu-fields { grid-column: 1 / -1; }
.call-form--wide .fu-fields { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.call-form--wide .fu-fields > .fld { grid-column: span 1; }
@media (max-width: 1100px) {
  .call-form--wide > .form-grid, .call-form--wide .fu-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Page header */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-title { margin-top: 6px; font-size: var(--fs-28); font-weight: 500; letter-spacing: -.025em; line-height: 1.15; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.page-count { font-size: var(--fs-16); color: var(--text-3); font-weight: 400; letter-spacing: 0; font-family: var(--font-mono); }
.page-sub { margin-top: 4px; color: var(--text-2); font-size: var(--fs-13); }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-13); color: var(--text-3); justify-self: start; margin-bottom: -12px; }

/* Controls */
.ctl {
  width: 100%; min-height: 38px; padding: 8px 12px; border-radius: var(--r-md); border: 0; outline: none;
  background: var(--surface-2); color: var(--text); font-size: var(--fs-13);
  box-shadow: inset 0 0 0 1px var(--border-strong); transition: box-shadow var(--dur), background-color var(--dur);
}
.ctl:hover { box-shadow: inset 0 0 0 1px var(--text-3); }
.ctl:focus { background: var(--surface); box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 3px var(--accent-ring); }
.ctl::placeholder { color: var(--text-3); }
select.ctl { appearance: none; padding-right: 32px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
textarea.ctl { resize: vertical; line-height: 1.5; min-height: 72px; }
.ctl--sm { min-height: 32px; padding: 5px 10px; font-size: var(--fs-12); border-radius: var(--r-sm); width: auto; }
select.ctl--sm { padding-right: 28px; }
.ctl--num { width: 76px; text-align: right; font-variant-numeric: tabular-nums; }
input[type="date"].ctl, input[type="time"].ctl { color-scheme: inherit; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid--3 .fld--wide { grid-column: span 2; }
.fld { display: grid; gap: 6px; align-content: start; min-width: 0; border: 0; }
.fld--full, .form-grid > .fld--full { grid-column: 1 / -1; }
.fld__label { font-size: var(--fs-12); font-weight: 500; color: var(--text-2); }
.req { color: var(--accent-ink); font-style: normal; margin-left: 3px; }
.fld__err { font-size: var(--fs-12); color: var(--accent-ink); min-height: 0; }
.fld__err:empty { display: none; }
.fld.is-invalid .ctl { box-shadow: inset 0 0 0 1px var(--accent); }
.fld--inline { display: flex; align-items: center; gap: 12px; }
.form-section { font-size: var(--fs-11); font-family: var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); padding-top: 10px; border-top: 1px solid var(--border); margin-top: 4px; }
.form-section span { text-transform: none; letter-spacing: 0; font-family: var(--font-sans); }
.form-section--row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.fu-fields { padding: 14px; border-radius: var(--r-md); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); }
.fu-fields[hidden] { display: none; }

.check { display: inline-flex; align-items: center; gap: 10px; font-size: var(--fs-13); color: var(--text-2); cursor: pointer; user-select: none; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check__box { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; color: transparent; flex: none;
  box-shadow: inset 0 0 0 1px var(--border-strong); background: var(--surface-2); transition: all var(--dur) var(--ease-out); }
.check__box .ico { stroke-width: 2.5; transform: scale(.6); transition: transform var(--dur) var(--ease-out); }
.check input:checked + .check__box { background: var(--accent); box-shadow: none; color: #fff; }
.check input:checked + .check__box .ico { transform: scale(1); }
.check input:focus-visible + .check__box { box-shadow: 0 0 0 3px var(--accent-ring); }

.radio-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.radio-chip { position: relative; cursor: pointer; }
.radio-chip input { position: absolute; opacity: 0; pointer-events: none; }
.radio-chip span { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: var(--r-pill); font-size: var(--fs-12); font-weight: 500;
  color: var(--text-2); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border-strong); transition: all var(--dur); }
.radio-chip:hover span { color: var(--text); box-shadow: inset 0 0 0 1px var(--text-3); }
.radio-chip input:checked + span { color: var(--text); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.radio-chip input:focus-visible + span { box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 3px var(--accent-ring); }
fieldset.fld.is-invalid .radio-chip span { box-shadow: inset 0 0 0 1px var(--accent); }
fieldset.fld { padding: 0; margin: 0; }
fieldset.fld legend { margin-bottom: 6px; }

/* Alerts */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); font-size: var(--fs-13); line-height: 1.5; color: var(--text-2);
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border-strong); }
.alert > .ico { margin-top: 1px; flex: none; }
.alert strong { color: var(--text); font-weight: 500; }
.alert--info > .ico { color: var(--info-ink); }
.alert--warn { background: var(--info-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--info) 35%, transparent); }
.alert--warn > .ico { color: var(--info-ink); }
.alert--danger { background: var(--accent-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); color: var(--text); }
.alert--danger > .ico { color: var(--accent-ink); }
.alert--sim { background: transparent; box-shadow: inset 0 0 0 1px dashed var(--border-strong); border: 1px dashed var(--border-strong); }
.alert--sim > .ico { color: var(--text-3); }
.dup-list { list-style: none; display: grid; gap: 6px; margin: 8px 0; }
.dup-list li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dup-list__name { font-weight: 500; color: var(--text); }
.dup-list__why { font-size: var(--fs-12); color: var(--text-3); }
.dup-list a { font-size: var(--fs-12); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }

/* Toolbar */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.toolbar--sub { padding: 10px 22px; border-top: 1px solid var(--border); margin-top: 14px; }
.toolbar__count { margin-left: auto; font-size: var(--fs-12); color: var(--text-3); font-family: var(--font-mono); }
.search--inline { flex: 1 1 260px; max-width: 360px; margin-left: 0; height: 32px; }
.tb-select { display: inline-flex; }
.th-sort { display: inline-flex; align-items: center; gap: 6px; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; }
.th-sort:hover, .th-sort.is-on { color: var(--text); }
.th-sort__ico { font-size: 10px; opacity: .6; }
.pager { display: flex; align-items: center; gap: 2px; }
.pager__n { min-width: 30px; height: 30px; border-radius: var(--r-sm); font-size: var(--fs-12); color: var(--text-2); font-variant-numeric: tabular-nums; }
.pager__n:hover { background: var(--surface-2); color: var(--text); }
.pager__n.is-active { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
.table tbody tr[data-href] { cursor: pointer; }
.table tbody tr[data-href]:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.empty-state { display: grid; justify-items: center; gap: 12px; padding: 36px 16px; text-align: center; color: var(--text-3); font-size: var(--fs-13); }

/* Modal */
.modal-layer { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; background: var(--overlay); backdrop-filter: blur(6px); animation: fade .2s ease; }
.modal { width: 100%; max-height: calc(100vh - 48px); display: flex; flex-direction: column; border-radius: var(--r-lg); background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border-strong), var(--shadow-pop); animation: pop .32s var(--ease-out); overflow: hidden; }
.modal--sm { max-width: 420px; } .modal--md { max-width: 560px; } .modal--lg { max-width: 720px; } .modal--xl { max-width: 1040px; }
.modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal__head h2 { font-size: var(--fs-16); font-weight: 500; }
.modal__form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.modal__body { padding: 20px 22px; overflow: auto; display: grid; gap: 16px; }
.modal__text { color: var(--text-2); text-wrap: pretty; }
.modal__foot { display: flex; align-items: center; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--border); background: var(--bg-elev); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.985); } }

.toasts { position: fixed; right: 24px; bottom: 24px; z-index: 60; display: grid; gap: 8px; }
.toast { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--r-md); font-size: var(--fs-13); max-width: 380px;
  background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong), var(--shadow-pop); animation: pop .3s var(--ease-out); transition: opacity .3s, transform .3s; }
.toast .ico { color: var(--positive-ink); }
.toast--danger .ico { color: var(--accent-ink); }
.toast.is-out { opacity: 0; transform: translateY(6px); }

/* Topbar additions */
.search--global { position: relative; }
.search__results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 20; padding: 6px; border-radius: var(--r-md); background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border-strong), var(--shadow-pop); display: grid; gap: 2px; }
.search__results[hidden] { display: none; }
.sr { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); color: var(--text-2); }
.sr span { display: grid; line-height: 1.3; min-width: 0; }
.sr strong { color: var(--text); font-weight: 500; font-size: var(--fs-13); }
.sr small { font-size: var(--fs-11); color: var(--text-3); }
.sr:hover, .sr.is-sel { background: var(--surface-2); color: var(--text); }
.sr-empty { padding: 10px; font-size: var(--fs-13); color: var(--text-3); }
.lang-switch { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--r-pill); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border-strong); }
.lang-switch button { height: 26px; min-width: 32px; padding: 0 8px; border-radius: var(--r-pill); font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: .06em; color: var(--text-3); transition: all var(--dur); }
.lang-switch button:hover { color: var(--text); }
html[data-lang="tr"] .lang-switch [data-lang="tr"], html[data-lang="en"] .lang-switch [data-lang="en"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.2), inset 0 0 0 1px var(--border-strong); }
.topbar__crumb a { color: var(--text-3); }
.topbar__crumb a:hover { color: var(--text); }
.topbar__crumb strong { max-width: 280px; overflow: hidden; text-overflow: ellipsis; }

/* Detail */
.detail-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.detail-head__id { display: flex; align-items: center; gap: 16px; min-width: 0; }
.detail-head__id .page-title { margin-top: 0; }
.detail-head__meta { color: var(--text-3); font-size: var(--fs-13); margin-top: 2px; }
.detail-bar { display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap; padding: 14px 18px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.detail-bar__item { display: grid; gap: 6px; }
.detail-bar__tags { flex: 1; min-width: 240px; }
.detail-bar__alert { flex-basis: 100%; }
.tag-edit { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 32px; }
.tag--rm { gap: 4px; padding-right: 3px; height: 24px; }
.tag--rm button { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 4px; color: var(--text-3); }
.tag--rm button:hover { background: var(--surface-3); color: var(--text); }
.tag-edit__input { flex: 1; min-width: 120px; height: 28px; background: none; border: 0; outline: none; font-size: var(--fs-12); color: var(--text); }
.tag-edit__input::placeholder { color: var(--text-3); }
.kv { display: grid; gap: 10px; }
.kv > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; font-size: var(--fs-13); }
.kv dt { color: var(--text-3); }
.kv dd { color: var(--text); overflow-wrap: anywhere; }
.next-fu { display: grid; gap: 6px; padding: 12px; border-radius: var(--r-md); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); }
.next-fu p { color: var(--text-2); font-size: var(--fs-13); }
.next-fu.is-overdue { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent); }
.next-fu.is-overdue strong { color: var(--accent-ink); }

.timeline { list-style: none; display: grid; }
.tl { position: relative; padding: 0 0 18px 24px; display: grid; gap: 6px; }
.tl:not(:last-child)::before { content: ""; position: absolute; left: 5px; top: 14px; bottom: 0; width: 1px; background: var(--border); }
.tl__dot { position: absolute; left: 0; top: 5px; width: 11px; height: 11px; border-radius: 50%; background: var(--surface-3); box-shadow: inset 0 0 0 2px var(--border-strong); }
.tl__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: var(--fs-12); color: var(--text-3); }
.tl__head time { margin-left: auto; font-size: 11px; }
.tl__text { font-size: var(--fs-13); color: var(--text); text-wrap: pretty; }
.tl__meta { display: flex; align-items: center; gap: 6px; font-size: var(--fs-12); color: var(--text-3); }

.rows { list-style: none; display: grid; }
.row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--border); }
.row:first-child { border-top: 0; }
.row__main { flex: 1; min-width: 0; display: grid; line-height: 1.35; }
.row__main strong { font-weight: 500; }
.row__main > span { font-size: var(--fs-12); color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row__meta { display: grid; justify-items: end; gap: 1px; font-size: var(--fs-12); }
.row__meta a { color: var(--text-2); }
.row__actions { display: flex; gap: 4px; align-items: center; }
.rows .owner { min-width: 90px; font-size: var(--fs-12); }
.fu__due { display: grid; width: 84px; flex: none; font-size: var(--fs-12); line-height: 1.35; color: var(--text-2); }
.fu__due span:last-child { color: var(--text-3); }
.fu--overdue .fu__due span:first-child { color: var(--accent-ink); }
.fu--done { opacity: .6; }
.fu--done .row__main strong { text-decoration: line-through; text-decoration-color: var(--text-3); }

.note-form { display: grid; gap: 8px; margin-bottom: 16px; }
.note-form__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.notes { list-style: none; display: grid; gap: 14px; }
.note { display: flex; gap: 12px; }
.note > div { flex: 1; min-width: 0; }
.note__head { display: flex; align-items: center; gap: 10px; font-size: var(--fs-13); }
.note__head strong { font-weight: 500; }
.note__head time { font-size: 11px; color: var(--text-3); }
.note__head .btn { margin-left: auto; opacity: 0; transition: opacity var(--dur); }
.note:hover .note__head .btn, .note__head .btn:focus-visible { opacity: 1; }
.note p { margin-top: 4px; color: var(--text-2); font-size: var(--fs-13); text-wrap: pretty; white-space: pre-line; }

.card--sticky { position: sticky; top: 88px; align-self: start; }

/* Venues */
.venue-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; padding: 16px; }
.venue-card { display: grid; gap: 12px; height: 100%; padding: 16px; border-radius: var(--r-md); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); transition: box-shadow var(--dur), transform var(--dur) var(--ease-out); }
.venue-card:hover { box-shadow: inset 0 0 0 1px var(--border-strong), var(--shadow-md); transform: translateY(-1px); }
.venue-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.venue-card__head strong { font-weight: 500; line-height: 1.3; }
.venue-card__loc { display: flex; align-items: center; gap: 6px; font-size: var(--fs-12); color: var(--text-2); }
.venue-card__loc .ico { color: var(--text-3); }
.venue-card__contact { font-size: var(--fs-12); color: var(--text-3); padding-top: 10px; border-top: 1px solid var(--border); }
.venue-card__src { font-size: 11px; color: var(--text-3); }
.tags { flex-wrap: wrap; }
.table--rooms th, .table--rooms td { padding: 6px 6px; }
.table--rooms th:first-child, .table--rooms td:first-child { padding-left: 0; }
.table--rooms td:first-child .ctl { min-width: 160px; width: 100%; }

/* Users & settings */
.user-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.user-card { gap: 16px; }
.user-card.is-active { box-shadow: inset 0 0 0 1px var(--border-strong), var(--shadow-sm); }
.user-card__id { display: flex; align-items: center; gap: 14px; }
.user-card__id > div { flex: 1; }
.user-card__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--border); }
.load__stats--4 { grid-template-columns: repeat(4, 1fr); }
.unassigned--flat { margin-top: 0; padding-top: 0; border-top: 0; }
.settings { padding: 0; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 22px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.set-row:first-child { border-top: 0; }
.set-row h3 { font-size: var(--fs-14); font-weight: 500; }
.set-row p { font-size: var(--fs-12); color: var(--text-3); margin-top: 2px; max-width: 520px; }

/* Import wizard */
.wizard { padding: 0; }
.steps { list-style: none; display: flex; gap: 4px; padding: 16px 22px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.steps li { display: flex; align-items: center; gap: 8px; padding-right: 18px; font-size: var(--fs-12); font-weight: 500; color: var(--text-3); white-space: nowrap; }
.steps li:not(:last-child)::after { content: ""; width: 24px; height: 1px; background: var(--border-strong); margin-left: 10px; }
.steps__n { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 11px; font-family: var(--font-mono); box-shadow: inset 0 0 0 1px var(--border-strong); }
.steps li.is-current { color: var(--text); }
.steps li.is-current .steps__n { background: var(--accent); color: #fff; box-shadow: none; }
.steps li.is-done { color: var(--text-2); }
.steps li.is-done .steps__n { background: var(--surface-3); color: var(--positive-ink); }
.wizard__body { padding: 22px; display: grid; gap: 16px; }
.wizard__foot { display: flex; align-items: center; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--border); background: var(--bg-elev); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.dropzone { display: grid; justify-items: center; gap: 6px; padding: 36px 16px; border-radius: var(--r-lg); border: 1px dashed var(--border-strong); background: var(--surface-2); cursor: pointer; text-align: center; transition: border-color var(--dur), background-color var(--dur); }
.dropzone .ico { width: 24px; height: 24px; color: var(--text-3); }
.dropzone strong { font-weight: 500; }
.dropzone span { font-size: var(--fs-12); color: var(--text-3); }
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.imp-actions-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.imp-file { display: grid; gap: 12px; padding: 16px; border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--border); }
.imp-file__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.imp-file__head strong { font-weight: 500; font-size: var(--fs-13); }
.imp-sheet { display: grid; gap: 8px; }
.imp-sheet__name { font-size: var(--fs-12); color: var(--text-2); }
.table--mini, .table--map { font-size: var(--fs-12); }
.table--mini th, .table--mini td, .table--map th, .table--map td { padding: 7px 10px; }
.table--mini th:first-child, .table--mini td:first-child, .table--map th:first-child, .table--map td:first-child { padding-left: 10px; }
.table .is-ignored, .table tr.is-ignored td { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--border-strong); }
.table tr.is-ignored td:last-child { text-decoration: none; }
.locked { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-12); color: var(--text-3); }
.dups { list-style: none; display: grid; gap: 10px; }
.dup { display: grid; gap: 12px; padding: 14px; border-radius: var(--r-md); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); }
.dup.is-open { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent); }
.dup__cmp { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 16px; align-items: center; }
.dup__cmp > div { display: grid; gap: 2px; min-width: 0; font-size: var(--fs-12); color: var(--text-2); }
.dup__cmp strong { font-size: var(--fs-13); font-weight: 500; color: var(--text); }
.dup__vs { justify-items: center; text-align: center; max-width: 180px; }
.dup__vs small { font-size: 11px; color: var(--text-3); }
.dup__src { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.dup__choice { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--border); }
.dup__need { font-size: var(--fs-12); font-weight: 500; margin-left: 6px; }
.sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.sum__item { display: grid; gap: 2px; padding: 14px; border-radius: var(--r-md); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); }
.sum__item .num { font-size: var(--fs-28); font-weight: 500; letter-spacing: -.03em; line-height: 1.1; }
.sum__item span:last-child { font-size: var(--fs-12); color: var(--text-3); }
.rules { list-style: none; display: grid; gap: 8px; font-size: var(--fs-13); color: var(--text-2); }
.rules li { display: flex; gap: 10px; align-items: center; }
.rules .ico { color: var(--positive-ink); }
.result { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 12px 0; }
.result .sum { width: 100%; margin-top: 12px; text-align: left; }
.result h3 { font-size: var(--fs-20); font-weight: 500; }
.result__ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--positive-soft); color: var(--positive-ink); }
.result__actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.file-list { display: grid; gap: 4px; font-size: var(--fs-12); }
.file-list > span { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

@media (max-width: 1280px) {
  .card--sticky { position: static; }
  .lang-switch { order: -1; }
}
@media (max-width: 960px) { /* tablet portrait: the breadcrumb made the topbar wider than the viewport */
  .topbar__crumb, .search kbd { display: none; }
}
@media (max-width: 760px) {
  .call-form--wide > .form-grid, .call-form--wide .fu-fields { grid-template-columns: 1fr; }
  .call-form--wide > .form-grid > .fld--full { grid-column: auto; }
  .form-grid, .form-grid--3 { grid-template-columns: 1fr; }
  .form-grid--3 .fld--wide { grid-column: auto; }
  .dup__cmp { grid-template-columns: 1fr; }
  .row { flex-wrap: wrap; }
  .kv > div { grid-template-columns: 1fr; gap: 2px; }
  .load__stats--4 { grid-template-columns: repeat(2, 1fr); }
  .topbar .theme-toggle { display: none; }
}

/* ---------- Identity & access: user management ---------- */
.nowrap { white-space: nowrap; }
.um-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
button.kpi { width: 100%; min-height: 116px; cursor: pointer; }
.kpi.is-on { box-shadow: inset 0 0 0 1px var(--accent), var(--shadow-sm); }
.kpi.is-on .kpi__label { color: var(--text); }
.um-alerts { display: grid; gap: 8px; }
.alert__act { margin-left: auto; flex: none; }
.alert--ok { background: var(--positive-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--positive) 35%, transparent); color: var(--text); }
.alert--ok > .ico { color: var(--positive-ink); }
.um-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.um-id strong { display: flex; align-items: center; gap: 6px; white-space: nowrap; font-weight: 500; color: var(--text); }
.um-id small { display: block; font-size: var(--fs-12); color: var(--text-3); }
.um-status { display: grid; justify-items: start; gap: 4px; }
.um-sub { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-11); color: var(--text-3); }
.mfa-state { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: var(--fs-12); white-space: nowrap; }
.mfa-state--CONFIGURED { color: var(--positive-ink); }
.mfa-state--NOT_CONFIGURED { color: var(--text-3); }
.mfa-state--RESET_REQUIRED { color: var(--accent-ink); }
.avatar--pending { background: transparent; color: var(--text-3); box-shadow: none; border: 1px dashed var(--border-strong); }
.avatar--off { opacity: .45; }
.table--users tbody tr { cursor: pointer; }
.table--users tbody tr:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.table tr.is-off td { color: var(--text-3); }
.table tr.is-off .um-id strong { color: var(--text-2); }
.skel { display: block; height: 10px; border-radius: 4px; background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: skel 1.3s linear infinite; }
.skel--lg { width: 38%; height: 30px; margin: 4px 0; }
.skel--av { width: 26px; height: 26px; border-radius: 50%; flex: none; }
.toolbar .skel { height: 30px; border-radius: var(--r-sm); }
@keyframes skel { to { background-position: -200% 0; } }
.state-block { display: grid; justify-items: center; gap: 10px; padding: 44px 20px; text-align: center; }
.state-block h3 { font-size: var(--fs-16); font-weight: 500; }
.state-block p { max-width: 440px; color: var(--text-2); font-size: var(--fs-13); line-height: 1.55; text-wrap: pretty; }
.state-block .btn { margin-top: 6px; }
.state-block__ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--text-2); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border-strong); }
.state-block--error .state-block__ico { color: var(--accent-ink); background: var(--accent-soft); box-shadow: none; }
.um-empty { border-top: 1px solid var(--border); }

/* drawer */
.modal-layer:has(.modal--drawer) { place-items: stretch end; padding: 0; }
.modal--drawer { max-width: 500px; height: 100vh; max-height: none; border-radius: 0; animation: drawer-in .38s var(--ease-out); box-shadow: inset 1px 0 0 var(--border-strong), var(--shadow-pop); }
.modal--drawer .modal__body { flex: 1; align-content: start; gap: 22px; }
@keyframes drawer-in { from { opacity: 0; transform: translateX(28px); } }
.um-hero { display: flex; align-items: center; gap: 14px; }
.um-hero__badges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.um-drawer section { display: grid; gap: 12px; }
.um-drawer .form-section { margin: 0; }
.um-drawer .kv > div { grid-template-columns: 150px minmax(0, 1fr); }
.kv--wide > div { grid-template-columns: 170px minmax(0, 1fr); }
.um-acts { display: grid; gap: 6px; }
.um-act { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: var(--r-md); text-align: left;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); transition: box-shadow var(--dur), background-color var(--dur); }
.um-act:hover { background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--border-strong); }
.um-act:focus-visible { outline: none; box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 3px var(--accent-ring); }
.um-act__ico { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: var(--text-2); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.um-act strong { display: block; font-size: var(--fs-13); font-weight: 500; }
.um-act small { display: block; margin-top: 2px; font-size: var(--fs-12); color: var(--text-3); text-wrap: pretty; }
.um-act > .ico:last-child { color: var(--text-3); }
.um-act--danger strong, .um-act--danger .um-act__ico { color: var(--accent-ink); }
.um-act[disabled] { opacity: .6; cursor: not-allowed; background: transparent; }
.um-fine { display: flex; align-items: flex-start; gap: 8px; font-size: var(--fs-12); line-height: 1.5; color: var(--text-3); text-wrap: pretty; }
.um-fine > .ico { flex: none; margin-top: 2px; }
.stepup { display: grid; gap: 8px; padding: 14px; border-radius: var(--r-md); background: var(--bg-elev); box-shadow: inset 0 0 0 1px var(--border); }
.ctl--code { font-family: var(--font-mono); font-size: 18px; letter-spacing: .45em; text-align: center; }
.btn__spin { display: none; width: 14px; height: 14px; flex: none; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.btn.is-busy .btn__spin { display: block; }
.btn.is-busy > .ico { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* invite success */
.inv-done { justify-items: start; }
.inv-done__ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--info-ink); background: var(--info-soft); }
.inv-track { list-style: none; width: 100%; border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--border); }
.inv-track li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px 14px; border-top: 1px solid var(--border); }
.inv-track li:first-child { border-top: 0; }
.inv-track strong { display: block; font-size: var(--fs-13); font-weight: 500; }
.inv-track small { font-size: var(--fs-12); color: var(--text-3); }
.inv-step { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: var(--text-3); box-shadow: inset 0 0 0 1px var(--border-strong); }
.inv-step--ok { color: var(--positive-ink); background: var(--positive-soft); box-shadow: none; }
.inv-step--fail { color: var(--accent-ink); background: var(--accent-soft); box-shadow: none; }
.inv-step--wait { color: var(--info-ink); }
.inv-step--wait .btn__spin { display: block; width: 11px; height: 11px; border-width: 1.5px; }

/* ---------- Topbar: account panel + notifications ---------- */
.topbar__actions { position: relative; }
.acct-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 8px 0 4px; border-radius: var(--r-pill); color: var(--text-3);
  box-shadow: inset 0 0 0 1px var(--border); transition: box-shadow var(--dur), color var(--dur); }
.acct-btn:hover, .acct-btn[aria-expanded="true"] { color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
.acct-btn .avatar { width: 28px; height: 28px; }
.acct-btn[aria-expanded="true"] .ico { transform: rotate(180deg); }
.acct-btn .ico { transition: transform var(--dur) var(--ease-out); }
.bell { position: relative; }
.bell__dot { position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--bg); }
.pop { position: fixed; top: 72px; right: 16px; z-index: 40; width: 360px; max-width: calc(100vw - 24px); overflow: hidden;
  border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border-strong), var(--shadow-pop); animation: pop .24s var(--ease-out); }
.pop[hidden] { display: none; }
.acct__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 0; }
.acct__top--pad { padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.acct__mfa { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--positive-ink); }
.acct__id { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 16px 18px; }
.acct__who strong { display: block; font-size: var(--fs-14); font-weight: 500; }
.acct__who small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-12); color: var(--text-3); }
.acct__role { padding: 4px 8px; border-radius: var(--r-sm); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); box-shadow: inset 0 0 0 1px var(--border-strong); }
.acct__meta { display: grid; gap: 8px; padding: 0 18px 16px; border-bottom: 1px solid var(--border); }
.acct__meta div { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.acct__meta dt { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.acct__meta dd { font-size: var(--fs-12); font-weight: 500; color: var(--text); text-align: right; }
.acct__menu { display: grid; padding: 6px; border-bottom: 1px solid var(--border); }
.acct__item { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; height: 40px; padding: 0 12px; border-radius: var(--r-md);
  font-size: var(--fs-13); color: var(--text); text-align: left; transition: background-color var(--dur); }
.acct__item:hover, .acct__item:focus-visible { background: var(--surface-2); color: var(--text); outline: none; }
.acct__item > .ico:first-child { color: var(--text-2); }
.acct__item > .ico:last-child { color: var(--text-3); }
.acct__item--out, .acct__item--out:hover, .acct__item--out > .ico:first-child { color: var(--accent-ink); }
.acct__note { padding: 12px 18px 14px; font-size: var(--fs-12); line-height: 1.5; color: var(--text-3); background: var(--bg-elev); text-wrap: pretty; }
.notif__list { list-style: none; max-height: 380px; overflow: auto; }
.notif__item { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding: 14px 18px; border-top: 1px solid var(--border); }
.notif__item:first-child { border-top: 0; }
.notif__item.is-unread { background: color-mix(in srgb, var(--accent) 4%, transparent); }
.notif__item.is-unread::before { content: ""; position: absolute; left: 8px; top: 27px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.notif__ico { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: var(--positive-ink); background: var(--positive-soft); }
.notif__title { font-size: var(--fs-13); font-weight: 500; color: var(--text); }
.notif__body { margin-top: 2px; font-size: var(--fs-12); color: var(--text-2); }
.notif__meta { margin-top: 4px; font-size: var(--fs-12); color: var(--text-3); overflow-wrap: anywhere; }
.notif__meta strong { font-weight: 500; color: var(--text); }
.notif__link { margin: 8px 0 0; font-size: var(--fs-12); }
.notif__empty { padding: 32px 18px; text-align: center; font-size: var(--fs-13); color: var(--text-3); }
.faq details { border-top: 1px solid var(--border); }
.faq details:first-child { border-top: 0; }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; list-style: none; cursor: pointer; font-size: var(--fs-13); font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ico { color: var(--text-3); transition: transform var(--dur) var(--ease-out); }
.faq details[open] summary .ico { transform: rotate(180deg); }
.faq details p { padding: 0 0 14px; font-size: var(--fs-13); line-height: 1.6; color: var(--text-2); text-wrap: pretty; }
.faq.modal__body { gap: 0; }
.proto.modal__body { gap: 0; padding-top: 16px; }
.proto .alert { margin-bottom: 8px; }
.proto .set-row { padding: 16px 0; }
.proto .set-row:nth-child(2) { border-top: 0; }
.set-row--stack { display: grid; gap: 12px; }
.proto-ev { list-style: none; display: grid; gap: 8px; }
.proto-ev li { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border-radius: var(--r-md); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); }

@media (max-width: 1180px) { .um-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .col-wide { display: none; } }
@media (max-width: 760px) { .modal--drawer { max-width: 100%; } .um-drawer .kv > div, .kv--wide > div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

.alert[hidden], .um-fine[hidden] { display: none; }
@media (max-width: 1180px) {
  .topbar { gap: 16px; padding: 0 20px; }
  .topbar [data-new-customer-global] { width: var(--h); padding: 0; }
  .topbar [data-new-customer-global] span { display: none; }
}
/* ---------- async states: loading skeleton, error state, busy buttons, import progress (functional additions; tokens only) ---------- */
.skel { border-radius: var(--r-md); background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: skel 1.4s ease-in-out infinite; }
.skel--title { height: 28px; width: 240px; margin-bottom: 20px; }
.skel--kpi { height: 92px; flex: 1; }
.skel--card { height: 280px; margin-top: 16px; }
.skel-row { display: flex; gap: 16px; }
@keyframes skel { to { background-position: -200% 0; } }
.state { display: grid; justify-items: center; gap: 10px; max-width: 460px; margin: 12vh auto; padding: 32px 24px; text-align: center; color: var(--text-2); font-size: var(--fs-13); }
.state > .ico { width: 28px; height: 28px; color: var(--accent-ink); }
.state h2 { margin: 0; font-size: var(--fs-16, 16px); font-weight: 500; color: var(--text); }
.state p { margin: 0 0 6px; }
.btn.is-busy { position: relative; pointer-events: none; opacity: .75; }
.btn.is-busy::after { content: ""; width: 12px; height: 12px; margin-left: 8px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.form-error { margin-bottom: 12px; }
.imp-progress { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.imp-progress progress { flex: 1; height: 6px; accent-color: var(--accent); }
.table-wrap.is-ignored { opacity: .5; }
.nav__count[hidden] { display: none; } /* the overdue badge is hidden at 0 but its display rule won over [hidden] */
.table-wrap { position: relative; } /* contains the absolutely positioned .sr-only header cells so they cannot widen the page */
tr.is-deleted td { color: var(--text-3); }
tr.is-deleted .co__name { text-decoration: line-through; text-decoration-color: var(--border-strong); }
@keyframes spin { to { transform: rotate(360deg); } }
.nav__item[hidden], .badge[hidden] { display: none; }
.bell[hidden], .acct-btn[hidden] { display: none; } /* .btn display rules would otherwise win over [hidden] */

.um-events { list-style: none; display: grid; gap: 6px; }
.um-events li { display: flex; justify-content: space-between; gap: 12px; font-size: var(--fs-12); color: var(--text-2); }
.um-events time { color: var(--text-3); white-space: nowrap; }

/* HERMES-IMP-06: content-aware mapping + resumable drafts */
.map-ev { display: block; color: var(--text-3); font-size: .78rem; margin-top: 2px; }
.map-ev--warn { color: var(--accent-ink); }
tr.is-review > td:first-child { border-left: 2px solid var(--info); }
tr.is-review:has(.badge--danger) > td:first-child { border-left-color: var(--accent); }
.draft-state { display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); font-size: .8rem; margin-top: 8px; }
.draft-state--err { color: var(--accent-ink); }
.resume-box { margin-bottom: 16px; }
.rows--flush { margin: 8px 0; }
