/* Base styles shared across all pages.  This file defines only the
   global resets and a generic page header.  All page-specific styles
   have been moved into separate CSS files (see dashboard.css,
   tasks.css, board.css, ai-intake.css, reports.css, and navmenu.css). */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: Inter, sans-serif;
    background: #0B1220;
}

body {
    color: #F9FAFB;
}

/* Shell element for the main layout */
.app-shell {
    min-height: 100vh;
    background: #0B1220;
}

/* Generic page header used at the top of each page */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.page-header h1 {
    margin: 0 0 6px;
    font-size: 32px;
    letter-spacing: -.04em;
    color: #F9FAFB;
}

.page-header p {
    margin: 0;
    color: #9CA3AF;
}
/* Login page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: radial-gradient(circle at top left, rgba(59,130,246,.28), transparent 32%), #0B1220;
    color: #F9FAFB;
    font-family: Inter, Arial, sans-serif;
}

.login-card {
    width: min(440px, 100%);
    background: rgba(17, 24, 39, .94);
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 30px 80px rgba(0,0,0,.35);
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.login-brand h1 {
    margin: 0;
    font-size: 26px;
}

.login-brand p {
    margin: 4px 0 0;
    color: #94A3B8;
}

.brand-logo.large {
    width: 52px;
    height: 52px;
    font-size: 22px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.login-form label {
    color: #CBD5E1;
    font-size: 13px;
    font-weight: 800;
}

.login-form input {
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, .26);
    background: rgba(15, 23, 42, .82);
    color: #F9FAFB;
    padding: 0 12px;
    outline: none;
}

.login-form input:focus {
    border-color: rgba(59, 130, 246, .75);
}

.login-form button {
    height: 46px;
    margin-top: 10px;
    border: 0;
    border-radius: 12px;
    background: #3B82F6;
    color: white;
    font-weight: 900;
    cursor: pointer;
}

.login-error {
    border: 1px solid rgba(239,68,68,.35);
    background: rgba(239,68,68,.12);
    color: #FCA5A5;
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 16px;
}

.login-footer {
    margin-top: 18px;
    color: #64748B;
    font-size: 12px;
}
.topbar-no-search {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .topbar-no-search .topbar-actions {
        margin-left: auto;
    }

.light-mode {
    background: #F8FAFC;
    color: #111827;
}

    .light-mode .main-content {
        background: #F8FAFC;
        color: #111827;
    }

    .light-mode .saas-sidebar {
        background: #FFFFFF;
        border-right: 1px solid #E5E7EB;
    }

    .light-mode .topbar {
        background: #FFFFFF;
        border-bottom: 1px solid #E5E7EB;
    }


/* -----------------------------
   Light mode global overrides
------------------------------ */

html:has(.light-mode),
body:has(.light-mode) {
    background: #F8FAFC;
    color: #111827;
}

.light-mode.app-shell {
    background: #F8FAFC;
    color: #111827;
}

.light-mode .main-content {
    background: #F8FAFC;
    color: #111827;
}

/* Page header */
.light-mode .page-header h1 {
    color: #111827;
}

.light-mode .page-header p {
    color: #64748B;
}

/* Top bar */
.light-mode .topbar {
    background: #FFFFFF;
    border-bottom: 1px solid #E5E7EB;
}

.topbar-no-search {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

    .topbar-no-search .topbar-actions {
        margin-left: auto;
    }

/* Sidebar */
.light-mode .saas-sidebar {
    background: #FFFFFF;
    border-right: 1px solid #E5E7EB;
}

.light-mode .brand-title {
    color: #111827;
}

.light-mode .brand-subtitle,
.light-mode .sidebar-section,
.light-mode .mini-label,
.light-mode .mini-text {
    color: #64748B;
}

.light-mode .sidebar-card {
    background: #F8FAFC;
    border: 1px solid #E5E7EB;
}

.light-mode .mini-title {
    color: #111827;
}

/* MudBlazor nav menu links */
.light-mode .mud-nav-link {
    color: #334155 !important;
}

    .light-mode .mud-nav-link .mud-nav-link-text {
        color: #334155 !important;
    }

    .light-mode .mud-nav-link .mud-icon-root {
        color: #64748B !important;
    }

    .light-mode .mud-nav-link.active,
    .light-mode .mud-nav-link.mud-nav-link-active {
        background: #DBEAFE !important;
        color: #2563EB !important;
    }

        .light-mode .mud-nav-link.active .mud-nav-link-text,
        .light-mode .mud-nav-link.mud-nav-link-active .mud-nav-link-text,
        .light-mode .mud-nav-link.active .mud-icon-root,
        .light-mode .mud-nav-link.mud-nav-link-active .mud-icon-root {
            color: #2563EB !important;
        }

/* Common cards / panels */
.light-mode .saas-panel,
.light-mode .metric-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .08);
    color: #111827;
}

.light-mode .panel-title,
.light-mode .row-title,
.light-mode h1,
.light-mode h2,
.light-mode h3 {
    color: #111827;
}

/* Inputs */
.light-mode .mud-input-root,
.light-mode .mud-input,
.light-mode .mud-select,
.light-mode .mud-input-control {
    color: #111827 !important;
}

.light-mode .mud-input-outlined-border {
    border-color: #CBD5E1 !important;
}

.light-mode .mud-input-label {
    color: #64748B !important;
}

/* Tables / grids */
.light-mode .task-table-card,
.light-mode .task-data-grid {
    background: #FFFFFF;
    color: #111827;
}

.light-mode .task-table th,
.light-mode .task-table td {
    border-color: #E5E7EB;
    color: #111827;
}

.light-mode .task-table thead {
    background: #F1F5F9;
}

.light-mode .task-title-button {
    color: #111827;
}

.light-mode .task-title-cell span,
.light-mode .muted {
    color: #64748B;
}

/* Dashboard specific */
.light-mode .metric-card span {
    color: #2563EB;
}

.light-mode .metric-card strong {
    color: #111827;
}

.light-mode .metric-card small {
    color: #64748B;
}

.light-mode .chart-placeholder {
    background: linear-gradient(180deg, #F8FAFC, #EEF2FF);
    border: 1px solid #E5E7EB;
}

.light-mode .chart-bar {
    background: linear-gradient(180deg, #60A5FA, #2563EB);
    color: #FFFFFF;
}

/* Login stays dark unless you want separate light login */
.login-page {
    background: radial-gradient(circle at top left, rgba(59,130,246,.28), transparent 32%), #0B1220;
}
/* Stronger light mode contrast */

.light-mode .saas-sidebar {
    background: #FFFFFF;
    border-right: 1px solid #E2E8F0;
}

.light-mode .mud-nav-link {
    color: #475569 !important;
    opacity: 1 !important;
}

    .light-mode .mud-nav-link .mud-nav-link-text {
        color: #475569 !important;
        opacity: 1 !important;
    }

    .light-mode .mud-nav-link .mud-icon-root {
        color: #64748B !important;
        opacity: 1 !important;
    }

    .light-mode .mud-nav-link:hover {
        background: #F1F5F9 !important;
        color: #2563EB !important;
    }

        .light-mode .mud-nav-link:hover .mud-nav-link-text,
        .light-mode .mud-nav-link:hover .mud-icon-root {
            color: #2563EB !important;
        }

    .light-mode .mud-nav-link.active,
    .light-mode .mud-nav-link.mud-nav-link-active {
        background: #DBEAFE !important;
        color: #2563EB !important;
    }

        .light-mode .mud-nav-link.active .mud-nav-link-text,
        .light-mode .mud-nav-link.mud-nav-link-active .mud-nav-link-text,
        .light-mode .mud-nav-link.active .mud-icon-root,
        .light-mode .mud-nav-link.mud-nav-link-active .mud-icon-root {
            color: #2563EB !important;
        }

/* Dashboard text contrast */
.light-mode .saas-panel,
.light-mode .metric-card {
    background: #FFFFFF;
    color: #111827;
}

    .light-mode .panel-title,
    .light-mode .row-title,
    .light-mode .saas-panel h1,
    .light-mode .saas-panel h2,
    .light-mode .saas-panel h3,
    .light-mode .saas-panel strong,
    .light-mode .saas-panel b {
        color: #111827 !important;
    }

    .light-mode .saas-panel span,
    .light-mode .saas-panel small,
    .light-mode .recent-item span {
        color: #475569;
    }

    .light-mode .metric-card span {
        color: #2563EB !important;
    }

    .light-mode .metric-card strong {
        color: #111827 !important;
    }

    .light-mode .metric-card small {
        color: #16A34A;
    }

/* Priority/status legends on dashboard */
.light-mode .status-legend,
.light-mode .priority-list,
.light-mode .legend-row,
.light-mode .priority-row {
    color: #334155;
}

    .light-mode .legend-row span,
    .light-mode .priority-row span {
        color: #334155 !important;
    }

    .light-mode .legend-row b,
    .light-mode .priority-row b {
        color: #111827 !important;
    }

/* Topbar reduce empty feeling */
.light-mode .topbar {
    background: #FFFFFF;
    border-bottom: 1px solid #E2E8F0;
}

.topbar {
    min-height: 68px;
}

/* MudDataGrid light mode */
.light-mode .task-data-grid {
    background: #FFFFFF;
    color: #111827;
}

    .light-mode .task-data-grid .mud-table-root,
    .light-mode .task-data-grid .mud-table-container,
    .light-mode .task-data-grid .mud-data-grid {
        background: #FFFFFF;
        color: #111827;
    }

    .light-mode .task-data-grid .mud-table-cell,
    .light-mode .task-data-grid .mud-table-head .mud-table-cell {
        color: #111827 !important;
        border-color: #E5E7EB !important;
    }

    .light-mode .task-data-grid .mud-table-head {
        background: #F1F5F9;
    }
/* Reminders / notification UI */
.notification-menu-item {
    display: grid;
    gap: 3px;
    min-width: 260px;
    max-width: 360px;
}

.notification-menu-item b {
    font-size: 13px;
    color: #F8FAFC;
    white-space: normal;
}

.notification-menu-item span {
    font-size: 11px;
    color: #94A3B8;
}

.notification-menu-item.read b {
    color: #CBD5E1;
}

.reminder-settings-card {
    height: 100%;
    border-radius: 16px;
    background: rgba(15, 23, 42, .55);
    border: 1px solid rgba(148, 163, 184, .14);
}

.notification-list-page {
    display: grid;
    gap: 12px;
}

.notification-row {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, .14);
    background: rgba(15, 23, 42, .55);
}

.notification-row.unread {
    border-color: rgba(59, 130, 246, .38);
    background: rgba(59, 130, 246, .08);
}

.notification-icon {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #BFDBFE;
    background: rgba(59, 130, 246, .16);
    border: 1px solid rgba(59, 130, 246, .25);
}

.notification-body {
    display: grid;
    gap: 5px;
}

.notification-topline {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.notification-topline b {
    color: #F8FAFC;
}

.notification-topline span,
.notification-body p {
    color: #94A3B8;
    margin: 0;
}

.notification-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.notification-tags span {
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, .12);
    border: 1px solid rgba(148, 163, 184, .16);
    color: #CBD5E1;
    font-size: 12px;
}

.light-mode .notification-menu-item b {
    color: #111827;
}

.light-mode .notification-menu-item span {
    color: #64748B;
}

.light-mode .reminder-settings-card,
.light-mode .notification-row {
    background: #F8FAFC;
    border: 1px solid #E5E7EB;
    color: #111827;
}

.light-mode .notification-row.unread {
    background: #EFF6FF;
    border-color: #93C5FD;
}

.light-mode .notification-topline b {
    color: #111827;
}

.light-mode .notification-topline span,
.light-mode .notification-body p {
    color: #475569;
}

.light-mode .notification-tags span {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    color: #334155;
}

.light-mode .notification-icon {
    color: #1D4ED8;
    background: #DBEAFE;
    border: 1px solid #93C5FD;
}

/* -----------------------------
   Workflow / Connections page
------------------------------ */
.workflow-map {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    padding: 28px;
    border: 1px solid rgba(59, 130, 246, .32);
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, .24), transparent 34%),
        radial-gradient(circle at bottom right, rgba(14, 165, 233, .14), transparent 30%),
        rgba(8, 15, 30, .96);
    box-shadow: 0 28px 90px rgba(0, 0, 0, .32);
}

