.dashboard-layout.immersive-layout {
    display: block;
}

.main-content.immersive-main-content {
    width: 100%;
    padding-top: 16px;
}

.immersive-main-header {
    justify-content: flex-start;
    margin-bottom: 16px;
}

.banco-schemas-page {
    --banco-left-panel-width: 228px;
    --banco-right-panel-width: 368px;
    --banco-collapsed-panel-width: 108px;
    display: grid;
    grid-template-columns: var(--banco-left-panel-width) minmax(0, 1fr) var(--banco-right-panel-width);
    gap: 16px;
    align-items: start;
}

.banco-schemas-page.is-left-collapsed {
    --banco-left-panel-width: var(--banco-collapsed-panel-width);
}

.banco-schemas-page.is-right-collapsed {
    --banco-right-panel-width: var(--banco-collapsed-panel-width);
}

.banco-schemas-panel-left {
    position: sticky;
    top: 16px;
}

.banco-schemas-panel-left,
.banco-schemas-panel-right,
.banco-schemas-panel-library,
.banco-schemas-panel-center {
    min-width: 0;
}

.banco-schemas-side-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.banco-schemas-panel {
    min-height: 280px;
}

.banco-schemas-panel.is-collapsed {
    min-height: 0;
}

.banco-schemas-panel.is-collapsed .tool-card-titlebar {
    justify-content: center;
}

.banco-schemas-panel.is-collapsed .banco-schemas-collapse-btn {
    width: 100%;
    justify-content: center;
}

.banco-schemas-panel.is-collapsed .banco-schemas-collapse-btn span {
    font-size: 0.72rem;
    text-align: center;
}

.banco-schemas-panel.is-collapsed .banco-schemas-library-meta {
    display: none;
}

.banco-schemas-panel-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.banco-schemas-panel-left .banco-schemas-panel-body,
.banco-schemas-panel-right .banco-schemas-panel-body,
.banco-schemas-panel-library .banco-schemas-panel-body {
    max-height: calc(100vh - 170px);
    overflow-y: auto;
    padding-right: 4px;
}

.banco-schemas-panel-center .banco-schemas-panel-body {
    gap: 12px;
}

.banco-schemas-readonly-note,
.banco-schemas-banner,
.banco-schemas-draft-banner,
.banco-schemas-stage-hint,
.banco-schemas-meta-card,
.banco-schemas-empty-photo,
.banco-schema-photo-placeholder {
    border-radius: 12px;
    padding: 12px 14px;
}

.banco-schemas-readonly-note {
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.28);
}

.banco-schemas-banner {
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(148, 163, 184, 0.12);
}

.banco-schemas-banner.is-success {
    background: rgba(34, 197, 94, 0.14);
    border-color: rgba(34, 197, 94, 0.28);
}

.banco-schemas-banner.is-warning {
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.30);
}

.banco-schemas-banner.is-error {
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.28);
}

.banco-schemas-action-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.banco-schemas-action-row .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.banco-schema-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 4px;
}

.banco-schema-list-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.30);
    background: rgba(255, 255, 255, 0.55);
    border-radius: 12px;
    padding: 10px 12px;
    cursor: pointer;
    transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.banco-schema-list-item:hover,
.banco-schema-list-item.is-active {
    border-color: rgba(37, 99, 235, 0.48);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.banco-schema-list-item strong {
    font-size: 0.98rem;
}

.banco-schema-list-item span,
.banco-schema-list-item small {
    opacity: 0.82;
}

.banco-schemas-tool-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.banco-schemas-tool-section strong {
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.banco-schemas-shape-search {
    width: 100%;
}

.banco-schemas-library-sections {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.banco-schemas-library-section {
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.46);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.banco-schemas-library-section.is-collapsed {
    gap: 0;
}

.banco-schemas-library-section-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    padding: 0;
    cursor: pointer;
}

.banco-schemas-library-section-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.banco-schemas-library-section-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.16);
    font-size: 0.74rem;
    font-weight: 600;
}

.banco-schemas-library-section-description {
    margin: 0;
    font-size: 0.74rem;
    opacity: 0.7;
}

