/* === Components/Layout/LoginLayout.razor.css === */
.login-wrapper {
        min-height: 100vh;
        background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #1e293b 100%);
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 2rem;
    }

    .login-card {
        width: 100%;
        max-width: 400px;
        background: #fff;
        border-radius: 16px;
        padding: 2.5rem;
        box-shadow: 0 20px 60px rgba(0, 0, 0, .15);
    }

    .login-brand {
        text-align: center;
        margin-bottom: 2rem;
    }

    .login-brand-icon {
        width: 56px;
        height: 56px;
        border-radius: 14px;
        background: linear-gradient(135deg, #4e73df, #224abe);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        color: #fff;
        margin-bottom: .75rem;
    }

    .login-brand h3 {
        font-size: 1.3rem;
        font-weight: 700;
        color: #1a1d21;
        margin: 0 0 .25rem;
    }

    .login-brand p {
        font-size: .85rem;
        color: #858d97;
        margin: 0;
    }

    .login-alert {
        font-size: .82rem;
        padding: .6rem .9rem;
        border-radius: 8px;
        margin-bottom: 1.25rem;
        display: flex;
        align-items: center;
        gap: .4rem;
    }

    .login-alert-error {
        background: #fef2f2;
        color: #b91c1c;
        border: 1px solid #fecaca;
    }

    .login-alert-warn {
        background: #fffbeb;
        color: #92400e;
        border: 1px solid #fde68a;
    }

    .login-field {
        margin-bottom: 1.25rem;
    }

    .login-field label {
        display: block;
        font-size: .8rem;
        font-weight: 600;
        color: #374151;
        margin-bottom: .4rem;
    }

    .login-field label i {
        font-size: .75rem;
        margin-right: .15rem;
    }

    .login-field input {
        width: 100%;
        padding: .7rem .9rem;
        border: 1px solid #d1d5db;
        border-radius: 8px;
        font-size: .88rem;
        transition: border-color .15s, box-shadow .15s;
        background: #f9fafb;
        box-sizing: border-box;
    }

    .login-field input:focus {
        outline: none;
        border-color: #4e73df;
        box-shadow: 0 0 0 3px rgba(78,115,223,.15);
        background: #fff;
    }

    .login-field input::placeholder {
        color: #c9cdd3;
    }

    .login-btn {
        width: 100%;
        padding: .75rem;
        border: none;
        border-radius: 8px;
        background: linear-gradient(135deg, #4e73df, #224abe);
        color: #fff;
        font-size: .9rem;
        font-weight: 600;
        cursor: pointer;
        transition: opacity .15s;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: .4rem;
        margin-top: .5rem;
    }

    .login-btn:hover {
        opacity: .9;
    }

/* === Components/Pages/Account/Login.razor.css === */
.login-card {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .15);
}

.login-brand {
    text-align: center;
    margin-bottom: 2rem;
}

.login-brand-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, #4e73df, #224abe);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: .75rem;
}

.login-brand h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1d21;
    margin: 0 0 .25rem;
}

.login-brand p {
    font-size: .85rem;
    color: #858d97;
    margin: 0;
}

/* ─── Alerts ─── */
.login-alert {
    font-size: .82rem;
    padding: .6rem .9rem;
    border-radius: 8px;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: .4rem;
}

.login-alert-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.login-alert-warn {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* ─── Fields ─── */
.login-field {
    margin-bottom: 1.25rem;
}

.login-field label {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: .4rem;
}

.login-field label i {
    font-size: .75rem;
    margin-right: .15rem;
}

.login-field input {
    width: 100%;
    padding: .7rem .9rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: .88rem;
    transition: border-color .15s, box-shadow .15s;
    background: #f9fafb;
}

.login-field input:focus {
    outline: none;
    border-color: #4e73df;
    box-shadow: 0 0 0 3px rgba(78,115,223,.15);
    background: #fff;
}

.login-field input::placeholder {
    color: #c9cdd3;
}

/* ─── Button ─── */
.login-btn {
    width: 100%;
    padding: .75rem;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #4e73df, #224abe);
    color: #fff;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    margin-top: .5rem;
}

.login-btn:hover {
    opacity: .9;
}


/* === Components/Pages/ApplicationPage.razor.css === */
/* ─── App Detail Page ─── */
.app-detail {
    padding: 0;
}

/* ─── Breadcrumb ─── */
.app-breadcrumb {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1.25rem;
    font-size: .82rem;
}

.app-breadcrumb a {
    color: #4e73df;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: .3rem;
}

.app-breadcrumb a:hover {
    text-decoration: underline;
}

.app-breadcrumb .sep {
    font-size: .6rem;
    color: #c9cdd3;
}

.app-breadcrumb span {
    color: #858d97;
}

/* ─── App Header Card ─── */
.app-header-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.75rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.app-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.app-header-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: linear-gradient(135deg, #4e73df, #224abe);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    flex-shrink: 0;
}

.app-header-info h1 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1d21;
    margin: 0;
}

.app-header-info p {
    font-size: .82rem;
    color: #858d97;
    margin: .15rem 0 0;
}

.app-header-right {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.status-badge {
    font-size: .72rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: .3rem;
}

.status-active {
    background: #d1fae5;
    color: #059669;
}

.status-inactive {
    background: #f3f4f6;
    color: #858d97;
}

.page-count-badge {
    font-size: .75rem;
    color: #858d97;
    display: flex;
    align-items: center;
    gap: .3rem;
}

/* ─── Section Title ─── */
.section-title {
    margin-bottom: 1rem;
}

.section-title h5 {
    font-size: .95rem;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 0;
}

/* ─── Loading ─── */
.loading-box {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

/* ─── Empty state ─── */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #858d97;
}

.empty-state i {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    display: block;
    opacity: .4;
}

.empty-state h4 {
    color: #4b5563;
    font-weight: 600;
    margin-bottom: .5rem;
}

.empty-state p {
    font-size: .9rem;
}

.btn-back-home {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .5rem 1.25rem;
    border-radius: 8px;
    background: #4e73df;
    color: #fff;
    text-decoration: none;
    font-size: .85rem;
    font-weight: 500;
    margin-top: 1rem;
    transition: background .15s;
}

.btn-back-home:hover {
    background: #224abe;
    color: #fff;
}

.empty-state-small {
    text-align: center;
    padding: 3rem 2rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    color: #858d97;
}

.empty-state-small i {
    font-size: 2.5rem;
    display: block;
    margin-bottom: .75rem;
    opacity: .3;
}

.empty-state-small p {
    margin: 0;
    font-size: .85rem;
}

/* ─── Pages Grid ─── */
.pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

.page-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.page-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all .2s ease;
}

.page-card-link:hover .page-card {
    border-color: #4e73df;
    box-shadow: 0 4px 16px rgba(78,115,223,.1);
}