.workflow-map-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.workflow-kicker {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    color: #93C5FD;
    background: rgba(59, 130, 246, .12);
    border: 1px solid rgba(59, 130, 246, .24);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.workflow-map-title h2 {
    margin: 10px 0 4px;
    font-size: clamp(30px, 4vw, 56px);
    letter-spacing: -.05em;
    color: #F8FAFC;
}

.workflow-map-title p {
    margin: 0;
    color: #93C5FD;
    font-size: 18px;
}

.workflow-legend {
    min-width: 230px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border-radius: 18px;
    color: #CBD5E1;
    background: rgba(15, 23, 42, .7);
    border: 1px dashed rgba(96, 165, 250, .38);
}

.workflow-legend span {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 800;
}

.legend-line {
    width: 42px;
    height: 3px;
    display: inline-block;
    border-radius: 99px;
    background: #38BDF8;
}

.legend-line.support {
    background: repeating-linear-gradient(90deg, #38BDF8 0 8px, transparent 8px 14px);
}

.workflow-flow-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 42px minmax(220px, 1fr) 42px minmax(220px, 1fr) 42px minmax(220px, 1fr) 42px minmax(220px, 1fr);
    gap: 12px;
    align-items: stretch;
    margin: 28px 0;
}

.workflow-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #60A5FA;
    font-size: 42px;
    font-weight: 900;
    text-shadow: 0 0 26px rgba(59, 130, 246, .85);
}

.workflow-card,
.workflow-mini-card {
    text-decoration: none;
    color: inherit;
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.workflow-card {
    min-height: 350px;
    padding: 20px;
    border-radius: 22px;
    border: 1px solid rgba(96, 165, 250, .44);
    background: linear-gradient(180deg, rgba(15, 23, 42, .92), rgba(15, 23, 42, .62));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 20px 50px rgba(0, 0, 0, .18);
}

.workflow-card:hover,
.workflow-mini-card:hover {
    transform: translateY(-3px);
    border-color: rgba(96, 165, 250, .86);
    box-shadow: 0 24px 70px rgba(37, 99, 235, .22);
    background: linear-gradient(180deg, rgba(30, 41, 59, .96), rgba(15, 23, 42, .78));
}

.workflow-card-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.workflow-icon {
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    color: #DBEAFE;
    background: linear-gradient(135deg, #2563EB, #0EA5E9);
    box-shadow: 0 12px 35px rgba(37, 99, 235, .34);
}

.workflow-icon .mud-icon-root {
    font-size: 30px;
}

.workflow-card h3 {
    margin: 0;
    color: #F8FAFC;
    font-size: 23px;
    line-height: 1.05;
    letter-spacing: -.03em;
}

.workflow-card p {
    margin: 5px 0 0;
    color: #93C5FD;
    font-size: 13px;
    font-weight: 800;
}

.workflow-card ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.workflow-card li {
    position: relative;
    padding-left: 22px;
    color: #E5E7EB;
    font-size: 14px;
    line-height: 1.25;
}

.workflow-card li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .55em;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #38BDF8;
    box-shadow: 0 0 12px rgba(56, 189, 248, .7);
}

.workflow-support-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
}

.workflow-support-row.top {
    max-width: 620px;
}

.workflow-mini-card {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 92px;
    padding: 15px;
    border-radius: 18px;
    border: 1px solid rgba(96, 165, 250, .4);
    background: rgba(15, 23, 42, .72);
}

.workflow-mini-card .mud-icon-root {
    width: 46px;
    height: 46px;
    padding: 10px;
    border-radius: 15px;
    color: #DBEAFE;
    background: linear-gradient(135deg, #2563EB, #7C3AED);
}

.workflow-mini-card b {
    display: block;
    color: #F8FAFC;
    font-size: 15px;
    margin-bottom: 4px;
}

.workflow-mini-card span {
    display: block;
    color: #94A3B8;
    font-size: 12px;
    line-height: 1.3;
}

.light-mode .workflow-map {
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, .14), transparent 34%),
        #FFFFFF;
    border-color: #BFDBFE;
    box-shadow: 0 22px 60px rgba(15, 23, 42, .08);
}

.light-mode .workflow-map-title h2,
.light-mode .workflow-card h3,
.light-mode .workflow-mini-card b {
    color: #0F172A;
}

.light-mode .workflow-map-title p,
.light-mode .workflow-card p {
    color: #2563EB;
}

.light-mode .workflow-card,
.light-mode .workflow-mini-card,
.light-mode .workflow-legend {
    background: #F8FAFC;
    border-color: #DBEAFE;
    color: #111827;
}

.light-mode .workflow-card:hover,
.light-mode .workflow-mini-card:hover {
    background: #EFF6FF;
}

.light-mode .workflow-card li {
    color: #1F2937;
}

.light-mode .workflow-mini-card span,
.light-mode .workflow-legend {
    color: #475569;
}

@media (max-width: 1500px) {
    .workflow-flow-row {
        grid-template-columns: 1fr;
    }

    .workflow-arrow {
        transform: rotate(90deg);
        min-height: 24px;
    }

    .workflow-card {
        min-height: auto;
    }
}

@media (max-width: 760px) {
    .workflow-map {
        padding: 18px;
    }

    .workflow-map-title {
        flex-direction: column;
    }

    .workflow-legend {
        width: 100%;
    }
}


/* Workflow tabs and structure guide */
.workflow-tabs {
    margin-top: 12px;
}

.workflow-tabs .mud-tabs-toolbar {
    border-radius: 18px;
    margin-bottom: 18px;
    background: rgba(15, 23, 42, .72);
    border: 1px solid rgba(96, 165, 250, .22);
    padding: 6px;
}

.workflow-tab-panel {
    padding-top: 2px;
}

.workflow-structure {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.workflow-structure-hero,
.workflow-data-model,
.workflow-rules-panel {
    border-radius: 24px;
    padding: 24px;
    border: 1px solid rgba(96, 165, 250, .32);
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, .18), transparent 34%),
        rgba(8, 15, 30, .96);
    box-shadow: 0 20px 70px rgba(0, 0, 0, .24);
}

.workflow-structure-hero h2,
.workflow-data-model h3,
.workflow-rules-panel h3 {
    margin: 10px 0 8px;
    color: #F8FAFC;
    letter-spacing: -.03em;
}

.workflow-structure-hero h2 {
    font-size: clamp(28px, 4vw, 46px);
}

.workflow-structure-hero p {
    max-width: 950px;
    margin: 0;
    color: #BBD7FF;
    font-size: 16px;
    line-height: 1.55;
}

