/* === Components/AccessibilityPanel.razor.css === */
.ac-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
}

.ac-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.ac-header-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ac-close-btn {
    width: 26px;
    height: 26px;
    border: none;
    background: transparent;
    border-radius: 5px;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .65rem;
}

    .ac-close-btn:hover {
        background: #fee2e2;
        color: #dc2626;
    }

.ac-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
}

    .ac-body::-webkit-scrollbar {
        width: 4px;
    }

    .ac-body::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 4px;
    }

/* Welcome */
.ac-welcome {
    text-align: center;
    padding: 32px 16px;
}

.ac-welcome-icon {
    font-size: 48px;
    color: #4e73df;
    margin-bottom: 12px;
}

.ac-welcome-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 6px 0;
}

.ac-welcome-desc {
    font-size: 0.74rem;
    color: #94a3b8;
    margin: 0 0 16px 0;
    line-height: 1.5;
}

.ac-field {
    margin-bottom: 12px;
}

.ac-field-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    color: #475569;
    margin-bottom: 4px;
}

.ac-select {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.76rem;
    color: #334155;
    background: #fff;
    appearance: auto;
    outline: none;
}

    .ac-select:focus {
        border-color: #4e73df;
    }

.ac-checkbox-row {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.72rem;
    color: #475569;
    cursor: pointer;
    margin-bottom: 14px;
}

.ac-checkbox {
    width: 14px;
    height: 14px;
    accent-color: #4e73df;
    cursor: pointer;
}

.ac-btn-audit {
    width: 100%;
    padding: 8px 14px;
    border: none;
    border-radius: 7px;
    background: #4e73df;
    color: #fff;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

    .ac-btn-audit:hover {
        opacity: .9;
    }

/* Report */
.ac-report {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
}

.ac-report-top {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 14px;
}

.ac-grade-badge {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
}

    .ac-grade-badge[data-grade="A"] {
        background: linear-gradient(135deg, #22c55e, #16a34a);
    }

    .ac-grade-badge[data-grade="B"] {
        background: linear-gradient(135deg, #3b82f6, #2563eb);
    }

    .ac-grade-badge[data-grade="C"] {
        background: linear-gradient(135deg, #f59e0b, #d97706);
    }

    .ac-grade-badge[data-grade="D"],
    .ac-grade-badge[data-grade="F"] {
        background: linear-gradient(135deg, #ef4444, #dc2626);
    }

.ac-grade-letter {
    font-size: 24px;
    line-height: 1;
}

.ac-grade-score {
    font-size: 11px;
    opacity: .9;
}

.ac-report-info {
    flex: 1;
}

.ac-report-page {
    display: block;
    font-size: .82rem;
    color: #1e293b;
    margin-bottom: 2px;
}

.ac-report-meta {
    font-size: .68rem;
    color: #94a3b8;
    line-height: 1.4;
}

/* Counts grid */
.ac-counts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.ac-count {
    text-align: center;
    padding: 10px 6px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e2e8f0;
}

.ac-count-num {
    display: block;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 2px;
}

.ac-count-label {
    font-size: .6rem;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: .3px;
}

.ac-count-critical {
    border-color: #fca5a5;
    color: #dc2626;
}

.ac-count-error {
    border-color: #fdba74;
    color: #ea580c;
}

.ac-count-warning {
    border-color: #fde68a;
    color: #d97706;
}

.ac-count-info {
    border-color: #93c5fd;
    color: #2563eb;
}

.ac-report-actions {
    display: flex;
    gap: 8px;
}

.ac-btn-rerun {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #4e73df;
    border-radius: 6px;
    background: #fff;
    color: #4e73df;
    font-size: .72rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

    .ac-btn-rerun:hover {
        background: #4e73df;
        color: #fff;
    }

.ac-btn-clear {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #64748b;
    font-size: .72rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

    .ac-btn-clear:hover {
        background: #f1f5f9;
    }

/* Issues */
.ac-issues {
    margin-top: 4px;
}

.ac-issues-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 6px;
}

.ac-issues-title {
    font-size: .78rem;
    font-weight: 600;
    color: #1e293b;
}

.ac-filter-row {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.ac-filter-btn {
    padding: 3px 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: .66rem;
    color: #64748b;
    cursor: pointer;
    transition: all .15s;
    font-weight: 500;
}

    .ac-filter-btn:hover {
        background: #f1f5f9;
    }

    .ac-filter-btn.active {
        background: #4e73df;
        color: #fff;
        border-color: #4e73df;
    }

.ac-issues-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ac-issue {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all .15s;
    border-left: 3px solid #e2e8f0;
}

    .ac-issue:hover {
        box-shadow: 0 2px 8px rgba(0,0,0,.06);
        transform: translateY(-1px);
    }

    .ac-issue.severity-critical {
        border-left-color: #dc2626;
    }

    .ac-issue.severity-error {
        border-left-color: #ea580c;
    }

    .ac-issue.severity-warning {
        border-left-color: #f59e0b;
    }

    .ac-issue.severity-info {
        border-left-color: #3b82f6;
    }

.ac-issue-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 5px;
    gap: 6px;
}

.ac-issue-severity {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .76rem;
}

    .ac-issue-severity strong {
        color: #1e293b;
    }

.ac-wcag-pill {
    font-size: .58rem;
    padding: 1px 7px;
    border-radius: 9px;
    background: #f1f5f9;
    color: #64748b;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.ac-issue-comp {
    font-size: .7rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 5px;
}

.ac-issue-details {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}

.ac-detail {
    margin-bottom: 10px;
}

    .ac-detail strong {
        display: block;
        font-size: .72rem;
        color: #334155;
        margin-bottom: 3px;
    }

    .ac-detail p {
        margin: 0;
        font-size: .72rem;
        color: #64748b;
        line-height: 1.5;
    }

    .ac-detail ul {
        margin: 0;
        padding-left: 18px;
        font-size: .72rem;
        color: #64748b;
        line-height: 1.6;
    }

.ac-btn-learn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: 1px solid #4e73df;
    border-radius: 6px;
    background: #fff;
    color: #4e73df;
    font-size: .68rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    margin-right: 6px;
}

    .ac-btn-learn:hover {
        background: #4e73df;
        color: #fff;
    }

.ac-btn-goto {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: none;
    border-radius: 6px;
    background: #4e73df;
    color: #fff;
    font-size: .68rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 4px;
}

    .ac-btn-goto:hover {
        opacity: .9;
    }

/* Success */
.ac-success {
    text-align: center;
    padding: 40px 16px;
}

    .ac-success i {
        font-size: 48px;
        color: #22c55e;
        display: block;
        margin-bottom: 10px;
    }

    .ac-success h6 {
        font-size: .88rem;
        font-weight: 600;
        color: #1e293b;
        margin: 0 0 6px 0;
    }

    .ac-success p {
        font-size: .74rem;
        color: #94a3b8;
        margin: 0;
    }

/* === Components/ActiveUsersPanel.razor.css === */
.active-users-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: white;
    border-left: 1px solid #dee2e6;
}

.panel-header {
    padding: 12px 16px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.connection-indicator {
    font-size: 12px;
    animation: pulse 2s infinite;
}

    .connection-indicator.connected {
        color: #28a745;
    }

    .connection-indicator.disconnected {
        color: #dc3545;
    }

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.users-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 6px;
    margin-bottom: 4px;
    transition: background 0.2s;
}

    .user-card:hover {
        background: #f8f9fa;
    }

    .user-card.current-user {
        background: #e7f3ff;
    }

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
}

.user-info {
    min-width: 0;
}

.user-name {
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-status {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.activity-feed {
    border-top: 1px solid #dee2e6;
    padding: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.activity-header {
    padding: 4px 8px;
    margin-bottom: 8px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 4px;
    margin-bottom: 4px;
    background: #f8f9fa;
}

    .activity-item i {
        flex-shrink: 0;
    }

/* === Components/CanvasComponent.razor.css === */
.canvas-component-container {
    position: relative;
    display: flex;
    flex-direction: column;
    /* Container must be a grid item to apply grid-column/grid-row span */
}

.canvas-component-wrapper {
    position: relative;
    padding: 8px;
    transition: all 0.2s;
    flex: 1; /* Take available space */
}

    .canvas-component-wrapper.selected {
        z-index: 10;
    }

    .canvas-component-wrapper.hidden {
        opacity: 0.5;
    }

.component-selection-border {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid #1976d2;
    border-radius: 4px;
    pointer-events: none;
}

.component-actions {
    position: absolute;
    top: -12px;
    right: -12px;
    display: flex;
    gap: 4px;
    z-index: 11;
}

.component-preview-inner {
    background: white;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    min-height: 40px;
}

    .component-preview-inner label {
        display: block;
        margin-bottom: 4px;
        font-weight: 500;
        font-size: 14px;
    }

    .component-preview-inner input,
    .component-preview-inner textarea,
    .component-preview-inner select {
        width: 100%;
        pointer-events: none; /* Prevent interaction in designer */
    }

    .component-preview-inner .form-control {
        font-size: 14px;
    }

.grid-preview {
    width: 100%;
}

    .grid-preview table {
        margin-bottom: 0.5rem;
        font-size: 0.85rem;
    }

    .grid-preview th {
        background-color: #f8f9fa;
        font-weight: 600;
        padding: 0.5rem;
        border: 1px solid #dee2e6;
    }

    .grid-preview td {
        padding: 0.4rem 0.5rem;
        border: 1px solid #dee2e6;
    }

    .grid-preview .badge {
        font-size: 0.7rem;
    }

.component-placeholder {
    padding: 20px;
    background: #f5f5f5;
    border: 2px dashed #ccc;
    border-radius: 4px;
    text-align: center;
    color: #999;
}

.component-children {
    margin-top: 8px;
    padding-left: 16px;
    border-left: 2px solid #e0e0e0;
}

.container-component {
    padding: 4px;
}

.container-content-area {
    min-height: 40px;
    position: relative;
}

.container-children-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 8px;
    align-content: start;
}

.splitter-divider {
    flex-shrink: 0;
}

/* === Components/CommandPalette.razor.css === */
.command-palette-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

    .command-palette-backdrop.show {
        opacity: 1;
        pointer-events: all;
    }

.command-palette {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    width: 600px;
    max-width: 90vw;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    overflow: hidden;
}

    .command-palette.show {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
        pointer-events: all;
    }

.command-palette-search {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e9ecef;
    gap: 12px;
}

    .command-palette-search i {
        font-size: 20px;
        color: #6c757d;
    }

.command-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    padding: 8px 0;
}

.btn-close-search {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

    .btn-close-search:hover {
        background: #f8f9fa;
        color: #495057;
    }

.command-results {
    max-height: 400px;
    overflow-y: auto;
}

.command-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s;
    gap: 12px;
}

    .command-item:hover,
    .command-item.selected {
        background: #f8f9fa;
    }

    .command-item.selected {
        border-left: 3px solid #0d6efd;
    }

.command-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.command-details {
    flex: 1;
    min-width: 0;
}

.command-name {
    font-weight: 600;
    color: #212529;
    margin-bottom: 2px;
}

.command-description {
    font-size: 0.875rem;
    color: #6c757d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.command-shortcut kbd {
    padding: 2px 8px;
    background: #e9ecef;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: 'Consolas', 'Monaco', monospace;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #adb5bd;
}

    .no-results i {
        font-size: 48px;
        margin-bottom: 16px;
    }

.command-palette-footer {
    padding: 12px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.footer-hint {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: #6c757d;
    gap: 4px;
}

    .footer-hint kbd {
        padding: 2px 6px;
        background: white;
        border: 1px solid #dee2e6;
        border-radius: 3px;
        font-size: 0.75rem;
        font-family: 'Consolas', 'Monaco', monospace;
    }

/* === Components/ComponentLibraryBrowser.razor.css === */
/* ─── Browser Shell ─── */
.lb-browser {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
}

/* ─── Header ─── */
.lb-header {
    padding: 12px 14px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.lb-search-box {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.lb-search-icon {
    position: absolute;
    left: 10px;
    color: #94a3b8;
    font-size: 0.72rem;
    pointer-events: none;
}

.lb-search-input {
    flex: 1;
    padding: 7px 30px 7px 30px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.78rem;
    color: #1e293b;
    background: #fff;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

    .lb-search-input:focus {
        border-color: #4e73df;
        box-shadow: 0 0 0 2px rgba(78,115,223,.1);
    }

    .lb-search-input::placeholder {
        color: #94a3b8;
    }

.lb-search-clear {
    position: absolute;
    right: 6px;
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 4px;
    font-size: .6rem;
}

    .lb-search-clear:hover {
        color: #dc2626;
        background: #fef2f2;
    }

.lb-filter-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.lb-select {
    flex: 1;
    padding: 5px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.72rem;
    color: #334155;
    background: #fff;
    outline: none;
    appearance: auto;
}

    .lb-select:focus {
        border-color: #4e73df;
    }

.lb-toggle-row {
    display: flex;
    gap: 6px;
}

.lb-toggle {
    padding: 3px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    font-size: 0.68rem;
    font-weight: 500;
    color: #64748b;
    background: #fff;
    cursor: pointer;
    transition: all .15s;
}

    .lb-toggle:hover {
        border-color: #4e73df;
        color: #4e73df;
    }

    .lb-toggle.active {
        background: #4e73df;
        color: #fff;
        border-color: #4e73df;
    }

/* ─── Content ─── */
.lb-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px 12px;
}

    .lb-content::-webkit-scrollbar {
        width: 4px;
    }

    .lb-content::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 4px;
    }

.lb-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: #94a3b8;
}

    .lb-empty i {
        font-size: 2rem;
        margin-bottom: 10px;
        opacity: .4;
    }

    .lb-empty p {
        margin: 0 0 4px;
        font-size: .82rem;
        font-weight: 500;
        color: #64748b;
    }

    .lb-empty span {
        font-size: .72rem;
    }

/* ─── Card ─── */
.lb-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all .18s;
}

    .lb-card:hover {
        border-color: #cbd5e1;
        box-shadow: 0 2px 8px rgba(0,0,0,.04);
        transform: translateY(-1px);
    }

    .lb-card.selected {
        border-color: #4e73df;
        background: #fafaff;
        box-shadow: 0 0 0 2px rgba(78,115,223,.12);
    }

.lb-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
}

.lb-card-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lb-card-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.lb-card-category {
    font-size: 0.68rem;
    color: #94a3b8;
}

.lb-card-meta {
    text-align: right;
}

.lb-rating {
    font-size: 0.72rem;
    color: #f59e0b;
}

    .lb-rating small {
        color: #94a3b8;
    }

.lb-card-desc {
    font-size: 0.74rem;
    color: #64748b;
    margin: 0 0 8px;
    line-height: 1.4;
}

.lb-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.lb-pill {
    font-size: 0.6rem;
    padding: 1px 8px;
    border-radius: 9px;
    background: #f1f5f9;
    color: #475569;
    font-weight: 500;
}

.lb-pill-more {
    background: #eef2ff;
    color: #4e73df;
}

.lb-tag {
    font-size: 0.6rem;
    padding: 1px 7px;
    border-radius: 9px;
    font-weight: 500;
}

.lb-tag-info {
    background: #dbeafe;
    color: #2563eb;
}

.lb-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lb-card-author {
    font-size: 0.66rem;
    color: #94a3b8;
}

.lb-card-actions {
    display: flex;
    gap: 4px;
}

.lb-btn-use {
    padding: 3px 10px;
    border: 1px solid #4e73df;
    border-radius: 6px;
    background: #fff;
    color: #4e73df;
    font-size: 0.68rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s;
    display: flex;
    align-items: center;
    gap: 4px;
}

    .lb-btn-use:hover {
        background: #4e73df;
        color: #fff;
    }

.lb-btn-ghost {
    width: 26px;
    height: 26px;
    border: none;
    background: transparent;
    color: #94a3b8;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: .72rem;
    transition: all .12s;
}

    .lb-btn-ghost:hover {
        background: #f1f5f9;
        color: #334155;
    }

.lb-btn-ghost-danger:hover {
    background: #fef2f2;
    color: #dc2626;
}

/* ─── Footer ─── */
.lb-footer {
    padding: 10px 14px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.lb-btn-save {
    width: 100%;
    padding: 7px 12px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #4e73df, #3b5fc0);
    color: #fff;
    font-size: 0.74rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 8px;
}

    .lb-btn-save:hover {
        opacity: .9;
    }

.lb-footer-row {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
}

.lb-btn-secondary {
    flex: 1;
    padding: 5px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #475569;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .12s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

    .lb-btn-secondary:hover {
        background: #f1f5f9;
        border-color: #cbd5e1;
    }

.lb-footer-count {
    display: block;
    text-align: center;
    font-size: 0.66rem;
    color: #94a3b8;
}

/* ─── Modal ─── */
.lb-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(15,23,42,.45);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: lb-fadeIn .2s;
}

@keyframes lb-fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes lb-slideUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lb-modal {
    background: #fff;
    border-radius: 14px;
    width: 420px;
    max-height: 85vh;
    box-shadow: 0 20px 60px rgba(0,0,0,.18);
    display: flex;
    flex-direction: column;
    animation: lb-slideUp .25s ease-out;
}

.lb-modal-lg {
    width: 560px;
}

.lb-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid #e2e8f0;
}

.lb-modal-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.lb-modal-close {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: 6px;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
    transition: all .12s;
}

    .lb-modal-close:hover {
        background: #fee2e2;
        color: #dc2626;
    }

.lb-modal-body {
    padding: 16px 18px;
    overflow-y: auto;
    flex: 1;
}

.lb-field {
    margin-bottom: 14px;
}

.lb-field-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 500;
    color: #475569;
    margin-bottom: 5px;
}

.lb-input {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    font-size: 0.78rem;
    color: #1e293b;
    outline: none;
    transition: border-color .15s;
    box-sizing: border-box;
}

    .lb-input:focus {
        border-color: #4e73df;
        box-shadow: 0 0 0 2px rgba(78,115,223,.1);
    }

.lb-textarea {
    resize: vertical;
    min-height: 52px;
    font-family: inherit;
}

.lb-checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.76rem;
    color: #475569;
    cursor: pointer;
    padding: 4px 0;
}

.lb-checkbox {
    width: 16px;
    height: 16px;
    accent-color: #4e73df;
    cursor: pointer;
}

.lb-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 18px;
    border-top: 1px solid #e2e8f0;
}

.lb-btn-cancel {
    padding: 6px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    background: #fff;
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .12s;
}

    .lb-btn-cancel:hover {
        background: #f1f5f9;
    }

.lb-btn-primary {
    padding: 6px 16px;
    border: none;
    border-radius: 7px;
    background: #4e73df;
    color: #fff;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s;
    display: flex;
    align-items: center;
    gap: 5px;
}

    .lb-btn-primary:hover {
        opacity: .9;
    }

/* ─── Preview ─── */
.lb-preview-block {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 16px;
}

.lb-preview-label {
    display: block;
    font-size: 0.68rem;
    color: #94a3b8;
    margin-bottom: 8px;
}

.lb-preview-code {
    font-size: 0.72rem;
    color: #334155;
    margin: 0;
    white-space: pre-wrap;
    font-family: 'Cascadia Code', monospace;
}

.lb-detail-section {
    margin-top: 4px;
}

.lb-detail-title {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 10px;
}

.lb-detail-grid {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 6px 12px;
}

.lb-detail-key {
    font-size: 0.72rem;
    font-weight: 500;
    color: #64748b;
}

.lb-detail-value {
    font-size: 0.72rem;
    color: #334155;
}

/* === Components/ComponentOutline.razor.css === */
.component-outline {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
}

.co-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.co-header-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 6px;
}

.co-header-actions {
    display: flex;
    gap: 4px;
}

.co-action-btn {
    width: 26px;
    height: 26px;
    border: none;
    background: transparent;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #94a3b8;
    cursor: pointer;
    transition: all .15s;
}

    .co-action-btn:hover {
        background: #eef2ff;
        color: #4e73df;
    }

.co-body {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
}

    .co-body::-webkit-scrollbar {
        width: 4px;
    }

    .co-body::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 4px;
    }

.co-tree {
    display: flex;
    flex-direction: column;
}

.co-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px 16px;
    text-align: center;
}

.co-empty-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #cbd5e1;
    margin-bottom: 10px;
}

.co-empty p {
    margin: 0 0 4px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #64748b;
}

.co-empty span {
    font-size: 0.72rem;
    color: #94a3b8;
}

.co-footer {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    padding: 8px 14px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.co-path-label {
    font-size: 0.68rem;
    color: #94a3b8;
    font-weight: 600;
}

.co-path-link {
    border: none;
    background: none;
    padding: 0;
    font-size: 0.72rem;
    color: #4e73df;
    cursor: pointer;
    text-decoration: none;
}

    .co-path-link:hover {
        text-decoration: underline;
    }

.co-path-sep {
    font-size: 8px;
    color: #cbd5e1;
}

/* === Components/ComponentToolbox.razor.css === */
.component-toolbox {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
}

.toolbox-header {
    padding: 14px 16px 12px;
    background: #fff;
}

    .toolbox-header h4 {
        margin: 0 0 10px 0;
        font-size: 0.85rem;
        font-weight: 700;
        color: #1e293b;
    }

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 10px;
    color: #94a3b8;
    font-size: 0.75rem;
    pointer-events: none;
}

.page-designer .search-input {
    flex: 1;
    padding: 7px 32px 7px 30px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.8rem;
    color: #1e293b;
    background: #f8fafc;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

    .search-input:focus {
        border-color: #4e73df;
        box-shadow: 0 0 0 3px rgba(78,115,223,0.1);
        background: #fff;
    }

    .search-input::placeholder {
        color: #94a3b8;
    }

.clear-search {
    position: absolute;
    right: 6px;
    padding: 0;
    width: 22px;
    height: 22px;
    border: none;
    background: transparent;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.65rem;
    transition: all 0.12s;
}

    .clear-search:hover {
        color: #dc2626;
        background: #fef2f2;
    }

.toolbox-body {
    flex: 1;
    overflow-y: auto;
    padding: 6px 8px;
}

    .toolbox-body::-webkit-scrollbar {
        width: 4px;
    }

    .toolbox-body::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 4px;
    }

.no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    text-align: center;
    color: #94a3b8;
}

    .no-results i {
        font-size: 2rem;
        margin-bottom: 12px;
        opacity: 0.4;
    }

    .no-results p {
        margin-bottom: 14px;
        font-size: 0.82rem;
    }

.no-results-btn {
    padding: 5px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.12s;
}

    .no-results-btn:hover {
        background: #f1f5f9;
        border-color: #cbd5e1;
    }

.toolbox-category {
    margin-bottom: 8px;
}

.category-header {
    font-size: 0.65rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 12px 4px;
    margin-bottom: 2px;
}

.category-items {
    display: flex;
    flex-direction: column;
}

/* === Components/ComponentTreeNode.razor.css === */
.tree-node {
    cursor: pointer;
    user-select: none;
    transition: background .15s, border-color .15s;
    border-left: 3px solid transparent;
    border-radius: 0 6px 6px 0;
    margin-bottom: 1px;
}

    .tree-node:hover {
        background: #f1f5f9;
    }

    .tree-node.selected {
        background: #eef2ff;
        border-left-color: #4e73df;
    }

        .tree-node.selected .node-icon {
            color: #4e73df;
        }

    .tree-node.container-node {
        font-weight: 500;
    }

.node-content {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
}

.collapse-toggle {
    width: 18px;
    height: 18px;
    border: none;
    background: transparent;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #94a3b8;
    border-radius: 4px;
    transition: all .15s;
}

    .collapse-toggle:hover {
        color: #4e73df;
        background: #eef2ff;
    }

.collapse-spacer {
    width: 18px;
    display: inline-block;
}

.node-icon {
    color: #64748b;
    font-size: 13px;
}

.node-label {
    flex: 1;
    font-size: 0.78rem;
    color: #334155;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.node-type {
    font-size: 0.62rem;
    padding: 1px 7px;
    border-radius: 9px;
    background: #f1f5f9;
    color: #64748b;
    font-weight: 500;
    letter-spacing: .02em;
}

.node-children-count {
    font-size: 0.6rem;
    padding: 1px 6px;
    border-radius: 9px;
    background: #eef2ff;
    color: #4e73df;
    font-weight: 600;
}

.node-children { /* indent via padding-left on tree-node */
}

/* === Components/DataGrid.razor.css === */
.data-grid {
    width: 100%;
    position: relative;
}