.banco-schemas-tool-toggle {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.banco-schemas-tool-toggle-vertical {
    grid-template-columns: 1fr;
}

.banco-schemas-tool-toggle .btn.is-active {
    outline: 2px solid rgba(59, 130, 246, 0.28);
    background: rgba(59, 130, 246, 0.10);
}

.banco-schemas-shape-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.banco-schemas-shape-grid-controls {
    grid-template-columns: 1fr;
}

.banco-schemas-shape-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    justify-content: center;
    min-height: 70px;
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.30);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.6);
    padding: 6px 4px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.banco-schemas-shape-card:hover,
.banco-schemas-shape-card.is-active {
    border-color: rgba(37, 99, 235, 0.48);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.banco-schemas-shape-card:disabled {
    cursor: not-allowed;
    opacity: 0.58;
    transform: none;
    box-shadow: none;
}

.banco-schemas-shape-card-label {
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.12;
}

.banco-schemas-shape-preview {
    display: block;
    width: 100%;
    max-width: 48px;
    height: 30px;
}

.banco-schemas-editor-shell {
    min-height: 780px;
}

.banco-schemas-draft-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background: rgba(249, 115, 22, 0.14);
    border: 1px solid rgba(249, 115, 22, 0.28);
}

.banco-schemas-stage-wrap {
    position: relative;
    border: 1px solid rgba(148, 163, 184, 0.30);
    border-radius: 18px;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 18px;
    background:
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.10), transparent 28%),
        linear-gradient(180deg, rgba(248, 250, 252, 0.92), rgba(226, 232, 240, 0.88));
}

.banco-schemas-stage-surface {
    width: max-content;
    min-width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.banco-schemas-stage-wrap.is-native {
    background:
        radial-gradient(circle at top right, rgba(14, 165, 233, 0.10), transparent 24%),
        linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(226, 232, 240, 0.94));
}

.banco-schemas-stage {
    display: block;
    width: 794px;
    height: auto;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.14);
    cursor: crosshair;
}

.banco-schemas-stage.is-browse {
    cursor: default;
}

.banco-schemas-stage.is-edit .banco-schema-element {
    cursor: move;
}

.banco-schemas-stage-hint {
    position: absolute;
    right: 24px;
    bottom: 24px;
    max-width: 300px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.32);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.10);
}

.banco-schema-shape {
    vector-effect: non-scaling-stroke;
    transition: filter 0.15s ease, opacity 0.15s ease;
}

.banco-schema-shape:hover {
    filter: brightness(1.05);
}

.banco-schema-shape.is-selected {
    filter: drop-shadow(0 0 10px rgba(37, 99, 235, 0.35));
}

.banco-schema-selection-outline {
    stroke: rgba(37, 99, 235, 0.8);
    stroke-width: 2;
    stroke-dasharray: 10 8;
    vector-effect: non-scaling-stroke;
}

.banco-schema-handle-hit-area {
    fill: transparent;
    stroke: transparent;
    pointer-events: all;
}

.banco-schema-handle,
.banco-schema-point-handle,
.banco-schema-midpoint-handle {
    vector-effect: non-scaling-stroke;
    transition: fill 0.12s ease, stroke 0.12s ease, filter 0.12s ease;
}

.banco-schema-handle {
    fill: #ffffff;
    stroke: #2563eb;
    stroke-width: 1.8;
}

.banco-schema-point-handle {
    fill: #ffffff;
    stroke: #0f766e;
    stroke-width: 1.6;
    cursor: move;
}

.banco-schema-midpoint-handle {
    fill: #f97316;
    stroke: #ffffff;
    stroke-width: 1.5;
    cursor: copy;
}

.banco-schema-handle:hover,
.banco-schema-point-handle:hover,
.banco-schema-midpoint-handle:hover {
    filter: brightness(1.02);
}

.banco-schema-badge rect {
    fill: rgba(15, 23, 42, 0.88);
}

.banco-schema-badge text {
    fill: #f8fafc;
    font-size: 12px;
    font-weight: 700;
    dominant-baseline: middle;
}

