/* ============================================================================
   av-workspaces-panel.css — Modulo CSS estratto da av.html
   AIVEK Vision — Generato automaticamente
   ============================================================================ */

/* ========================================
   WORKSPACES PANEL STYLES
   ======================================== */
.workspaces-panel-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
}
.ws-panel-header {
    display: flex;
    gap: 8px;
    align-items: center;
}
.ws-btn-new {
    flex: 1;
    padding: 10px;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.ws-btn-new:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}
.ws-btn-refresh {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    color: #667eea;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.ws-btn-refresh:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: rotate(180deg);
}
.ws-panel-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ws-panel-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #9ca3af;
    gap: 10px;
}
.ws-panel-loading i {
    font-size: 24px;
    color: #667eea;
}
.ws-panel-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    text-align: center;
    color: #9ca3af;
}
.ws-panel-empty i {
    font-size: 40px;
    margin-bottom: 12px;
    color: #4b5563;
}
.ws-panel-empty.error i {
    color: #ef4444;
}
.ws-panel-empty p {
    margin: 0 0 6px 0;
    font-weight: 600;
    color: #e5e7eb;
}
.ws-panel-empty span {
    font-size: 12px;
}
.ws-panel-item {
    background: rgba(30, 30, 50, 0.6);
    border: 1px solid rgba(102, 126, 234, 0.15);
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.ws-panel-item:hover {
    border-color: rgba(102, 126, 234, 0.4);
    background: rgba(102, 126, 234, 0.08);
    transform: translateX(3px);
}
.ws-panel-item-header {
    display: flex;
    align-items: center;
    gap: 10px;
}
.ws-panel-item-color {
    width: 8px;
    height: 36px;
    border-radius: 4px;
}
.ws-panel-item-info {
    flex: 1;
}
.ws-panel-item-info h5 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #e5e7eb;
}
.ws-panel-item-meta {
    font-size: 11px;
    color: #9ca3af;
    display: flex;
    gap: 10px;
}
.ws-panel-item-meta i {
    margin-right: 3px;
}
.ws-role-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
}
.ws-role-badge.owner {
    background: rgba(139, 92, 246, 0.2);
    color: #8b5cf6;
}
.ws-role-badge.member {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

/* Form Styles */
.ws-new-form, .ws-detail-view, .ws-chat-view {
    background: transparent;
    border-radius: 12px;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.ws-form-header, .ws-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.15);
}
.ws-form-header h4, .ws-detail-header h4 {
    margin: 0;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e5e7eb;
}
.ws-form-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 22px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.ws-form-close:hover {
    color: #ef4444;
}
.ws-form-body {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
}
.ws-form-group {
    margin-bottom: 15px;
}
.ws-form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    margin-bottom: 6px;
}
.ws-form-group input, .ws-form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(30, 30, 50, 0.8);
    border: 1px solid rgba(102, 126, 234, 0.2);
    color: #e5e7eb;
    font-size: 13px;
    transition: border-color 0.2s;
}
.ws-form-group input:focus, .ws-form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}
.ws-color-grid {
    display: flex;
    gap: 8px;
}
.ws-color-opt {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.2s ease;
}
.ws-color-opt:hover {
    transform: scale(1.1);
}
.ws-color-opt.selected {
    border-color: white;
    box-shadow: 0 0 12px currentColor;
}
.ws-form-footer {
    display: flex;
    gap: 10px;
    padding: 12px 15px;
    border-top: 1px solid rgba(102, 126, 234, 0.15);
}
.ws-btn-cancel, .ws-btn-create {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.ws-btn-cancel {
    background: rgba(107, 114, 128, 0.2);
    border: 1px solid rgba(107, 114, 128, 0.3);
    color: #9ca3af;
}
.ws-btn-cancel:hover {
    background: rgba(107, 114, 128, 0.3);
}
.ws-btn-create {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
}
.ws-btn-create:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Detail View */
.ws-back-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    color: #667eea;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ws-back-btn:hover {
    background: rgba(102, 126, 234, 0.2);
}
.ws-detail-title {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 10px;
}
.ws-new-chat-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ws-new-chat-btn:hover {
    transform: scale(1.05);
}
.ws-detail-section {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}
.ws-detail-section h5 {
    margin: 0 0 10px 0;
    font-size: 11px;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.ws-members-list, .ws-chats-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ws-member-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: rgba(30, 30, 50, 0.5);
    border-radius: 8px;
}
.ws-member-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: white;
}
.ws-member-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.ws-member-name {
    font-size: 13px;
    font-weight: 600;
    color: #e5e7eb;
}
.ws-member-role {
    font-size: 11px;
    color: #9ca3af;
}
.ws-chat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(30, 30, 50, 0.5);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.ws-chat-item:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateX(3px);
}
.ws-chat-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(102, 126, 234, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
}
.ws-chat-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.ws-chat-name {
    font-size: 13px;
    font-weight: 600;
    color: #e5e7eb;
}
.ws-chat-meta {
    font-size: 11px;
    color: #9ca3af;
}
.ws-summary-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8b5cf6;
    font-size: 11px;
}
.ws-use-context-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #10b981;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.ws-use-context-btn:hover {
    background: rgba(16, 185, 129, 0.25);
    transform: scale(1.1);
}
.ws-use-context-btn.large {
    width: auto;
    padding: 6px 10px;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
}

