:root {
    --color-bg-page: #f9fafb;
    --color-bg-surface: #ffffff;
    --color-bg-muted: #fafafa;
    --color-bg-subtle: #f3f4f6;
    --color-border: #e5e7eb;
    --color-border-strong: #d1d5db;
    --color-text-primary: #111827;
    --color-text-body: #374151;
    --color-text-muted: #6b7280;
    --color-brand: #7c3aed;
    --color-brand-gradient: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
    --sidebar-width: 256px;
    --app-header-height: 72px;
    --radius-card: 12px;
    --radius-control: 8px;

    /* Chart palette — matches design.md + brand purple */
    --chart-brand-fill: rgba(147, 51, 234, 0.88);
    --chart-brand-stroke: #9333ea;
    --chart-brand-deep-fill: rgba(124, 58, 237, 0.88);
    --chart-brand-deep-stroke: #7c3aed;
    --chart-brand-light-fill: rgba(196, 181, 253, 0.85);
    --chart-brand-light-stroke: #c4b5fd;
    --chart-success-fill: rgba(16, 185, 129, 0.88);
    --chart-success-stroke: #10b981;
    --chart-danger-fill: rgba(239, 68, 68, 0.88);
    --chart-danger-stroke: #ef4444;
    --chart-warning-fill: rgba(245, 158, 11, 0.88);
    --chart-warning-stroke: #f59e0b;
    --chart-muted-fill: rgba(107, 114, 128, 0.7);
    --chart-muted-stroke: #9ca3af;
    --chart-grid: #f3f4f6;
    --chart-tick: #6b7280;
    --chart-axis: #e5e7eb;
    --chart-area-bg: #fafafa;
    --chart-tooltip-bg: rgba(17, 24, 39, 0.92);
    --chart-tooltip-text: #ffffff;

    /* Milestone doughnut — purple CRM shades (on track → behind → at risk → other) */
    --chart-milestone-on-track-fill: #9333ea;
    --chart-milestone-on-track-stroke: #7c3aed;
    --chart-milestone-behind-fill: #6d28d9;
    --chart-milestone-behind-stroke: #5b21b6;
    --chart-milestone-at-risk-fill: #c4b5fd;
    --chart-milestone-at-risk-stroke: #a78bfa;
    --chart-milestone-other-fill: #e5e7eb;
    --chart-milestone-other-stroke: #9ca3af;

    /* Performance bar chart — purple scale by % vs plan */
    --chart-performance-excellent-fill: #9333ea;
    --chart-performance-excellent-stroke: #7c3aed;
    --chart-performance-good-fill: #8b5cf6;
    --chart-performance-good-stroke: #7c3aed;
    --chart-performance-fair-fill: #a78bfa;
    --chart-performance-fair-stroke: #8b5cf6;
    --chart-performance-low-fill: #7c3aed;
    --chart-performance-low-stroke: #6d28d9;
    --chart-performance-critical-fill: #6d28d9;
    --chart-performance-critical-stroke: #5b21b6;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--color-text-body);
    background: var(--color-bg-page);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--color-brand); text-decoration: none; }
a:hover { color: #6d28d9; }

.app-container { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-width);
    background: var(--color-bg-surface);
    border-right: 1px solid var(--color-border);
    position: fixed;
    top: 0; left: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    height: var(--app-header-height);
    min-height: var(--app-header-height);
    max-height: var(--app-header-height);
    padding: 0 16px;
    background: white;
    box-sizing: border-box;
}

.sidebar-brand-link {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    line-height: 0;
    text-decoration: none;
}

.sidebar-brand-logo {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 48px;
    object-fit: contain;
    object-position: left center;
}

.sidebar-nav { padding: 16px 12px; flex: 1; overflow-y: auto; }

.nav-section-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    padding: 8px 16px 4px;
}

.nav-item {
    display: block;
    padding: 12px 16px;
    border-radius: var(--radius-control);
    color: var(--color-text-body);
    font-weight: 500;
    margin-bottom: 2px;
    transition: background 0.15s, color 0.15s;
}

.nav-item:hover { background: var(--color-bg-page); color: var(--color-text-primary); }

.nav-item.is-active {
    background: #f3e8ff;
    color: var(--color-brand);
    font-weight: 600;
}

.nav-item-content { display: flex; align-items: center; gap: 10px; }
.nav-item-icon { width: 20px; height: 20px; flex-shrink: 0; }

.sidebar-footer {
    padding: 12px;
    position: relative;
    z-index: 110;
}

.sidebar-user-menu {
    position: relative;
}

.sidebar-user-details {
    position: relative;
}

.sidebar-user-details[open] {
    z-index: 120;
}

.sidebar-user-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: var(--radius-control);
    background: transparent;
    cursor: pointer;
    list-style: none;
    text-align: left;
    transition: background 0.15s, border-color 0.15s;
    font-family: inherit;
}

.sidebar-user-trigger::-webkit-details-marker,
.sidebar-user-trigger::marker {
    display: none;
    content: '';
}

.sidebar-user-trigger:hover,
.sidebar-user-details[open] .sidebar-user-trigger {
    background: var(--color-bg-page);
    border-color: var(--color-border);
}

.sidebar-user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-brand-gradient);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.28);
    object-fit: cover;
}

.sidebar-user-avatar--photo {
    background: none;
    padding: 0;
    color: transparent;
}

.sidebar-user-avatar--large {
    width: 56px;
    height: 56px;
    font-size: 18px;
}

.sidebar-user-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-email {
    font-size: 12px;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 12px;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-chevron {
    flex-shrink: 0;
    color: var(--color-text-muted);
    transition: transform 0.15s;
}

.sidebar-user-details[open] .sidebar-user-chevron {
    transform: rotate(180deg);
    color: var(--color-brand);
}

.sidebar-user-details > .sidebar-user-dropdown {
    display: none;
}

.sidebar-user-details[open] > .sidebar-user-dropdown {
    display: block;
}

.sidebar-user-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100% + 8px);
    z-index: 130;
    padding: 6px;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-control);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
}

.sidebar-user-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--color-text-body);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.sidebar-user-item:hover,
.sidebar-user-item.is-active {
    background: #f3e8ff;
    color: var(--color-brand);
}

.sidebar-user-item--danger {
    color: #dc2626;
}

.sidebar-user-item--danger:hover {
    background: #fef2f2;
    color: #b91c1c;
}

.sidebar-user-form {
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--color-bg-subtle);
    margin-top: 4px;
    padding-top: 4px;
}

.profile-settings-page {
    width: 100%;
    max-width: none;
}

.content--profile {
    padding: 24px 32px 48px;
    width: 100%;
}

.profile-hero-card {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 28px 32px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #faf5ff 0%, #f5f3ff 55%, #ffffff 100%);
    border: 1px solid #ede9fe;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.profile-hero-content {
    min-width: 0;
}

.profile-hero-name {
    margin: 0 0 6px;
    font-size: 28px;
    font-weight: 700;
    color: var(--color-text-primary);
    letter-spacing: -0.02em;
}

.profile-hero-subtitle {
    margin: 0 0 12px;
    font-size: 14px;
    color: var(--color-text-muted);
}

.profile-email-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 9999px;
    background: #f3e8ff;
    border: 1px solid #ddd6fe;
    color: #6d28d9;
    font-size: 13px;
    font-weight: 500;
}

.profile-settings-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    width: 100%;
}

.profile-settings-nav {
    position: sticky;
    top: calc(var(--app-header-height) + 24px);
    padding: 24px;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    min-height: 320px;
}

