:root {
    color-scheme: dark;
    --bg: #0d1117;
    --panel: #151b23;
    --panel-2: #1c2430;
    --text: #e7edf5;
    --muted: #93a1b3;
    --line: #2c3645;
    --line-soft: #222b38;
    --accent: #8fc7ff;
    --danger: #ff8a8a;
    --shadow: rgba(0, 0, 0, 0.45);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
    background: radial-gradient(circle at top, #192231 0, var(--bg) 42rem);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    cursor: default;
}

a, button, label, .drag-handle {
    cursor: pointer;
}

input, select {
    cursor: text;
}

select {
    cursor: pointer;
}

.front-shell {
    width: min(1380px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0 64px;
}

.admin-shell {
    width: min(1540px, calc(100% - 32px));
}

.front-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 24px;
}

h1, h2, h3, p {
    margin: 0;
}

h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1;
    letter-spacing: -0.05em;
}

h2 {
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

h3 {
    font-size: 0.95rem;
    color: var(--muted);
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.muted {
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.95rem;
}

.front-userbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 4px;
}

.front-auth-status {
    color: var(--muted);
    font-size: 0.9rem;
}

.front-small-link, .primary-button, .secondary-button, .danger-button {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    text-decoration: none;
    padding: 8px 12px;
    font-size: 0.9rem;
    line-height: 1;
}

.front-small-link:hover, .primary-button:hover, .secondary-button:hover {
    border-color: var(--accent);
    background: rgba(143, 199, 255, 0.08);
}

.primary-button, .secondary-button {
    font: inherit;
}

.secondary-button {
    color: var(--text);
}

.admin-button-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.danger-button {
    font: inherit;
    color: var(--danger);
}

.danger-button:hover {
    border-color: var(--danger);
    background: rgba(255, 138, 138, 0.08);
}

.hidden {
    display: none !important;
}

.link-panel, .admin-card {
    border: 1px solid var(--line-soft);
    background: rgba(21, 27, 35, 0.82);
    border-radius: 28px;
    box-shadow: 0 24px 70px var(--shadow);
    overflow: hidden;
}

.link-panel {
    padding: 14px;
}

.link-columns {
    display: grid;
    grid-template-columns: repeat(var(--front-columns, 3), minmax(0, 1fr));
    gap: 14px;
}

.link-column {
    display: grid;
    align-content: start;
    gap: 10px;
    min-height: 64px;
}

.front-link-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    min-height: 64px;
    padding: 17px 18px;
    border: 1px solid var(--line-soft);
    border-radius: 18px;
    background: rgba(21, 27, 35, 0.96);
    color: var(--text);
    text-decoration: none;
}

.front-link-card:hover {
    border-color: var(--line);
    background: var(--panel-2);
}

.front-link-title {
    min-width: 0;
    font-size: 1.05rem;
    font-weight: 650;
    letter-spacing: -0.01em;
    overflow-wrap: anywhere;
}

.front-link-access {
    flex: 0 0 auto;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.empty-state {
    padding: 24px;
    background: rgba(21, 27, 35, 0.96);
    color: var(--muted);
    text-align: center;
    border-radius: 18px;
}

.admin-card {
    padding: 20px;
    margin-bottom: 18px;
}

.admin-setting-row {
    display: grid;
    grid-template-columns: minmax(260px, 520px) 140px;
    gap: 18px;
    align-items: end;
}

.columns-input {
    max-width: 140px;
}


.admin-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.admin-label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 0.9rem;
}

.admin-input, .admin-select {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #0f141c;
    color: var(--text);
    padding: 11px 12px;
    font: inherit;
    outline: none;
}

.admin-input:focus, .admin-select:focus {
    border-color: var(--accent);
}

.admin-input.wide {
    max-width: 520px;
}

.admin-columns {
    display: grid;
    grid-template-columns: repeat(var(--front-columns, 3), minmax(0, 1fr));
    gap: 14px;
}

