/* ═══════════════════════════════════════════════════════════════
   LIBRARY VIEW - Call History
   ═══════════════════════════════════════════════════════════════ */

.library-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 24px;
    flex: 1;
    overflow-y: auto;
}

.library-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;
}

.library-title-section {
    flex: 1;
    min-width: 300px;
}

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

.library-search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    min-width: 240px;
}

.library-search .search-icon {
    color: var(--text-muted);
}

.library-search input {
    flex: 1;
    background: transparent;
    border: none;
    font-size: 14px;
    color: var(--text-primary);
    font-family: inherit;
}

.library-search input:focus {
    outline: none;
}

.library-search input::placeholder {
    color: var(--text-muted);
}

.library-filter {
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    color: var(--text-primary);
    font-family: inherit;
    cursor: pointer;
}

.library-filter:focus {
    outline: none;
    border-color: var(--accent);
}

.library-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

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

/* History Item Card */
.history-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-item:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-item-type {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
}

.history-item-type.coaching {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6; /* Blue for Sales Lab */
}

.history-item-type.persona,
.history-item-type.practice {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7; /* Purple for AI Practice */
}

.history-item-score {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
}

.history-item-parties {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.history-item-context {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.history-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.history-item-date {
    font-size: 12px;
    color: var(--text-muted);
}

.history-item-duration {
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg-elevated);
    padding: 4px 10px;
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
}

.history-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    gap: 16px;
}

.history-empty .icon {
    font-size: 64px;
    opacity: 0.3;
}

.history-empty h3 {
    font-size: 20px;
    color: var(--text-primary);
    margin: 0;
}

.history-empty p {
    color: var(--text-muted);
    font-size: 14px;
    max-width: 300px;
}

/* Library Detail View */
.library-detail {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 24px;
    flex: 1;
    overflow-y: auto;
}

.library-detail-header {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.library-detail-header .back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.library-detail-header .back-btn:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.library-detail-info {
    flex: 1;
}

.library-detail-info h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.library-detail-info p {
    font-size: 14px;
    color: var(--text-muted);
}

.library-detail-actions {
    display: flex;
    gap: 12px;
}

.library-detail-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.transcript-panel-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.transcript-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: var(--bg-elevated);
    border-radius: 12px;
    margin-top: 16px;
}

.transcript-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--text-muted);
}

/* Legacy history styles for backward compatibility */
.history-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
    min-height: 0;
}

.history-list-legacy {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-audio-player {
    margin-top: 0;
    margin-bottom: 12px;
    padding: 12px;
    background: var(--bg-elevated);
    border-radius: 8px;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.history-audio-player audio {
    width: 100%;
    height: 40px;
}

.history-audio-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.audio-player-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.audio-player-row audio {
    flex: 1;
}

.audio-download-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--accent);
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.audio-download-btn:hover {
    background: var(--accent-hover, #4a9eff);
}

.audio-download-btn span {
    font-size: 14px;
}

@media (max-width: 768px) {
    .library-container {
        padding: 16px;
    }

    .library-header {
        flex-direction: column;
    }

    .library-title-section {
        min-width: auto;
    }

    .library-actions {
        width: 100%;
        flex-direction: column;
    }

    .library-search {
        width: 100%;
        min-width: auto;
    }

    .library-filter {
        width: 100%;
    }

    .library-stats {
        grid-template-columns: 1fr;
    }

    .library-list {
        grid-template-columns: 1fr;
    }

    .library-detail-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .library-detail-actions {
        width: 100%;
    }

    .library-detail-actions .header-btn {
        flex: 1;
    }

    .audio-player-row {
        flex-direction: column;
        gap: 8px;
    }

    .audio-download-btn {
        width: 100%;
        justify-content: center;
    }
}

/* History Detail View */
.history-detail {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0; /* Critical for flex children to scroll properly */
}

.history-detail-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
    flex-shrink: 0;
}

.back-btn {
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: all 0.2s;
}

.back-btn:hover {
    border-color: var(--accent);
    background: var(--bg-elevated);
}

.history-detail-info {
    flex: 1;
}

.history-detail-info h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.history-detail-info p {
    font-size: 12px;
    color: var(--text-muted);
}

.history-detail-panels {
    flex: 1;
    display: flex;
    gap: 12px;
    min-height: 0;
    overflow: hidden;
}

@media (max-width: 600px) {
    .history-detail-panels {
        flex-direction: column;
    }
}

/* Reusing coaching and transcript panel styles for history detail */
.history-coaching-panel {
    flex: 0 0 auto;
    width: 320px;
    background: linear-gradient(135deg, var(--bg-card), var(--bg-elevated));
    border: 1px solid var(--border-accent);
    border-radius: 16px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@media (max-width: 600px) {
    .history-coaching-panel {
        width: 100%;
        flex: 0 0 180px;
    }
}

.history-transcript-panel {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.history-panel-content {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* History View Container */
#historyView {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0; /* Critical for flex children to scroll properly */
}

/* Practice View Styles */
.persona-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    margin-top: 8px;
}

.persona-card {
    background: var(--bg-elevated);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.persona-card:hover {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.1);
}

.persona-card.selected {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.15);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.persona-card .avatar {
    font-size: 28px;
    margin-bottom: 6px;
}

.persona-card .name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.persona-card .company {
    font-size: 10px;
    color: var(--text-muted);
}

.practice-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.3);
}

