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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background: #f7fafc;
    overflow-x: hidden;
}

/* Dashboard Container */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: linear-gradient(135deg, #468ACE 0%, #2c5aa0 100%);
    color: white;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo {
    width: 75px;
    height: 75px;
    filter: brightness(0) invert(1);
}

.sidebar-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.sidebar-nav ul {
    list-style: none;
    padding: 1rem 0;
}

.sidebar-nav li {
    margin: 0.25rem 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    border-left-color: rgba(255,255,255,0.3);
}

.nav-link.active {
    background: rgba(255,255,255,0.15);
    color: white;
    border-left-color: white;
}

.nav-link i {
    width: 20px;
    text-align: center;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    background: #f7fafc;
    min-height: 100vh;
}

/* Dashboard Header */
.dashboard-header {
    background: white;
    padding: 1rem 2rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #4a5568;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: background 0.3s ease;
}

.sidebar-toggle:hover {
    background: #f7fafc;
}

.header-left h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* User Menu Styles */
.user-menu {
    position: relative;
    display: flex;
    align-items: center;
    margin-right: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.user-info:hover {
    background-color: rgba(102, 126, 234, 0.1);
}

.user-name {
    font-weight: 500;
    color: #4a5568;
    font-size: 0.875rem;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #4a5568;
    text-decoration: none;
    font-size: 0.875rem;
    transition: background-color 0.2s ease;
}

.user-dropdown a:hover {
    background-color: #f7fafc;
}

.user-dropdown hr {
    margin: 0.5rem 0;
    border: none;
    border-top: 1px solid #e2e8f0;
}

/* Search Container */
.search-container {
    display: flex;
    align-items: center;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.search-container:focus-within {
    border-color: #468ACE;
    box-shadow: 0 0 0 3px rgba(70, 138, 206, 0.1);
}

.search-input {
    border: none;
    background: none;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    outline: none;
    width: 250px;
}

.search-btn {
    background: #468ACE;
    border: none;
    color: white;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-btn:hover {
    background: #3a7bb8;
}

/* Status Indicator */
.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-indicator.connected {
    background: #48bb78;
}

.status-indicator.disconnected {
    background: #e53e3e;
}

.status-indicator.loading {
    background: #ed8936;
    animation: pulse 2s infinite;
}

.status-text {
    font-size: 0.875rem;
    color: #4a5568;
    font-weight: 500;
}

/* Stats Section */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
}

.stat-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    background: linear-gradient(135deg, #468ACE 0%, #2c5aa0 100%);
}

.stat-content h3 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.stat-content p {
    font-size: 0.875rem;
    color: #718096;
    font-weight: 500;
}

/* Content Sections */
.content-sections {
    padding: 0 2rem 2rem;
}

.content-section {
    display: none;
}

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

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

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

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

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

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #cbd5e0;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

/* Models Section */
.models-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1.5rem;
}

.model-selector-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
    height: fit-content;
}

.model-selector-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1rem;
}

.model-selector select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    background: white;
    transition: border-color 0.3s ease;
}

.model-selector select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.model-info {
    margin-top: 1rem;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 0.375rem;
    border-left: 3px solid #667eea;
    font-size: 0.875rem;
    color: #4a5568;
}

.models-list {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
    max-height: 600px;
    overflow-y: auto;
}

.model-card {
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.model-card:hover {
    border-color: #667eea;
    background: #f7fafc;
}

.model-card.selected {
    border-color: #667eea;
    background: #edf2f7;
}

.model-card h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.model-card p {
    font-size: 0.75rem;
    color: #718096;
}

/* Chat Section */
.chat-container {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    height: 600px;
}

.chat-history {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    background: #f8f9fa;
    border-radius: 0.75rem 0.75rem 0 0;
}

.message {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    max-width: 80%;
    word-wrap: break-word;
}

.message.user {
    background: #667eea;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 0.25rem;
}

.message.assistant {
    background: white;
    color: #2d3748;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 0.25rem;
}

.message.error {
    background: #fed7d7;
    color: #c53030;
    border-left: 3px solid #e53e3e;
}

.input-section {
    padding: 1.5rem;
    border-top: 1px solid #e2e8f0;
    background: white;
    border-radius: 0 0 0.75rem 0.75rem;
}

.input-row {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

#messageInput {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    resize: vertical;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

#messageInput:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.controls {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.control-group label {
    font-weight: 500;
    color: #4a5568;
}

.control-group input[type="range"] {
    width: 80px;
}

.control-group input[type="number"] {
    width: 80px;
    padding: 0.25rem 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.25rem;
}

#tempValue {
    font-weight: 600;
    color: #667eea;
    min-width: 30px;
}

/* API Section */
.api-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.endpoint-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
}