.profile-settings-nav-label {
    margin: 0 0 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.profile-settings-nav-label--roles {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

.profile-settings-nav-link {
    display: block;
    padding: 8px 10px;
    margin-bottom: 2px;
    border-radius: 8px;
    color: var(--color-text-body);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.profile-settings-nav-link:hover {
    background: var(--color-bg-page);
    color: var(--color-brand);
}

.profile-role-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 9999px;
    background: #f3e8ff;
    border: 1px solid #ddd6fe;
    color: #7c3aed;
    font-size: 12px;
    font-weight: 600;
}

.profile-role-badge--large {
    font-size: 13px;
    padding: 8px 14px;
}

.profile-settings-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.profile-settings-panel {
    scroll-margin-top: calc(var(--app-header-height) + 24px);
    padding: 28px 32px;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    width: 100%;
}

.profile-settings-panel-header h3 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.profile-settings-panel-header p {
    margin: 0 0 20px;
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.profile-settings-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
}

.profile-settings-form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

.profile-settings-form-actions .crm-filter-btn {
    height: 40px;
    padding: 0 18px;
    font-size: 14px;
}

.profile-roles-list {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.profile-settings-text {
    margin: 0;
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.profile-settings-panel--danger .profile-settings-panel-header h3 {
    color: #dc2626;
}

.sidebar-user-avatar--profile {
    width: 80px;
    height: 80px;
    font-size: 24px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.24);
}

.profile-avatar-uploader {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    padding: 18px 20px;
    background: #fafafa;
    border: 1px solid var(--color-border);
    border-radius: 14px;
}

.profile-avatar-uploader-meta {
    min-width: 0;
}

.profile-avatar-uploader-title {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.profile-avatar-uploader-hint {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--color-text-muted);
}

.profile-avatar-uploader-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.profile-avatar-choose {
    height: 34px;
    padding: 0 14px;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

.profile-avatar-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.profile-avatar-remove {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #b91c1c;
    cursor: pointer;
}

.profile-avatar-filename {
    margin: 10px 0 0;
    font-size: 13px;
    color: #059669;
    font-weight: 500;
}

@media (max-width: 640px) {
    .profile-avatar-uploader {
        flex-direction: column;
        align-items: flex-start;
    }
}

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-width: 0;
    position: relative;
}

.header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--color-bg-surface);
    border-bottom: 1px solid var(--color-border);
    height: var(--app-header-height);
    min-height: var(--app-header-height);
    max-height: var(--app-header-height);
    display: flex;
    align-items: center;
    overflow: visible;
    box-sizing: border-box;
}

.header-content {
    padding: 0 24px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    overflow: visible;
}

.header-main {
    min-width: 0;
    flex: 1;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    overflow: visible;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.header-search {
    position: relative;
    width: min(320px, 36vw);
}

.header-search-label {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    color: #9ca3af;
    pointer-events: none;
}

.header-search-input {
    width: 100%;
    height: 38px;
    padding: 0 12px 0 36px;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-control);
    font-size: 13px;
    font-family: inherit;
    color: var(--color-text-primary);
    background: #f9fafb;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.header-search-input::placeholder {
    color: #9ca3af;
}

.header-search-input:focus {
    outline: none;
    border-color: #c4b5fd;
    background: white;
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.12);
}

.header-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 80;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
    overflow: hidden;
}

.header-search-empty {
    margin: 0;
    padding: 14px 16px;
    font-size: 13px;
    color: var(--color-text-muted);
}

.header-search-list {
    list-style: none;
    margin: 0;
    padding: 6px;
    max-height: 320px;
    overflow-y: auto;
}

.header-search-result {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
}

.header-search-result:hover {
    background: #f5f3ff;
}

.header-search-result-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.header-search-result-meta {
    font-size: 12px;
    color: var(--color-text-muted);
}

.header-notifications {
    position: relative;
}

.header-notifications-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-control);
    background: #f9fafb;
    color: #4b5563;
    cursor: pointer;
    list-style: none;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.header-notifications-trigger::-webkit-details-marker,
.header-notifications-trigger::marker {
    display: none;
}

.header-notifications-trigger:hover,
.header-notifications[open] .header-notifications-trigger {
    border-color: #c4b5fd;
    background: #f5f3ff;
    color: var(--color-brand);
}

.header-notifications-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #dc2626;
    color: white;
    font-size: 10px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    transition: transform 0.2s ease;
}

.header-notifications-badge.is-live {
    animation: notification-badge-pulse 0.45s ease;
}

@keyframes notification-badge-pulse {
    0% { transform: scale(1); }
    35% { transform: scale(1.18); }
    100% { transform: scale(1); }
}

.header-notifications-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(360px, calc(100vw - 32px));
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
    overflow: hidden;
    z-index: 120;
    pointer-events: auto;
}

.header-notifications > .header-notifications-panel {
    display: none;
}

.header-notifications[open] > .header-notifications-panel {
    display: block;
}

.header-notifications-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--color-border);
}

.header-notifications-header h2 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.header-notifications-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-brand);
}

.header-notifications-empty {
    margin: 0;
    padding: 20px 16px;
    font-size: 13px;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.header-notifications-list {
    list-style: none;
    margin: 0;
    padding: 6px;
    max-height: 320px;
    overflow-y: auto;
}

.header-notification-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-left: 3px solid transparent;
    border-radius: 8px;
    background: transparent;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    font: inherit;
}

.header-notification-item:hover {
    background: #f9fafb;
}

.header-notification-item--warning {
    border-left-color: #f59e0b;
}

.header-notification-item--danger {
    border-left-color: #dc2626;
}

.header-notification-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.header-notification-message {
    font-size: 12px;
    color: var(--color-text-muted);
    line-height: 1.45;
}

.header-notification-detail {
    padding: 8px 10px 12px;
}

.header-notification-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--color-brand);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.header-notification-back:hover {
    color: #6d28d9;
}

.header-notification-detail-hero {
    padding: 12px;
    margin-bottom: 14px;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    border-left-width: 3px;
    background: #f9fafb;
}

.header-notification-detail-hero--warning {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.header-notification-detail-hero--danger {
    border-left-color: #dc2626;
    background: #fef2f2;
}

.header-notification-detail-title {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.header-notification-detail-message {
    margin: 0;
    font-size: 13px;
    color: var(--color-text-body);
    line-height: 1.5;
}

.header-notification-detail-grid {
    display: grid;
    grid-template-columns: minmax(110px, 38%) 1fr;
    gap: 8px 12px;
    margin: 0 0 16px;
    padding: 0 2px;
}

.header-notification-detail-grid dt {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-muted);
}

.header-notification-detail-grid dd {
    margin: 0;
    font-size: 12px;
    color: var(--color-text-primary);
    line-height: 1.45;
    word-break: break-word;
}

.header-notification-detail-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 38px;
    text-decoration: none;
}

.header-notifications-footer {
    display: block;
    padding: 12px 16px;
    border-top: 1px solid var(--color-border);
    font-size: 13px;
    font-weight: 600;
    color: var(--color-brand);
    text-decoration: none;
    text-align: center;
}

.header-notifications-footer:hover {
    background: #faf5ff;
}

.page-heading {
    margin-bottom: 24px;
}

.page-heading-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.page-heading-subtitle {
    margin: 4px 0 0;
    font-size: 14px;
    color: var(--color-text-muted);
    font-weight: 500;
}