.workflow-steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.workflow-step-card {
    position: relative;
    overflow: hidden;
    min-height: 360px;
    padding: 22px;
    border-radius: 24px;
    border: 1px solid rgba(96, 165, 250, .34);
    background: linear-gradient(180deg, rgba(15, 23, 42, .94), rgba(15, 23, 42, .70));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 20px 60px rgba(0, 0, 0, .2);
}

.workflow-step-card::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .16;
    pointer-events: none;
    background: radial-gradient(circle at top right, #38BDF8, transparent 38%);
}

.workflow-step-number {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: #DBEAFE;
    background: linear-gradient(135deg, #2563EB, #0EA5E9);
    font-weight: 1000;
    box-shadow: 0 14px 34px rgba(37, 99, 235, .34);
}

.workflow-step-card h3 {
    position: relative;
    margin: 16px 0 8px;
    color: #F8FAFC;
    font-size: 24px;
    letter-spacing: -.03em;
}

.workflow-step-card p,
.workflow-step-card li {
    position: relative;
    color: #CBD5E1;
    line-height: 1.45;
}

.workflow-step-card ul {
    position: relative;
    margin: 16px 0 20px;
    padding-left: 18px;
}

.workflow-step-card li {
    margin-bottom: 8px;
}

.workflow-step-card a {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 12px;
    text-decoration: none;
    color: #DBEAFE;
    border: 1px solid rgba(96, 165, 250, .48);
    background: rgba(37, 99, 235, .16);
    font-weight: 900;
}

.workflow-step-card a:hover {
    background: rgba(37, 99, 235, .28);
}

.response-step::before { background: radial-gradient(circle at top right, #22C55E, transparent 38%); }
.review-step::before { background: radial-gradient(circle at top right, #A78BFA, transparent 38%); }
.execution-step::before { background: radial-gradient(circle at top right, #F59E0B, transparent 38%); }

.workflow-model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.workflow-model-grid div {
    min-height: 92px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(96, 165, 250, .24);
    background: rgba(15, 23, 42, .62);
}

.workflow-model-grid b {
    display: block;
    color: #F8FAFC;
    margin-bottom: 6px;
}

.workflow-model-grid span {
    display: block;
    color: #94A3B8;
    line-height: 1.35;
    font-size: 13px;
}

.workflow-rule-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.workflow-rule-list div {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(15, 23, 42, .6);
    border: 1px solid rgba(96, 165, 250, .18);
    color: #DCEBFF;
}

.workflow-rule-list .mud-icon-root {
    color: #22C55E;
    margin-top: 1px;
}

.light-mode .workflow-tabs .mud-tabs-toolbar {
    background: #FFFFFF;
    border-color: #DBEAFE;
}

.light-mode .workflow-structure-hero,
.light-mode .workflow-data-model,
.light-mode .workflow-rules-panel,
.light-mode .workflow-step-card {
    background: #FFFFFF;
    border-color: #DBEAFE;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .08);
}

.light-mode .workflow-structure-hero h2,
.light-mode .workflow-data-model h3,
.light-mode .workflow-rules-panel h3,
.light-mode .workflow-step-card h3,
.light-mode .workflow-model-grid b {
    color: #0F172A;
}

.light-mode .workflow-structure-hero p,
.light-mode .workflow-step-card p,
.light-mode .workflow-step-card li,
.light-mode .workflow-rule-list div {
    color: #334155;
}

.light-mode .workflow-model-grid div,
.light-mode .workflow-rule-list div {
    background: #F8FAFC;
    border-color: #E0ECFF;
}

.light-mode .workflow-model-grid span {
    color: #475569;
}

/* -----------------------------
   Helper / Help Center
------------------------------ */
.help-page-header {
    align-items: flex-start;
}

.help-shell {
    padding: 18px;
    border-radius: 22px;
    background: rgba(17, 24, 39, .88);
    border: 1px solid rgba(148, 163, 184, .18);
    margin-bottom: 20px;
}

.help-search-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.help-search {
    flex: 1;
}

.help-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.help-quick-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(148, 163, 184, .22);
    background: rgba(15, 23, 42, .72);
    color: #CBD5E1;
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 800;
    cursor: pointer;
}

.help-quick-chip:hover {
    border-color: rgba(59, 130, 246, .65);
    color: #F8FAFC;
}

.help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.help-card {
    padding: 18px;
    border-radius: 22px;
    background: rgba(17, 24, 39, .9);
    border: 1px solid rgba(148, 163, 184, .16);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.help-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.help-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: #FFFFFF;
    background: linear-gradient(135deg, var(--help-color), rgba(255,255,255,.16));
    box-shadow: 0 12px 28px color-mix(in srgb, var(--help-color), transparent 68%);
}

.help-title {
    color: #F8FAFC;
    font-size: 18px;
    font-weight: 900;
}

.help-subtitle {
    color: #94A3B8;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.help-description {
    color: #CBD5E1;
    margin: 0;
    line-height: 1.55;
}

.help-block {
    padding: 12px;
    border-radius: 16px;
    background: rgba(15, 23, 42, .64);
    border: 1px solid rgba(148, 163, 184, .12);
}

.help-block-title {
    color: #F8FAFC;
    font-size: 13px;
    font-weight: 900;
    margin-bottom: 8px;
}

.help-block ul {
    margin: 0;
    padding-left: 18px;
    color: #CBD5E1;
}

.help-block li {
    margin-bottom: 6px;
}

.help-block li:last-child {
    margin-bottom: 0;
}

.help-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.help-tags span {
    border-radius: 999px;
    background: rgba(59, 130, 246, .14);
    border: 1px solid rgba(59, 130, 246, .22);
    color: #BFDBFE;
    font-size: 12px;
    font-weight: 800;
    padding: 6px 9px;
}

.help-empty {
    margin-top: 20px;
    padding: 34px;
    border-radius: 22px;
    background: rgba(17, 24, 39, .9);
    border: 1px dashed rgba(148, 163, 184, .25);
    text-align: center;
}

.light-mode .help-shell,
.light-mode .help-card,
.light-mode .help-empty {
    background: #FFFFFF;
    border-color: #E5E7EB;
    color: #111827;
}

.light-mode .help-quick-chip {
    background: #F8FAFC;
    border-color: #E5E7EB;
    color: #334155;
}

.light-mode .help-title,
.light-mode .help-block-title {
    color: #111827;
}

.light-mode .help-subtitle,
.light-mode .help-description,
.light-mode .help-block ul {
    color: #64748B;
}

.light-mode .help-block {
    background: #F8FAFC;
    border-color: #E5E7EB;
}

.light-mode .help-tags span {
    background: #EFF6FF;
    border-color: #BFDBFE;
    color: #1D4ED8;
}

@media (max-width: 760px) {
    .help-search-row {
        align-items: stretch;
        flex-direction: column;
    }

    .help-grid {
        grid-template-columns: 1fr;
    }
}


/* -----------------------------
   Meeting Mode
------------------------------ */
.meeting-mode-page {
    color: #E5E7EB;
}

.meeting-topbar {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.meeting-topbar h1 {
    margin: 0;
    color: #F8FAFC;
    font-weight: 950;
    letter-spacing: -.04em;
}

.meeting-topbar p {
    margin: 6px 0 0;
    color: #94A3B8;
}


.meeting-topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-left: auto;
}

.meeting-session-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.meeting-live-pill,
.meeting-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 9px 13px;
    font-weight: 850;
    border: 1px solid rgba(148,163,184,.18);
    background: rgba(15,23,42,.70);
    color: #CBD5E1;
}

.meeting-live-pill {
    color: #86EFAC;
    border-color: rgba(34,197,94,.22);
    background: rgba(22,101,52,.20);
}

.meeting-grid {
    display: grid;
    grid-template-columns: 320px minmax(460px, 1fr) 520px;
    gap: 16px;
    min-height: calc(100vh - 150px);
}

.meeting-panel {
    border-radius: 22px;
    border: 1px solid rgba(148,163,184,.18);
    background:
        radial-gradient(circle at 10% 0%, rgba(59,130,246,.13), transparent 30%),
        rgba(15,23,42,.82);
    box-shadow: 0 18px 42px rgba(2,6,23,.22);
    padding: 18px;
    overflow: hidden;
}

.meeting-panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #F8FAFC;
    font-weight: 950;
    font-size: 18px;
    margin-bottom: 16px;
}

.meeting-panel-title .mud-icon-root {
    color: #60A5FA;
}

.meeting-search {
    margin-bottom: 16px;
}

.meeting-people-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 54vh;
    overflow: auto;
    padding-right: 4px;
}

.meeting-person-card {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 18px;
    border: 1px solid transparent;
    background: transparent;
    color: #E5E7EB;
    padding: 11px 12px;
    text-align: left;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

.meeting-person-card:hover {
    background: rgba(255,255,255,.055);
    transform: translateX(2px);
}

.meeting-person-card.selected {
    background: linear-gradient(135deg, rgba(37,99,235,.80), rgba(59,130,246,.28));
    border-color: rgba(96,165,250,.35);
}

.meeting-avatar {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: #FFFFFF;
    font-weight: 950;
    font-size: 20px;
    background: linear-gradient(135deg, #3B82F6, rgba(255,255,255,.18));
    box-shadow: 0 12px 28px rgba(59,130,246,.22);
}

.meeting-person-info {
    flex: 1;
    min-width: 0;
}

.meeting-person-info strong {
    display: block;
    color: #F8FAFC;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.meeting-person-info span,
.meeting-tasks-header span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #A7B0C0;
    font-size: 13px;
}

.meeting-person-info i,
.meeting-tasks-header i {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #22C55E;
    box-shadow: 0 0 0 4px rgba(34,197,94,.12);
}

.meeting-person-count {
    min-width: 28px;
    height: 28px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(15,23,42,.55);
    color: #CBD5E1;
    font-weight: 900;
}

.meeting-summary-card {
    margin-top: 18px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255,255,255,.045);
    border: 1px solid rgba(148,163,184,.14);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.meeting-summary-card strong {
    color: #F8FAFC;
}

.meeting-summary-card span,
.meeting-summary-card div {
    color: #A7B0C0;
}

.meeting-summary-card div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.meeting-chat-panel {
    display: flex;
    flex-direction: column;
}

.meeting-chat-feed {
    flex: 1;
    overflow: auto;
    padding: 6px 4px 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.meeting-message-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.meeting-message-row.user {
    justify-content: flex-end;
}

.meeting-message-bubble {
    max-width: 72%;
    border-radius: 16px;
    padding: 12px 14px;
    background: rgba(30,41,59,.78);
    border: 1px solid rgba(148,163,184,.12);
    color: #E5E7EB;
    line-height: 1.5;
}

.meeting-message-row.user .meeting-message-bubble {
    background: linear-gradient(135deg, #1D4ED8, #3730A3);
    border-color: rgba(96,165,250,.22);
    color: #FFFFFF;
}

.meeting-message-meta {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: #93C5FD;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 4px;
}

.meeting-message-row.user .meeting-message-meta {
    color: #BFDBFE;
}

.meeting-message-tag {
    border-radius: 999px;
    padding: 5px 8px;
    font-size: 11px;
    font-weight: 950;
    white-space: nowrap;
}

.meeting-message-tag.success {
    background: rgba(34,197,94,.16);
    color: #86EFAC;
}

.meeting-message-tag.warning {
    background: rgba(245,158,11,.16);
    color: #FCD34D;
}

.meeting-command-box {
    display: flex;
    gap: 10px;
    align-items: stretch;
    border-radius: 18px;
    padding: 10px;
    background: rgba(2,6,23,.34);
    border: 1px solid rgba(148,163,184,.16);
}

.meeting-command-input {
    flex: 1;
}

.meeting-command-box .mud-icon-button {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    align-self: center;
}

.meeting-command-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.meeting-command-chips button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 12px;
    padding: 8px 12px;
    border: 1px solid rgba(148,163,184,.16);
    background: rgba(15,23,42,.65);
    color: #CBD5E1;
    font-weight: 850;
    cursor: pointer;
}

.meeting-command-chips button:hover {
    background: rgba(30,41,59,.82);
    color: #F8FAFC;
}

.meeting-task-panel {
    display: flex;
    flex-direction: column;
}

.meeting-tasks-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(148,163,184,.12);
    margin-bottom: 16px;
}

.meeting-tasks-header h2 {
    margin: 0 0 6px;
    color: #F8FAFC;
    font-size: 22px;
    font-weight: 950;
    letter-spacing: -.035em;
}

.meeting-task-group {
    margin-bottom: 18px;
}

.meeting-task-group-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #60A5FA;
    font-weight: 950;
    margin-bottom: 10px;
}

.meeting-task-group-title b {
    min-width: 28px;
    height: 28px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(148,163,184,.14);
    color: #CBD5E1;
}

.meeting-task-card {
    padding: 14px;
    border-radius: 16px;
    background: rgba(30,41,59,.62);
    border: 1px solid rgba(148,163,184,.16);
    margin-bottom: 10px;
}

.meeting-task-card-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.meeting-task-id {
    color: #CBD5E1;
    font-weight: 950;
}

.meeting-task-card strong {
    color: #F8FAFC;
    flex: 1;
}

.meeting-task-card p {
    color: #A7B0C0;
    margin: 8px 0 0;
    line-height: 1.45;
}

.meeting-task-badge {
    border-radius: 999px;
    padding: 5px 8px;
    font-size: 11px;
    font-weight: 950;
    background: rgba(59,130,246,.14);
    color: #93C5FD;
}

.meeting-task-badge.overdue {
    background: rgba(239,68,68,.15);
    color: #FCA5A5;
}

.meeting-task-badge.urgent {
    background: rgba(245,158,11,.16);
    color: #FCD34D;
}

.meeting-task-badge.done {
    background: rgba(34,197,94,.16);
    color: #86EFAC;
}

.meeting-task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
    color: #A7B0C0;
    font-size: 13px;
}

.meeting-task-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.meeting-empty-state {
    min-height: 240px;
    display: grid;
    place-items: center;
    text-align: center;
    color: #94A3B8;
}

.meeting-empty-state .mud-icon-root {
    font-size: 54px;
    color: #60A5FA;
}

.meeting-empty-state strong {
    display: block;
    color: #F8FAFC;
    margin-top: 8px;
}

.light-mode .meeting-mode-page {
    color: #0F172A;
}

.light-mode .meeting-topbar h1,
.light-mode .meeting-panel-title,
.light-mode .meeting-person-info strong,
.light-mode .meeting-summary-card strong,
.light-mode .meeting-tasks-header h2,
.light-mode .meeting-task-card strong,
.light-mode .meeting-empty-state strong {
    color: #0F172A;
}

.light-mode .meeting-topbar p,
.light-mode .meeting-person-info span,
.light-mode .meeting-tasks-header span,
.light-mode .meeting-summary-card span,
.light-mode .meeting-summary-card div,
.light-mode .meeting-task-card p,
.light-mode .meeting-task-meta {
    color: #64748B;
}

.light-mode .meeting-panel {
    background: rgba(255,255,255,.92);
    border-color: rgba(148,163,184,.22);
}

.light-mode .meeting-person-card {
    color: #0F172A;
}

.light-mode .meeting-person-card:hover,
.light-mode .meeting-task-card,
.light-mode .meeting-message-bubble,
.light-mode .meeting-command-chips button,
.light-mode .meeting-command-box,
.light-mode .meeting-summary-card {
    background: rgba(248,250,252,.86);
    border-color: rgba(148,163,184,.22);
}

@media (max-width: 1380px) {
    .meeting-grid {
        grid-template-columns: 280px minmax(420px, 1fr) 420px;
    }
}

@media (max-width: 1120px) {
    .meeting-grid {
        grid-template-columns: 1fr;
    }

    .meeting-people-list {
        max-height: none;
    }
}

/* Meeting Mode - simple editor variant */
.meeting-edit-grid {
    grid-template-columns: 320px minmax(560px, 1fr) 430px;
}

.meeting-editor-panel,
.meeting-tree-panel {
    display: flex;
    flex-direction: column;
}

.meeting-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.meeting-editor-header > div:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
}

.meeting-editor-actions-top {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.meeting-editor-subtitle {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #CBD5E1;
    margin-bottom: 14px;
    font-size: 15px;
}

.meeting-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.meeting-form-card {
    border-radius: 18px;
    border: 1px solid rgba(148,163,184,.15);
    background: rgba(2,6,23,.28);
    padding: 14px;
}

.meeting-form-card-wide {
    grid-column: 1 / -1;
}

.meeting-form-card label {
    display: block;
    font-size: 13px;
    color: #93C5FD;
    font-weight: 800;
    margin-bottom: 8px;
}

.meeting-bottom-actions,
.meeting-tree-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.meeting-tree-subtitle {
    color: #A7B0C0;
    font-size: 13px;
    margin-top: -6px;
    margin-bottom: 12px;
}

.meeting-tree-list {
    margin-top: 14px;
    overflow: auto;
    padding-right: 4px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.meeting-tree-node-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.meeting-tree-node {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    width: 100%;
    border: 1px solid rgba(148,163,184,.18);
    background: rgba(255,255,255,.03);
    border-radius: 18px;
    padding: 14px;
    text-align: left;
    color: #E5E7EB;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.meeting-tree-node:hover {
    background: rgba(255,255,255,.05);
    transform: translateX(1px);
}

.meeting-tree-node.selected {
    border-color: rgba(59,130,246,.7);
    box-shadow: 0 0 0 1px rgba(59,130,246,.35) inset;
    background: linear-gradient(135deg, rgba(30,64,175,.34), rgba(59,130,246,.10));
}

.meeting-tree-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #fff;
}

.meeting-tree-icon.request {
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
}

.meeting-tree-icon.response {
    background: linear-gradient(135deg, #6D28D9, #7C3AED);
}

.meeting-tree-content {
    flex: 1;
    min-width: 0;
}

.meeting-tree-content strong {
    display: block;
    color: #F8FAFC;
}

.meeting-tree-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 6px;
    color: #94A3B8;
    font-size: 12px;
}

.meeting-tree-meta-row span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.meeting-tree-children {
    position: relative;
    margin-left: 22px;
    padding-left: 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.meeting-tree-children::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 10px;
    width: 1px;
    background: rgba(148,163,184,.25);
}

.response-node {
    position: relative;
}

.response-node::before {
    content: "";
    position: absolute;
    left: -15px;
    top: 22px;
    width: 15px;
    height: 1px;
    background: rgba(148,163,184,.25);
}



.meeting-tree-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    align-items: center;
}

.tree-status-badge,
.tree-priority-badge,
.tree-flag-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 22px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .01em;
    white-space: nowrap;
    border: 1px solid rgba(148,163,184,.18);
}

.tree-status-badge.status-new {
    color: #38BDF8;
    background: rgba(14,165,233,.14);
    border-color: rgba(14,165,233,.35);
}

.tree-status-badge.status-progress {
    color: #A78BFA;
    background: rgba(124,58,237,.16);
    border-color: rgba(124,58,237,.36);
}

.tree-status-badge.status-done {
    color: #34D399;
    background: rgba(16,185,129,.14);
    border-color: rgba(16,185,129,.36);
}

.tree-status-badge.status-blocked {
    color: #F87171;
    background: rgba(239,68,68,.14);
    border-color: rgba(239,68,68,.36);
}

.tree-status-badge.status-default {
    color: #CBD5E1;
    background: rgba(148,163,184,.12);
    border-color: rgba(148,163,184,.26);
}

.tree-priority-badge.priority-critical {
    color: #FCA5A5;
    background: rgba(220,38,38,.18);
    border-color: rgba(220,38,38,.46);
}

.tree-priority-badge.priority-high {
    color: #FDBA74;
    background: rgba(249,115,22,.16);
    border-color: rgba(249,115,22,.4);
}

.tree-priority-badge.priority-medium {
    color: #FDE68A;
    background: rgba(234,179,8,.14);
    border-color: rgba(234,179,8,.34);
}

.tree-priority-badge.priority-low,
.tree-priority-badge.priority-default {
    color: #BAE6FD;
    background: rgba(14,165,233,.12);
    border-color: rgba(14,165,233,.28);
}

.tree-flag-badge.danger {
    color: #FCA5A5;
    background: rgba(239,68,68,.16);
    border-color: rgba(239,68,68,.38);
}

.tree-flag-badge.reminder {
    color: #FDE68A;
    background: rgba(245,158,11,.14);
    border-color: rgba(245,158,11,.36);
}

.tree-flag-badge.response {
    color: #C4B5FD;
    background: rgba(109,40,217,.16);
    border-color: rgba(109,40,217,.38);
}

.tree-flag-badge.done {
    color: #86EFAC;
    background: rgba(22,163,74,.14);
    border-color: rgba(22,163,74,.36);
}

.tree-flag-badge.note {
    color: #93C5FD;
    background: rgba(59,130,246,.14);
    border-color: rgba(59,130,246,.32);
}

.tree-flag-badge.recording {
    color: #F0ABFC;
    background: rgba(192,38,211,.16);
    border-color: rgba(192,38,211,.34);
}

.tree-flag-badge.ai {
    color: #A7F3D0;
    background: rgba(5,150,105,.16);
    border-color: rgba(5,150,105,.34);
}

.meeting-tree-node.task-node {
    border-left: 4px solid rgba(59,130,246,.75);
}

.meeting-tree-node.subtask-node {
    border-left: 4px solid rgba(20,184,166,.75);
}

.meeting-tree-node.response-node {
    border-left: 4px solid rgba(124,58,237,.78);
}

.meeting-tree-node.note-node {
    border-left: 4px solid rgba(245,158,11,.72);
}

.light-mode .tree-status-badge.status-new {
    color: #0369A1;
    background: #E0F2FE;
    border-color: #7DD3FC;
}

.light-mode .tree-status-badge.status-progress {
    color: #6D28D9;
    background: #EDE9FE;
    border-color: #C4B5FD;
}

.light-mode .tree-status-badge.status-done {
    color: #047857;
    background: #D1FAE5;
    border-color: #6EE7B7;
}

.light-mode .tree-status-badge.status-blocked,
.light-mode .tree-flag-badge.danger {
    color: #B91C1C;
    background: #FEE2E2;
    border-color: #FCA5A5;
}

.light-mode .tree-priority-badge.priority-high,
.light-mode .tree-priority-badge.priority-critical {
    color: #C2410C;
    background: #FFEDD5;
    border-color: #FDBA74;
}

.meeting-empty-state.compact {
    min-height: auto;
    padding: 26px 20px;
}

.light-mode .meeting-editor-subtitle,
.light-mode .meeting-tree-subtitle {
    color: #5B6474;
}

.light-mode .meeting-form-card {
    background: rgba(255,255,255,.9);
    border-color: rgba(148,163,184,.22);
}

.light-mode .meeting-form-card label {
    color: #2563EB;
}

.light-mode .meeting-tree-node {
    background: rgba(255,255,255,.92);
    color: #0F172A;
}

.light-mode .meeting-tree-node.selected {
    background: linear-gradient(135deg, rgba(219,234,254,.95), rgba(239,246,255,.95));
}

.light-mode .meeting-tree-content strong {
    color: #0F172A;
}

.light-mode .meeting-tree-meta-row {
    color: #64748B;
}

@media (max-width: 1400px) {
    .meeting-edit-grid {
        grid-template-columns: 290px minmax(420px, 1fr) 360px;
    }
}

@media (max-width: 1100px) {
    .meeting-edit-grid {
        grid-template-columns: 1fr;
    }

    .meeting-form-grid {
        grid-template-columns: 1fr;
    }
}

.meeting-tree-icon.subtask {
    background: linear-gradient(135deg, #0F766E, #14B8A6);
}

.subtask-node {
    background: rgba(16,185,129,.05);
}

.nested-subtree {
    margin-left: 18px;
}

.meeting-tree-icon.note {
    background: linear-gradient(135deg, #D97706, #F59E0B);
}

.note-node {
    position: relative;
    background: rgba(245,158,11,.06);
}

.note-node::before {
    content: "";
    position: absolute;
    left: -15px;
    top: 22px;
    width: 15px;
    height: 1px;
    background: rgba(148,163,184,.25);
}

/* Meeting Mode: AI analysis panel */
.meeting-ai-panel {
    margin-top: 18px;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.38);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.22);
}

.meeting-ai-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.meeting-ai-panel-head > div:first-child {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 8px;
    row-gap: 2px;
    align-items: center;
}

.meeting-ai-panel-head strong {
    font-size: 0.95rem;
}

.meeting-ai-panel-head span {
    grid-column: 2;
    color: rgba(226, 232, 240, 0.72);
    font-size: 0.78rem;
}

.meeting-ai-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.meeting-tree-icon.note {
    background: rgba(245, 158, 11, 0.16);
}

.meeting-tree-node.note-node .meeting-tree-content strong {
    color: rgba(255, 255, 255, 0.95);
}

.light-mode .meeting-ai-panel {
    background: rgba(248, 250, 252, 0.88);
    border-color: rgba(148, 163, 184, 0.32);
}

.light-mode .meeting-ai-panel-head span {
    color: rgba(71, 85, 105, 0.78);
}

/* Meeting Mode: notify checkboxes */
.meeting-notify-card {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(96, 165, 250, 0.28);
}

.meeting-notify-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.response-notify-card {
    margin-top: 14px;
}

/* Meeting Mode: audio recording modal */
.meeting-recording-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(2, 6, 23, 0.68);
    backdrop-filter: blur(10px);
}