.endpoint-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1rem;
}

.endpoint {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.endpoint:last-child {
    margin-bottom: 0;
}

.method {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.method.get {
    background: #c6f6d5;
    color: #22543d;
}

.method.post {
    background: #bee3f8;
    color: #2a4365;
}

.endpoint code {
    background: #f7fafc;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    border: 1px solid #e2e8f0;
    flex: 1;
    font-size: 0.875rem;
}

.description {
    font-size: 0.875rem;
    color: #718096;
    font-style: italic;
}

pre {
    background: #2d3748;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.4;
    margin: 0.75rem 0;
}

/* Analytics Section */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.chart-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
}

.chart-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1rem;
}

.chart-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #a0aec0;
    text-align: center;
}

.chart-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.chart-placeholder p {
    font-size: 0.875rem;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .models-grid {
        grid-template-columns: 1fr;
    }
    
    .analytics-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .dashboard-header {
        padding: 1rem;
    }
    
    .header-left h1 {
        font-size: 1.25rem;
    }
    
    .search-input {
        width: 200px;
    }
    
    .stats-section {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        padding: 1rem;
    }
    
    .content-sections {
        padding: 0 1rem 1rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .input-row {
        flex-direction: column;
    }
    
    .controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .endpoint {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .search-container {
        display: none;
    }
    
    .stats-section {
        grid-template-columns: 1fr;
    }
    
    .analytics-grid {
        grid-template-columns: 1fr;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Focus Styles */
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content.large {
    max-width: 700px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #718096;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f7fafc;
    color: #4a5568;
}

.modal-body {
    padding: 1.5rem;
}

/* Profile Modal Styles */
.profile-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.profile-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.profile-field label {
    font-weight: 600;
    color: #4a5568;
    font-size: 0.875rem;
}

.profile-field span {
    color: #2d3748;
    font-size: 0.875rem;
}

.role-badge, .tier-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.role-badge.admin {
    background: #fed7d7;
    color: #c53030;
}

.role-badge.user {
    background: #c6f6d5;
    color: #22543d;
}

.role-badge.moderator {
    background: #bee3f8;
    color: #2a4365;
}

.tier-badge.basic {
    background: #e2e8f0;
    color: #4a5568;
}

.tier-badge.premium {
    background: #fbb6ce;
    color: #97266d;
}

.tier-badge.enterprise {
    background: #d6f5d6;
    color: #22543d;
}

.api-key-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f7fafc;
    padding: 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid #e2e8f0;
}

.api-key-field code {
    flex: 1;
    background: none;
    border: none;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.75rem;
    color: #4a5568;
}

/* Usage Modal Styles */
.usage-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.usage-card {
    background: #f7fafc;
    border-radius: 0.5rem;
    padding: 1rem;
    border: 1px solid #e2e8f0;
}

.usage-card h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.75rem;
}

.usage-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

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

.usage-number {
    font-size: 1.125rem;
    font-weight: 700;
    color: #2d3748;
}

.usage-label {
    font-size: 0.875rem;
    color: #718096;
}

.usage-progress {
    margin-top: 0.75rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.75rem;
    color: #718096;
    margin-top: 0.25rem;
    display: block;
}

/* Settings Modal Styles */
.settings-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.settings-section {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 1rem;
}

.settings-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.settings-section h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.75rem;
}

.setting-item {
    margin-bottom: 0.75rem;
}

.setting-item:last-child {
    margin-bottom: 0;
}

.setting-item label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #4a5568;
    cursor: pointer;
}

.setting-item input[type="checkbox"] {
    margin: 0;
}

/* Agent Management Styles */
.agents-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.agent-form {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.form-card {
    padding: 2rem;
}

.form-card h3 {
    margin: 0 0 1.5rem 0;
    color: #2d3748;
    font-size: 1.5rem;
    font-weight: 600;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

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

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #4a5568;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.model-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 1rem;
    background: #f7fafc;
}

.model-checkbox {
    display: flex;
    align-items: center;
}

.model-checkbox label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.875rem;
    color: #4a5568;
    gap: 0.5rem;
}

.model-checkbox input[type="checkbox"] {
    margin: 0;
}

.checkmark {
    width: 16px;
    height: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 3px;
    position: relative;
    transition: all 0.2s;
}

.model-checkbox input[type="checkbox"]:checked + .checkmark {
    background: #4299e1;
    border-color: #4299e1;
}

.model-checkbox input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: -2px;
    left: 2px;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.agents-list {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.agents-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8f9fa;
}

.search-filter {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.filter-select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.875rem;
    background: white;
}

.agents-table-container {
    overflow-x: auto;
}

.agents-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.agents-table th,
.agents-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.agents-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #4a5568;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.agents-table tbody tr:hover {
    background: #f7fafc;
}

