
html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}


.app-toolbar .toolbar-btn {
    margin-right: 6px;
    margin-top: 4px;
    margin-bottom: 4px;
}

.toolbar-btn-dropdown.toolbar-btn {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 0.2rem;
}

.toolbar-btn-dropdown.toolbar-btn:hover,
.toolbar-btn-dropdown.toolbar-btn:focus {
    color: #fff;
    text-decoration: none;
    background-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 767.98px) {
        .app-toolbar .navbar-nav,
    .app-toolbar .nav-item {
        width: 100%;
    }

    .app-toolbar .toolbar-btn,
    .toolbar-btn-dropdown.toolbar-btn {
        display: block;
        width: 100%;
        margin: 2px 0;
                text-align: center;
    }

    .app-toolbar .dropdown-menu {
        width: 100%;
    }

        .app-toolbar .dropdown-item {
        text-align: center;
    }

        .app-toolbar .btn-group.toolbar-btn-group {
        display: flex;
        width: 100%;
        margin: 2px 0;
    }

    .app-toolbar .btn-group.toolbar-btn-group > .btn {
        flex: 1 1 auto;
    }
}

.app-current-file {
    font-style: italic;
    opacity: 0.85;
}

.app-status-bar {
    min-height: 28px;
    padding: 4px 16px;
    font-size: 0.9rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.app-toast-container {
    position: fixed;
    top: 90px;
    right: 16px;
    left: 16px;
    z-index: 1080;     display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    pointer-events: none; }

.app-toast-container .toast {
    pointer-events: auto;
        flex: 0 0 auto;
    max-width: 350px;
    width: 100%;
}

@media (max-width: 480px) {
    .app-toast-container {
        top: 60px;
        left: 8px;
        right: 8px;
    }

    .app-toast-container .toast {
        max-width: none;
    }
}


.app-main-area {
    flex: 1 1 auto;
    overflow: hidden;
    padding: 0;
}

.app-main-area .row {
    height: 100%;
    margin: 0;
}

.app-tree-panel {
    height: 100%;
        overflow: auto;
    background-color: #fbfbfb;
    padding: 10px;
}

.app-editor-panel {
    height: 100%;
    overflow-y: auto;
    padding: 10px;
        flex: 1 1 0;
    min-width: 0;
}

@media (min-width: 768px) {
    .app-tree-panel {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

@media (min-width: 992px) {
    .app-tree-panel {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

.app-panel-resizer {
    flex: 0 0 6px;
    width: 6px;
    position: relative;
    cursor: col-resize;
    background-color: transparent;
}

.app-panel-resizer::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 2px;
    width: 2px;
    background-color: #dee2e6;
}

.app-panel-resizer:hover::after,
.app-panel-resizer.resizing::after {
    background-color: #7fb3ff;
}

body.app-resizing-panels {
    cursor: col-resize;
    user-select: none;
}

body.app-resizing-panels .app-tree-panel,
body.app-resizing-panels .app-editor-panel {
        pointer-events: none;
}

@media (min-width: 768px) {
    .app-main-area.app-panel-hidden .app-tree-panel {
        flex: 1 1 auto !important;
        max-width: 100% !important;
    }

    .app-main-area.app-panel-hidden .app-editor-panel,
    .app-main-area.app-panel-hidden .app-panel-resizer {
        display: none !important;
    }
}

@media (max-width: 767.98px) {
        .app-main-area .row {
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
    }

    .app-tree-panel {
        flex: 1 1 auto;
        height: 100%;
        max-height: none;
        overflow-y: auto;
        border-right: none;
        border-bottom: none;
    }

    .app-editor-panel,
    .app-panel-resizer {
        display: none !important;
    }
}


.tasktree-widget {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.tree-toolbar {
    flex: 0 0 auto;
    margin-bottom: 8px;
}

.tree-toolbar-add .btn {
    margin-right: 6px;
}

.tree-toolbar-right {
    gap: 6px;
}

.tree-type-filter {
    width: auto;
    min-width: 110px;
}

.tree-scroll-area {
    flex: 1 1 auto;
    overflow: auto;
}

.tree-root,
.tree-children {
    list-style: none;
    margin: 0;
    padding-left: 18px;
}

.tree-root {
    padding-left: 0;
    min-height: 60px;
}

.tree-node-row {
    display: flex;
    align-items: stretch;
    flex-wrap: nowrap;
    padding: 4px 4px;
    border-radius: 4px;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

@media (hover: hover) {
    .tree-node-row:hover {
        background-color: #eef3f8;
    }
}

.tree-node-row.selected {
    background-color: #d3e6fb;
}

.tree-node-row.drag-over {
    outline: 2px dashed #007bff;
    outline-offset: -2px;
}

.tree-node-row.tree-node-row-passthrough {
    opacity: 0.55;
}

.tree-node-row.tree-node-row-passthrough.selected {
    opacity: 1;
}

.tree-node.dragging > .tree-node-row {
    opacity: 0.4;
}

.tree-toggle {
    width: 18px;
    flex: 0 0 18px;
    text-align: center;
    color: #6c757d;
    align-self: center;
        font-size: 0.85rem;
}

.tree-drag-handle {
    width: 20px;
    flex: 0 0 20px;
    text-align: center;
    color: #adb5bd;
    align-self: center;
    cursor: grab;
    touch-action: none;
}

.tree-drag-handle:hover {
    color: #6c757d;
}

.tree-type-icon {
    flex: 0 0 auto;
    align-self: center;
    padding: 0 2px;
    font-size: 0.9rem;
}

.tree-label {
    flex: 1 1 auto;
    padding: 0 4px;
    align-self: center;
    outline: none;
        white-space: nowrap;
}

.tree-node-actions {
    flex: 0 0 auto;
    display: none;
    align-items: center;
    gap: 2px;
    padding: 0 4px;
    align-self: center;
}

.tree-node-row.actions-tapped .tree-node-actions {
    display: flex;
}

@media (hover: hover) {
    .tree-node-row:hover .tree-node-actions {
        display: flex;
    }
}

.tree-btn {
    border: none;
    background: transparent;
    color: #6c757d;
    line-height: 1;
    padding: 2px 5px;
    font-size: 0.85rem;
    border-radius: 3px;
    min-width: 26px;
}

.tree-btn:hover {
    background-color: #dee6ee;
    color: #212529;
}

.tree-btn-delete:hover {
    color: #dc3545;
}

.tree-node-meta {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 8px;
    align-self: center;
    white-space: nowrap;
}

.tree-meta-deadline {
    font-size: 0.72rem;
    color: #6c757d;
    background-color: #eef1f4;
    border-radius: 10px;
    padding: 2px 8px;
}

.tree-progress-donut {
    --pct: 0;
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: conic-gradient(#28a745 calc(var(--pct) * 1%), #e2e6ea 0);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tree-progress-donut-inner {
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.5rem;
    font-weight: 600;
    color: #495057;
}

@media (max-width: 767.98px) {
    .tree-btn {
        min-width: 36px;
        padding: 6px 7px;
        font-size: 1rem;
    }

    .tree-progress-donut {
        width: 32px;
        height: 32px;
    }

    .tree-progress-donut-inner {
        width: 23px;
        height: 23px;
        font-size: 0.58rem;
    }
}


#editorContainer {
    height: 100%;
}

.node-details {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.node-details-empty {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #6c757d;
    padding: 20px;
}

.node-details-empty-text {
    margin-bottom: 12px;
}

.node-details-form {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.node-details-header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.node-details-name-input {
    flex: 1 1 auto;
    font-weight: 600;
}

.node-details-editor-container {
    flex: 1 1 auto;
    min-height: 0;
}

.node-details-convert-row {
    flex: 0 0 auto;
    margin-top: 10px;
    text-align: center;
}

.node-details-task-attrs {
    flex: 0 0 auto;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #dee2e6;
}

.task-modal-deadline-row {
    display: flex;
    gap: 8px;
}

.task-modal-deadline-row .task-modal-deadline-input {
    flex: 1 1 auto;
}

.task-modal-deadline-row .task-modal-deadline-clear-btn {
    flex: 0 0 auto;
}

.task-modal-percent-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.task-modal-percent-row .custom-range {
    flex: 1 1 auto;
}

.task-modal-percent-value {
    flex: 0 0 auto;
    min-width: 3.2em;
    text-align: right;
    font-weight: 600;
}

.task-modal-percent-reset-btn,
.task-modal-percent-complete-btn {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: .8rem;
    border-radius: 4px;
}

#nodeDetailsModal .modal-body {
    min-height: 320px;
}


.rich-editor-widget {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.rich-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding-bottom: 8px;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 8px;
}

.rich-editor-btn {
    min-width: 34px;
}

.rich-editor-pdf-btn {
    min-width: 34px;
}

.rich-editor-hide-btn {
    margin-left: auto;
}

.rich-editor-fontsize {
    width: auto;
    min-width: 72px;
}

.rich-editor-content {
    flex: 1 1 auto;
    min-height: 250px;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background-color: #fff;
    overflow-y: auto;
}

.rich-editor-content:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: none;
}

.rich-editor-disabled .rich-editor-content {
    background-color: #f8f9fa;
    color: #adb5bd;
}
