/* ai-agent-manager.html — page-specific styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #0b0e13 0%, #141c28 100%);
    min-height: 100vh;
    color: #c9d2dc;
    line-height: 1.6;
}

.dashboard {
    display: flex;
    min-height: 100vh;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* Modern Sidebar with Glassmorphism */
.sidebar {
    width: 280px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 24px 0;
    box-shadow: 2px 0 25px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar.collapsed {
    width: 80px;
}

.sidebar-header {
    padding: 0 24px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 24px;
}

.header-buttons {
    margin-top: 16px;
}

.header-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(43,139,230,0.1);
    border: 1px solid rgba(43,139,230,0.3);
    border-radius: 8px;
    color: #2b8be6;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    justify-content: center;
}

.header-btn:hover {
    background: rgba(43,139,230,0.2);
    border-color: rgba(43,139,230,0.5);
    transform: translateY(-1px);
}

.header-btn .material-icons {
    font-size: 16px;
}

.knowledge-base-btn {
    background: rgba(84,104,242,0.1);
    border-color: rgba(84,104,242,0.3);
    color: #5468f2;
}

.knowledge-base-btn:hover {
    background: rgba(84,104,242,0.2);
    border-color: rgba(84,104,242,0.5);
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: calc(100vh - 120px);
}

.sidebar-content nav {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: 600;
    color: white;
}

.logo img {
    height: 40px;
}

/* Modern Navigation Items */
.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    background: none;
    color: white;
    width: 100%;
    text-align: left;
    position: relative;
    border-radius: 0 25px 25px 0;
    margin: 4px 0;
}

.nav-item:hover {
    background: rgba(43,139,230,0.15);
    transform: translateX(5px);
}

.nav-item.active {
    background: #26303f;
    border-left: 4px solid #5468f2;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(84,104,242,0.3);
}

.nav-item .material-icons {
    margin-right: 12px;
    font-size: 20px;
    transition: all 0.3s ease;
}

.nav-text {
    flex: 1;
}

/* Return to Workbench Button Styling */
.workbench-return {
    margin-top: auto;
    background: linear-gradient(135deg, #10b981, #059669);
    border: 1px solid rgba(16, 185, 129, 0.3);
    margin-top: 20px;
    border-radius: 12px;
    margin-left: 12px;
    margin-right: 12px;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
}

.workbench-return:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.workbench-return .material-icons {
    color: white;
}

.workbench-return .nav-text {
    color: white;
    font-weight: 600;
}

/* Main Content with Modern Styling */
.main-content {
    flex: 1;
    margin-left: 280px;
    display: flex;
    flex-direction: column;
    background: rgba(255,255,255,0.02);
}

.container {
    width: 100%;
    margin: 0 auto;
    padding: 20px;
}

.header {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #ff6b00, #ff9933);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.header p {
    color: #8c99a8;
    font-size: 16px;
}

.header .logo {
  /*  width: 50px;
    height: 50px;
    background: linear-gradient(45deg, #2b8be6, #5468f2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    box-shadow: 0 8px 25px rgba(43,139,230,0.3); */
}

.card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.4);
}

.card h2 {
    color: #f2f5f9;
    margin-bottom: 20px;
    font-size: 1.5em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-icon {
    width: 30px;
    height: 30px;
    background: linear-gradient(45deg, #2b8be6, #5468f2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(43,139,230,0.3);
}

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

.status-item {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    border-left: 4px solid #2b8be6;
    transition: all 0.3s ease;
}

.status-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.status-item.active {
    border-left-color: #10b981;
}

.status-item.warning {
    border-left-color: #f59e0b;
}

.status-item.error {
    border-left-color: #ef4444;
}

.status-number {
    font-size: 2em;
    font-weight: bold;
    color: #f2f5f9;
}

.status-label {
    color: #8c99a8;
    font-size: 0.9em;
    margin-top: 5px;
}

.agent-list {
    max-height: 300px;
    overflow-y: auto;
}

.agent-item {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    border-left: 4px solid #2b8be6;
    transition: all 0.3s ease;
}

.agent-item:hover {
    background: rgba(43,139,230,0.1);
    transform: translateX(5px);
}

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

.agent-name {
    font-weight: bold;
    color: #f2f5f9;
}

.agent-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: bold;
}

.status-online {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-offline {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-processing {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.agent-details {
    font-size: 0.9em;
    color: #8c99a8;
}

.workflow-item {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    border-left: 4px solid #10b981;
}

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

.workflow-name {
    font-weight: bold;
    color: #f2f5f9;
}

.workflow-progress {
    width: 100%;
    height: 8px;
    background: rgba(11,14,19,0.5);
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #2b8be6, #5468f2);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.security-item {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    border-left: 4px solid #ef4444;
}

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

.security-name {
    font-weight: bold;
    color: #f2f5f9;
}

.security-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: bold;
}

.status-secure {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-critical {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.integration-item {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    border-left: 4px solid #186dc2;
}

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

.integration-name {
    font-weight: bold;
    color: #f2f5f9;
}

.integration-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: bold;
}

.status-connected {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-disconnected {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-pending {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.button {
    background: linear-gradient(135deg, #2b8be6, #5468f2);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 4px 15px rgba(43,139,230,0.3);
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(43,139,230,0.4);
}

.button.secondary {
    background: rgba(11,14,19,0.8);
    color: #f2f5f9;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.button.secondary:hover {
    background: rgba(43,139,230,0.15);
    transform: translateY(-1px);
}

.button.danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.button.danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

.button.success {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.button.success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 32px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    color: #f2f5f9;
}

.modal-content h2 {
    color: #f2f5f9;
    margin-bottom: 24px;
    font-weight: 600;
}

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

.close {
    color: #8c99a8;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #f2f5f9;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #f2f5f9;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 14px;
    color: #f2f5f9;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2b8be6;
    box-shadow: 0 0 0 4px rgba(43,139,230,0.1);
    background: rgba(0, 0, 0, 0.4);
}

.form-group input::placeholder {
    color: #838f9f;
}

.tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.tab {
    padding: 12px 24px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    color: #8c99a8;
}

.tab.active {
    border-bottom-color: #2b8be6;
    color: #2b8be6;
    font-weight: bold;
}

.tab:hover {
    background: rgba(43,139,230,0.1);
    color: #f2f5f9;
}

.tab-content {
    display: none;
}

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

.chart-container {
    height: 300px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
}

.chart-placeholder {
    text-align: center;
    color: #8c99a8;
}

.chart-placeholder h3 {
    margin-bottom: 10px;
    color: #f2f5f9;
}

.alert {
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

@media (max-width: 768px) {
    .sidebar {
        width: 80px;
    }

    .sidebar .nav-text {
        display: none;
    }

    .main-content {
        margin-left: 80px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .status-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}