.data-grid-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.data-grid-empty {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    color: #6c757d;
}

    .data-grid-empty i {
        font-size: 3rem;
        margin-bottom: 1rem;
        opacity: 0.5;
    }

.data-grid-actions-header,
.data-grid-actions {
    width: 120px;
    text-align: center;
}

.data-grid-actions {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.data-grid-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    padding: 10px;
}

.pagination-info {
    font-size: 0.9rem;
    color: #6c757d;
}

/* === Components/DesignerCanvas.razor.css === */
.designer-canvas {
    flex: 1;
    overflow: auto;
    background: #f0f2f5;
    padding: 24px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

    .designer-canvas::-webkit-scrollbar {
        width: 6px;
        height: 6px;
    }

    .designer-canvas::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 4px;
    }

.canvas-container {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
}

.canvas-grid {
    display: grid;
    min-height: 200px;
    align-content: start;
}

.empty-canvas {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: #94a3b8;
    border: 2px dashed #e2e8f0;
    border-radius: 8px;
    padding: 40px;
    margin: 8px;
}

    .empty-canvas i {
        font-size: 3rem;
        margin-bottom: 14px;
        opacity: 0.4;
    }

    .empty-canvas p {
        font-size: 0.85rem;
        margin: 0;
        font-weight: 500;
    }

/* === Components/DiffViewer.razor.css === */
.diff-viewer {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: white;
}

.diff-header {
    border-bottom: 2px solid #e0e0e0;
    background: #f8f9fa;
}

.diff-title {
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
}

    .diff-title h3 {
        margin: 0;
        font-size: 18px;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 8px;
    }

.btn-close {
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 8px;
    color: #666;
}

    .btn-close:hover {
        color: #dc3545;
    }

.version-info-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: white;
    border-bottom: 1px solid #e0e0e0;
}

.version-box {
    flex: 1;
    padding: 8px 12px;
    border-radius: 6px;
}

    .version-box.old-version {
        background: #fff5f5;
        border: 1px solid #ffcccb;
    }

    .version-box.new-version {
        background: #f0fff4;
        border: 1px solid #9ae6b4;
    }

.version-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 4px;
}

.version-details {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 13px;
}

.version-number {
    font-family: monospace;
    font-weight: 600;
    color: #0078d4;
}

.version-date {
    color: #666;
    font-size: 12px;
}

.diff-arrow {
    font-size: 24px;
    color: #0078d4;
    font-weight: bold;
}

.diff-summary {
    padding: 12px 16px;
    background: white;
    border-bottom: 1px solid #e0e0e0;
}

.summary-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 8px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
}

.stat-icon {
    font-weight: bold;
    font-size: 16px;
}

.stat-item.added {
    color: #28a745;
}

.stat-item.removed {
    color: #dc3545;
}

.stat-item.modified {
    color: #ffc107;
}

.stat-item.moved {
    color: #17a2b8;
}

.stat-item.similarity {
    color: #6c757d;
}

.stat-count {
    font-weight: 600;
}

.stat-label {
    color: #666;
    font-size: 12px;
}

.major-changes {
    font-size: 13px;
    color: #666;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
}

.diff-controls {
    padding: 8px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.view-mode-selector {
    display: flex;
    gap: 0;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

    .view-mode-selector button {
        padding: 6px 12px;
        background: white;
        border: none;
        cursor: pointer;
        font-size: 13px;
        transition: all 0.2s;
    }

        .view-mode-selector button:not(:last-child) {
            border-right: 1px solid #e0e0e0;
        }

        .view-mode-selector button.active {
            background: #0078d4;
            color: white;
        }

        .view-mode-selector button:not(.active):hover {
            background: #f5f5f5;
        }

.filter-selector label {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.diff-content {
    flex: 1;
    overflow: auto;
    background: #fafafa;
}

.no-changes {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px;
    text-align: center;
}

.icon-large {
    font-size: 64px;
    color: #28a745;
    margin-bottom: 16px;
}

.text-muted {
    color: #999;
    font-size: 13px;
}

.side-by-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: #e0e0e0;
    min-height: 100%;
}

.side {
    background: white;
}

.side-header {
    padding: 12px;
    background: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
    font-weight: 600;
    text-align: center;
}

.old-side .side-header {
    background: #fff5f5;
}

.new-side .side-header {
    background: #f0fff4;
}

.component-list {
    padding: 8px;
}

.component-item {
    margin-bottom: 8px;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    background: white;
}

    .component-item.added {
        background: #f0fff4;
        border-color: #9ae6b4;
    }

    .component-item.removed {
        background: #fff5f5;
        border-color: #ffcccb;
    }

    .component-item.modified {
        background: #fffbf0;
        border-color: #ffd700;
    }

    .component-item.moved {
        background: #f0f8ff;
        border-color: #87ceeb;
    }

    .component-item.empty {
        background: #f5f5f5;
        border-style: dashed;
        min-height: 100px;
    }

.component-preview-card {
    font-size: 13px;
}

.component-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    margin-bottom: 8px;
}

.component-icon {
    font-size: 16px;
}

.component-type {
    color: #666;
    font-size: 12px;
    margin-bottom: 4px;
}

.component-position,
.component-size {
    font-size: 12px;
    color: #666;
    margin-bottom: 2px;
}

.moved-indicator {
    color: #17a2b8;
    font-weight: 600;
    margin-left: 8px;
}

.property-count {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

.unified {
    padding: 16px;
}

.change-block {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 12px;
    overflow: hidden;
}

    .change-block.added {
        border-left: 4px solid #28a745;
    }

    .change-block.removed {
        border-left: 4px solid #dc3545;
    }

    .change-block.modified {
        border-left: 4px solid #ffc107;
    }

    .change-block.moved {
        border-left: 4px solid #17a2b8;
    }

.change-header {
    padding: 12px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.change-icon {
    font-weight: bold;
    font-size: 18px;
}

.change-type {
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
}

.component-name {
    font-weight: 600;
}

.component-type {
    color: #666;
    font-size: 13px;
}

.property-changes {
    padding: 12px;
}

.property-change {
    padding: 6px 8px;
    margin-bottom: 4px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 13px;
    font-family: monospace;
}

.property-name {
    font-weight: 600;
    color: #666;
}

.old-value {
    color: #dc3545;
    text-decoration: line-through;
}

.new-value {
    color: #28a745;
    font-weight: 500;
}

.arrow {
    color: #999;
    margin: 0 4px;
}

.component-details {
    padding: 12px;
}

.detail-row {
    padding: 4px 0;
    font-size: 13px;
}

    .detail-row .label {
        font-weight: 600;
        color: #666;
        margin-right: 8px;
    }

.properties-section {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
}

.property-item {
    padding: 2px 0;
    font-size: 12px;
    font-family: monospace;
}

.prop-name {
    color: #666;
    margin-right: 4px;
}

.prop-value {
    color: #333;
}

/* === Components/DropZone.razor.css === */
.canvas-drop-zone {
    position: relative;
    transition: all 0.2s;
    /* No min-height by default - only when dragging */
    min-height: 0;
}

    /* Show drop zone only when dragging */
    .canvas-drop-zone.drop-zone-visible {
        min-height: 60px;
        border: 1px dashed rgba(25, 118, 210, 0.3);
        border-radius: 4px;
        background: rgba(25, 118, 210, 0.02);
    }

    .canvas-drop-zone.drop-zone-active {
        background: rgba(25, 118, 210, 0.1);
        border: 2px dashed #1976d2;
        border-radius: 4px;
        min-height: 80px;
    }

.drop-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #999;
    font-size: 14px;
}

    .drop-placeholder i {
        font-size: 32px;
        margin-bottom: 8px;
    }

/* === Components/EntityDesigner.razor.css === */
.ed-designer {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
}

/* Header */
.ed-header {
    padding: 10px 14px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ed-header-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ed-btn-new {
    padding: 4px 10px;
    border: none;
    border-radius: 6px;
    background: #4e73df;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity .15s;
    display: flex;
    align-items: center;
    gap: 4px;
}

    .ed-btn-new:hover {
        opacity: .88;
    }

    .ed-btn-new:disabled {
        opacity: .4;
        cursor: not-allowed;
    }

/* Loading */
.ed-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    color: #94a3b8;
}

.ed-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid #e2e8f0;
    border-top-color: #4e73df;
    border-radius: 50%;
    animation: ed-spin .7s linear infinite;
    margin-bottom: 12px;
}

.ed-spinner-sm {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ed-spin .7s linear infinite;
    margin-right: 5px;
}

@keyframes ed-spin {
    to {
        transform: rotate(360deg);
    }
}

.ed-loading p {
    margin: 0;
    font-size: .78rem;
}

/* Form Card */
.ed-form-card {
    margin: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}

.ed-form-header {
    padding: 10px 14px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 10px 10px 0 0;
}

.ed-form-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #1e293b;
}

.ed-form-body {
    padding: 14px;
    max-height: calc(100vh - 250px);
    overflow-y: auto;
}

    .ed-form-body::-webkit-scrollbar {
        width: 4px;
    }

    .ed-form-body::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 4px;
    }

/* Fields */
.ed-field {
    margin-bottom: 12px;
}

.ed-field-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 500;
    color: #475569;
    margin-bottom: 4px;
}

.ed-input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.76rem;
    color: #1e293b;
    outline: none;
    transition: border-color .15s;
    box-sizing: border-box;
}

    .ed-input:focus {
        border-color: #4e73df;
        box-shadow: 0 0 0 2px rgba(78,115,223,.1);
    }

.ed-textarea {
    resize: vertical;
    min-height: 44px;
    font-family: inherit;
}

.ed-select {
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.76rem;
    color: #334155;
    background: #fff;
    appearance: auto;
    outline: none;
}

    .ed-select:focus {
        border-color: #4e73df;
    }

.ed-hint {
    font-size: .72rem;
    color: #94a3b8;
    margin: 8px 0 0;
}

/* Fields Section */
.ed-fields-section {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #e2e8f0;
}

.ed-fields-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.ed-fields-title {
    font-size: 0.76rem;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 5px;
}

.ed-btn-add-field {
    padding: 3px 10px;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    background: #f8fafc;
    color: #16a34a;
    font-size: 0.66rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .12s;
    display: flex;
    align-items: center;
    gap: 4px;
}

    .ed-btn-add-field:hover {
        border-color: #16a34a;
        background: #ecfdf5;
    }

.ed-fields-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ed-field-card {
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.ed-field-row {
    display: flex;
    gap: 6px;
    margin-bottom: 6px;
}

.ed-field-name {
    flex: 2;
}

.ed-field-type {
    flex: 1;
}

.ed-field-options {
    display: flex;
    gap: 12px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.ed-checkbox-row {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    color: #475569;
    cursor: pointer;
    margin: 0;
}

.ed-checkbox {
    width: 14px;
    height: 14px;
    accent-color: #4e73df;
    cursor: pointer;
    margin: 0;
}

.ed-max-length {
    width: 110px;
}

.ed-display-name {
    font-size: 0.72rem;
}

/* Foreign Key Section */
.ed-fk-section {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed #e2e8f0;
}

.ed-fk-config {
    margin-top: 6px;
    padding: 8px;
    background: #f0f7ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
}

.ed-fk-row {
    display: flex;
    gap: 6px;
}

.ed-fk-entity {
    flex: 1;
}

.ed-fk-field {
    flex: 1;
}

.ed-fk-info {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    font-size: 0.66rem;
    color: #2563eb;
    font-weight: 500;
}

.ed-fk-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.62rem;
    color: #2563eb;
    font-weight: 500;
}

/* Buttons */
.ed-btn-icon {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #94a3b8;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: .72rem;
    transition: all .12s;
}

    .ed-btn-icon:hover {
        background: #f1f5f9;
        color: #334155;
    }

.ed-btn-icon-danger:hover {
    background: #fef2f2;
    color: #dc2626;
}

.ed-btn-icon-success {
    width: 28px;
    height: 28px;
    border: none;
    background: #ecfdf5;
    color: #16a34a;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: .78rem;
    transition: all .12s;
}

    .ed-btn-icon-success:hover {
        background: #16a34a;
        color: #fff;
    }

.ed-form-actions {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 8px;
}

.ed-btn-primary {
    padding: 6px 14px;
    border: none;
    border-radius: 7px;
    background: #4e73df;
    color: #fff;
    font-size: 0.74rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
}

    .ed-btn-primary:hover {
        opacity: .9;
    }

    .ed-btn-primary:disabled {
        opacity: .4;
        cursor: not-allowed;
    }

.ed-btn-success {
    padding: 6px 14px;
    border: none;
    border-radius: 7px;
    background: #16a34a;
    color: #fff;
    font-size: 0.74rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
}

    .ed-btn-success:hover {
        opacity: .9;
    }

    .ed-btn-success:disabled {
        opacity: .4;
        cursor: not-allowed;
    }

.ed-btn-cancel {
    padding: 6px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    background: #fff;
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 500;
    cursor: pointer;
}

    .ed-btn-cancel:hover {
        background: #f1f5f9;
    }

/* Entity List */
.ed-entities-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 12px;
}

    .ed-entities-list::-webkit-scrollbar {
        width: 4px;
    }

    .ed-entities-list::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 4px;
    }

.ed-entity {
    padding: 10px 12px;
    margin-bottom: 6px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    transition: all .15s;
    border-left: 3px solid transparent;
}

    .ed-entity:hover {
        box-shadow: 0 2px 6px rgba(0,0,0,.04);
    }

    .ed-entity.created {
        border-left-color: #16a34a;
    }

    .ed-entity.pending {
        border-left-color: #f59e0b;
    }

.ed-entity-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.ed-entity-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ed-entity-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #1e293b;
}

.ed-tag {
    font-size: 0.58rem;
    padding: 1px 7px;
    border-radius: 9px;
    font-weight: 500;
}

.ed-tag-success {
    background: #ecfdf5;
    color: #16a34a;
}

.ed-tag-warn {
    background: #fffbeb;
    color: #d97706;
}

.ed-entity-actions {
    display: flex;
    gap: 4px;
}

.ed-entity-details {
    display: flex;
    gap: 14px;
    font-size: .68rem;
    color: #94a3b8;
    margin-bottom: 2px;
}

.ed-entity-desc {
    margin: 4px 0 0;
    font-size: .72rem;
    color: #64748b;
    line-height: 1.4;
}

/* Empty */
.ed-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    text-align: center;
    color: #94a3b8;
}

    .ed-empty i {
        font-size: 2.5rem;
        opacity: .3;
        margin-bottom: 10px;
    }

    .ed-empty p {
        margin: 0 0 4px;
        font-size: .82rem;
        font-weight: 500;
        color: #64748b;
    }

    .ed-empty span {
        font-size: .72rem;
    }

/* === Components/KeyboardShortcutsPanel.razor.css === */
.keyboard-shortcuts-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: white;
}

.shortcuts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid #e9ecef;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

    .shortcuts-header h4 {
        color: white;
    }

.shortcuts-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.shortcuts-intro {
    margin-bottom: 24px;
}

.shortcuts-category {
    margin-bottom: 32px;
}

.category-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
}

.shortcuts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.shortcut-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.2s ease;
}

    .shortcut-item:hover {
        background: #e9ecef;
        transform: translateX(4px);
    }

.shortcut-description {
    font-size: 0.938rem;
    color: #495057;
}

.shortcut-keys {
    display: flex;
    align-items: center;
    gap: 4px;
}

.keyboard-key {
    display: inline-block;
    padding: 4px 10px;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.875rem;
    font-weight: 600;
    color: #495057;
    box-shadow: 0 2px 0 #dee2e6;
    min-width: 32px;
    text-align: center;
}

.key-separator {
    color: #adb5bd;
    font-weight: 600;
    padding: 0 2px;
}

.shortcuts-footer {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px solid #e9ecef;
}

    .shortcuts-footer kbd {
        padding: 4px 8px;
        background: #f8f9fa;
        border: 1px solid #dee2e6;
        border-radius: 4px;
        font-family: 'Consolas', 'Monaco', monospace;
        font-size: 0.875rem;
    }

/* === Components/LoadingOverlay.razor.css === */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
}

.loading-spinner {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

    .loading-spinner p {
        color: #333;
        font-weight: 500;
    }

/* === Components/MarketplaceBrowser.razor.css === */
.marketplace-browser {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #f8f9fa;
    overflow: hidden;
}

.marketplace-header {
    padding: 20px;
    background: white;
    border-bottom: 2px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .marketplace-header h2 {
        margin: 0;
        display: flex;
        align-items: center;
        gap: 12px;
        font-size: 24px;
    }

.marketplace-search {
    padding: 16px 20px;
    background: white;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    gap: 16px;
    align-items: center;
}

.search-box {
    flex: 1;
    position: relative;
}

    .search-box input {
        width: 100%;
        padding: 10px 40px 10px 12px;
        border: 2px solid #e0e0e0;
        border-radius: 8px;
        font-size: 14px;
    }

.search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
}

.filter-toggles {
    display: flex;
    gap: 8px;
}

    .filter-toggles button {
        padding: 8px 16px;
        background: white;
        border: 1px solid #e0e0e0;
        border-radius: 6px;
        cursor: pointer;
        transition: all 0.2s;
    }

        .filter-toggles button:hover {
            border-color: #0078d4;
        }

        .filter-toggles button.active {
            background: #0078d4;
            color: white;
            border-color: #0078d4;
        }

.marketplace-filters {
    padding: 12px 20px;
    background: white;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    gap: 16px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .filter-group label {
        font-size: 12px;
        font-weight: 600;
        color: #666;
    }

    .filter-group select {
        padding: 6px 10px;
        border: 1px solid #e0e0e0;
        border-radius: 4px;
        font-size: 13px;
    }

.marketplace-featured {
    padding: 20px;
    background: white;
    margin: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

    .marketplace-featured h3 {
        margin-top: 0;
        margin-bottom: 16px;
    }

.featured-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.featured-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
    position: relative;
}

    .featured-card:hover {
        transform: translateY(-4px);
    }

.featured-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255,255,255,0.2);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.component-icon-large {
    font-size: 48px;
    margin-bottom: 12px;
}

.featured-card h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
}

.featured-card .description {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 12px;
}

.featured-card .stats {
    display: flex;
    gap: 12px;
    font-size: 13px;
    margin-bottom: 12px;
}

.featured-card .price {
    display: flex;
    justify-content: flex-end;
}

.marketplace-results {
    flex: 1;
    overflow: auto;
    padding: 20px;
}

.results-header {
    margin-bottom: 16px;
}

    .results-header h3 {
        margin: 0;
        color: #333;
    }

.components-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.component-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

    .component-card:hover {
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        border-color: #0078d4;
    }

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.component-icon {
    font-size: 36px;
}

.badges {
    display: flex;
    gap: 4px;
}

.badge {
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 12px;
}

    .badge.verified {
        background: #28a745;
        color: white;
    }

    .badge.featured {
        background: #ffc107;
        color: #333;
    }

.component-card h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
}

.description {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.component-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.component-stats {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.component-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 12px;
}

.tag {
    padding: 2px 8px;
    background: #e7f3ff;
    border-radius: 12px;
    font-size: 11px;
    color: #004085;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.free-badge {
    background: #28a745;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.price-tag {
    font-size: 18px;
    font-weight: 600;
    color: #0078d4;
}

.btn-install {
    padding: 6px 16px;
    background: #0078d4;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}

    .btn-install:hover {
        background: #005a9e;
    }

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.icon-large {
    font-size: 64px;
    display: block;
    margin-bottom: 16px;
}

.text-muted {
    color: #999;
    font-size: 14px;
}

/* Modal styles */
.component-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .modal-header h2 {
        margin: 0;
    }

.btn-close {
    font-size: 32px;
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 32px;
    height: 32px;
}

.modal-body {
    flex: 1;
    overflow: auto;
    padding: 20px;
}

.detail-main {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
}

.component-preview {
    flex-shrink: 0;
}

.preview-icon {
    font-size: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.component-info {
    flex: 1;
}

.info-row {
    margin-bottom: 12px;
    font-size: 14px;
}

.star {
    color: #ccc;
}

    .star.filled {
        color: #ffc107;
    }

.description-section,
.categories-section,
.ratings-section {
    margin-bottom: 24px;
}

    .description-section h3,
    .categories-section h3,
    .ratings-section h3 {
        margin-top: 0;
        margin-bottom: 12px;
    }

.categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.category-badge {
    padding: 6px 12px;
    background: #0078d4;
    color: white;
    border-radius: 6px;
    font-size: 13px;
}

.review-card {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.review-text {
    font-size: 14px;
    margin-bottom: 8px;
    color: #333;
}

.review-meta {
    font-size: 12px;
    color: #666;
}

.verified-purchase {
    color: #28a745;
    margin-left: 8px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.free-badge-large {
    background: #28a745;
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 600;
}

.price-tag-large {
    font-size: 24px;
    font-weight: 600;
    color: #0078d4;
}

.action-buttons {
    display: flex;
    gap: 12px;
}

.btn-primary,
.btn-secondary {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary {
    background: #0078d4;
    color: white;
}

    .btn-primary:hover {
        background: #005a9e;
    }

.btn-secondary {
    background: white;
    color: #333;
    border: 1px solid #e0e0e0;
}

    .btn-secondary:hover {
        background: #f5f5f5;
    }

/* === Components/Pages/EntityManagement.razor.css === */
/* ─── Page Layout ─── */
.em-page {
    padding: 0px;
}

/* ─── Header ─── */
.em-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.em-header-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.em-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.em-subtitle {
    font-size: 0.85rem;
    color: #64748b;
}

/* ─── Buttons ─── */
.em-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    background: #fff;
    color: #334155;
    transition: all .15s;
}

    .em-btn:hover {
        background: #f8fafc;
    }

.em-btn-primary {
    background: #4e73df;
    color: #fff;
    border-color: #4e73df;
}

    .em-btn-primary:hover {
        background: #3b5cc6;
    }

.em-btn-danger {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}

    .em-btn-danger:hover {
        background: #b91c1c;
    }

.em-btn-cancel {
    background: #f1f5f9;
    color: #475569;
    border-color: #e2e8f0;
}

    .em-btn-cancel:hover {
        background: #e2e8f0;
    }

.em-btn-lg {
    padding: 10px 24px;
    font-size: 0.9rem;
}

.em-btn-sm {
    padding: 5px 10px;
    font-size: 0.75rem;
}

.em-btn-icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #475569;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all .15s;
}

    .em-btn-icon:hover {
        background: #f1f5f9;
    }

.em-btn-icon-success {
    color: #16a34a;
}

    .em-btn-icon-success:hover {
        background: #f0fdf4;
        border-color: #86efac;
    }

.em-btn-icon-danger {
    color: #dc2626;
}

    .em-btn-icon-danger:hover {
        background: #fef2f2;
        border-color: #fca5a5;
    }

.em-btn-xs {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
}

/* ─── Loading ─── */
.em-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px;
    color: #64748b;
}

/* ─── Stats ─── */
.em-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.em-stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.em-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.em-stat-info {
    display: flex;
    flex-direction: column;
}

.em-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
}

.em-stat-label {
    font-size: 0.75rem;
    color: #64748b;
}

/* ─── Empty ─── */
.em-empty {
    text-align: center;
    padding: 60px 20px;
}

.em-empty-icon {
    font-size: 3rem;
    color: #94a3b8;
    margin-bottom: 12px;
}

.em-empty h3 {
    font-size: 1.1rem;
    color: #334155;
    margin: 0 0 6px 0;
}

.em-empty p {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0 0 16px 0;
}

/* ─── Search ─── */
.em-search-row {
    margin-bottom: 16px;
}

.em-search-box {
    position: relative;
    max-width: 360px;
}

.em-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.8rem;
}

.em-search-input {
    width: 100%;
    padding: 8px 12px 8px 32px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.82rem;
    color: #1e293b;
    outline: none;
    transition: border-color .15s;
}

    .em-search-input:focus {
        border-color: #4e73df;
        box-shadow: 0 0 0 2px rgba(78,115,223,.1);
    }

/* ─── Table ─── */
.em-table-wrap {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.em-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

    .em-table thead th {
        padding: 10px 14px;
        background: #f8fafc;
        color: #64748b;
        font-weight: 600;
        text-align: left;
        border-bottom: 1px solid #e2e8f0;
        font-size: 0.75rem;
        text-transform: uppercase;
    }

    .em-table tbody td {
        padding: 10px 14px;
        border-bottom: 1px solid #f1f5f9;
        color: #334155;
    }

    .em-table tbody tr:last-child td {
        border-bottom: none;
    }

    .em-table tbody tr:hover {
        background: #f8fafc;
    }

.em-cell-name {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

    .em-cell-name i {
        color: #4e73df;
        width:20px;
    }

.em-cell-desc {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #64748b;
}

.em-actions {
    display: flex;
    gap: 4px;
}

/* ─── Badges ─── */
.em-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
}

.em-badge-success {
    background: #dcfce7;
    color: #166534;
}

.em-badge-warn {
    background: #fef3c7;
    color: #92400e;
}

/* ─── Modal ─── */
.em-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.em-modal {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
}

.em-modal-lg {
    max-width: 1100px;
}

.em-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid #e2e8f0;
}

.em-modal-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.em-modal-close {
    width: 28px;
    height: 28px;
    border: none;
    background: none;
    color: #64748b;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .em-modal-close:hover {
        background: #f1f5f9;
    }

.em-modal-body {
    padding: 18px;
    overflow-y: auto;
    flex: 1;
}

.em-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 18px;
    border-top: 1px solid #e2e8f0;
}

