:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a25;
    --bg-hover: #22222f;
    --border: #2a2a3a;
    --text-primary: #e8e8f0;
    --text-secondary: #8888a0;
    --accent: #00d4aa;
    --accent-hover: #00f0c0;
    --accent-dim: rgba(0, 212, 170, 0.1);
    --danger: #ff4757;
    --warning: #ffa502;
    --info: #3b82f6;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(0, 212, 170, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(59, 130, 246, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.app {
    position: relative;
    z-index: 1;
}

.header {
    position: sticky;
    top: 0;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    z-index: 100;
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--accent);
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: var(--bg-primary);
    font-size: 1.2rem;
}

.search-bar {
    flex: 1;
    max-width: 500px;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.search-bar::before {
    content: '🔍';
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
}

.btn {
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
}

.main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

.skills-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.skills-header h1 {
    font-size: 2rem;
    font-weight: 700;
}

.filter-tabs {
    display: flex;
    gap: 0.5rem;
}

.filter-tab {
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-tab:hover,
.filter-tab.active {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--info));
    opacity: 0;
    transition: opacity 0.3s;
}

.skill-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.skill-card:hover::before {
    opacity: 1;
}

.skill-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.skill-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-dim);
    border-radius: var(--radius-sm);
    display: grid;
    place-items: center;
    font-size: 1.5rem;
}

.skill-badge {
    padding: 0.25rem 0.5rem;
    background: var(--bg-secondary);
    border-radius: 4px;
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
}

.skill-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.skill-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.skill-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.skill-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: none;
    place-items: center;
}

