/* Dock & Header Logo Styles */
.dock-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 24px;
    overflow: hidden;
}

.dock-logo-img {
    max-width: 32px;
    max-height: 32px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    display: block;
}

.header-brand-logo {
    max-height: 28px;
    max-width: 140px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Filter Bar Component */
.minimal-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px;
    padding: 18px 24px;
    margin-bottom: 24px;
    background: #ffffff;
    border-radius: var(--card-radius);
    border: 1px solid var(--border-light);
    box-shadow: var(--card-shadow);
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 150px;
}

.filter-field label {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.filter-field input,
.filter-field select,
.select-clean {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border-radius: 12px;
    background: var(--bg-canvas);
    border: 1px solid transparent;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 400;
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
}

.filter-field input:focus,
.filter-field select:focus,
.select-clean:focus {
    background: #ffffff;
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 3px rgba(242, 85, 41, 0.1);
}

.filter-actions-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 2px;
}

.filter-actions-row .pill-btn.small {
    height: 38px;
    padding: 0 18px;
    font-size: 12.5px;
}

/* Secondary Summary Cards (Attendance & Sync) */
.attendance-summary-cards,
.sync-summary-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

.secondary-summary-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 20px 22px;
    border: 1px solid var(--border-light);
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.secondary-summary-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 400;
}

.secondary-summary-val {
    font-size: 26px;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    margin: 8px 0 4px;
}

.secondary-summary-note {
    font-size: 11.5px;
    color: var(--text-muted);
}

/* Screenshot Gallery */
.screenshots-card-surface {
    padding: 24px;
}

.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.screenshot-card {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid var(--border-light);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.screenshot-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06);
    border-color: rgba(242, 85, 41, 0.3);
}

.screenshot-thumb-box {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #14161a;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.screenshot-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.screenshot-card:hover .screenshot-thumb {
    transform: scale(1.03);
}

.screenshot-card-body {
    padding: 14px 16px;
}

.screenshot-card-title {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.screenshot-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 11.5px;
    color: var(--text-secondary);
}

.screenshot-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Screenshot Viewer Modal */
.wide-dialog {
    max-width: 960px;
    width: 95vw;
}

.screenshot-viewer-media {
    background: #0f1115;
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 340px;
    max-height: 65vh;
    margin: 18px 0;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.5);
}

.screenshot-viewer-media img {
    max-width: 100%;
    max-height: 65vh;
    object-fit: contain;
    display: block;
}

.screenshot-viewer-meta-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    padding: 16px 20px;
    background: var(--bg-canvas);
    border-radius: 16px;
}

.screenshot-viewer-meta-row div {
    font-size: 12.5px;
    color: var(--text-primary);
}

.screenshot-viewer-meta-row strong {
    display: block;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 3px;
    font-weight: 500;
}

/* Attendance Sessions Modal */
.session-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 18px 0;
}

.session-row {
    background: var(--bg-canvas);
    border-radius: 16px;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-light);
}

.session-row strong {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-primary);
}

.session-row span {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Punctuality Badges */
.badge-ontime {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: var(--pill-radius);
    font-size: 11.5px;
    font-weight: 500;
    color: var(--success);
    background: var(--success-bg);
}

.badge-ontime::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--success);
}

.badge-late {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: var(--pill-radius);
    font-size: 11.5px;
    font-weight: 500;
    color: var(--danger);
    background: var(--danger-bg);
}

.badge-late::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--danger);
}

/* Branding View Grid */
.branding-split-grid {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 24px;
}

.branding-panel {
    padding: 28px;
}

.color-picker-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-picker-input {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    padding: 3px;
    background: #ffffff;
    cursor: pointer;
    flex-shrink: 0;
}

.logo-box {
    background: var(--bg-canvas);
    border-radius: 20px;
    padding: 22px;
    border: 1px dashed rgba(0, 0, 0, 0.12);
}

.logo-preview-box {
    width: 100%;
    height: 96px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 12px 0 16px;
    overflow: hidden;
}