/* ─── Form ─── */
.em-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.em-field {
    margin-bottom: 12px;
}

.em-field-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 4px;
}

.em-input {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.82rem;
    color: #1e293b;
    outline: none;
    transition: border-color .15s;
}

    .em-input:focus {
        border-color: #4e73df;
    }

.em-input-sm {
    padding: 5px 8px;
    font-size: 0.78rem;
}

.em-textarea {
    resize: vertical;
}

.em-select {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.82rem;
}

.em-select-sm {
    padding: 5px 8px;
    font-size: 0.78rem;
}

/* ─── Fields Section ─── */
.em-fields-section {
    margin-top: 16px;
    border-top: 1px solid #e2e8f0;
    padding-top: 12px;
}

.em-fields-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.em-fields-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 6px;
}

.em-hint {
    font-size: 0.8rem;
    color: #94a3b8;
    text-align: center;
    padding: 16px;
}

.em-field-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}

    .em-field-table thead th {
        padding: 6px 8px;
        background: #f8fafc;
        color: #64748b;
        font-weight: 600;
        text-align: left;
        border-bottom: 1px solid #e2e8f0;
        font-size: 0.7rem;
    }

    .em-field-table tbody td {
        padding: 4px 8px;
        border-bottom: 1px solid #f1f5f9;
        vertical-align: middle;
    }

.em-cell-center {
    text-align: center;
}

/* ─── Foreign Key Row ─── */
.em-fk-row td {
    padding: 2px 8px 6px !important;
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0 !important;
}

.em-fk-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.em-fk-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    color: #475569;
    cursor: pointer;
    white-space: nowrap;
    margin: 0;
}

    .em-fk-toggle input {
        width: 14px;
        height: 14px;
        accent-color: #2563eb;
        cursor: pointer;
        margin: 0;
    }

.em-fk-select {
    min-width: 140px;
    max-width: 200px;
}

.em-fk-badge-info {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.66rem;
    color: #2563eb;
    font-weight: 500;
    white-space: nowrap;
}

.em-fk-chip {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 1px 6px;
    margin: 1px 2px;
    border-radius: 8px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 0.66rem;
    font-weight: 500;
}

/* === Components/Pages/Home.razor.css === */
/* ��� Base ��� */
.dashboard {
    padding: 0;
    min-height: 100vh;
}

/* ��� Header ��� */
.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e6ea;
}

.dash-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1d21;
    margin: 0;
    line-height: 1.2;
}

.dash-subtitle {
    font-size: .85rem;
    color: #6c757d;
}

.dash-date {
    font-size: .82rem;
    color: #6c757d;
}

/* ��� KPI Cards ��� */
.kpi-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    border: 1px solid #e9ecef;
    transition: box-shadow .2s;
}

    .kpi-card:hover {
        box-shadow: 0 4px 12px rgba(0,0,0,.08);
    }

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #fff;
    flex-shrink: 0;
}

.kpi-blue {
    background: linear-gradient(135deg, #4e73df, #224abe);
}

.kpi-green {
    background: linear-gradient(135deg, #1cc88a, #13855c);
}

.kpi-teal {
    background: linear-gradient(135deg, #14b8a6, #0d7377);
}

.kpi-purple {
    background: linear-gradient(135deg, #6f42c1, #4a2d8a);
}

.kpi-orange {
    background: linear-gradient(135deg, #f6c23e, #dda20a);
}

.kpi-body {
    display: flex;
    flex-direction: column;
}

.kpi-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1a1d21;
    line-height: 1.2;
}

.kpi-label {
    font-size: .78rem;
    color: #858d97;
    font-weight: 500;
    letter-spacing: .02em;
}

/* ��� Dash Card ��� */
.dash-card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    overflow: hidden;
}

.dash-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .9rem 1.25rem;
    border-bottom: 1px solid #f0f0f0;
}

.dash-card-title {
    font-size: .9rem;
    font-weight: 600;
    color: #495057;
    margin: 0;
}

    .dash-card-title i {
        margin-right: .35rem;
    }

.dash-card-link {
    font-size: .8rem;
    text-decoration: none;
    color: #4e73df;
    font-weight: 500;
}

    .dash-card-link:hover {
        text-decoration: underline;
    }

.dash-card-body {
    padding: 1rem 1.25rem;
}

    .dash-card-body.p-0 {
        padding: 0;
    }

/* ��� Table ��� */
.dash-table th {
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #858d97;
    border-bottom-width: 1px;
    padding: .6rem .75rem;
}

.dash-table td {
    padding: .7rem .75rem;
    vertical-align: middle;
    font-size: .87rem;
    border-bottom: 1px solid #f5f5f5;
}

.dash-table tbody tr:hover {
    background: #f8f9ff;
}

.app-name-cell {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.app-icon-sm {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #eef0fb;
    color: #4e73df;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    flex-shrink: 0;
}

/* ��� Quick Action Items ��� */
.qa-item {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .85rem 1.25rem;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f5f5f5;
    transition: background .15s;
}

    .qa-item:last-child {
        border-bottom: none;
    }

    .qa-item:hover {
        background: #f8f9ff;
        color: inherit;
    }

.qa-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
    color: #fff;
    flex-shrink: 0;
}

.qa-blue {
    background: #4e73df;
}

.qa-green {
    background: #1cc88a;
}

.qa-purple {
    background: #6f42c1;
}

.qa-orange {
    background: #f6c23e;
    color: #5a4304;
}

.qa-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

    .qa-text strong {
        font-size: .87rem;
        color: #1a1d21;
    }

    .qa-text small {
        font-size: .76rem;
        color: #858d97;
    }

.qa-arrow {
    color: #ced4da;
    font-size: .8rem;
}

/* ��� System Info ��� */
.sys-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .4rem 0;
}

    .sys-row + .sys-row {
        border-top: 1px solid #f5f5f5;
    }

.sys-label {
    font-size: .8rem;
    color: #858d97;
}

.sys-value {
    font-size: .82rem;
    color: #495057;
    font-weight: 500;
}

/* ��� States ��� */
.dash-loading {
    text-align: center;
    padding: 2rem;
    color: #858d97;
    font-size: .85rem;
}

.dash-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: #858d97;
}

    .dash-empty i {
        font-size: 2rem;
        display: block;
        margin-bottom: .5rem;
        opacity: .4;
    }

    .dash-empty p {
        margin-bottom: .75rem;
        font-size: .87rem;
    }

/* ��� Workflow Stats ��� */
.wf-icon-sm {
    background: #e0f2f1 !important;
    color: #0d7377 !important;
}

.wf-stat-row {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .7rem 1.25rem;
    border-bottom: 1px solid #f5f5f5;
}

    .wf-stat-row:last-child {
        border-bottom: none;
    }

.wf-stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    flex-shrink: 0;
}

.wf-stat-text {
    display: flex;
    flex-direction: column;
}

    .wf-stat-text strong {
        font-size: 1.05rem;
        color: #1a1d21;
        line-height: 1.2;
    }

    .wf-stat-text small {
        font-size: .75rem;
        color: #858d97;
    }

.qa-teal {
    background: #14b8a6;
}

/* === Components/PropertyEditor.razor.css === */
.property-editor {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.no-selection {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #94a3b8;
    padding: 40px;
    text-align: center;
}

    .no-selection i {
        font-size: 2.5rem;
        margin-bottom: 14px;
        opacity: 0.4;
    }

    .no-selection p {
        font-size: 0.85rem;
        font-weight: 500;
        color: #64748b;
        margin: 0 0 8px;
    }

    .no-selection small {
        font-size: 0.72rem;
        color: #4e73df;
    }

.property-editor-header {
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

    .property-editor-header h4 {
        margin: 0;
        font-size: 0.85rem;
        font-weight: 700;
        color: #1e293b;
    }

    .property-editor-header small {
        color: #94a3b8;
        font-size: 0.72rem;
    }

.property-editor-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

    .property-editor-body::-webkit-scrollbar {
        width: 4px;
    }

    .property-editor-body::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 4px;
    }

.validation-rules-list,
.event-bindings-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.validation-rule-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.event-binding-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.event-binding-header {
    padding: 10px 12px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.event-binding-body {
    padding: 12px;
}

.event-chain-info {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    font-size: .72rem;
    color: #1e40af;
    margin-bottom: 8px;
}

.event-step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4e73df;
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    flex-shrink: 0;
}

.event-action-badge {
    font-size: .65rem;
    padding: 1px 6px;
    border-radius: 4px;
    background: #e0e7ff;
    color: #4338ca;
    font-weight: 500;
}

.event-chain-arrow {
    text-align: center;
    color: #94a3b8;
    font-size: .85rem;
    line-height: 1;
}

.action-parameters {
    padding: 8px;
    background: #f8fafc;
    border-radius: 6px;
    margin-bottom: 8px;
}

.selected-components-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 300px;
    overflow-y: auto;
}

.selected-component-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

    .selected-component-item .component-icon {
        color: #4e73df;
        font-size: 0.9rem;
    }

    .selected-component-item .component-info {
        flex: 1;
        display: flex;
        flex-direction: column;
    }

        .selected-component-item .component-info small {
            font-size: 0.75rem;
        }

/* Grid Columns Configuration Styles */
.grid-columns-list {
    max-height: 400px;
    overflow-y: auto;
}

.grid-column-item {
    background: #fff;
    transition: all 0.15s;
}

    .grid-column-item:hover {
        box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    }

    .grid-column-item .form-label-sm {
        font-size: 0.72rem;
        font-weight: 600;
        color: #94a3b8;
    }

/* ── Compact Column Row (new design) ── */
.gc-compact-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 4px;
    transition: all 0.12s ease;
    cursor: pointer;
    user-select: none;
}

    .gc-compact-row:hover {
        border-color: #93c5fd;
        box-shadow: 0 1px 6px rgba(59,130,246,0.10);
    }

.gc-col-order {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex-shrink: 0;
}

    .gc-col-order button {
        border: none;
        background: transparent;
        color: #94a3b8;
        font-size: 0.55rem;
        padding: 0 2px;
        line-height: 1;
        cursor: pointer;
    }

        .gc-col-order button:hover { color: #3b82f6; }
        .gc-col-order button:disabled { opacity: 0.25; cursor: default; }

.gc-col-vis {
    flex-shrink: 0;
}

    .gc-col-vis .form-check-input {
        width: 14px;
        height: 14px;
        cursor: pointer;
    }

.gc-col-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.gc-col-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gc-col-meta {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
}

.gc-col-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 0.6rem;
    padding: 1px 5px;
    border-radius: 3px;
    font-weight: 500;
    line-height: 1.4;
}

    .gc-col-badge.type { background: #eff6ff; color: #2563eb; }
    .gc-col-badge.input { background: #fef3c7; color: #92400e; }
    .gc-col-badge.link { background: #ecfdf5; color: #065f46; }
    .gc-col-badge.required { background: #fef2f2; color: #dc2626; }

.gc-col-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

    .gc-col-actions button {
        border: none;
        background: transparent;
        color: #94a3b8;
        font-size: 0.72rem;
        padding: 2px 4px;
        border-radius: 3px;
        cursor: pointer;
        transition: all 0.1s;
    }

        .gc-col-actions button:hover { background: #f1f5f9; color: #3b82f6; }
        .gc-col-actions button.delete:hover { color: #ef4444; background: #fef2f2; }

/* ── Action Buttons Compact ── */
.gc-action-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 4px;
    cursor: pointer;
    transition: all 0.12s;
}

    .gc-action-row:hover {
        border-color: #86efac;
        box-shadow: 0 1px 6px rgba(34,197,94,0.10);
    }

.gc-action-preview {
    flex-shrink: 0;
}

.gc-action-info {
    flex: 1;
    min-width: 0;
}

.gc-action-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #1e293b;
}

.gc-action-target {
    font-size: 0.65rem;
    color: #64748b;
}

/* ── Popup Modal ── */
.gc-popup-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(2px);
    animation: gcFadeIn 0.15s ease;
}

@keyframes gcFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes gcSlideIn {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.gc-popup {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2), 0 0 0 1px rgba(0,0,0,0.05);
    width: 440px;
    max-width: 92vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    animation: gcSlideIn 0.2s ease;
}

.gc-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 12px 12px 0 0;
}

.gc-popup-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.88rem;
    color: #1e293b;
}

    .gc-popup-title i { color: #3b82f6; font-size: 1rem; }

.gc-popup-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.gc-popup-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 18px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 0 0 12px 12px;
}

/* ── Popup Tabs ── */
.gc-tabs {
    display: flex;
    gap: 2px;
    padding: 8px 18px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.gc-tab {
    border: none;
    background: transparent;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.12s;
}

    .gc-tab:hover { background: #e2e8f0; color: #1e293b; }

    .gc-tab.active {
        background: #3b82f6;
        color: #fff;
    }

/* ── Popup Content ── */
.gc-tab-content {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gc-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

    .gc-field label,
    .gc-field-label {
        font-size: 0.7rem;
        font-weight: 600;
        color: #64748b;
    }

    .gc-field small { font-size: 0.65rem; }

.gc-field-row {
    display: flex;
    gap: 10px;
}

    .gc-field-row .gc-field { flex: 1; }

.gc-toggles {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.gc-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: #334155;
    cursor: pointer;
    user-select: none;
    margin: 0;
}

    .gc-toggle input[type="checkbox"] {
        width: 14px;
        height: 14px;
        cursor: pointer;
        accent-color: #3b82f6;
    }

.gc-subsection {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gc-subsection-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 5px;
}

    .gc-subsection-title i { color: #3b82f6; }

.gc-align-btns {
    display: flex;
    gap: 2px;
}

    .gc-align-btns .btn { padding: 3px 10px; }

.gc-preview {
    padding: 0;
}

/* === Components/PropertyRow.razor.css === */
.property-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
}

.property-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 4px;
}

.property-value {
    display: flex;
    gap: 6px;
}

    .property-value .form-control,
    .property-value .form-select {
        font-size: 0.8rem;
        border-color: #e2e8f0;
        border-radius: 6px;
    }

        .property-value .form-control:focus,
        .property-value .form-select:focus {
            border-color: #4e73df;
            box-shadow: 0 0 0 2px rgba(78,115,223,0.1);
        }

/* === Components/PropertySection.razor.css === */
.property-section {
    margin-bottom: 6px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.property-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: #f8fafc;
    cursor: pointer;
    user-select: none;
    font-weight: 600;
    font-size: 0.78rem;
    color: #334155;
    transition: background 0.12s;
}

    .property-section-header:hover {
        background: #f1f5f9;
    }

    .property-section-header i {
        color: #94a3b8;
        font-size: 0.7rem;
    }

.property-section-body {
    padding: 12px 14px;
}

/* === Components/SearchPanel.razor.css === */
.sp-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
}

.sp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.sp-header-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sp-close-btn {
    width: 26px;
    height: 26px;
    border: none;
    background: transparent;
    border-radius: 5px;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .65rem;
}

    .sp-close-btn:hover {
        background: #fee2e2;
        color: #dc2626;
    }

.sp-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
}

    .sp-body::-webkit-scrollbar {
        width: 4px;
    }

    .sp-body::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 4px;
    }

.sp-section {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

    .sp-section:last-child {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }

.sp-section-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 10px;
}

    .sp-section-label i {
        color: #4e73df;
    }

.sp-field {
    margin-bottom: 10px;
}

.sp-field-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    color: #475569;
    margin-bottom: 4px;
}

.sp-input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.76rem;
    color: #1e293b;
    outline: none;
    transition: border-color .15s;
    box-sizing: border-box;
}

    .sp-input:focus {
        border-color: #4e73df;
        box-shadow: 0 0 0 2px rgba(78,115,223,.1);
    }

.sp-select {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.76rem;
    color: #334155;
    background: #fff;
    appearance: auto;
    outline: none;
}

    .sp-select:focus {
        border-color: #4e73df;
    }

.sp-input-group {
    position: relative;
}

    .sp-input-group .sp-input {
        padding-right: 28px;
    }

.sp-input-clear {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 4px;
    font-size: .6rem;
}

    .sp-input-clear:hover {
        color: #dc2626;
        background: #fef2f2;
    }

.sp-checkbox-row {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.72rem;
    color: #475569;
    cursor: pointer;
    margin-bottom: 10px;
}

.sp-checkbox {
    width: 14px;
    height: 14px;
    accent-color: #4e73df;
    cursor: pointer;
}

.sp-btn-search {
    width: 100%;
    padding: 7px 12px;
    border: none;
    border-radius: 7px;
    background: #4e73df;
    color: #fff;
    font-size: 0.74rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

    .sp-btn-search:hover {
        opacity: .9;
    }

/* Results */
.sp-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.sp-results-badge {
    font-size: 0.64rem;
    padding: 2px 9px;
    border-radius: 9px;
    background: #eef2ff;
    color: #4e73df;
    font-weight: 600;
}

.sp-results-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sp-nav-btn {
    width: 24px;
    height: 24px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 5px;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .65rem;
}

    .sp-nav-btn:hover {
        background: #f1f5f9;
        color: #334155;
    }

    .sp-nav-btn:disabled {
        opacity: .4;
        cursor: not-allowed;
    }

.sp-nav-index {
    font-size: 0.72rem;
    font-weight: 500;
    color: #334155;
    min-width: 50px;
    text-align: center;
}

.sp-result-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
}

.sp-result-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

    .sp-result-top strong {
        font-size: .78rem;
        color: #1e293b;
    }

.sp-pill {
    font-size: 0.58rem;
    padding: 1px 7px;
    border-radius: 9px;
    background: #f1f5f9;
    color: #64748b;
    font-weight: 500;
}

.sp-match-field {
    font-size: .68rem;
    color: #94a3b8;
}

.sp-match-value {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    padding: 5px 8px;
    margin-top: 3px;
    font-family: 'Cascadia Code', monospace;
    font-size: .74rem;
    color: #334155;
}

/* Replace */
.sp-replace-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sp-btn-replace {
    width: 100%;
    padding: 6px 12px;
    border: 1px solid #4e73df;
    border-radius: 7px;
    background: #fff;
    color: #4e73df;
    font-size: 0.72rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

    .sp-btn-replace:hover {
        background: #4e73df;
        color: #fff;
    }

.sp-btn-replace-all {
    width: 100%;
    padding: 6px 12px;
    border: none;
    border-radius: 7px;
    background: #fffbeb;
    color: #d97706;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid #fde68a;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

    .sp-btn-replace-all:hover {
        background: #fef3c7;
    }

/* Info box */
.sp-info-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    font-size: .74rem;
    color: #4e73df;
    margin-top: 12px;
}

/* History */
.sp-history-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sp-history-item {
    background: #f8fafc;
    border-radius: 7px;
    padding: 8px 10px;
}

.sp-history-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
}

.sp-history-time {
    font-size: .64rem;
    color: #94a3b8;
}

.sp-tag-success {
    font-size: .58rem;
    padding: 1px 7px;
    border-radius: 9px;
    background: #ecfdf5;
    color: #16a34a;
    font-weight: 500;
}

.sp-history-detail {
    font-size: .68rem;
    color: #64748b;
}

.sp-btn-clear-history {
    width: 100%;
    margin-top: 8px;
    padding: 5px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #64748b;
    font-size: .68rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

    .sp-btn-clear-history:hover {
        background: #f1f5f9;
    }

/* Modal */
.sp-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(15,23,42,.45);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sp-modal {
    background: #fff;
    border-radius: 14px;
    width: 420px;
    max-height: 85vh;
    box-shadow: 0 20px 60px rgba(0,0,0,.18);
    display: flex;
    flex-direction: column;
}

.sp-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid #e2e8f0;
}

.sp-modal-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 6px;
}

    .sp-modal-title i {
        color: #f59e0b;
    }

.sp-modal-close {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: 6px;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
}

    .sp-modal-close:hover {
        background: #fee2e2;
        color: #dc2626;
    }

.sp-modal-body {
    padding: 16px 18px;
}

.sp-modal-text {
    font-size: .78rem;
    color: #475569;
    margin-bottom: 10px;
}

.sp-modal-highlight {
    padding: 8px 12px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 7px;
    font-size: .82rem;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 12px;
}

.sp-modal-warning {
    font-size: .72rem;
    color: #94a3b8;
    margin: 0;
    display: flex;
    align-items: flex-start;
    gap: 5px;
}

.sp-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 18px;
    border-top: 1px solid #e2e8f0;
}

.sp-btn-cancel {
    padding: 6px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    background: #fff;
    color: #64748b;
    font-size: .76rem;
    font-weight: 500;
    cursor: pointer;
}

    .sp-btn-cancel:hover {
        background: #f1f5f9;
    }

.sp-btn-warn {
    padding: 6px 16px;
    border: none;
    border-radius: 7px;
    background: #f59e0b;
    color: #fff;
    font-size: .76rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

    .sp-btn-warn:hover {
        opacity: .9;
    }

/* === Components/TemplateBrowser.razor.css === */
.tb-browser {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
}

/* Header */
.tb-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.tb-header-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tb-btn-save {
    padding: 4px 10px;
    border: none;
    border-radius: 6px;
    background: #4e73df;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity .15s;
    display: flex;
    align-items: center;
    gap: 4px;
}

    .tb-btn-save:hover {
        opacity: .88;
    }

    .tb-btn-save:disabled {
        opacity: .4;
        cursor: not-allowed;
    }

/* Search */
.tb-search {
    position: relative;
    padding: 10px 14px;
    border-bottom: 1px solid #e2e8f0;
}

.tb-search-icon {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: .7rem;
    pointer-events: none;
}

.tb-search-input {
    width: 100%;
    padding: 6px 28px 6px 30px;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    font-size: 0.76rem;
    color: #1e293b;
    background: #f8fafc;
    outline: none;
    transition: border-color .15s;
    box-sizing: border-box;
}

    .tb-search-input:focus {
        border-color: #4e73df;
        background: #fff;
        box-shadow: 0 0 0 2px rgba(78,115,223,.1);
    }

    .tb-search-input::placeholder {
        color: #94a3b8;
    }

.tb-search-clear {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 4px;
    font-size: .58rem;
}

    .tb-search-clear:hover {
        color: #dc2626;
        background: #fef2f2;
    }

/* Categories */
.tb-categories {
    display: flex;
    gap: 5px;
    padding: 8px 14px;
    border-bottom: 1px solid #e2e8f0;
    overflow-x: auto;
    flex-shrink: 0;
}

    .tb-categories::-webkit-scrollbar {
        height: 3px;
    }

    .tb-categories::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 3px;
    }

.tb-cat {
    padding: 3px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    font-size: 0.66rem;
    font-weight: 500;
    color: #64748b;
    background: #fff;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
    flex-shrink: 0;
}

    .tb-cat:hover {
        border-color: #4e73df;
        color: #4e73df;
    }

    .tb-cat.active {
        background: #4e73df;
        color: #fff;
        border-color: #4e73df;
    }

/* List */
.tb-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px;
}

    .tb-list::-webkit-scrollbar {
        width: 4px;
    }

    .tb-list::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 4px;
    }

.tb-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #94a3b8;
    text-align: center;
}

    .tb-empty i {
        font-size: 2.2rem;
        margin-bottom: 10px;
        opacity: .35;
    }

    .tb-empty p {
        margin: 0;
        font-size: .8rem;
        font-weight: 500;
        color: #64748b;
    }

