:root {
    --app-bg: #f5f7fb;
    --panel: #ffffff;
    --ink: #1f2937;
}

body {
    background: var(--app-bg);
    color: var(--ink);
}

.auth-panel {
    max-width: 430px;
    margin-top: 8vh;
}

.content-panel,
.filter-bar,
.empty-state {
    background: var(--panel);
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 8px 24px rgba(31, 41, 55, 0.05);
}

.metric-card {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: .25rem .75rem;
    align-items: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
}

.metric-card i {
    grid-row: span 2;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #eef2ff;
    color: #3949ab;
}

.metric-card span {
    color: #6b7280;
    font-size: .875rem;
}

.metric-card strong {
    font-size: 1.35rem;
}

.process-card {
    border-radius: 8px;
    border-color: #e5e7eb;
}

.line-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.node-list {
    list-style: none;
    margin: .35rem 0 .35rem 1.25rem;
    padding-left: .75rem;
    border-left: 1px dashed #cbd5e1;
    min-height: .75rem;
}

#treeRoot > .node-list {
    margin-left: 0;
    border-left: 0;
}

.node-row {
    display: flex;
    align-items: center;
    gap: .55rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: .55rem .75rem;
    margin-bottom: .35rem;
}

.drag-handle {
    color: #94a3b8;
    cursor: grab;
}

.node-open {
    text-align: left;
    text-decoration: none;
    color: var(--ink);
    font-weight: 600;
}

.map-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.map-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left-width: 5px;
    border-radius: 8px;
    padding: 1rem;
    min-height: 160px;
}

.map-card h2 {
    font-size: 1rem;
    margin: .75rem 0 .25rem;
}

.map-card span,
.map-card p {
    color: #6b7280;
    font-size: .9rem;
}

.sortable-ghost {
    opacity: .35;
}

.test-table {
    min-width: 1200px;
}

.test-table th,
.test-table td {
    vertical-align: top;
    font-size: .9rem;
}

.comment-item {
    border-top: 1px solid #e5e7eb;
    padding-top: .65rem;
    margin-top: .65rem;
}

.comment-item span {
    display: block;
    color: #6b7280;
    font-size: .78rem;
}

.comment-item p {
    margin: .35rem 0 0;
    white-space: pre-wrap;
}

.detail-list dt {
    color: #6b7280;
    font-weight: 600;
}

.detail-list dd {
    margin-bottom: .65rem;
}

.scope-tree,
.scope-tree ul {
    list-style: none;
    margin: .5rem 0 .5rem 1.25rem;
    padding-left: 1rem;
    border-left: 1px dashed #cbd5e1;
}

.scope-tree > li {
    margin-bottom: .5rem;
}

.flow-tabs {
    gap: .35rem;
}

.flow-tabs .nav-link {
    border: 1px solid #e5e7eb;
    color: #374151;
}

.flow-tabs .nav-link.active {
    background: #1f2937;
    color: #fff;
}

.flow-tab-content {
    min-height: 360px;
}

@media print {
    .navbar,
    .btn,
    .nav-tabs,
    .modal {
        display: none !important;
    }
    body {
        background: #fff;
    }
    .content-panel {
        box-shadow: none;
        border: 0;
    }
}