.practice-btn:hover {
    box-shadow: 0 6px 30px rgba(245, 158, 11, 0.4);
}

.practice-btn.end-call {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.3);
}

.practice-info-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow: hidden;
}

.practice-persona-display {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.persona-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.persona-details h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.persona-details p {
    font-size: 13px;
    color: var(--text-secondary);
}

.practice-tips {
    flex: 1;
    overflow-y: auto;
}

.practice-tips h4 {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.practice-tips ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.practice-tips li {
    font-size: 13px;
    color: var(--text-secondary);
    padding-left: 20px;
    position: relative;
}

.practice-tips li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--warning);
}

/* Practice Status Banner Colors */
.status-banner.practice-active {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

/* Persona loading state */
.persona-loading {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 13px;
}

/* Practice config error */
.practice-config-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

.practice-config-error h4 {
    color: var(--danger);
    font-size: 14px;
    margin-bottom: 8px;
}

.practice-config-error p {
    font-size: 12px;
    color: var(--text-secondary);
}

.practice-config-error code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--warning);
}

/* Admin View Styles */
#adminView {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0; /* Critical for flex children to scroll properly */
}

.admin-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    padding-bottom: 20px;
}

.admin-header {
    text-align: center;
    padding: 12px;
}

.admin-header h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.admin-header p {
    font-size: 12px;
    color: var(--text-muted);
}

.admin-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-elevated);
    padding: 4px;
    border-radius: 10px;
}

.admin-tab {
    flex: 1;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
    color: var(--text-secondary);
}

.admin-tab:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.admin-tab.active {
    background: var(--accent);
    color: white;
}

.admin-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
}

.admin-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.admin-section-header h3 {
    font-size: 14px;
    font-weight: 600;
}

.admin-reset-btn {
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 500;
    font-family: inherit;
    border: 1px solid var(--danger);
    border-radius: 6px;
    cursor: pointer;
    background: transparent;
    color: var(--danger);
    transition: all 0.2s;
}

.admin-reset-btn:hover {
    background: rgba(239, 68, 68, 0.1);
}

.admin-reset-btn--neutral {
    border-color: var(--border);
    color: var(--text-secondary);
}

.admin-reset-btn--neutral:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-muted);
}

/* Workflow Log Table Styles */
#adminWorkflowSection .db-table-wrapper {
    overflow-x: auto;
    max-height: 600px;
    overflow-y: auto;
}
#adminWorkflowSection .db-table {
    min-width: 900px;
}
#wfDetailView .db-table {
    min-width: 1100px;
}
#wfDetailView .db-table td,
#wfDetailView .db-table th {
    white-space: nowrap;
}
#wfDetailView .db-table td:last-child {
    white-space: normal;
    min-width: 300px;
    max-width: 500px;
    word-break: break-word;
}

/* Admin Tab Divider */
/* Admin Dashboard Tabs (inside Dashboard view) */
.admin-dash-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-elevated);
    padding: 4px;
    border-radius: 10px;
    margin-bottom: 20px;
    width: fit-content;
}

.admin-dash-tab {
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
    color: var(--text-secondary);
}

.admin-dash-tab:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.admin-dash-tab.active {
    background: var(--accent);
    color: white;
}

.admin-dash-panel {
    padding: 0;
}

#adminDashboardContent {
    padding: 24px 32px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.admin-tab-divider {
    width: 1px;
    background: var(--border);
    margin: 4px 2px;
    flex-shrink: 0;
}

/* Admin Dashboard Overview Grid */
.admin-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.admin-metric-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.admin-metric-card .metric-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
}