.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; line-height: 1.2; }
.breadcrumb a { color: var(--color-text-muted); font-weight: 500; }
.breadcrumb a:hover { color: var(--color-brand); }
.breadcrumb-sep { color: #9ca3af; }
.breadcrumb-current { color: var(--color-text-muted); font-weight: 500; font-size: 13px; }

.content { padding: 24px; }

.crm-section-header { margin-bottom: 20px; }
.kpi-section-title, .section-title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.section-subtitle {
    margin: 0;
    font-size: 14px;
    color: var(--color-text-muted);
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.kpi-grid--dashboard {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    width: 100%;
}

.kpi-grid--summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
}

.kpi-grid--disciplines {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.kpi-grid--disciplines .kpi-value {
    font-size: 22px;
}

.kpi-grid--disciplines .kpi-label {
    font-size: 11px;
}

.kpi-grid--disciplines .kpi-unit {
    font-size: 11px;
}

.report-summary-strip {
    margin-bottom: 28px;
}

.report-overview {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.report-overview-details {
    margin-bottom: 0;
}

.report-overview-sections-header h3 {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.report-overview-sections-header p {
    margin: 0 0 16px;
    font-size: 14px;
    color: var(--color-text-muted);
}

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

.report-section-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 18px;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.report-section-card:hover {
    border-color: #ddd6fe;
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.1);
    transform: translateY(-1px);
}

.report-section-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.report-section-card-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.report-section-card-count {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-brand);
    background: #f3e8ff;
    padding: 4px 8px;
    border-radius: 9999px;
}

.report-section-card-desc {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--color-text-muted);
}

.report-summary-strip .kpi-grid--summary {
    margin-bottom: 16px;
}

.kpi-grid--summary .kpi-value {
    font-size: 24px;
}

.kpi-grid--summary .kpi-label {
    font-size: 12px;
    line-height: 1.3;
}

@media (max-width: 1400px) {
    .kpi-grid--dashboard {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .kpi-grid--summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .kpi-grid--disciplines {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .kpi-grid--dashboard {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .kpi-grid--summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .kpi-grid--disciplines {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.kpi-card {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

.kpi-card:hover {
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.12);
    border-color: #ddd6fe;
}

a.kpi-card--link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

a.kpi-card--link:hover {
    transform: translateY(-1px);
    border-color: var(--color-brand, #7c3aed);
}

a.kpi-card--link:focus-visible {
    outline: 2px solid var(--color-brand, #7c3aed);
    outline-offset: 2px;
}

.kpi-card-link-hint {
    margin-left: auto;
    font-size: 11px;
    font-weight: 600;
    color: var(--color-brand, #7c3aed);
    white-space: nowrap;
}

.kpi-footer:has(.kpi-card-link-hint) {
    display: flex;
    align-items: center;
    gap: 8px;
}

.kpi-card-body { padding: 20px; }

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

.kpi-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-muted);
}

.kpi-icon {
    width: 44px; height: 44px;
    background: var(--color-brand-gradient);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: white;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.32);
    flex-shrink: 0;
}

.kpi-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-text-primary);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.kpi-unit {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-muted);
    margin-top: 4px;
}

.kpi-footer {
    background: var(--color-bg-muted);
    border-top: 1px solid var(--color-bg-subtle);
    padding: 10px 20px;
}

.kpi-footer-text { font-size: 13px; font-weight: 500; }
.kpi-footer-text--positive { color: #10b981; }
.kpi-footer-text--negative { color: #ef4444; }
.kpi-footer-text--neutral { color: var(--color-text-muted); }

.trade-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.trade-status-grid--full {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: 100%;
}

.trade-status-grid--disciplines {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.trade-status-grid--summary {
    margin-top: 0;
    margin-bottom: 0;
}

@media (max-width: 1200px) {
    .trade-status-grid--full {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .trade-status-grid--disciplines {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .trade-status-grid--full {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .trade-status-grid--disciplines {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.trade-card {
    display: flex;
    flex-direction: column;
}

.trade-card .kpi-card-body {
    flex: 1;
    padding-bottom: 16px;
}

.trade-card-stats {
    margin-top: 12px;
}

.trade-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.trade-card-footer .kpi-footer-text {
    margin-left: auto;
    text-align: right;
}

.trade-stat-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
    line-height: 1.45;
    color: var(--color-text-muted);
}

.trade-stat-row span:last-child {
    color: var(--color-text);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.trade-stat-row--highlight {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed var(--color-border);
}

.trade-stat-row--highlight span:last-child {
    color: var(--color-brand, #7c3aed);
}

.discipline-detail-card .kpi-label {
    font-size: 11px;
    line-height: 1.3;
}
    font-size: 13px;
    margin-bottom: 6px;
}

.trade-stat-row:last-child {
    margin-bottom: 0;
}

.trade-stat-row span:first-child { color: var(--color-text-muted); }
.trade-stat-row span:last-child { font-weight: 600; color: var(--color-text-primary); }

.trade-progress {
    height: 6px;
    background: var(--color-bg-subtle);
    border-radius: 9999px;
    margin: 12px 0 10px;
    overflow: hidden;
}

.trade-progress-bar {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.3s ease;
}

.trade-progress-bar--success {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.trade-progress-bar--danger {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.trade-progress-bar--warning {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.table-container {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    overflow: visible;
    margin-bottom: 24px;
}

.table-title {
    padding: 16px 20px;
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-primary);
    border-bottom: 1px solid var(--color-border);
    margin: 0;
}

.table-note {
    padding: 12px 20px;
    font-size: 13px;
    color: var(--color-text-muted);
    background: var(--color-bg-muted);
    border-top: 1px solid var(--color-border);
    margin: 0;
}

.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }

.data-table th {
    background: var(--color-bg-muted);
    padding: 10px 14px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-muted);
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}

.data-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--color-bg-subtle);
    color: var(--color-text-body);
}

.data-table tbody tr:hover { background: var(--color-bg-page); }
.data-table tbody tr:last-child td { border-bottom: none; }

.timesheet-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table--timesheet {
    min-width: 1100px;
}

.data-table--timesheet th,
.data-table--timesheet td {
    white-space: nowrap;
    font-size: 12px;
    padding: 8px 10px;
}

.data-table--timesheet td:nth-child(n+3) {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid;
    white-space: nowrap;
}

.status-approved { background: #d1fae5; color: #10b981; border-color: #a7f3d0; }
.status-rejected { background: #fee2e2; color: #dc2626; border-color: #fecaca; }
.status-budget { background: #fef3c7; color: #f59e0b; border-color: #fde68a; }
.status-prospect { background: #dbeafe; color: #3b82f6; border-color: #bfdbfe; }
.status-draft { background: #f3f4f6; color: #6b7280; border-color: #e5e7eb; }

.crm-filter-btn, .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 18px;
    background: var(--color-brand-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-control);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
}

.crm-filter-btn:hover, .btn-primary:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: white;
}

.guest-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-page);
    padding: 24px;
}

.guest-card {
    width: 100%;
    max-width: 420px;
    padding: 32px;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.guest-card-header {
    margin-bottom: 24px;
}

.guest-brand-logo {
    display: block;
    width: auto;
    max-width: 190px;
    height: auto;
    max-height: 52px;
    object-fit: contain;
}

.guest-card h1 {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 600;
    color: var(--color-text-primary);
    text-align: center;
}

.guest-card .guest-subtitle {
    text-align: center;
    color: var(--color-text-muted);
    margin: 0;
    font-size: 14px;
}

.form-group { margin-bottom: 16px; }

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-muted);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-control);
    font-size: 14px;
    font-family: inherit;
    color: var(--color-text-primary);
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #c4b5fd;
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.12);
}

.form-checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--color-text-body);
}

.form-checkbox-row input { accent-color: var(--color-brand); }

.form-options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.form-options-row .form-checkbox-row {
    margin-bottom: 0;
}

.guest-auth-link {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-brand);
    text-decoration: none;
}

.guest-auth-link:hover {
    color: #6d28d9;
    text-decoration: underline;
}

.guest-auth-footer {
    margin: 20px 0 0;
    text-align: center;
    font-size: 14px;
}

.guest-auth-footer a {
    color: var(--color-brand);
    font-weight: 500;
    text-decoration: none;
}

.guest-auth-footer a:hover {
    text-decoration: underline;
}

.form-error {
    color: #dc2626;
    font-size: 13px;
    margin-top: 6px;
}

.btn-full { width: 100%; }

/* Split guest auth — Glimpse-style login */
.guest-split-body {
    background: #fbfafe;
}

.guest-split {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 100vh;
}

.guest-split-form {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 36px 36px 24px;
    background:
        radial-gradient(ellipse 55% 45% at 8% 12%, rgba(196, 181, 253, 0.35), transparent 55%),
        radial-gradient(ellipse 50% 40% at 92% 88%, rgba(233, 213, 255, 0.45), transparent 55%),
        radial-gradient(ellipse 40% 35% at 100% 0%, rgba(191, 219, 254, 0.28), transparent 50%),
        #fbfafe;
    overflow: hidden;
}

.guest-split-form-glow {
    position: absolute;
    width: 420px;
    height: 420px;
    right: -100px;
    bottom: -80px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.26), transparent 70%);
    pointer-events: none;
}

.guest-split-logo {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
}

.guest-brand-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.guest-split-form-inner {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
}

.guest-login {
    width: 100%;
    max-width: 480px;
}

.guest-login-title {
    margin: 0 0 10px;
    font-size: 42px;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.045em;
    text-align: left;
}

.guest-login-subtitle {
    margin: 0 0 36px;
    font-size: 16px;
    line-height: 1.55;
    color: #6b7280;
}

.guest-login .form-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.guest-login .form-input {
    height: 46px;
    padding: 0 14px;
    font-size: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}

.guest-login .form-input::placeholder {
    color: #9ca3af;
}

.guest-login .form-input:focus {
    border-color: #a78bfa;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
    outline: none;
}

.guest-login .form-group {
    margin-bottom: 18px;
}

.guest-input-icon {
    position: relative;
}

.guest-input-icon .form-input {
    padding-left: 42px;
}

.guest-input-icon.password-field .form-input {
    padding-right: 42px;
}

.guest-input-icon-left {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    color: #9ca3af;
    pointer-events: none;
    z-index: 1;
}

.guest-input-icon-left svg {
    width: 18px;
    height: 18px;
}

.guest-login-btn {
    height: 48px;
    margin-top: 6px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    background: linear-gradient(90deg, #7c3aed 0%, #6366f1 100%);
    box-shadow: 0 12px 26px rgba(124, 58, 237, 0.36);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.guest-login-btn:hover {
    filter: brightness(1.05);
    box-shadow: 0 16px 34px rgba(124, 58, 237, 0.45);
}

.guest-login-btn:active {
    transform: translateY(1px);
}

.password-field {
    position: relative;
}

.password-field .form-input {
    padding-right: 42px;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: none;
    color: #9ca3af;
    cursor: pointer;
}

.password-toggle:hover {
    color: #6b7280;
}

.password-toggle-icon {
    width: 18px;
    height: 18px;
}

.password-toggle-icon--hide {
    display: none;
}

.password-toggle.is-visible .password-toggle-icon--show {
    display: none;
}

.password-toggle.is-visible .password-toggle-icon--hide {
    display: block;
}

.guest-split-footer {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    padding-top: 16px;
    font-size: 13px;
    color: #9ca3af;
}

.guest-split .form-options-row {
    margin-bottom: 24px;
}

.guest-split .form-checkbox-row {
    font-size: 15px;
}

.guest-split .guest-auth-link {
    font-size: 14px;
}

.guest-split-brand {
    position: relative;
    display: none;
    overflow: hidden;
    background: linear-gradient(160deg, #6d4dff 0%, #7c3aed 48%, #5b21b6 100%);
    padding: 56px 44px 48px;
}

.guest-split-brand-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.guest-shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.08);
}

.guest-shape--circle-lg {
    width: 340px;
    height: 340px;
    border-radius: 50%;
    top: -90px;
    right: -80px;
    animation: guest-shape-drift 14s ease-in-out infinite;
}

.guest-shape--circle-sm {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    bottom: 18%;
    left: -50px;
    background: rgba(255, 255, 255, 0.06);
    animation: guest-shape-drift 18s ease-in-out infinite reverse;
}

.guest-shape--ring {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    top: 38%;
    right: -70px;
    background: transparent;
    border: 28px solid rgba(255, 255, 255, 0.07);
    animation: guest-shape-pulse 10s ease-in-out infinite;
}

.guest-split-brand-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    color: #ffffff;
    text-align: center;
    min-height: calc(100vh - 104px);
}

.guest-split-brand-content h2 {
    margin: 0 0 44px;
    font-size: 40px;
    font-weight: 700;
    line-height: 1.22;
    letter-spacing: -0.035em;
    animation: guest-fade-up 0.7s ease both;
}

.guest-product-stage {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 36px;
    min-height: 460px;
}

.guest-product-window-wrap {
    width: 100%;
    max-width: 540px;
    animation: guest-fade-up 0.85s ease 0.12s both, guest-float-y 8s ease-in-out 1s infinite;
}

.guest-product-window {
    display: grid;
    grid-template-columns: 56px 1fr;
    width: 100%;
    min-height: 390px;
    background: #ffffff;
    border-radius: 22px;
    box-shadow:
        0 36px 70px rgba(49, 18, 110, 0.38),
        0 10px 24px rgba(49, 18, 110, 0.2);
    overflow: hidden;
    transform: perspective(1100px) rotateY(-5deg) rotateX(3deg);
}

.guest-product-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 24px 0;
    background: #f3f4f6;
    border-right: 1px solid #e5e7eb;
}

.guest-product-nav span {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: #d1d5db;
}

.guest-product-nav span.is-active {
    background: linear-gradient(135deg, #7c3aed, #6366f1);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.16);
}

.guest-product-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px 18px 16px;
    background: linear-gradient(180deg, #faf5ff 0%, #ffffff 48%);
    text-align: left;
}

.guest-dash-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.guest-dash-top small {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.guest-dash-top strong {
    display: block;
    margin-top: 2px;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.02em;
}

.guest-dash-pill {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: #166534;
    background: #dcfce7;
}

.guest-dash-kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.guest-dash-kpi {
    padding: 10px 10px 9px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #f3f4f6;
    box-shadow: 0 6px 14px rgba(17, 24, 39, 0.05);
}

.guest-dash-kpi--accent {
    background: linear-gradient(180deg, #f5f3ff, #ffffff);
    border-color: #ddd6fe;
}

.guest-dash-kpi span {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: #9ca3af;
}

.guest-dash-kpi strong {
    display: block;
    margin: 4px 0 2px;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.03em;
}

.guest-dash-kpi em {
    display: block;
    font-style: normal;
    font-size: 10px;
    font-weight: 600;
    color: #7c3aed;
}

.guest-dash-panels {
    display: grid;
    grid-template-columns: 1.35fr 0.9fr;
    gap: 10px;
    flex: 1;
}

.guest-dash-chart,
.guest-dash-trades {
    padding: 12px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #f3f4f6;
    box-shadow: 0 6px 14px rgba(17, 24, 39, 0.05);
}

.guest-dash-chart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.guest-dash-chart-head span {
    font-size: 12px;
    font-weight: 700;
    color: #374151;
}

.guest-dash-chart-head small {
    font-size: 10px;
    font-weight: 600;
    color: #9ca3af;
}

.guest-dash-bars {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 92px;
}

.guest-dash-bars span {
    flex: 1;
    height: var(--h);
    border-radius: 8px 8px 3px 3px;
    background: linear-gradient(180deg, #a78bfa, #7c3aed);
    transform-origin: bottom;
    animation: guest-bar-grow 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.guest-dash-bars span:nth-child(1) { animation-delay: 0.25s; background: linear-gradient(180deg, #ddd6fe, #c4b5fd); }
.guest-dash-bars span:nth-child(2) { animation-delay: 0.32s; }
.guest-dash-bars span:nth-child(3) { animation-delay: 0.39s; }
.guest-dash-bars span:nth-child(4) { animation-delay: 0.46s; background: linear-gradient(180deg, #c4b5fd, #8b5cf6); }
.guest-dash-bars span:nth-child(5) { animation-delay: 0.53s; }
.guest-dash-bars span:nth-child(6) { animation-delay: 0.6s; background: linear-gradient(180deg, #ddd6fe, #a78bfa); }
.guest-dash-bars span:nth-child(7) { animation-delay: 0.67s; }

.guest-dash-trades ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.guest-dash-trades li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
}

.guest-dash-trades i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.guest-dash-trades i.is-good { background: #22c55e; }
.guest-dash-trades i.is-warn { background: #f59e0b; }

.guest-float-chip {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: #4c1d95;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(49, 18, 110, 0.24);
    white-space: nowrap;
}

.guest-float-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c4b5fd, #6366f1);
}

.guest-float-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
    animation: guest-live-pulse 2s ease-out infinite;
}

.guest-float-chip--left {
    left: 0;
    top: 16%;
    animation: guest-fade-up 0.7s ease 0.35s both, guest-float-y 5.5s ease-in-out 1s infinite;
}

.guest-float-chip--right {
    right: -2%;
    top: 34%;
    animation: guest-fade-up 0.7s ease 0.5s both, guest-float-y 6.2s ease-in-out 1.2s infinite reverse;
}

.guest-float-card {
    position: absolute;
    right: 0;
    bottom: 2%;
    z-index: 2;
    width: 248px;
    padding: 16px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 18px 36px rgba(49, 18, 110, 0.3);
    text-align: left;
    animation: guest-fade-up 0.75s ease 0.55s both, guest-float-y 7s ease-in-out 1.4s infinite;
}

.guest-float-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.guest-float-card-top span {
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
    line-height: 1.35;
}

.guest-float-avatars {
    display: flex;
}

.guest-float-avatars span {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #fff;
    margin-left: -7px;
    background: linear-gradient(135deg, #c4b5fd, #818cf8);
}

.guest-float-avatars span:nth-child(2) {
    background: linear-gradient(135deg, #93c5fd, #6366f1);
}

.guest-float-avatars span:nth-child(3) {
    background: linear-gradient(135deg, #f9a8d4, #a78bfa);
}

.guest-float-card button {
    width: 100%;
    height: 38px;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(90deg, #7c3aed, #6366f1);
    pointer-events: none;
}

.guest-anim-float {
    /* float handled on wrapper / chips */
}

.guest-anim-float-alt,
.guest-anim-float-delay,
.guest-anim-float-slow {
    /* timing handled on specific float elements */
}

@keyframes guest-float-y {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(0, -14px, 0); }
}

@keyframes guest-fade-up {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes guest-bar-grow {
    from { transform: scaleY(0); opacity: 0.4; }
    to { transform: scaleY(1); opacity: 1; }
}

@keyframes guest-shape-drift {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-18px, 14px); }
}

@keyframes guest-shape-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.08); opacity: 0.75; }
}

@keyframes guest-live-pulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
    70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .guest-product-window-wrap,
    .guest-float-chip--left,
    .guest-float-chip--right,
    .guest-float-card,
    .guest-anim-float,
    .guest-dash-bars span,
    .guest-shape--circle-lg,
    .guest-shape--circle-sm,
    .guest-shape--ring,
    .guest-float-dot,
    .guest-split-brand-content h2 {
        animation: none !important;
    }
}

@media (min-width: 1024px) {
    .guest-split {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .guest-split-form {
        padding: 40px 72px 28px;
    }

    .guest-split-brand {
        display: flex;
        align-items: stretch;
        justify-content: center;
        min-height: 100vh;
        padding: 56px 52px 48px;
    }
}

@media (min-width: 1280px) {
    .guest-login {
        max-width: 500px;
    }

    .guest-login-title {
        font-size: 46px;
    }

    .guest-split-brand-content {
        max-width: 640px;
    }

    .guest-split-brand-content h2 {
        font-size: 44px;
    }

    .guest-product-window-wrap {
        max-width: 560px;
    }

    .guest-product-window {
        min-height: 400px;
    }
}

@media (max-width: 480px) {
    .guest-split-form {
        padding: 24px 20px 18px;
    }

    .guest-login-title {
        font-size: 32px;
    }

    .guest-login .form-input,
    .guest-login-btn {
        height: 44px;
    }
}

.report-cover {
    background: var(--color-brand-gradient);
    border-radius: 16px;
    padding: 48px 40px;
    color: white;
    margin-bottom: 32px;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.32);
}

.report-cover h2 {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.report-cover h1 {
    margin: 0 0 32px;
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.report-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.report-meta-item label {
    display: block;
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 4px;
}

.report-meta-item span {
    font-size: 16px;
    font-weight: 600;
}

.trade-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
}

.trade-tag {
    padding: 6px 14px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 500;
}

.milestone-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.milestone-grid--schedule {
    margin-bottom: 0;
}

@media (min-width: 1100px) {
    .milestone-grid--schedule {
        grid-template-columns: repeat(4, 1fr);
    }
}

.schedule-section {
    margin-bottom: 24px;
}

.schedule-section-body {
    padding: 20px;
}

.schedule-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 48px 24px;
    text-align: center;
}

.schedule-empty-state p {
    margin: 0;
    font-size: 14px;
    color: var(--color-text-muted);
}

.schedule-empty-btn {
    height: 34px;
    padding: 0 14px;
    font-size: 13px;
}

.milestone-card {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    padding: 20px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    min-height: 160px;
    position: relative;
    overflow: visible;
}

.milestone-card:has(.table-row-menu[open]) {
    z-index: 12;
}

.milestone-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.milestone-tag {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-primary);
}

.milestone-card h4 {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.milestone-card p {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--color-text-muted);
}

.milestone-dates {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: auto;
    padding-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.action-list { list-style: none; padding: 0; margin: 0; }

.action-item {
    display: flex;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-bg-subtle);
    align-items: center;
    position: relative;
}

.action-item .status-badge {
    flex-shrink: 0;
}

.action-item:last-child { border-bottom: none; }

.action-item p {
    margin: 0;
    font-size: 14px;
    color: var(--color-text-body);
    line-height: 1.5;
    flex: 1;
}

.report-end-card {
    margin-top: 8px;
    padding: 32px 24px;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    text-align: center;
}

.report-end-title {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-muted);
}

.report-end-text {
    margin: 0 0 4px;
    font-size: 13px;
    color: #9ca3af;
}

.report-end-meta {
    margin: 0;
    font-size: 12px;
    color: #9ca3af;
}

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

.report-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.report-list-item:hover {
    border-color: #ddd6fe;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.1);
}

.report-list-item h3 {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.report-list-item p {
    margin: 0;
    font-size: 13px;
    color: var(--color-text-muted);
}

.variance-positive { color: #10b981; font-weight: 600; }
.variance-negative { color: #ef4444; font-weight: 600; }

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: var(--radius-control);
    margin-bottom: 16px;
    font-size: 14px;
}

.flag-indicator { color: #ef4444; font-weight: 700; font-size: 11px; }

.dashboard-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.crm-filter-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 18px;
    background: white;
    color: var(--color-text-body);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-control);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.crm-filter-btn-secondary:hover {
    background: var(--color-bg-page);
    color: var(--color-text-primary);
}

.chart-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.stat-card {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.stat-card--compact {
    grid-column: span 1;
}

.stat-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg-surface);
}

.stat-card-title {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.stat-card-subtitle {
    margin: 0;
    font-size: 13px;
    color: var(--color-text-muted);
    line-height: 1.45;
}

.stat-card-body {
    padding: 20px;
    background: var(--chart-area-bg);
    flex: 1;
}

.stat-card-body--list {
    background: var(--color-bg-surface);
}

.crm-chart-wrap {
    position: relative;
    height: 360px;
}

.crm-chart-wrap--compact {
    height: 280px;
}

.dashboard-report-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dashboard-report-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-control);
    text-decoration: none;
    color: inherit;
    transition: background 0.15s, border-color 0.15s;
}

.dashboard-report-item:hover {
    background: var(--color-bg-page);
    border-color: #ddd6fe;
}

.dashboard-report-item strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 2px;
}

.dashboard-report-item span {
    font-size: 12px;
    color: var(--color-text-muted);
}

.dashboard-chart-empty {
    margin: 0;
    padding: 28px 12px;
    text-align: center;
    font-size: 13px;
    line-height: 1.5;
    color: var(--color-text-muted);
}

/* Report section navigation */
.report-section-nav {
    margin-bottom: 24px;
}

.customer-tab-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 6px;
    background: var(--color-bg-page);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    margin-bottom: 16px;
}

.report-section-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: thin;
}

.customer-tab-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    border-radius: var(--radius-control);
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-muted);
    border: 1px solid transparent;
    background: transparent;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.customer-tab-btn:hover {
    color: var(--color-text-primary);
    background: white;
}

.customer-tab-btn.is-active {
    background: var(--color-brand-gradient);
    color: white;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.28);
}

.report-section-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.report-section-actions.overview-actions {
    justify-content: flex-start;
    margin-top: 8px;
}

.report-section-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.section-button-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.section-button-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.section-button-card:hover {
    border-color: #ddd6fe;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.1);
}

.section-button-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    background: var(--color-brand-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.32);
}

.section-button-body {
    flex: 1;
    min-width: 0;
}

.section-button-body h3 {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.section-button-body p {
    margin: 0;
    font-size: 13px;
    color: var(--color-text-muted);
    line-height: 1.4;
}

.section-button-open {
    height: 34px;
    padding: 0 14px;
    font-size: 13px;
    flex-shrink: 0;
}

/* Forms & add entry */
.crm-filters {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px 20px;
    align-items: end;
}

.add-entry-form .crm-filter-actions {
    grid-column: 1 / -1;
}

.crm-filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.crm-filter-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-muted);
}

.crm-filter-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.boq-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 16px 20px;
}