.admin-column {
    min-width: 0;
    border: 1px solid var(--line-soft);
    border-radius: 22px;
    background: rgba(12, 17, 24, 0.42);
    padding: 12px;
}

.admin-column-header {
    padding: 2px 4px 12px;
}

.admin-links {
    display: grid;
    align-content: start;
    gap: 10px;
    min-height: 110px;
}

.admin-column-empty {
    border: 1px dashed var(--line);
    border-radius: 18px;
    color: var(--muted);
    padding: 24px 12px;
    text-align: center;
}

.admin-row {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 108px;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--line-soft);
    border-radius: 18px;
    background: rgba(12, 17, 24, 0.74);
    padding: 10px;
}

.admin-row.dragging {
    opacity: 0.45;
}

.drag-handle {
    grid-row: 1 / 5;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    text-align: center;
    font-size: 1.2rem;
    user-select: none;
    cursor: grab;
}

.drag-handle:active {
    cursor: grabbing;
}

.admin-field-description {
    grid-column: 2;
}

.admin-field-url {
    grid-column: 2 / 4;
}

.admin-select {
    grid-column: 3;
}


.admin-user-picker {
    grid-column: 2 / 4;
    min-width: 0;
    position: relative;
}

.admin-user-label {
    color: var(--muted);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin: 0 0 5px 2px;
}