.meeting-recording-modal {
    width: min(720px, 100%);
    padding: 22px;
    border-radius: 26px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96));
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
}

.meeting-recording-header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}

.meeting-recording-header strong {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #F8FAFC;
    font-size: 1.1rem;
}

.meeting-recording-header p {
    margin: 6px 0 0;
    color: rgba(226, 232, 240, 0.72);
}

.recording-live-dot {
    display: inline-block;
    width: 11px;
    height: 11px;
    border-radius: 999px;
    margin-right: 8px;
    background: #94A3B8;
}

.recording-live-dot.active {
    background: #EF4444;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.72);
    animation: recordingPulse 1.2s infinite;
}

.meeting-wave-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 150px;
    margin: 20px 0;
    border-radius: 22px;
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.22), rgba(15, 23, 42, 0.34));
    overflow: hidden;
}

.meeting-wave-wrap span {
    width: 7px;
    height: 28px;
    border-radius: 999px;
    background: linear-gradient(180deg, #93C5FD, #2563EB);
    opacity: 0.55;
}

.meeting-wave-wrap.active span {
    animation: meetingWave 0.78s ease-in-out infinite alternate;
}

.meeting-recording-task {
    display: grid;
    gap: 4px;
    margin-bottom: 12px;
    color: rgba(226, 232, 240, 0.76);
}

.meeting-recording-task strong {
    color: #F8FAFC;
}

.meeting-recording-audio {
    width: 100%;
    margin: 0 0 12px;
}

.meeting-recording-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 14px;
}