/* Delete Buttons */
.ws-header-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}
.ws-delete-ws-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #ef4444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.ws-delete-ws-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    transform: scale(1.05);
}
.ws-delete-chat-btn {
    width: 24px;
    height: 24px;
    border-radius: 5px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: all 0.2s ease;
    opacity: 0.6;
}
.ws-chat-item:hover .ws-delete-chat-btn {
    opacity: 1;
}
.ws-delete-chat-btn:hover {
    background: rgba(239, 68, 68, 0.25);
    transform: scale(1.1);
}

/* Section Header with Add Button */
.ws-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.ws-section-header h5 {
    margin: 0;
}
.ws-add-member-btn {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: all 0.2s ease;
}
.ws-add-member-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}
.ws-remove-member-btn {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    opacity: 0;
    transition: all 0.2s ease;
}
.ws-member-item:hover .ws-remove-member-btn {
    opacity: 1;
}
.ws-remove-member-btn:hover {
    background: rgba(239, 68, 68, 0.25);
    transform: scale(1.1);
}

/* Add Member Form */
.ws-add-member-form {
    margin-top: 12px;
    padding: 12px;
    background: rgba(30, 30, 50, 0.6);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Open Chat Button */
.ws-open-chat-btn {
    width: 24px;
    height: 24px;
    border-radius: 5px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    color: #667eea;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: all 0.2s ease;
    opacity: 0.6;
}
.ws-chat-item:hover .ws-open-chat-btn {
    opacity: 1;
}
.ws-open-chat-btn:hover {
    background: rgba(102, 126, 234, 0.25);
    transform: scale(1.1);
}

/* Workspace Chat Indicator */
.workspace-chat-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    border-bottom: 1px solid rgba(102, 126, 234, 0.3);
    font-size: 13px;
    color: #a5b4fc;
}
.workspace-chat-indicator i {
    color: #667eea;
}
.workspace-chat-indicator span {
    flex: 1;
}
.workspace-chat-indicator button {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.workspace-chat-indicator button:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.ws-no-data {
    font-size: 12px;
    color: #6b7280;
    font-style: italic;
    padding: 8px;
}

/* Chat Messages View */
.ws-messages-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}
.ws-message-item {
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(30, 30, 50, 0.6);
}
.ws-message-item.user {
    border-left: 3px solid #667eea;
}
.ws-message-item.assistant {
    border-left: 3px solid #8b5cf6;
}
.ws-message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.ws-message-author {
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}
.ws-message-author.user {
    color: #667eea;
}
.ws-message-author.assistant {
    color: #8b5cf6;
}
.ws-message-time {
    font-size: 10px;
    color: #6b7280;
}
.ws-message-content {
    font-size: 12px;
    color: #d1d5db;
    line-height: 1.5;
}
.ws-summary-text {
    font-size: 12px;
    color: #d1d5db;
    line-height: 1.6;
    padding: 10px;
    background: rgba(139, 92, 246, 0.08);
    border-radius: 8px;
    border-left: 3px solid #8b5cf6;
}
.ws-new-chat-form {
    margin-top: 12px;
    padding: 12px;
    background: rgba(30, 30, 50, 0.8);
    border-radius: 10px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