.boq-filters-form {
    display: contents;
}

.boq-filters .crm-filter-field {
    min-width: 260px;
    flex: 0 1 320px;
}

.boq-filters-actions {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.boq-filters-actions-end {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.boq-inline-form {
    display: inline-flex;
    margin: 0;
}

.boq-delete-btn {
    color: #b91c1c;
    border-color: #fecaca;
    cursor: pointer;
    font: inherit;
}

.boq-delete-btn:hover {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fca5a5;
}

.form-textarea {
    height: auto;
    min-height: 88px;
    padding: 10px 12px;
    resize: vertical;
}

.form-input select,
select.form-input {
    appearance: auto;
}

.alert-success {
    background: #d1fae5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    padding: 12px 16px;
    border-radius: var(--radius-control);
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.add-entry-panel {
    margin-bottom: 20px;
}

.add-entry-details {
    border: none;
}

.add-entry-summary {
    list-style: none;
    cursor: pointer;
    display: inline-block;
}

.add-entry-summary::-webkit-details-marker { display: none; }

.add-entry-form-card {
    margin-top: 16px;
    padding: 20px;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.add-entry-form-title {
    margin: 0 0 16px;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.entry-create-card {
    padding: 24px;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

/* Create page — CRM-style form layout */
.create-page {
    width: 100%;
}

.create-page-hint {
    margin: 0 0 14px;
    font-size: 13px;
    color: var(--color-text-muted);
}

.create-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-muted);
    text-decoration: none;
}

.create-back-link:hover {
    color: var(--color-brand);
}

.create-form-card {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    padding: 28px 32px;
}

.create-form-section {
    margin-bottom: 28px;
}

.create-form-section:last-of-type {
    margin-bottom: 0;
}

.create-form-section-title {
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border);
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-primary);
}

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

.create-form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.create-form-field--full {
    grid-column: 1 / -1;
}

.create-form-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-body);
}