.modal-overlay.active {
    display: grid;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 95%;
    max-width: 1200px;
    max-height: 95vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 1.2rem;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group label .required {
    color: var(--danger);
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

textarea.form-input {
    min-height: 100px;
    resize: vertical;
}

.form-hint {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.flow-editor {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-height: 700px;
    position: relative;
    overflow: hidden;
}

.flow-toolbar {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.flow-canvas {
    position: relative;
    width: 100%;
    height: 700px;
    overflow: auto;
}

.flow-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.flow-svg path {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2;
    stroke-dasharray: 8 4;
}

.flow-node {
    position: absolute;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    min-width: 220px;
    max-width: 300px;
    cursor: move;
    z-index: 2;
    transition: border-color 0.2s;
}

.flow-node:hover {
    border-color: var(--accent);
}

.flow-node.selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.flow-node-header {
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.flow-node-type {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
}

.type-prompt { background: rgba(59, 130, 246, 0.2); color: var(--info); }
.type-api { background: rgba(0, 212, 170, 0.2); color: var(--accent); }
.type-skill { background: rgba(255, 165, 2, 0.2); color: var(--warning); }
.type-condition { background: rgba(255, 71, 87, 0.2); color: var(--danger); }

.flow-node-body {
    padding: 1rem;
}

.flow-node-body p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.flow-node-assignee {
    padding: 0.5rem 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.flow-node-assignee strong {
    color: var(--accent);
}

.flow-node-ports {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    border-top: 1px solid var(--border);
}

.port {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border);
    border: 2px solid var(--bg-card);
    cursor: crosshair;
    transition: all 0.2s;
}

.port:hover {
    background: var(--accent);
    transform: scale(1.3);
}

.port.input { margin-left: -6px; }
.port.output { margin-right: -6px; }

.node-config {
    position: absolute;
    top: 0;
    right: 0;
    width: 360px;
    height: 100%;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    padding: 1.5rem;
    transform: translateX(100%);
    transition: transform 0.3s;
    z-index: 20;
    overflow-y: auto;
}

.node-config.open {
    transform: translateX(0);
}

.node-config h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.skill-ref-list {
    max-height: 200px;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.skill-ref-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s;
}

.skill-ref-item:last-child {
    border-bottom: none;
}

.skill-ref-item:hover {
    background: var(--bg-hover);
}

.skill-ref-item h4 {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.skill-ref-item p {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 300;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem 1.5rem;
    margin-top: 0.5rem;
    box-shadow: var(--shadow);
    animation: slideIn 0.3s ease;
}

.toast.success { border-left: 3px solid var(--accent); }
.toast.error { border-left: 3px solid var(--danger); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Workspace page styles */
.workspace-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

.workspace-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    height: fit-content;
}

.workspace-sidebar h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.workspace-nav-item {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.workspace-nav-item:hover,
.workspace-nav-item.active {
    background: var(--accent-dim);
    color: var(--accent);
}

.workspace-nav-item .badge {
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
}

.workspace-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
}

.workspace-content h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.task-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    transition: all 0.2s;
}

.task-card:hover {
    border-color: var(--accent);
}

.task-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.task-card-header h4 {
    font-size: 1rem;
    font-weight: 500;
}

.task-status {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-pending {
    background: rgba(255, 165, 2, 0.2);
    color: var(--warning);
}

.status-in-progress {
    background: rgba(59, 130, 246, 0.2);
    color: var(--info);
}

.status-completed {
    background: rgba(0, 212, 170, 0.2);
    color: var(--accent);
}

.task-card p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.task-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.task-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.task-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

@media (max-width: 768px) {
    .header-inner { flex-wrap: wrap; }
    .search-bar { order: 3; max-width: 100%; flex-basis: 100%; }
    .skills-grid { grid-template-columns: 1fr; }
    .modal { width: 95%; }
    .workspace-layout { grid-template-columns: 1fr; }
}

/* 虚拟员工模块样式 */
.bots-section {
    margin-bottom: 3rem;
}

.bots-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.bots-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.bot-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.bot-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--warning), var(--danger));
    opacity: 0;
    transition: opacity 0.3s;
}

.bot-card:hover {
    border-color: var(--warning);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.bot-card:hover::before {
    opacity: 1;
}

.bot-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.bot-avatar {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--warning), var(--danger));
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.bot-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.bot-info .bot-role {
    font-size: 0.8rem;
    color: var(--warning);
    font-family: 'JetBrains Mono', monospace;
}

.bot-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.bot-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.bot-skill-tag {
    padding: 0.25rem 0.6rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 0.7rem;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.bot-skill-tag.empty {
    color: var(--text-secondary);
    border-style: dashed;
}

.bot-skill-tag .remove-skill {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.bot-skill-tag .remove-skill:hover {
    opacity: 1;
    color: var(--danger);
}

.bot-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.bot-status {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 2s infinite;
}

.status-dot.idle { background: var(--text-secondary); animation: none; }
.status-dot.working { background: var(--warning); }
.status-dot.error { background: var(--danger); animation: none; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 右键菜单 */
.context-menu {
    position: fixed;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0;
    min-width: 180px;
    z-index: 500;
    box-shadow: var(--shadow);
    display: none;
}

.context-menu.active {
    display: block;
}

.context-menu-item {
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.9rem;
}

.context-menu-item:hover {
    background: var(--bg-hover);
}

.context-menu-item.danger {
    color: var(--danger);
}

.context-menu-item.danger:hover {
    background: rgba(255, 71, 87, 0.1);
}

.context-menu-divider {
    height: 1px;
    background: var(--border);
    margin: 0.5rem 0;
}

/* 虚拟员工属性面板 */
.bot-profile {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.bot-profile-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.bot-profile-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--warning), var(--danger));
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 2.5rem;
    color: white;
}

.bot-profile-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.bot-profile-info .bot-id {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
}

.bot-profile-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
}

.bot-profile-section h4 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.profile-stat {
    text-align: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

.profile-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.profile-stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.profile-skills-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.profile-skill-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

.profile-skill-item-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.profile-skill-item-info span:first-child {
    font-size: 1.2rem;
}

.profile-skill-item-info div {
    font-size: 0.9rem;
}

.profile-skill-item-info div small {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* 任务流程编辑器 */
.workflow-editor {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.workflow-step {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-bottom: 0.75rem;
    position: relative;
    transition: all 0.2s;
}

.workflow-step:hover {
    border-color: var(--accent);
}

.workflow-step-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.workflow-step-number {
    width: 28px;
    height: 28px;
    background: var(--accent);
    color: var(--bg-primary);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 600;
    font-size: 0.85rem;
}

.workflow-step-number.conditional {
    background: var(--danger);
}

.workflow-step-type {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: var(--bg-card);
    color: var(--text-secondary);
}

.workflow-step-content {
    padding-left: 2.5rem;
}

.workflow-step-content textarea {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    min-height: 60px;
}

.workflow-step-content textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.workflow-step-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-left: 2.5rem;
}

.workflow-add-step {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* 定时任务 */
.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.schedule-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.schedule-item-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.schedule-time {
    background: var(--accent-dim);
    color: var(--accent);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

.schedule-item-content h4 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.schedule-item-content p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.schedule-toggle {
    position: relative;
    width: 48px;
    height: 24px;
}

.schedule-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.schedule-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    transition: all 0.3s;
}

.schedule-toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: all 0.3s;
}

.schedule-toggle input:checked + .schedule-toggle-slider {
    background: var(--accent);
    border-color: var(--accent);
}

.schedule-toggle input:checked + .schedule-toggle-slider::before {
    transform: translateX(24px);
    background: var(--bg-primary);
}

/* 技能选择器 */
.skill-selector {
    max-height: 250px;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.skill-selector-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.skill-selector-item:last-child {
    border-bottom: none;
}

.skill-selector-item:hover {
    background: var(--bg-hover);
}

.skill-selector-item.selected {
    background: var(--accent-dim);
    border-left: 3px solid var(--accent);
}

.skill-selector-item-info h4 {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.skill-selector-item-info p {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.skill-selector-check {
    color: var(--accent);
    font-size: 1.2rem;
}

/* 虚拟员工人物卡片 - 新样式 */
.bot-card-new {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    min-height: 320px;
    display: flex;
    flex-direction: column;
}

.bot-card-new:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.bot-character-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    min-height: 180px;
}

.bot-character {
    font-size: 4rem;
    z-index: 2;
    position: relative;
    transition: transform 0.3s;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.bot-card-new:hover .bot-character {
    transform: scale(1.1);
}

.bot-skills-orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 160px;
    height: 160px;
}

.orbit-skill {
    position: absolute;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 0.35rem 0.7rem;
    font-size: 0.7rem;
    color: var(--accent);
    white-space: nowrap;
    cursor: default;
    transition: all 0.3s;
    z-index: 1;
}

.bot-card-new:hover .orbit-skill {
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(0, 212, 170, 0.3);
}

.orbit-skill:hover {
    background: var(--accent-dim);
}

.bot-empty-orbit {
    position: absolute;
    border: 2px dashed var(--border);
    border-radius: 50%;
    opacity: 0.3;
}

.bot-card-info {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.bot-card-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bot-card-info h3 .bot-role-badge {
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
    background: var(--accent-dim);
    color: var(--accent);
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
}

.bot-card-info p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.bot-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* 任务执行日志 */
.execution-log {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    max-height: 400px;
    overflow-y: auto;
}

.log-header {
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
}

.log-header h4 {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.log-status {
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.7rem;
}

.log-status.running {
    background: rgba(255, 165, 2, 0.2);
    color: var(--warning);
}

.log-status.completed {
    background: rgba(0, 212, 170, 0.2);
    color: var(--accent);
}

.log-status.failed {
    background: rgba(255, 71, 87, 0.2);
    color: var(--danger);
}

.log-entries {
    padding: 0.5rem;
}

.log-entry {
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.log-entry.success {
    background: rgba(0, 212, 170, 0.08);
    border-left: 3px solid var(--accent);
}

.log-entry.error {
    background: rgba(255, 71, 87, 0.08);
    border-left: 3px solid var(--danger);
}

.log-entry.info {
    background: rgba(59, 130, 246, 0.08);
    border-left: 3px solid var(--info);
}

.log-entry.warning {
    background: rgba(255, 165, 2, 0.08);
    border-left: 3px solid var(--warning);
}

.log-time {
    color: var(--text-secondary);
    font-size: 0.75rem;
    flex-shrink: 0;
}

.log-message {
    flex: 1;
    word-break: break-word;
}

.log-node-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.7rem;
    margin-right: 0.5rem;
}

.log-node-indicator.success {
    background: var(--accent);
    color: var(--bg-primary);
}

.log-node-indicator.error {
    background: var(--danger);
    color: white;
}

/* 执行中任务列表 */
.running-tasks-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.running-task-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.running-task-item:hover {
    border-color: var(--accent);
    background: var(--bg-hover);
}

.running-task-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.running-task-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-dim);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.2rem;
}

.running-task-info h4 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.running-task-info p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.running-task-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.progress-bar {
    width: 80px;
    height: 6px;
    background: var(--bg-card);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    transition: width 0.3s;
}

.progress-percent {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 500;
}

/* ========== Token 钱包模块 ========== */
.wallet-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2rem;
}

.wallet-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.wallet-balance-card {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-hover));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.wallet-balance-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--accent-dim) 0%, transparent 70%);
    pointer-events: none;
}

.wallet-balance-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.wallet-balance-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.wallet-balance-value .token-symbol {
    font-size: 1rem;
    color: var(--text-secondary);
}

.wallet-balance-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.wallet-balance-actions .btn {
    flex: 1;
}

.wallet-stats {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.wallet-stats h3 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.wallet-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.wallet-stat-row:last-child {
    border-bottom: none;
}

.wallet-stat-row .label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.wallet-stat-row .value {
    font-size: 0.95rem;
    font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
}

.wallet-stat-row .value.income { color: var(--accent); }
.wallet-stat-row .value.expense { color: var(--danger); }

.wallet-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
}

.wallet-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.wallet-tab {
    padding: 0.6rem 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.wallet-tab:hover,
.wallet-tab.active {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent);
}

.transaction-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.transaction-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.transaction-item:hover {
    border-color: var(--accent);
}

.transaction-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.transaction-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.1rem;
}

.transaction-icon.recharge { background: var(--accent-dim); }
.transaction-icon.salary { background: rgba(255, 165, 2, 0.2); }
.transaction-icon.task { background: rgba(59, 130, 246, 0.2); }
.transaction-icon.slot { background: rgba(138, 43, 226, 0.2); }

.transaction-details h4 {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.transaction-details p {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.transaction-amount {
    font-size: 1rem;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

.transaction-amount.positive { color: var(--accent); }
.transaction-amount.negative { color: var(--danger); }

/* 充值弹窗 */
.recharge-packages {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.recharge-package {
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.recharge-package:hover,
.recharge-package.selected {
    border-color: var(--accent);
    background: var(--accent-dim);
}

.recharge-package.popular::after {
    content: '热门';
    position: absolute;
    top: -10px;
    right: 10px;
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
}

.recharge-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
}

.recharge-price {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.recharge-bonus {
    font-size: 0.75rem;
    color: var(--warning);
    margin-top: 0.25rem;
}

/* Bot 工资设置 */
.salary-setting {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    margin-top: 1rem;
}

.salary-slider {
    margin: 1rem 0;
}

.salary-slider input[type="range"] {
    width: 100%;
    height: 6px;
    background: var(--bg-card);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.salary-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
}

.salary-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.salary-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
}

.salary-period {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.salary-tips {
    margin-top: 1rem;
    padding: 0.75rem;
    background: var(--accent-dim);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--accent);
}

/* Bot Token 信息 */
.bot-token-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--accent);
}

.bot-token-info .token-amount {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
}

.bot-token-info.warning {
    color: var(--danger);
    animation: pulse 2s infinite;
}

.bot-token-info .token-warning {
    font-size: 0.9rem;
}

.bot-token-info .token-empty {
    font-size: 0.9rem;
    color: var(--danger);
}

/* 账单筛选 */
.bill-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.bill-filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bill-filter-group label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.bill-filter-group select {
    padding: 0.4rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .header-inner { flex-wrap: wrap; }
    .search-bar { order: 3; max-width: 100%; flex-basis: 100%; }
    .skills-grid { grid-template-columns: 1fr; }
    .modal { width: 95%; }
    .workspace-layout { grid-template-columns: 1fr; }
    .wallet-layout { grid-template-columns: 1fr; }
    .recharge-packages { grid-template-columns: 1fr; }
}