.agent-username strong {
    color: #2d3748;
    font-weight: 600;
}

.agent-email {
    color: #718096;
    font-size: 0.875rem;
}

.agent-type-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.agent-type-badge.assistant {
    background: #e6fffa;
    color: #234e52;
}

.agent-type-badge.specialist {
    background: #fef5e7;
    color: #744210;
}

.agent-type-badge.custom {
    background: #f0fff4;
    color: #22543d;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-indicator i {
    font-size: 0.5rem;
}

.status-indicator.active {
    color: #48bb78;
}

.status-indicator.inactive {
    color: #e53e3e;
}

.models-count {
    font-size: 0.875rem;
}

.model-tag.all {
    background: #667eea;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.model-count {
    color: #4a5568;
}

.tier-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.tier-badge.basic {
    background: #e2e8f0;
    color: #4a5568;
}

.tier-badge.premium {
    background: #fbb6ce;
    color: #97266d;
}

.tier-badge.enterprise {
    background: #d6f5d6;
    color: #22543d;
}

.last-login .never {
    color: #a0aec0;
    font-style: italic;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.action-buttons .btn {
    padding: 0.375rem 0.5rem;
    min-width: auto;
}

.no-agents-content {
    text-align: center;
    padding: 3rem;
    color: #718096;
}

.no-agents-content i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #cbd5e0;
}

.no-agents-content h3 {
    margin-bottom: 0.5rem;
    color: #4a5568;
}

.agents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
}

.agent-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    background: white;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.agent-card:hover {
    border-color: #4299e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.agent-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.agent-info h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #2d3748;
}

.agent-email {
    font-size: 0.875rem;
    color: #718096;
    margin: 0 0 0.5rem 0;
}

.agent-type {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.agent-type.assistant {
    background: #e6fffa;
    color: #234e52;
}

.agent-type.specialist {
    background: #fef5e7;
    color: #744210;
}

.agent-type.custom {
    background: #f0fff4;
    color: #22543d;
}

.agent-status .status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
}

.agent-status .status-indicator.active {
    background: #48bb78;
}

.agent-status .status-indicator.inactive {
    background: #e53e3e;
}

.agent-details {
    margin-bottom: 1.5rem;
}

.agent-description {
    font-size: 0.875rem;
    color: #4a5568;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.agent-models {
    margin-bottom: 1rem;
}

.agent-models strong {
    font-size: 0.875rem;
    color: #2d3748;
    display: block;
    margin-bottom: 0.5rem;
}

.model-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.model-tag {
    background: #edf2f7;
    color: #4a5568;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.model-tag.more {
    background: #667eea;
    color: white;
}

.agent-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.stat {
    text-align: center;
}

.stat .label {
    display: block;
    font-size: 0.75rem;
    color: #718096;
    margin-bottom: 0.25rem;
}

.stat .value {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #2d3748;
}

.agent-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-warning {
    background: #ed8936;
    color: white;
}

.btn-warning:hover {
    background: #dd6b20;
}

.btn-danger {
    background: #e53e3e;
    color: white;
}

.btn-danger:hover {
    background: #c53030;
}

.no-agents {
    text-align: center;
    padding: 3rem;
    color: #718096;
}

.no-agents i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #cbd5e0;
}

.no-agents h3 {
    margin-bottom: 0.5rem;
    color: #4a5568;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.agent-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.detail-item label {
    font-weight: 600;
    color: #4a5568;
    font-size: 0.875rem;
}

.detail-item span,
.detail-item p {
    color: #2d3748;
    font-size: 0.875rem;
}

.api-key-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f7fafc;
    padding: 0.75rem;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.api-key-display code {
    flex: 1;
    background: none;
    border: none;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.75rem;
    color: #4a5568;
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 3000;
    border-left: 4px solid #4299e1;
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

.notification.success {
    border-left-color: #48bb78;
}

.notification.error {
    border-left-color: #e53e3e;
}

.notification.info {
    border-left-color: #4299e1;
}

.notification i {
    font-size: 1.25rem;
}

.notification.success i {
    color: #48bb78;
}

.notification.error i {
    color: #e53e3e;
}

.notification.info i {
    color: #4299e1;
}

.notification span {
    flex: 1;
    font-size: 0.875rem;
    color: #2d3748;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #718096;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.notification-close:hover {
    background: #f7fafc;
    color: #4a5568;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive adjustments for agents */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .model-checkboxes {
        grid-template-columns: 1fr;
    }
    
    .agents-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    
    .search-filter {
        flex-direction: column;
        align-items: stretch;
    }
    
    .agent-stats {
        grid-template-columns: 1fr;
    }
    
    .agent-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .agent-actions {
        justify-content: center;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

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