/* Item */
.tb-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 6px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all .18s;
    border-left: 3px solid transparent;
}

    .tb-item:hover {
        box-shadow: 0 2px 6px rgba(0,0,0,.04);
        transform: translateY(-1px);
    }

    .tb-item.builtin {
        border-left-color: #38bdf8;
    }

    .tb-item.custom {
        border-left-color: #4e73df;
    }

.tb-item-icon {
    font-size: 1.1rem;
    color: #4e73df;
    width: 32px;
    text-align: center;
    flex-shrink: 0;
}

.tb-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.tb-item-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: #1e293b;
}

.tb-item-desc {
    font-size: 0.68rem;
    color: #64748b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tb-item-meta {
    display: flex;
    gap: 5px;
    align-items: center;
    margin-top: 3px;
}

.tb-pill {
    font-size: 0.58rem;
    padding: 1px 7px;
    border-radius: 9px;
    background: #f1f5f9;
    color: #64748b;
    font-weight: 500;
}

.tb-pill-info {
    background: #dbeafe;
    color: #2563eb;
}

.tb-usage {
    font-size: 0.62rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 2px;
}

.tb-item-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.tb-btn-add {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: #ecfdf5;
    color: #16a34a;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: .78rem;
    transition: all .12s;
}

    .tb-btn-add:hover {
        background: #16a34a;
        color: #fff;
    }

.tb-btn-del {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: .72rem;
    transition: all .12s;
}

    .tb-btn-del:hover {
        background: #fef2f2;
        color: #dc2626;
    }

/* Modal */
.tb-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(15,23,42,.45);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: tb-fadeIn .2s;
}

@keyframes tb-fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes tb-slideUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tb-modal {
    background: #fff;
    border-radius: 14px;
    width: 420px;
    max-height: 85vh;
    box-shadow: 0 20px 60px rgba(0,0,0,.18);
    display: flex;
    flex-direction: column;
    animation: tb-slideUp .25s ease-out;
}

.tb-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid #e2e8f0;
}

.tb-modal-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tb-modal-close {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: 6px;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
}

    .tb-modal-close:hover {
        background: #fee2e2;
        color: #dc2626;
    }

.tb-modal-body {
    padding: 16px 18px;
    overflow-y: auto;
    flex: 1;
}

.tb-field {
    margin-bottom: 14px;
}

.tb-field-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 500;
    color: #475569;
    margin-bottom: 5px;
}

.tb-input {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    font-size: 0.78rem;
    color: #1e293b;
    outline: none;
    transition: border-color .15s;
    box-sizing: border-box;
}

    .tb-input:focus {
        border-color: #4e73df;
        box-shadow: 0 0 0 2px rgba(78,115,223,.1);
    }

.tb-textarea {
    resize: vertical;
    min-height: 52px;
    font-family: inherit;
}

.tb-select {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    font-size: 0.78rem;
    color: #334155;
    background: #fff;
    appearance: auto;
    outline: none;
}

    .tb-select:focus {
        border-color: #4e73df;
    }

.tb-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 18px;
    border-top: 1px solid #e2e8f0;
}

.tb-btn-cancel {
    padding: 6px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    background: #fff;
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 500;
    cursor: pointer;
}

    .tb-btn-cancel:hover {
        background: #f1f5f9;
    }

.tb-btn-primary {
    padding: 6px 16px;
    border: none;
    border-radius: 7px;
    background: #4e73df;
    color: #fff;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
}

    .tb-btn-primary:hover {
        opacity: .9;
    }

    .tb-btn-primary:disabled {
        opacity: .4;
        cursor: not-allowed;
    }

/* === Components/ThemeEditor.razor.css === */
.te-editor {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
}

.te-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.te-header-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 6px;
}

.te-close-btn {
    width: 26px;
    height: 26px;
    border: none;
    background: transparent;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #94a3b8;
    cursor: pointer;
    transition: all .15s;
}

    .te-close-btn:hover {
        background: #fee2e2;
        color: #dc2626;
    }

.te-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
}

    .te-body::-webkit-scrollbar {
        width: 4px;
    }

    .te-body::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 4px;
    }

.te-section {
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid #f1f5f9;
}

    .te-section:last-child {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }

.te-section-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 10px;
}

    .te-section-label i {
        color: #4e73df;
    }

/* Preset grid */
.te-preset-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.te-preset-card {
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
    background: #fff;
}

    .te-preset-card:hover {
        border-color: #4e73df;
        transform: translateY(-1px);
        box-shadow: 0 3px 8px rgba(78,115,223,.1);
    }

    .te-preset-card.active {
        border-color: #4e73df;
        background: #eef2ff;
    }

.te-color-preview {
    display: flex;
    gap: 3px;
    justify-content: center;
    margin-bottom: 6px;
}

.te-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
}

.te-preset-name {
    font-size: 0.72rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 3px;
}

.te-tag {
    font-size: 0.58rem;
    padding: 1px 7px;
    border-radius: 9px;
    font-weight: 500;
}

.te-tag-default {
    background: #f1f5f9;
    color: #64748b;
}

.te-tag-primary {
    background: #eef2ff;
    color: #4e73df;
}

/* Create button */
.te-btn-create {
    width: 100%;
    padding: 8px 12px;
    border: 1.5px dashed #cbd5e1;
    background: #f8fafc;
    color: #4e73df;
    font-size: 0.76rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

    .te-btn-create:hover {
        border-color: #4e73df;
        background: #eef2ff;
    }

/* Color grid */
.te-color-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.te-color-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .te-color-item label {
        font-size: 0.72rem;
        font-weight: 500;
        color: #475569;
        margin: 0;
    }

.te-color-input {
    width: 100%;
    height: 34px;
    padding: 2px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
}

.te-color-hex {
    font-size: 0.65rem;
    color: #94a3b8;
    font-family: monospace;
}

/* Fields */
.te-field {
    margin-bottom: 12px;
}

    .te-field:last-child {
        margin-bottom: 0;
    }

.te-field-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 500;
    color: #475569;
    margin-bottom: 5px;
}

.te-select {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.76rem;
    color: #334155;
    background: #fff;
    appearance: auto;
    outline: none;
    transition: border-color .15s;
}

    .te-select:focus {
        border-color: #4e73df;
        box-shadow: 0 0 0 2px rgba(78,115,223,.12);
    }

/* Action buttons */
.te-section-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.te-btn-danger {
    width: 100%;
    padding: 7px 12px;
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #dc2626;
    border-radius: 7px;
    font-size: 0.76rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

    .te-btn-danger:hover {
        background: #fee2e2;
        border-color: #dc2626;
    }

.te-btn-ghost {
    width: 100%;
    padding: 7px 12px;
    border: 1px solid #e2e8f0;
    background: transparent;
    color: #64748b;
    border-radius: 7px;
    font-size: 0.76rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

    .te-btn-ghost:hover {
        background: #f1f5f9;
        color: #334155;
    }

/* Info box */
.te-info-box {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 14px;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    font-size: 0.74rem;
    color: #4e73df;
    line-height: 1.5;
}

    .te-info-box i {
        font-size: 14px;
        margin-top: 1px;
        flex-shrink: 0;
    }

/* === Components/ToastNotification.razor.css === */
.toast-container {
    max-width: 400px;
}

.toast {
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.toast-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.toast-body {
    padding: 0.75rem;
}

/* === Components/ToolboxItem.razor.css === */
.toolbox-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    margin: 1px 0;
    background: #fff;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: grab;
    transition: all 0.12s ease;
}

    .toolbox-item:hover {
        background: #f1f5f9;
        border-color: #e2e8f0;
    }

    .toolbox-item:active {
        cursor: grabbing;
        background: #eef2ff;
        border-color: #4e73df;
    }

.toolbox-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    margin-right: 10px;
    font-size: 0.9rem;
    color: #94a3b8;
}

.toolbox-item:hover .toolbox-item-icon {
    color: #4e73df;
}

.toolbox-item-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #475569;
}

/* === Components/ValidationRuleEditor.razor.css === */
.validation-rule-editor {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.validation-rules-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.validation-rule-item {
    padding: 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: #f8f9fa;
}

.rule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.rule-type-badge {
    font-size: 11px;
    font-weight: 600;
}

.rule-config {
    padding-top: 8px;
    border-top: 1px solid #dee2e6;
}

.form-label-sm {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #666;
}

.add-rule-section {
    padding-top: 12px;
    border-top: 1px solid #dee2e6;
}

/* === Components/ValidationTestPanel.razor.css === */
.validation-test-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.test-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
    background: #f8f9fa;
}

    .test-panel-header h6 {
        margin: 0;
        font-size: 14px;
        font-weight: 600;
    }

.test-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.manual-test-section,
.auto-test-section,
.test-results-section,
.coverage-summary {
    margin-bottom: 16px;
}

.form-label-sm {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #666;
}

.test-cases-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 300px;
    overflow-y: auto;
}

.test-case-item {
    padding: 8px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: white;
    transition: all 0.2s;
}

    .test-case-item.passed {
        border-color: #28a745;
        background: #f0fff4;
    }

    .test-case-item.failed {
        border-color: #dc3545;
        background: #fff5f5;
    }

.test-case-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.test-description {
    font-size: 12px;
    font-weight: 500;
}

.test-case-details {
    font-size: 11px;
}

.test-results-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 200px;
    overflow-y: auto;
}

.test-result-item {
    display: flex;
    gap: 8px;
    padding: 8px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: white;
}

    .test-result-item.valid {
        border-left: 3px solid #28a745;
    }

    .test-result-item.invalid {
        border-left: 3px solid #dc3545;
    }

.result-icon {
    font-size: 16px;
}

.result-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.result-message {
    font-size: 12px;
    word-break: break-word;
}

.coverage-summary {
    padding: 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: #f8f9fa;
}

.coverage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 600;
}

.coverage-percentage {
    font-size: 16px;
    color: #0d6efd;
}

.coverage-stats {
    margin-top: 6px;
    text-align: center;
}

code {
    background: #e9ecef;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 11px;
}

/* === Components/VersionHistoryPanel.razor.css === */
.version-history-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: white;
    border-right: 1px solid #e0e0e0;
}

.panel-header {
    padding: 16px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .panel-header h3 {
        margin: 0;
        font-size: 16px;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 8px;
    }

.header-actions {
    display: flex;
    gap: 4px;
}

.btn-icon {
    padding: 6px;
    background: none;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

    .btn-icon:hover {
        background: #f5f5f5;
        border-color: #0078d4;
    }

.filter-panel {
    padding: 12px 16px;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
}

.filter-group {
    margin-bottom: 12px;
}

    .filter-group label {
        display: block;
        font-size: 12px;
        font-weight: 500;
        margin-bottom: 4px;
        color: #666;
    }

    .filter-group select {
        width: 100%;
        padding: 6px 8px;
        border: 1px solid #e0e0e0;
        border-radius: 4px;
        font-size: 13px;
    }

.filter-actions {
    display: flex;
    justify-content: flex-end;
}

.statistics-bar {
    padding: 8px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    gap: 16px;
    font-size: 12px;
}

.stat-item {
    display: flex;
    gap: 4px;
}

.stat-label {
    color: #666;
}

.stat-value {
    font-weight: 600;
    color: #0078d4;
}

.version-timeline {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 16px;
    text-align: center;
    color: #666;
}

.icon-large {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.text-muted {
    font-size: 13px;
    color: #999;
}

.version-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

    .version-card:hover {
        border-color: #0078d4;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .version-card.selected {
        border-color: #0078d4;
        background: #f0f8ff;
    }

    .version-card.milestone {
        border-left: 3px solid #ffd700;
    }

    .version-card.protected {
        border-right: 3px solid #ff6b6b;
    }

.version-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.version-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.version-number {
    font-family: monospace;
    font-weight: 600;
    color: #0078d4;
}

.version-label {
    font-weight: 500;
}

.version-badges {
    display: flex;
    gap: 4px;
}

.badge {
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.badge-milestone {
    background: #fff3cd;
    color: #856404;
}

.badge-protected {
    background: #f8d7da;
    color: #721c24;
}

.badge-type {
    background: #e7f3ff;
    color: #004085;
}

.version-description {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    font-style: italic;
}

.version-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.icon-small {
    font-size: 14px;
}

.version-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.tag {
    padding: 2px 8px;
    background: #e7f3ff;
    border-radius: 12px;
    font-size: 11px;
    color: #004085;
}

.version-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
}

.btn-action {
    padding: 4px 8px;
    font-size: 12px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

    .btn-action:hover {
        background: #f5f5f5;
        border-color: #0078d4;
        color: #0078d4;
    }

.version-history-panel .btn-danger {
    color: #dc3545;
}

    .version-history-panel .btn-danger:hover {
        background: #fff5f5;
        border-color: #dc3545;
    }

.btn-secondary {
    background: white;
    border: 1px solid #e0e0e0;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
}

/* === Components/ViewportSelector.razor.css === */
.viewport-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .viewport-selector .dropdown-item {
        padding: 0.5rem 1rem;
        cursor: pointer;
    }

        .viewport-selector .dropdown-item:hover {
            background-color: var(--bs-light);
        }

        .viewport-selector .dropdown-item.active {
            background-color: var(--bs-primary);
            color: white;
        }

    .viewport-selector .dropdown-header {
        font-weight: 600;
        color: var(--bs-secondary);
        text-transform: uppercase;
        font-size: 0.75rem;
        padding: 0.5rem 1rem 0.25rem;
    }

    .viewport-selector .badge {
        padding: 0.5rem 0.75rem;
        font-weight: 500;
    }

/* === Modules/BiDesigner/Components/BiChartPreview.razor.css === */
.bi-chart-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 40px;
    padding: 6px;
}

.bi-cp-svg {
    width: 100%;
    max-width: 160px;
    height: auto;
}

.bi-cp-card {
    text-align: center;
}

.bi-cp-card-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}

.bi-cp-card-label {
    font-size: .65rem;
    color: #94a3b8;
    margin-top: 2px;
}

.bi-cp-table {
    width: 100%;
    max-width: 180px;
    font-size: .55rem;
}

.bi-cp-trow {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1px;
    padding: 2px 4px;
    border-bottom: 1px solid #f1f5f9;
    color: #64748b;
}

.bi-cp-thead {
    font-weight: 700;
    color: #475569;
    background: #f8fafc;
}

.bi-cp-trow span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Live data chart mode — fills container */
.bi-chart-live {
    padding: 12px;
    min-height: 200px;
}

.bi-chart-live .bi-cp-svg {
    max-width: none;
    width: 100%;
    height: auto;
    min-height: 180px;
}

.bi-chart-live .bi-cp-card {
    padding: 24px 16px;
}

.bi-chart-live .bi-cp-card-value {
    font-size: 2.2rem;
}

.bi-chart-live .bi-cp-card-label {
    font-size: .85rem;
    margin-top: 6px;
}

.bi-chart-live .rd-data-table {
    font-size: .8rem;
}

/* Pivot table styles */
.bi-pivot-table {
    width: 100%;
    font-size: .82rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.bi-pivot-row {
    display: flex;
    border-bottom: 1px solid #f1f5f9;
}

.bi-pivot-row:last-child {
    border-bottom: none;
}

.bi-pivot-header {
    background: linear-gradient(135deg, #1e293b, #334155);
    color: #fff;
    font-weight: 600;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.bi-pivot-cell {
    flex: 1;
    padding: 8px 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    border-right: 1px solid #f1f5f9;
}

.bi-pivot-cell:last-child {
    border-right: none;
}

.bi-pivot-header .bi-pivot-cell {
    border-right-color: rgba(255,255,255,.1);
}

.bi-pivot-val {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-family: 'Courier New', monospace;
}

.bi-pivot-val-header {
    text-align: right;
}

.bi-pivot-cat {
    font-weight: 500;
    color: #1e293b;
}

.bi-pivot-stripe {
    background: #f8fafc;
}

.bi-pivot-row:not(.bi-pivot-header):not(.bi-pivot-total):hover {
    background: #eef2ff;
}

.bi-pivot-total {
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
    font-weight: 700;
    border-top: 2px solid #10b981;
    color: #065f46;
}

.bi-pivot-total .bi-pivot-val {
    color: #065f46;
}

/* === Modules/BiDesigner/Components/BiFilterBuilder.razor.css === */
.fb-root {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}

.fb-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-bottom: 1px solid #f1f5f9;
    font-size: .78rem;
    font-weight: 600;
    color: #334155;
}

    .fb-header i {
        color: #8b5cf6;
    }

.fb-btn-add {
    margin-left: auto;
    padding: 3px 8px;
    border: 1px dashed #93c5fd;
    border-radius: 4px;
    background: #fff;
    color: #4e73df;
    font-size: .7rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 3px;
}

    .fb-btn-add:hover {
        background: #eff6ff;
        border-style: solid;
    }

.fb-list {
    padding: 8px;
}

.fb-row {
    margin-bottom: 6px;
}

.fb-logic {
    display: block;
    font-size: .65rem;
    font-weight: 700;
    color: #8b5cf6;
    text-transform: uppercase;
    padding: 2px 0 4px 4px;
}

.fb-condition {
    display: flex;
    align-items: center;
    gap: 4px;
}

.fb-input {
    padding: 4px 6px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: .72rem;
    color: #1e293b;
    outline: none;
}

    .fb-input:focus {
        border-color: #4e73df;
    }

.fb-field {
    flex: 2;
    min-width: 80px;
}

.fb-op {
    flex: 2;
    min-width: 80px;
}

.fb-val {
    flex: 2;
    min-width: 60px;
}

.fb-between {
    font-size: .72rem;
    color: #94a3b8;
}

.fb-remove {
    width: 20px;
    height: 20px;
    border: none;
    background: none;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
    flex-shrink: 0;
}

    .fb-remove:hover {
        color: #dc2626;
    }

.fb-empty {
    padding: 12px;
    text-align: center;
    font-size: .72rem;
    color: #94a3b8;
}

/* === Pages/Analytics/DashboardDesignerPage.razor.css === */
.dd-root {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f1f5f9;
}

.dd-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    height: 46px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.dd-toolbar-left, .dd-toolbar-center, .dd-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dd-toolbar-btn {
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #475569;
    cursor: pointer;
    font-size: .78rem;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all .15s;
}

    .dd-toolbar-btn:hover {
        background: #f1f5f9;
    }

.dd-toolbar-btn-save {
    background: #4e73df;
    color: #fff;
    border-color: #4e73df;
}

    .dd-toolbar-btn-save:hover {
        background: #3b5cc6;
    }

.dd-toolbar-sep {
    width: 1px;
    height: 20px;
    background: #e2e8f0;
}

.dd-name-input {
    border: 1px solid transparent;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: .85rem;
    font-weight: 600;
    color: #1e293b;
    outline: none;
    transition: border-color .15s;
}

    .dd-name-input:focus {
        border-color: #4e73df;
    }

.dd-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.dd-palette {
    width: 220px;
    background: #fff;
    border-right: 1px solid #e2e8f0;
    padding: 12px;
    overflow-y: auto;
    flex-shrink: 0;
}

.dd-palette-title {
    font-size: .7rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.dd-palette-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: .78rem;
    color: #334155;
    margin-bottom: 4px;
    transition: all .15s;
}

    .dd-palette-item:hover {
        background: #f8fafc;
        border-color: #4e73df;
    }

.dd-canvas {
    flex: 1;
    overflow: auto;
    padding: 20px;
    background: #f1f5f9;
}

.dd-grid {
    display: grid;
    gap: 8px;
    min-height: 400px;
}

.dd-widget {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: all .15s;
    min-height: 80px;
}

    .dd-widget:hover {
        border-color: #93c5fd;
    }

    .dd-widget.selected {
        border-color: #4e73df;
        box-shadow: 0 0 0 2px rgba(78,115,223,.2);
    }

.dd-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid #f1f5f9;
    font-size: .78rem;
    font-weight: 600;
    color: #334155;
}

.dd-widget-close {
    width: 20px;
    height: 20px;
    border: none;
    background: none;
    color: #94a3b8;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .dd-widget-close:hover {
        background: #fef2f2;
        color: #dc2626;
    }

.dd-widget-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    overflow: hidden;
}

.dd-wbody-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    width: 100%;
    height: 100%;
}

.dd-resize-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    border-radius: 0 0 6px 6px;
    flex-shrink: 0;
}

.dd-rsz {
    padding: 2px 6px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: #fff;
    color: #475569;
    cursor: pointer;
    font-size: .65rem;
    display: flex;
    align-items: center;
    gap: 2px;
    transition: all .15s;
}

    .dd-rsz:hover {
        background: #eff6ff;
        border-color: #4e73df;
        color: #4e73df;
    }

.dd-rsz-sep {
    width: 1px;
    height: 14px;
    background: #e2e8f0;
}

.dd-rsz-info {
    font-size: .65rem;
    color: #94a3b8;
    margin-left: auto;
    font-weight: 600;
}

.dd-props-title {
    font-size: .72rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
    letter-spacing: .4px;
}

.dd-props {
    width: 280px;
    flex-shrink: 0;
    background: #fff;
    border-left: 1px solid #e2e8f0;
    padding: 16px;
    overflow-y: auto;
}

.dd-field {
    margin-bottom: 14px;
}

.dd-label {
    display: block;
    font-size: .72rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 5px;
    letter-spacing: .2px;
}

.dd-input {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    font-size: .78rem;
    color: #1e293b;
    outline: none;
    background: #fff;
    transition: all .15s;
}

    .dd-input:hover {
        border-color: #cbd5e1;
    }

    .dd-input:focus {
        border-color: #4e73df;
        box-shadow: 0 0 0 3px rgba(78,115,223,.1);
    }

.dd-field-well {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 6px;
    min-height: 28px;
    padding: 6px 8px;
    background: #f8fafc;
    border: 1px dashed #e2e8f0;
    border-radius: 6px;
}

.dd-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: linear-gradient(135deg, #ede9fe, #e0e7ff);
    color: #5b21b6;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: .68rem;
    font-weight: 500;
    border: 1px solid #c4b5fd;
    transition: all .15s;
    max-width: 140px;
}

    .dd-tag:hover {
        background: linear-gradient(135deg, #ddd6fe, #c7d2fe);
        border-color: #a78bfa;
    }

.dd-tag-value {
    background: linear-gradient(135deg, #dcfce7, #d1fae5);
    color: #166534;
    border-color: #86efac;
}

    .dd-tag-value:hover {
        background: linear-gradient(135deg, #bbf7d0, #a7f3d0);
        border-color: #4ade80;
    }

.dd-tag-x {
    border: none;
    background: none;
    color: inherit;
    cursor: pointer;
    font-size: .8rem;
    padding: 0 1px;
    line-height: 1;
    opacity: 0.5;
    transition: all .15s;
    border-radius: 3px;
}

    .dd-tag-x:hover {
        opacity: 1;
        color: #dc2626;
        background: rgba(220,38,38,.08);
    }

.dd-btn-add {
    padding: 4px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #475569;
    cursor: pointer;
    font-size: .8rem;
    font-weight: 600;
    flex-shrink: 0;
    transition: all .15s;
}

    .dd-btn-add:hover {
        background: #ede9fe;
        border-color: #8b5cf6;
        color: #6d28d9;
        transform: scale(1.05);
    }

.dd-btn-data {
    width: 100%;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #059669, #10b981);
    color: #fff;
    cursor: pointer;
    font-size: .8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all .2s;
    box-shadow: 0 2px 6px rgba(5,150,105,.25);
}

    .dd-btn-data:hover {
        background: linear-gradient(135deg, #047857, #059669);
        box-shadow: 0 4px 12px rgba(5,150,105,.35);
        transform: translateY(-1px);
    }

    .dd-btn-data:disabled {
        opacity: .6;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }

.dd-data-table {
    width: 100%;
    font-size: .72rem;
    overflow: auto;
    max-height: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.dd-data-row {
    display: flex;
    border-bottom: 1px solid #e9edf2;
    transition: background .12s;
}

    .dd-data-row:last-child {
        border-bottom: none;
    }

    .dd-data-row:not(.dd-data-header):hover {
        background: #f0f5ff;
    }

    .dd-data-row:not(.dd-data-header):nth-child(even) {
        background: #fafbfc;
    }

    .dd-data-row:not(.dd-data-header):nth-child(even):hover {
        background: #f0f5ff;
    }

    .dd-data-row span {
        flex: 1;
        padding: 6px 10px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: #334155;
        min-width: 60px;
        border-right: 1px solid #f1f5f9;
    }

    .dd-data-row span:last-child {
        border-right: none;
    }

.dd-data-header {
    background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
    font-weight: 700;
    color: #1e293b;
    position: sticky;
    top: 0;
    z-index: 1;
    border-bottom: 2px solid #e2e8f0;
    text-transform: uppercase;
    font-size: .65rem;
    letter-spacing: .3px;
}

    .dd-data-header span {
        color: #64748b;
        padding: 8px 10px;
    }

/* === Pages/Analytics/DashboardListPage.razor.css === */
.bi-page {
    padding: 0px;
}

.bi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.bi-header-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bi-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.bi-subtitle {
    font-size: .85rem;
    color: #64748b;
}

.bi-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: .82rem;
    font-weight: 500;
    cursor: pointer;
    background: #fff;
    color: #334155;
    transition: all .15s;
}

    .bi-btn:hover {
        background: #f8fafc;
    }

.bi-btn-primary {
    background: #4e73df;
    color: #fff;
    border-color: #4e73df;
}

    .bi-btn-primary:hover {
        background: #3b5cc6;
    }

.bi-btn-lg {
    padding: 10px 24px;
    font-size: .9rem;
}

.bi-btn-icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #475569;
    cursor: pointer;
    font-size: .8rem;
    transition: all .15s;
}

    .bi-btn-icon:hover {
        background: #f1f5f9;
    }

.bi-btn-icon-danger {
    color: #dc2626;
}

    .bi-btn-icon-danger:hover {
        background: #fef2f2;
        border-color: #fca5a5;
    }

.bi-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(180px,1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.bi-stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.bi-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.bi-stat-info {
    display: flex;
    flex-direction: column;
}

.bi-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
}

.bi-stat-label {
    font-size: .75rem;
    color: #64748b;
}

.bi-empty {
    text-align: center;
    padding: 60px 20px;
}

    .bi-empty h3 {
        font-size: 1.1rem;
        color: #334155;
        margin: 8px 0 6px;
    }

    .bi-empty p {
        font-size: .85rem;
        color: #64748b;
        margin: 0 0 16px;
    }

.bi-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(300px,1fr));
    gap: 16px;
}

.bi-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    cursor: pointer;
    transition: all .2s;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

    .bi-card:hover {
        border-color: #4e73df;
        box-shadow: 0 4px 12px rgba(78,115,223,.15);
        transform: translateY(-1px);
    }

.bi-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .95rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
}

    .bi-card-header i {
        color: #4e73df;
    }