.page-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #dbeafe;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #2563eb;
    flex-shrink: 0;
}

.page-card-body {
    flex: 1;
    min-width: 0;
}

.page-card-body h6 {
    font-size: .88rem;
    font-weight: 600;
    color: #1a1d21;
    margin: 0 0 .2rem;
}

.page-card-body p {
    font-size: .75rem;
    color: #858d97;
    margin: 0 0 .4rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-type-badge {
    font-size: .65rem;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 6px;
    background: #f3f4f6;
    color: #6b7280;
}

.page-card-arrow {
    color: #c9cdd3;
    font-size: .85rem;
    flex-shrink: 0;
    transition: color .2s;
}

.page-card-link:hover .page-card-arrow {
    color: #4e73df;
}


/* === Components/Pages/Error.razor.css === */
.error-page {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 60vh;
        padding: 2rem;
    }

    .error-card {
        text-align: center;
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 16px;
        padding: 3rem 2.5rem;
        max-width: 480px;
        width: 100%;
    }

    .error-icon {
        font-size: 3rem;
        color: #f59e0b;
        margin-bottom: 1rem;
    }

    .error-card h2 {
        font-size: 1.3rem;
        font-weight: 700;
        color: #1a1d21;
        margin-bottom: .5rem;
    }

    .error-card p {
        font-size: .88rem;
        color: #858d97;
        margin-bottom: 1.5rem;
    }

    .error-request-id {
        font-size: .78rem;
        color: #858d97;
        margin-bottom: 1.5rem;
        padding: .5rem .75rem;
        background: #f9fafb;
        border-radius: 8px;
        border: 1px solid #e5e7eb;
    }

    .error-request-id code {
        color: #4e73df;
        font-size: .75rem;
    }

    .error-btn {
        display: inline-flex;
        align-items: center;
        gap: .35rem;
        padding: .55rem 1.25rem;
        border-radius: 8px;
        background: #4e73df;
        color: #fff;
        text-decoration: none;
        font-size: .85rem;
        font-weight: 500;
        transition: background .15s;
    }

    .error-btn:hover {
        background: #224abe;
        color: #fff;
    }

/* === Components/Pages/Home.razor.css === */
/* ─── Dashboard ─── */
.dashboard {
    padding: 0;
    max-width: 100%;
    overflow-x: hidden;
}

/* ─── Header ─── */
.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
    gap: .5rem;
}

.dash-title {
    font-size: 1.55rem;
    font-weight: 700;
    color: #1a1d21;
    margin: 0;
}

.dash-subtitle {
    font-size: .82rem;
    color: #858d97;
}

.dash-date {
    font-size: .78rem;
    color: #858d97;
    display: flex;
    align-items: center;
    gap: .35rem;
}

/* ─── KPI Cards ─── */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.kpi-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.15rem;
    display: flex;
    align-items: center;
    gap: .85rem;
    transition: box-shadow .2s;
    min-width: 0;
}

.kpi-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.06);
}

.kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.kpi-blue   { background: #dbeafe; color: #2563eb; }
.kpi-green  { background: #d1fae5; color: #059669; }
.kpi-purple { background: #ede9fe; color: #7c3aed; }
.kpi-orange { background: #ffedd5; color: #ea580c; }
.kpi-indigo { background: #e0e7ff; color: #4338ca; }
.kpi-teal   { background: #ccfbf1; color: #0d9488; }
.kpi-emerald { background: #d1fae5; color: #047857; }
.kpi-red    { background: #fee2e2; color: #dc2626; }

.kpi-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.kpi-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1d21;
    line-height: 1.1;
}

.kpi-label {
    font-size: .7rem;
    color: #858d97;
    font-weight: 500;
    white-space: nowrap;
}

/* ─── Loading ─── */
.loading-box {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

/* ─── Empty state ─── */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #858d97;
}

.empty-state i {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    display: block;
    opacity: .4;
}

.empty-state h4 {
    color: #4b5563;
    font-weight: 600;
    margin-bottom: .5rem;
}

.empty-state p {
    font-size: .9rem;
}

/* ─── Section title ─── */
.section-title {
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title h5 {
    font-size: .95rem;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 0;
}

.section-link {
    font-size: .78rem;
    color: #4e73df;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: .25rem;
    font-weight: 500;
    transition: color .15s;
}

.section-link:hover { color: #224abe; }

/* ─── Workflow Mini Grid ─── */
.wf-mini-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.wf-mini-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.wf-mini-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.15rem;
    transition: all .2s;
}

.wf-mini-link:hover .wf-mini-card {
    border-color: #4e73df;
    box-shadow: 0 6px 20px rgba(78,115,223,.1);
    transform: translateY(-2px);
}

.wf-mini-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .75rem;
}

.wf-mini-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, #4e73df, #224abe);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    color: #fff;
    flex-shrink: 0;
}

.wf-mini-info {
    flex: 1;
    min-width: 0;
}

.wf-mini-name {
    display: block;
    font-size: .88rem;
    font-weight: 600;
    color: #1a1d21;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wf-mini-meta {
    display: flex;
    align-items: center;
    gap: .35rem;
    margin-top: 2px;
}

.wf-mini-tag-pub {
    font-size: .6rem;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
    background: #d1fae5;
    color: #059669;
}

.wf-mini-tag-draft {
    font-size: .6rem;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
    background: #f3f4f6;
    color: #6b7280;
}

.wf-mini-cat {
    font-size: .62rem;
    color: #858d97;
}

.wf-mini-arrow {
    color: #c9cdd3;
    transition: color .2s;
    flex-shrink: 0;
}

.wf-mini-link:hover .wf-mini-arrow { color: #4e73df; }

.wf-mini-stats {
    display: flex;
    gap: 1rem;
    padding-top: .65rem;
    border-top: 1px solid #f3f4f6;
    font-size: .72rem;
    color: #858d97;
}

.wf-mini-stats strong {
    font-weight: 700;
    color: #1a1d21;
}

.wf-mini-ok strong { color: #059669; }
.wf-mini-err strong { color: #dc2626; }

/* ─── Apps grid ─── */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.app-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.app-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all .2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.app-card-link:hover .app-card {
    border-color: #4e73df;
    box-shadow: 0 8px 24px rgba(78,115,223,.12);
    transform: translateY(-2px);
}

.app-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.app-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, #4e73df, #224abe);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
}

.app-card-arrow {
    color: #c9cdd3;
    font-size: .9rem;
    transition: color .2s;
}

.app-card-link:hover .app-card-arrow {
    color: #4e73df;
}

.app-card-body {
    flex: 1;
}

.app-card-name {
    font-size: .95rem;
    font-weight: 600;
    color: #1a1d21;
    margin-bottom: .35rem;
}

.app-card-desc {
    font-size: .8rem;
    color: #858d97;
    margin-bottom: .75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.app-card-footer {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding-top: .75rem;
    border-top: 1px solid #f3f4f6;
}

.app-badge-active {
    font-size: .68rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    background: #d1fae5;
    color: #059669;
}

.app-page-count {
    font-size: .75rem;
    color: #858d97;
}

/* ─── Responsive ─── */
@media (max-width: 1200px) {
    .kpi-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .wf-mini-grid { grid-template-columns: 1fr; }
    .apps-grid { grid-template-columns: 1fr; }
    .pages-grid { grid-template-columns: 1fr; }

    .dash-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .dash-title {
        font-size: 1.25rem;
    }

    .app-header-card {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .kpi-grid { grid-template-columns: 1fr 1fr; gap: .75rem; }

    .kpi-card {
        padding: .85rem;
        gap: .6rem;
    }

    .kpi-icon {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .kpi-value {
        font-size: 1.15rem;
    }
}


/* === Components/Pages/MyTasksPage.razor.css === */
.mt-container { padding: 0; }
.mt-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; }
.mt-header-left { display: flex; flex-direction: column; gap: 4px; }
.mt-title { font-size: 1.5rem; font-weight: 700; color: #1a1d21; margin: 0; display: flex; align-items: center; gap: 10px; }
.mt-subtitle { font-size: .82rem; color: #64748b; }
.mt-refresh-btn { padding: 8px 16px; border: 1px solid #e2e8f0; border-radius: 8px; background: white; color: #475569; font-size: .82rem; font-weight: 500; cursor: pointer; display: flex; align-items: center; gap: 6px; transition: all .15s; }
.mt-refresh-btn:hover { background: #f8fafc; border-color: #cbd5e1; }

.mt-loading { display: flex; justify-content: center; padding: 80px 0; }
.mt-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.mt-stat-card { background: white; border: 1px solid #e2e8f0; border-radius: 10px; padding: 16px; display: flex; align-items: center; gap: 14px; }
.mt-stat-icon { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.mt-stat-body { display: flex; flex-direction: column; }
.mt-stat-value { font-size: 1.4rem; font-weight: 700; color: #1a1d21; line-height: 1.2; }
.mt-stat-label { font-size: .72rem; color: #64748b; text-transform: uppercase; letter-spacing: .3px; }

.mt-filters { display: flex; gap: 16px; align-items: center; margin-bottom: 20px; }
.mt-search-wrap { position: relative; flex: 1; max-width: 320px; }
.mt-search-wrap i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: .85rem; }
.mt-search { width: 100%; padding: 8px 12px 8px 36px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: .82rem; background: white; }
.mt-pills { display: flex; gap: 6px; }
.mt-pill { padding: 6px 14px; border: 1px solid #e2e8f0; border-radius: 20px; background: white; color: #475569; font-size: .78rem; font-weight: 500; cursor: pointer; transition: all .15s; }
.mt-pill.active { background: #2563eb; color: white; border-color: #2563eb; }

.mt-empty { text-align: center; padding: 80px 0; color: #94a3b8; }
.mt-empty i { font-size: 3rem; display: block; margin-bottom: 16px; }
.mt-empty h4 { color: #475569; margin-bottom: 8px; }
.mt-empty p { font-size: .85rem; }

.mt-task-list { display: flex; flex-direction: column; gap: 10px; }
.mt-task-card { background: white; border: 1px solid #e2e8f0; border-radius: 10px; padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; transition: all .15s; }
.mt-task-card:hover { border-color: #cbd5e1; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.mt-task-pending { border-left: 3px solid #d97706; }
.mt-task-done { opacity: .7; }
.mt-task-left { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.mt-task-status-icon { font-size: 1.3rem; flex-shrink: 0; }
.mt-task-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mt-task-title { font-size: .9rem; font-weight: 600; color: #1a1d21; }
.mt-task-desc { font-size: .78rem; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 500px; }
.mt-task-meta { display: flex; gap: 12px; font-size: .72rem; color: #94a3b8; align-items: center; }
.mt-task-meta i { margin-right: 3px; }
.mt-task-priority { padding: 2px 8px; border-radius: 10px; font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .3px; }
.mt-priority-low { background: #f0fdf4; color: #16a34a; }
.mt-priority-normal { background: #eff6ff; color: #2563eb; }
.mt-priority-high { background: #fef3c7; color: #d97706; }
.mt-priority-critical { background: #fef2f2; color: #dc2626; }

.mt-task-right { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.mt-btn { padding: 7px 14px; border: none; border-radius: 7px; font-size: .78rem; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 5px; transition: all .15s; }
.mt-btn-approve { background: #059669; color: white; }
.mt-btn-approve:hover { background: #047857; }
.mt-btn-reject { background: #dc2626; color: white; }
.mt-btn-reject:hover { background: #b91c1c; }
.mt-btn:disabled { opacity: .5; cursor: not-allowed; }
.mt-task-result { font-size: .78rem; font-weight: 600; padding: 5px 12px; border-radius: 6px; }
.result-approved { background: #d1fae5; color: #059669; }
.result-rejected { background: #fecaca; color: #dc2626; }

.spin { animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ─── MyTasks Responsive ─── */
@media (max-width: 768px) {
    .mt-stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .mt-filters { flex-wrap: wrap; }
    .mt-search-wrap { max-width: 100%; flex: 1 1 100%; }
    .mt-task-card { flex-direction: column; align-items: stretch; gap: 12px; padding: 14px; }
    .mt-task-left { gap: 10px; }
    .mt-task-right { width: 100%; }
    .mt-btn { flex: 1; justify-content: center; padding: 10px 14px; font-size: .82rem; }
    .mt-task-desc { max-width: 100%; white-space: normal; }
    .mt-header { flex-direction: column; gap: 10px; }
    .mt-pills { flex-wrap: wrap; }
    .mt-title { font-size: 1.2rem; }
    .mt-task-result { width: 100%; text-align: center; display: block; }
}

@media (max-width: 480px) {
    .mt-stats { grid-template-columns: 1fr 1fr; gap: 8px; }
    .mt-stat-card { padding: 10px; gap: 8px; }
    .mt-stat-icon { width: 34px; height: 34px; font-size: .95rem; }
    .mt-stat-value { font-size: 1.1rem; }
    .mt-stat-label { font-size: .62rem; }
    .mt-pill { padding: 5px 10px; font-size: .72rem; }
    .mt-task-card { padding: 12px; }
    .mt-task-title { font-size: .84rem; }
    .mt-task-meta { gap: 8px; flex-wrap: wrap; }
}


/* === Components/Pages/RuntimePageView.razor.css === */
.runtime-page {
    min-height: 100vh;
    background: #f0f2f5;
    display: flex;
    flex-direction: column;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    text-align: center;
}

.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    text-align: center;
    color: #858d97;
}

.error-container i {
    font-size: 3.5rem;
    color: #f59e0b;
    margin-bottom: 1rem;
}

.error-container h4 {
    color: #4b5563;
    font-weight: 600;
    margin-bottom: .5rem;
}

.error-container p {
    font-size: .9rem;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .5rem 1.25rem;
    border-radius: 8px;
    background: #4e73df;
    color: #fff;
    text-decoration: none;
    font-size: .85rem;
    font-weight: 500;
    margin-top: 1rem;
    transition: background .15s;
}

.btn-back:hover {
    background: #224abe;
    color: #fff;
}

/* ─── Header ─── */
.runtime-header {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: .75rem 1.5rem;
    flex-shrink: 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.btn-back-sm {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    text-decoration: none;
    transition: all .15s;
    flex-shrink: 0;
}

.btn-back-sm:hover {
    background: #f3f4f6;
    color: #1a1d21;
    border-color: #d1d5db;
}

.page-title h5 {
    font-size: .95rem;
    font-weight: 600;
    color: #1a1d21;
    margin: 0;
}

.page-desc {
    font-size: .75rem;
    color: #858d97;
}

.edit-mode-badge {
    font-size: .68rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    background: #fef3c7;
    color: #92400e;
    display: flex;
    align-items: center;
    gap: .25rem;
}

.page-type-badge {
    font-size: .68rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    background: #f3f4f6;
    color: #6b7280;
}

/* ─── Content ─── */
.runtime-content {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
}

/* ─── Empty page ─── */
.empty-page-notice {
    text-align: center;
    padding: 3rem 2rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    color: #858d97;
}

.empty-page-notice i {
    font-size: 2.5rem;
    display: block;
    margin-bottom: .75rem;
    opacity: .3;
}

.empty-page-notice p {
    margin: 0;
    font-size: .85rem;
}

/* ─── Auto Form Buttons ─── */
.form-auto-buttons {
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
    padding: 1rem 0;
    border-top: 1px solid #e5e7eb;
}


/* === Components/Pages/UserFormTaskPage.razor.css === */
.uf-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

.uf-loading {
    display: flex;
    justify-content: center;
    padding: 80px 0;
}

.uf-empty, .uf-done-card {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.uf-empty i, .uf-done-card i {
    font-size: 48px;
    color: #9ca3af;
    display: block;
    margin-bottom: 16px;
}

.uf-empty h4, .uf-done-card h4 {
    font-size: 18px;
    color: #374151;
    margin-bottom: 8px;
}

.uf-empty p, .uf-done-card p {
    color: #6b7280;
    margin-bottom: 20px;
}

/* Success */
.uf-success-card {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid #d1fae5;
}

.uf-success-icon {
    font-size: 56px;
    color: #059669;
    margin-bottom: 16px;
}

.uf-success-card h3 {
    font-size: 20px;
    color: #065f46;
    margin-bottom: 8px;
}

.uf-success-card p {
    color: #6b7280;
    margin-bottom: 24px;
}

.uf-success-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Header */
.uf-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.uf-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #f3f4f6;
    color: #374151;
    text-decoration: none;
    flex-shrink: 0;
    margin-top: 2px;
    transition: background 0.15s;
}

.uf-back-btn:hover {
    background: #e5e7eb;
    color: #111827;
}

.uf-header-info {
    flex: 1;
    min-width: 0;
}

.uf-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.uf-title i {
    color: #8b5cf6;
}

.uf-description {
    font-size: 13px;
    color: #6b7280;
    margin: 4px 0 0;
}

.uf-header-meta {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    align-items: center;
}

.uf-due {
    font-size: 12px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 4px;
}

.uf-priority {
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 4px;
    background: #dbeafe;
    color: #2563eb;
}

.uf-priority-2 {
    background: #fef3c7;
    color: #d97706;
}

.uf-priority-3 {
    background: #fecaca;
    color: #dc2626;
}

/* Alerts */
.uf-alert {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.uf-alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.uf-alert-warn {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fef3c7;
}

/* Form Card */
.uf-form-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.uf-form-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.uf-no-fields {
    text-align: center;
    padding: 40px;
    color: #9ca3af;
}

.uf-no-fields i {
    font-size: 36px;
    display: block;
    margin-bottom: 8px;
}

/* Fields */
.uf-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.uf-label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

.uf-req {
    color: #dc2626;
    margin-left: 2px;
}

.uf-input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    background: #f9fafb;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

.uf-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: white;
}

.uf-textarea {
    resize: vertical;
    min-height: 70px;
}

.uf-checkbox-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

.uf-checkbox {
    width: 18px;
    height: 18px;
    accent-color: #6366f1;
}

.uf-checkbox-wrap span {
    font-size: 14px;
    color: #374151;
}

/* Footer */
.uf-form-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

/* Buttons */
.uf-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
}

.uf-btn-primary {
    background: #6366f1;
    color: white;
}

.uf-btn-primary:hover:not(:disabled) {
    background: #4f46e5;
}

.uf-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.uf-btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.uf-btn-secondary:hover {
    background: #e5e7eb;
    color: #111827;
}

/* ─── DataGrid ─── */
.uf-grid-wrap {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.uf-grid-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.uf-grid-table thead {
    background: #f3f4f6;
}

.uf-grid-table th {
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    font-size: 12px;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

.uf-grid-th-num {
    width: 36px;
    text-align: center;
}

.uf-grid-th-action {
    width: 40px;
}

.uf-grid-table td {
    padding: 4px 6px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

.uf-grid-td-num {
    text-align: center;
    color: #9ca3af;
    font-size: 12px;
    width: 36px;
}

.uf-grid-td-action {
    text-align: center;
    width: 40px;
}

.uf-grid-input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    background: white;
    color: #111827;
    box-sizing: border-box;
}

.uf-grid-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.uf-grid-formula {
    background: #f0fdf4;
    color: #059669;
    font-weight: 600;
    cursor: default;
    border-color: #bbf7d0;
}

.uf-grid-empty {
    text-align: center;
    padding: 20px;
    color: #9ca3af;
    font-style: italic;
}

.uf-grid-remove-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #9ca3af;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}

.uf-grid-remove-btn:hover {
    background: #fef2f2;
    color: #dc2626;
}

.uf-grid-add-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 10px;
    border: none;
    background: #f9fafb;
    color: #6366f1;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-top: 1px solid #e5e7eb;
    transition: background 0.15s;
}

.uf-grid-add-btn:hover {
    background: #eef2ff;
}

/* ─── Popup Select Field ─── */
.uf-popup-field {
    display: flex;
    align-items: center;
    gap: 0;
    position: relative;
}

.uf-popup-display {
    flex: 1;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    cursor: pointer;
    background: #f9fafb;
}

.uf-popup-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #d1d5db;
    border-left: none;
    background: #6366f1;
    color: white;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    flex-shrink: 0;
}

.uf-popup-trigger:hover {
    background: #4f46e5;
}

.uf-popup-clear {
    position: absolute;
    right: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 50%;
}

.uf-popup-clear:hover {
    color: #dc2626;
    background: #fef2f2;
}

/* Inline popup trigger for grid cells */
.uf-popup-inline {
    display: flex;
    gap: 0;
}

.uf-popup-inline .uf-grid-input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    cursor: pointer;
}

.uf-popup-trigger-sm {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    border: 1px solid #d1d5db;
    border-left: none;
    background: #6366f1;
    color: white;
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
    font-size: 12px;
}

.uf-popup-trigger-sm:hover {
    background: #4f46e5;
}

/* ─── Popup Modal ─── */
.uf-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.uf-popup-modal {
    background: white;
    border-radius: 12px;
    width: 560px;
    max-width: 90vw;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.uf-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.uf-popup-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.uf-popup-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: #f3f4f6;
    border-radius: 8px;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.15s;
}

.uf-popup-close:hover {
    background: #e5e7eb;
    color: #111827;
}

.uf-popup-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-bottom: 1px solid #f3f4f6;
    color: #9ca3af;
}

.uf-popup-search input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    color: #111827;
    background: transparent;
}

.uf-popup-body {
    flex: 1;
    overflow-y: auto;
    min-height: 120px;
    max-height: 400px;
}

.uf-popup-loading,
.uf-popup-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 40px;
    color: #9ca3af;
    font-size: 13px;
}

.uf-popup-table {
    width: 100%;
    border-collapse: collapse;
}

.uf-popup-table th {
    padding: 8px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    background: #f9fafb;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    position: sticky;
    top: 0;
    z-index: 1;
}

.uf-popup-table td {
    padding: 10px 16px;
    font-size: 13px;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
}

.uf-popup-row {
    cursor: pointer;
    transition: background 0.1s;
}

.uf-popup-row:hover {
    background: #eef2ff;
}

/* ─── RuntimePageView + UserFormTaskPage + Popup  Responsive ─── */
@media (max-width: 768px) {
    /* ── RuntimePageView ── */
    .runtime-header {
        padding: .5rem .75rem;
    }

    .header-content {
        flex-wrap: wrap;
        gap: .5rem;
    }

    .header-left {
        flex-wrap: wrap;
        gap: .5rem;
        min-width: 0;
    }

    .page-title h5 {
        font-size: .85rem;
    }

    .page-desc {
        display: none;
    }

    .edit-mode-badge,
    .page-type-badge {
        font-size: .62rem;
        padding: 2px 6px;
    }

    .runtime-content {
        padding: .75rem;
    }

    .empty-page-notice {
        padding: 2rem 1rem;
    }

    .empty-page-notice i {
        font-size: 2rem;
    }

    .form-auto-buttons {
        flex-direction: column;
        gap: .5rem;
    }

    .form-auto-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    /* ── UserFormTaskPage ── */
    .uf-container {
        padding: 12px 8px 32px;
    }

    .uf-header {
        flex-direction: column;
        gap: 8px;
        padding: 14px 12px;
    }

    .uf-header-info {
        width: 100%;
    }

    .uf-title {
        font-size: 15px;
        flex-wrap: wrap;
    }

    .uf-header-meta {
        flex-wrap: wrap;
        gap: 6px;
        width: 100%;
    }

    .uf-form-body {
        padding: 14px 12px;
        gap: 14px;
    }

    .uf-form-footer {
        flex-direction: column;
        padding: 12px;
        gap: 8px;
    }

    .uf-form-footer .uf-btn {
        width: 100%;
        justify-content: center;
    }

    .uf-success-actions {
        flex-direction: column;
        gap: 8px;
    }

    .uf-success-actions .uf-btn {
        width: 100%;
        justify-content: center;
    }

    .uf-success-card {
        padding: 40px 16px;
    }

    .uf-empty, .uf-done-card {
        padding: 40px 16px;
    }

    /* ── DataGrid (uf-grid) ── */
    .uf-grid-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .uf-grid-table {
        min-width: 480px;
    }

    .uf-grid-table th {
        padding: 6px 8px;
        font-size: 11px;
    }

    .uf-grid-table td {
        padding: 4px 4px;
    }

    .uf-grid-input {
        padding: 5px 6px;
        font-size: 12px;
    }

    .uf-grid-add-btn {
        font-size: 12px;
        padding: 8px;
    }

    /* ── Popup Modal ── */
    .uf-popup-modal {
        width: 100vw;
        max-width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .uf-popup-header {
        padding: 12px 14px;
    }

    .uf-popup-header h3 {
        font-size: 14px;
    }

    .uf-popup-search {
        padding: 10px 14px;
    }

    .uf-popup-body {
        max-height: none;
        flex: 1;
    }

    .uf-popup-table th {
        padding: 6px 10px;
        font-size: 10px;
    }

    .uf-popup-table td {
        padding: 8px 10px;
        font-size: 12px;
    }

    /* ── Popup Select Field (inline) ── */
    .uf-popup-trigger {
        width: 36px;
        height: 36px;
    }

    .uf-popup-clear {
        right: 42px;
    }

    /* ── Alert ── */
    .uf-alert {
        font-size: 12px;
        padding: 8px 10px;
    }
}


/* === Components/Pages/WorkflowListPage.razor.css === */
/* ─── Container ─── */
.wf-container { padding: 0; }

/* ─── Header ─── */
.wf-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.75rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.wf-header-left { display: flex; flex-direction: column; gap: 2px; }

.wf-title {
    font-size: 1.55rem;
    font-weight: 700;
    color: #1a1d21;
    margin: 0;
}

.wf-subtitle {
    font-size: .82rem;
    color: #858d97;
}

.wf-date {
    font-size: .78rem;
    color: #858d97;
    display: flex;
    align-items: center;
    gap: .35rem;
}

/* ─── Stats ─── */
.wf-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.wf-stat-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.15rem;
    display: flex;
    align-items: center;
    gap: .9rem;
    transition: box-shadow .2s;
}

.wf-stat-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.06);
}

.wf-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.wf-stat-body { display: flex; flex-direction: column; }
.wf-stat-value { font-size: 1.4rem; font-weight: 700; color: #1a1d21; line-height: 1.1; }
.wf-stat-label { font-size: .7rem; color: #858d97; font-weight: 600; text-transform: uppercase; letter-spacing: .3px; }

/* ─── Filters ─── */
.wf-filters {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.wf-search-wrap {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0 .75rem;
    flex: 1;
    min-width: 200px;
}

.wf-search-wrap i { color: #c9cdd3; font-size: .85rem; }
.wf-search-wrap:focus-within { border-color: #4e73df; box-shadow: 0 0 0 3px rgba(78,115,223,.1); }

.wf-search {
    border: none;
    outline: none;
    padding: .55rem 0;
    font-size: .84rem;
    flex: 1;
    background: transparent;
    color: #1a1d21;
}

.wf-pills { display: flex; gap: 4px; }

.wf-pill {
    padding: 5px 14px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    font-size: .74rem;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all .15s;
}

.wf-pill:hover { background: #f9fafb; }
.wf-pill.active { background: #4e73df; color: #fff; border-color: #4e73df; }

/* ─── Loading ─── */
.wf-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

/* ─── Empty ─── */
.wf-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: #858d97;
}

.wf-empty > i {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 1rem;
    opacity: .3;
}

.wf-empty h4 {
    color: #4b5563;
    font-weight: 600;
    margin-bottom: .5rem;
}

.wf-empty p {
    font-size: .9rem;
}

/* ─── Grid ─── */
.wf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.25rem;
}

/* ─── Card ─── */
.wf-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    transition: all .2s;
    cursor: pointer;
}

.wf-card:hover {
    border-color: #4e73df;
    box-shadow: 0 8px 24px rgba(78,115,223,.1);
    transform: translateY(-2px);
}

.wf-card-inactive { opacity: .5; }

.wf-card-header {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: 1.15rem 1.25rem;
    border-bottom: 1px solid #f3f4f6;
}

.wf-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, #4e73df, #224abe);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #fff;
    flex-shrink: 0;
}

.wf-card-title-area { flex: 1; min-width: 0; }

.wf-card-name {
    margin: 0;
    font-size: .92rem;
    font-weight: 600;
    color: #1a1d21;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wf-card-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 4px; }

.wf-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: .65rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
}

.wf-tag-green { background: #d1fae5; color: #059669; }
.wf-tag-gray { background: #f3f4f6; color: #6b7280; }
.wf-tag-blue { background: #dbeafe; color: #2563eb; }

.wf-card-body {
    padding: 1rem 1.25rem;
    flex: 1;
}

.wf-card-desc {
    font-size: .8rem;
    color: #6b7280;
    margin: 0 0 .75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wf-card-metrics {
    display: flex;
    gap: 1.25rem;
}

.wf-metric { text-align: center; }
.wf-metric-val { display: block; font-size: 1.1rem; font-weight: 700; color: #1a1d21; }
.wf-metric-ok { color: #059669; }
.wf-metric-err { color: #dc2626; }
.wf-metric-lbl { font-size: .6rem; color: #858d97; text-transform: uppercase; letter-spacing: .3px; font-weight: 600; }

.wf-card-footer {
    padding: .75rem 1.25rem;
    border-top: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: .72rem;
    color: #858d97;
}

.wf-card-footer span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.wf-card-arrow {
    margin-left: auto;
    color: #c9cdd3;
    transition: color .2s;
}

.wf-card:hover .wf-card-arrow { color: #4e73df; }

@media (max-width: 768px) {
    .wf-stats-row { grid-template-columns: repeat(2, 1fr); }
    .wf-grid { grid-template-columns: 1fr; }
}


/* === Components/Pages/WorkflowLogsPage.razor.css === */
.wl-container { padding: 0px; }
.wl-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; }
.wl-header-left { display: flex; flex-direction: column; gap: 4px; }
.wl-title { font-size: 1.5rem; font-weight: 700; color: #1a1d21; margin: 0; display: flex; align-items: center; gap: 10px; }
.wl-subtitle { font-size: .82rem; color: #64748b; }
.wl-refresh-btn { padding: 8px 16px; border: 1px solid #e2e8f0; border-radius: 8px; background: white; color: #475569; font-size: .82rem; font-weight: 500; cursor: pointer; display: flex; align-items: center; gap: 6px; transition: all .15s; }
.wl-refresh-btn:hover { background: #f8fafc; border-color: #cbd5e1; }

.wl-loading { display: flex; justify-content: center; padding: 80px 0; }
.wl-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.wl-stat-card { background: white; border: 1px solid #e2e8f0; border-radius: 10px; padding: 16px; 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: 1.1rem; flex-shrink: 0; }
.wl-stat-body { display: flex; flex-direction: column; }
.wl-stat-value { font-size: 1.4rem; font-weight: 700; color: #1a1d21; line-height: 1.2; }
.wl-stat-label { font-size: .72rem; color: #64748b; text-transform: uppercase; letter-spacing: .3px; }

.wl-filters { display: flex; gap: 16px; align-items: center; margin-bottom: 20px; }
.wl-search-wrap { position: relative; flex: 1; max-width: 360px; }
.wl-search-wrap i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: .85rem; }
.wl-search { width: 100%; padding: 8px 12px 8px 36px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: .82rem; background: white; }
.wl-pills { display: flex; gap: 6px; }
.wl-pill { padding: 6px 14px; border: 1px solid #e2e8f0; border-radius: 20px; background: white; color: #475569; font-size: .78rem; font-weight: 500; cursor: pointer; transition: all .15s; }
.wl-pill.active { background: #2563eb; color: white; border-color: #2563eb; }

.wl-empty { text-align: center; padding: 80px 0; color: #94a3b8; }
.wl-empty i { font-size: 3rem; display: block; margin-bottom: 16px; }
.wl-empty h4 { color: #475569; margin-bottom: 8px; }

.wl-table-wrap { background: white; border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; }
.wl-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.wl-table thead { background: #f8fafc; }
.wl-table th { padding: 10px 14px; text-align: left; font-weight: 600; color: #475569; font-size: .74rem; text-transform: uppercase; letter-spacing: .4px; border-bottom: 1px solid #e2e8f0; }
.wl-table td { padding: 10px 14px; border-bottom: 1px solid #f1f5f9; color: #334155; vertical-align: middle; }
.wl-table tbody tr:hover { background: #f8fafc; }
.wl-table tbody tr:last-child td { border-bottom: none; }
.row-failed { background: #fef2f2; }
.row-running { background: #fffbeb; }

.wl-status-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 12px; font-size: .72rem; font-weight: 600; }
.wl-status-completed { background: #d1fae5; color: #059669; }
.wl-status-failed { background: #fecaca; color: #dc2626; }
.wl-status-running { background: #fef3c7; color: #d97706; }
.wl-status-cancelled { background: #e2e8f0; color: #64748b; }
.wl-status-waiting { background: #e0e7ff; color: #4f46e5; }
.wl-wf-name { font-weight: 600; color: #1a1d21; }
.wl-error-text { font-size: .72rem; color: #dc2626; max-width: 200px; display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-running-indicator { animation: pulse 1.5s ease infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }

.wl-view-btn { background: none; border: 1px solid #e2e8f0; border-radius: 6px; padding: 4px 10px; color: #475569; cursor: pointer; font-size: .82rem; }
.wl-view-btn:hover { background: #f1f5f9; color: #2563eb; }

.spin { animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }


/* === Components/Pages/WorkflowViewerPage.razor.css === */
/* ─── Container ─── */
.wv-container { padding: 0; }

/* ─── Loading / Empty ─── */
.wv-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50vh;
}

.wv-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: #858d97;
}

.wv-empty > i {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 1rem;
    color: #f59e0b;
}

.wv-empty h4 { color: #4b5563; font-weight: 600; margin-bottom: .5rem; }
.wv-empty p { font-size: .9rem; }

.wv-btn-back {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .5rem 1.25rem;
    border-radius: 8px;
    background: #4e73df;
    color: #fff;
    text-decoration: none;
    font-size: .85rem;
    font-weight: 500;
    margin-top: 1rem;
    transition: background .15s;
}

.wv-btn-back:hover { background: #224abe; color: #fff; }

/* ─── Breadcrumb ─── */
.wv-breadcrumb {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1.25rem;
    font-size: .82rem;
}

.wv-breadcrumb a {
    color: #4e73df;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: .3rem;
}

.wv-breadcrumb a:hover { text-decoration: underline; }
.wv-breadcrumb .sep { font-size: .6rem; color: #c9cdd3; }
.wv-breadcrumb span { color: #858d97; }

/* ─── Header Card ─── */
.wv-header-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.wv-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.wv-header-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: linear-gradient(135deg, #4e73df, #224abe);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    flex-shrink: 0;
}

.wv-header-info h1 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1d21;
    margin: 0;
}

.wv-header-info p {
    font-size: .82rem;
    color: #858d97;
    margin: .15rem 0 0;
}

.wv-header-right {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}

.wv-status {
    font-size: .72rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: .3rem;
}

.wv-status-published { background: #d1fae5; color: #059669; }
.wv-status-draft { background: #f3f4f6; color: #6b7280; }

.wv-info-badge {
    font-size: .72rem;
    color: #858d97;
    display: flex;
    align-items: center;
    gap: .25rem;
    padding: 3px 8px;
    background: #f9fafb;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

/* ─── Body (2-column) ─── */
.wv-body {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 1.25rem;
    align-items: start;
}

/* ─── Canvas Area ─── */
.wv-canvas-area {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

.wv-canvas {
    padding: 1.25rem;
    overflow: auto;
    background: #fafbfc;
    min-height: 400px;
}

.wv-svg {
    display: block;
}

.wv-node rect {
    transition: stroke-width .15s;
}

.wv-conn-label {
    font-size: 10px;
    fill: #858d97;
    font-weight: 500;
}

/* ─── Section Title ─── */
.wv-section-title {
    font-size: .82rem;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
}

/* ─── Details Panel ─── */
.wv-details-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.wv-detail-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

/* ─── Triggers ─── */
.wv-trigger-list { padding: .5rem; }

.wv-trigger-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem .65rem;
    border-radius: 8px;
    transition: background .1s;
}

.wv-trigger-item:hover { background: #f9fafb; }

.wv-trigger-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: #fef3c7;
    color: #d97706;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    flex-shrink: 0;
}

.wv-trigger-info { flex: 1; min-width: 0; }
.wv-trigger-name { display: block; font-size: .78rem; font-weight: 600; color: #1a1d21; }
.wv-trigger-type { font-size: .68rem; color: #858d97; }

.wv-trigger-status {
    font-size: .62rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 6px;
}

.wv-trigger-status.enabled { background: #d1fae5; color: #059669; }
.wv-trigger-status.disabled { background: #f3f4f6; color: #6b7280; }

/* ─── Variables ─── */
.wv-var-list { padding: .5rem .75rem; }

.wv-var-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .35rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.wv-var-item:last-child { border-bottom: none; }

.wv-var-name { font-size: .78rem; font-weight: 600; color: #4e73df; font-family: monospace; }
.wv-var-value { font-size: .75rem; color: #858d97; }

/* ─── Node List ─── */
.wv-node-list { padding: .35rem; max-height: 280px; overflow-y: auto; }

.wv-node-item {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .4rem .6rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background .1s;
}

.wv-node-item:hover { background: #f9fafb; }
.wv-node-item.selected { background: #eef2ff; }

.wv-node-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.wv-node-item-info { flex: 1; min-width: 0; }
.wv-node-item-name { display: block; font-size: .78rem; font-weight: 600; color: #1a1d21; }
.wv-node-item-type { font-size: .65rem; color: #858d97; }

/* ─── Node Detail ─── */
.wv-node-detail { padding: .75rem 1rem; }

.wv-nd-row {
    display: flex;
    justify-content: space-between;
    padding: .3rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.wv-nd-label { font-size: .72rem; font-weight: 600; color: #858d97; }
.wv-nd-value { font-size: .78rem; color: #1a1d21; text-align: right; }

.wv-nd-prop {
    display: flex;
    justify-content: space-between;
    padding: .2rem 0 .2rem .75rem;
    font-size: .72rem;
}

.wv-nd-prop-key { color: #4e73df; font-family: monospace; }
.wv-nd-prop-val { color: #858d97; text-align: right; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ─── Execution History ─── */
.wv-exec-list { padding: .5rem; }

.wv-exec-item {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .4rem .5rem;
    border-radius: 8px;
    transition: background .1s;
}

.wv-exec-item:hover { background: #f9fafb; }

.wv-exec-status {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    flex-shrink: 0;
}

.exec-ok { background: #d1fae5; color: #059669; }
.exec-err { background: #fecaca; color: #dc2626; }
.exec-running { background: #dbeafe; color: #2563eb; }
.exec-other { background: #f3f4f6; color: #6b7280; }

.wv-exec-info { flex: 1; min-width: 0; overflow: hidden; }
.wv-exec-time { display: block; font-size: .75rem; font-weight: 600; color: #1a1d21; }
.wv-exec-by { font-size: .65rem; color: #858d97; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wv-exec-label { font-size: .65rem; font-weight: 600; color: #858d97; }

/* ─── Run Button ─── */
.wv-run-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem 1.2rem;
    border: none;
    border-radius: 8px;
    background: #16a34a;
    color: #fff;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, box-shadow .15s;
    margin-left: auto;
}

.wv-run-btn:hover:not(:disabled) { background: #15803d; box-shadow: 0 2px 8px rgba(22,163,74,.25); }
.wv-run-btn:disabled { opacity: .6; cursor: not-allowed; }

/* ─── Execution Panel ─── */
.wv-exec-panel {
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    animation: execSlideIn .3s ease;
}

@keyframes execSlideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.exec-panel-ok  { background: #f0fdf4; border-color: #86efac; }
.exec-panel-err { background: #fef2f2; border-color: #fca5a5; }
.exec-panel-run { background: #eff6ff; border-color: #93c5fd; }

.wv-exec-panel-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: .75rem;
}

.wv-exec-panel-status {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-size: 1rem;
}

.exec-panel-ok .wv-exec-panel-status  { color: #16a34a; }
.exec-panel-err .wv-exec-panel-status { color: #dc2626; }
.exec-panel-run .wv-exec-panel-status { color: #2563eb; }

.wv-exec-panel-title { font-weight: 700; font-size: .95rem; }

.wv-exec-panel-meta {
    display: flex;
    align-items: center;
    gap: .85rem;
    font-size: .75rem;
    color: #6b7280;
    margin-left: auto;
}

.wv-exec-panel-meta i { font-size: .7rem; }

.wv-exec-panel-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    transition: background .15s, color .15s;
    flex-shrink: 0;
}

.wv-exec-panel-close:hover { background: rgba(0,0,0,.06); color: #4b5563; }

/* ─── Execution Steps ─── */
.wv-exec-steps {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    padding: .5rem 0;
    scrollbar-width: thin;
}

.wv-exec-step {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem .75rem;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e5e7eb;
    min-width: 150px;
    flex-shrink: 0;
    transition: border-color .15s;
}

.wv-exec-step.step-ok  { border-color: #86efac; background: #f0fdf4; }
.wv-exec-step.step-err { border-color: #fca5a5; background: #fef2f2; }
.wv-exec-step.step-run { border-color: #93c5fd; background: #eff6ff; }

.wv-exec-step-icon { font-size: 1.05rem; flex-shrink: 0; line-height: 1; }
.step-ok .wv-exec-step-icon { color: #16a34a; }
.step-err .wv-exec-step-icon { color: #dc2626; }
.step-run .wv-exec-step-icon { color: #2563eb; }

.wv-exec-step-info {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    min-width: 0;
}

.wv-exec-step-name {
    font-size: .78rem;
    font-weight: 600;
    color: #1a1d21;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wv-exec-step-type {
    font-size: .65rem;
    color: #858d97;
}

.wv-exec-step-dur {
    font-size: .65rem;
    font-weight: 600;
    color: #6b7280;
    background: rgba(0,0,0,.04);
    padding: .15rem .45rem;
    border-radius: 4px;
    margin-left: auto;
    white-space: nowrap;
}

.wv-exec-step-error {
    color: #f59e0b;
    font-size: .85rem;
    cursor: help;
    flex-shrink: 0;
}

/* ─── Execution Errors ─── */
.wv-exec-errors {
    margin-top: .75rem;
    padding-top: .75rem;
    border-top: 1px solid rgba(0,0,0,.06);
}

.wv-exec-errors-title {
    font-size: .8rem;
    font-weight: 700;
    color: #dc2626;
    margin-bottom: .5rem;
    display: flex;
    align-items: center;
    gap: .35rem;
}

.wv-exec-error-item {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    padding: .5rem .75rem;
    background: rgba(220,38,38,.04);
    border-radius: 6px;
    margin-bottom: .35rem;
}

.wv-exec-error-msg {
    font-size: .8rem;
    color: #991b1b;
    font-weight: 500;
}

.wv-exec-error-node {
    font-size: .7rem;
    color: #9ca3af;
}

/* ─── Execution Waiting ─── */
.wv-exec-waiting {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-top: .75rem;
    padding: .65rem 1rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    color: #92400e;
    font-size: .82rem;
    font-weight: 500;
}

.wv-exec-waiting i { font-size: 1rem; }

.wv-exec-waiting-action {
    justify-content: space-between;
    flex-wrap: wrap;
}

.wv-exec-waiting-info {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.wv-exec-waiting-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .4rem .9rem;
    background: #059669;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: .78rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s, transform .15s;
    white-space: nowrap;
}

.wv-exec-waiting-btn:hover {
    background: #047857;
    color: #fff;
    transform: translateY(-1px);
}

.wv-exec-waiting-btn-approval {
    background: #2563eb;
}

.wv-exec-waiting-btn-approval:hover {
    background: #1d4ed8;
    color: #fff;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
    .wv-body {
        grid-template-columns: 1fr;
    }

    .wv-exec-panel-header {
        flex-wrap: wrap;
    }

    .wv-exec-panel-meta {
        margin-left: 0;
        flex-basis: 100%;
    }
}

@media (max-width: 768px) {
    .wv-container {
        overflow-x: hidden;
        max-width: 100vw;
    }

    .wv-header-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .wv-header-right {
        width: 100%;
        overflow: hidden;
    }

    .wv-header-info h1 {
        font-size: 1.1rem;
    }

    .wv-breadcrumb {
        flex-wrap: wrap;
    }

    .wv-canvas-area {
        max-width: 100%;
    }

    .wv-canvas {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }

    .wv-detail-section {
        overflow: hidden;
        max-width: 100%;
    }

    .wv-exec-panel {
        padding: .75rem 1rem;
        overflow: hidden;
    }

    .wv-exec-steps {
        gap: .4rem;
    }

    .wv-exec-step {
        min-width: 130px;
    }

    .wv-exec-list {
        max-width: 100%;
        overflow: hidden;
    }

    .wv-exec-item {
        max-width: 100%;
        overflow: hidden;
    }

    .wv-node-list {
        max-width: 100%;
    }

    .wv-var-list {
        overflow: hidden;
    }

    .wv-var-name,
    .wv-var-value {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .wv-nd-value {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 55%;
    }

    /* Workflow List page */
    .wf-stats-row { grid-template-columns: repeat(2, 1fr); }
    .wf-grid { grid-template-columns: 1fr; }
    .wf-header { flex-direction: column; align-items: flex-start; }
    .wf-title { font-size: 1.25rem; }

    /* Workflow Logs page */
    .wl-stats { grid-template-columns: repeat(2, 1fr); }
    .wl-filters { flex-wrap: wrap; }
    .wl-search-wrap { flex: none; width: 100%; max-width: 100%; }
    .wl-pills { flex-wrap: wrap; }
    .wl-header { flex-direction: column; gap: 10px; }
    .wl-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .wl-table { min-width: 600px; }
}

/* ── 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;
    }
}

/* ── Row Edit Popup ── */
.eg-row-popup {
    width: 560px;
    max-width: 90vw;
    max-height: 85vh;
}

.eg-row-popup-body {
    padding: 16px 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.eg-row-popup-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.eg-row-popup-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
}

@media (max-width: 768px) {
    .eg-row-popup {
        width: 100vw;
        max-width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .eg-row-popup-body {
        flex: 1;
        max-height: none;
        padding: 14px 16px;
        gap: 12px;
    }

    .eg-row-popup-label {
        font-size: 0.82rem;
    }
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* === 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);
    }