.banco-schema-inline-label {
    fill: rgba(15, 23, 42, 0.88);
    font-size: 12px;
    font-weight: 700;
}

.banco-schemas-two-columns,
.banco-schemas-geometry-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.banco-schemas-meta-card {
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.58);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.banco-schemas-divider {
    width: 100%;
    border: 0;
    border-top: 1px solid rgba(148, 163, 184, 0.26);
    margin: 2px 0;
}

.banco-schemas-empty {
    opacity: 0.72;
    margin: 0;
}

.banco-schemas-element-editor {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.banco-schemas-polyline-points {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.52);
}

.banco-schemas-point-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.banco-schemas-point-row input {
    width: 100%;
    min-width: 0;
}

.banco-schemas-stroke-width-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 92px;
    gap: 10px;
    align-items: center;
}

.banco-schemas-stroke-width-row input[type="range"] {
    width: 100%;
    margin: 0;
}

.banco-schemas-rotation-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.banco-schemas-rotation-row input {
    width: 100%;
    min-width: 0;
}

.banco-schemas-field-hint {
    display: block;
    margin-top: 6px;
    opacity: 0.72;
}

.banco-schemas-photo-block,
.banco-schemas-comments-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.banco-schemas-photo-thumb {
    display: block;
    width: 100%;
    max-height: 240px;
    object-fit: contain;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.04);
}

.banco-schemas-empty-photo {
    border: 1px dashed rgba(148, 163, 184, 0.44);
    background: rgba(255, 255, 255, 0.46);
}

.banco-schemas-collapsible-header {
    justify-content: space-between;
    gap: 12px;
}

.banco-schemas-collapse-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    padding: 0;
    cursor: pointer;
}

.banco-schemas-collapse-btn span {
    font-weight: 600;
}

.banco-schemas-library-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    opacity: 0.82;
    white-space: nowrap;
}

.banco-schema-comment-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    background: rgba(255, 255, 255, 0.54);
}

.banco-schema-comment-item p,
.banco-schema-comment-item small {
    margin: 0;
}

.banco-schema-photo-modal {
    width: min(960px, 92vw);
}

.banco-schema-photo-modal-body {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
    gap: 16px;
    align-items: start;
}

.banco-schema-photo-link {
    display: block;
}

.banco-schema-photo-image {
    display: block;
    width: 100%;
    max-height: 72vh;
    object-fit: contain;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.04);
}

.banco-schema-photo-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.banco-schema-photo-meta p {
    margin: 0;
}

.banco-schema-comment-preview ul {
    margin: 8px 0 0;
    padding-left: 18px;
}

.banco-schema-comment-preview li {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

@media (max-width: 1280px) {
    .banco-schemas-page {
        --banco-left-panel-width: 208px;
        --banco-right-panel-width: 332px;
    }
}

@media (max-width: 1120px) {
    .banco-schemas-page {
        grid-template-columns: minmax(0, 1fr) 360px;
    }

    .banco-schemas-panel-left {
        grid-column: 1 / -1;
        position: static;
    }

    .banco-schemas-stage {
        width: 794px;
    }
}

@media (max-width: 768px) {
    .banco-schemas-draft-banner,
    .banco-schema-photo-modal-body,
    .banco-schemas-two-columns,
    .banco-schemas-geometry-grid {
        grid-template-columns: 1fr;
        display: grid;
    }

    .banco-schemas-page {
        grid-template-columns: 1fr;
    }

    .banco-schemas-tool-toggle,
    .banco-schemas-shape-grid,
    .banco-schemas-action-row {
        grid-template-columns: 1fr;
    }

    .banco-schemas-tool-toggle .btn,
    .banco-schemas-action-row .btn {
        width: 100%;
        justify-content: center;
    }

    .banco-schemas-point-row {
        grid-template-columns: 1fr 1fr auto;
    }

    .banco-schemas-point-row span {
        grid-column: 1 / -1;
    }

    .main-content.immersive-main-content {
        padding-top: 12px;
    }

    .banco-schemas-stage-wrap {
        padding: 12px;
    }

    .banco-schemas-stage {
        width: 794px;
    }
}