.metric-icon.users-icon { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.metric-icon.calls-icon { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.metric-icon.recent-icon { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.metric-icon.company-icon { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }

.admin-metric-card .metric-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.admin-metric-card .metric-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.admin-metric-card .metric-sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Admin Detail Cards Row */
.admin-detail-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.admin-detail-cards.three-col {
    grid-template-columns: 1fr 2fr;
}

.admin-detail-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}

.admin-detail-card.span-2 {
    grid-column: span 1;
}

.admin-detail-card h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 14px;
}

/* Admin metric cards - bigger sizing */
.admin-metric-card {
    padding: 20px;
}

.admin-metric-card .metric-value {
    font-size: 32px;
}

/* Call Type Breakdown Bars */
.call-type-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.call-type-row:last-child { margin-bottom: 0; }

.ct-label {
    font-size: 12px;
    color: var(--text-secondary);
    width: 70px;
    flex-shrink: 0;
}

.ct-bar-track {
    flex: 1;
    height: 8px;
    background: var(--bg-card);
    border-radius: 4px;
    overflow: hidden;
}

.ct-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.ct-bar.ct-lab { background: #818cf8; }
.ct-bar.ct-practice { background: #22c55e; }
.ct-bar.ct-client { background: #f59e0b; }
.ct-bar.ct-candidate { background: #06b6d4; }

.ct-value {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    width: 35px;
    text-align: right;
    flex-shrink: 0;
}

/* Daily Chart Mini Bars */
.admin-daily-chart {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 100px;
    padding-top: 4px;
}

.daily-bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    height: 100%;
    justify-content: flex-end;
}

.daily-bar {
    width: 100%;
    min-height: 2px;
    background: var(--accent);
    border-radius: 3px 3px 0 0;
    transition: height 0.3s ease;
}

.daily-bar-label {
    font-size: 9px;
    color: var(--text-muted);
    white-space: nowrap;
}

.daily-chart-empty {
    width: 100%;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    padding: 20px;
}

/* Admin User Activity List */
.admin-user-activity-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.user-activity-card {
    display: grid;
    grid-template-columns: 40px 200px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: border-color 0.2s;
}

.user-activity-card:hover {
    border-color: var(--accent);
}

.ua-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.ua-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

.ua-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

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

.ua-user-meta {
    font-size: 11px;
    color: var(--text-muted);
}

.ua-company-badge {
    font-size: 10px;
    color: var(--accent);
    background: rgba(99, 102, 241, 0.1);
    padding: 1px 6px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 2px;
}

.ua-stats {
    display: flex;
    gap: 16px;
    align-items: center;
}

.ua-stat {
    text-align: center;
}

.ua-stat-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.ua-stat-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ua-score {
    font-size: 16px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
    min-width: 50px;
    text-align: center;
}

.ua-score.high { color: #22c55e; background: rgba(34, 197, 94, 0.1); }
.ua-score.medium { color: #f59e0b; background: rgba(245, 158, 11, 0.1); }
.ua-score.low { color: #ef4444; background: rgba(239, 68, 68, 0.1); }
.ua-score.none { color: var(--text-muted); background: var(--bg-card); }

.ua-last-active {
    font-size: 11px;
    color: var(--text-muted);
    text-align: right;
}

.ua-avatar-clickable {
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.ua-avatar-clickable:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.avatar-preview-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    cursor: pointer;
}
.avatar-preview-content {
    position: relative;
    cursor: default;
    text-align: center;
}
.avatar-preview-img {
    max-width: 300px;
    max-height: 300px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.avatar-preview-name {
    margin-top: 12px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}
.avatar-preview-close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: var(--bg-elevated, #333);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.ua-role-badge {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 500;
}

.ua-role-badge.admin { color: #f59e0b; background: rgba(245, 158, 11, 0.1); }
.ua-role-badge.manager { color: var(--ekho-purple); background: rgba(147, 78, 134, 0.1); }
.ua-role-badge.client_admin { color: var(--ekho-orange, #f48a4b); background: rgba(244, 138, 75, 0.1); }
.ua-role-badge.user { color: var(--text-muted); background: var(--bg-card); }

/* Unanalysed Calls List */
.admin-unanalysed-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.unanalysed-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.unanalysed-card .ua-title {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.unanalysed-card .ua-owner {
    font-size: 12px;
    color: var(--text-secondary);
    min-width: 100px;
}

.unanalysed-card .ua-date {
    font-size: 11px;
    color: var(--text-muted);
    min-width: 80px;
    text-align: right;
}

.unanalysed-card .ua-action-btn {
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 500;
    font-family: inherit;
    border: 1px solid var(--accent);
    border-radius: 6px;
    cursor: pointer;
    background: transparent;
    color: var(--accent);
    transition: all 0.2s;
    white-space: nowrap;
}

.unanalysed-card .ua-action-btn:hover {
    background: var(--accent);
    color: white;
}

.unanalysed-card .ua-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.unanalysed-card .ua-no-transcript {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    font-style: italic;
}

.unanalysed-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 24px;
    font-size: 13px;
}