.admin-user-field {
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #0f141c;
    padding: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.admin-user-field:focus-within {
    border-color: var(--accent);
}

.admin-user-input {
    flex: 1 1 120px;
    min-width: 90px;
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    outline: none;
    padding: 5px 4px;
}

.admin-user-chip {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(143, 199, 255, 0.08);
    color: var(--text);
    font: inherit;
    font-size: 0.82rem;
    padding: 5px 8px;
}

.admin-user-chip:hover {
    border-color: var(--accent);
}

.admin-user-suggestions {
    position: absolute;
    z-index: 30;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    display: grid;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #0f141c;
    box-shadow: 0 16px 40px var(--shadow);
    padding: 6px;
}

.admin-user-suggestion {
    width: 100%;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 0.9rem;
    text-align: left;
    padding: 8px 10px;
}

.admin-user-suggestion:hover,
.admin-user-suggestion:focus {
    background: rgba(143, 199, 255, 0.12);
    outline: none;
}

.admin-user-suggestion.manual {
    color: var(--accent);
}

.admin-toggle {
    grid-column: 2;
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
    color: var(--muted);
    font-size: 0.9rem;
    min-width: 0;
}

.admin-toggle input {
    width: 18px;
    height: 18px;
}

.admin-row .danger-button {
    grid-column: 3;
}

@media (max-width: 720px) {
    .link-columns, .admin-columns {
        grid-template-columns: 1fr;
    }

    .admin-shell, .front-shell {
        width: min(760px, calc(100% - 32px));
    }
}

@media (max-width: 720px) {
    .front-header, .admin-card-header, .admin-setting-row {
        flex-direction: column;
        align-items: stretch;
    }

    .front-userbar {
        justify-content: flex-start;
    }

    .admin-row {
        grid-template-columns: 28px 1fr;
    }

    .drag-handle {
        grid-row: 1 / 6;
    }

    .admin-field-description,
    .admin-field-url,
    .admin-user-picker,
    .admin-select,
    .admin-toggle,
    .admin-row .danger-button {
        grid-column: 2;
    }
}

@media (max-width: 720px) {
    .admin-setting-row {
        grid-template-columns: 1fr;
    }

    .columns-input {
        max-width: none;
    }
}

/* Front v5 Dash pane shell */
.front-version {
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.65;
}

.front-dash-root {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
}

.front-dash-root.no-visible-panes {
    display: block;
    min-height: auto;
    padding: 0;
}

.front-dash-root.no-visible-panes .dash-zone,
.front-dash-root.no-visible-panes .dash-splitter {
    display: none !important;
}

.front-dash-root.has-visible-panes .front-shell {
    width: auto;
    max-width: none;
    margin: 0;
    padding: 20px;
    min-width: 0;
}

.dash-inner {
    display: flex;
    gap: 0;
    min-height: 0;
    flex: 1 1 auto;
}

.front-dash-root.no-visible-panes .dash-inner {
    display: block;
}

.dash-main-column {
    min-width: 0;
    min-height: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.front-dash-root.no-visible-panes .dash-main-column {
    display: block;
}

.dash-zone.hidden {
    display: none !important;
}

.dash-horizontal-zone {
    min-height: 80px;
    min-width: 0;
    display: flex;
    gap: 0;
}

.dash-stack-zone {
    min-height: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.dash-side-stack {
    min-height: 0;
    overflow: hidden;
}

.dash-inner-row,
.dash-outer-row {
    overflow: hidden;
}

.dash-pane {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line-soft);
    border-radius: 16px;
    background: rgba(21, 27, 35, 0.92);
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.dash-pane-header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--line-soft);
    background: rgba(255, 255, 255, 0.025);
}

.dash-pane-title {
    min-width: 0;
    color: var(--text);
    font-weight: 650;
    font-size: 0.86rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-pane-status {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 0.72rem;
}

.dash-pane-status.error {
    color: var(--danger);
}

.dash-pane-body {
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    overflow: auto;
    padding: 10px;
}

.dash-pane-body img,
.dash-pane-body table,
.dash-pane-body pre,
.dash-pane-body iframe {
    max-width: 100%;
}

.dash-splitter {
    flex: 0 0 auto;
    opacity: 0.55;
    background: transparent;
    position: relative;
}

.dash-splitter::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    background: var(--line);
}

.dash-splitter-x {
    width: 10px;
    cursor: col-resize;
}

.dash-splitter-x::after {
    top: 16px;
    bottom: 16px;
    left: 4px;
    width: 2px;
}

.dash-splitter-y {
    height: 10px;
    cursor: row-resize;
}

.dash-splitter-y::after {
    left: 16px;
    right: 16px;
    top: 4px;
    height: 2px;
}

.dash-splitter:hover::after {
    background: var(--accent);
}

.pane-layout-button {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.dash-pane-popup {
    position: fixed;
    top: 70px;
    right: 18px;
    z-index: 200;
    width: 360px;
    max-width: calc(100vw - 36px);
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #0f141c;
    box-shadow: 0 24px 80px var(--shadow);
    padding: 10px;
}

.dash-mini {
    display: grid;
    gap: 5px;
}

.dash-mini-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
}

.dash-mini-row:first-child,
.dash-mini-row:last-child {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dash-mini-pane,
.dash-mini-main,
.dash-mini-empty {
    min-height: 34px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    font: inherit;
    font-size: 0.72rem;
    padding: 4px 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-mini-pane {
    color: var(--text);
    background: rgba(143, 199, 255, 0.10);
}

.dash-mini-pane.visible {
    border-color: var(--accent);
}

.dash-mini-pane.hidden-pane {
    opacity: 0.45;
    background: transparent;
    border-style: dashed;
}

.dash-mini-main {
    color: var(--muted);
    text-align: center;
    background: rgba(255, 255, 255, 0.025);
}

.dash-mini-empty {
    visibility: hidden;
}

/* Admin tabs and Dash pane editor */
.admin-tabs {
    display: flex;
    gap: 8px;
    margin: 0 0 16px;
}

.admin-tab {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    padding: 9px 14px;
    font: inherit;
}

.admin-tab.active,
.admin-tab:hover {
    border-color: var(--accent);
    background: rgba(143, 199, 255, 0.10);
}

.admin-tab-panel {
    display: none;
}

.admin-tab-panel.active {
    display: block;
}

.provider-diagnostics {
    display: grid;
    gap: 6px;
    margin-bottom: 14px;
}

.provider-diagnostic {
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    padding: 8px 10px;
    color: var(--muted);
    font-size: 0.84rem;
    overflow-wrap: anywhere;
}

.provider-diagnostic.ok {
    color: #a8e0b1;
}

.provider-diagnostic.bad {
    color: #ffbd9a;
}

.dash-admin-layout {
    display: grid;
    gap: 8px;
}

.dash-admin-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.dash-admin-row:first-child,
.dash-admin-row:last-child {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dash-admin-slot,
.dash-admin-main {
    min-height: 78px;
    border: 1px solid var(--line-soft);
    border-radius: 16px;
    background: rgba(12, 17, 24, 0.52);
    padding: 10px;
    position: relative;
    overflow: hidden;
}

.dash-admin-main {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.025);
}

.dash-admin-slot.selected {
    border-color: var(--accent);
}

.dash-admin-slot.drop-target {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.dash-admin-slot.empty {
    border-style: dashed;
    color: var(--muted);
}

.dash-admin-slot.configured {
    background: rgba(143, 199, 255, 0.065);
}

.dash-tile-handle {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: grab;
    user-select: none;
}

.dash-tile-handle:active {
    cursor: grabbing;
}

.dash-slot-name {
    color: var(--text);
    font-weight: 650;
    font-size: 0.9rem;
    padding-right: 32px;
}

.dash-slot-detail,
.dash-slot-off {
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.78rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-slot-off {
    color: var(--danger);
}

.dash-pane-form {
    display: grid;
    gap: 14px;
}

.dash-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
}

.dash-form-grid .wide,
.dash-params-editor .wide {
    grid-column: 1 / -1;
}

.dash-enabled-label input {
    width: 24px;
    height: 24px;
}

.dash-view-description {
    margin-top: 0;
}

.dash-params-editor {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.dash-param-free {
    resize: vertical;
    min-height: 90px;
}

@media (max-width: 720px) {
    .front-dash-root.has-visible-panes {
        display: block;
    }
    .front-dash-root.has-visible-panes .dash-inner,
    .front-dash-root.has-visible-panes .dash-main-column,
    .front-dash-root.has-visible-panes .dash-horizontal-zone,
    .front-dash-root.has-visible-panes .dash-stack-zone {
        display: block;
    }
    .front-dash-root.has-visible-panes .dash-zone {
        margin: 10px 0;
    }
    .front-dash-root.has-visible-panes .dash-pane {
        min-height: 160px;
        margin-bottom: 10px;
    }
    .front-dash-root.has-visible-panes .dash-splitter {
        display: none !important;
    }
    .dash-form-grid,
    .dash-params-editor,
    .dash-admin-row,
    .dash-admin-row:first-child,
    .dash-admin-row:last-child {
        grid-template-columns: 1fr;
    }
}

/* Front v10: make server-rendered pane placeholders visible before JS hydrates. */
.dash-horizontal-zone > .dash-pane {
    flex: 1 1 0;
}

.dash-stack-zone > .dash-pane {
    flex: 1 1 0;
}

.dash-pane-placeholder {
    color: var(--muted);
    font-size: 0.85rem;
}

/* Front v13: explicit, visible user resize handles between Dash side panes and the center area. */
body.dash-resizing {
    user-select: none;
}

.dash-side-sizer {
    width: 18px;
    min-width: 18px;
    align-self: stretch;
    opacity: 1;
    position: relative;
    z-index: 40;
    border-left: 1px solid rgba(255, 255, 255, 0.035);
    border-right: 1px solid rgba(0, 0, 0, 0.22);
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.025), rgba(143, 199, 255, 0.07), rgba(255, 255, 255, 0.025));
}

.dash-side-sizer::after {
    top: 8px;
    bottom: 8px;
    left: 8px;
    width: 2px;
    background: rgba(143, 199, 255, 0.48);
}

.dash-side-sizer-grip {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 44px;
    line-height: 44px;
    border: 1px solid rgba(143, 199, 255, 0.55);
    border-radius: 999px;
    background: rgba(13, 17, 23, 0.92);
    color: var(--accent);
    font-size: 22px;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    text-align: center;
    pointer-events: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.dash-left-center-sizer:hover,
.dash-right-center-sizer:hover,
.dash-left-center-sizer:focus,
.dash-right-center-sizer:focus,
.dash-center-sizer:hover,
.dash-stack-splitter:hover {
    opacity: 1;
}

.dash-left-center-sizer:hover,
.dash-right-center-sizer:hover,
.dash-left-center-sizer:focus,
.dash-right-center-sizer:focus {
    background: linear-gradient(90deg, rgba(143, 199, 255, 0.08), rgba(143, 199, 255, 0.18), rgba(143, 199, 255, 0.08));
    outline: none;
}

.dash-left-center-sizer:hover .dash-side-sizer-grip,
.dash-right-center-sizer:hover .dash-side-sizer-grip,
.dash-left-center-sizer:focus .dash-side-sizer-grip,
.dash-right-center-sizer:focus .dash-side-sizer-grip {
    border-color: var(--accent);
    background: rgba(21, 27, 35, 0.98);
}

.dash-center-sizer::after,
.dash-stack-splitter::after {
    background: var(--line);
}


/* Front v14: keep user resize handles available on normal desktop widths.
   v13 inherited the generic .dash-splitter mobile hiding rule at <=1040px,
   which could make the side/center handles disappear completely. */
.front-dash-root.has-visible-panes .dash-side-sizer {
    display: flex !important;
    flex: 0 0 22px !important;
    width: 22px !important;
    min-width: 22px !important;
    max-width: 22px !important;
    align-self: stretch !important;
    align-items: center;
    justify-content: center;
    cursor: ew-resize !important;
    opacity: 1 !important;
    z-index: 80;
    background: linear-gradient(90deg, rgba(48, 58, 74, 0.72), rgba(143, 199, 255, 0.22), rgba(48, 58, 74, 0.72));
    border-left: 1px solid rgba(143, 199, 255, 0.30);
    border-right: 1px solid rgba(143, 199, 255, 0.30);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.24);
}

.front-dash-root.has-visible-panes .dash-side-sizer::before {
    content: "";
    width: 6px;
    height: 54px;
    border-left: 2px dotted rgba(220, 238, 255, 0.92);
    border-right: 2px dotted rgba(220, 238, 255, 0.92);
    border-radius: 999px;
    pointer-events: none;
}

.front-dash-root.has-visible-panes .dash-side-sizer::after {
    display: none;
}

.front-dash-root.has-visible-panes .dash-side-sizer-grip {
    display: none;
}

.front-dash-root.has-visible-panes .dash-side-sizer:hover,
.front-dash-root.has-visible-panes .dash-side-sizer:focus {
    background: linear-gradient(90deg, rgba(78, 105, 135, 0.86), rgba(143, 199, 255, 0.42), rgba(78, 105, 135, 0.86));
    outline: 1px solid rgba(143, 199, 255, 0.72);
}

@media (max-width: 720px) {
    .front-dash-root.has-visible-panes .dash-side-sizer {
        display: none !important;
    }
}

/* Front v15: viewport-fitted pane frame with explicit region-boundary resize handles. */
body.front-body.dash-fixed-active {
    height: 100vh;
    overflow: hidden;
}

body.front-body.dash-fixed-active .front-dash-root.has-visible-panes {
    height: 100vh;
    max-height: 100vh;
    min-height: 0;
    overflow: hidden;
    padding: 10px;
    gap: 0;
}

.front-dash-root.has-visible-panes .dash-inner {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.front-dash-root.has-visible-panes .dash-main-column {
    flex: 1 1 auto;
    min-width: 240px;
    min-height: 0;
    overflow: hidden;
}

.front-dash-root.has-visible-panes #frontMainArea {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
}

.front-dash-root.has-visible-panes .dash-zone,
.front-dash-root.has-visible-panes .dash-horizontal-zone,
.front-dash-root.has-visible-panes .dash-stack-zone,
.front-dash-root.has-visible-panes .dash-side-stack,
.front-dash-root.has-visible-panes .dash-inner-row,
.front-dash-root.has-visible-panes .dash-outer-row {
    min-height: 0;
    min-width: 0;
    overflow: hidden;
}

.front-dash-root.has-visible-panes .dash-pane {
    min-height: 0;
    min-width: 0;
    max-height: 100%;
}

.front-dash-root.has-visible-panes .dash-pane-body {
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
}

.dash-boundary-sizer {
    flex: 0 0 18px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 120;
    opacity: 1;
    background: rgba(50, 64, 82, 0.72);
    box-shadow: inset 0 0 0 1px rgba(143, 199, 255, 0.22);
    touch-action: none;
    user-select: none;
}

.dash-boundary-x {
    width: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    align-self: stretch;
    cursor: ew-resize !important;
    border-left: 1px solid rgba(143, 199, 255, 0.36);
    border-right: 1px solid rgba(143, 199, 255, 0.36);
}

.dash-boundary-y {
    height: 18px !important;
    min-height: 18px !important;
    max-height: 18px !important;
    width: 100%;
    cursor: ns-resize !important;
    border-top: 1px solid rgba(143, 199, 255, 0.36);
    border-bottom: 1px solid rgba(143, 199, 255, 0.36);
}

.dash-boundary-grip {
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    color: #dceeff;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 20px;
    line-height: 1;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

.dash-boundary-x .dash-boundary-grip {
    width: 12px;
    height: 52px;
    border-left: 2px dotted rgba(220, 238, 255, 0.95);
    border-right: 2px dotted rgba(220, 238, 255, 0.95);
    border-radius: 999px;
    color: transparent;
}

.dash-boundary-y .dash-boundary-grip {
    width: 72px;
    height: 10px;
    border-top: 2px dotted rgba(220, 238, 255, 0.95);
    border-bottom: 2px dotted rgba(220, 238, 255, 0.95);
    border-radius: 999px;
    color: transparent;
}

.dash-boundary-sizer:hover,
.dash-boundary-sizer:focus {
    background: rgba(80, 112, 146, 0.92);
    box-shadow: inset 0 0 0 1px rgba(143, 199, 255, 0.8), 0 0 0 1px rgba(143, 199, 255, 0.22);
    outline: none;
}

.dash-boundary-sizer:hover .dash-boundary-grip,
.dash-boundary-sizer:focus .dash-boundary-grip {
    border-color: #ffffff;
}

.dash-splitter {
    opacity: 0.9;
}

.dash-splitter-x,
.dash-splitter-y {
    background: rgba(40, 50, 64, 0.42);
}

@media (max-width: 720px) {
    body.front-body.dash-fixed-active {
        height: auto;
        overflow: auto;
    }
    body.front-body.dash-fixed-active .front-dash-root.has-visible-panes {
        height: auto;
        max-height: none;
        overflow: visible;
    }
    .front-dash-root.has-visible-panes .dash-boundary-sizer {
        display: none !important;
    }
}

/* Front v16: boundary resize handles are a fixed overlay positioned from real rectangles.
   This avoids flex-child coordinates, z-order and overflow issues. */
html.dash-fixed-active,
html.dash-fixed-active body.front-body {
    width: 100%;
    height: 100%;
    min-height: 100%;
    overflow: hidden !important;
}

html.dash-fixed-active body.front-body .front-dash-root.has-visible-panes {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    min-height: 0;
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
    padding: 10px;
}

html.dash-fixed-active body.front-body .front-dash-root.has-visible-panes .dash-inner,
html.dash-fixed-active body.front-body .front-dash-root.has-visible-panes .dash-main-column {
    min-height: 0;
    overflow: hidden !important;
}

html.dash-fixed-active body.front-body .front-dash-root.has-visible-panes #frontMainArea {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto !important;
    overscroll-behavior: contain;
}

html.dash-fixed-active body.front-body .front-dash-root.has-visible-panes .dash-pane,
html.dash-fixed-active body.front-body .front-dash-root.has-visible-panes .dash-pane-body {
    min-height: 0;
    overflow: hidden;
}

html.dash-fixed-active body.front-body .front-dash-root.has-visible-panes .dash-pane-body {
    overflow: auto;
    overscroll-behavior: contain;
}

.dash-resize-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2147483000;
}

.dash-region-handle {
    position: fixed;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    opacity: 0.65;
    touch-action: none;
    user-select: none;
}

.dash-region-handle-x {
    cursor: ew-resize !important;
}

.dash-region-handle-y {
    cursor: ns-resize !important;
}

.dash-region-handle::before {
    content: "";
    display: block;
    background: rgba(143, 199, 255, 0.18);
    box-shadow: 0 0 0 1px rgba(143, 199, 255, 0.18), 0 0 12px rgba(0, 0, 0, 0.35);
    border-radius: 999px;
}

.dash-region-handle-x::before {
    width: 4px;
    height: min(72px, 70%);
}

.dash-region-handle-y::before {
    width: min(96px, 70%);
    height: 4px;
}

.dash-region-handle-grip {
    position: absolute;
    pointer-events: none;
    opacity: 0.92;
    border-radius: 999px;
}

.dash-region-handle-x .dash-region-handle-grip {
    width: 8px;
    height: 48px;
    border-left: 2px dotted rgba(220, 238, 255, 0.85);
    border-right: 2px dotted rgba(220, 238, 255, 0.85);
}

.dash-region-handle-y .dash-region-handle-grip {
    width: 72px;
    height: 8px;
    border-top: 2px dotted rgba(220, 238, 255, 0.85);
    border-bottom: 2px dotted rgba(220, 238, 255, 0.85);
}

.dash-region-handle:hover,
.dash-region-handle:focus {
    opacity: 1;
    outline: none;
}

.dash-region-handle:hover::before,
.dash-region-handle:focus::before {
    background: rgba(143, 199, 255, 0.34);
    box-shadow: 0 0 0 1px rgba(220, 238, 255, 0.6), 0 0 18px rgba(143, 199, 255, 0.25);
}

.dash-region-handle:hover .dash-region-handle-grip,
.dash-region-handle:focus .dash-region-handle-grip {
    border-color: #ffffff;
}

@media (max-width: 720px) {
    .dash-resize-overlay {
        display: none !important;
    }
}

/* Front v17: make the older pane-to-pane splitters match the newer overlay handles. */
.front-dash-root.has-visible-panes .dash-splitter {
    flex: 0 0 auto;
    position: relative;
    z-index: 80;
    display: flex !important;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent !important;
    opacity: 0.65;
    touch-action: none;
    user-select: none;
}

.front-dash-root.has-visible-panes .dash-splitter-x {
    width: 14px;
    min-width: 14px;
    max-width: 14px;
    align-self: stretch;
    cursor: ew-resize !important;
}

.front-dash-root.has-visible-panes .dash-splitter-y {
    height: 14px;
    min-height: 14px;
    max-height: 14px;
    width: 100%;
    cursor: ns-resize !important;
}

.front-dash-root.has-visible-panes .dash-splitter::before {
    content: "";
    position: absolute;
    display: block;
    border-radius: 999px;
    background: rgba(143, 199, 255, 0.18);
    box-shadow: 0 0 0 1px rgba(143, 199, 255, 0.18), 0 0 12px rgba(0, 0, 0, 0.35);
}

.front-dash-root.has-visible-panes .dash-splitter-x::before {
    width: 4px;
    height: min(72px, 70%);
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.front-dash-root.has-visible-panes .dash-splitter-y::before {
    width: min(96px, 70%);
    height: 4px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.front-dash-root.has-visible-panes .dash-splitter::after {
    content: "";
    position: absolute;
    display: block;
    border-radius: 999px;
    background: transparent !important;
}

.front-dash-root.has-visible-panes .dash-splitter-x::after {
    width: 8px;
    height: 48px;
    left: 50%;
    top: 50%;
    right: auto;
    bottom: auto;
    transform: translate(-50%, -50%);
    border-left: 2px dotted rgba(220, 238, 255, 0.85);
    border-right: 2px dotted rgba(220, 238, 255, 0.85);
}

.front-dash-root.has-visible-panes .dash-splitter-y::after {
    width: 72px;
    height: 8px;
    left: 50%;
    top: 50%;
    right: auto;
    bottom: auto;
    transform: translate(-50%, -50%);
    border-top: 2px dotted rgba(220, 238, 255, 0.85);
    border-bottom: 2px dotted rgba(220, 238, 255, 0.85);
}

.front-dash-root.has-visible-panes .dash-splitter:hover,
.front-dash-root.has-visible-panes .dash-splitter:focus {
    opacity: 1;
    outline: none;
}

.front-dash-root.has-visible-panes .dash-splitter:hover::before,
.front-dash-root.has-visible-panes .dash-splitter:focus::before {
    background: rgba(143, 199, 255, 0.34);
    box-shadow: 0 0 0 1px rgba(220, 238, 255, 0.6), 0 0 18px rgba(143, 199, 255, 0.25);
}

.front-dash-root.has-visible-panes .dash-splitter:hover::after,
.front-dash-root.has-visible-panes .dash-splitter:focus::after {
    border-color: #ffffff;
}

/* Front pages and assignments */
.admin-page-grid,
.admin-assignment-add {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto auto;
    gap: 12px;
    align-items: end;
}

.admin-default-toggle {
    align-self: end;
    min-height: 43px;
    justify-content: center;
    padding: 0 12px;
}

.admin-assignment-list {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.admin-assignment-row {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) auto;
    gap: 10px;
    align-items: center;
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    background: rgba(12, 17, 24, 0.60);
    padding: 10px;
}

@media (max-width: 820px) {
    .admin-page-grid,
    .admin-assignment-add,
    .admin-assignment-row {
        grid-template-columns: 1fr;
    }
}

/* Front v21 admin page-context selector */
.admin-current-page-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(143, 199, 255, 0.10), rgba(255, 255, 255, 0.025));
    box-shadow: 0 16px 38px var(--shadow);
    padding: 12px 14px;
    margin: -6px 0 16px;
}

.admin-current-page-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.admin-page-select {
    min-width: min(440px, 52vw);
    font-weight: 650;
}

.admin-page-pill {
    border: 1px solid rgba(143, 199, 255, 0.55);
    border-radius: 999px;
    background: rgba(143, 199, 255, 0.12);
    color: var(--accent);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 5px 8px;
}

.admin-current-page-hint {
    color: var(--muted);
    font-size: 0.88rem;
    text-align: right;
    min-width: 180px;
}

.admin-current-page-name {
    color: var(--accent);
}

@media (max-width: 820px) {
    .admin-current-page-bar,
    .admin-current-page-main {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-page-select {
        min-width: 0;
        width: 100%;
    }

    .admin-current-page-hint {
        text-align: left;
    }
}

/* Front v22 admin page-management controls */
.admin-current-page-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    white-space: nowrap;
}

.admin-page-properties-grid {
    grid-template-columns: minmax(220px, 1fr) auto;
}

.admin-assignment-add-current {
    grid-template-columns: minmax(220px, 1fr) auto;
}

.admin-assignment-row-current {
    grid-template-columns: minmax(160px, 1fr) auto;
}

.admin-assignment-user {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 980px) {
    .admin-current-page-actions {
        flex-wrap: wrap;
        white-space: normal;
    }
}

@media (max-width: 820px) {
    .admin-current-page-actions,
    .admin-page-properties-grid,
    .admin-assignment-add-current,
    .admin-assignment-row-current {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }
}
