html, body, #app {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    height: 100%;
    margin: 0;
    overflow-y: auto;
}

h1:focus {
    outline: none;
}

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

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

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

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNj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NTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

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


#pdfViewer {
    position: relative;
}



#pdfCanvas {
    position: relative;
    z-index: 1; 
}

#selectionBox {
    position: absolute;
    border: 1px dashed #007bff;
    background-color: rgba(0, 123, 255, 0.1);
    z-index: 999;
    display: none; 
    pointer-events: none;
}



.workspace-container {
    flex-grow: 1;
    display: flex; /* Ensure this is a flex container */
    position: relative;
    overflow: hidden;
}

.pdf-viewer-panel {
    flex-grow: 1;
    min-width: 0; /* Add this to allow the viewer to shrink */
    border: 1px solid #ccc;
    overflow: auto;
    transition: margin-right 0.3s ease;
}



.uniform-height .mud-input-slot input,
.uniform-height .mud-input,
.uniform-height .mud-select,
.uniform-height .mud-button-root {
    min-height: 48px !important;
    height: 48px !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}

.page-container {
    position: relative !important;
}

    .page-container canvas {
        position: relative !important;
        z-index: 1 !important;
    }
.field-marker {
    transform-origin: top left;
    position: absolute;
    z-index: 10;
    display: flex;
    white-space: nowrap;
    box-sizing: content-box;
}

    .field-marker.selected {
        overflow: visible;
        position: absolute;
    }

        .field-marker.selected::after {
            content: "";
            position: absolute;
            inset: -2px;
            border: 2px dashed #2d8cff;
            border-radius: 4px;
            pointer-events: none;
            z-index: 1;
        }

    .field-marker .resize-handle {
        position: absolute;
        width: 8px;
        height: 8px;
        background: #3b82f6;
        border: 1px solid #fff;
        box-shadow: 0 0 0 1px #1e40af;
        z-index: 100;
        display: none; 
        pointer-events: none;
    }

    .field-marker.selected .resize-handle {
        display: block;
        box-sizing: border-box;
        pointer-events: auto; 
    }

    .field-marker .marker-label {
        width: 100%;
        height: auto;
    }

.resize-handle.nw {
    left: -4px;
    top: -4px;
    cursor: nwse-resize;
}

.resize-handle.ne {
    right: -4px;
    top: -4px;
    cursor: nesw-resize;
}

.resize-handle.se {
    right: -4px;
    bottom: -4px;
    cursor: nwse-resize;
}

.resize-handle.sw {
    left: -4px;
    bottom: -4px;
    cursor: nesw-resize;
}

.resize-handle.n {
    left: 50%;
    top: -4px;
    transform: translateX(-50%);
    cursor: ns-resize;
}

.resize-handle.s {
    left: 50%;
    bottom: -4px;
    transform: translateX(-50%);
    cursor: ns-resize;
}

.resize-handle.e {
    right: -4px;
    top: 50%;
    transform: translateY(-50%);
    cursor: ew-resize;
}

.resize-handle.w {
    left: -4px;
    top: 50%;
    transform: translateY(-50%);
    cursor: ew-resize;
}
.img-icon {
    width: 24px;
    height: 24px;
    display: block;
}





#pdfViewer .field-marker.selected::after,
#pdfViewer .field-marker.selected.editing::after,
#pdfViewer .field-marker.selected[data-editing="1"]::after {
    content: "";
    position: absolute;
    inset: -2px;
    border: 2px dashed #2d8cff;
    border-radius: 4px;
    pointer-events: none;
    z-index: 1000; 
}



.field-marker.selected::after {
    z-index: 1;
}




/*.marker-label:has(> span):where(:not(.variable-field)):not(.system-field) {
    color: black;
}

.variable-field {
    background: rgba(0, 150, 255, 0.08);
    color: #007acc;
    font-style: italic;
    border-radius: 4px;
    padding: 2px 4px;
}

.system-field {
    background: rgba(0, 200, 0, 0.08);
    color: #2a7a2a;
    font-weight: 500;
}*/










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