.bi-card-desc {
    font-size: .8rem;
    color: #64748b;
    margin: 0 0 10px;
}

.bi-card-meta {
    display: flex;
    gap: 12px;
    font-size: .72rem;
    color: #94a3b8;
    margin-bottom: 8px;
}

.bi-card-actions {
    display: flex;
    gap: 4px;
}
/* === Pages/Analytics/DatasetDesignerPage.razor.css === */
.dsd-root {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f1f5f9;
}

.dsd-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    height: 46px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.dsd-toolbar-left, .dsd-toolbar-center, .dsd-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dsd-btn {
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #475569;
    cursor: pointer;
    font-size: .78rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

    .dsd-btn:hover {
        background: #f1f5f9;
    }

    .dsd-btn:disabled {
        opacity: .5;
        cursor: not-allowed;
    }

.dsd-btn-save {
    background: #4e73df;
    color: #fff;
    border-color: #4e73df;
}

    .dsd-btn-save:hover {
        background: #3b5cc6;
    }

.dsd-btn-sm {
    padding: 4px 8px;
    font-size: .72rem;
}

.dsd-sep {
    width: 1px;
    height: 20px;
    background: #e2e8f0;
}

.dsd-name {
    border: 1px solid transparent;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: .85rem;
    font-weight: 600;
    color: #1e293b;
    outline: none;
}

    .dsd-name:focus {
        border-color: #4e73df;
    }

.dsd-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.dsd-canvas {
    flex: 1;
    position: relative;
    overflow: auto;
    padding: 20px;
    user-select: none;
    background-image: radial-gradient(circle,#e2e8f0 1px,transparent 1px);
    background-size: 20px 20px;
}

.dsd-svg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
    z-index: 1;
}

.dsd-rel-line {
    pointer-events: all;
    cursor: pointer;
}

    .dsd-rel-line:hover path {
        stroke: #4e73df;
        stroke-width: 3;
    }

.dsd-table-card {
    position: absolute;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    width: 220px;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
    z-index: 2;
}

    .dsd-table-card:hover {
        border-color: #93c5fd;
    }

    .dsd-table-card.selected {
        border-color: #4e73df;
        box-shadow: 0 0 0 2px rgba(78,115,223,.2);
    }

.dsd-table-header {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 10px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 6px 6px 0 0;
}

    .dsd-table-header i {
        color: #4e73df;
        font-size: .8rem;
    }

.dsd-drag-handle {
    cursor: grab !important;
}

.dsd-table-name {
    flex: 1;
    border: none;
    background: transparent;
    font-size: .78rem;
    font-weight: 600;
    color: #1e293b;
    outline: none;
}

.dsd-table-remove {
    width: 20px;
    height: 20px;
    border: none;
    background: none;
    color: #94a3b8;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
}

    .dsd-table-remove:hover {
        background: #fef2f2;
        color: #dc2626;
    }

.dsd-table-cols {
    padding: 4px 0;
}

.dsd-col-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3px 10px;
    font-size: .72rem;
}

.dsd-col-linked {
    background: #eff6ff;
}

.dsd-col-name {
    color: #334155;
    flex: 1;
}

.dsd-col-type {
    color: #94a3b8;
    margin-right: 4px;
}

.dsd-col-del {
    width: 14px;
    height: 14px;
    border: none;
    background: none;
    color: #cbd5e1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .6rem;
    padding: 0;
}

    .dsd-col-del:hover {
        color: #dc2626;
    }

.dsd-add-col {
    display: block;
    width: 100%;
    padding: 4px;
    border: none;
    background: none;
    color: #4e73df;
    font-size: .7rem;
    cursor: pointer;
    text-align: center;
}

    .dsd-add-col:hover {
        background: #f8fafc;
    }

.dsd-props {
    width: 300px;
    background: #fff;
    border-left: 1px solid #e2e8f0;
    padding: 14px;
    overflow-y: auto;
    flex-shrink: 0;
}

.dsd-props-section {
    margin-bottom: 16px;
}

.dsd-props-title {
    font-size: .7rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.dsd-field {
    margin-bottom: 10px;
}

.dsd-label {
    display: block;
    font-size: .72rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 3px;
}

.dsd-input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: .78rem;
    color: #1e293b;
    outline: none;
    font-family: inherit;
}

    .dsd-input:focus {
        border-color: #4e73df;
    }

.dsd-rel-card {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: .72rem;
    color: #334155;
    margin-bottom: 4px;
    cursor: pointer;
}

    .dsd-rel-card:hover {
        border-color: #93c5fd;
    }

    .dsd-rel-card.active {
        border-color: #4e73df;
        background: #eff6ff;
    }

.dsd-rel-type {
    color: #4e73df;
    font-weight: 600;
    margin-left: auto;
}

.dsd-rel-remove {
    width: 18px;
    height: 18px;
    border: none;
    background: none;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
}

    .dsd-rel-remove:hover {
        color: #dc2626;
    }

.dsd-measure-card {
    display: flex;
    gap: 4px;
    margin-bottom: 4px;
    align-items: center;
}

.dsd-input-sm {
    flex: 1;
    padding: 4px 6px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: .72rem;
    color: #1e293b;
    outline: none;
}

    .dsd-input-sm:focus {
        border-color: #4e73df;
    }

.dsd-col-edit {
    display: flex;
    gap: 4px;
    margin-bottom: 4px;
    align-items: center;
}
/* === Pages/Analytics/DatasetListPage.razor.css === */
.bi-page {
    padding: 0px;
}

.bi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.bi-header-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bi-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.bi-subtitle {
    font-size: .85rem;
    color: #64748b;
}

.bi-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: .82rem;
    font-weight: 500;
    cursor: pointer;
    background: #fff;
    color: #334155;
}

.bi-btn-primary {
    background: #4e73df;
    color: #fff;
    border-color: #4e73df;
}

    .bi-btn-primary:hover {
        background: #3b5cc6;
    }

.bi-btn-lg {
    padding: 10px 24px;
    font-size: .9rem;
}

.bi-btn-icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #475569;
    cursor: pointer;
    font-size: .8rem;
}

    .bi-btn-icon:hover {
        background: #f1f5f9;
    }

.bi-btn-icon-danger {
    color: #dc2626;
}

    .bi-btn-icon-danger:hover {
        background: #fef2f2;
        border-color: #fca5a5;
    }

.bi-empty {
    text-align: center;
    padding: 60px 20px;
}

    .bi-empty h3 {
        font-size: 1.1rem;
        color: #334155;
        margin: 8px 0 6px;
    }

    .bi-empty p {
        font-size: .85rem;
        color: #64748b;
        margin: 0 0 16px;
    }

.bi-data-table-wrap {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.bi-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .82rem;
}

    .bi-data-table thead th {
        padding: 10px 14px;
        background: #f8fafc;
        color: #64748b;
        font-weight: 600;
        text-align: left;
        border-bottom: 1px solid #e2e8f0;
        font-size: .75rem;
        text-transform: uppercase;
    }

    .bi-data-table tbody td {
        padding: 10px 14px;
        border-bottom: 1px solid #f1f5f9;
        color: #334155;
    }

    .bi-data-table tbody tr:last-child td {
        border-bottom: none;
    }

    .bi-data-table tbody tr:hover {
        background: #f8fafc;
    }
/* === Pages/Analytics/PivotDesignerPage.razor.css === */
.pvt-root {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f1f5f9;
}

.pvt-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    height: 46px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.pvt-toolbar-left, .pvt-toolbar-center, .pvt-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pvt-btn {
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #475569;
    cursor: pointer;
    font-size: .78rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

    .pvt-btn:hover {
        background: #f1f5f9;
    }

.pvt-btn-export {
    background: #059669;
    color: #fff;
    border-color: #059669;
}

    .pvt-btn-export:hover {
        background: #047857;
    }

.pvt-sep {
    width: 1px;
    height: 20px;
    background: #e2e8f0;
}

.pvt-title {
    font-size: .85rem;
    font-weight: 600;
    color: #1e293b;
}

.pvt-select {
    padding: 4px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: .78rem;
    outline: none;
}

    .pvt-select:focus {
        border-color: #4e73df;
    }

.pvt-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}
/* Fields Panel */
.pvt-fields-panel {
    width: 220px;
    background: #fff;
    border-right: 1px solid #e2e8f0;
    overflow-y: auto;
    flex-shrink: 0;
}

.pvt-panel-title {
    font-size: .7rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    padding: 10px 12px 6px;
}

.pvt-field-search {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 10px 8px;
}

    .pvt-field-search i {
        color: #94a3b8;
        font-size: .72rem;
    }

    .pvt-field-search input {
        flex: 1;
        padding: 4px 6px;
        border: 1px solid #e2e8f0;
        border-radius: 4px;
        font-size: .72rem;
        outline: none;
    }

        .pvt-field-search input:focus {
            border-color: #4e73df;
        }

.pvt-field-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    font-size: .75rem;
    color: #334155;
    cursor: grab;
    border-bottom: 1px solid #f8fafc;
}

    .pvt-field-item:hover {
        background: #f8fafc;
    }

    .pvt-field-item.used {
        opacity: .5;
    }

    .pvt-field-item i {
        color: #4e73df;
        font-size: .72rem;
    }

.pvt-field-type {
    margin-left: auto;
    font-size: .65rem;
    color: #94a3b8;
}

.pvt-field-empty {
    padding: 20px;
    text-align: center;
    font-size: .72rem;
    color: #94a3b8;
}
/* Config area */
.pvt-config {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pvt-zones {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.pvt-zone {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    min-height: 60px;
}

.pvt-zone-header {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 8px;
    font-size: .72rem;
    font-weight: 600;
    color: #475569;
    border-bottom: 1px solid #f1f5f9;
}

    .pvt-zone-header i {
        color: #8b5cf6;
    }

.pvt-zone-add {
    margin-left: auto;
    width: 18px;
    height: 18px;
    border: 1px dashed #93c5fd;
    border-radius: 4px;
    background: #fff;
    color: #4e73df;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .65rem;
}

    .pvt-zone-add:hover {
        background: #eff6ff;
    }

.pvt-zone-items {
    padding: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    min-height: 30px;
}

.pvt-zone-hint {
    font-size: .65rem;
    color: #94a3b8;
}

.pvt-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 6px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: .7rem;
    color: #334155;
    background: #f8fafc;
}

    .pvt-chip button {
        width: 14px;
        height: 14px;
        border: none;
        background: none;
        color: #94a3b8;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: .6rem;
        padding: 0;
    }

        .pvt-chip button:hover {
            color: #dc2626;
        }

.pvt-chip-col {
    border-color: #93c5fd;
    background: #eff6ff;
}

.pvt-chip-row {
    border-color: #86efac;
    background: #f0fdf4;
}

.pvt-chip-val {
    border-color: #fbbf24;
    background: #fffbeb;
}

.pvt-agg-select {
    padding: 1px 2px;
    border: 1px solid #e2e8f0;
    border-radius: 2px;
    font-size: .65rem;
    outline: none;
}
/* Preview */
.pvt-preview {
    flex: 1;
    overflow: auto;
    padding: 12px;
}

.pvt-preview-header {
    font-size: .75rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

    .pvt-preview-header i {
        color: #8b5cf6;
    }

.pvt-preview-table {
    overflow: auto;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

    .pvt-preview-table table {
        width: 100%;
        border-collapse: collapse;
        font-size: .72rem;
    }

.pvt-th-row {
    padding: 6px 10px;
    background: #f0fdf4;
    border: 1px solid #e2e8f0;
    font-weight: 600;
    color: #166534;
    text-align: left;
}

.pvt-th-col {
    padding: 6px 10px;
    background: #eff6ff;
    border: 1px solid #e2e8f0;
    font-weight: 600;
    color: #1e40af;
    text-align: center;
}

.pvt-th-val {
    padding: 6px 10px;
    background: #fffbeb;
    border: 1px solid #e2e8f0;
    font-weight: 600;
    color: #92400e;
    text-align: center;
}

.pvt-td-row {
    padding: 5px 10px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #334155;
}

.pvt-td-val {
    padding: 5px 10px;
    border: 1px solid #e2e8f0;
    text-align: center;
    color: #64748b;
}

.pvt-td-empty {
    padding: 30px;
    text-align: center;
    color: #94a3b8;
}
/* Properties */
.pvt-props {
    width: 260px;
    background: #fff;
    border-left: 1px solid #e2e8f0;
    padding: 0;
    overflow-y: auto;
    flex-shrink: 0;
}

.pvt-field-group {
    padding: 0 12px;
    margin-bottom: 10px;
}

.pvt-label {
    display: block;
    font-size: .72rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 3px;
}

.pvt-input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: .78rem;
    color: #1e293b;
    outline: none;
}

    .pvt-input:focus {
        border-color: #4e73df;
    }

.pvt-toggle {
    font-size: .72rem;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 4px;
}

    .pvt-toggle input {
        accent-color: #4e73df;
    }
/* === Pages/Analytics/ReportDesignerPage.razor.css === */
.rd-root {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f1f5f9;
}

.rd-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    height: 46px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.rd-toolbar-left, .rd-toolbar-center, .rd-toolbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rd-btn {
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #475569;
    cursor: pointer;
    font-size: .78rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

    .rd-btn:hover {
        background: #f1f5f9;
    }

.rd-btn-save {
    background: #4e73df;
    color: #fff;
    border-color: #4e73df;
}

.rd-sep {
    width: 1px;
    height: 20px;
    background: #e2e8f0;
}

.rd-name {
    border: 1px solid transparent;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: .85rem;
    font-weight: 600;
    color: #1e293b;
    outline: none;
}

    .rd-name:focus {
        border-color: #4e73df;
    }

.rd-tab {
    padding: 5px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #475569;
    cursor: pointer;
    font-size: .75rem;
}

    .rd-tab.active {
        background: #4e73df;
        color: #fff;
        border-color: #4e73df;
    }

.rd-tab-add {
    padding: 5px 8px;
}

.rd-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.rd-palette {
    width: 200px;
    background: #fff;
    border-right: 1px solid #e2e8f0;
    padding: 12px;
    overflow-y: auto;
    flex-shrink: 0;
}

.rd-palette-title {
    font-size: .7rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.rd-palette-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: .75rem;
    color: #334155;
    margin-bottom: 4px;
}

    .rd-palette-item:hover {
        background: #f8fafc;
        border-color: #8b5cf6;
    }

.rd-canvas {
    flex: 1;
    overflow: auto;
    padding: 20px;
}

.rd-viz-grid {
    display: grid;
    grid-template-columns: repeat(12,1fr);
    gap: 8px;
    min-height: 300px;
}

.rd-viz {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: all .15s;
    min-height: 80px;
}

    .rd-viz:hover {
        border-color: #c4b5fd;
    }

    .rd-viz.selected {
        border-color: #8b5cf6;
        box-shadow: 0 0 0 2px rgba(139,92,246,.2);
    }

.rd-viz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid #f1f5f9;
    font-size: .78rem;
    font-weight: 600;
    color: #334155;
}

.rd-viz-remove {
    width: 20px;
    height: 20px;
    border: none;
    background: none;
    color: #94a3b8;
    cursor: pointer;
    border-radius: 4px;
}

    .rd-viz-remove:hover {
        background: #fef2f2;
        color: #dc2626;
    }

.rd-viz-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    overflow: hidden;
}

.rd-field-divider {
    height: 0;
    border: none;
    border-top: 1px dashed #cbd5e1;
    margin: 16px 0 12px;
}

.rd-field-section {
    font-size: .68rem;
    font-weight: 700;
    color: #8b5cf6;
    text-transform: uppercase;
    margin-bottom: 10px;
    letter-spacing: .5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

    .rd-field-section::before {
        content: '';
        display: inline-block;
        width: 3px;
        height: 14px;
        background: linear-gradient(180deg, #8b5cf6, #a78bfa);
        border-radius: 2px;
    }

.rd-field-well {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 6px;
    min-height: 28px;
    padding: 6px 8px;
    background: #f8fafc;
    border: 1px dashed #e2e8f0;
    border-radius: 6px;
}

.rd-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: linear-gradient(135deg, #ede9fe, #e0e7ff);
    color: #5b21b6;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: .68rem;
    font-weight: 500;
    border: 1px solid #c4b5fd;
    transition: all .15s;
    max-width: 140px;
}

    .rd-tag:hover {
        background: linear-gradient(135deg, #ddd6fe, #c7d2fe);
        border-color: #a78bfa;
    }

.rd-tag-value {
    background: linear-gradient(135deg, #dcfce7, #d1fae5);
    color: #166534;
    border-color: #86efac;
}

    .rd-tag-value:hover {
        background: linear-gradient(135deg, #bbf7d0, #a7f3d0);
        border-color: #4ade80;
    }

.rd-tag-x {
    border: none;
    background: none;
    color: inherit;
    cursor: pointer;
    font-size: .8rem;
    padding: 0 1px;
    line-height: 1;
    opacity: 0.5;
    transition: all .15s;
    border-radius: 3px;
}

    .rd-tag-x:hover {
        opacity: 1;
        color: #dc2626;
        background: rgba(220,38,38,.08);
    }

.rd-btn-add {
    padding: 4px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #475569;
    cursor: pointer;
    font-size: .8rem;
    font-weight: 600;
    flex-shrink: 0;
    transition: all .15s;
}

    .rd-btn-add:hover {
        background: #ede9fe;
        border-color: #8b5cf6;
        color: #6d28d9;
        transform: scale(1.05);
    }

.rd-btn-data {
    width: 100%;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #059669, #10b981);
    color: #fff;
    cursor: pointer;
    font-size: .8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all .2s;
    box-shadow: 0 2px 6px rgba(5,150,105,.25);
}

    .rd-btn-data:hover {
        background: linear-gradient(135deg, #047857, #059669);
        box-shadow: 0 4px 12px rgba(5,150,105,.35);
        transform: translateY(-1px);
    }

    .rd-btn-data:disabled {
        opacity: .6;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }

.rd-data-table {
    width: 100%;
    font-size: .72rem;
    overflow: auto;
    max-height: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.rd-data-row {
    display: flex;
    border-bottom: 1px solid #e9edf2;
    transition: background .12s;
}

    .rd-data-row:last-child {
        border-bottom: none;
    }

    .rd-data-row:not(.rd-data-header):hover {
        background: #f0f5ff;
    }

    .rd-data-row:not(.rd-data-header):nth-child(even) {
        background: #fafbfc;
    }

    .rd-data-row:not(.rd-data-header):nth-child(even):hover {
        background: #f0f5ff;
    }

    .rd-data-row span {
        flex: 1;
        padding: 6px 10px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: #334155;
        min-width: 60px;
        border-right: 1px solid #f1f5f9;
    }

    .rd-data-row span:last-child {
        border-right: none;
    }

.rd-data-header {
    background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
    font-weight: 700;
    color: #1e293b;
    position: sticky;
    top: 0;
    z-index: 1;
    border-bottom: 2px solid #e2e8f0;
    text-transform: uppercase;
    font-size: .65rem;
    letter-spacing: .3px;
}

    .rd-data-header span {
        color: #64748b;
        padding: 8px 10px;
    }

.rd-props {
    width: 320px;
    background: #fff;
    border-left: 1px solid #e2e8f0;
    padding: 16px;
    overflow-y: auto;
    flex-shrink: 0;
}

.rd-props-title {
    font-size: .72rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
    letter-spacing: .4px;
}

.rd-field {
    margin-bottom: 14px;
}

.rd-label {
    display: block;
    font-size: .72rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 5px;
    letter-spacing: .2px;
}

.rd-input {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    font-size: .78rem;
    color: #1e293b;
    outline: none;
    background: #fff;
    transition: all .15s;
}

    .rd-input:hover {
        border-color: #cbd5e1;
    }

    .rd-input:focus {
        border-color: #8b5cf6;
        box-shadow: 0 0 0 3px rgba(139,92,246,.1);
    }
/* === Pages/Analytics/ReportListPage.razor.css === */
.bi-page {
    padding: 0px;
}

.bi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.bi-header-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bi-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.bi-subtitle {
    font-size: .85rem;
    color: #64748b;
}

.bi-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: .82rem;
    font-weight: 500;
    cursor: pointer;
    background: #fff;
    color: #334155;
}

.bi-btn-primary {
    background: #4e73df;
    color: #fff;
    border-color: #4e73df;
}

    .bi-btn-primary:hover {
        background: #3b5cc6;
    }

.bi-btn-lg {
    padding: 10px 24px;
    font-size: .9rem;
}

.bi-btn-icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #475569;
    cursor: pointer;
    font-size: .8rem;
}

    .bi-btn-icon:hover {
        background: #f1f5f9;
    }

.bi-btn-icon-danger {
    color: #dc2626;
}

    .bi-btn-icon-danger:hover {
        background: #fef2f2;
        border-color: #fca5a5;
    }

.bi-empty {
    text-align: center;
    padding: 60px 20px;
}

    .bi-empty h3 {
        font-size: 1.1rem;
        color: #334155;
        margin: 8px 0 6px;
    }

    .bi-empty p {
        font-size: .85rem;
        color: #64748b;
        margin: 0 0 16px;
    }

.bi-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(300px,1fr));
    gap: 16px;
}

.bi-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    cursor: pointer;
    transition: all .2s;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

    .bi-card:hover {
        border-color: #4e73df;
        box-shadow: 0 4px 12px rgba(78,115,223,.15);
        transform: translateY(-1px);
    }

.bi-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .95rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
}

    .bi-card-header i {
        color: #4e73df;
    }

.bi-card-desc {
    font-size: .8rem;
    color: #64748b;
    margin: 0 0 10px;
}

.bi-card-meta {
    display: flex;
    gap: 12px;
    font-size: .72rem;
    color: #94a3b8;
    margin-bottom: 8px;
}

.bi-card-actions {
    display: flex;
    gap: 4px;
}
/* === Pages/ApplicationsPage.razor.css === */
/* ===== AP: Applications Page Corporate ===== */
.ap-container {
    padding: 0;
}

.ap-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.ap-header-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ap-header-right {
    flex-shrink: 0;
}

.ap-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.ap-subtitle {
    font-size: 0.85rem;
    color: #64748b;
}
/* Stats */
.ap-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.ap-stat-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.ap-stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.ap-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    display: block;
    line-height: 1.1;
}

.ap-stat-label {
    font-size: 0.7rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 600;
}
/* Buttons */
.ap-btn {
    border: none;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 9px 18px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all .15s;
}

.ap-btn-primary {
    background: #4e73df;
    color: #fff;
}

    .ap-btn-primary:hover {
        background: #3b5fc5;
    }

.ap-btn-ghost {
    background: transparent;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

    .ap-btn-ghost:hover {
        background: #f8fafc;
        color: #1e293b;
    }

.ap-btn-lg {
    padding: 12px 28px;
    font-size: 0.9rem;
}
/* Loading */
.ap-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 350px;
    color: #94a3b8;
}

.ap-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e2e8f0;
    border-top-color: #4e73df;
    border-radius: 50%;
    animation: ap-spin .7s linear infinite;
    margin-bottom: 14px;
}

@keyframes ap-spin {
    to {
        transform: rotate(360deg);
    }
}
/* Empty */
.ap-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
}

