/* Epoch Solutions Group brand (sampled from docs/logo/Epoch_Primary_Standard.png). */
:root {
    --brand-navy: #1f3449;
    --brand-navy-dark: #152536;
    --brand-navy-tint: #e8edf3;
    --brand-red: #ef3e2e;
}

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

body { background: #fff; color: #1f2a37; }

a, .btn-link {
    color: #24578a;
}

.btn-primary {
    color: #fff;
    background-color: var(--brand-navy);
    border-color: var(--brand-navy);
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active {
    background-color: var(--brand-navy-dark) !important;
    border-color: var(--brand-navy-dark) !important;
}
.btn-primary:disabled, .btn-primary.disabled { background-color: #7d8b9a; border-color: #7d8b9a; }
.btn-outline-primary { color: var(--brand-navy); border-color: var(--brand-navy); }
.btn-outline-primary:hover, .btn-outline-primary:active { background-color: var(--brand-navy) !important; border-color: var(--brand-navy) !important; color: #fff !important; }

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus, .form-select:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(31, 52, 73, .45);
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* Drag preview for the Gantt chart (created by wwwroot/js/gantt.js, so not in the component's scoped CSS). */
.gantt-drag-preview {
    position: fixed; z-index: 2000; pointer-events: none; box-sizing: border-box;
    border: 2px dashed #2563eb; background: rgba(37, 99, 235, .15); border-radius: 6px;
    color: #1e3a8a; font: 600 12px/1 system-ui, sans-serif; display: flex; align-items: center;
    padding: 0 6px; white-space: nowrap; overflow: hidden;
}
.gantt-drag-preview.floating { background: #1f2a37; color: #fff; border: none; padding: 6px 10px; }
body.gantt-dragging, body.gantt-dragging * { cursor: grabbing !important; user-select: none; }

/* Map tab (Leaflet markers and popups live outside Blazor's scoped CSS). */
.crew-icon { background: none; border: none; }
.crew-pin {
    display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; width: max-content; transform: translateY(-50%);
    background: #fff; border: 2px solid var(--crew); border-radius: 999px; padding: 1px 8px 1px 3px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, .25); font: 600 11px/1.6 system-ui, sans-serif; color: #1f2a37;
}
.crew-truck { font-size: 14px; }
.map-pop { font: 13px/1.4 system-ui, sans-serif; min-width: 200px; }
.map-pop .mp-head { display: flex; justify-content: space-between; gap: 8px; }
.map-pop .mp-title { font-weight: 600; margin: 2px 0; }
.map-pop .mp-muted { color: #6b7686; }
.map-pop .mp-small { font-size: 11px; margin-top: 4px; }
.map-pop .mp-conflict { color: #b42318; font-weight: 600; margin-top: 2px; }
.map-pop .mp-status { font-size: 11px; font-weight: 600; border-radius: 4px; padding: 0 5px; background: #e0e7ff; color: #3730a3; text-transform: capitalize; }
.map-pop .mp-unassigned, .map-pop .mp-partial { background: #fef3c7; color: #92400e; }
.map-pop .mp-en_route { background: #fef3c7; color: #78350f; }
.map-pop .mp-on_site, .map-pop .mp-working { background: #dcfce7; color: #14532d; }
.map-pop .mp-done { background: #f1f5f9; color: #475569; }

/* Administration */
.admin { display: flex; min-height: calc(100vh - 52px); background: #f7f9fb; }
.admin-nav { width: 200px; flex-shrink: 0; background: #fff; border-right: 1px solid #e3e8ef; padding: 1rem .6rem; display: flex; flex-direction: column; gap: 2px; }
.admin-nav-title { font-size: .72rem; font-weight: 700; text-transform: uppercase; color: #6b7686; padding: 0 .6rem .5rem; }
.admin-link { display: block; padding: .4rem .6rem; border-radius: 6px; color: #1f2a37; text-decoration: none; font-size: .9rem; }
.admin-link:hover { background: #f1f5f9; }
.admin-link.active { background: #e0ecff; color: #1d4ed8; font-weight: 600; }
.admin-nav-note { margin-top: auto; font-size: .72rem; color: #6b7686; padding: .6rem; }
.admin-content { flex: 1; min-width: 0; padding: 1.1rem 1.4rem; }
.admin-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.admin-head h1 { font-size: 1.3rem; margin: 0; margin-right: auto; }
.admin-head .search { width: 240px; }
.admin-help { color: #6b7686; font-size: .85rem; margin: .35rem 0 .8rem; }
.admin-sub { font-size: .8rem; text-transform: uppercase; color: #6b7686; font-weight: 700; margin: .4rem 0; }
.admin-alert { padding: .5rem .8rem; border-radius: 6px; font-size: .86rem; margin-bottom: .7rem; }
.admin-alert.error { background: #fdecec; color: #b42318; }
.admin-alert.ok { background: #ecfdf3; color: #166534; }
.admin-split { display: flex; gap: 1rem; align-items: flex-start; }
.admin-split > .admin-table, .admin-split > .stack { flex: 1; min-width: 0; }
.admin-table { width: 100%; background: #fff; border: 1px solid #e3e8ef; border-radius: 8px; border-collapse: separate; border-spacing: 0; font-size: .84rem; overflow: hidden; }
.admin-table th { background: #f8fafc; color: #6b7686; font-weight: 600; font-size: .72rem; text-transform: uppercase; padding: .45rem .6rem; border-bottom: 1px solid #e3e8ef; text-align: left; }
.admin-table td { padding: .45rem .6rem; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr.editing td { background: #eff6ff; }
.admin-table tr.inactive td { color: #94a3b8; }
.admin-table .actions { white-space: nowrap; text-align: right; }
.admin-table .actions .btn-link { padding: 0 .3rem; font-size: .8rem; }
.admin-table code { color: #3730a3; }
.admin .chip { display: inline-block; font-size: .7rem; border-radius: 4px; padding: 0 .35rem; margin: 1px 2px 1px 0; line-height: 1.6; }
.admin .chip.skill { background: #eef2ff; color: #3730a3; }
.admin .chip.equip { background: #ecfdf5; color: #065f46; }
.admin .chip.role { background: #e0ecff; color: #1d4ed8; }
.admin .chip.contractor { background: #fff7ed; color: #9a3412; }
.admin .state { font-size: .72rem; font-weight: 600; border-radius: 4px; padding: 0 .35rem; margin-right: 2px; }
.admin .state.on { background: #ecfdf3; color: #166534; }
.admin .state.off { background: #fdecec; color: #b42318; }
.admin .state.warn { background: #fffbeb; color: #92400e; }
.admin .you { font-size: .68rem; color: #6b7686; margin-left: .3rem; }
.admin-editor { width: 340px; flex-shrink: 0; background: #fff; border: 1px solid #e3e8ef; border-radius: 8px; padding: .9rem; display: flex; flex-direction: column; gap: .55rem; position: sticky; top: 1rem; font-size: .85rem; }
.admin-editor.wide { width: 560px; }
.admin-editor h2 { font-size: 1rem; margin: 0 0 .2rem; }
.admin-editor label { display: flex; flex-direction: column; gap: 2px; font-weight: 500; color: #475569; }
.admin-editor label.check, .admin-head label.check { flex-direction: row; align-items: center; gap: .4rem; font-weight: 400; color: #1f2a37; }
.admin-editor label.inline { flex-direction: row; align-items: center; gap: .3rem; font-weight: 400; white-space: nowrap; }
.admin-editor fieldset { border-top: 1px solid #e3e8ef; padding-top: .5rem; }
.admin-editor legend { font-size: .72rem; text-transform: uppercase; font-weight: 700; color: #6b7686; float: none; margin-bottom: .3rem; }
.admin-editor .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem .7rem; }
.admin-editor .row-line { display: flex; align-items: center; gap: .35rem; margin-bottom: .35rem; flex-wrap: wrap; }
.admin-editor .row-line select { flex: 1; min-width: 150px; }
.admin-editor .row-line select.role { flex: 0 0 120px; min-width: 0; }
.admin-editor .row-line.ended { opacity: .55; }
.admin-editor .num { width: 64px; }
.admin-editor .code { text-transform: uppercase; }
.admin-editor .hint, .admin-editor .check .hint { font-size: .74rem; color: #6b7686; font-weight: 400; }
.admin-editor .editor-actions { display: flex; gap: .4rem; margin-top: .3rem; }
.admin-nav-group { font-size: .68rem; font-weight: 600; text-transform: uppercase; color: #94a3b8; padding: .7rem .6rem .2rem; }
.admin .swatch { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; border: 1px solid rgba(0,0,0,.1); }
.admin .prio-name { border-left: 4px solid; padding-left: .4rem; font-weight: 600; }
.admin-editor .color-row { display: flex; gap: .4rem; }
.admin-editor .color-row input[type=color] { width: 44px; padding: 2px; }
.admin-head .filter { width: auto; }

/* Branded login */
.login-wrap { display: flex; justify-content: center; padding: 3rem 1rem; }
.login-card { width: 100%; max-width: 400px; background: #fff; border: 1px solid #e3e8ef; border-top: 4px solid var(--brand-red); border-radius: 10px; padding: 2rem 2rem 1.25rem; box-shadow: 0 10px 30px rgba(31, 52, 73, .08); }
.login-logo { display: block; margin: 0 auto .75rem; height: 88px; width: auto; }
.login-product { text-align: center; font-size: 1.35rem; font-weight: 400; color: var(--brand-navy); margin: 0; }
.login-product strong { font-weight: 700; }
.login-tag { text-align: center; color: #6b7686; font-size: .88rem; margin: .2rem 0 1.4rem; }
.login-card .form-check-input:checked { background-color: var(--brand-navy); border-color: var(--brand-navy); }

/* Brand touches shared by the board and admin */
.admin-link.active { background: var(--brand-navy-tint) !important; color: var(--brand-navy) !important; box-shadow: inset 3px 0 0 var(--brand-red); }
.admin-editor .week-grid { width: 100%; font-size: .8rem; border-collapse: collapse; }
.admin-editor .week-grid th { font-size: .68rem; text-transform: uppercase; color: #6b7686; font-weight: 600; padding: 0 .2rem .2rem; }
.admin-editor .week-grid td { padding: .12rem .2rem; }
.admin-editor .week-grid tr.off td { color: #94a3b8; }
.admin-editor .week-grid .num { width: 64px; }
/* Narrower screens: the editor goes above the list at full width instead of being pushed off the right edge. */
@media (max-width: 1400px) {
    .admin-split { flex-direction: column; }
    .admin-split > .admin-editor { order: -1; width: 100%; max-width: 760px; position: static; }
    .admin-split > .admin-table, .admin-split > .stack { width: 100%; }
}
.key-reveal { display: flex; flex-direction: column; gap: .3rem; }
.key-reveal .key { font-size: .95rem; background: #fff; padding: .3rem .5rem; border-radius: 4px; border: 1px solid #bbf7d0; word-break: break-all; user-select: all; }
.admin-sub.intake-head { display: flex; align-items: center; gap: .8rem; margin-top: 1.2rem; }
.admin-sub.intake-head label.check { text-transform: none; font-weight: 400; color: #1f2a37; display: flex; gap: .3rem; align-items: center; }
.admin-sub.intake-head .btn-link { text-transform: none; font-size: .8rem; padding: 0; }
.admin-table td.detail { color: #b42318; font-size: .78rem; max-width: 360px; }
.api-help { background: #fff; border: 1px solid #e3e8ef; border-radius: 8px; padding: .7rem 1rem; font-size: .84rem; }
.api-help ul { margin: .3rem 0 0; padding-left: 1.1rem; }
.api-help li { margin-bottom: .3rem; }

/* ---------------------------------------------------------------- Form Builder (Administration → Forms) */
.code-font { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8rem; }
.fb-muted, .pv-muted { color: #6b7686; font-size: .8rem; }
.fb-tabs { display: flex; gap: 2px; border-bottom: 1px solid #e3e8ef; margin: .6rem 0 .8rem; }
.fb-tabs button { background: none; border: none; padding: .45rem .8rem; font-size: .86rem; color: #475569; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.fb-tabs button.active { color: var(--brand-navy); font-weight: 600; border-bottom-color: var(--brand-red); }
.fb-tabs button .count { font-size: .7rem; background: #eef2f7; border-radius: 8px; padding: 0 .4rem; margin-left: .2rem; }
.fb-tabs.small { margin: 0 0 .5rem; }
.fb-tabs.small button { padding: .3rem .55rem; font-size: .78rem; }
.fb-form-link { font-weight: 600; text-decoration: none; }
.fb-back { font-size: .82rem; text-decoration: none; margin-right: .6rem; }
.fb-small-list { margin: .2rem 0; padding-left: 1rem; font-size: .8rem; }
.fb-small-list li { margin-bottom: .15rem; }

.fb-top { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.fb-title { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; margin-right: auto; }
.fb-title h1 { font-size: 1.25rem; margin: 0; }
.fb-title code { color: #3730a3; font-size: .8rem; }
.fb-actions { display: flex; gap: .4rem; }
.fb-header-editor { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; background: #fff; border: 1px solid #e3e8ef; border-radius: 8px; padding: .6rem .8rem; margin-top: .6rem; font-size: .84rem; }
.fb-header-editor label { display: flex; flex-direction: column; gap: 2px; color: #475569; font-weight: 500; }
.fb-header-editor label.wide { flex: 1; min-width: 240px; }
.fb-header-editor label.check { flex-direction: row; align-items: center; gap: .3rem; font-weight: 400; }

.fb-designer { display: grid; grid-template-columns: 220px minmax(380px, 1fr) 360px; gap: .8rem; align-items: start; }
.fb-palette, .fb-properties { background: #fff; border: 1px solid #e3e8ef; border-radius: 8px; padding: .6rem; position: sticky; top: .6rem; max-height: calc(100vh - 140px); overflow: auto; }
.fb-palette-group { font-size: .66rem; font-weight: 700; text-transform: uppercase; color: #94a3b8; margin: .6rem 0 .25rem; }
.fb-palette-grid { display: grid; grid-template-columns: 1fr; gap: 3px; }
.fb-palette-item { display: flex; align-items: center; gap: .4rem; background: #f8fafc; border: 1px solid #e3e8ef; border-radius: 6px; padding: .3rem .45rem; font-size: .8rem; text-align: left; color: #1f2a37; cursor: grab; width: 100%; }
.fb-palette-item:hover:not(:disabled) { border-color: var(--brand-navy); background: var(--brand-navy-tint); }
.fb-palette-item:disabled { opacity: .5; cursor: default; }
.fb-palette-item.wide { margin-bottom: 4px; }
.fb-icon { display: inline-block; min-width: 1.3em; text-align: center; font-size: .78rem; color: var(--brand-navy); }
.fb-outline { list-style: none; padding: 0; margin: 0; font-size: .78rem; }
.fb-outline li { padding: .18rem .3rem; border-radius: 4px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fb-outline li:hover { background: #f1f5f9; }
.fb-outline li.on { background: var(--brand-navy-tint); font-weight: 600; }
.fb-outline code { font-size: .68rem; color: #94a3b8; }

.fb-canvas { background: #eef2f6; border: 1px solid #e3e8ef; border-radius: 8px; padding: .8rem; min-height: 60vh; }
.fb-form-title { font-size: 1.05rem; font-weight: 700; color: var(--brand-navy); margin-bottom: .4rem; }
.fb-issues-bar { background: #fffbeb; border: 1px solid #fde68a; border-radius: 6px; padding: .2rem .5rem; margin-bottom: .6rem; font-size: .8rem; }
.fb-issues-bar.bad { background: #fdecec; border-color: #fecaca; }
.fb-issues-bar .btn-link { font-size: .8rem; padding: .1rem 0; color: inherit; text-decoration: none; font-weight: 600; }
.fb-issue { font-size: .8rem; padding: .15rem .3rem; border-radius: 4px; cursor: pointer; }
.fb-issue:hover { background: rgba(0,0,0,.04); }
.fb-issue.error { color: #b42318; }
.fb-issue.warn { color: #92400e; }

.fb-el { background: #fff; border: 1px solid #dbe2ea; border-radius: 7px; padding: .35rem .5rem; cursor: pointer; transition: box-shadow .1s; }
.fb-el:hover { border-color: #b6c2d1; }
.fb-el.selected { border-color: var(--brand-navy); box-shadow: 0 0 0 2px rgba(31, 52, 73, .18); }
.fb-el.dep-source { border-color: #2563eb; background: #eff6ff; }
.fb-el.dep-target { border-color: #d97706; background: #fffbeb; }
.fb-el.container { background: #fbfcfe; }
.fb-el-page { border-top: 3px solid var(--brand-navy); }
.fb-el-repeat { border-left: 3px solid #16a34a; }
.fb-el-group { border-left: 3px solid #64748b; }
.fb-el-field_group_ref { border-left: 3px solid #7c3aed; }
.fb-el-unsupported { border-color: #fca5a5; background: #fef2f2; }
.fb-el-head { display: flex; align-items: center; gap: .35rem; min-height: 26px; }
.fb-grip { color: #94a3b8; cursor: grab; font-size: .9rem; }
.fb-collapse { background: none; border: none; padding: 0 .2rem; color: #64748b; font-size: .8rem; }
.fb-el-label { font-size: .86rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46%; }
.fb-el-page > .fb-el-head .fb-el-label { font-weight: 700; font-size: .92rem; }
.fb-el-name { font-size: .7rem; color: #94a3b8; }
.fb-badge { font-size: .66rem; background: #eef2ff; color: #3730a3; border-radius: 4px; padding: 0 .3rem; line-height: 1.6; cursor: help; }
.fb-el-type { margin-left: auto; font-size: .7rem; color: #94a3b8; white-space: nowrap; }
.fb-el-tools { display: flex; }
.fb-el-tools .btn-link { padding: 0 .25rem; font-size: .8rem; text-decoration: none; }
.fb-el-preview { font-size: .74rem; color: #6b7686; padding: .1rem 0 0 1.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fb-confirm { background: #fdecec; border-radius: 6px; padding: .3rem .5rem; margin: .3rem 0; font-size: .8rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.fb-children { padding: .2rem 0 .1rem 1rem; }
.fb-children.grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); column-gap: .5rem; }
.fb-children.grid > .fb-drop { grid-column: 1 / -1; }
.fb-cell { min-width: 0; }
.fb-collapsed-note { padding: .1rem 0 0 1.9rem; }
.fb-group-ref { padding: .2rem 0 0 1.9rem; font-size: .78rem; }
.fb-group-ref ul { margin: .2rem 0 0; padding-left: 1rem; }
.fb-drop { height: 6px; border-radius: 4px; margin: 1px 0; transition: height .1s, background .1s; }
.fb-drop.armed { height: 14px; background: rgba(31, 52, 73, .06); }
.fb-drop.over { height: 22px; background: rgba(239, 62, 46, .18); outline: 2px dashed var(--brand-red); }
.fb-drop.last.armed, .fb-drop.last:has(span) { min-height: 28px; }
.fb-drop span { display: block; text-align: center; font-size: .74rem; color: #94a3b8; padding: .35rem; border: 1px dashed #cbd5e1; border-radius: 6px; }

.fb-props { font-size: .82rem; display: flex; flex-direction: column; gap: .5rem; }
.fb-props h3 { font-size: .95rem; margin: 0; }
.fb-props-head { display: flex; align-items: center; gap: .4rem; }
.fb-props label { display: flex; flex-direction: column; gap: 2px; font-weight: 500; color: #475569; }
.fb-props label.check, .fb-logic label.check { flex-direction: row; align-items: center; gap: .35rem; font-weight: 400; color: #1f2a37; }
.fb-props label.inline { flex-direction: row; align-items: center; gap: .35rem; }
.fb-props .hint { font-size: .72rem; color: #6b7686; font-weight: 400; }
.fb-prop-block { border-top: 1px solid #eef2f7; padding-top: .45rem; display: flex; flex-direction: column; gap: .3rem; }
.fb-prop-title { font-weight: 600; color: #1f2a37; font-size: .82rem; }
.fb-expr textarea { resize: vertical; }
.fb-expr.bad textarea { border-color: #f87171; }
.fb-expr-tools { display: flex; align-items: center; gap: .4rem; margin-top: 2px; }
.fb-expr-tools select { width: auto; max-width: 160px; font-size: .74rem; padding-top: 0; padding-bottom: 0; }
.fb-expr-hint { font-size: .72rem; color: #6b7686; }
.fb-expr-error { font-size: .74rem; color: #b42318; }
.fb-logic-modes { display: flex; gap: .7rem; flex-wrap: wrap; }
.fb-rules { display: flex; flex-direction: column; gap: .3rem; margin-top: .3rem; }
.fb-join { display: flex; align-items: center; gap: .3rem; font-size: .78rem; }
.fb-join select { width: auto; }
.fb-rule { display: grid; grid-template-columns: 1.3fr .9fr 1fr auto; gap: 3px; align-items: center; }
.fb-rule .btn-link { padding: 0 .2rem; }
.fb-choices-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.fb-choice-table { width: 100%; font-size: .78rem; }
.fb-choice-table th { font-size: .66rem; text-transform: uppercase; color: #94a3b8; font-weight: 600; }
.fb-choice-table td { padding: 1px 2px; }
.fb-row-tools { white-space: nowrap; }
.fb-row-tools .btn-link { padding: 0 .15rem; font-size: .78rem; }
.fb-choices-actions { display: flex; align-items: center; gap: .6rem; }
.fb-summary-fields { max-height: 160px; overflow: auto; border: 1px solid #eef2f7; border-radius: 6px; padding: .3rem .4rem; }

.fb-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, .35); z-index: 5000; display: flex; justify-content: flex-end; }
.fb-dialog { width: min(640px, 100%); height: 100%; overflow: auto; background: #fff; box-shadow: -8px 0 30px rgba(15, 23, 42, .2); padding: 1rem 1.2rem; }
.fb-publish section { border-top: 1px solid #eef2f7; padding: .6rem 0; font-size: .85rem; }
.fb-publish h4 { font-size: .8rem; text-transform: uppercase; color: #6b7686; font-weight: 700; margin-bottom: .35rem; }
.fb-publish-head { display: flex; align-items: center; justify-content: space-between; }
.fb-publish-head h3 { font-size: 1.1rem; margin: 0; }
.fb-publish label.check { display: flex; gap: .4rem; align-items: center; }
.fb-diff { list-style: none; padding: 0; margin: 0; font-size: .82rem; }
.fb-diff li { padding: .2rem .4rem; border-radius: 4px; margin-bottom: 2px; }
.fb-diff li.added { background: #ecfdf3; }
.fb-diff li.removed { background: #fdecec; }
.fb-diff li.changed { background: #f8fafc; }
.fb-diff li.blocking { background: #fee2e2; border: 1px solid #f87171; }
.fb-diff-kind { font-size: .7rem; font-weight: 700; text-transform: uppercase; margin-right: .3rem; color: #475569; }
.fb-versions h4 { font-size: .9rem; margin: 1rem 0 .4rem; }
.fb-upload { background: #fff; border: 1px dashed #cbd5e1; border-radius: 8px; padding: 1rem; display: flex; flex-direction: column; gap: .6rem; max-width: 640px; }
.fb-import-summary { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; margin-bottom: .5rem; font-size: .86rem; }
.fb-notes { font-size: .8rem; color: #475569; background: #fff; border: 1px solid #e3e8ef; border-radius: 8px; padding: .5rem .5rem .5rem 1.6rem; }

/* Preview (renders like the mobile app) */
.pv-toolbar { display: flex; align-items: center; gap: .6rem; margin-bottom: .7rem; flex-wrap: wrap; }
.pv-body { display: flex; gap: 1rem; align-items: flex-start; }
.pv-device { background: #fff; border: 1px solid #cfd8e3; border-radius: 18px; padding: 1rem; box-shadow: 0 10px 30px rgba(31, 52, 73, .08); max-width: 100%; flex-shrink: 0; font-size: .92rem; }
.pv-title { font-weight: 700; color: var(--brand-navy); font-size: 1.05rem; margin-bottom: .5rem; }
.pv-progress { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: .5rem; }
.pv-dot { width: 26px; height: 26px; border-radius: 50%; border: 1px solid #cbd5e1; background: #fff; font-size: .74rem; }
.pv-dot.on { background: var(--brand-navy); color: #fff; border-color: var(--brand-navy); }
.pv-dot.bad { border-color: #ef4444; box-shadow: 0 0 0 2px #fecaca; }
.pv-page-title { font-size: 1rem; margin: .4rem 0 .6rem; }
.pv-nav { display: flex; justify-content: space-between; margin-top: 1rem; gap: .5rem; }
.pv-field { margin-bottom: .85rem; }
.pv-field.has-error .form-control, .pv-field.has-error .form-select { border-color: #ef4444; }
.pv-label { display: block; font-weight: 600; margin-bottom: .2rem; }
.pv-req { color: #ef4444; margin-left: 2px; }
.pv-hint { font-size: .8rem; color: #6b7686; margin-bottom: .25rem; }
.pv-guidance { font-size: .78rem; color: #475569; margin-bottom: .3rem; }
.pv-guidance summary { color: #24578a; cursor: pointer; }
.pv-inline { display: flex; align-items: center; gap: .4rem; }
.pv-unit { color: #6b7686; font-size: .85rem; white-space: nowrap; }
.pv-choices { display: flex; flex-direction: column; gap: 4px; }
.pv-choices.horizontal { flex-direction: row; flex-wrap: wrap; }
.pv-choice { display: flex; align-items: center; gap: .45rem; border: 1px solid #dbe2ea; border-radius: 8px; padding: .4rem .6rem; cursor: pointer; }
.pv-choice.on { border-color: var(--brand-navy); background: var(--brand-navy-tint); }
.pv-rating { display: flex; gap: 2px; }
.pv-star { background: none; border: none; font-size: 1.5rem; color: #cbd5e1; padding: 0 2px; }
.pv-star.on { color: #f59e0b; }
.pv-rank { padding-left: 1.2rem; margin: 0; }
.pv-attachment { font-size: .85rem; }
.pv-photos { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; }
.pv-photos .pv-attachment { background: var(--bs-tertiary-bg, #eef2f6); border-radius: 6px; padding: .1rem .2rem .1rem .5rem; }
.pv-photo-count { font-size: .8rem; color: #66727f; }
.pv-recalc { font-size: .78rem; padding: 0; }
.pv-error { color: #b42318; font-size: .8rem; margin-top: .15rem; }
.pv-warning { color: #92400e; background: #fffbeb; font-size: .8rem; margin-top: .2rem; padding: .2rem .4rem; border-radius: 4px; }
.pv-note { background: #f1f5f9; border-radius: 8px; padding: .5rem .7rem; margin-bottom: .8rem; font-size: .88rem; }
.pv-unsupported { background: #fef2f2; color: #b42318; border-radius: 8px; padding: .4rem .6rem; margin-bottom: .8rem; font-size: .8rem; }
.pv-group { border: 1px solid #e3e8ef; border-radius: 10px; padding: .3rem .7rem .2rem; margin-bottom: .9rem; }
.pv-group.page { border: none; padding: 0; }
.pv-group legend { float: none; width: auto; font-size: .92rem; font-weight: 700; padding: 0 .3rem; cursor: pointer; margin-bottom: .2rem; }
.pv-caret { color: #94a3b8; }
.pv-summary { font-weight: 400; color: #6b7686; font-size: .8rem; margin-left: .4rem; }
.pv-missing { font-weight: 600; color: #b42318; font-size: .72rem; margin-left: .4rem; }
.pv-children.grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); column-gap: .7rem; }
.pv-repeat { margin-bottom: .9rem; }
.pv-repeat-head { font-weight: 700; margin-bottom: .3rem; }
.pv-repeat-item { border: 1px solid #d1fae5; background: #f8fffb; border-radius: 10px; padding: .5rem .7rem; margin-bottom: .5rem; }
.pv-repeat-item-head { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: .85rem; color: #166534; margin-bottom: .3rem; }
.pv-result { border-radius: 8px; padding: .6rem .8rem; margin-top: .8rem; font-size: .85rem; }
.pv-result.bad { background: #fdecec; color: #7f1d1d; }
.pv-result.ok { background: #ecfdf3; color: #14532d; }
.pv-result ul { margin: .3rem 0 0; padding-left: 1.1rem; }
.pv-result li.warn { color: #92400e; }
.pv-side { flex: 1; min-width: 240px; max-width: 420px; background: #fff; border: 1px solid #e3e8ef; border-radius: 8px; padding: .6rem .8rem; font-size: .82rem; }
.pv-side summary { font-weight: 600; margin: .3rem 0; cursor: pointer; }
.pv-ctx { display: flex; flex-direction: column; gap: 2px; font-family: ui-monospace, Menlo, monospace; font-size: .74rem; margin-bottom: .3rem; }
.pv-calc { width: 100%; font-size: .78rem; }
.pv-calc td { padding: 1px 4px; border-bottom: 1px solid #f1f5f9; }
.pv-json { font-size: .72rem; background: #0f172a; color: #e2e8f0; border-radius: 6px; padding: .5rem; max-height: 420px; overflow: auto; }
@media (max-width: 1300px) {
    .fb-designer { grid-template-columns: 200px minmax(320px, 1fr); }
    .fb-properties { grid-column: 1 / -1; position: static; max-height: none; }
    .pv-body { flex-direction: column; }
}
.admin-editor .narrow { max-width: 7rem; }

/* Offline maps admin */
.om-storage { font-size: .78rem; color: #6b7686; margin: -.2rem 0 .6rem; }
.admin .om-sub { font-size: .75rem; color: #6b7686; }
.admin .om-empty { color: #6b7686; text-align: center; padding: 1.2rem; }
.om-progress { height: 8px; background: #e3e8ef; border-radius: 4px; overflow: hidden; }
.om-progress .om-bar { height: 100%; background: #2563eb; transition: width .25s; }
.om-check { display: flex; flex-direction: column; gap: 2px; font-size: .82rem; }
.om-check .om-warn { color: #92400e; }
.admin-editor .om-versions { font-size: .8rem; }
.task-photos { display: flex; flex-wrap: wrap; gap: .3rem; margin: .3rem 0; }
.task-photos img, .task-photo-pending { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; border: 1px solid #d5dce4; }
.task-photo-pending { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; font-size: .65rem; color: #66727f; background: #eef2f6; text-align: center; }

/* ---------------------------------------------------------------- Licences (Administration → Licences) */
.lic-table td.num { font-variant-numeric: tabular-nums; }
.lic-table td.muted { color: #94a3b8; }
.lic-desc { font-size: .76rem; color: #6b7686; }
.admin .chip.lic-platform { font-size: .68rem; padding: 0 .4rem; border-radius: 999px; background: #eef2f7; color: #475569; }
.admin .chip.lic-platform.mobile { background: #e8edf3; color: var(--brand-navy); }
.lic-meter { width: 64px; height: 4px; background: #eef2f7; border-radius: 2px; margin-top: 4px; overflow: hidden; }
.lic-meter span { display: block; height: 100%; background: var(--brand-navy); border-radius: 2px; }
.lic-meter span.full { background: #b45309; }
.lic-meter span.over { background: #b42318; }
.lic-holders { list-style: none; padding: 0; margin: 0 0 .4rem; max-height: 320px; overflow-y: auto; }
.lic-holders li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .4rem; padding: .2rem 0; border-bottom: 1px solid #f1f5f9; }
.lic-holders li.off { color: #94a3b8; }
.admin-editor .seat-left { font-size: .72rem; color: #6b7686; margin-left: auto; white-space: nowrap; }
.admin-editor .seat-left.none { color: #b42318; font-weight: 600; }

/* Vegetation Management (/vm) — reuses the admin layout and tables */
.vm .muted { color: #6b7686; }
.vm .small { font-size: .78rem; }
.vm .ok { color: #15803d; }
.vm .bad { color: #b42318; }
.vm .admin-table .num, .vm .admin-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.vm .admin-table.compact td { padding: .3rem .6rem; }
.vm .admin-head h1 .small { font-weight: 400; margin-left: .4rem; }
.vm .stack { display: flex; flex-direction: column; gap: .8rem; }
.vm .admin-sub { margin-top: .9rem; }
.vm .row-inline { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.vm .row-inline .form-control, .vm .row-inline .form-select { width: auto; min-width: 140px; }
.vm-tiles { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: .9rem; }
.vm-tile { background: #fff; border: 1px solid #e3e8ef; border-radius: 8px; padding: .55rem .8rem; min-width: 140px; display: flex; flex-direction: column; text-decoration: none; color: #475569; font-size: .78rem; }
a.vm-tile:hover { border-color: #93c5fd; }
.vm-tile .n { font-size: 1.35rem; font-weight: 700; color: #1f2a37; font-variant-numeric: tabular-nums; }
.vm-tile .n.ok { color: #15803d; } .vm-tile .n.warn { color: #b45309; } .vm-tile .n.bad { color: #b42318; }
.vm-two { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: .8rem; margin-bottom: .8rem; }
@media (max-width: 1100px) { .vm-two { grid-template-columns: 1fr; } .admin-split { flex-direction: column; } .admin-editor, .admin-editor.wide { width: 100%; position: static; } }
.vm-card { background: #fff; border: 1px solid #e3e8ef; border-radius: 8px; padding: .6rem .75rem; margin-bottom: .8rem; }
.vm-card.inspection { border-color: #f59e0b; background: #fffbeb; }
.vm-card-head { font-weight: 600; font-size: .85rem; margin-bottom: .45rem; display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.vm-card-head .muted { font-weight: 400; }
.vm-map { height: 420px; border-radius: 6px; }
.vm-map.short { height: 300px; }
.vm-legend { font-weight: 400; font-size: .75rem; color: #6b7686; margin-left: auto; }
.vm-legend i { display: inline-block; width: 18px; height: 4px; border-radius: 2px; margin: 0 .2rem 0 .5rem; vertical-align: middle; }
.vm-legend i.current, .vm-bucket.current { background: #16a34a; }
.vm-legend i.due, .vm-bucket.due { background: #d97706; }
.vm-legend i.overdue, .vm-bucket.overdue { background: #dc2626; }
.vm-bucket { color: #fff; font-size: .7rem; font-weight: 600; border-radius: 10px; padding: .05rem .5rem; white-space: nowrap; }
.vm-status { display: inline-block; font-size: .72rem; font-weight: 600; border-radius: 10px; padding: .05rem .5rem; color: var(--c); background: color-mix(in srgb, var(--c) 14%, white); border: 1px solid color-mix(in srgb, var(--c) 35%, white); white-space: nowrap; }
.vm-pkg, .vm-inv, .vm-line { font-size: .72rem; font-weight: 600; border-radius: 4px; padding: .05rem .4rem; background: #f1f5f9; color: #334155; text-transform: capitalize; white-space: nowrap; }
.vm-pkg.released, .vm-inv.submitted, .vm-inv.in_reconciliation { background: #e0ecff; color: #1d4ed8; }
.vm-pkg.accepted, .vm-inv.partially_approved, .vm-line.held { background: #fef3c7; color: #92400e; }
.vm-pkg.closed, .vm-inv.approved, .vm-inv.paid, .vm-line.approved { background: #dcfce7; color: #166534; }
.vm-inv.exported { background: #cffafe; color: #155e75; }
.vm-pkg.cancelled, .vm-line.rejected { background: #fee2e2; color: #991b1b; }
.vm-progress { display: inline-block; width: 80px; height: 6px; background: #e2e8f0; border-radius: 3px; vertical-align: middle; overflow: hidden; }
.vm-progress div { height: 100%; background: #16a34a; }
.vm-cycles { display: flex; flex-direction: column; }
.vm-cycle-line { font-size: .84rem; margin-bottom: .3rem; }
.vm-priority { font-size: .8rem; color: #475569; }
.vm-priority .score { font-size: 1.4rem; font-weight: 700; color: #1f2a37; margin-right: .2rem; }
.vm-factors { width: 100%; font-size: .76rem; margin-top: .3rem; }
.vm-factors td { padding: .1rem .3rem .1rem 0; }
.vm-factors .num { text-align: right; white-space: nowrap; }
.vm-criteria { width: 100%; font-size: .84rem; }
.vm-criteria td { padding: .2rem .2rem; }
.vm-var { font-size: .76rem; color: #92400e; }
.vm-hold { font-size: .76rem; }
.vm-hold.open { color: #b42318; font-weight: 600; }
.vm-hold.released { color: #6b7686; }
.vm-json { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .7rem; color: #475569; max-width: 280px; word-break: break-all; }
.vm .num-in { width: 90px; text-align: right; }
.vm .chip-link { display: inline-block; font-size: .78rem; margin: 0 .4rem .3rem 0; }
.vm .chip { display: inline-block; font-size: .7rem; border-radius: 4px; padding: 0 .35rem; background: #eef2ff; color: #3730a3; }
