/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: #2c3e50;
    line-height: 1.6;
}

.app-container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 30px rgba(0,0,0,0.1);
    position: relative;
}

/* Top Navigation */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    height: 70px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 600;
}

.nav-brand i {
    font-size: 24px;
}

.nav-controls {
    display: flex;
    gap: 10px;
}

.nav-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.nav-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

/* Main Content */
.main-content {
    padding: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

/* Voice Interface Section */
.voice-interface {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
}

.interface-header {
    text-align: center;
    margin-bottom: 30px;
}

.interface-header h1 {
    font-size: 2.2em;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 300;
}

.persona-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.persona-selector label {
    font-weight: 500;
    color: #6c757d;
}

.persona-selector select {
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    color: #495057;
    font-size: 14px;
    min-width: 150px;
    transition: border-color 0.3s ease;
}

.persona-selector select:focus {
    outline: none;
    border-color: #667eea;
}

/* Conversation Container */
.conversation-container {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
}

.conversation {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bot-message, .user-message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: fadeInUp 0.3s ease;
}

.user-message {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.bot-message .message-avatar {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.user-message .message-avatar {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: white;
}

.message-content {
    max-width: 70%;
    padding: 15px 20px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.bot-message .message-content {
    background: white;
    color: #2c3e50;
    border-bottom-left-radius: 6px;
    border: 1px solid #e9ecef;
}

.user-message .message-content {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-bottom-right-radius: 6px;
}

/* Agent-specific message styles */
.agent-label {
    font-size: 10px;
    font-weight: bold;
    color: #666;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.message-text {
    line-height: 1.4;
}

/* Agent-specific avatar styles */
.agent-avatar-bankinginfoagent {
    background: linear-gradient(135deg, #2c5aa0, #4a90e2);
}

.agent-avatar-fraudagent {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
}

.agent-avatar-idvagent {
    background: linear-gradient(135deg, #28a745, #2ecc71);
}

.agent-avatar-paymentsagent {
    background: linear-gradient(135deg, #17a2b8, #3498db);
}

.agent-avatar-defaultagent {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

/* Handle sanitized agent names with hyphens */
.agent-avatar-banking-info-agent {
    background: linear-gradient(135deg, #2c5aa0, #4a90e2);
}

.agent-avatar-fraud-agent {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
}

.agent-avatar-idv-agent {
    background: linear-gradient(135deg, #28a745, #2ecc71);
}

.agent-avatar-payments-agent {
    background: linear-gradient(135deg, #17a2b8, #3498db);
}

.agent-avatar-default-agent {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

/* Agent indicator in status bar */
.agent-name.agent-bankinginfoagent {
    color: #2c5aa0;
}

.agent-name.agent-fraudagent {
    color: #dc3545;
}

.agent-name.agent-idvagent {
    color: #28a745;
}

.agent-name.agent-paymentsagent {
    color: #17a2b8;
}

.agent-name.agent-defaultagent {
    color: #667eea;
}

/* Handle sanitized agent names with hyphens */
.agent-name.agent-banking-info-agent {
    color: #2c5aa0;
}

.agent-name.agent-fraud-agent {
    color: #dc3545;
}

.agent-name.agent-idv-agent {
    color: #28a745;
}

.agent-name.agent-payments-agent {
    color: #17a2b8;
}

.agent-name.agent-default-agent {
    color: #667eea;
}

/* Voice Controls */
.voice-controls {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    border: 1px solid #e9ecef;
}

/* Mode Selector */
.mode-selector {
    text-align: center;
    margin-bottom: 25px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.mode-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.mode-checkbox {
    display: none;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-weight: 500;
    color: #495057;
}

.toggle-slider {
    position: relative;
    width: 60px;
    height: 30px;
    background: #dee2e6;
    border-radius: 15px;
    transition: background 0.3s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.mode-checkbox:checked + .toggle-label .toggle-slider {
    background: #667eea;
}

.mode-checkbox:checked + .toggle-label .toggle-slider::before {
    transform: translateX(30px);
}

.mode-description {
    font-size: 13px;
    color: #6c757d;
    font-style: italic;
}

/* Control Buttons */
.control-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.control-group.hidden {
    display: none;
}

/* Button Styles */
.primary-btn, .secondary-btn, .mute-btn, .clear-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    justify-content: center;
}

.primary-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.primary-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.secondary-btn {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.secondary-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.mute-btn {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #212529;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.mute-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4);
}

.mute-btn.muted {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    animation: pulse 1.5s infinite;
}

.clear-btn {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.clear-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Status Indicators */
.status-indicators {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.connection-status, .agent-indicator, .audio-level {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.status-badge.disconnected {
    background: #f8d7da;
    color: #721c24;
}

.status-badge.connected {
    background: #d4edda;
    color: #155724;
}

.status-badge.connecting {
    background: #fff3cd;
    color: #856404;
    animation: pulse 1s infinite;
}

.agent-label {
    font-size: 12px;
    color: #000000 !important;  /* Force black color with !important */
    font-weight: 500;
}

.agent-name {
    padding: 4px 12px;
    background: #e9ecef;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    color: #000000 !important;  /* Force black color with !important */
}

.level-label {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
}

.level-bar {
    width: 100px;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.level-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745 0%, #ffc107 70%, #dc3545 100%);
    width: 0%;
    transition: width 0.1s ease;
}

/* Main Status */
.main-status {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.status-text {
    font-size: 16px;
    font-weight: 500;
    color: #495057;
    margin-bottom: 8px;
}

.quality-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.quality-indicator.not-recording {
    background: #f8d7da;
    color: #721c24;
}

.quality-indicator.recording {
    background: #d4edda;
    color: #155724;
    animation: pulse 1s infinite;
}

/* Quick Actions */
.quick-actions {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
}

.quick-actions h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 500;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

/* Custom Message Input */
.custom-message-input {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.input-group {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.input-group input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.input-group input:focus {
    border-color: #007bff;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.send-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 25px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.send-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

.send-btn:active {
    transform: translateY(0);
}

.input-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 12px;
    color: #6c757d;
}

.char-counter {
    font-weight: 500;
}

.input-hint {
    font-style: italic;
}

/* Recent Messages */
.recent-messages-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.recent-messages-section h4 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.recent-messages-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.recent-message-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #e9ecef;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    color: #495057;
    transition: all 0.2s ease;
    max-width: 200px;
}

.recent-message-btn:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
    transform: translateY(-1px);
}

.recent-message-btn i {
    font-size: 10px;
    opacity: 0.7;
}

.recent-message-btn span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #495057;
}

.action-btn:hover {
    background: #e9ecef;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.action-btn i {
    font-size: 24px;
    color: #667eea;
}

.action-btn span {
    font-weight: 500;
    font-size: 14px;
}

/* Usage Statistics */
.usage-stats {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.stats-header h3 {
    color: #2c3e50;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stats-controls {
    display: flex;
    gap: 8px;
}

.stats-btn {
    width: 35px;
    height: 35px;
    border: none;
    background: #f8f9fa;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

.stats-btn:hover {
    background: #e9ecef;
    color: #495057;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.stat-item.total {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
}

.stat-value {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
}

.stat-label {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    font-weight: 500;
    margin-bottom: 5px;
}

.stat-item.total .stat-label {
    color: rgba(255,255,255,0.8);
}

.stat-cost {
    font-size: 14px;
    font-weight: 500;
    color: #28a745;
}

.stat-item.total .stat-cost {
    color: rgba(255,255,255,0.9);
}

/* Side Panels */
.side-panel {
    position: fixed;
    top: 0;
    right: -500px;
    width: 500px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 20px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
}

.side-panel.open {
    right: 0;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.panel-header h2 {
    font-size: 18px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-panel {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.close-panel:hover {
    background: rgba(255,255,255,0.1);
}

.panel-content {
    padding: 25px;
}

/* Panel Overlay */
.panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.panel-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .top-nav {
        padding: 0 20px;
    }
    
    .nav-brand {
        font-size: 18px;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .side-panel {
        width: 100%;
        right: -100%;
    }
    
    .control-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .control-group {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }
    
    .status-indicators {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .action-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .nav-controls {
        gap: 5px;
    }
    
    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .interface-header h1 {
        font-size: 1.8em;
    }
    
    .persona-selector {
        flex-direction: column;
        gap: 10px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}/
* Settings Panel Styles */
.settings-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.settings-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 500;
    font-size: 16px;
}

.setting-group {
    margin-bottom: 15px;
}

.setting-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #495057;
    font-size: 14px;
}

.setting-group select,
.setting-group input[type="range"],
.setting-group input[type="text"],
.setting-group input[type="password"],
.setting-group input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.setting-group select:focus,
.setting-group input:focus {
    outline: none;
    border-color: #667eea;
}

.api-key-input {
    display: flex;
    gap: 10px;
}

.api-key-input input {
    flex: 1;
}

.save-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.save-btn:hover {
    background: #218838;
}

.api-status {
    margin-top: 8px;
    font-size: 12px;
}

.status-indicator {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

/* Admin Panel Styles */
.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 25px;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 10px;
}

.admin-nav-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-size: 14px;
    color: #495057;
}

.admin-nav-btn:hover {
    background: #e9ecef;
}

.admin-nav-btn.active {
    background: #667eea;
    color: white;
}

.admin-content {
    min-height: 400px;
}

.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
}

.admin-section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 500;
    font-size: 18px;
}

.admin-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.admin-card h4 {
    color: #495057;
    margin-bottom: 15px;
    font-weight: 500;
    font-size: 16px;
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-weight: 500;
    color: #495057;
    font-size: 14px;
}

.form-group input,
.form-group select {
    padding: 10px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease;
    align-self: flex-start;
}

.submit-btn:hover {
    background: #5a67d8;
}

/* Persona Grid */
.persona-grid {
    display: grid;
    gap: 15px;
}

.persona-card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.persona-card h5 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 500;
}

.persona-card p {
    margin: 5px 0;
    color: #6c757d;
    font-size: 14px;
}

.delete-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-top: 10px;
    transition: background 0.3s ease;
}

.delete-btn:hover {
    background: #c82333;
}

/* Agent Overview */
.agent-overview {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.stat-card {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.stat-number {
    font-size: 24px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
}

.stat-number.enabled {
    color: #28a745;
}

.stat-number.disabled {
    color: #dc3545;
}

.stat-title {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    font-weight: 500;
}

.agent-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.action-btn.primary {
    background: #667eea;
    color: white;
}

.action-btn.secondary {
    background: #6c757d;
    color: white;
}

.action-btn.primary:hover {
    background: #5a67d8;
}

.action-btn.secondary:hover {
    background: #5a6268;
}

/* Prompt Tabs */
.prompt-tabs {
    display: flex;
    background: #e9ecef;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.prompt-tab {
    flex: 1;
    padding: 12px 16px;
    background: none;
    border: none;
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.prompt-tab:hover {
    background: #dee2e6;
    color: #495057;
}

.prompt-tab.active {
    background: white;
    color: #667eea;
}

.prompt-content {
    background: white;
    border: 1px solid #e9ecef;
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 20px;
}

.prompt-panel {
    display: none;
}

.prompt-panel.active {
    display: block;
}

.prompt-panel h4 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 500;
}

.prompt-panel textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.prompt-panel textarea:focus {
    outline: none;
    border-color: #667eea;
}

.prompt-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.save-btn, .reset-btn, .test-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-btn {
    background: #ffc107;
    color: #212529;
}

.reset-btn:hover {
    background: #e0a800;
}

.test-btn {
    background: #6f42c1;
    color: white;
}

.test-btn:hover {
    background: #5a32a3;
}

.add-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #17a2b8;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.add-btn:hover {
    background: #138496;
}

/* LLM Console */
.llm-overview {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}

.llm-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    min-width: 0;
    flex: 1;
}

.llm-stat {
    text-align: center;
    min-width: 80px;
}

.llm-stat .stat-value {
    font-size: 20px;
    font-weight: 600;
    color: #495057;
    display: block;
    margin-bottom: 5px;
}

.llm-stat .stat-label {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    font-weight: 500;
    line-height: 1.2;
}

.llm-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.llm-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    min-width: fit-content;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.llm-btn.primary {
    background: #667eea;
    color: white;
}

.llm-btn.secondary {
    background: #6c757d;
    color: white;
}

.llm-btn:hover {
    transform: translateY(-1px);
}

/* Debug Panel Styles */
.debug-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 25px;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 10px;
}

.debug-nav-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-size: 14px;
    color: #495057;
}

.debug-nav-btn:hover {
    background: #e9ecef;
}

.debug-nav-btn.active {
    background: #dc3545;
    color: white;
}

.debug-content {
    min-height: 400px;
}

.debug-section {
    display: none;
}

.debug-section.active {
    display: block;
}

.debug-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #e9ecef;
}

.debug-card h4 {
    color: #495057;
    margin-bottom: 10px;
    font-weight: 500;
    font-size: 14px;
}

.debug-output {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 12px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #34495e;
}

.test-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.test-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #6f42c1;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
}

.test-btn:hover {
    background: #5a32a3;
    transform: translateY(-1px);
}

.log-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.log-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.3s ease;
}

.log-btn:hover {
    background: #5a6268;
}

.log-btn.toggle-btn {
    background: #dc3545;
    transition: all 0.3s ease;
}

.log-btn.toggle-btn:hover {
    background: #c82333;
}

.log-btn.toggle-btn.active {
    background: #28a745;
}

.log-btn.toggle-btn.active:hover {
    background: #218838;
}

/* System Log Styles */
.debug-output {
    max-height: 300px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    line-height: 1.4;
}

.log-entry {
    padding: 4px 8px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.log-entry:last-child {
    border-bottom: none;
}

.log-time {
    color: #666;
    font-weight: bold;
    min-width: 70px;
    flex-shrink: 0;
}

.log-module {
    color: #007bff;
    font-weight: bold;
    min-width: 80px;
    flex-shrink: 0;
}

.log-message {
    color: #333;
    flex: 1;
    word-break: break-word;
}

/* Log level specific styles */
.log-entry.log-info {
    background: #f8f9fa;
}

.log-entry.log-warn {
    background: #fff3cd;
    border-left: 3px solid #ffc107;
}

.log-entry.log-warn .log-module {
    color: #856404;
}

.log-entry.log-error {
    background: #f8d7da;
    border-left: 3px solid #dc3545;
}

.log-entry.log-error .log-module {
    color: #721c24;
}

.log-entry.log-debug {
    background: #e2e3e5;
    border-left: 3px solid #6c757d;
}

.log-entry.log-debug .log-module {
    color: #495057;
}

.log-entry.system-info {
    background: #d1ecf1;
    border-left: 3px solid #17a2b8;
    font-style: italic;
}

.log-entry.system-info .log-module {
    color: #0c5460;
}

/* Help Panel Styles */
.help-section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 500;
}

.help-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.help-card h4 {
    color: #495057;
    margin-bottom: 15px;
    font-weight: 500;
}

.help-card ul {
    list-style: none;
    padding: 0;
}

.help-card li {
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
    color: #6c757d;
    position: relative;
    padding-left: 20px;
}

.help-card li:before {
    content: '•';
    color: #667eea;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.help-card li:last-child {
    border-bottom: none;
}

/* Version Information Styles */
.version-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-bottom: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.version-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.version-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    margin: 0;
}

.version-header h4 {
    color: white;
    margin: 0;
    font-size: 1.1em;
}

.version-toggle {
    font-size: 0.9em;
    transition: transform 0.3s ease;
    opacity: 0.8;
}

.version-toggle.expanded {
    transform: rotate(180deg);
}

.version-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideDown 0.3s ease;
}

.version-details.hidden {
    display: none;
}

.version-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

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

.version-label {
    font-weight: 500;
    opacity: 0.9;
}

.version-value {
    font-weight: 600;
    background: rgba(255, 255, 255, 0.15);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 200px;
    }
}

/* Range Input Styling */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #667eea;
    border-radius: 50%;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #667eea;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Checkbox Styling */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
    margin-right: 8px;
}

/* Additional responsive styles for panels */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .overview-stats {
        grid-template-columns: 1fr;
    }
    
    .agent-actions {
        flex-direction: column;
    }
    
    .prompt-tabs {
        flex-direction: column;
    }
    
    .llm-overview {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .llm-stats {
        justify-content: space-around;
        margin-bottom: 15px;
    }
    
    .llm-actions {
        justify-content: center;
        width: 100%;
    }
    
    .llm-btn {
        flex: 1;
        min-width: 120px;
        max-width: 200px;
        justify-content: center;
    }
    
    /* Additional responsive adjustments for very small screens */
    @media (max-width: 480px) {
        .llm-actions {
            flex-direction: column;
            width: 100%;
        }
        
        .llm-btn {
            width: 100%;
            max-width: none;
        }
        
        .llm-stats {
            gap: 15px;
        }
        
        .llm-stat .stat-value {
            font-size: 18px;
        }
        
        .llm-stat .stat-label {
            font-size: 11px;
        }
    }
    
    .test-buttons {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .prompt-actions {
        flex-direction: column;
    }
}/* 
Transaction Management Styles */
.form-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.form-section h5 {
    color: #495057;
    margin-bottom: 15px;
    font-weight: 500;
    font-size: 14px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.transactions-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.transaction-entry {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr auto;
    gap: 10px;
    align-items: end;
    padding: 15px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
}

.transaction-entry input {
    padding: 8px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    font-size: 13px;
}

.transaction-entry input:focus {
    outline: none;
    border-color: #667eea;
}

.add-transaction-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.3s ease;
    align-self: flex-start;
}

.add-transaction-btn:hover {
    background: #218838;
}

.remove-transaction-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.3s ease;
}

.remove-transaction-btn:hover {
    background: #c82333;
}

.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.transaction-item {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr auto;
    gap: 10px;
    align-items: center;
    padding: 12px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
}

.transaction-item input {
    padding: 6px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    font-size: 13px;
}

.transaction-item input:focus {
    outline: none;
    border-color: #667eea;
}

.transaction-amount {
    font-weight: 500;
}

.transaction-amount.positive {
    color: #28a745;
}

.transaction-amount.negative {
    color: #dc3545;
}

/* Modal Styles */
.modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.6) !important;
    display: none !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 100000 !important;
    backdrop-filter: blur(2px);
    padding: 20px;
    box-sizing: border-box;
}

/* When modal is shown */
.modal-overlay.show {
    display: flex !important;
    animation: modalFadeIn 0.3s ease-out;
}

/* When modal is being hidden */
.modal-overlay.hiding {
    animation: modalFadeOut 0.3s ease-out;
}

.modal-content {
    background: white !important;
    border-radius: 12px !important;
    width: 90% !important;
    max-width: 700px !important;
    max-height: 85vh !important;
    overflow-y: auto !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4) !important;
    border: 2px solid #667eea !important;
    position: relative !important;
    animation: modalSlideIn 0.3s ease-out;
    margin: auto;
}

/* Ensure modal content doesn't get cut off */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #5a67d8;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes modalFadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 20px 24px;
    border-bottom: 2px solid #e9ecef;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px 12px 0 0;
}

.modal-header h3 {
    color: #2c3e50;
    font-weight: 600;
    margin: 0;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h3::before {
    content: "✏️";
    font-size: 18px;
}

.modal-close {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    font-size: 16px;
    color: #6c757d;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
    transform: scale(1.1);
}

.modal-body {
    padding: 24px;
    background: white;
    border-radius: 0 0 12px 12px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
}

.cancel-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.cancel-btn:hover {
    background: #5a6268;
}

/* Edit button for persona cards */
.persona-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.edit-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.3s ease;
}

.edit-btn:hover {
    background: #5a67d8;
}

/* Transaction display in persona cards */
.persona-transactions {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
}

.persona-transactions h6 {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 8px;
    font-weight: 500;
}

.transaction-summary {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.transaction-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #6c757d;
}

.transaction-summary-amount {
    font-weight: 500;
}

.transaction-summary-amount.positive {
    color: #28a745;
}

.transaction-summary-amount.negative {
    color: #dc3545;
}

/* Responsive adjustments for transaction management */
@media (max-width: 768px) {
    .transaction-entry,
    .transaction-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}