.ap-empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #cbd5e1;
    margin-bottom: 18px;
}

.ap-empty h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
}

.ap-empty p {
    color: #94a3b8;
    font-size: 0.85rem;
    margin-bottom: 20px;
}
/* Grid */
.ap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}
/* Card */
.ap-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    transition: all .2s;
}

    .ap-card:hover {
        border-color: #cbd5e1;
        box-shadow: 0 4px 16px rgba(0,0,0,.06);
        transform: translateY(-2px);
    }

.ap-card-inactive {
    opacity: .55;
}

.ap-card-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border-bottom: 1px solid #f1f5f9;
}

.ap-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #eef2ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #4e73df;
    flex-shrink: 0;
}

    .ap-card-icon img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 10px;
    }

.ap-card-name {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
}
/* Tags */
.ap-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    margin-top: 4px;
}

.ap-tag-success {
    background: #e8faf0;
    color: #1cc88a;
}

.ap-tag-blue {
    background: #eef2ff;
    color: #4e73df;
}

.ap-tag-default {
    background: #f1f5f9;
    color: #94a3b8;
}

.ap-card-body {
    padding: 16px 20px;
    flex: 1;
}

.ap-card-desc {
    font-size: 0.82rem;
    color: #64748b;
    margin: 0 0 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ap-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 0.75rem;
    color: #94a3b8;
}

    .ap-card-meta span {
        display: flex;
        align-items: center;
        gap: 5px;
    }
/* Card actions */
.ap-card-actions {
    padding: 12px 20px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    gap: 6px;
}

.ap-action-btn {
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 7px;
    font-size: 0.78rem;
    font-weight: 500;
    color: #64748b;
    padding: 7px 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all .15s;
}

    .ap-action-btn:hover {
        background: #f8fafc;
        color: #1e293b;
        border-color: #cbd5e1;
    }

.ap-action-primary {
    color: #4e73df;
    border-color: #c7d2fe;
    flex: 1;
    justify-content: center;
}

    .ap-action-primary:hover {
        background: #eef2ff;
    }

.ap-action-success {
    color: #1cc88a;
    border-color: #a7f3d0;
}

    .ap-action-success:hover {
        background: #e8faf0;
    }

.ap-action-danger {
    color: #e74a3b;
    border-color: #fecaca;
}

    .ap-action-danger:hover {
        background: #fef2f2;
    }
/* Modal */
.ap-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.45);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    animation: ap-fadeIn .2s;
}

@keyframes ap-fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.ap-modal {
    background: #fff;
    border-radius: 14px;
    width: 480px;
    max-width: 95vw;
    box-shadow: 0 20px 60px rgba(0,0,0,.15);
    animation: ap-slideUp .25s ease-out;
}

@keyframes ap-slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ap-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 24px 16px;
}

.ap-modal-title-area {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.ap-modal-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #eef2ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #4e73df;
    flex-shrink: 0;
}

.ap-modal-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
}

.ap-modal-subtitle {
    margin: 2px 0 0;
    font-size: 0.78rem;
    color: #94a3b8;
}

.ap-modal-close {
    background: none;
    border: none;
    font-size: 16px;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
}

    .ap-modal-close:hover {
        background: #f1f5f9;
        color: #1e293b;
    }

.ap-modal-body {
    padding: 0 24px 20px;
}

.ap-form-group {
    margin-bottom: 16px;
}

.ap-form-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}

.ap-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0 12px;
    transition: border-color .15s;
}

    .ap-input-wrap:focus-within {
        border-color: #4e73df;
        box-shadow: 0 0 0 3px rgba(78,115,223,.1);
    }

    .ap-input-wrap i {
        color: #94a3b8;
        font-size: 14px;
    }

.ap-input {
    border: none;
    outline: none;
    flex: 1;
    padding: 9px 0;
    font-size: 0.85rem;
    background: transparent;
    color: #1e293b;
}

.ap-textarea {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.85rem;
    color: #1e293b;
    resize: vertical;
    outline: none;
    transition: border-color .15s;
}

    .ap-textarea:focus {
        border-color: #4e73df;
        box-shadow: 0 0 0 3px rgba(78,115,223,.1);
    }
/* Toggle */
.ap-toggle-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.ap-toggle {
    width: 40px;
    height: 22px;
    background: #e2e8f0;
    border-radius: 12px;
    position: relative;
    transition: background .2s;
    cursor: pointer;
}

.ap-toggle-on {
    background: #4e73df;
}

.ap-toggle-knob {
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: left .2s;
    box-shadow: 0 1px 3px rgba(0,0,0,.15);
}

.ap-toggle-on .ap-toggle-knob {
    left: 20px;
}

.ap-toggle-label {
    font-size: 0.82rem;
    color: #475569;
    font-weight: 500;
}

.ap-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 24px;
    border-top: 1px solid #f1f5f9;
}

@media (max-width: 768px) {
    .ap-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .ap-grid {
        grid-template-columns: 1fr;
    }

    .ap-header {
        flex-direction: column;
        gap: 12px;
    }
}
/* === Pages/LivePreviewPage.razor.css === */
/* ===== PV: Preview Page Corporate ===== */
.pv-page {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: #f0f2f5;
}
/* Toolbar */
.pv-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 50px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.pv-toolbar-left, .pv-toolbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pv-toolbar-divider {
    width: 1px;
    height: 24px;
    background: #e2e8f0;
    margin: 0 6px;
}

.pv-toolbar-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pv-toolbar-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.pv-title-text {
    font-size: 0.88rem;
    font-weight: 600;
    color: #1e293b;
}
/* Tool buttons */
.pv-tool-btn {
    width: 34px;
    height: 34px;
    border: 1px solid transparent;
    background: transparent;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #64748b;
    cursor: pointer;
    transition: all .15s;
}

    .pv-tool-btn:hover {
        background: #f1f5f9;
        color: #1e293b;
    }

    .pv-tool-btn:disabled {
        opacity: .4;
        cursor: not-allowed;
    }

.pv-tool-active {
    background: #eef2ff;
    color: #4e73df;
    border-color: #c7d2fe;
}

.pv-tool-primary {
    color: #4e73df;
}

    .pv-tool-primary:hover {
        background: #eef2ff;
    }
/* Badges */
.pv-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}

.pv-badge-warn {
    background: #fff8e1;
    color: #e2a403;
}

.pv-badge-blue {
    background: #eef2ff;
    color: #4e73df;
}

.pv-badge-default {
    background: #f1f5f9;
    color: #64748b;
}
/* Breakpoint group */
.pv-breakpoint-group {
    display: flex;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    overflow: hidden;
}

.pv-bp-btn {
    width: 32px;
    height: 30px;
    border: none;
    background: #fff;
    color: #94a3b8;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
}

    .pv-bp-btn + .pv-bp-btn {
        border-left: 1px solid #e2e8f0;
    }

    .pv-bp-btn:hover {
        background: #f8fafc;
        color: #1e293b;
    }

.pv-bp-active {
    background: #4e73df;
    color: #fff;
}

    .pv-bp-active:hover {
        background: #3b5fc5;
        color: #fff;
    }
/* Main area */
.pv-main {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.pv-with-log {
    gap: 0;
}

.pv-canvas {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.pv-device-frame {
    transition: max-width 0.25s ease;
    margin: 0 auto;
}

.pv-form-area {
    max-width: 1200px;
    margin: 0 auto;
    background: #fff;
    padding: 28px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
/* Loading */
.pv-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 400px;
    color: #94a3b8;
}

.pv-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e2e8f0;
    border-top-color: #4e73df;
    border-radius: 50%;
    animation: pv-spin .7s linear infinite;
    margin-bottom: 14px;
}

@keyframes pv-spin {
    to {
        transform: rotate(360deg);
    }
}
/* No components */
.pv-no-components {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.pv-no-comp-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #cbd5e1;
    margin-bottom: 14px;
}

.pv-no-components p {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0 0 4px;
    font-weight: 500;
}

.pv-no-components span {
    font-size: 0.78rem;
    color: #94a3b8;
}
/* Alerts */
.pv-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 16px;
}

.pv-alert-success {
    background: #e8faf0;
    color: #0f7b4f;
    border: 1px solid #a7f3d0;
}

.pv-alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}
/* Event Log Panel */
.pv-log-panel {
    width: 380px;
    display: flex;
    flex-direction: column;
    background: #1e293b;
    color: #e2e8f0;
    border-left: 1px solid #334155;
    flex-shrink: 0;
}

.pv-log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #334155;
}

.pv-log-title {
    font-size: 0.82rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pv-log-clear {
    border: 1px solid #475569;
    background: transparent;
    color: #94a3b8;
    font-size: 0.72rem;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all .15s;
}

    .pv-log-clear:hover {
        background: #334155;
        color: #e74a3b;
        border-color: #e74a3b;
    }

.pv-log-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.75rem;
}

    .pv-log-content::-webkit-scrollbar {
        width: 4px;
    }

    .pv-log-content::-webkit-scrollbar-thumb {
        background: #475569;
        border-radius: 4px;
    }

.pv-log-item {
    padding: 6px 10px;
    margin-bottom: 4px;
    background: #0f172a;
    border-radius: 5px;
    border-left: 3px solid #4e73df;
}

    .pv-log-item code {
        color: #e2e8f0;
        background: transparent;
        font-size: 0.72rem;
    }

.pv-log-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    color: #64748b;
    font-size: 0.82rem;
}

    .pv-log-empty i {
        font-size: 24px;
        margin-bottom: 8px;
    }

    .pv-log-empty p {
        margin: 0;
    }

.pv-log-footer {
    padding: 10px 16px;
    border-top: 1px solid #334155;
    font-size: 0.7rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pv-form-auto-buttons {
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
    padding: 1rem 0;
    margin-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

@media (max-width: 768px) {
    .pv-with-log {
        flex-direction: column;
    }

    .pv-log-panel {
        width: 100%;
        height: 280px;
    }

    .pv-toolbar {
        padding: 0 12px;
        overflow-x: auto;
    }
}
/* === Pages/PageDesignerPage.razor.css === */
/* ═══════════════════════════════════════
       Page Designer – Corporate Theme
       ═══════════════════════════════════════ */

.page-designer {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: #f0f2f5;
    font-family: inherit;
}
/* ── Toolbar ── */
.designer-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    height: 48px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    gap: 12px;
    flex-shrink: 0;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.toolbar-page-info {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.toolbar-page-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.toolbar-page-type {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #64748b;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.toolbar-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}

    .toolbar-badge i {
        font-size: 0.5rem;
    }

.toolbar-badge-warn {
    background: #fef3c7;
    color: #92400e;
}

.toolbar-badge-primary {
    background: #dbeafe;
    color: #1e40af;
}

.toolbar-badge-success {
    background: #dcfce7;
    color: #166534;
}

.toolbar-center {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toolbar-btn-group {
    display: flex;
    gap: 2px;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 2px;
}

.toolbar-separator {
    width: 1px;
    height: 24px;
    background: #e2e8f0;
    margin: 0 4px;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
}
/* ── Toolbar Buttons ── */
.toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.12s ease;
    white-space: nowrap;
    line-height: 1.4;
}

.toolbar-btn-group .toolbar-btn {
    border: none;
    background: transparent;
    border-radius: 6px;
}

.toolbar-btn:hover:not(:disabled) {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #1e293b;
}

.toolbar-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.toolbar-btn-back {
    border: none;
    background: transparent;
    padding: 5px 8px;
    font-size: 1rem;
    color: #64748b;
}

    .toolbar-btn-back:hover:not(:disabled) {
        background: #f1f5f9;
        color: #1e293b;
    }

cursor: not-allowed;
}

.toolbar-btn i {
    font-size: 0.8rem;
}

.toolbar-btn-icon {
    padding: 5px 8px;
}

.toolbar-btn-primary {
    background: #4e73df;
    border-color: #4e73df;
    color: #fff;
}

    .toolbar-btn-primary:hover:not(:disabled) {
        background: #3b5ec2;
        border-color: #3b5ec2;
        color: #fff;
    }

.toolbar-btn-accent {
    background: transparent;
    border-color: #4e73df;
    color: #4e73df;
}

    .toolbar-btn-accent:hover:not(:disabled) {
        background: #4e73df;
        color: #fff;
    }

.toolbar-clip-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    background: #4e73df;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0 4px;
}
/* ── Main Layout ── */
.designer-main {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.designer-panel {
    background: #fff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.toolbox-panel {
    min-width: 250px;
    max-width: 600px;
    flex-shrink: 0;
    border-right: 1px solid #e2e8f0;
}

.canvas-panel {
    background: #f0f2f5;
    flex: 1;
    min-width: 400px;
}

.properties-panel {
    position: relative;
    min-width: 280px;
    max-width: 600px;
    flex-shrink: 0;
    border-left: 1px solid #e2e8f0;
}
/* ── Resize Handles ── */
.resize-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4px;
    cursor: ew-resize;
    background: transparent;
    z-index: 100;
    transition: background-color 0.15s;
}

    .resize-handle:hover {
        background: rgba(78, 115, 223, 0.25);
    }

    .resize-handle:active {
        background: rgba(78, 115, 223, 0.45);
    }

.resize-handle-right {
    right: -2px;
}

.resize-handle-left {
    left: -2px;
}
/* ── Left Panel Tabs ── */
.toolbox-tabs {
    display: flex;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 0;
    flex-shrink: 0;
}

.dtab {
    flex: 1;
    padding: 10px 4px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #94a3b8;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
}

    .dtab:hover {
        color: #475569;
        background: #f1f5f9;
    }

    .dtab.active {
        color: #4e73df;
        border-bottom-color: #4e73df;
        font-weight: 600;
        background: #fff;
    }

.toolbox-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
/* ── Right Panel Tabs ── */
.panel-tabs-right {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
    border-left: 1px solid #e2e8f0;
    z-index: 10;
}

.dtab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s ease;
    border-right: 2px solid transparent;
    border-bottom: 1px solid #f1f5f9;
}

    .dtab-icon:last-child {
        border-bottom: none;
    }

    .dtab-icon:hover {
        color: #475569;
        background: #f1f5f9;
    }

    .dtab-icon.active {
        color: #4e73df;
        background: #fff;
        border-right-color: #4e73df;
    }
/* === Pages/PagesListPage.razor.css === */
/* ===== PL: Pages List Corporate ===== */
.pl-container {
    padding: 0;
}

.pl-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.pl-header-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pl-header-right {
    flex-shrink: 0;
}

.pl-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.pl-subtitle {
    font-size: 0.85rem;
    color: #64748b;
}
/* Stats */
.pl-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.pl-stat-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.pl-stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.pl-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    display: block;
    line-height: 1.1;
}

.pl-stat-label {
    font-size: 0.7rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 600;
}
/* Buttons */
.pl-btn {
    border: none;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 9px 18px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all .15s;
}

.pl-btn-primary {
    background: #4e73df;
    color: #fff;
}

    .pl-btn-primary:hover {
        background: #3b5fc5;
    }

.pl-btn-lg {
    padding: 12px 28px;
    font-size: 0.9rem;
}
/* Loading */
.pl-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 350px;
    color: #94a3b8;
}

.pl-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e2e8f0;
    border-top-color: #4e73df;
    border-radius: 50%;
    animation: pl-spin .7s linear infinite;
    margin-bottom: 14px;
}

@keyframes pl-spin {
    to {
        transform: rotate(360deg);
    }
}
/* Empty */
.pl-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
}

.pl-empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #cbd5e1;
    margin-bottom: 18px;
}

.pl-empty h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
}

.pl-empty p {
    color: #94a3b8;
    font-size: 0.85rem;
    margin-bottom: 20px;
}
/* Grid */
.pl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}
/* Card */
.pl-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    transition: all .2s;
    border-left: 4px solid #e2e8f0;
}

    .pl-card:hover {
        border-color: #cbd5e1;
        box-shadow: 0 4px 16px rgba(0,0,0,.06);
        transform: translateY(-2px);
    }

.pl-card-published {
    border-left-color: #1cc88a;
}

.pl-card-draft {
    border-left-color: #f6c23e;
}

.pl-card-head {
    padding: 18px 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pl-card-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pl-card-name {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
}
/* Tags */
.pl-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}

.pl-tag-success {
    background: #e8faf0;
    color: #1cc88a;
}

.pl-tag-warn {
    background: #fff8e1;
    color: #e2a403;
}

.pl-type-badge {
    font-size: 0.68rem;
    font-weight: 600;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 2px 10px;
    border-radius: 12px;
    width: fit-content;
}

.pl-card-body {
    padding: 0 20px 16px;
    flex: 1;
}

.pl-card-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
}

.pl-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: #94a3b8;
}

    .pl-meta-item i {
        font-size: 12px;
    }

.pl-card-desc {
    font-size: 0.8rem;
    color: #64748b;
    margin: 8px 0 0;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
}
/* Actions */
.pl-card-actions {
    padding: 12px 20px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    gap: 6px;
}

.pl-action-btn {
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 7px;
    font-size: 0.78rem;
    font-weight: 500;
    color: #64748b;
    padding: 7px 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all .15s;
}

    .pl-action-btn:hover {
        background: #f8fafc;
        color: #1e293b;
        border-color: #cbd5e1;
    }

.pl-action-primary {
    color: #4e73df;
    border-color: #c7d2fe;
    flex: 1;
    justify-content: center;
}

    .pl-action-primary:hover {
        background: #eef2ff;
    }

.pl-action-danger {
    color: #e74a3b;
    border-color: #fecaca;
}

    .pl-action-danger:hover {
        background: #fef2f2;
    }

@media (max-width: 768px) {
    .pl-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .pl-grid {
        grid-template-columns: 1fr;
    }

    .pl-header {
        flex-direction: column;
        gap: 12px;
    }
}
/* === Pages/WorkflowDesignerPage.razor.css === */
.wd-root {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: #f0f2f5;
    overflow: hidden;
}
/* Toolbar */
.wd-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    height: 48px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
    z-index: 10;
}

.wd-toolbar-left, .wd-toolbar-center, .wd-toolbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.wd-toolbar-name {
    font-size: .88rem;
    font-weight: 600;
    color: #1e293b;
}

.wd-unsaved {
    color: #f59e0b;
    font-size: 1.2rem;
    line-height: 1;
}

.wd-toolbar-btn {
    border: none;
    background: transparent;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #64748b;
    cursor: pointer;
}

    .wd-toolbar-btn:hover {
        background: #f1f5f9;
        color: #1e293b;
    }

    .wd-toolbar-btn:disabled {
        opacity: .35;
        cursor: not-allowed;
    }

.wd-toolbar-btn-save {
    background: #4e73df;
    color: #fff;
    width: auto;
    padding: 0 14px;
    gap: 5px;
    font-size: .78rem;
    font-weight: 600;
}

    .wd-toolbar-btn-save:hover {
        background: #3b5fc5;
        color: #fff;
    }

.wd-toolbar-sep {
    width: 1px;
    height: 20px;
    background: #e2e8f0;
    margin: 0 4px;
}

.wd-zoom-label {
    font-size: .72rem;
    color: #94a3b8;
    min-width: 36px;
    text-align: center;
}
/* Body */
.wd-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}
/* Palette */
.wd-palette {
    width: 220px;
    background: #fff;
    border-right: 1px solid #e2e8f0;
    overflow-y: auto;
    flex-shrink: 0;
    padding: 0;
}

    .wd-palette::-webkit-scrollbar {
        width: 4px;
    }

    .wd-palette::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 4px;
    }

.wd-palette-title {
    font-size: .72rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 14px 14px 8px;
}

.wd-palette-section {
    padding: 0 8px 4px;
}

.wd-palette-section-title {
    font-size: .64rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .4px;
    padding: 8px 6px 4px;
}

.wd-palette-section-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    border: none;
    background: transparent;
    padding: 6px 6px 4px;
    cursor: pointer;
    font-size: .64rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .4px;
}

    .wd-palette-section-toggle:hover {
        color: #475569;
    }

    .wd-palette-section-toggle i {
        font-size: .6rem;
    }

.wd-palette-section-body {
}

.wd-palette-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    border: none;
    background: transparent;
    padding: 7px 10px;
    border-radius: 6px;
    font-size: .76rem;
    color: #334155;
    cursor: pointer;
    text-align: left;
}

    .wd-palette-item:hover {
        background: #f1f5f9;
    }

/* AI Assistant panel inside palette */
.wd-ai-section {
    border-top: 1px solid #e2e8f0;
    margin-top: 4px;
}

.wd-ai-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    border: none;
    background: transparent;
    padding: 10px 14px;
    cursor: pointer;
    font-size: .72rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: .4px;
}

    .wd-ai-toggle:hover {
        background: #f8fafc;
    }

    .wd-ai-toggle span:first-child {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .wd-ai-toggle i.bi-chevron-up,
    .wd-ai-toggle i.bi-chevron-down {
        font-size: .6rem;
        color: #94a3b8;
    }

.wd-ai-body {
    padding: 0 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wd-ai-input {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: .78rem;
    color: #1e293b;
    resize: vertical;
    outline: none;
    font-family: inherit;
    min-height: 60px;
    transition: border-color .15s;
}

    .wd-ai-input:focus {
        border-color: #818cf8;
        box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.12);
    }

    .wd-ai-input::placeholder {
        color: #94a3b8;
    }

.wd-ai-generate-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    transition: all .2s;
}

    .wd-ai-generate-btn:hover:not(:disabled) {
        box-shadow: 0 3px 10px rgba(102, 126, 234, 0.35);
        transform: translateY(-1px);
    }

    .wd-ai-generate-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }

.wd-ai-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: wd-ai-spin .6s linear infinite;
}

@keyframes wd-ai-spin {
    to { transform: rotate(360deg); }
}

.wd-ai-msg {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: .75rem;
    font-weight: 500;
}

.wd-ai-msg-ok {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.wd-ai-msg-err {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Variables panel inside palette */
.wd-vars-section {
    border-top: 1px solid #e2e8f0;
    margin-top: 4px;
}

.wd-vars-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    border: none;
    background: transparent;
    padding: 10px 14px;
    cursor: pointer;
    font-size: .72rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: .4px;
}

    .wd-vars-toggle:hover {
        background: #f8fafc;
    }

    .wd-vars-toggle span:first-child {
        display: flex;
        align-items: center;
        gap: 6px;
    }

.wd-vars-count {
    background: #e2e8f0;
    color: #475569;
    font-size: .6rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    margin-left: auto;
}

.wd-vars-chevron {
    font-size: .6rem;
    color: #94a3b8;
}

.wd-vars-body {
    padding: 0 10px 10px;
}

.wd-vars-list {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}

.wd-vars-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 8px;
    border-bottom: 1px solid #f1f5f9;
    background: #fff;
}

    .wd-vars-item:last-child {
        border-bottom: none;
    }

    .wd-vars-item:hover {
        background: #f8fafc;
    }

.wd-vars-item-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    flex: 1;
}

.wd-vars-item-name {
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
    font-size: .66rem;
    color: #4e73df;
    font-weight: 600;
    word-break: break-all;
}

.wd-vars-item-val {
    font-size: .6rem;
    color: #94a3b8;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wd-vars-item-del {
    border: none;
    background: transparent;
    color: #cbd5e1;
    cursor: pointer;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: .72rem;
}

    .wd-vars-item-del:hover {
        background: #fee2e2;
        color: #ef4444;
    }

.wd-vars-add {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 6px;
}

.wd-vars-add-row {
    display: flex;
    gap: 4px;
}