@keyframes meetingWave {
    from { transform: scaleY(0.35); opacity: 0.45; }
    to { transform: scaleY(2.4); opacity: 1; }
}

@keyframes recordingPulse {
    70% { box-shadow: 0 0 0 14px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.light-mode .meeting-recording-modal {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(241, 245, 249, 0.98));
}

.light-mode .meeting-recording-header strong,
.light-mode .meeting-recording-task strong {
    color: #0F172A;
}

.light-mode .meeting-recording-header p,
.light-mode .meeting-recording-task {
    color: #64748B;
}

.light-mode .meeting-wave-wrap {
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.16), rgba(226, 232, 240, 0.52));
}

/* Meeting Mode: live transcription controls */
.meeting-transcription-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 12px;
}

.meeting-transcription-toolbar .mud-input-control {
    max-width: 180px;
    margin: 0;
}

.meeting-transcript-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    color: rgba(226, 232, 240, 0.78);
    background: rgba(15, 23, 42, 0.34);
    font-weight: 700;
    font-size: 0.86rem;
}

.meeting-transcript-pill.active {
    color: #BFDBFE;
    border-color: rgba(96, 165, 250, 0.45);
    background: rgba(37, 99, 235, 0.18);
}

.meeting-transcript-warning {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(251, 191, 36, 0.36);
    color: #FDE68A;
    background: rgba(146, 64, 14, 0.22);
    font-size: 0.9rem;
}

