.analytics-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:1rem;margin-bottom:1.5rem}.analytics-metric-card{background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-md);padding:.75rem;transition:all .2s ease}.analytics-metric-card:hover{border-color:var(--color-primary)}.analytics-metric-header{display:flex;align-items:center;gap:.375rem;margin-bottom:.5rem}.analytics-metric-icon{width:20px;height:20px;background:rgba(59,130,246,.1);color:#3b82f6;border-radius:var(--radius-sm);display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:var(--text-xs)}.analytics-metric-title{margin:0;font-size:var(--text-sm);font-weight:600;color:var(--color-text-primary);line-height:1.2}.analytics-metric-period{font-size:var(--text-xs);font-weight:500;color:var(--color-text-secondary)}.analytics-metric-value{font-size:var(--text-xl);font-weight:600;color:var(--color-text-primary);line-height:1}.analytics-metric-date{color:var(--color-primary)}.analytics-metric-percentage{display:block;margin-bottom:.5rem}.success-bar{width:100%;height:6px;background:var(--color-border);border-radius:3px;overflow:hidden}.success-progress{height:100%;background:var(--color-success);border-radius:3px;transition:width .3s ease}.analytics-charts{display:grid;grid-template-columns:1fr;gap:1.5rem;margin-bottom:1.5rem}.chart-card{background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-lg);overflow:hidden}.chart-header{padding:.875rem 1rem .625rem;border-bottom:1px solid var(--color-border)}.chart-header-top{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem}.chart-actions{display:flex;align-items:center;gap:.5rem;flex-shrink:0}.period-select{padding:.375rem .625rem;font-size:var(--text-sm);border:1px solid var(--color-border);border-radius:var(--radius-sm);background:var(--color-surface);color:var(--color-text-primary);cursor:pointer}.period-select:focus{outline:none;border-color:var(--color-primary)}.export-btn{display:flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:1px solid var(--color-border);border-radius:var(--radius-sm);background:var(--color-surface);color:var(--color-text-secondary);cursor:pointer;transition:all .2s}.export-btn:hover{border-color:var(--color-primary);color:var(--color-primary)}.export-btn i{font-size:var(--text-sm)}.chart-title{margin:0 0 .25rem;font-size:var(--text-md);font-weight:600;color:var(--color-text-primary)}.chart-period{font-weight:400}.chart-description,.chart-period{color:var(--color-text-secondary)}.chart-description{margin:0;font-size:var(--text-sm);line-height:1.4}.chart-content{padding:1rem}.chart-container{height:250px;position:relative}#engagementChart{width:100%!important;height:100%!important}.api-usage-list{display:flex;flex-direction:column;gap:1rem}.api-usage-item{display:flex;align-items:center;justify-content:space-between;gap:1rem}.api-info{flex:1;min-width:0}.api-name{color:var(--color-text-primary);margin-bottom:.125rem}.api-calls{color:var(--color-text-secondary)}.usage-bar{flex:1;max-width:120px;height:6px;background:var(--color-border);border-radius:3px;overflow:hidden}.usage-progress{height:100%;background:var(--color-primary);border-radius:3px;transition:width .3s ease}[data-theme=dark] .analytics-metric-card,[data-theme=dark] .chart-card{background:var(--color-surface);border-color:var(--color-border)}[data-theme=dark] .analytics-metric-card:hover,[data-theme=dark] .chart-card:hover{box-shadow:0 4px 12px rgba(0,0,0,.3)}@media (max-width:1024px){.analytics-charts{grid-template-columns:1fr;gap:1.5rem}.analytics-metrics{grid-template-columns:repeat(2,1fr);gap:1rem}}@media (max-width:850px){.analytics-metrics{grid-template-columns:1fr;gap:1rem}.analytics-metric-card{padding:1.25rem}.chart-header{padding:1.25rem 1.25rem .75rem}.chart-content{padding:1.25rem}.chart-container{height:250px}.chart-bars{gap:1px}.api-usage-item{flex-direction:column;align-items:stretch;gap:.5rem}.usage-bar{max-width:none;height:8px}}@media (max-width:1023px){.hide-below-1024{display:none!important}}@media (max-width:480px){.analytics-metric-header{gap:.5rem}.analytics-metric-icon{width:36px;height:36px;font-size:var(--text-lg)}}.call-history-section{margin-bottom:1.5rem}.load-history-btn,.refresh-btn{display:flex;align-items:center;gap:.5rem;padding:.5rem 1rem;font-size:var(--text-sm);font-weight:500;border:1px solid var(--color-border);border-radius:var(--radius-sm);background:var(--color-surface);color:var(--color-text-primary);cursor:pointer;transition:all .2s}.load-history-btn:hover,.refresh-btn:hover{border-color:var(--color-primary);color:var(--color-primary)}.load-history-btn:disabled,.refresh-btn:disabled{opacity:.6;cursor:not-allowed}.refresh-btn{padding:.5rem;width:32px;height:32px;justify-content:center}.call-history-content{padding:1rem}.call-history-empty,.call-history-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:2rem 1rem;text-align:center;color:var(--color-text-secondary)}.call-history-empty i,.call-history-placeholder i{font-size:1.5rem;margin-bottom:.75rem;opacity:.4}.call-history-empty p,.call-history-placeholder p{margin:0 0 .25rem;font-size:var(--text-sm);font-weight:500}.call-history-empty span,.call-history-note{font-size:var(--text-xs);opacity:.7}.call-history-note{display:block;margin-top:.5rem;color:var(--color-text-tertiary)}.call-history-loading-notice{display:flex;align-items:center;justify-content:center;gap:.5rem;padding:.75rem 1rem;margin-bottom:.5rem;font-size:var(--text-sm);color:var(--color-text-secondary);background:var(--color-background);border-radius:var(--radius-sm)}.call-history-loading-notice i{color:var(--color-primary);opacity:.7}.beta-pill{display:inline-flex;align-items:center;margin-left:.5rem;padding:.125rem .5rem;font-size:var(--text-xs);font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--color-primary);background:rgba(59,130,246,.1);border-radius:var(--radius-full);vertical-align:middle}.call-history-upgrade-prompt{padding:.75rem 1rem;margin-top:.5rem;background:linear-gradient(135deg,rgba(59,130,246,.05),rgba(139,92,246,.05));border:1px dashed var(--color-border);border-radius:var(--radius-sm)}.upgrade-prompt-content{display:flex;align-items:center;justify-content:center;gap:.5rem;font-size:var(--text-sm);color:var(--color-text-secondary)}.upgrade-prompt-content i{color:var(--color-primary);opacity:.7}.upgrade-link{background:none;border:none;padding:0;margin-left:.25rem;font-size:var(--text-sm);font-weight:500;color:var(--color-primary);cursor:pointer;text-decoration:underline;text-underline-offset:2px}.upgrade-link:hover{color:var(--color-primary-hover)}.call-history-load-more{display:flex;justify-content:center;padding:1rem;border-top:1px solid var(--color-border)}.load-more-btn{display:flex;align-items:center;gap:.5rem;padding:.5rem 1.25rem;font-size:var(--text-sm);font-weight:500;color:var(--color-text-secondary);background:var(--color-background);border:1px solid var(--color-border);border-radius:var(--radius-sm);cursor:pointer;transition:all .2s}.load-more-btn:hover:not(:disabled){color:var(--color-primary);border-color:var(--color-primary);background:rgba(59,130,246,.05)}.load-more-btn:disabled{opacity:.6;cursor:not-allowed}.load-more-btn i{font-size:var(--text-xs)}.call-history-table-wrapper{overflow-x:auto}.call-history-table{width:100%;border-collapse:collapse;font-size:var(--text-sm)}.call-history-table td,.call-history-table th{padding:.75rem .5rem;text-align:left;border-bottom:1px solid var(--color-border)}.call-history-table th{font-weight:600;color:var(--color-text-secondary);font-size:var(--text-xs);text-transform:uppercase;letter-spacing:.05em}.call-history-table tbody tr:hover,.call-history-table th{background:var(--color-background)}.call-history-table tbody tr:last-child td{border-bottom:none}.call-time{white-space:nowrap;color:var(--color-text-secondary)}.call-api{font-weight:500;color:var(--color-text-primary)}.call-latency,.call-tokens{color:var(--color-text-secondary);text-align:center}.method-badge{display:inline-block;padding:.125rem .5rem;font-size:var(--text-xs);font-weight:600;border-radius:var(--radius-sm);text-transform:uppercase}.method-get{background:rgba(34,197,94,.1);color:#22c55e}.method-post{background:rgba(59,130,246,.1);color:#3b82f6}.method-put{background:rgba(249,115,22,.1);color:#f97316}.method-delete{background:rgba(239,68,68,.1);color:#ef4444}.method-patch{background:rgba(168,85,247,.1);color:#a855f7}.status-badge{display:inline-block;padding:.125rem .5rem;font-size:var(--text-xs);font-weight:600;border-radius:var(--radius-sm)}.status-success{background:rgba(34,197,94,.1);color:#22c55e}.status-warning{background:rgba(249,115,22,.1);color:#f97316}.status-error{background:rgba(239,68,68,.1);color:#ef4444}@media (max-width:768px){.call-history-table td:nth-child(3),.call-history-table td:nth-child(5),.call-history-table th:nth-child(3),.call-history-table th:nth-child(5){display:none}.call-history-table td,.call-history-table th{padding:.625rem .375rem}}@media (max-width:480px){.call-history-table td:nth-child(6),.call-history-table th:nth-child(6){display:none}.load-history-btn{width:100%;justify-content:center}.chart-header-top{flex-direction:column;gap:.75rem}}