.wd-vars-input {
    flex: 1;
    padding: 5px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    font-size: .68rem;
    color: #1e293b;
    outline: none;
    min-width: 0;
}

    .wd-vars-input:focus {
        border-color: #4e73df;
    }

.wd-vars-input-full {
    flex: 1;
}

.wd-vars-select {
    width: 80px;
    padding: 5px 4px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    font-size: .66rem;
    color: #475569;
    outline: none;
    background: #fff;
}

    .wd-vars-select:focus {
        border-color: #4e73df;
    }

.wd-vars-add-btn {
    border: none;
    background: #4e73df;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .74rem;
    flex-shrink: 0;
}

    .wd-vars-add-btn:hover {
        background: #3b5fc5;
    }

    .wd-vars-add-btn:disabled {
        background: #cbd5e1;
        cursor: not-allowed;
    }

.wd-vars-empty {
    font-size: .64rem;
    color: #94a3b8;
    padding: 8px;
    text-align: center;
}

    .wd-vars-empty i {
        margin-right: 3px;
    }

.wd-vars-hint {
    font-size: .6rem;
    color: #94a3b8;
    line-height: 1.3;
    padding: 4px 0;
    display: flex;
    align-items: flex-start;
    gap: 4px;
}

    .wd-vars-hint i {
        flex-shrink: 0;
        margin-top: 1px;
        font-size: .56rem;
    }
/* Canvas */
.wd-canvas-wrap {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #f8fafc;
    cursor: grab;
}

    .wd-canvas-wrap:active {
        cursor: grabbing;
    }

.wd-canvas-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform-origin: 0 0;
    pointer-events: none;
    z-index: 1;
    overflow: visible;
}

.wd-conn-label {
    font-size: 11px;
    fill: #64748b;
    text-anchor: middle;
    pointer-events: none;
}

.wd-connection {
    cursor: pointer;
}

    .wd-connection:hover path:nth-child(2) {
        stroke: #4e73df !important;
        stroke-width: 3 !important;
    }

    .wd-connection:hover polygon {
        fill: #4e73df !important;
    }
/* Nodes layer */
.wd-nodes-layer {
    position: absolute;
    inset: 0;
    transform-origin: 0 0;
    pointer-events: none;
    z-index: 2;
}

.wd-node {
    position: absolute;
    width: 180px;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    pointer-events: all;
    cursor: move;
    user-select: none;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    transition: box-shadow .15s;
}

    .wd-node:hover {
        box-shadow: 0 4px 12px rgba(0,0,0,.1);
    }

.wd-node-selected {
    box-shadow: 0 0 0 3px rgba(78,115,223,.25), 0 4px 12px rgba(0,0,0,.1);
}

.wd-node-color-bar {
    height: 4px;
    border-radius: 8px 8px 0 0;
}

.wd-node-body {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
}

.wd-node-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.wd-node-name {
    display: block;
    font-size: .78rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.2;
}

.wd-node-type {
    display: block;
    font-size: .62rem;
    color: #94a3b8;
}
/* Ports — large hit area (36px) with small visual circle (14px) */
.wd-port {
    position: absolute;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: crosshair;
    pointer-events: all;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .wd-port::before {
        content: '';
        width: 14px;
        height: 14px;
        border-radius: 50%;
        background: #fff;
        border: 2px solid #94a3b8;
        transition: all .15s ease;
        flex-shrink: 0;
    }

    .wd-port:hover::before {
        background: #4e73df;
        border-color: #4e73df;
        transform: scale(1.3);
    }

.wd-port-out {
    bottom: -18px;
    left: 50%;
    margin-left: -18px;
}

.wd-port-in {
    top: -18px;
    left: 50%;
    margin-left: -18px;
}

.wd-port-in-active::before {
    background: #dbeafe;
    border-color: #4e73df;
    animation: wd-port-pulse 1s ease-in-out infinite;
}
/* Condition node: dual output ports (True / False) */
.wd-port-cond-true, .wd-port-cond-false {
    position: absolute;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: crosshair;
    pointer-events: all;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    bottom: -16px;
}

.wd-port-cond-true {
    left: 28%;
    margin-left: -16px;
}

.wd-port-cond-false {
    left: 72%;
    margin-left: -16px;
}

.wd-port-cond-true::before {
    content: '';
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #d1fae5;
    border: 2px solid #10b981;
    transition: all .15s ease;
    flex-shrink: 0;
}

.wd-port-cond-false::before {
    content: '';
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fee2e2;
    border: 2px solid #ef4444;
    transition: all .15s ease;
    flex-shrink: 0;
}

.wd-port-cond-true:hover::before {
    background: #10b981;
    border-color: #059669;
    transform: scale(1.3);
}

.wd-port-cond-false:hover::before {
    background: #ef4444;
    border-color: #dc2626;
    transform: scale(1.3);
}

/* WaitApproval node: dual output ports (Approved / Rejected) */
.wd-port-approved, .wd-port-rejected {
    position: absolute;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: crosshair;
    pointer-events: all;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    bottom: -16px;
}

.wd-port-approved {
    left: 28%;
    margin-left: -16px;
}

.wd-port-rejected {
    left: 72%;
    margin-left: -16px;
}

.wd-port-approved::before {
    content: '';
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #d1fae5;
    border: 2px solid #10b981;
    transition: all .15s ease;
    flex-shrink: 0;
}

.wd-port-rejected::before {
    content: '';
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fee2e2;
    border: 2px solid #ef4444;
    transition: all .15s ease;
    flex-shrink: 0;
}

.wd-port-approved:hover::before {
    background: #10b981;
    border-color: #059669;
    transform: scale(1.3);
}

.wd-port-rejected:hover::before {
    background: #ef4444;
    border-color: #dc2626;
    transform: scale(1.3);
}

.wd-port-label {
    position: absolute;
    bottom: -16px;
    font-size: .56rem;
    font-weight: 700;
    white-space: nowrap;
    pointer-events: none;
}

.wd-port-label-true {
    color: #10b981;
}

.wd-port-label-false {
    color: #ef4444;
}
/* Node drop target highlight during connection */
.wd-node-drop-target {
    border-color: #93c5fd !important;
    box-shadow: 0 0 0 3px rgba(78,115,223,.15) !important;
}

    .wd-node-drop-target .wd-port-in::before {
        background: #4e73df;
        border-color: #3b5fc5;
        transform: scale(1.4);
    }

@keyframes wd-port-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(78,115,223,.4);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(78,115,223,0);
    }
}
/* Properties panel */
.wd-props {
    width: 0;
    background: #fff;
    border-left: 1px solid #e2e8f0;
    overflow-y: auto;
    overflow-x: hidden;
    transition: width .2s;
    flex-shrink: 0;
    position: relative;
}

.wd-props-open {
    width: 280px;
}

.wd-props-resize-handle {
    width: 5px;
    cursor: col-resize;
    background: transparent;
    flex-shrink: 0;
    position: relative;
    z-index: 12;
    margin-right: -2px;
    transition: background .15s;
}

    .wd-props-resize-handle:hover,
    .wd-props-resize-handle:active {
        background: #4e73df;
    }

.wd-props::-webkit-scrollbar {
    width: 4px;
}

.wd-props::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.wd-props-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.wd-props-title {
    font-size: .78rem;
    font-weight: 600;
    color: #334155;
}

.wd-props-close {
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    width: 24px;
    height: 24px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .wd-props-close:hover {
        background: #fee2e2;
        color: #dc2626;
    }

.wd-props-body {
    padding: 14px;
}

.wd-props-field {
    margin-bottom: 12px;
}

    .wd-props-field label {
        display: block;
        font-size: .7rem;
        font-weight: 500;
        color: #475569;
        margin-bottom: 4px;
    }

    .wd-props-field input, .wd-props-field textarea, .wd-props-field select {
        width: 100%;
        padding: 6px 10px;
        border: 1px solid #e2e8f0;
        border-radius: 6px;
        font-size: .78rem;
        color: #1e293b;
        outline: none;
        background: #fff;
    }

        .wd-props-field input:focus, .wd-props-field textarea:focus, .wd-props-field select:focus {
            border-color: #4e73df;
        }

    .wd-props-field textarea {
        resize: vertical;
    }

.wd-props-readonly {
    font-size: .78rem;
    color: #94a3b8;
    padding: 6px 0;
}

.wd-props-pos {
    display: flex;
    gap: 12px;
    font-size: .74rem;
    color: #64748b;
}

.wd-props-section {
    font-size: .68rem;
    font-weight: 700;
    color: #4e73df;
    text-transform: uppercase;
    letter-spacing: .4px;
    padding: 10px 0 6px;
    border-top: 1px solid #f1f5f9;
    margin-top: 8px;
}

.wd-props-danger {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}

.wd-btn-delete-node {
    width: 100%;
    padding: 7px;
    border: 1px solid #fecaca;
    border-radius: 6px;
    background: #fff;
    color: #e74a3b;
    font-size: .74rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

    .wd-btn-delete-node:hover {
        background: #fef2f2;
    }
/* Node Parameters (Input/Output) in properties panel */
.wd-params-list {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 6px;
}

.wd-params-item {
    padding: 6px 8px;
    border-bottom: 1px solid #f1f5f9;
    background: #fff;
}

    .wd-params-item:last-child {
        border-bottom: none;
    }

.wd-params-item-top {
    display: flex;
    align-items: center;
    gap: 6px;
}

    .wd-params-item-top code {
        font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
        font-size: .66rem;
        color: #4e73df;
        font-weight: 600;
        flex: 1;
        word-break: break-all;
    }

.wd-params-type {
    font-size: .58rem;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 1px 5px;
    border-radius: 3px;
    white-space: nowrap;
}

.wd-params-item-source {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

    .wd-params-item-source label {
        font-size: .58rem;
        color: #94a3b8;
        white-space: nowrap;
        min-width: 38px;
    }

    .wd-params-item-source input {
        flex: 1;
        padding: 3px 6px;
        border: 1px solid #e2e8f0;
        border-radius: 4px;
        font-size: .64rem;
        color: #1e293b;
        outline: none;
        font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
    }

        .wd-params-item-source input:focus {
            border-color: #4e73df;
        }

.wd-params-add {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}
/* Form field inline edit controls */
.wd-form-edit-type {
    font-size: .62rem;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 1px 4px;
    outline: none;
    cursor: pointer;
}

    .wd-form-edit-type:focus {
        border-color: #d946ef;
    }

.wd-form-edit-req {
    display: flex;
    align-items: center;
    gap: 2px;
    cursor: pointer;
    font-size: .7rem;
    color: #ef4444;
}

    .wd-form-edit-req input[type="checkbox"] {
        width: 13px;
        height: 13px;
        accent-color: #ef4444;
        cursor: pointer;
    }

    .wd-form-edit-req span {
        font-weight: 700;
    }

.wd-form-edit-label {
    flex: 1;
    padding: 3px 6px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: .72rem;
    color: #1e293b;
    outline: none;
    background: #fff;
}

    .wd-form-edit-label:focus {
        border-color: #d946ef;
    }

    .wd-form-edit-label::placeholder {
        color: #cbd5e1;
    }

.wd-props-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #94a3b8;
    text-align: center;
}

    .wd-props-empty i {
        font-size: 32px;
        margin-bottom: 10px;
    }

    .wd-props-empty p {
        font-size: .76rem;
        margin: 0;
    }

.wd-code-input {
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
    font-size: .72rem !important;
    line-height: 1.5;
    background: #f8fafc !important;
}

.wd-props-hint {
    font-size: .66rem;
    color: #64748b;
    margin-top: 4px;
    line-height: 1.4;
    display: flex;
    gap: 6px;
    align-items: flex-start;
}

    .wd-props-hint i {
        flex-shrink: 0;
        margin-top: 1px;
    }

    .wd-props-hint code {
        background: #f1f5f9;
        padding: 1px 4px;
        border-radius: 3px;
        font-size: .64rem;
        font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
    }

.wd-props-hint-warn {
    color: #b45309;
    background: #fffbeb;
    padding: 6px 8px;
    border-radius: 5px;
    border: 1px solid #fde68a;
}

    .wd-props-hint-warn i {
        margin-right: 3px;
    }

    .wd-props-hint-warn a {
        color: #4e73df;
        text-decoration: underline;
        margin-left: 4px;
        font-weight: 500;
    }

.wd-props-varlist {
    max-height: 180px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #f8fafc;
}

.wd-props-varitem {
    display: flex;
    gap: 6px;
    align-items: baseline;
    padding: 4px 8px;
    font-size: .66rem;
    color: #475569;
    border-bottom: 1px solid #f1f5f9;
}

    .wd-props-varitem:last-child {
        border-bottom: none;
    }

    .wd-props-varitem code {
        font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
        color: #4e73df;
        font-size: .64rem;
    }

    .wd-props-varitem span {
        color: #64748b;
        word-break: break-all;
    }
/* Toolbar — Test buttons */
.wd-toolbar-btn-test {
    background: #10b981;
    color: #fff;
    width: auto;
    padding: 0 14px;
    gap: 5px;
    font-size: .78rem;
    font-weight: 600;
}

    .wd-toolbar-btn-test:hover {
        background: #059669;
        color: #fff;
    }

.wd-toolbar-btn-stop {
    background: #ef4444;
    color: #fff;
    width: auto;
    padding: 0 14px;
    gap: 5px;
    font-size: .78rem;
    font-weight: 600;
}

    .wd-toolbar-btn-stop:hover {
        background: #dc2626;
        color: #fff;
    }
/* Node test status highlights */
.wd-node-test-running {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59,130,246,.3), 0 4px 12px rgba(0,0,0,.1) !important;
    animation: wd-test-pulse 1.2s ease-in-out infinite;
}

.wd-node-test-ok {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16,185,129,.25) !important;
}

.wd-node-test-fail {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239,68,68,.25) !important;
}

.wd-node-test-skip {
    opacity: .5;
}

.wd-node-test-wait {
    border-color: #f59e0b !important;
    box-shadow: 0 0 0 3px rgba(245,158,11,.25) !important;
    animation: wd-test-pulse 1.5s ease-in-out infinite;
}

@keyframes wd-test-pulse {
    0%, 100% {
        box-shadow: 0 0 0 3px rgba(59,130,246,.3);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(59,130,246,.1);
    }
}
/* Node badges */
.wd-node-badge {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
    margin-left: auto;
}

.wd-badge-running {
    background: #dbeafe;
    color: #2563eb;
    animation: wd-spin .8s linear infinite;
}

.wd-badge-ok {
    background: #d1fae5;
    color: #059669;
}

.wd-badge-fail {
    background: #fee2e2;
    color: #dc2626;
}

.wd-badge-wait {
    background: #fef3c7;
    color: #d97706;
}

@keyframes wd-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}
/* Test Panel */
.wd-test-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    background: #1e293b;
    border-top: 2px solid #334155;
    display: flex;
    flex-direction: column;
    max-height: 42px;
    transition: max-height .2s ease;
}

    .wd-test-panel.wd-test-expanded {
        max-height: 260px;
    }

.wd-test-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    cursor: pointer;
    flex-shrink: 0;
}

    .wd-test-header:hover {
        background: #334155;
    }

.wd-test-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    font-size: .76rem;
}

    .wd-test-header-left i {
        font-size: 14px;
    }

.wd-test-title {
    font-weight: 600;
    color: #e2e8f0;
}

.wd-test-header-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.wd-test-chevron {
    color: #64748b;
    font-size: 12px;
}

.wd-test-badge {
    font-size: .64rem;
    font-weight: 600;
    padding: 1px 8px;
    border-radius: 10px;
}

.wd-test-badge-running {
    background: #1e40af;
    color: #93c5fd;
    animation: wd-test-blink 1s ease-in-out infinite;
}

.wd-test-badge-ok {
    background: #065f46;
    color: #6ee7b7;
}

.wd-test-badge-fail {
    background: #7f1d1d;
    color: #fca5a5;
}

@keyframes wd-test-blink {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: .5;
    }
}

.wd-test-btn {
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    width: 26px;
    height: 26px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

    .wd-test-btn:hover {
        background: #475569;
        color: #e2e8f0;
    }

.wd-test-body {
    flex: 1;
    overflow-y: auto;
    padding: 4px 14px 10px;
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
}

    .wd-test-body::-webkit-scrollbar {
        width: 4px;
    }

    .wd-test-body::-webkit-scrollbar-thumb {
        background: #475569;
        border-radius: 4px;
    }

.wd-test-entry {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 2px 0;
    font-size: .72rem;
    line-height: 1.5;
}

.wd-test-time {
    color: #475569;
    flex-shrink: 0;
    min-width: 80px;
}

.wd-test-icon {
    flex-shrink: 0;
    width: 14px;
    text-align: center;
}

.wd-test-msg {
    color: #cbd5e1;
}

.wd-test-info .wd-test-icon {
    color: #60a5fa;
}

.wd-test-ok .wd-test-icon {
    color: #34d399;
}

.wd-test-ok .wd-test-msg {
    color: #34d399;
}

.wd-test-warn .wd-test-icon {
    color: #fbbf24;
}

.wd-test-warn .wd-test-msg {
    color: #fbbf24;
}

.wd-test-error .wd-test-icon {
    color: #f87171;
}

.wd-test-error .wd-test-msg {
    color: #f87171;
}

.wd-test-step .wd-test-icon {
    color: #818cf8;
}

.wd-test-step .wd-test-msg {
    color: #e2e8f0;
    font-weight: 600;
}
/* Condition choice UI */
.wd-test-choice {
    margin: 8px 0;
    padding: 10px 14px;
    background: #334155;
    border-radius: 8px;
    border: 1px solid #475569;
}

.wd-test-choice-title {
    font-size: .74rem;
    color: #e2e8f0;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

    .wd-test-choice-title i {
        color: #fbbf24;
    }

.wd-test-choice-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.wd-test-choice-btn {
    padding: 6px 16px;
    border: 1px solid #4e73df;
    border-radius: 6px;
    background: transparent;
    color: #93c5fd;
    font-size: .74rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
}

    .wd-test-choice-btn:hover {
        background: #4e73df;
        color: #fff;
    }
/* Approval choice UI */
.wd-test-approval {
    margin: 8px 0;
    padding: 12px 14px;
    background: linear-gradient(135deg, #1e3a5f 0%, #1e293b 100%);
    border-radius: 8px;
    border: 1px solid #3b82f6;
    animation: wd-approval-pulse 2s ease-in-out infinite;
}

@keyframes wd-approval-pulse {
    0%, 100% {
        border-color: #3b82f6;
        box-shadow: 0 0 0 0 rgba(59,130,246,0);
    }

    50% {
        border-color: #60a5fa;
        box-shadow: 0 0 12px 0 rgba(59,130,246,.25);
    }
}

.wd-test-approval-title {
    font-size: .78rem;
    color: #e2e8f0;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

    .wd-test-approval-title i {
        color: #fbbf24;
        font-size: 1rem;
    }

.wd-test-approval-role {
    display: inline-block;
    padding: 1px 8px;
    background: #334155;
    border-radius: 10px;
    font-size: .68rem;
    color: #93c5fd;
    border: 1px solid #475569;
    margin-left: 4px;
}

.wd-test-approval-buttons {
    display: flex;
    gap: 10px;
}

.wd-test-approval-btn {
    flex: 1;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: .8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

    .wd-test-approval-btn.wd-approve {
        background: #059669;
        color: #fff;
    }

        .wd-test-approval-btn.wd-approve:hover {
            background: #10b981;
            box-shadow: 0 2px 8px rgba(5,150,105,.4);
        }

    .wd-test-approval-btn.wd-reject {
        background: #dc2626;
        color: #fff;
    }

        .wd-test-approval-btn.wd-reject:hover {
            background: #ef4444;
            box-shadow: 0 2px 8px rgba(220,38,38,.4);
        }
/* UserForm test panel */
.wd-test-form-fields {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.wd-test-form-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.wd-test-form-label {
    font-size: 0.78rem;
    color: #cbd5e1;
    font-weight: 500;
}

.wd-test-form-input {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 6px;
    padding: 6px 10px;
    color: #e2e8f0;
    font-size: 0.82rem;
    outline: none;
    transition: border-color .15s;
}

    .wd-test-form-input:focus {
        border-color: #d946ef;
    }
/* Test panel DataGrid preview */
.wd-test-grid-preview {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 6px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-x: auto;
}

.wd-test-grid-header {
    display: flex;
    gap: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid #334155;
}

.wd-test-grid-th {
    flex: 1;
    font-size: 0.7rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    min-width: 80px;
}

.wd-test-grid-row {
    display: flex;
    gap: 6px;
    padding-top: 4px;
}

.wd-test-grid-cell {
    flex: 1;
    min-width: 80px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 4px;
    padding: 4px 8px;
    color: #e2e8f0;
    font-size: 0.78rem;
    outline: none;
    transition: border-color .15s;
}

    .wd-test-grid-cell:focus {
        border-color: #7c3aed;
    }

.wd-test-grid-hint {
    font-size: 0.68rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 4px;
    padding-top: 4px;
}
/* UserForm field add (properties panel) */
.wd-form-field-add {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wd-form-field-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.wd-form-field-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.wd-form-field-col-auto {
    display: flex;
    flex-direction: column;
    gap: 2px;
    justify-content: flex-end;
}

.wd-form-field-lbl {
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.wd-form-field-input {
    width: 100%;
    padding: 5px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.78rem;
    color: #334155;
    background: #fff;
    outline: none;
    transition: border-color .15s;
}

    .wd-form-field-input:focus {
        border-color: #d946ef;
    }

.wd-form-field-add-btn {
    padding: 5px 12px;
    background: #d946ef;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: background .15s;
}

    .wd-form-field-add-btn:hover {
        background: #c026d3;
    }

    .wd-form-field-add-btn:disabled {
        background: #cbd5e1;
        cursor: not-allowed;
    }
/* DataGrid column editor */
.wd-grid-cols {
    margin-top: 6px;
    padding: 8px;
    background: #f1f5f9;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wd-grid-cols-header {
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 4px;
}

.wd-grid-col-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px 6px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    font-size: 0.75rem;
}

.wd-grid-col-header {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.wd-grid-col-item code {
    font-size: 0.72rem;
    color: #7c3aed;
    font-weight: 600;
}

.wd-grid-col-edit-btn {
    padding: 0 4px;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.68rem;
    margin-left: auto;
}

    .wd-grid-col-edit-btn:hover {
        color: #3b82f6;
    }

.wd-grid-col-edit-form {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    padding: 4px 0 2px;
    border-top: 1px dashed #e2e8f0;
    margin-top: 2px;
}

.wd-grid-col-edit-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

    .wd-grid-col-edit-row label {
        font-size: 0.66rem;
        color: #94a3b8;
        min-width: 36px;
        font-weight: 500;
    }

.wd-grid-col-edit-input {
    flex: 1;
    padding: 2px 6px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 0.7rem;
    color: #334155;
    background: #f8fafc;
    outline: none;
}

    .wd-grid-col-edit-input:focus {
        border-color: #7c3aed;
        background: #fff;
    }

.wd-grid-col-add {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
}

.wd-grid-col-input {
    flex: 1;
    min-width: 0;
    padding: 3px 6px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 0.72rem;
    color: #334155;
    background: #fff;
    outline: none;
}

    .wd-grid-col-input:focus {
        border-color: #7c3aed;
    }

.wd-grid-col-select {
    flex: 0 0 auto;
    min-width: 60px;
}

.wd-grid-col-add-btn {
    padding: 3px 8px;
    background: #7c3aed;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.72rem;
    cursor: pointer;
    display: flex;
    align-items: center;
}

    .wd-grid-col-add-btn:hover {
        background: #6d28d9;
    }

    .wd-grid-col-add-btn:disabled {
        background: #cbd5e1;
        cursor: not-allowed;
    }
/* Formula column styles */
.wd-grid-col-formula {
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
}

.wd-grid-formula-row {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    width: 100%;
}

.wd-grid-formula-input {
    flex: 1;
    padding: 3px 6px;
    border: 1px solid #fde68a;
    border-radius: 4px;
    font-size: 0.7rem;
    color: #92400e;
    background: #fffbeb;
    outline: none;
    font-family: 'Cascadia Code', 'Fira Code', monospace;
}

    .wd-grid-formula-input:focus {
        border-color: #f59e0b;
    }

    .wd-grid-formula-input::placeholder {
        color: #d97706;
        opacity: 0.5;
    }

.wd-grid-formula-add {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    background: #fffbeb;
    border: 1px dashed #fde68a;
    border-radius: 4px;
    margin-top: 4px;
}

.wd-test-grid-th-formula {
    color: #f59e0b !important;
}

.wd-test-grid-cell-formula {
    background: #1a1405 !important;
    border-color: #f59e0b44 !important;
    color: #fbbf24 !important;
    font-weight: 600;
    cursor: default;
}
/* Popup Select - Properties Panel Config */
.wd-popup-config {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    padding: 6px 8px;
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wd-popup-config-header {
    font-size: 0.7rem;
    font-weight: 600;
    color: #0369a1;
    display: flex;
    align-items: center;
    gap: 4px;
}

.wd-popup-config-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

    .wd-popup-config-row label {
        font-size: 0.62rem;
        color: #64748b;
        min-width: 55px;
        white-space: nowrap;
    }

.wd-popup-config-input {
    flex: 1;
    padding: 2px 6px;
    border: 1px solid #bae6fd;
    border-radius: 4px;
    font-size: 0.68rem;
    color: #0c4a6e;
    background: #fff;
    outline: none;
    min-width: 0;
}

    .wd-popup-config-input:focus {
        border-color: #0ea5e9;
    }

.wd-grid-col-popup {
    background: #f0f9ff;
    border-left: 3px solid #0ea5e9;
}
/* Popup Select - Test Panel Input Group */
.wd-popup-input-group {
    display: flex;
    align-items: center;
    gap: 0;
}

.wd-popup-text {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    cursor: pointer;
    flex: 1;
}

.wd-popup-open-btn {
    padding: 6px 10px;
    background: #0ea5e9;
    color: #fff;
    border: 1px solid #0ea5e9;
    border-left: none;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
}

    .wd-popup-open-btn:hover {
        background: #0284c7;
    }

.wd-popup-clear-btn {
    padding: 4px 6px;
    background: transparent;
    color: #ef4444;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    margin-left: 2px;
}

    .wd-popup-clear-btn:hover {
        color: #dc2626;
    }

.wd-popup-value-hint {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    color: #7c3aed;
    margin-top: 3px;
    padding: 2px 6px;
    background: #f5f3ff;
    border-radius: 4px;
    border: 1px solid #ede9fe;
}

    .wd-popup-value-hint i {
        font-size: 0.6rem;
    }

    .wd-popup-value-hint code {
        font-size: 0.68rem;
        color: #6d28d9;
        background: #ede9fe;
        padding: 0 3px;
        border-radius: 2px;
    }

.wd-popup-value-ref {
    margin-left: auto;
    font-size: 0.62rem;
    color: #a78bfa;
    font-family: monospace;
    opacity: 0.8;
}
/* Popup Select - Grid Cell */
.wd-test-grid-cell-popup {
    flex: 1;
    min-width: 80px;
    display: flex;
    align-items: center;
    gap: 0;
}

.wd-popup-grid-input {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    cursor: pointer;
}

.wd-popup-grid-btn {
    padding: 4px 6px;
    background: #0ea5e9;
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 0.65rem;
}

    .wd-popup-grid-btn:hover {
        background: #0284c7;
    }
/* Popup Modal Overlay */
.wd-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: popupFadeIn 0.15s ease;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.wd-popup-modal {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 700px;
    max-width: 92vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: popupSlideUp 0.2s ease;
}

@keyframes popupSlideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.wd-popup-modal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    background: #f0f9ff;
    border-bottom: 1px solid #e0f2fe;
    font-size: 0.88rem;
    font-weight: 600;
    color: #0c4a6e;
}

    .wd-popup-modal-header i {
        color: #0ea5e9;
    }

.wd-popup-modal-close {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    font-size: 1rem;
    padding: 4px;
}

    .wd-popup-modal-close:hover {
        color: #ef4444;
    }

.wd-popup-modal-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-bottom: 1px solid #f1f5f9;
}

    .wd-popup-modal-search i {
        color: #94a3b8;
        font-size: 0.85rem;
    }

    .wd-popup-modal-search input {
        flex: 1;
        border: 1px solid #e2e8f0;
        border-radius: 6px;
        padding: 6px 10px;
        font-size: 0.82rem;
        color: #334155;
        outline: none;
    }

        .wd-popup-modal-search input:focus {
            border-color: #0ea5e9;
        }

.wd-popup-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.wd-popup-modal-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #94a3b8;
    gap: 8px;
}

    .wd-popup-modal-empty i {
        font-size: 2rem;
    }

.wd-popup-modal-hint {
    text-align: center;
    padding: 8px;
    font-size: 0.72rem;
    color: #94a3b8;
}

.wd-popup-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}

    .wd-popup-table thead th {
        position: sticky;
        top: 0;
        background: #f8fafc;
        padding: 8px 12px;
        text-align: left;
        font-weight: 600;
        color: #475569;
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        border-bottom: 2px solid #e2e8f0;
    }

    .wd-popup-table tbody tr {
        cursor: pointer;
        transition: background .1s;
    }

        .wd-popup-table tbody tr:hover {
            background: #f0f9ff;
        }

    .wd-popup-table tbody td {
        padding: 8px 12px;
        border-bottom: 1px solid #f1f5f9;
        color: #334155;
    }

.wd-popup-select-btn {
    background: #0ea5e9;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 3px 10px;
    font-size: 0.7rem;
    cursor: pointer;
    white-space: nowrap;
}

    .wd-popup-select-btn:hover {
        background: #0284c7;
    }
/* Trigger UI in properties panel */
.wd-trigger-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 2px;
}

.wd-trigger-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 10px;
    transition: all .15s;
}

    .wd-trigger-item.wd-trigger-disabled {
        opacity: .5;
    }

.wd-trigger-item-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .76rem;
    font-weight: 600;
    color: #334155;
}

    .wd-trigger-item-header i {
        font-size: .9rem;
    }

.wd-trigger-item-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wd-trigger-item-body {
    margin-top: 8px;
    border-top: 1px solid #e2e8f0;
    padding-top: 8px;
}

    .wd-trigger-item-body .wd-props-field {
        margin-bottom: 6px;
    }

        .wd-trigger-item-body .wd-props-field label {
            font-size: .68rem;
        }

.wd-trigger-toggle {
    position: relative;
    display: inline-block;
    width: 28px;
    height: 16px;
    flex-shrink: 0;
}

    .wd-trigger-toggle input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.wd-trigger-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #cbd5e1;
    border-radius: 16px;
    transition: .2s;
}

    .wd-trigger-slider::before {
        content: "";
        position: absolute;
        width: 12px;
        height: 12px;
        left: 2px;
        bottom: 2px;
        background: #fff;
        border-radius: 50%;
        transition: .2s;
    }

.wd-trigger-toggle input:checked + .wd-trigger-slider {
    background: #10b981;
}

    .wd-trigger-toggle input:checked + .wd-trigger-slider::before {
        transform: translateX(12px);
    }

.wd-trigger-add {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    padding: 0 2px;
}

    .wd-trigger-add select {
        flex: 1;
    }
/* Trigger sidebar items */
.wd-trigger-sidebar-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    font-size: .72rem;
    color: #475569;
    border-radius: 6px;
    background: #f1f5f9;
    margin-bottom: 4px;
}

    .wd-trigger-sidebar-item.wd-trigger-disabled {
        opacity: .5;
    }

    .wd-trigger-sidebar-item i {
        font-size: .8rem;
    }

    .wd-trigger-sidebar-item span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.wd-trigger-badge-off {
    margin-left: auto;
    font-size: .6rem;
    padding: 1px 6px;
    background: #fecaca;
    color: #dc2626;
    border-radius: 8px;
    font-weight: 600;
    flex-shrink: 0;
}