.create-form-required {
    color: #ef4444;
    margin-left: 2px;
}

.create-form-input {
    height: 42px;
}

.create-form-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    font-size: 14px;
    color: var(--color-text-body);
    cursor: pointer;
}

.create-form-checkbox input {
    width: 16px;
    height: 16px;
    accent-color: var(--color-brand);
}

.user-password-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.user-password-label-row .create-form-label {
    margin-bottom: 0;
}

.user-generate-password-btn {
    border: none;
    background: none;
    padding: 0;
    color: var(--color-brand);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.user-generate-password-btn:hover {
    color: #6d28d9;
    text-decoration: underline;
}

.create-form-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
}

.create-form-note {
    margin-top: 20px;
    padding: 14px 16px;
    background: #f3e8ff;
    border: 1px solid #ddd6fe;
    border-radius: var(--radius-control);
    font-size: 13px;
    line-height: 1.5;
    color: var(--color-text-muted);
}

.entry-create-actions {
    margin-bottom: 20px;
}

.crm-page-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
    flex-wrap: wrap;
}

.table-toolbar .table-title {
    padding: 0;
    border: none;
    margin: 0;
}

.reports-index-filters {
    margin-bottom: 16px;
    padding: 16px 20px;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
}

.reports-index-project {
    font-weight: 600;
    color: var(--color-text-primary);
}