.light-mode .meeting-transcript-pill {
    color: #334155;
    background: rgba(248, 250, 252, 0.78);
}

.light-mode .meeting-transcript-pill.active {
    color: #1D4ED8;
    background: rgba(219, 234, 254, 0.72);
}

.light-mode .meeting-transcript-warning {
    color: #92400E;
    background: rgba(254, 243, 199, 0.78);
}

/* Meeting Center: Word export options modal */
.meeting-export-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1320;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(2, 6, 23, 0.68);
    backdrop-filter: blur(10px);
}

.meeting-export-modal {
    width: min(760px, 100%);
    padding: 22px;
    border-radius: 26px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.97), rgba(30, 41, 59, 0.97));
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
}

.meeting-export-header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.meeting-export-header strong {
    color: #f8fafc;
    font-size: 1.2rem;
}

.meeting-export-header p,
.meeting-export-hint {
    margin: 6px 0 0;
    color: rgba(226, 232, 240, 0.72);
}

.meeting-export-section {
    margin-bottom: 14px;
}

.meeting-export-section label {
    display: block;
    margin-bottom: 6px;
    color: rgba(226, 232, 240, 0.78);
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.meeting-export-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 16px;
    padding: 12px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.45);
}

.meeting-export-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

@media (max-width: 720px) {
    .meeting-export-grid {
        grid-template-columns: 1fr;
    }
}

.meeting-tree-toggle {
    width: 28px;
    min-width: 28px;
    height: 28px;
    margin-top: 8px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    color: #CBD5E1;
    background: rgba(148, 163, 184, .12);
    border: 1px solid rgba(148, 163, 184, .20);
    transition: background .16s ease, color .16s ease, transform .16s ease;
}

.meeting-tree-toggle:hover {
    background: rgba(59, 130, 246, .22);
    color: #FFFFFF;
    transform: scale(1.06);
}

.meeting-tree-toggle.open {
    background: rgba(34, 197, 94, .16);
    border-color: rgba(34, 197, 94, .35);
    color: #BBF7D0;
}

.light-mode .meeting-tree-toggle {
    color: #475569;
    background: rgba(15, 23, 42, .06);
    border-color: rgba(15, 23, 42, .10);
}


/* Visible build/version badge */
.brand-version {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: 6px;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid rgba(96, 165, 250, .32);
    background: rgba(37, 99, 235, .14);
    color: #93C5FD;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .04em;
}

.app-version-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    margin-left: 10px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(96, 165, 250, .30);
    background: rgba(37, 99, 235, .14);
    color: #BFDBFE;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .06em;
    box-shadow: 0 12px 28px rgba(37, 99, 235, .12);
}

.mini-version {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: 10px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(15, 23, 42, .42);
    border: 1px solid rgba(148, 163, 184, .18);
    color: #CBD5E1;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
}

.light-mode .brand-version,
.light-mode .app-version-pill {
    background: rgba(37, 99, 235, .08);
    border-color: rgba(37, 99, 235, .18);
    color: #1D4ED8;
}

.light-mode .mini-version {
    background: rgba(15, 23, 42, .05);
    border-color: rgba(148, 163, 184, .30);
    color: #475569;
}

/* Main sidebar open/close toggle */
.topbar-left-actions {
    display: flex;
    align-items: center;
    min-width: 44px;
}

.sidebar-toggle-button {
    width: 42px;
    height: 42px;
    border-radius: 14px !important;
    border: 1px solid rgba(148, 163, 184, .22) !important;
    background: rgba(15, 23, 42, .55) !important;
    color: #e5e7eb !important;
    box-shadow: 0 14px 30px rgba(0, 0, 0, .22);
}

.sidebar-toggle-button:hover {
    background: rgba(59, 130, 246, .18) !important;
    border-color: rgba(59, 130, 246, .35) !important;
}

.light-mode .sidebar-toggle-button {
    background: rgba(255, 255, 255, .88) !important;
    color: #0f172a !important;
    border-color: rgba(148, 163, 184, .35) !important;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
}

.app-shell.sidebar-collapsed .topbar {
    padding-left: 18px;
}

/* v35 Executive Dashboard */
.exec-dashboard {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.exec-hero {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: stretch;
    padding: 24px;
    border-radius: 28px;
    background: radial-gradient(circle at top left, rgba(59,130,246,.22), transparent 34%), linear-gradient(135deg, rgba(15,23,42,.94), rgba(17,24,39,.82));
    border: 1px solid rgba(148,163,184,.18);
    box-shadow: 0 24px 70px rgba(0,0,0,.24);
}

.exec-kicker {
    display: inline-flex;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(96,165,250,.12);
    color: #93C5FD;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.exec-hero h1 {
    margin: 12px 0 6px;
    font-size: clamp(2rem, 4vw, 3.3rem);
    letter-spacing: -.06em;
    color: #F8FAFC;
}

.exec-hero p {
    margin: 0;
    color: #CBD5E1;
    max-width: 720px;
}

.exec-quick-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(150px, 1fr));
    gap: 10px;
    min-width: 350px;
}

.exec-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 16px;
    color: #E5E7EB;
    text-decoration: none;
    font-weight: 800;
    background: rgba(30,41,59,.72);
    border: 1px solid rgba(148,163,184,.18);
}

.exec-action:hover {
    transform: translateY(-1px);
    border-color: rgba(147,197,253,.45);
}

.exec-action.primary {
    background: linear-gradient(135deg, #2563EB, #7C3AED);
    color: white;
}

.exec-metrics-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(130px, 1fr));
    gap: 12px;
}

.exec-metric {
    padding: 18px;
    border-radius: 22px;
    text-decoration: none;
    background: rgba(15,23,42,.86);
    border: 1px solid rgba(148,163,184,.15);
    box-shadow: 0 18px 44px rgba(0,0,0,.18);
}

.exec-metric span {
    color: #93C5FD;
    font-weight: 900;
    font-size: .82rem;
}

.exec-metric strong {
    display: block;
    color: #F8FAFC;
    font-size: 2.4rem;
    line-height: 1;
    margin: 10px 0 6px;
    letter-spacing: -.06em;
}

.exec-metric small {
    color: #94A3B8;
}