.wd-trigger-empty {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px;
    font-size: .7rem;
    color: #94a3b8;
}

.wd-trigger-sidebar-hint {
    font-size: .65rem;
    color: #94a3b8;
    padding: 4px 6px;
    display: flex;
    align-items: flex-start;
    gap: 4px;
}

    .wd-trigger-sidebar-hint i {
        font-size: .65rem;
        margin-top: 1px;
        color: #fbbf24;
        flex-shrink: 0;
    }
/* === Pages/WorkflowListPage.razor.css === */
.wl-container {
    padding: 0;
}
/* Header */
.wl-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.wl-header-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wl-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.wl-subtitle {
    font-size: 0.85rem;
    color: #64748b;
}
/* Stats */
.wl-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.wl-stat-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.wl-stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.wl-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    display: block;
    line-height: 1.1;
}

.wl-stat-label {
    font-size: 0.7rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .3px;
    font-weight: 600;
}
/* Filters */
.wl-filters {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.wl-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0 12px;
    flex: 1;
    min-width: 200px;
}

    .wl-search-wrap i {
        color: #94a3b8;
        font-size: 14px;
    }

    .wl-search-wrap:focus-within {
        border-color: #4e73df;
        box-shadow: 0 0 0 3px rgba(78,115,223,.1);
    }

.wl-search {
    border: none;
    outline: none;
    padding: 8px 0;
    font-size: .84rem;
    flex: 1;
    background: transparent;
    color: #1e293b;
}

.wl-filter-pills {
    display: flex;
    gap: 4px;
}

.wl-pill {
    padding: 5px 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: .74rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
}

    .wl-pill:hover {
        background: #f1f5f9;
    }

    .wl-pill.active {
        background: #4e73df;
        color: #fff;
        border-color: #4e73df;
    }
/* Buttons */
.wl-btn {
    border: none;
    border-radius: 8px;
    font-size: .82rem;
    font-weight: 600;
    padding: 9px 18px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all .15s;
}

.wl-btn-primary {
    background: #4e73df;
    color: #fff;
}

    .wl-btn-primary:hover {
        background: #3b5fc5;
    }

.wl-btn-ghost {
    background: transparent;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

    .wl-btn-ghost:hover {
        background: #f8fafc;
        color: #1e293b;
    }

.wl-btn-danger {
    background: #e74a3b;
    color: #fff;
}

    .wl-btn-danger:hover {
        background: #c0392b;
    }

.wl-btn-lg {
    padding: 12px 28px;
    font-size: .9rem;
}
/* Loading */
.wl-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 350px;
    color: #94a3b8;
}

.wl-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e2e8f0;
    border-top-color: #4e73df;
    border-radius: 50%;
    animation: wl-spin .7s linear infinite;
    margin-bottom: 14px;
}

@keyframes wl-spin {
    to {
        transform: rotate(360deg);
    }
}
/* Empty */
.wl-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
}

.wl-empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #cbd5e1;
    margin-bottom: 18px;
}

.wl-empty h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
}

.wl-empty p {
    color: #94a3b8;
    font-size: .85rem;
    margin-bottom: 20px;
}
/* Grid */
.wl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}
/* Card */
.wl-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    transition: all .2s;
}

    .wl-card:hover {
        border-color: #cbd5e1;
        box-shadow: 0 4px 16px rgba(0,0,0,.06);
        transform: translateY(-2px);
    }

.wl-card-inactive {
    opacity: .55;
}

.wl-card-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border-bottom: 1px solid #f1f5f9;
}

.wl-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #eef2ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #4e73df;
    flex-shrink: 0;
}

.wl-card-name {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
}

.wl-card-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.wl-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .68rem;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 20px;
}

.wl-tag-success {
    background: #e8faf0;
    color: #1cc88a;
}

.wl-tag-default {
    background: #f1f5f9;
    color: #94a3b8;
}

.wl-tag-blue {
    background: #eef2ff;
    color: #4e73df;
}

.wl-card-body {
    padding: 16px 20px;
    flex: 1;
}

.wl-card-desc {
    font-size: .82rem;
    color: #64748b;
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wl-card-metrics {
    display: flex;
    gap: 16px;
    margin-bottom: 10px;
}

.wl-metric {
    text-align: center;
}

.wl-metric-val {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
}

.wl-metric-ok {
    color: #1cc88a;
}

.wl-metric-err {
    color: #e74a3b;
}

.wl-metric-lbl {
    font-size: .62rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.wl-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: .75rem;
    color: #94a3b8;
}

    .wl-card-meta span {
        display: flex;
        align-items: center;
        gap: 5px;
    }
/* Card actions */
.wl-card-actions {
    padding: 12px 20px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    gap: 6px;
}

.wl-action-btn {
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 7px;
    font-size: .78rem;
    font-weight: 500;
    color: #64748b;
    padding: 7px 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all .15s;
}

    .wl-action-btn:hover {
        background: #f8fafc;
        color: #1e293b;
        border-color: #cbd5e1;
    }

.wl-action-primary {
    color: #4e73df;
    border-color: #c7d2fe;
    flex: 1;
    justify-content: center;
}

    .wl-action-primary:hover {
        background: #eef2ff;
    }

.wl-action-success {
    color: #1cc88a;
    border-color: #a7f3d0;
}

    .wl-action-success:hover {
        background: #e8faf0;
    }

.wl-action-warn {
    color: #f6c23e;
    border-color: #fde68a;
}

    .wl-action-warn:hover {
        background: #fffbeb;
    }

.wl-action-danger {
    color: #e74a3b;
    border-color: #fecaca;
}

    .wl-action-danger:hover {
        background: #fef2f2;
    }
/* Modal */
.wl-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.45);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    animation: wl-fadeIn .2s;
}

@keyframes wl-fadeIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

.wl-modal {
    background: #fff;
    border-radius: 14px;
    width: 480px;
    max-width: 95vw;
    box-shadow: 0 20px 60px rgba(0,0,0,.15);
    animation: wl-slideUp .25s ease-out;
}

.wl-modal-sm {
    width: 400px;
}

@keyframes wl-slideUp {
    from {
        opacity: 0;
        transform: translateY(20px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.wl-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 24px 16px;
}

.wl-modal-title-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.wl-modal-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #eef2ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #4e73df;
    flex-shrink: 0;
}

.wl-modal-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
}

.wl-modal-subtitle {
    margin: 2px 0 0;
    font-size: .78rem;
    color: #94a3b8;
}

.wl-modal-close {
    background: none;
    border: none;
    font-size: 16px;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
}

    .wl-modal-close:hover {
        background: #f1f5f9;
        color: #1e293b;
    }

.wl-modal-body {
    padding: 0 24px 20px;
}

.wl-form-group {
    margin-bottom: 16px;
}

.wl-form-label {
    display: block;
    font-size: .78rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}

.wl-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0 12px;
    transition: border-color .15s;
}

    .wl-input-wrap:focus-within {
        border-color: #4e73df;
        box-shadow: 0 0 0 3px rgba(78,115,223,.1);
    }

    .wl-input-wrap i {
        color: #94a3b8;
        font-size: 14px;
    }

.wl-input {
    border: none;
    outline: none;
    flex: 1;
    padding: 9px 0;
    font-size: .85rem;
    background: transparent;
    color: #1e293b;
}

.wl-textarea {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: .85rem;
    color: #1e293b;
    resize: vertical;
    outline: none;
}

    .wl-textarea:focus {
        border-color: #4e73df;
        box-shadow: 0 0 0 3px rgba(78,115,223,.1);
    }
/* Toggle */
.wl-toggle-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.wl-toggle {
    width: 40px;
    height: 22px;
    background: #e2e8f0;
    border-radius: 12px;
    position: relative;
    transition: background .2s;
    cursor: pointer;
}

.wl-toggle-on {
    background: #4e73df;
}

.wl-toggle-knob {
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: left .2s;
    box-shadow: 0 1px 3px rgba(0,0,0,.15);
}

.wl-toggle-on .wl-toggle-knob {
    left: 20px;
}

.wl-toggle-label {
    font-size: .82rem;
    color: #475569;
    font-weight: 500;
}

.wl-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 24px;
    border-top: 1px solid #f1f5f9;
}

@media (max-width: 768px) {
    .wl-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .wl-grid {
        grid-template-columns: 1fr;
    }
}
/* === SharedInfrastructure/CanvasEngine.razor.css === */
.ce-viewport {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #f8fafc;
    cursor: grab;
    user-select: none;
}

    .ce-viewport:active {
        cursor: grabbing;
    }

.ce-grid-svg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.ce-canvas-layer {
    position: absolute;
    top: 0;
    left: 0;
}

.ce-item {
    position: absolute;
    cursor: pointer;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    transition: box-shadow .12s;
}

    .ce-item:hover {
        border-color: #93c5fd;
        box-shadow: 0 2px 8px rgba(59,130,246,.12);
    }

.ce-item-selected {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59,130,246,.25);
}

.ce-item-locked {
    opacity: .6;
    cursor: not-allowed;
}

.ce-item-default {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: .78rem;
    color: #475569;
    padding: 6px;
    text-align: center;
}

.ce-edges-svg {
    overflow: visible;
}

.ce-zoom-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    padding: 3px 8px;
    background: rgba(255,255,255,.9);
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: .7rem;
    color: #64748b;
    pointer-events: none;
}


/* ── DataSource ComboBox / Searchable Dropdown ─────────────── */
/*  is required because child elements are rendered via RenderTreeBuilder */

.ds-combobox {
    position: relative;
}

.ds-combobox-dropdown {
    max-height: 250px;
    overflow-y: auto;
    z-index: 1050;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    background-color: #fff;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.12);
    margin-top: 0.25rem;
    padding: 0.25rem 0;
}

.ds-combobox-item {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    color: #212529;
    background-color: #fff;
    transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out;
    border-bottom: 1px solid #f1f1f1;
    font-size: 0.875rem;
    line-height: 1.4;
}

    .ds-combobox-item:last-child {
        border-bottom: none;
    }

    .ds-combobox-item:hover {
        background-color: #e9ecef;
        color: #212529;
    }

.ds-combobox-item-selected {
    background-color: #0d6efd;
    color: #fff;
    font-weight: 500;
}

    .ds-combobox-item-selected:hover {
        background-color: #0b5ed7;
        color: #fff;
    }

/* ── PopupSelect Modal ─────────────────────────────────────── */

.popup-select-display {
    cursor: pointer;
    background-color: #f8f9fa !important;
}

.popup-select-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: popupFadeIn 0.15s ease;
}

.popup-select-modal {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    width: 560px;
    max-width: 90vw;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.popup-select-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

    .popup-select-header h6 {
        margin: 0;
        font-size: 0.9rem;
        font-weight: 700;
        color: #1e293b;
    }

.popup-select-search {
    padding: 10px 18px;
    border-bottom: 1px solid #f1f5f9;
}

.popup-select-body {
    flex: 1;
    overflow-y: auto;
    min-height: 200px;
    max-height: 400px;
    padding: 0;
}

.popup-select-table {
    margin-bottom: 0;
    font-size: 0.82rem;
}

    .popup-select-table thead th {
        position: sticky;
        top: 0;
        background: #f8fafc;
        font-size: 0.72rem;
        font-weight: 700;
        color: #64748b;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        border-bottom: 2px solid #e2e8f0;
        padding: 8px 12px;
    }

    .popup-select-table tbody td {
        padding: 8px 12px;
        vertical-align: middle;
    }

.popup-select-row {
    padding: 9px 18px;
    font-size: 0.84rem;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.1s ease;
    cursor: pointer;
}

    .popup-select-row:hover {
        background-color: #eff6ff !important;
    }

    .popup-select-row.table-primary {
        background-color: #dbeafe !important;
        color: #1e40af;
        font-weight: 600;
        border-left: 3px solid #3b82f6;
        padding-left: 15px;
    }

    .popup-select-row:last-child {
        border-bottom: none;
    }

.popup-select-footer {
    padding: 8px 18px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    text-align: right;
}

@media (max-width: 768px) {
    .popup-select-modal {
        width: 100vw;
        max-width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .popup-select-header {
        padding: 10px 12px;
    }

    .popup-select-header h6 {
        font-size: .82rem;
    }

    .popup-select-search {
        padding: 8px 12px;
    }

    .popup-select-body {
        max-height: none;
        flex: 1;
    }

    .popup-select-table thead th {
        padding: 6px 8px;
        font-size: .65rem;
    }

    .popup-select-table tbody td {
        padding: 6px 8px;
        font-size: .78rem;
    }

    .popup-select-row {
        padding: 8px 12px;
        font-size: .8rem;
    }

    .popup-select-footer {
        padding: 6px 12px;
    }
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ─── Grid Search ─── */
.grid-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 220px;
    max-width: 320px;
}

.grid-search-icon {
    position: absolute;
    left: 10px;
    color: #94a3b8;
    font-size: .8rem;
    pointer-events: none;
}

.grid-search-input {
    padding-left: 30px !important;
    padding-right: 28px !important;
    border-radius: 6px;
    font-size: .8rem;
}

.grid-search-clear {
    position: absolute;
    right: 2px;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: .85rem;
    padding: 2px 6px;
    line-height: 1;
    cursor: pointer;
}

    .grid-search-clear:hover {
        color: #dc2626;
    }

/* ══════════════════════════════════════════════════════════════
   AI Workflow Dialog
   ══════════════════════════════════════════════════════════════ */

.wl-btn-ai {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 9px 18px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all .2s;
}

    .wl-btn-ai:hover {
        background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
    }

    .wl-btn-ai:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }

.wl-btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: wl-ai-spin .6s linear infinite;
}

@keyframes wl-ai-spin {
    to { transform: rotate(360deg); }
}

.wl-empty-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 4px;
}

.wl-modal-ai {
    max-width: 680px;
    width: 95vw;
}

.wl-ai-prompt {
    font-size: 0.88rem;
    line-height: 1.6;
    min-height: 100px;
    resize: vertical;
}

.wl-ai-options {
    display: flex;
    gap: 12px;
    margin-bottom: 4px;
}

.wl-form-group-half {
    flex: 1;
}

/* ── Example chips ── */

.wl-ai-examples {
    margin-top: 8px;
}

.wl-ai-examples-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 8px;
}

.wl-ai-examples-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.wl-ai-example-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s;
    text-align: left;
}

    .wl-ai-example-chip:hover {
        border-color: #818cf8;
        background: #eef2ff;
        color: #4338ca;
    }

    .wl-ai-example-chip i {
        font-size: 16px;
        flex-shrink: 0;
    }

/* ── Result panel ── */

.wl-ai-result {
    margin-top: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.wl-ai-result-success {
    border-color: #86efac;
}

.wl-ai-result-error {
    border-color: #fca5a5;
}

.wl-ai-result-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    font-size: 0.82rem;
    font-weight: 600;
}

.wl-ai-result-success .wl-ai-result-header {
    background: #f0fdf4;
    color: #166534;
}

.wl-ai-result-error .wl-ai-result-header {
    background: #fef2f2;
    color: #991b1b;
}

.wl-ai-result-meta {
    display: flex;
    gap: 16px;
    padding: 10px 16px;
    background: #fafafa;
    border-bottom: 1px solid #f1f5f9;
}

.wl-ai-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}

    .wl-ai-meta-item i {
        color: #818cf8;
    }

/* ── Steps ── */

.wl-ai-steps {
    padding: 12px 16px;
}

.wl-ai-steps-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.76rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 8px;
}

.wl-ai-step-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wl-ai-step-item {
    font-size: 0.8rem;
    color: #334155;
    padding: 5px 10px;
    background: #f8fafc;
    border-radius: 6px;
    border-left: 3px solid #818cf8;
}

/* ── Suggestions ── */

.wl-ai-suggestions {
    padding: 12px 16px;
    border-top: 1px solid #f1f5f9;
}

.wl-ai-suggestion-item {
    display: flex;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.78rem;
    margin-bottom: 6px;
    align-items: flex-start;
}

    .wl-ai-suggestion-item i {
        margin-top: 2px;
        font-size: 14px;
        flex-shrink: 0;
    }

    .wl-ai-suggestion-item strong {
        display: block;
        color: #1e293b;
        margin-bottom: 2px;
    }

    .wl-ai-suggestion-item span {
        color: #64748b;
    }

.wl-ai-sug-missinginfo {
    background: #fffbeb;
}

    .wl-ai-sug-missinginfo i {
        color: #d97706;
    }

.wl-ai-sug-improvement {
    background: #eff6ff;
}

    .wl-ai-sug-improvement i {
        color: #2563eb;
    }

.wl-ai-sug-bestpractice {
    background: #f0fdf4;
}

    .wl-ai-sug-bestpractice i {
        color: #16a34a;
    }

.wl-ai-sug-errorhandling {
    background: #fef2f2;
}

    .wl-ai-sug-errorhandling i {
        color: #dc2626;
    }

.wl-ai-sug-performance {
    background: #faf5ff;
}

    .wl-ai-sug-performance i {
        color: #7c3aed;
    }