.reports-index-project:hover {
    color: var(--color-brand);
}

.reports-index-location {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: 2px;
}

.table-toolbar-end {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-left: auto;
}

.table-bulk-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.table-bulk-count {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-muted);
    white-space: nowrap;
}

.table-bulk-delete-btn {
    background: #dc2626;
    border-color: #dc2626;
}

.table-bulk-delete-btn:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}

.table-select-col,
.table-select-cell {
    width: 44px;
    text-align: center;
    vertical-align: middle;
    padding-left: 16px;
    padding-right: 8px;
}

.table-select-col input,
.table-select-cell input {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--color-primary);
}

.data-table tbody tr.is-selected {
    background: rgba(124, 58, 237, 0.06);
}

.data-table tbody tr.is-selected:hover {
    background: rgba(124, 58, 237, 0.1);
}

/* Table row actions menu */
.table-actions-col {
    width: 72px;
    text-align: right;
}

.table-actions-cell {
    width: 72px;
    text-align: right;
    vertical-align: middle;
    position: relative;
}

.data-table tbody tr:has(.table-row-menu[open]) {
    position: relative;
    z-index: 12;
}

.table-row-menu {
    position: relative;
    display: inline-block;
}

.table-row-menu[open] {
    z-index: 20;
}

.table-row-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-control);
    background: var(--color-bg-surface);
    color: var(--color-text-muted);
    cursor: pointer;
    list-style: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.table-row-menu-btn::-webkit-details-marker,