.field-220 {
    flex: 1 1 220px;
    min-width: 220px;
}
/* selects, autocomplete */
.field-180 {
    flex: 1 1 180px;
    min-width: 180px;
}
/* color picker, textfield */
.field-140 {
    flex: 1 1 140px;
    min-width: 140px;
}
.field-auto {
    flex: 0 0 auto;
    min-width: auto;
}

.minw-220 {
    min-width: 220px;
}

.minw-180 {
    min-width: 180px;
}

.minw-140 {
    min-width: 140px;
}

















.app-shell {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
}
.resizable-drawer {
    position: sticky;
    top: 0;
    align-self: flex-start;
    z-index: 2; 
    max-height: 100dvh;
}
.drawer-scroller {
    height: 100%;
    max-height: 100dvh;
    overflow: auto; 
}
.main-scroller {
    height: 100%;
    max-height: 100dvh;
    overflow: auto; 
    position: relative;
    z-index: 1;
    min-width: 0;
}
.resize-handle-drawer.left {
    cursor: ew-resize;
    position: absolute;
    top: 0;
    right: 0;
    width: 5px;
    height: 100%;
}
.resize-handle-drawer.right {
    cursor: ew-resize;
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
}
.edge-toggle-fab {
    position: absolute;
    top: 1rem;
    z-index: 2000; 
}

.fab-left {
    left: 0.5rem;
}

.fab-right {
    right: 0.5rem;
}







.marker-label {
    outline: none;
    cursor: text;
    font-size: inherit;
    font-family: inherit; 
    line-height: 1.2;
    white-space: nowrap; 
    user-select: text;
    padding: 0 2px;
    min-width: 10px;
}

.marker-label:focus {
    background-color: #ffffcc;
    border: 1px dashed #aaa;
    border-radius: 2px;
}












    /*LOGIN*/
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh; 
    padding: 2rem 0;
}

.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 420px;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card-header {
    text-align: center;
    margin-bottom: 2rem;
}

    .login-card-header h2 {
        font-weight: 700;
        margin-bottom: 0.5rem;
    }

.form-control:focus {
    border-color: #120f6b; 
    box-shadow: 0 0 0 0.25rem #120f6b40;
}

.password-container {
    position: relative;
}

#togglePassword {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    cursor: pointer;
    color: #6c757d; 
    transition: color 0.2s ease-in-out;
}

    #togglePassword:hover {
        color: #0d6efd;
    }

#login-submit, #reset-submit, #forgot-submit {
    background: linear-gradient(90deg, #120f6bff, #120f6b40);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    padding: 0.75rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    #login-submit:hover, #reset-submit:hover, #forgot-submit:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 15px #120f6b40;
    }

.register-link a, #forgot-password {
    text-decoration: none;
    font-weight: 500;
}

    .register-link a:hover, #forgot-password:hover {
        text-decoration: underline;
    }

.field-validation-error {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@media (max-width: 960px) {
    .welcome-left {
        flex: 1 1 100% !important; 
        padding-right: 2rem !important;
        border-radius: var(--mud-default-borderradius) !important;
    }
}
.nowrap-table th,
.nowrap-table td {
    white-space: nowrap;
}

.nowrap-table {
    overflow-x: auto; 
    display: block; 
}
.be .bce-item-actions {
    display: none !important;
}
.box-wrapper {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 120px);
}

.box-iframe {
    flex: 1 1 auto;
    width: 100%;
    border: none;
    border-radius: 8px;
    margin-top: 16px;
    min-height: 400px;   

}


/*Drawer metadata*/
.drawer-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.drawer-header {
    position: sticky;
    top: 0;
    background-color: var(--mud-palette-background);
    z-index: 10;
}

.drawer-body {
    overflow-y: auto;
    flex: 1;
    padding-bottom: 20px;
}

.drawer-footer {
    position: sticky;
    bottom: 0;
    background-color: var(--mud-palette-background);
    z-index: 10;
}