.preview-img {
    max-width: 85%;
    max-height: 80px;
    object-fit: contain;
}

.empty-muted-text {
    font-size: 12px;
    color: var(--text-muted);
}

.logo-upload-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-input-clean {
    font-size: 12px;
    color: var(--text-secondary);
    flex: 1;
}

.theme-preview-card {
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--border-light);
    box-shadow: var(--card-shadow);
    margin-top: 10px;
}

.preview-header {
    background: #211b2c;
    color: #ffffff;
    padding: 14px 20px;
    font-size: 13px;
    font-weight: 500;
}

.preview-body {
    background: #ffffff;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.preview-badge {
    background: #a888ef;
    color: #ffffff;
    padding: 5px 12px;
    border-radius: var(--pill-radius);
    font-size: 11.5px;
    font-weight: 500;
}

.preview-button {
    background: #7651c9;
    color: #ffffff;
    border-radius: var(--pill-radius);
    padding: 9px 18px;
    font-size: 12.5px;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.preview-button:hover {
    opacity: 0.9;
}

/* Settings View Clean Grid */
.settings-card-surface {
    padding: 32px;
    max-width: 820px;
}

.settings-grid-clean {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 24px;
}

.settings-submit-row {
    grid-column: 1 / -1;
    margin-top: 12px;
    display: flex;
    justify-content: flex-start;
}

/* Action Pill Buttons in Tables */
.action-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: var(--pill-radius);
    font-size: 11.5px;
    font-weight: 500;
    background: var(--bg-canvas);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

.action-pill-btn:hover {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.action-pill-btn.primary-subtle {
    color: var(--primary-accent);
    background: rgba(242, 85, 41, 0.08);
    border-color: transparent;
}

.action-pill-btn.primary-subtle:hover {
    background: rgba(242, 85, 41, 0.15);
}

.action-pill-btn.danger {
    color: var(--danger);
    background: var(--danger-bg);
    border-color: transparent;
}
.action-pill-btn.danger:hover {
    background: #fee2e2;
}

/* Employee Profile Dialog */
.profile-modal-dialog {
    max-width: 920px;
    width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: var(--card-radius);
    padding: 28px;
    background: var(--card-surface);
    border: 1px solid var(--border-light);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

.profile-modal-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 16px;
}

/* Profile Hero Card */
.profile-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    background: var(--bg-canvas);
    border-radius: 20px;
    padding: 20px 24px;
    border: 1px solid var(--border-light);
}

.profile-hero-left {
    display: flex;
    align-items: center;
    gap: 18px;
}

.profile-avatar-lg {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--primary-accent);
    color: #ffffff;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.profile-status-dot-badge {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #ffffff;
}
.profile-status-dot-badge.online {
    background: var(--success);
}
.profile-status-dot-badge.offline {
    background: var(--text-muted);
}