.table-row-menu-btn::marker {
    display: none;
    content: '';
}

.table-row-menu-btn:hover,
.table-row-menu[open] .table-row-menu-btn {
    background: #f3e8ff;
    border-color: #c4b5fd;
    color: var(--color-brand);
}

.table-row-menu > .table-row-menu-dropdown {
    display: none;
}

.table-row-menu[open] > .table-row-menu-dropdown {
    display: block;
}

.table-row-menu-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    z-index: 30;
    min-width: 132px;
    padding: 4px;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-control);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
}

.table-row-menu-dropdown--fixed {
    z-index: 1200;
}

.table-row-menu-item {
    display: block;
    width: 100%;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--color-text-body);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    line-height: 1.4;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.table-row-menu-item:hover {
    background: var(--color-bg-page);
    color: var(--color-text-primary);
}

.table-row-menu-item--danger {
    color: #dc2626;
}

.table-row-menu-item--danger:hover {
    background: #fef2f2;
    color: #b91c1c;
}

.table-row-menu-form {
    margin: 0;
    padding: 0;
}

.entry-card-menu {
    flex-shrink: 0;
    margin-left: auto;
    position: relative;
}

.milestone-card-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.action-item .entry-card-menu {
    margin-left: 0;
    margin-top: 0;
}

.action-item:has(.table-row-menu[open]) {
    z-index: 12;
}

/* Entry detail (view) page */
.entry-detail-card {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    padding: 24px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.entry-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border);
}

.entry-detail-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.entry-detail-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.entry-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px 32px;
    margin: 0;
}

.entry-detail-item {
    margin: 0;
}

.entry-detail-item dt {
    margin: 0 0 4px;
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.entry-detail-item dd {
    margin: 0;
    font-size: 14px;
    color: var(--color-text-body);
    line-height: 1.5;
}

.entry-detail-note {
    font-size: 12px;
    color: var(--color-text-muted);
    font-weight: 400;
}

.report-edit-lead {
    margin: 0 0 24px;
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.status-text {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
}

.status-text-pass {
    color: #059669;
}

.status-text-danger {
    color: #dc2626;
}

.status-text-warning {
    color: #d97706;
}

.status-text-info {
    color: #2563eb;
}

.status-text-muted {
    color: #6b7280;
}

.data-table .status-text {
    white-space: nowrap;
}

/* Page loader */
body.is-loading {
    overflow: hidden;
}

.page-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-page);
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.page-loader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.page-loader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 32px;
}

.page-loader-logo {
    display: block;
    width: min(220px, 70vw);
    height: auto;
    max-height: 56px;
    object-fit: contain;
}

.page-loader-spinner {
    width: 40px;
    height: 40px;
    margin-top: 28px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-brand);
    border-radius: 50%;
    animation: page-loader-spin 0.75s linear infinite;
}

.page-loader-text {
    margin: 16px 0 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-muted);
}

@keyframes page-loader-spin {
    to {
        transform: rotate(360deg);
    }
}

/* In-page content loader (app navigation) */
.content-loader {
    position: fixed;
    top: var(--app-header-height);
    right: 0;
    bottom: 0;
    left: var(--sidebar-width);
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: rgba(249, 250, 251, 0.82);
    backdrop-filter: blur(2px);
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.content-loader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.content-loader-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: 140px;
    padding: 20px 28px;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    position: relative;
    transform: translateZ(0);
}

.content-loader-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-brand);
    border-radius: 50%;
    animation: page-loader-spin 0.75s linear infinite;
}

.content-loader-text {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-muted);
}

/* Confirm dialog */
body.confirm-dialog-open {
    overflow: hidden;
}

.confirm-dialog {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.confirm-dialog.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.confirm-dialog-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.45);
    backdrop-filter: blur(4px);
}

.confirm-dialog-panel {
    position: relative;
    width: min(420px, 100%);
    padding: 28px 28px 24px;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.16);
    text-align: center;
    transform: translateY(12px) scale(0.98);
    transition: transform 0.2s ease;
}

.confirm-dialog.is-open .confirm-dialog-panel {
    transform: translateY(0) scale(1);
}

.confirm-dialog-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin: 0 auto 16px;
    border-radius: 14px;
    background: rgba(124, 58, 237, 0.1);
    color: var(--color-brand);
}

.confirm-dialog--danger .confirm-dialog-icon {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.confirm-dialog-title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-primary);
    line-height: 1.35;
}

.confirm-dialog-message {
    margin: 0 0 24px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--color-text-muted);
}

.confirm-dialog-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.confirm-dialog-btn {
    min-width: 108px;
    padding: 10px 18px;
}

.confirm-dialog--danger .confirm-dialog-btn--confirm {
    background: #dc2626;
    border-color: #dc2626;
}

.confirm-dialog--danger .confirm-dialog-btn--confirm:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}

.sidebar-user-avatar--table {
    width: 32px;
    height: 32px;
    font-size: 12px;
    border-radius: 8px;
}

.users-table-name {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bulk-import-page {
    width: 100%;
    max-width: 100%;
}

.bulk-import-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.bulk-import-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0 0 6px;
}

.bulk-import-header p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 14px;
    line-height: 1.6;
    max-width: 640px;
}

.bulk-import-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.bulk-import-header-actions .crm-filter-btn-secondary {
    height: 34px;
    padding: 0 14px;
    font-size: 13px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.bulk-import-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.bulk-import-step {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    font-size: 13px;
    color: var(--color-text-muted);
}

.bulk-import-step.is-active {
    border-color: #c4b5fd;
    background: #faf5ff;
    color: #6d28d9;
    font-weight: 600;
}

.bulk-import-step.is-done {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #15803d;
}

.bulk-import-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
    font-size: 12px;
    font-weight: 700;
}

.bulk-import-step.is-active .bulk-import-step-num {
    background: #9333ea;
    color: #ffffff;
}

.bulk-import-step.is-done .bulk-import-step-num {
    background: #22c55e;
    color: #ffffff;
}

.bulk-import-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 1fr);
    gap: 20px;
    align-items: start;
}

.bulk-import-card {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(17, 24, 39, 0.05);
    padding: 24px 28px;
}

.bulk-import-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 6px;
}

.bulk-import-card-desc {
    font-size: 13px;
    color: var(--color-text-muted);
    margin: 0 0 20px;
    line-height: 1.5;
}

.bulk-import-template-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    margin-bottom: 24px;
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    border-radius: 10px;
}

.bulk-import-template-meta {
    min-width: 0;
}

.bulk-import-template-meta strong {
    display: block;
    font-size: 14px;
    color: var(--color-text-primary);
    margin-bottom: 4px;
}