.exec-metric.danger span { color: #FCA5A5; }
.exec-metric.warning span { color: #FCD34D; }
.exec-metric.meeting span { color: #A7F3D0; }
.exec-metric.ai span { color: #C4B5FD; }
.exec-metric.notify span { color: #F9A8D4; }

.exec-main-grid {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 18px;
}

.exec-panel {
    padding: 22px;
    border-radius: 24px;
    background: rgba(15,23,42,.86);
    border: 1px solid rgba(148,163,184,.15);
    box-shadow: 0 18px 48px rgba(0,0,0,.18);
}

.exec-panel h2 {
    margin: 0;
    color: #F8FAFC;
    letter-spacing: -.03em;
}

.exec-panel-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.exec-panel-header.compact {
    align-items: center;
}

.exec-panel-header a {
    color: #93C5FD;
    text-decoration: none;
    font-weight: 800;
}

.morning-brief {
    background: radial-gradient(circle at top right, rgba(124,58,237,.22), transparent 32%), rgba(15,23,42,.88);
}

.brief-section {
    padding: 14px 0;
    border-top: 1px solid rgba(148,163,184,.12);
}

.brief-section:first-of-type {
    border-top: none;
}

.brief-section b {
    color: #F8FAFC;
}

.brief-section ul {
    margin: 8px 0 0;
    padding-left: 20px;
    color: #CBD5E1;
}

.brief-section li { margin: 4px 0; }
.brief-section a { color: #BFDBFE; text-decoration: none; }
.brief-section p { color: #CBD5E1; margin: 8px 0 0; }
.ai-reco { color: #DDD6FE; }

.workload-list,
.project-health-list,
.risk-list,
.activity-feed,
.meeting-focus-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.workload-top,
.project-title-line {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 7px;
}

.workload-top b,
.project-title-line b,
.risk-row b,
.meeting-focus-row b,
.activity-row b {
    color: #F8FAFC;
}

.workload-top span,
.project-health-row small,
.risk-row small,
.meeting-focus-row small,
.activity-row small,
.exec-muted {
    color: #94A3B8;
}

.workload-bar,
.project-health-bar {
    height: 9px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(51,65,85,.9);
}

.workload-bar i,
.project-health-bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #22C55E, #3B82F6, #A855F7);
}

.project-health-row {
    padding: 12px;
    border-radius: 16px;
    background: rgba(30,41,59,.55);
    border: 1px solid rgba(148,163,184,.10);
}

.project-health-row small {
    display: block;
    margin-top: 7px;
}

.risk-row,
.meeting-focus-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: center;
    text-decoration: none;
    padding: 12px;
    border-radius: 16px;
    background: rgba(30,41,59,.52);
    border: 1px solid rgba(148,163,184,.10);
}

.risk-flag,
.meeting-priority {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 900;
}

.risk-flag.overdue { background: rgba(239,68,68,.16); color: #FCA5A5; }
.risk-flag.blocked { background: rgba(245,158,11,.16); color: #FCD34D; }
.risk-flag.critical { background: rgba(236,72,153,.16); color: #F9A8D4; }
.risk-flag.stale { background: rgba(148,163,184,.16); color: #CBD5E1; }
.meeting-priority.critical { background: rgba(239,68,68,.16); color: #FCA5A5; }
.meeting-priority.high { background: rgba(245,158,11,.16); color: #FCD34D; }
.meeting-priority.normal { background: rgba(59,130,246,.16); color: #BFDBFE; }

.activity-row {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(148,163,184,.10);
}

.activity-row span {
    color: #93C5FD;
    font-size: .78rem;
    font-weight: 800;
}

.light-mode .exec-hero,
.light-mode .exec-panel,
.light-mode .exec-metric {
    background: #FFFFFF;
    border-color: #E5E7EB;
    box-shadow: 0 18px 42px rgba(15,23,42,.08);
}

.light-mode .exec-hero h1,
.light-mode .exec-panel h2,
.light-mode .exec-metric strong,
.light-mode .workload-top b,
.light-mode .project-title-line b,
.light-mode .risk-row b,
.light-mode .meeting-focus-row b,
.light-mode .activity-row b,
.light-mode .brief-section b {
    color: #111827;
}

.light-mode .exec-hero p,
.light-mode .brief-section ul,
.light-mode .brief-section p,
.light-mode .workload-top span,
.light-mode .project-health-row small,
.light-mode .risk-row small,
.light-mode .meeting-focus-row small,
.light-mode .activity-row small,
.light-mode .exec-muted,
.light-mode .exec-metric small {
    color: #475569;
}

.light-mode .exec-action {
    background: #F8FAFC;
    color: #111827;
    border-color: #E5E7EB;
}

.light-mode .exec-action.primary {
    color: #FFFFFF;
}

.light-mode .project-health-row,
.light-mode .risk-row,
.light-mode .meeting-focus-row {
    background: #F8FAFC;
    border-color: #E5E7EB;
}

.light-mode .workload-bar,
.light-mode .project-health-bar {
    background: #E2E8F0;
}

@media (max-width: 1280px) {
    .exec-metrics-grid { grid-template-columns: repeat(3, 1fr); }
    .exec-main-grid { grid-template-columns: 1fr; }
    .exec-hero { flex-direction: column; }
    .exec-quick-actions { min-width: 0; }
}

@media (max-width: 720px) {
    .exec-metrics-grid { grid-template-columns: repeat(2, 1fr); }
    .exec-quick-actions { grid-template-columns: 1fr; }
    .activity-row { grid-template-columns: 1fr; }
}

/* v36 Workflow explanation page */
.workflow-steps-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
    margin: 18px 0 22px;
}
.workflow-step-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 190px;
    padding: 18px;
    border-radius: 22px;
    text-decoration: none;
    color: inherit;
    background: rgba(15, 23, 42, .72);
    border: 1px solid rgba(148, 163, 184, .18);
    box-shadow: 0 18px 45px rgba(15, 23, 42, .18);
    overflow: hidden;
}
.workflow-step-card:before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(59, 130, 246, .22), transparent 42%);
    pointer-events: none;
}
.workflow-step-card:hover {
    transform: translateY(-2px);
    border-color: rgba(96, 165, 250, .45);
}
.workflow-step-card .mud-icon-root {
    color: #93c5fd;
    font-size: 2rem;
}
.workflow-step-card h2 {
    margin: 0;
    font-size: 1.05rem;
}
.workflow-step-card p {
    margin: 0;
    color: #cbd5e1;
    font-size: .86rem;
    line-height: 1.45;
}
.workflow-step-number {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(59, 130, 246, .18);
    color: #bfdbfe;
    font-weight: 800;
}
.workflow-feature-list {
    margin: 0;
    padding-left: 20px;
    color: #cbd5e1;
    line-height: 1.7;
}
.light-mode .workflow-step-card {
    background: #ffffff;
    color: #0f172a;
    border-color: rgba(148, 163, 184, .35);
}
.light-mode .workflow-step-card p,
.light-mode .workflow-feature-list {
    color: #475569;
}
@media (max-width: 1400px) {
    .workflow-steps-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .workflow-steps-grid { grid-template-columns: 1fr; }
}

/* v37 workflow map upgrade */
.workflow-map-title.centered {
    justify-content: center;
    text-align: center;
}

.workflow-connections-page {
    min-height: calc(100vh - 64px);
}

.workflow-intake-row {
    margin-bottom: 18px;
}

.workflow-flow-row.workflow-flow-row-six {
    grid-template-columns: minmax(185px, 1fr) 30px minmax(185px, 1fr) 30px minmax(210px, 1.15fr) 30px minmax(185px, 1fr) 30px minmax(185px, 1fr) 30px minmax(185px, 1fr);
    gap: 10px;
}

.workflow-flow-row-six .workflow-card {
    min-height: 360px;
    padding: 18px;
}

.workflow-flow-row-six .workflow-card h3 {
    font-size: 21px;
}

.workflow-flow-row-six .workflow-card li {
    font-size: 13px;
    line-height: 1.2;
}

.workflow-flow-row-six .workflow-arrow {
    font-size: 34px;
}

.workflow-card-meeting {
    border-color: rgba(34, 197, 94, .7) !important;
    background:
        radial-gradient(circle at top left, rgba(34, 197, 94, .2), transparent 46%),
        linear-gradient(180deg, rgba(15, 23, 42, .96), rgba(15, 23, 42, .7)) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 24px 70px rgba(34, 197, 94, .15) !important;
}

.workflow-icon.meeting {
    background: linear-gradient(135deg, #16A34A, #22C55E);
    box-shadow: 0 12px 35px rgba(34, 197, 94, .28);
}

.workflow-icon.ai {
    background: linear-gradient(135deg, #7C3AED, #06B6D4);
    box-shadow: 0 12px 35px rgba(124, 58, 237, .3);
}

.workflow-inline-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 9px 16px;
    border-radius: 12px;
    color: #DBEAFE;
    border: 1px solid rgba(56, 189, 248, .55);
    background: rgba(14, 165, 233, .12);
    font-size: 13px;
    font-weight: 900;
}

.workflow-bottom-links {
    margin-top: 18px;
}

.workflow-ai-legend-row {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) 260px;
    gap: 16px;
    margin-top: 18px;
    align-items: stretch;
}

.workflow-ai-panel {
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(125, 211, 252, .36);
    background: rgba(15, 23, 42, .72);
}

.workflow-ai-panel h3 {
    margin: 0;
    color: #F8FAFC;
    font-size: 23px;
    letter-spacing: -.03em;
}

.workflow-ai-panel p {
    margin: 5px 0 0;
    color: #93C5FD;
    font-size: 13px;
    font-weight: 800;
}

.workflow-chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.workflow-chip-grid span {
    display: inline-flex;
    align-items: center;
    padding: 7px 11px;
    border-radius: 999px;
    color: #DBEAFE;
    background: rgba(59, 130, 246, .13);
    border: 1px solid rgba(96, 165, 250, .28);
    font-size: 12px;
    font-weight: 900;
}

.legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    display: inline-block;
    box-shadow: 0 0 14px currentColor;
}

.legend-dot.meeting { color: #22C55E; background: #22C55E; }
.legend-dot.ai { color: #A78BFA; background: #A78BFA; }

.light-mode .workflow-card-meeting {
    background: #F0FDF4 !important;
    border-color: #86EFAC !important;
}

.light-mode .workflow-ai-panel {
    background: #F8FAFC;
    border-color: #DBEAFE;
}

.light-mode .workflow-ai-panel h3 {
    color: #0F172A;
}

.light-mode .workflow-ai-panel p {
    color: #2563EB;
}

.light-mode .workflow-chip-grid span {
    color: #1E3A8A;
    background: #EFF6FF;
    border-color: #BFDBFE;
}

@media (max-width: 1800px) {
    .workflow-flow-row.workflow-flow-row-six {
        grid-template-columns: 1fr;
    }

    .workflow-flow-row-six .workflow-arrow {
        transform: rotate(90deg);
        min-height: 24px;
    }

    .workflow-flow-row-six .workflow-card {
        min-height: auto;
    }
}

@media (max-width: 900px) {
    .workflow-ai-legend-row {
        grid-template-columns: 1fr;
    }
}

/* v40 typed meeting note badges */
.tree-flag-badge.impact {
    color: #7dd3fc;
    background: rgba(14, 165, 233, .14);
    border-color: rgba(14, 165, 233, .45);
}

.tree-flag-badge.decision {
    color: #86efac;
    background: rgba(34, 197, 94, .14);
    border-color: rgba(34, 197, 94, .45);
}

.tree-flag-badge.blocked {
    color: #fca5a5;
    background: rgba(239, 68, 68, .14);
    border-color: rgba(239, 68, 68, .45);
}

.tree-flag-badge.risk {
    color: #fde68a;
    background: rgba(245, 158, 11, .16);
    border-color: rgba(245, 158, 11, .45);
}

.tree-flag-badge.progress {
    color: #c4b5fd;
    background: rgba(139, 92, 246, .16);
    border-color: rgba(139, 92, 246, .45);
}

.meeting-note-hint-card p {
    margin: 0;
    color: rgba(226, 232, 240, .75);
    line-height: 1.45;
}


/* Always-visible build/version badge */
.global-build-badge {
    position: fixed;
    right: 18px;
    bottom: 16px;
    z-index: 1300;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(96, 165, 250, .36);
    background: rgba(15, 23, 42, .82);
    color: #BFDBFE;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .04em;
    box-shadow: 0 16px 40px rgba(2, 6, 23, .38);
    backdrop-filter: blur(12px);
    pointer-events: none;
}

.light-mode .global-build-badge {
    background: rgba(255, 255, 255, .88);
    border-color: rgba(37, 99, 235, .22);
    color: #1D4ED8;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .12);
}

/* v35 Roles & Permissions hybrid access UI */
.roles-page-header {
    margin-bottom: 4px;
}

.roles-card,
.roles-detail-card {
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.86));
}

.role-list,
.permission-groups,
.role-user-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.role-list-item {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.72);
    color: inherit;
    padding: 12px;
    display: grid;
    grid-template-columns: 38px 1fr auto;
    gap: 10px;
    text-align: left;
    align-items: center;
    cursor: pointer;
}

.role-list-item.active {
    border-color: rgba(139, 92, 246, 0.8);
    background: linear-gradient(135deg, rgba(88, 28, 135, 0.55), rgba(30, 41, 59, 0.8));
}

.role-icon,
.role-detail-icon {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #c4b5fd;
    background: rgba(139, 92, 246, 0.18);
}

.role-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.role-copy small,
.role-user-row small,
.permission-row small {
    color: #94a3b8;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

.role-count {
    min-width: 28px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
    text-align: center;
    color: #cbd5e1;
}

.role-detail-heading {
    display: flex;
    gap: 14px;
    align-items: center;
}

.role-detail-icon {
    width: 58px;
    height: 58px;
}

.security-stat {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    padding: 14px;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.security-stat b {
    font-size: 22px;
}

.security-stat span {
    color: #94a3b8;
}

.permission-group {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.5);
}

.permission-group-title {
    display: flex;
    justify-content: space-between;
    padding: 10px 12px;
    font-weight: 800;
    background: rgba(30, 41, 59, 0.86);
}

.permission-group-title span {
    color: #93c5fd;
}

.permission-row {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 10px;
    padding: 10px 12px;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    cursor: pointer;
}

.permission-row input {
    margin-top: 4px;
    accent-color: #8b5cf6;
}

.role-user-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    padding: 10px 12px;
    background: rgba(15, 23, 42, 0.55);
}

.assign-user-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.assign-user-box label {
    font-weight: 800;
}

.tc-native-select {
    width: 100%;
    height: 42px;
    color: #e5e7eb;
    background: #111827;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 10px;
    padding: 0 12px;
}

/* v37 Menu Management */
.menu-settings-group-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: calc(100vh - 340px);
    overflow: auto;
    padding-right: 4px;
}

.menu-settings-detail {
    min-height: 620px;
}

.menu-settings-form-grid,
.menu-settings-item-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.menu-settings-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: rgba(226, 232, 240, .88);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .01em;
}

.menu-settings-field.wide {
    grid-column: span 2;
}

.menu-settings-field input,
.menu-settings-field select {
    width: 100%;
    min-height: 42px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, .22);
    background: rgba(15, 23, 42, .72);
    color: #e5e7eb;
    padding: 0 12px;
    outline: none;
}

.menu-settings-field input[type="checkbox"] {
    width: 20px;
    min-height: 20px;
    accent-color: #8b5cf6;
}

.menu-settings-field input:focus,
.menu-settings-field select:focus {
    border-color: rgba(59, 130, 246, .8);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}

.menu-settings-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.menu-settings-item-card {
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 16px;
    background: rgba(15, 23, 42, .42);
    padding: 14px;
}

.menu-settings-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.menu-settings-item-header label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-weight: 800;
    color: #e5e7eb;
}

.menu-settings-item-header input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #8b5cf6;
}

@media (max-width: 980px) {
    .menu-settings-form-grid,
    .menu-settings-item-grid {
        grid-template-columns: 1fr;
    }

    .menu-settings-field.wide {
        grid-column: auto;
    }
}

/* v39/v44: Admin per-user menu editor */
.menu-settings-user-picker {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) auto;
    gap: 14px;
    align-items: end;
}

.menu-settings-user-status {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    min-height: 42px;
}

@media (max-width: 1100px) {
    .menu-settings-user-picker {
        grid-template-columns: 1fr;
    }
}

/* v40: simplified Menu Management editor */
.menu-settings-simple-tabs {
    display: flex;
    gap: 8px;
    padding: 6px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.48);
    border-radius: 16px;
}