.profile-hero-info h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.profile-hero-info p {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.profile-hero-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Profile KPI Grid */
.profile-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.profile-kpi-card {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.profile-kpi-label {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.profile-kpi-val {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.profile-kpi-sub {
    font-size: 11.5px;
    color: var(--text-secondary);
}

/* Two-column layout for Details & Hardware */
.profile-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}

.profile-subcard {
    background: var(--bg-canvas);
    border-radius: 18px;
    padding: 18px 20px;
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-subcard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 8px;
}

.profile-subcard-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.profile-meta-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;
}

.profile-meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-meta-label {
    font-size: 11px;
    color: var(--text-muted);
}

.profile-meta-val {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    word-break: break-all;
}

/* Recent Attendance Table in Profile */
.profile-table-container {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid var(--border-light);
    overflow: hidden;
}

/* Recent Screenshots in Profile */
.profile-screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
}

.profile-shot-card {
    border-radius: 12px;
    overflow: hidden;
    background: #0f1115;
    cursor: pointer;
    position: relative;
    aspect-ratio: 16/10;
    border: 1px solid var(--border-light);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.profile-shot-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.profile-shot-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-shot-time {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Clickable table row hover effect */
.clickable-row {
    cursor: pointer;
    transition: background-color 0.12s ease;
}

.clickable-row:hover td {
    background-color: rgba(0, 0, 0, 0.025);
}

.clickable-cell {
    cursor: pointer;
}
.clickable-cell:hover strong {
    color: var(--primary-accent);
}

/* Responsive Overrides */
@media (max-width: 1024px) {
    .attendance-summary-cards,
    .sync-summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .branding-split-grid {
        grid-template-columns: 1fr;
    }

    .settings-grid-clean {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .attendance-summary-cards,
    .sync-summary-cards {
        grid-template-columns: 1fr;
    }

    .minimal-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-actions-row {
        justify-content: flex-end;
    }
}

/* Enhancements: Policy, Leaves & Productivity Score */
.input-group.full-width {
    grid-column: 1 / -1;
}

.productivity-progress-track {
    width: 100%;
    height: 6px;
    background: #e9e5f0;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 6px;
}

.productivity-progress-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.3s ease;
    background: var(--primary-accent);
}
.productivity-progress-fill.excellent {
    background: #159765;
}
.productivity-progress-fill.good {
    background: #7651c9;
}
.productivity-progress-fill.average {
    background: #f59e0b;
}
.productivity-progress-fill.low {
    background: #ef4444;
}

.leave-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    font-size: 11.5px;
    font-weight: 500;
    border-radius: 6px;
    background: #f3f0f8;
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.leave-tag.casual {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}
.leave-tag.sick {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}
.leave-tag.wfh {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}
.leave-tag.paid {
    background: #faf5ff;
    color: #6d28d9;
    border-color: #ddd6fe;
}
.leave-tag.half {
    background: #fffbeb;
    color: #b45309;
    border-color: #fde68a;
}

/* Settings Stack & Email API Integration */
.settings-cards-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 880px;
}

.settings-card-surface {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid var(--border-light);
    padding: 28px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.02);
}

.settings-divider {
    grid-column: 1 / -1;
    margin-top: 14px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.settings-divider-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.settings-divider-sub {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 400;
    line-height: 1.4;
    margin-bottom: 16px;
}

.input-group.full-width {
    grid-column: 1 / -1;
}

.input-hint {
    display: block;
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 6px;
    line-height: 1.4;
}

.input-hint code {
    background: #f4f2f8;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 11px;
    color: var(--primary);
}

.test-email-grid {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    max-width: 650px;
}

.test-email-result-box {
    margin-top: 16px;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
    animation: fadeIn 0.2s ease-in-out;
}

.test-email-result-box.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.test-email-result-box.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.badge-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 500;
    background: #f5f3ff;
    color: var(--primary);
    border: 1px solid #ddd6fe;
}

/* =========================================
   HEADER SEARCH BAR & INSTANT SEARCH
   ========================================= */
.header-search-wrapper {
    position: relative;
    flex: 1;
    max-width: 380px;
    margin: 0 16px;
}

.header-search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    border: 1px solid var(--border-light, #e2e8f0);
    border-radius: 24px;
    padding: 6px 14px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.header-search-bar:focus-within {
    border-color: var(--primary-accent, #7651c9);
    box-shadow: 0 0 0 3px rgba(118, 81, 201, 0.12), 0 4px 12px rgba(0, 0, 0, 0.04);
}

.header-search-bar .search-icon {
    color: var(--text-muted, #94a3b8);
    flex-shrink: 0;
}

.global-search-input {
    width: 100%;
    border: none;
    background: transparent;
    outline: none;
    font-family: inherit;
    font-size: 13px;
    font-weight: 400;
    color: var(--text-primary, #1e293b);
}

.global-search-input::placeholder {
    color: var(--text-muted, #94a3b8);
}

.search-shortcut-hint {
    background: var(--bg-canvas, #f1f5f9);
    border: 1px solid var(--border-light, #e2e8f0);
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text-muted, #64748b);
    flex-shrink: 0;
    user-select: none;
}

.search-clear-btn {
    background: transparent;
    border: none;
    color: var(--text-muted, #94a3b8);
    font-size: 12px;
    cursor: pointer;
    padding: 2px;
    border-radius: 50%;
    line-height: 1;
}

.search-clear-btn:hover {
    color: var(--text-primary, #1e293b);
}

/* Search Results Floating Dropdown */
.search-results-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 440px;
    max-width: 92vw;
    background: #ffffff;
    border: 1px solid var(--border-light, #e2e8f0);
    border-radius: 18px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.12), 0 4px 14px rgba(0, 0, 0, 0.05);
    max-height: 480px;
    overflow-y: auto;
    z-index: 1200;
    padding: 8px 0;
    animation: slideDownFade 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDownFade {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-group-title {
    padding: 8px 16px 4px 16px;
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted, #94a3b8);
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 16px;
    cursor: pointer;
    transition: background-color 0.12s ease;
    text-decoration: none;
    color: inherit;
}

.search-result-item:hover,
.search-result-item.selected {
    background: var(--bg-canvas, #f8fafc);
}

.search-result-avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #ede9fe;
    color: var(--primary, #7651c9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    flex-shrink: 0;
}

.search-result-meta {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary, #0f172a);
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-code-pill {
    font-size: 11px;
    font-family: monospace;
    padding: 1px 6px;
    border-radius: 4px;
    background: #f1f5f9;
    color: #475569;
    font-weight: 500;
}

.search-result-sub {
    font-size: 11.5px;
    color: var(--text-muted, #64748b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.search-result-action-icon {
    color: var(--text-muted, #94a3b8);
    font-size: 12px;
}

.search-empty-state {
    padding: 24px 16px;
    text-align: center;
    color: var(--text-muted, #64748b);
    font-size: 13px;
}

/* =========================================
   HEADER MEGA MENU DROPDOWN
   ========================================= */
.mega-menu-container {
    position: relative;
    display: inline-block;
}

.mega-tab-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.mega-tab-btn .chevron-icon {
    transition: transform 0.2s ease;
}

.mega-tab-btn.open .chevron-icon {
    transform: rotate(180deg);
}

.mega-tab-btn.active-subview {
    background: var(--dark-surface, #211b2c);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.mega-menu-flyout {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 580px;
    max-width: 92vw;
    background: #ffffff;
    border: 1px solid var(--border-light, #e2e8f0);
    border-radius: 22px;
    box-shadow: 0 24px 55px rgba(0, 0, 0, 0.14), 0 6px 18px rgba(0, 0, 0, 0.05);
    z-index: 1100;
    padding: 18px 20px;
    animation: slideDownFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.mega-menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.mega-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mega-col-title {
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted, #94a3b8);
    margin-bottom: 6px;
    padding-left: 8px;
}

.mega-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    transition: all 0.15s ease;
}

.mega-item:hover {
    background: var(--bg-canvas, #f8fafc);
    transform: translateY(-1px);
}

.mega-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f5f3ff;
    color: var(--primary, #7651c9);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background-color 0.15s ease;
}

.mega-item:hover .mega-item-icon {
    background: #ede9fe;
}

.mega-item-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mega-item-content strong {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary, #0f172a);
}

.mega-item-content small {
    font-size: 11.5px;
    color: var(--text-muted, #64748b);
    line-height: 1.35;
}

@media (max-width: 900px) {
    .header-search-wrapper {
        max-width: 220px;
    }
    .mega-menu-flyout {
        width: 340px;
    }
    .mega-menu-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

/* =========================================
   SUPER ADMIN IMPERSONATION BANNER
   ========================================= */
.impersonation-bar {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2500;
    background: linear-gradient(90deg, #18181b 0%, #27272a 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.22);
    padding: 9px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideDownFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.impersonation-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #f4f4f5;
    font-size: 13px;
    font-weight: 400;
}

.impersonation-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulseGlow 1.8s infinite;
}

@keyframes pulseGlow {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.impersonation-badge {
    background: rgba(16, 185, 129, 0.16);
    color: #34d399;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.exit-impersonation-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    color: #09090b;
    border: none;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    padding: 5px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.exit-impersonation-btn:hover {
    background: #f4f4f5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* =========================================
   ENHANCED INTERACTIVE CONTROLS & PROFILE
   ========================================= */
.dropdown-pill-select {
    background: #ffffff;
    color: var(--text-primary, #18181b);
    border: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.1));
    border-radius: 9999px;
    padding: 6px 30px 6px 14px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.15s ease;
}

.dropdown-pill-select:hover {
    border-color: rgba(0, 0, 0, 0.22);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.dropdown-pill-select:focus {
    border-color: var(--primary-accent, #7651c9);
    box-shadow: 0 0 0 3px rgba(118, 81, 201, 0.15);
}

.user-pill.clickable {
    cursor: pointer;
    user-select: none;
    transition: all 0.15s ease;
}

.user-pill.clickable:hover {
    background: rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

/* Dialog additions */
.dialog-divider {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    margin: 10px 0 2px 0;
    color: var(--text-muted, #71717a);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.dialog-divider::before, .dialog-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.08));
}

.dialog-divider span {
    padding: 0 10px;
}

.read-only-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10.5px;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-muted, #71717a);
    padding: 1px 7px;
    border-radius: 4px;
    margin-left: 6px;
}

.disabled-input {
    background: #f4f4f5 !important;
    color: #71717a !important;
    cursor: not-allowed;
    border-style: dashed !important;
}

.status-dot-pulse {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    margin-right: 5px;
    vertical-align: middle;
}

.status-dot-offline {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #a1a1aa;
    margin-right: 5px;
    vertical-align: middle;
}

/* Status Badges for Regularization & Leaves */
.badge-pending {
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
    padding: 3px 9px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-approved {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
    padding: 3px 9px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-rejected {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
    padding: 3px 9px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-info {
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
    padding: 3px 9px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-tolerated {
    background: rgba(168, 85, 247, 0.12);
    color: #7e22ce;
    padding: 3px 9px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.compliance-alert-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #fffbeb;
    border: 1px solid #fef3c7;
    border-radius: 8px;
    font-size: 13px;
    color: #92400e;
}

/* Productivity & Active App Badges (Milestone 20) */
.prod-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10.5px;
    font-weight: 600;
    backdrop-filter: blur(6px);
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.prod-badge.productive {
    background: rgba(16, 185, 129, 0.9);
    color: #ffffff;
}

.prod-badge.neutral {
    background: rgba(100, 116, 139, 0.85);
    color: #ffffff;
}

.prod-badge.unproductive {
    background: rgba(239, 68, 68, 0.9);
    color: #ffffff;
}

.prod-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.active-app-chip {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    padding: 2px 7px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
}

.active-app-chip.overlay {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(15, 23, 42, 0.8);
    color: #f8fafc;
    border-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.window-title-meta {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    margin: 3px 0 6px;
    line-height: 1.3;
}

.preset-tag-btn {
    border: 1px solid #d8d3e5;
    background: #ffffff;
    border-radius: 6px;
    font-size: 11px;
    padding: 3px 8px;
    color: #4a3b69;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.15s ease;
}

.preset-tag-btn:hover {
    border-color: #8b5cf6;
    color: #7c3aed;
    background: #f5f3ff;
    transform: translateY(-1px);
}

.app-chip {
    display: inline-block;
    background: #f3e8ff;
    color: #6b21a8;
    border: 1px solid #e9d5ff;
    border-radius: 4px;
    padding: 2px 7px;
    font-size: 10.5px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.profile-shot-prod-dot {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1.5px solid #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
    z-index: 2;
}

.profile-shot-prod-dot.productive {
    background: #10b981;
}

.profile-shot-prod-dot.neutral {
    background: #94a3b8;
}

.profile-shot-prod-dot.unproductive {
    background: #ef4444;
}

.profile-shot-app {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    font-size: 9.5px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    padding: 1px 5px;
    border-radius: 4px;
    z-index: 2;
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