.bulk-import-template-meta span {
    font-size: 12px;
    color: var(--color-text-muted);
}

.bulk-import-upload-zone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 32px 20px;
    margin-bottom: 20px;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    background: #fafafa;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.bulk-import-upload-zone:hover,
.bulk-import-upload-zone.is-dragover {
    border-color: #a78bfa;
    background: #faf5ff;
}

.bulk-import-upload-zone svg {
    color: #9333ea;
}

.bulk-import-upload-zone p {
    margin: 0;
    font-size: 14px;
    color: var(--color-text-body);
    font-weight: 500;
}

.bulk-import-upload-zone > span:not(.bulk-import-file-label):not(.bulk-import-selected-file) {
    font-size: 12px;
    color: var(--color-text-muted);
}

.bulk-import-upload-zone input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.bulk-import-file-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
}

.bulk-import-file-label:hover {
    border-color: #9333ea;
    color: #7c3aed;
}

.bulk-import-selected-file {
    margin-top: 10px;
    font-size: 13px;
    color: #059669;
    font-weight: 500;
}

.bulk-import-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.bulk-import-form-error {
    margin: 0 0 16px;
}

.bulk-import-notes-list {
    margin: 0;
    padding-left: 18px;
    font-size: 14px;
    color: var(--color-text-body);
    line-height: 1.7;
}

.bulk-import-notes-list li + li {
    margin-top: 6px;
}

.bulk-import-summary {
    padding: 16px 18px;
    margin-bottom: 20px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    font-size: 14px;
}

.bulk-import-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.bulk-import-summary-stat {
    padding: 12px;
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    text-align: center;
}

.bulk-import-summary-stat strong {
    display: block;
    font-size: 20px;
    color: var(--color-text-primary);
    line-height: 1.2;
}

.bulk-import-summary-stat span {
    font-size: 12px;
    color: var(--color-text-muted);
}

.bulk-import-summary-errors {
    margin: 12px 0 0;
    padding-left: 18px;
    color: #b91c1c;
    font-size: 13px;
}

.bulk-import-full-card {
    margin-bottom: 28px;
}

.bulk-import-map-list {
    margin: 10px 0 0;
    padding-left: 18px;
    font-size: 13px;
    color: var(--color-text-muted);
    line-height: 1.7;
}

.bulk-import-destination {
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--color-text-body);
}

.bulk-import-destination-tag {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f3e8ff;
    color: #6d28d9;
    font-size: 11px;
    font-weight: 600;
}

.bulk-import-hub-section-tag {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: #7c3aed;
}

.bulk-import-full-preview-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bulk-import-full-preview-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}

.bulk-import-card .timesheet-table-wrap {
    margin: 0 -4px;
}

.bulk-import-columns-preview {
    margin: 0 0 18px;
    max-height: 280px;
    overflow: auto;
}

.bulk-import-card .table-note {
    border-top: none;
    background: transparent;
    padding: 10px 0 0;
}

.bulk-import-summary-stat .form-link {
    display: inline-block;
    margin-top: 6px;
    font-size: 12px;
}

.bulk-import-hub-card {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 22px 24px;
    box-shadow: 0 1px 3px rgba(17, 24, 39, 0.05);
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 180px;
}

.bulk-import-hub-card h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.bulk-import-hub-card p {
    margin: 0;
    flex: 1;
    font-size: 13px;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.bulk-import-hub-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.bulk-import-hub-actions .crm-filter-btn,
.bulk-import-hub-actions .crm-filter-btn-secondary {
    height: 34px;
    padding: 0 14px;
    font-size: 13px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.bulk-import-preview-panel .bulk-import-preview-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--color-border);
}

.bulk-import-preview-panel .table-wrapper {
    overflow-x: auto;
}

.bulk-import-preview-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    padding: 16px 24px;
    border-top: 1px solid var(--color-border);
}

.bulk-import-preview-empty {
    text-align: center;
    padding: 24px;
    color: var(--color-text-muted);
}

.bulk-import-confirm-btn {
    background: #059669;
    border-color: #059669;
}

.bulk-import-confirm-btn:hover {
    background: #047857;
    border-color: #047857;
}

.table-bulk-upload-btn {
    height: 34px;
    padding: 0 14px;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.data-table tbody tr.is-error-row td {
    background: #fef2f2;
    color: #b91c1c;
}

.form-link {
    color: var(--color-brand);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.form-link:hover {
    text-decoration: underline;
}

@media (max-width: 900px) {
    .bulk-import-layout {
        grid-template-columns: 1fr;
    }

    .bulk-import-template-box {
        flex-direction: column;
        align-items: flex-start;
    }

    .bulk-import-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ── Project BOQ page ─────────────────────────────────────────────────── */
.kpi-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-strip .kpi-card {
    padding: 18px 20px;
}

.kpi-strip .kpi-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.kpi-strip .kpi-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.1;
}

.kpi-strip .kpi-unit {
    font-size: 13px;
    font-weight: 400;
    color: var(--color-text-muted);
}

.kpi-strip .kpi-note {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: 4px;
}

.boq-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 500;
}

.boq-badge--partial {
    background: #fef3c7;
    color: #92400e;
}

.boq-badge--complete {
    background: #d1fae5;
    color: #065f46;
}

.boq-row--tbd {
    opacity: 0.72;
}

.boq-section-cell {
    font-size: 12px;
    color: var(--color-text-muted);
}

.boq-tbd-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: #b45309;
    background: #fef3c7;
    padding: 2px 7px;
    border-radius: 4px;
}

.boq-totals-row td {
    background: var(--color-bg-surface-alt, #f9fafb);
    border-top: 1px solid var(--color-border);
    font-size: 13px;
    padding: 8px 12px;
}

.alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
}

@media (max-width: 768px) {
    .kpi-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ── Excel-style column filters ───────────────────────────────────────── */
.excel-filter-th {
    white-space: nowrap;
}

.excel-filter-th-inner {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
}

.excel-filter-th-label {
    overflow: hidden;
    text-overflow: ellipsis;
}

.excel-filter-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    flex-shrink: 0;
}

.excel-filter-trigger:hover,
.excel-filter-trigger.is-open {
    background: #f3e8ff;
    border-color: #ddd6fe;
    color: var(--color-brand, #7c3aed);
}

.excel-filter-trigger.is-filtered,
.excel-filter-th.is-filtered .excel-filter-trigger {
    background: var(--color-brand, #7c3aed);
    border-color: var(--color-brand, #7c3aed);
    color: #fff;
}

.excel-filter-count {
    font-size: 12px;
    color: var(--color-text-muted);
    white-space: nowrap;
}

.excel-filter-panel {
    position: fixed;
    z-index: 80;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 320px;
}

.excel-filter-search {
    width: 100%;
    height: 34px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 0 10px;
    font-size: 13px;
}

.excel-filter-panel-actions {
    display: flex;
    gap: 12px;
}

.excel-filter-link {
    border: none;
    background: none;
    padding: 0;
    color: var(--color-brand, #7c3aed);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.excel-filter-list {
    overflow: auto;
    max-height: 180px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 4px;
}

.excel-filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}

.excel-filter-item:hover {
    background: #f9fafb;
}

.excel-filter-item input {
    margin: 0;
}

.excel-filter-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.excel-filter-empty {
    margin: 0;
    padding: 12px;
    text-align: center;
    color: #6b7280;
    font-size: 12px;
}

.excel-filter-panel-foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.excel-filter-btn {
    height: 32px;
    padding: 0 12px;
    font-size: 12px;
}