.menu-settings-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: rgba(226, 232, 240, 0.72);
    font-weight: 800;
    cursor: pointer;
    transition: all 0.16s ease;
}

.menu-settings-tab:hover {
    color: #fff;
    background: rgba(148, 163, 184, 0.08);
    border-color: rgba(148, 163, 184, 0.18);
}

.menu-settings-tab.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.92), rgba(59, 130, 246, 0.72));
    border-color: rgba(167, 139, 250, 0.55);
    box-shadow: 0 14px 30px rgba(79, 70, 229, 0.24);
}

.menu-settings-section-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.34);
}

.menu-settings-form-grid.simple {
    grid-template-columns: 140px minmax(260px, 1fr) 180px 120px;
}

.menu-settings-item-card.simple {
    padding: 14px;
}

.menu-settings-item-grid.simple {
    grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) 110px;
}

.menu-settings-item-header strong {
    color: #f8fafc;
    font-size: 0.95rem;
}

.menu-settings-item-header small {
    color: rgba(148, 163, 184, 0.85);
    font-weight: 700;
}

@media (max-width: 900px) {
    .menu-settings-form-grid.simple,
    .menu-settings-item-grid.simple {
        grid-template-columns: 1fr;
    }

    .menu-settings-simple-tabs {
        flex-direction: column;
    }
}


/* v41: wrap long permission codes/descriptions in Roles & Permissions */
.roles-detail-card {
    overflow: hidden;
}

.roles-detail-card .mud-grid-item,
.roles-detail-card .permission-groups,
.roles-detail-card .permission-group,
.roles-detail-card .role-user-list,
.roles-detail-card .assign-user-box {
    min-width: 0;
}

.permission-group-title {
    gap: 10px;
    align-items: center;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.permission-group-title > :first-child,
.permission-group-title b {
    min-width: 0;
}

.permission-row {
    grid-template-columns: 26px minmax(0, 1fr);
    align-items: flex-start;
    min-width: 0;
}

.permission-row > span {
    min-width: 0;
    display: block;
    max-width: 100%;
}

.permission-row b,
.permission-row small {
    display: block;
    max-width: 100%;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.28;
}

.permission-row small {
    margin-top: 2px;
}

.role-user-row > div,
.role-copy {
    min-width: 0;
}

.role-user-row b,
.role-user-row small,
.role-copy b,
.role-copy small {
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

/* v42: create/edit/duplicate/delete roles UI */
.role-actions-wrap {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.permissions-title-row {
    gap: 10px;
    flex-wrap: wrap;
}

.role-list-item.inactive {
    opacity: .68;
}

.role-copy em {
    display: inline-flex;
    width: fit-content;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid rgba(245, 158, 11, .4);
    color: #fbbf24;
    background: rgba(245, 158, 11, .12);
    font-style: normal;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.role-editor-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(2, 6, 23, .72);
    backdrop-filter: blur(8px);
}

.role-editor-modal {
    width: min(680px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    overflow: auto;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(15, 23, 42, .98), rgba(15, 23, 42, .94));
    box-shadow: 0 24px 80px rgba(0, 0, 0, .48);
}

.role-code-row {
    gap: 12px;
}

.role-code-row .mud-input-control {
    flex: 1 1 auto;
}

.tc-field-label {
    display: block;
    margin: 0 0 8px;
    color: #dbeafe;
    font-size: 13px;
    font-weight: 800;
}

.form-help-text {
    display: block;
    margin-top: 6px;
    color: #94a3b8;
    font-size: 12px;
}

.role-active-toggle {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 12px;
    align-items: flex-start;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 14px;
    background: rgba(15, 23, 42, .6);
    cursor: pointer;
}

.role-active-toggle input {
    width: 18px;
    height: 18px;
    accent-color: #8b5cf6;
    margin-top: 2px;
}

.role-active-toggle b,
.role-active-toggle small {
    display: block;
    overflow-wrap: anywhere;
}

.role-active-toggle small {
    color: #93a4bd;
    margin-top: 2px;
}

@media (max-width: 700px) {
    .role-editor-backdrop {
        align-items: flex-start;
        padding: 12px;
    }

    .role-code-row {
        flex-direction: column;
        align-items: stretch !important;
    }
}

/* v43: collapsible permission groups in Roles & Permissions */
.permissions-toolbar-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.permission-group-toggle {
    width: 100%;
    border: 0;
    color: inherit;
    cursor: pointer;
    text-align: left;
}

.permission-group-toggle:hover {
    background: rgba(51, 65, 85, .92);
}

.permission-group-name {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.permission-group.collapsed {
    background: rgba(15, 23, 42, .38);
}

.permission-group.collapsed .permission-group-title {
    border-radius: 14px;
}

/* v45: searchable user selector inside Menu Management user dropdown */
.menu-user-autocomplete {
    width: 100%;
}

.menu-user-option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 2px 0;
}

.menu-user-option-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.25;
}

.menu-user-option-copy b,
.menu-user-option-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.menu-user-option-copy small {
    color: var(--text-muted, #94a3b8);
    font-size: .78rem;
}


/* v46: clean package note - build artifacts are excluded; delete bin/obj if Visual Studio reports corrupted project.assets.json. */
